interview-widget 3.0.0 → 3.0.1

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.
@@ -1,4 +1,4 @@
1
- (function(We,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],p):(We=typeof globalThis<"u"?globalThis:We||self,p(We.InterviewWidget={},We.React,We.ReactDOM))})(this,function(We,p,Zi){"use strict";var k7=Object.defineProperty;var O7=(We,p,Zi)=>p in We?k7(We,p,{enumerable:!0,configurable:!0,writable:!0,value:Zi}):We[p]=Zi;var Bt=(We,p,Zi)=>O7(We,typeof p!="symbol"?p+"":p,Zi);var Bu=typeof document<"u"?document.currentScript:null,J2={exports:{}},wr={};/**
1
+ (function(it,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],y):(it=typeof globalThis<"u"?globalThis:it||self,y(it.InterviewWidget={},it.React,it.ReactDOM))})(this,function(it,y,Zi){"use strict";var u7=Object.defineProperty;var o7=(it,y,Zi)=>y in it?u7(it,y,{enumerable:!0,configurable:!0,writable:!0,value:Zi}):it[y]=Zi;var Qt=(it,y,Zi)=>o7(it,typeof y!="symbol"?y+"":y,Zi);var qo=typeof document<"u"?document.currentScript:null,P2={exports:{}},_r={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,21 +6,21 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Mg=Symbol.for("react.transitional.element"),Cg=Symbol.for("react.fragment");function P2(e,t,n){var i=null;if(n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:Mg,type:e,key:i,ref:t!==void 0?t:null,props:n}}wr.Fragment=Cg,wr.jsx=P2,wr.jsxs=P2,J2.exports=wr;var u=J2.exports;const Gu={},pn={api:{baseUrl:"/api",retryConfig:{attempts:3,backoff:"exponential",baseDelay:1e3}},ui:{baseColor:"#3B82F6",borderRadius:"8px"},interview:{allow_answer_editing:!0,timers:{thinkingDuration:30,answeringDuration:120,editingDuration:30},stt:{provider:"groq",model:"whisper-large-v3-turbo",language:"en"},tts:{provider:"piper"},proctoring:{enabled:!0,gazeAnalysisEnabled:!0}}},Hu="iw-storage";function Dg(){if(!(typeof{url:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Bu&&Bu.tagName.toUpperCase()==="SCRIPT"&&Bu.src||new URL("widget.umd.js",document.baseURI).href}<"u"&&(Gu!=null&&Gu.VITE_IW_SECRET)))return typeof process<"u"&&process.env.NEXT_PUBLIC_IW_SECRET?process.env.NEXT_PUBLIC_IW_SECRET:typeof window<"u"&&window.__IW_SECRET__?window.__IW_SECRET__:"proctoring-data-seed"}const $2=Dg(),gr=30,kg={SCREENSHOT:"screenshot"},Vu="AES-GCM",Fu=12;async function eh(e){const n=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",n);return crypto.subtle.importKey("raw",i,Vu,!1,["encrypt","decrypt"])}function Og(){return crypto.getRandomValues(new Uint8Array(Fu))}async function Lg(e,t="default-seed"){try{const n=typeof e=="string"?e:JSON.stringify(e),a=new TextEncoder().encode(n),l=await eh(t),s=Og(),r=await crypto.subtle.encrypt({name:Vu,iv:s},l,a),o=new Uint8Array(s.length+r.byteLength);return o.set(new Uint8Array(s),0),o.set(new Uint8Array(r),s.length),btoa(String.fromCharCode(...Array.from(o)))}catch(n){throw console.error("Encryption failed:",n),new Error("Failed to encrypt data")}}async function Ug(e,t="default-seed"){try{const n=atob(e),i=new Uint8Array(n.length);for(let c=0;c<n.length;c++)i[c]=n.charCodeAt(c);const a=i.slice(0,Fu),l=i.slice(Fu),s=await eh(t),r=await crypto.subtle.decrypt({name:Vu,iv:a},s,l);return new TextDecoder().decode(r)}catch(n){throw console.error("Decryption failed:",n),new Error("Failed to decrypt data")}}async function zg(e,t="default-seed"){return Lg(e,t)}async function Rg(e,t="default-seed"){const n=await Ug(e,t);try{return JSON.parse(n)}catch{return n}}const ql=p.createContext(null),Bg=async()=>{try{const e=sessionStorage.getItem(Hu);if(e){const n=(await Rg(e,$2)).state;return{logViolations:(n==null?void 0:n.logViolations)||[],totalViolations:(n==null?void 0:n.totalViolations)||0,gazeViolationCounters:(n==null?void 0:n.gazeViolationCounters)||{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:(n==null?void 0:n.referenceSet)??!1,referenceRef:(n==null?void 0:n.referenceRef)??{x:.5,y:.5,noseX:.5,noseY:.5}}}}catch(e){console.error("Failed to load proctoring data from session storage:",e)}return{logViolations:[],totalViolations:0,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:!1,referenceRef:{x:.5,y:.5,noseX:.5,noseY:.5}}},Yl=async e=>{try{const t=await zg({state:e,version:0},$2);sessionStorage.setItem(Hu,t)}catch(t){console.error("Failed to save proctoring data to session storage:",t)}},Gg=({children:e})=>{const t=p.useRef({logViolations:[],totalViolations:0,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:!1,referenceRef:{x:.5,y:.5,noseX:.5,noseY:.5}}),n=p.useRef(new Set);p.useEffect(()=>{Bg().then(f=>{t.current=f,i()})},[]);const i=p.useCallback(()=>{n.current.forEach(f=>f())},[]),a=p.useCallback(f=>(n.current.add(f),()=>{n.current.delete(f)}),[]),l=p.useCallback(()=>t.current,[]),s=p.useCallback(f=>{t.current={...t.current,logViolations:[...t.current.logViolations,f],totalViolations:t.current.totalViolations+1},Yl(t.current),i()},[i]),r=p.useCallback(f=>{const w={...t.current.gazeViolationCounters};f==="looking_away"&&(w.lookingAwayCount+=1),f==="no_face_detected"&&(w.noFaceDetectedCount+=1),f==="multiple_faces"&&(w.multipleFacesCount+=1),w.totalGazeViolations=w.lookingAwayCount+w.noFaceDetectedCount+w.multipleFacesCount,t.current={...t.current,gazeViolationCounters:w},Yl(t.current),i()},[i]),o=p.useCallback(()=>{t.current={...t.current,logViolations:[],totalViolations:0},Yl(t.current),i()},[i]),c=p.useCallback(()=>{t.current={...t.current,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0}},Yl(t.current),i()},[i]),d=p.useCallback((f,w)=>{t.current={...t.current,referenceSet:f,referenceRef:w},Yl(t.current),i()},[i]),h=p.useMemo(()=>({getState:l,addViolation:s,clearViolations:o,subscribe:a,incrementGazeViolation:r,clearGazeViolationCounters:c,setReferenceData:d}),[l,s,o,a,r,c,d]);return u.jsx(ql.Provider,{value:h,children:e})},th=()=>{const e=p.useContext(ql);if(!e)throw new Error("useProctoringStore must be used within a ProctoringProvider");const t=p.useSyncExternalStore(e.subscribe,e.getState,e.getState);return{logViolations:t.logViolations,totalViolations:t.totalViolations,addViolation:e.addViolation,clearViolations:e.clearViolations,gazeViolationCounters:t.gazeViolationCounters,referenceSet:t.referenceSet,referenceRef:t.referenceRef,incrementGazeViolation:e.incrementGazeViolation,clearGazeViolationCounters:e.clearGazeViolationCounters,setReferenceData:e.setReferenceData}},Hg=()=>{const e=p.useContext(ql);if(!e)throw new Error("useViolations must be used within a ProctoringProvider");return p.useSyncExternalStore(e.subscribe,()=>e.getState().logViolations,()=>e.getState().logViolations)},Vg=()=>{const e=p.useContext(ql);if(!e)throw new Error("useTotalViolations must be used within a ProctoringProvider");return p.useSyncExternalStore(e.subscribe,()=>e.getState().totalViolations,()=>e.getState().totalViolations)},Fg=()=>{const e=p.useContext(ql);if(!e)throw new Error("useProctoringActions must be used within a ProctoringProvider");return{addViolation:e.addViolation,clearViolations:e.clearViolations}},nh=p.createContext(null);function qu({config:e={},children:t}){var i,a,l,s;const n={api:{...pn.api,...e.api,retryConfig:{...pn.api.retryConfig,...(i=e.api)==null?void 0:i.retryConfig}},ui:{...pn.ui,...e.ui},interview:{...pn.interview,...e.interview,timers:{...pn.interview.timers,...(a=e.interview)==null?void 0:a.timers},stt:{...pn.interview.stt,...(l=e.interview)==null?void 0:l.stt},tts:{...pn.interview.tts,...(s=e.interview)==null?void 0:s.tts}}};return u.jsx(nh.Provider,{value:n,children:u.jsx(Gg,{children:t})})}function pr(){const e=p.useContext(nh);if(!e)throw new Error("useInterviewConfig must be used within an InterviewWidgetProvider. Wrap your component tree with <InterviewWidgetProvider config={...}>");return e}function ih(){return pr().api||pn.api}function yr(){return pr().ui||pn.ui}function Yu(){return pr().interview||pn.interview}function qg(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function Yg(e,t,n){return"#"+[e,t,n].map(i=>{const a=Math.round(i).toString(16);return a.length===1?"0"+a:a}).join("")}function Xg(e,t){const n=qg(e);if(!n)return e;const i=n.r+(255-n.r)*t,a=n.g+(255-n.g)*t,l=n.b+(255-n.b)*t;return Yg(i,a,l)}function Qg(e){return new Promise(t=>setTimeout(t,e))}function Zg(e){return`linear-gradient(to left, ${Xg(e,.4)}, ${e})`}const Kg=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);function Ig(e){try{const t=e.split(".");if(t.length!==3||!t[1])throw new Error("Invalid JWT token");const i=t[1].replace(/-/g,"+").replace(/_/g,"/"),a=i.padEnd(i.length+(4-i.length%4)%4,"="),l=atob(a);return JSON.parse(l)}catch(t){return console.error("Error decoding JWT:",t),null}}const ah=e=>{var t;return!e||typeof e!="string"?"":(t=e.charAt(0))==null?void 0:t.toUpperCase()},Xu=e=>{const t=Math.max(0,Math.floor(e)),n=Math.floor(t/60).toString().padStart(2,"0"),i=(t%60).toString().padStart(2,"0");return`${n}:${i}`},Xl=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),u.jsx("path",{d:"M12 9v4"}),u.jsx("path",{d:"M12 17h.01"})]}),Wg=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-bolt-icon prefix__lucide-bolt",...e,children:[u.jsx("path",{d:"M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z"}),u.jsx("circle",{cx:12,cy:12,r:4})]}),Jg=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-camera-off-icon prefix__lucide-camera-off",...e,children:[u.jsx("path",{d:"M14.564 14.558a3 3 0 11-4.122-4.121M2 2l20 20"}),u.jsx("path",{d:"M20 20H4a2 2 0 01-2-2V9a2 2 0 012-2h1.997a2 2 0 00.819-.175M9.695 4.024A2 2 0 0110.004 4h3.993a2 2 0 011.76 1.05l.486.9A2 2 0 0018.003 7H20a2 2 0 012 2v7.344"})]}),vr=e=>u.jsx("svg",{width:"10",height:"9",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:u.jsx("path",{d:"M0.75 5.5C0.75 5.5 2.35 6.4125 3.15 7.75C3.15 7.75 5.55 2.5 8.75 0.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),lh=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M12 2a10 10 0 0 1 7.38 16.75"}),u.jsx("path",{d:"M12 6v6l4 2"}),u.jsx("path",{d:"M2.5 8.875a10 10 0 0 0-.5 3"}),u.jsx("path",{d:"M2.83 16a10 10 0 0 0 2.43 3.4"}),u.jsx("path",{d:"M4.636 5.235a10 10 0 0 1 .891-.857"}),u.jsx("path",{d:"M8.644 21.42a10 10 0 0 0 7.631-.38"})]}),Pg=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M12 6v6l4 2"}),u.jsx("circle",{cx:"12",cy:"12",r:"10"})]}),sh=e=>u.jsx("svg",{className:"iw-w-5 iw-h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",...e,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),rh=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}),u.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),$g=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),u.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),u.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),e5=e=>u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M2.66797 2H13.3346",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M3.66797 2V3.35359C3.66797 4.18151 4.05252 4.96247 4.70874 5.46726L8.0013 8L11.2938 5.46726C11.9501 4.96247 12.3346 4.18151 12.3346 3.35359V2",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M3.66797 14V12.6464C3.66797 11.8185 4.05252 11.0375 4.70874 10.5327L8.0013 8L11.2938 10.5327C11.9501 11.0375 12.3346 11.8185 12.3346 12.6464V14",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M2.66797 14H13.3346",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"})]}),Qu=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),u.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),u.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),oh=({className:e,...t})=>u.jsx("div",{children:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`iw-animate-spin ${e}`,...t,children:[u.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.jsx("path",{d:"M12 6l0 -3"}),u.jsx("path",{d:"M16.25 7.75l2.15 -2.15"}),u.jsx("path",{d:"M18 12l3 0"}),u.jsx("path",{d:"M16.25 16.25l2.15 2.15"}),u.jsx("path",{d:"M12 18l0 3"}),u.jsx("path",{d:"M7.75 16.25l-2.15 2.15"}),u.jsx("path",{d:"M6 12l-3 0"}),u.jsx("path",{d:"M7.75 7.75l-2.15 -2.15"})]})}),t5=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M17 7V11C17 13.7614 14.7614 16 12 16C9.23858 16 7 13.7614 7 11V7C7 4.23858 9.23858 2 12 2C14.7614 2 17 4.23858 17 7Z",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M20 11C20 15.4183 16.4183 19 12 19M12 19C7.58172 19 4 15.4183 4 11M12 19V22M12 22H15M12 22H9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),n5=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M2 2L22 22",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M4 11C4 15.4183 7.58172 19 12 19M12 19C13.9545 19 15.7454 18.2991 17.1348 17.1348M12 19V22M12 22H15M12 22H9M20 11C20 12.6514 19.4996 14.1859 18.6422 15.4603",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M7 6.98V11C7 13.7614 9.23858 16 12 16C13.1354 16 14.1647 15.6096 15.004 14.972M16.4387 13.244C16.7973 12.5545 17 11.8309 17 11V6.98C17 4.21858 14.7614 2 12 2C10.1312 2 8.53009 2.96527 7.672 4.484",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"})]}),i5=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}),u.jsx("line",{x1:"8",x2:"16",y1:"21",y2:"21"}),u.jsx("line",{x1:"12",x2:"12",y1:"17",y2:"21"})]}),a5=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),u.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),u.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),l5=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}),u.jsx("path",{d:"m9 12 2 2 4-4"})]}),s5=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-target-icon prefix__lucide-target",...e,children:[u.jsx("circle",{cx:12,cy:12,r:10}),u.jsx("circle",{cx:12,cy:12,r:6}),u.jsx("circle",{cx:12,cy:12,r:2})]}),r5=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-users-icon prefix__lucide-users",...e,children:[u.jsx("path",{d:"M16 21v-2a4 4 0 00-4-4H6a4 4 0 00-4 4v2M16 3.128a4 4 0 010 7.744M22 21v-2a4 4 0 00-3-3.87"}),u.jsx("circle",{cx:9,cy:7,r:4})]}),o5=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M11 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M2 11C2 7.70017 2 6.05025 3.02513 5.02513C4.05025 4 5.70017 4 9 4H10C13.2998 4 14.9497 4 15.9749 5.02513C17 6.05025 17 7.70017 17 11V13C17 16.2998 17 17.9497 15.9749 18.9749C14.9497 20 13.2998 20 10 20H9C5.70017 20 4.05025 20 3.02513 18.9749C2 17.9497 2 16.2998 2 13V11Z",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M17 8.90585L17.1259 8.80196C19.2417 7.05623 20.2996 6.18336 21.1498 6.60482C22 7.02628 22 8.42355 22 11.2181V12.7819C22 15.5765 22 16.9737 21.1498 17.3952C20.2996 17.8166 19.2417 16.9438 17.1259 15.198L17 15.0941",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),u5=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M2.00195 2L21.9773 22",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M16.8517 16.8668C16.7225 17.8052 16.4666 18.4659 15.9596 18.9735C14.9357 19.9987 13.2878 19.9987 9.99206 19.9987H8.99329C5.69755 19.9987 4.04967 19.9987 3.02581 18.9735C2.00195 17.9484 2.00195 16.2985 2.00195 12.9987V10.9987C2.00195 7.69885 2.00195 6.04893 3.02581 5.0238C3.36833 4.68086 3.78068 4.45265 4.3012 4.30078",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M8.23633 4.00052C8.47821 4 8.73001 4 8.99223 4H9.99099C13.2868 4 14.9347 4 15.9585 5.02513C16.9823 6.05025 16.9823 7.70017 16.9823 11V12.7574M16.9823 9.23142L19.3019 7.52913C20.773 6.54073 21.449 7.17196 21.6675 7.64847C22.1192 8.92813 21.9769 11.3936 21.9769 14.5417C21.8704 16.555 21.5953 16.7719 21.3138 16.9939L21.3108 16.9962",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ql={FACE_DETECTED:"face_detected",NO_FACE:"no_face_detected",MULTIPLE_FACES:"multiple_faces",LOOKING_AWAY:"looking_away",CAMERA_ERROR:"camera_error"},uh={[Ql.FACE_DETECTED]:{icon:rh,iconColor:"iw-text-green-600",iconBg:"iw-bg-green-50",iconBorder:"iw-border-green-100",title:"All Good",subtitle:"Everything looks normal",description:"Your gaze is properly focused on the screen. Continue with your interview.",buttonText:"Continue"},[Ql.NO_FACE]:{icon:Jg,iconColor:"iw-text-orange-600",iconBg:"iw-bg-orange-50",iconBorder:"iw-border-orange-100",title:"Face Not Detected",subtitle:"We can't see you in the camera",description:"Please ensure you're positioned properly in front of the camera and that your face is clearly visible.",buttonText:"I Understood"},[Ql.MULTIPLE_FACES]:{icon:r5,iconColor:"iw-text-red-600",iconBg:"iw-bg-red-50",iconBorder:"iw-border-red-100",title:"Multiple People Detected",subtitle:"More than one person is visible",description:"For interview integrity, please ensure you are alone in the room and only your face is visible to the camera.",buttonText:"I Understood"},[Ql.LOOKING_AWAY]:{icon:s5,iconColor:"iw-text-amber-600",iconBg:"iw-bg-amber-50",iconBorder:"iw-border-amber-200/75",title:"Stay Focused",subtitle:"We noticed you looked away from the screen",description:"To ensure interview integrity, please keep your attention on the screen throughout the session.",buttonText:"I Understood"},[Ql.CAMERA_ERROR]:{icon:Xl,iconColor:"iw-text-red-600",iconBg:"iw-bg-red-50",iconBorder:"iw-border-red-100",title:"Camera Issue",subtitle:"There's a problem with your camera",description:"Please check your camera connection and permissions, then refresh the page to continue.",buttonText:"I Understood"}};function c5(e){var t;if(!navigator.onLine)return{type:"network",message:"No internet connection",retryable:!0,userMessage:"Please check your internet connection and try again."};if(e.name==="AbortError"||(t=e.message)!=null&&t.includes("timeout"))return{type:"timeout",message:"Request timed out",retryable:!0,userMessage:"The request is taking longer than expected. Please try again."};if(e.status){const{status:n}=e;if(n===401||n===403)return{type:"auth",status:n,message:"Authentication failed",retryable:!1,userMessage:"Your session has expired. Please refresh the page."};if(n===429)return{type:"rate-limit",status:n,message:"Too many requests",retryable:!0,userMessage:"Please wait a moment before trying again."};if(n>=500)return{type:"server",status:n,message:`Server error: ${n}`,retryable:!0,userMessage:"Our servers are experiencing issues. Please try again in a few moments."};if(n>=400)return{type:"client",status:n,message:`Client error: ${n}`,retryable:!1,userMessage:"There was an issue with your request. Please check your input."}}return{type:"unknown",message:e.message||"Unknown error occurred",retryable:!0,userMessage:"Something unexpected happened. Please try again.",originalError:e}}async function si(e,t={},n={attempts:3,backoff:"exponential",baseDelay:1e3,maxDelay:1e4,jitter:!0}){let i;for(let a=1;a<=n.attempts;a++)try{const l=new AbortController,s=setTimeout(()=>l.abort(),6e4),r=await fetch(e,{...t,signal:l.signal});if(clearTimeout(s),r.status>=400&&r.status<500&&r.status!==429)return r;if(!r.ok)throw new Error(`HTTP ${r.status}: ${r.statusText}`);return r}catch(l){i=l;const s=c5(l);if(!s.retryable||a===n.attempts)throw s;const r=f5(a,n);console.warn(`API request failed (attempt ${a}/${n.attempts}), retrying in ${r}ms:`,s.message),await new Promise(o=>setTimeout(o,r))}throw i}function f5(e,t){let n;return t.backoff==="exponential"?n=t.baseDelay*Math.pow(2,e-1):n=t.baseDelay,n=Math.min(n,t.maxDelay),t.jitter&&(n=n*(.5+Math.random()*.5)),Math.round(n)}const ri={v2:"/v2"},oi={GENERATE_QUESTION:e=>`${ri.v2}/interviews/${e}/next-question`,SCREENSHOT_UPLOAD:e=>`${ri.v2}/interviews/${e}/assets/upload-url`,CONFIRM_UPLOAD:e=>`${ri.v2}/interviews/assets/${e}/confirm`,TRANSCRIBE_ANSWER:e=>`${ri.v2}/interviews/${e}/transcribe-answer`,SUBMIT_ANSWER:e=>`${ri.v2}/interviews/${e}/submit-answer`,EXIT:e=>`${ri.v2}/interviews/${e}/exit`,CONFIG:e=>`${ri.v2}/interviews/${e}/config`,TRANSCRIPTION:e=>`${ri.v2}/interviews/${e}/transcript`};class ch{constructor(t={}){Bt(this,"config");this.config=t}updateConfig(t){this.config={...this.config,...t}}getHeaders(){var n;const t={"Content-Type":"application/json"};return(n=this.config)!=null&&n.authToken&&(t.Authorization=`Bearer ${this.config.authToken}`),t}getBaseUrl(){var t;return((t=this.config)==null?void 0:t.baseUrl)||"/api"}async generateQuestion({interviewId:t,isInterviewDone:n=!1}){const i=await si(`${this.getBaseUrl()}${oi.GENERATE_QUESTION(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({interview_id:t,is_interview_done:n})});if(!i.ok)throw new Error(`Failed to get questions: ${i.status}`);return await i.json()}async submitAnswer({interviewId:t,qnaId:n,answer:i}){const a=await si(`${this.getBaseUrl()}${oi.SUBMIT_ANSWER(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({qna_id:n,answer_text:i})});if(!a.ok)throw new Error(`Failed to submit answer: ${a.status}`);return await a.json()}async exitInterview(t){const n=await si(`${this.getBaseUrl()}${oi.EXIT(t)}`,{method:"POST",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to exit interview: ${n.status}`)}async getInterviewConfig(t){const n=await si(`${this.getBaseUrl()}${oi.CONFIG(t)}`,{method:"GET",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to get interview config: ${n.status}`);return await n.json()}async requestScreenshotUploadUrl(t,n=`screenshot-${Date.now()}.jpeg`){const i=await si(`${this.getBaseUrl()}${oi.SCREENSHOT_UPLOAD(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({filename:n,mime_type:"image/jpeg",asset_type:kg.SCREENSHOT})});if(!i.ok)throw new Error(`Failed to request screenshot upload URL: ${i.status}`);return await i.json()}async uploadScreenshot(t,n){const i=await fetch(t,{method:"PUT",body:n,headers:{"Content-Type":"image/jpeg"}});if(!i.ok)throw new Error(`Failed to upload screenshot: ${i.status}`)}async confirmScreenshotUpload(t){const n=await si(`${this.getBaseUrl()}${oi.CONFIRM_UPLOAD(t)}`,{method:"POST",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to confirm screenshot upload: ${n.status}`)}async getInterviewTranscription(t){const n=await si(`${this.getBaseUrl()}${oi.TRANSCRIPTION(t)}`,{method:"GET",headers:{...this.getHeaders(),"x-auth-token":"interview-engine-api-key"}});if(!n.ok)throw new Error(`Failed to get interview transcription: ${n.status}`);return await n.json()}}const d5=new ch,h5=({gazeAnalysisEnabled:e,isModelLoaded:t,stats:n,statusMessage:i,loadingProgress:a})=>u.jsx("div",{className:"iw-w-full",children:u.jsxs("div",{className:"iw-border-strock iw-rounded-md iw-border iw-bg-gray-50 iw-p-4",children:[u.jsxs("h3",{className:"iw-m-0 iw-mb-2.5",children:["Status: ",i]}),a>0&&a<100&&u.jsxs("div",{className:"iw-mb-2.5",children:[u.jsx("div",{className:"iw-h-2 iw-w-full iw-rounded iw-bg-gray-300",children:u.jsx("div",{className:"iw-h-full iw-rounded iw-bg-blue-600 iw-transition-all iw-duration-300 iw-ease-out",style:{width:`${a}%`}})}),u.jsxs("small",{className:"iw-text-gray-600",children:["Loading model... ",a.toFixed(1),"%"]})]}),u.jsxs("div",{className:"iw-grid iw-grid-cols-2 iw-gap-2.5 iw-text-sm",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"FPS:"})," ",u.jsx("span",{className:n.fps<15?"iw-text-red-600":n.fps<25?"iw-text-orange-500":"iw-text-green-600",children:n.fps})]}),u.jsxs("div",{children:[u.jsx("strong",{children:"Model:"})," ",t?"✓ Loaded":"✗ Loading"]}),e&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{children:[u.jsx("strong",{children:"Engagement:"})," ",n.engagement.toFixed(1),"%"]}),u.jsxs("div",{children:[u.jsx("strong",{children:"Looking:"})," ",u.jsx("span",{className:n.isLookingAway?"iw-text-red-600":"iw-text-green-600",children:n.isLookingAway?"Away":"At Screen"})]})]})]}),n.referenceFaceNotDetected&&u.jsxs("div",{className:"iw-text-gray-dark iw-mt-2.5 iw-w-full iw-rounded-md iw-bg-[#ffeb3b] iw-p-2.5 iw-text-sm",children:[u.jsx("strong",{children:"Reference Face Not Detected"}),u.jsx("br",{}),"The previously set reference face is no longer in view."]}),n.multipleFacesDetected&&u.jsxs("div",{className:"iw-mt-2.5 iw-rounded iw-bg-red-50 iw-p-2.5 iw-text-sm iw-text-red-700",children:[u.jsx("strong",{children:"Multiple Faces Detected"}),u.jsx("br",{}),"Please ensure only one person is in the frame."]}),!e&&u.jsxs("div",{className:"iw-mt-2.5 iw-rounded iw-bg-blue-50 iw-p-2.5 iw-text-sm iw-text-blue-700",children:[u.jsx("strong",{children:"Gaze Analysis Disabled"}),u.jsx("br",{}),"Enable to track engagement and attention levels."]})]})}),m5=({showControls:e,isBubbleOpen:t,setIsBubbleOpen:n,setReference:i,clearCache:a,isModelLoaded:l,gazeAnalysisEnabled:s,referenceSet:r,showLandmarks:o,setShowLandmarks:c,showEngagementBar:d,setShowEngagementBar:h,handleToggleGazeAnalysis:f,stats:w,statusMessage:v,loadingProgress:x})=>e?u.jsxs(u.Fragment,{children:[u.jsx("button",{onClick:()=>n(!t),className:"iw-absolute iw-right-4 iw-bottom-4 iw-z-10 iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-full iw-text-white",children:u.jsx(Wg,{className:"iw-size-4.5"})}),t&&u.jsxs("div",{className:"iw-absolute iw-right-4 iw-bottom-16 iw-z-10 iw-max-h-96 iw-w-80 iw-overflow-y-auto iw-rounded-md iw-bg-gray-50 iw-p-4 iw-shadow-lg",children:[u.jsx("h4",{className:"m-0 mb-2.5",children:"Controls"}),u.jsx("button",{onClick:i,disabled:!l||!s,className:`iw-mb-2.5 iw-block iw-w-full iw-rounded border-none iw-px-4 iw-py-2 iw-text-sm iw-text-white ${!l||!s?"iw-cursor-not-allowed iw-bg-gray-400":"iw-cursor-pointer iw-bg-blue-600 hover:iw-bg-blue-700"}`,children:r?"Reference Set ✓":"Set Reference"}),u.jsx("button",{onClick:a,className:"iw-mb-4 iw-block iw-w-full iw-cursor-pointer iw-rounded iw-border-none iw-bg-red-600 iw-px-4 iw-py-2 iw-text-sm iw-text-white hover:iw-bg-red-700",children:"Clear Model Cache"}),u.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-2.5",children:[u.jsxs("label",{className:"iw-flex iw-cursor-pointer iw-items-center iw-gap-2",children:[u.jsx("input",{type:"checkbox",checked:s,onChange:_=>f(_.target.checked)}),u.jsx("strong",{children:"Enable Gaze Analysis"})]}),u.jsxs("label",{className:`iw-flex iw-cursor-pointer iw-items-center iw-gap-2 ${s?"iw-opacity-100":"iw-opacity-60"}`,children:[u.jsx("input",{type:"checkbox",checked:o,onChange:_=>c(_.target.checked),disabled:!s}),"Show Landmarks"]}),u.jsxs("label",{className:`iw-flex iw-cursor-pointer iw-items-center iw-gap-2 ${s?"iw-opacity-100":"iw-opacity-60"}`,children:[u.jsx("input",{type:"checkbox",checked:d,onChange:_=>h(_.target.checked),disabled:!s}),"Show Engagement Bar"]})]}),r&&u.jsx(h5,{gazeAnalysisEnabled:s,isModelLoaded:l,loadingProgress:x,stats:w,statusMessage:v})]})]}):null;var Ma=typeof self<"u"?self:{};function Ki(){throw Error("Invalid UTF8")}function fh(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}let br,Zu;const w5=typeof TextDecoder<"u";let g5;const p5=typeof TextEncoder<"u";function dh(e){if(p5)e=(g5||(g5=new TextEncoder)).encode(e);else{let n=0;const i=new Uint8Array(3*e.length);for(let a=0;a<e.length;a++){var t=e.charCodeAt(a);if(t<128)i[n++]=t;else{if(t<2048)i[n++]=t>>6|192;else{if(t>=55296&&t<=57343){if(t<=56319&&a<e.length){const l=e.charCodeAt(++a);if(l>=56320&&l<=57343){t=1024*(t-55296)+l-56320+65536,i[n++]=t>>18|240,i[n++]=t>>12&63|128,i[n++]=t>>6&63|128,i[n++]=63&t|128;continue}a--}t=65533}i[n++]=t>>12|224,i[n++]=t>>6&63|128}i[n++]=63&t|128}}e=n===i.length?i:i.subarray(0,n)}return e}var Ku,xr;e:{for(var hh=["CLOSURE_FLAGS"],Iu=Ma,Wu=0;Wu<hh.length;Wu++)if((Iu=Iu[hh[Wu]])==null){xr=null;break e}xr=Iu}var Zl,mh=xr&&xr[610401301];Ku=mh!=null&&mh;const wh=Ma.navigator;function Ju(e){return!!Ku&&!!Zl&&Zl.brands.some(({brand:t})=>t&&t.indexOf(e)!=-1)}function Gt(e){var t;return(t=Ma.navigator)&&(t=t.userAgent)||(t=""),t.indexOf(e)!=-1}function ui(){return!!Ku&&!!Zl&&Zl.brands.length>0}function Pu(){return ui()?Ju("Chromium"):(Gt("Chrome")||Gt("CriOS"))&&!(!ui()&&Gt("Edge"))||Gt("Silk")}function Er(e){return Er[" "](e),e}Zl=wh&&wh.userAgentData||null,Er[" "]=function(){};var y5=!ui()&&(Gt("Trident")||Gt("MSIE"));!Gt("Android")||Pu(),Pu(),Gt("Safari")&&(Pu()||!ui()&&Gt("Coast")||!ui()&&Gt("Opera")||!ui()&&Gt("Edge")||(ui()?Ju("Microsoft Edge"):Gt("Edg/"))||ui()&&Ju("Opera"));var gh={},Kl=null;function v5(e){const t=e.length;let n=3*t/4;n%3?n=Math.floor(n):"=.".indexOf(e[t-1])!=-1&&(n="=.".indexOf(e[t-2])!=-1?n-2:n-1);const i=new Uint8Array(n);let a=0;return function(l,s){function r(c){for(;o<l.length;){const d=l.charAt(o++),h=Kl[d];if(h!=null)return h;if(!/^[\s\xa0]*$/.test(d))throw Error("Unknown base64 encoding at char: "+d)}return c}ph();let o=0;for(;;){const c=r(-1),d=r(0),h=r(64),f=r(64);if(f===64&&c===-1)break;s(c<<2|d>>4),h!=64&&(s(d<<4&240|h>>2),f!=64&&s(h<<6&192|f))}}(e,function(l){i[a++]=l}),a!==n?i.subarray(0,a):i}function ph(){if(!Kl){Kl={};var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const i=e.concat(t[n].split(""));gh[n]=i;for(let a=0;a<i.length;a++){const l=i[a];Kl[l]===void 0&&(Kl[l]=a)}}}}var yh=typeof Uint8Array<"u",vh=!y5&&typeof btoa=="function";function bh(e){if(!vh){var t;t===void 0&&(t=0),ph(),t=gh[t];var n=Array(Math.floor(e.length/3)),i=t[64]||"";let o=0,c=0;for(;o<e.length-2;o+=3){var a=e[o],l=e[o+1],s=e[o+2],r=t[a>>2];a=t[(3&a)<<4|l>>4],l=t[(15&l)<<2|s>>6],s=t[63&s],n[c++]=r+a+l+s}switch(r=0,s=i,e.length-o){case 2:s=t[(15&(r=e[o+1]))<<2]||i;case 1:e=e[o],n[c]=t[e>>2]+t[(3&e)<<4|r>>4]+s+i}return n.join("")}for(t="",n=0,i=e.length-10240;n<i;)t+=String.fromCharCode.apply(null,e.subarray(n,n+=10240));return t+=String.fromCharCode.apply(null,n?e.subarray(n):e),btoa(t)}const xh=/[-_.]/g,b5={"-":"+",_:"/",".":"="};function x5(e){return b5[e]||""}function Eh(e){if(!vh)return v5(e);xh.test(e)&&(e=e.replace(xh,x5)),e=atob(e);const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function Ii(e){return yh&&e!=null&&e instanceof Uint8Array}var Ca={};function Wi(){return E5||(E5=new On(null,Ca))}function $u(e){Sh(Ca);var t=e.g;return(t=t==null||Ii(t)?t:typeof t=="string"?Eh(t):null)==null?t:e.g=t}var On=class{h(){return new Uint8Array($u(this)||0)}constructor(e,t){if(Sh(t),this.g=e,e!=null&&e.length===0)throw Error("ByteString should be constructed with non-empty values")}};let E5,S5;function Sh(e){if(e!==Ca)throw Error("illegal external caller")}function _h(e,t){e.__closure__error__context__984382||(e.__closure__error__context__984382={}),e.__closure__error__context__984382.severity=t}function ec(e){return _h(e=Error(e),"warning"),e}function tc(e){if(e!=null){var t=S5??(S5={}),n=t[e]||0;n>=5||(t[e]=n+1,_h(e=Error(),"incident"),function(i){Ma.setTimeout(()=>{throw i},0)}(e))}}var Sr=typeof Symbol=="function"&&typeof Symbol()=="symbol";function Da(e,t,n=!1){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?n&&Symbol.for&&e?Symbol.for(e):e!=null?Symbol(e):Symbol():t}var _5=Da("jas",void 0,!0),Th=Da(void 0,"0di"),Il=Da(void 0,"1oa"),ka=Da(void 0,Symbol()),T5=Da(void 0,"0actk"),Ah=Da(void 0,"8utk");const L=Sr?_5:"Ea",Nh={Ea:{value:0,configurable:!0,writable:!0,enumerable:!1}},jh=Object.defineProperties;function _r(e,t){Sr||L in e||jh(e,Nh),e[L]|=t}function De(e,t){Sr||L in e||jh(e,Nh),e[L]=t}function Oa(e){return _r(e,34),e}function A5(e,t){De(t,-15615&(0|e))}function nc(e,t){De(t,-15581&(34|e))}function Tr(){return typeof BigInt=="function"}function ct(e){return Array.prototype.slice.call(e)}var ic,Wl={};function Ar(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.constructor===Object}function ac(e,t){if(e!=null){if(typeof e=="string")e=e?new On(e,Ca):Wi();else if(e.constructor!==On)if(Ii(e))e=e.length?new On(new Uint8Array(e),Ca):Wi();else{if(!t)throw Error();e=void 0}}return e}const Mh=[];function ci(e){if(2&e)throw Error()}De(Mh,55),ic=Object.freeze(Mh);class Ch{constructor(t,n,i){this.g=t,this.h=n,this.l=i}next(){const t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}function lc(e){return ka?e[ka]:void 0}var N5=Object.freeze({});function Nr(e){return e.Na=!0,e}var j5=Nr(e=>typeof e=="number"),Dh=Nr(e=>typeof e=="string"),M5=Nr(e=>typeof e=="boolean"),jr=typeof Ma.BigInt=="function"&&typeof Ma.BigInt(0)=="bigint";function fi(e){var t=e;if(Dh(t)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t))throw Error(String(t))}else if(j5(t)&&!Number.isSafeInteger(t))throw Error(String(t));return jr?BigInt(e):e=M5(e)?e?"1":"0":Dh(e)?e.trim()||"0":String(e)}var sc=Nr(e=>jr?e>=D5&&e<=O5:e[0]==="-"?kh(e,C5):kh(e,k5));const C5=Number.MIN_SAFE_INTEGER.toString(),D5=jr?BigInt(Number.MIN_SAFE_INTEGER):void 0,k5=Number.MAX_SAFE_INTEGER.toString(),O5=jr?BigInt(Number.MAX_SAFE_INTEGER):void 0;function kh(e,t){if(e.length>t.length)return!1;if(e.length<t.length||e===t)return!0;for(let n=0;n<e.length;n++){const i=e[n],a=t[n];if(i>a)return!1;if(i<a)return!0}}const L5=typeof Uint8Array.prototype.slice=="function";let Oh,ne=0,xe=0;function Lh(e){const t=e>>>0;ne=t,xe=(e-t)/4294967296>>>0}function Ji(e){if(e<0){Lh(-e);const[t,n]=cc(ne,xe);ne=t>>>0,xe=n>>>0}else Lh(e)}function rc(e){const t=Oh||(Oh=new DataView(new ArrayBuffer(8)));t.setFloat32(0,+e,!0),xe=0,ne=t.getUint32(0,!0)}function oc(e,t){const n=4294967296*t+(e>>>0);return Number.isSafeInteger(n)?n:Jl(e,t)}function uc(e,t){const n=2147483648&t;return n&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),typeof(e=oc(e,t))=="number"?n?-e:e:n?"-"+e:e}function Jl(e,t){if(e>>>=0,(t>>>=0)<=2097151)var n=""+(4294967296*t+e);else Tr()?n=""+(BigInt(t)<<BigInt(32)|BigInt(e)):(e=(16777215&e)+6777216*(n=16777215&(e>>>24|t<<8))+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,e>=1e7&&(n+=e/1e7>>>0,e%=1e7),n>=1e7&&(t+=n/1e7>>>0,n%=1e7),n=t+Uh(n)+Uh(e));return n}function Uh(e){return e=String(e),"0000000".slice(e.length)+e}function zh(){var e=ne,t=xe;if(2147483648&t)if(Tr())e=""+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{const[n,i]=cc(e,t);e="-"+Jl(n,i)}else e=Jl(e,t);return e}function Mr(e){if(e.length<16)Ji(Number(e));else if(Tr())e=BigInt(e),ne=Number(e&BigInt(4294967295))>>>0,xe=Number(e>>BigInt(32)&BigInt(4294967295));else{const t=+(e[0]==="-");xe=ne=0;const n=e.length;for(let i=t,a=(n-t)%6+t;a<=n;i=a,a+=6){const l=Number(e.slice(i,a));xe*=1e6,ne=1e6*ne+l,ne>=4294967296&&(xe+=Math.trunc(ne/4294967296),xe>>>=0,ne>>>=0)}if(t){const[i,a]=cc(ne,xe);ne=i,xe=a}}}function cc(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}const Pl=typeof BigInt=="function"?BigInt.asIntN:void 0,U5=typeof BigInt=="function"?BigInt.asUintN:void 0,di=Number.isSafeInteger,Cr=Number.isFinite,La=Math.trunc,z5=fi(0);function hi(e){return e==null||typeof e=="number"?e:e==="NaN"||e==="Infinity"||e==="-Infinity"?Number(e):void 0}function Rh(e){return e==null||typeof e=="boolean"?e:typeof e=="number"?!!e:void 0}const R5=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function $l(e){switch(typeof e){case"bigint":return!0;case"number":return Cr(e);case"string":return R5.test(e);default:return!1}}function Ua(e){if(e==null)return e;if(typeof e=="string"&&e)e=+e;else if(typeof e!="number")return;return Cr(e)?0|e:void 0}function Bh(e){if(e==null)return e;if(typeof e=="string"&&e)e=+e;else if(typeof e!="number")return;return Cr(e)?e>>>0:void 0}function Gh(e){if(e[0]==="-")return!1;const t=e.length;return t<20||t===20&&Number(e.substring(0,6))<184467}function Hh(e){const t=e.length;return e[0]==="-"?t<20||t===20&&Number(e.substring(0,7))>-922337:t<19||t===19&&Number(e.substring(0,6))<922337}function Vh(e){return Hh(e)?e:(Mr(e),zh())}function fc(e){return e=La(e),di(e)||(Ji(e),e=uc(ne,xe)),e}function Fh(e){var t=La(Number(e));return di(t)?String(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),Vh(e))}function qh(e){var t=La(Number(e));return di(t)?fi(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),Tr()?fi(Pl(64,BigInt(e))):fi(Vh(e)))}function Yh(e){if(di(e))e=fi(fc(e));else{if(e=La(e),di(e))e=String(e);else{const t=String(e);Hh(t)?e=t:(Ji(e),e=zh())}e=fi(e)}return e}function dc(e){return e==null?e:typeof e=="bigint"?(sc(e)?e=Number(e):(e=Pl(64,e),e=sc(e)?Number(e):String(e)),e):$l(e)?typeof e=="number"?fc(e):Fh(e):void 0}function B5(e){if(e==null)return e;var t=typeof e;if(t==="bigint")return String(U5(64,e));if($l(e)){if(t==="string")return t=La(Number(e)),di(t)&&t>=0?e=String(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),Gh(e)||(Mr(e),e=Jl(ne,xe))),e;if(t==="number")return(e=La(e))>=0&&di(e)?e:function(n){if(n<0){Ji(n);var i=Jl(ne,xe);return n=Number(i),di(n)?n:i}return Gh(i=String(n))?i:(Ji(n),oc(ne,xe))}(e)}}function Xh(e){if(typeof e!="string")throw Error();return e}function za(e){if(e!=null&&typeof e!="string")throw Error();return e}function Ra(e){return e==null||typeof e=="string"?e:void 0}function hc(e,t,n,i){if(e!=null&&typeof e=="object"&&e.W===Wl)return e;if(!Array.isArray(e))return n?2&i?((e=t[Th])||(Oa((e=new t).u),e=t[Th]=e),t=e):t=new t:t=void 0,t;let a=n=0|e[L];return a===0&&(a|=32&i),a|=2&i,a!==n&&De(e,a),new t(e)}function G5(e,t,n){if(t)e:{if(!$l(t=e))throw ec("int64");switch(typeof t){case"string":t=qh(t);break e;case"bigint":t=fi(Pl(64,t));break e;default:t=Yh(t)}}else e=typeof(t=e),t=t==null?t:e==="bigint"?fi(Pl(64,t)):$l(t)?e==="string"?qh(t):Yh(t):void 0;return(e=t)==null?n?z5:void 0:e}function H5(e){return e}const V5={};let F5=function(){try{return Er(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class mc{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,n){return this.g.set(t,n),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,n){return this.g.forEach(t,n)}[Symbol.iterator](){return this.entries()}}const q5=F5?(Object.setPrototypeOf(mc.prototype,Map.prototype),Object.defineProperties(mc.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),mc):class extends Map{constructor(){super()}};function Qh(e){return e}function wc(e){if(2&e.M)throw Error("Cannot mutate an immutable Map")}var yn=class extends q5{constructor(e,t,n=Qh,i=Qh){super();let a=0|e[L];a|=64,De(e,a),this.M=a,this.I=t,this.S=n,this.X=this.I?Y5:i;for(let l=0;l<e.length;l++){const s=e[l],r=n(s[0],!1,!0);let o=s[1];t?o===void 0&&(o=null):o=i(s[1],!1,!0,void 0,void 0,a),super.set(r,o)}}La(){var e=I5;if(this.size!==0)return Array.from(super.entries(),t=>(t[0]=e(t[0]),t[1]=e(t[1]),t))}da(e=X5){const t=[],n=super.entries();for(var i;!(i=n.next()).done;)(i=i.value)[0]=e(i[0]),i[1]=e(i[1]),t.push(i);return t}clear(){wc(this),super.clear()}delete(e){return wc(this),super.delete(this.S(e,!0,!1))}entries(){if(this.I){var e=super.keys();e=new Ch(e,Q5,this)}else e=super.entries();return e}values(){if(this.I){var e=super.keys();e=new Ch(e,yn.prototype.get,this)}else e=super.values();return e}forEach(e,t){this.I?super.forEach((n,i,a)=>{e.call(t,a.get(i),i,a)}):super.forEach(e,t)}set(e,t){return wc(this),(e=this.S(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.X(t,!0,!0,this.I,!1,this.M))}Ja(e){const t=this.S(e[0],!1,!0);e=e[1],e=this.I?e===void 0?null:e:this.X(e,!1,!0,void 0,!1,this.M),super.set(t,e)}has(e){return super.has(this.S(e,!1,!1))}get(e){e=this.S(e,!1,!1);const t=super.get(e);if(t!==void 0){var n=this.I;return n?((n=this.X(t,!1,!0,n,this.pa,this.M))!==t&&super.set(e,n),n):t}}[Symbol.iterator](){return this.entries()}};function Y5(e,t,n,i,a,l){return e=hc(e,i,n,l),a&&(e=Or(e)),e}function X5(e){return e}function Q5(e){return[e,this.get(e)]}let Z5,Zh,Kh,K5;function Ih(){return Z5||(Z5=new yn(Oa([]),void 0,void 0,void 0,V5))}function gc(e,t,n,i,a){if(e!=null){if(Array.isArray(e)){const l=0|e[L];return e.length===0&&1&l?void 0:a&&2&l?e:Dr(e,t,n,i!==void 0,a)}return t(e,i)}}function Dr(e,t,n,i,a){const l=i||n?0|e[L]:0,s=i?!!(32&l):void 0;let r=0;const o=(i=ct(e)).length;for(let v=0;v<o;v++){var c=i[v];if(v===o-1&&Ar(c)){var d=t,h=n,f=s,w=a;let x;for(let _ in c){const m=gc(c[_],d,h,f,w);m!=null&&((x??(x={}))[_]=m)}c=x}else c=gc(i[v],t,n,s,a);i[v]=c,c!=null&&(r=v+1)}return r<o&&(i.length=r),n&&((e=lc(e))&&(i[ka]=ct(e)),n(l,i)),i}function I5(e){return gc(e,pc,void 0,void 0,!1)}function pc(e){switch(typeof e){case"number":return Number.isFinite(e)?e:""+e;case"bigint":return sc(e)?Number(e):""+e;case"boolean":return e?1:0;case"object":if(Ii(e))return Ii(e)&&tc(Ah),bh(e);if(e.W===Wl)return Wh(e);if(e instanceof On){const t=e.g;return t==null?"":typeof t=="string"?t:e.g=bh(t)}return e instanceof yn?e.La():void 0}return e}function Wh(e){var t=e.u;e=Dr(t,pc,void 0,void 0,!1);var n=0|t[L];if((t=e.length)&&!(512&n)){var i=e[t-1],a=!1;Ar(i)?(t--,a=!0):i=void 0;var l=t-(n=512&n?0:-1),s=(Zh??H5)(l,n,e,i);if(i&&(e[t]=void 0),l<s&&i){for(var r in l=!0,i){const o=+r;o<=s?(e[a=o+n]=i[r],t=Math.max(a+1,t),a=!1,delete i[r]):l=!1}l&&(i=void 0)}for(l=t-1;t>0;l=t-1)if((r=e[l])==null)t--,a=!0;else{if(!((l-=n)>=s))break;(i??(i={}))[l]=r,t--,a=!0}a&&(e.length=t),i&&e.push(i)}return e}function mi(e,t,n){return e=Jh(e,t[0],t[1],n?1:2),t!==Kh&&n&&_r(e,8192),e}function Jh(e,t,n,i){if(e==null){var a=96;n?(e=[n],a|=512):e=[],t&&(a=-16760833&a|(1023&t)<<14)}else{if(!Array.isArray(e))throw Error("narr");if(8192&(a=0|e[L])||!(64&a)||2&a||tc(T5),1024&a)throw Error("farr");if(64&a)return e;if(i===1||i===2||(a|=64),n&&(a|=512,n!==e[0]))throw Error("mid");e:{var l=(n=e).length;if(l){var s=l-1;if(Ar(i=n[s])){if((s-=t=512&(a|=256)?0:-1)>=1024)throw Error("pvtlmt");for(var r in i)(l=+r)<s&&(n[l+t]=i[r],delete i[r]);a=-16760833&a|(1023&s)<<14;break e}}if(t){if((r=Math.max(t,l-(512&a?0:-1)))>1024)throw Error("spvt");a=-16760833&a|(1023&r)<<14}}}return De(e,a),e}function yc(e,t,n=nc){if(e!=null){if(yh&&e instanceof Uint8Array)return t?e:new Uint8Array(e);if(Array.isArray(e)){var i=0|e[L];return 2&i?e:(t&&(t=i===0||!!(32&i)&&!(64&i||!(16&i))),t?(De(e,34|i),4&i&&Object.freeze(e),e):Dr(e,yc,4&i?nc:n,!0,!0))}return e.W===Wl?e=2&(i=0|(n=e.u)[L])?e:new e.constructor(kr(n,i,!0)):e instanceof yn&&!(2&e.M)&&(n=Oa(e.da(yc)),e=new yn(n,e.I,e.S,e.X)),e}}function kr(e,t,n){const i=n||2&t?nc:A5,a=!!(32&t);return e=function(l,s,r){const o=ct(l);var c=o.length;const d=256&s?o[c-1]:void 0;for(c+=d?-1:0,s=512&s?1:0;s<c;s++)o[s]=r(o[s]);if(d){s=o[s]={};for(const h in d)s[h]=r(d[h])}return(l=lc(l))&&(o[ka]=ct(l)),o}(e,t,l=>yc(l,a,i)),_r(e,32|(n?2:0)),e}function Or(e){const t=e.u,n=0|t[L];return 2&n?new e.constructor(kr(t,n,!1)):e}function Ba(e,t){return Ln(e=e.u,0|e[L],t)}function Ln(e,t,n){if(n===-1)return null;const i=n+(512&t?0:-1),a=e.length-1;return i>=a&&256&t?e[a][n]:i<=a?e[i]:void 0}function le(e,t,n){const i=e.u;let a=0|i[L];return ci(a),pe(i,a,t,n),e}function pe(e,t,n,i){const a=512&t?0:-1,l=n+a;var s=e.length-1;return l>=s&&256&t?(e[s][n]=i,t):l<=s?(e[l]=i,t):(i!==void 0&&(n>=(s=t>>14&1023||536870912)?i!=null&&(e[s+a]={[n]:i},De(e,t|=256)):e[l]=i),t)}function Lr(e,t){let n=0|(e=e.u)[L];const i=Ln(e,n,t),a=hi(i);return a!=null&&a!==i&&pe(e,n,t,a),a}function Ph(e){let t=0|(e=e.u)[L];const n=Ln(e,t,1),i=ac(n,!0);return i!=null&&i!==n&&pe(e,t,1,i),i}function Pi(){return N5===void 0?2:4}function $i(e,t,n,i,a){const l=e.u,s=2&(e=0|l[L])?1:i;a=!!a;let r=0|(i=vc(l,e,t))[L];if(!(4&r)){4&r&&(i=ct(i),r=Rn(r,e),e=pe(l,e,t,i));let o=0,c=0;for(;o<i.length;o++){const d=n(i[o]);d!=null&&(i[c++]=d)}c<o&&(i.length=c),r=bc(r,e),n=-2049&(20|r),r=n&=-4097,De(i,r),2&r&&Object.freeze(i)}return s===1||s===4&&32&r?Un(r)||(a=r,r|=2,r!==a&&De(i,r),Object.freeze(i)):(s===2&&Un(r)&&(i=ct(i),r=Rn(r,e),r=wi(r,e,a),De(i,r),e=pe(l,e,t,i)),Un(r)||(t=r,r=wi(r,e,a),r!==t&&De(i,r))),i}function vc(e,t,n){return e=Ln(e,t,n),Array.isArray(e)?e:ic}function bc(e,t){return e===0&&(e=Rn(e,t)),1|e}function Un(e){return!!(2&e)&&!!(4&e)||!!(1024&e)}function $h(e){e=ct(e);for(let t=0;t<e.length;t++){const n=e[t]=ct(e[t]);Array.isArray(n[1])&&(n[1]=Oa(n[1]))}return e}function xc(e,t,n,i){let a=0|(e=e.u)[L];ci(a),pe(e,a,t,(i==="0"?Number(n)===0:n===i)?void 0:n)}function Ga(e,t,n,i){ci(t);let a=vc(e,t,n);const l=a!==ic;if(64&t||!(8192&t)||!l){const s=l?0|a[L]:0;let r=s;(!l||2&r||Un(r)||4&r&&!(32&r))&&(a=ct(a),r=Rn(r,t),t=pe(e,t,n,a)),r=-13&bc(r,t),r=wi(i?-17&r:16|r,t,!0),r!==s&&De(a,r)}return a}function Ec(e,t){var n=t0;return _c(Sc(e=e.u),e,0|e[L],n)===t?t:-1}function Sc(e){if(Sr)return e[Il]??(e[Il]=new Map);if(Il in e)return e[Il];const t=new Map;return Object.defineProperty(e,Il,{value:t}),t}function e1(e,t,n,i){const a=Sc(e),l=_c(a,e,t,n);return l!==i&&(l&&(t=pe(e,t,l)),a.set(n,i)),t}function _c(e,t,n,i){let a=e.get(i);if(a!=null)return a;a=0;for(let l=0;l<i.length;l++){const s=i[l];Ln(t,n,s)!=null&&(a!==0&&(n=pe(t,n,a)),a=s)}return e.set(i,a),a}function Tc(e,t,n){let i=0|e[L];const a=Ln(e,i,n);let l;if(a!=null&&a.W===Wl)return(t=Or(a))!==a&&pe(e,i,n,t),t.u;if(Array.isArray(a)){const s=0|a[L];l=2&s?mi(kr(a,s,!1),t,!0):64&s?a:mi(l,t,!0)}else l=mi(void 0,t,!0);return l!==a&&pe(e,i,n,l),l}function t1(e,t,n){let i=0|(e=e.u)[L];const a=Ln(e,i,n);return(t=hc(a,t,!1,i))!==a&&t!=null&&pe(e,i,n,t),t}function Z(e,t,n){if((t=t1(e,t,n))==null)return t;let i=0|(e=e.u)[L];if(!(2&i)){const a=Or(t);a!==t&&pe(e,i,n,t=a)}return t}function n1(e,t,n,i,a,l,s){e=e.u;var r=!!(2&t);const o=r?1:a;l=!!l,s&&(s=!r);var c=0|(a=vc(e,t,i))[L];if(!(r=!!(4&c))){var d=a,h=t;const f=!!(2&(c=bc(c,t)));f&&(h|=2);let w=!f,v=!0,x=0,_=0;for(;x<d.length;x++){const m=hc(d[x],n,!1,h);if(m instanceof n){if(!f){const g=!!(2&(0|m.u[L]));w&&(w=!g),v&&(v=g)}d[_++]=m}}_<x&&(d.length=_),c|=4,c=v?16|c:-17&c,De(d,c=w?8|c:-9&c),f&&Object.freeze(d)}if(s&&!(8&c||!a.length&&(o===1||o===4&&32&c))){for(Un(c)&&(a=ct(a),c=Rn(c,t),t=pe(e,t,i,a)),n=a,s=c,d=0;d<n.length;d++)(c=n[d])!==(h=Or(c))&&(n[d]=h);s|=8,De(n,s=n.length?-17&s:16|s),c=s}return o===1||o===4&&32&c?Un(c)||(t=c,(c|=!a.length||16&c&&(!r||32&c)?2:1024)!==t&&De(a,c),Object.freeze(a)):(o===2&&Un(c)&&(De(a=ct(a),c=wi(c=Rn(c,t),t,l)),t=pe(e,t,i,a)),Un(c)||(i=c,(c=wi(c,t,l))!==i&&De(a,c))),a}function zn(e,t,n){const i=0|e.u[L];return n1(e,i,t,n,Pi(),!1,!(2&i))}function z(e,t,n,i){return i==null&&(i=void 0),le(e,n,i)}function es(e,t,n,i){i==null&&(i=void 0);e:{let a=0|(e=e.u)[L];if(ci(a),i==null){const l=Sc(e);if(_c(l,e,a,n)!==t)break e;l.set(n,0)}else a=e1(e,a,n,t);pe(e,a,t,i)}}function Rn(e,t){return-1025&(e=32|(2&t?2|e:-3&e))}function wi(e,t,n){return 32&t&&n||(e&=-33),e}function Ur(e,t,n){ci(0|e.u[L]),$i(e,t,Ra,2,!0).push(Xh(n))}function zr(e,t,n,i){const a=0|e.u[L];ci(a),e=n1(e,a,n,t,2,!0),i=i??new n,e.push(i),e[L]=2&(0|i.u[L])?-9&e[L]:-17&e[L]}function Ht(e,t){return Ua(Ba(e,t))}function Vt(e,t){return Ra(Ba(e,t))}function Ne(e,t){return Lr(e,t)??0}function ts(e,t,n){if(n!=null&&typeof n!="boolean")throw e=typeof n,Error(`Expected boolean but got ${e!="object"?e:n?Array.isArray(n)?"array":e:"null"}: ${n}`);le(e,t,n)}function vn(e,t,n){if(n!=null){if(typeof n!="number"||!Cr(n))throw ec("int32");n|=0}le(e,t,n)}function O(e,t,n){if(n!=null&&typeof n!="number")throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);le(e,t,n)}function Rr(e,t,n){{const s=e.u;let r=0|s[L];if(ci(r),n==null)pe(s,r,t);else{var i=e=0|n[L],a=Un(e),l=a||Object.isFrozen(n);for(a||(e=0),l||(n=ct(n),i=0,e=wi(e=Rn(e,r),r,!0),l=!1),e|=21,a=0;a<n.length;a++){const o=n[a],c=Xh(o);Object.is(o,c)||(l&&(n=ct(n),i=0,e=wi(e=Rn(e,r),r,!0),l=!1),n[a]=c)}e!==i&&(l&&(n=ct(n),e=wi(e=Rn(e,r),r,!0)),De(n,e)),pe(s,r,t,n)}}}function i1(e,t){return Error(`Invalid wire type: ${e} (at position ${t})`)}function Ac(){return Error("Failed to read varint, encoding is invalid.")}function a1(e,t){return Error(`Tried to read past the end of the data ${t} > ${e}`)}function Nc(e){if(typeof e=="string")return{buffer:Eh(e),O:!1};if(Array.isArray(e))return{buffer:new Uint8Array(e),O:!1};if(e.constructor===Uint8Array)return{buffer:e,O:!1};if(e.constructor===ArrayBuffer)return{buffer:new Uint8Array(e),O:!1};if(e.constructor===On)return{buffer:$u(e)||new Uint8Array(0),O:!0};if(e instanceof Uint8Array)return{buffer:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),O:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function jc(e,t){let n,i=0,a=0,l=0;const s=e.h;let r=e.g;do n=s[r++],i|=(127&n)<<l,l+=7;while(l<32&&128&n);for(l>32&&(a|=(127&n)>>4),l=3;l<32&&128&n;l+=7)n=s[r++],a|=(127&n)<<l;if(ea(e,r),n<128)return t(i>>>0,a>>>0);throw Ac()}function Mc(e){let t=0,n=e.g;const i=n+10,a=e.h;for(;n<i;){const l=a[n++];if(t|=l,(128&l)==0)return ea(e,n),!!(127&t)}throw Ac()}function gi(e){const t=e.h;let n=e.g,i=t[n++],a=127&i;if(128&i&&(i=t[n++],a|=(127&i)<<7,128&i&&(i=t[n++],a|=(127&i)<<14,128&i&&(i=t[n++],a|=(127&i)<<21,128&i&&(i=t[n++],a|=i<<28,128&i&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++])))))throw Ac();return ea(e,n),a}function Bn(e){return gi(e)>>>0}function Cc(e){var t=e.h;const n=e.g,i=t[n],a=t[n+1],l=t[n+2];return t=t[n+3],ea(e,e.g+4),(i<<0|a<<8|l<<16|t<<24)>>>0}function Dc(e){var t=Cc(e);e=2*(t>>31)+1;const n=t>>>23&255;return t&=8388607,n==255?t?NaN:e*(1/0):n==0?1401298464324817e-60*e*t:e*Math.pow(2,n-150)*(t+8388608)}function W5(e){return gi(e)}function kc(e,t,{aa:n=!1}={}){e.aa=n,t&&(t=Nc(t),e.h=t.buffer,e.m=t.O,e.j=0,e.l=e.h.length,e.g=e.j)}function ea(e,t){if(e.g=t,t>e.l)throw a1(e.l,t)}function l1(e,t){if(t<0)throw Error(`Tried to read a negative byte length: ${t}`);const n=e.g,i=n+t;if(i>e.l)throw a1(t,e.l-n);return e.g=i,n}function s1(e,t){if(t==0)return Wi();var n=l1(e,t);return e.aa&&e.m?n=e.h.subarray(n,n+t):(e=e.h,n=n===(t=n+t)?new Uint8Array(0):L5?e.slice(n,t):new Uint8Array(e.subarray(n,t))),n.length==0?Wi():new On(n,Ca)}yn.prototype.toJSON=void 0;var r1=[];function o1(e){var t=e.g;if(t.g==t.l)return!1;e.l=e.g.g;var n=Bn(e.g);if(t=n>>>3,!((n&=7)>=0&&n<=5))throw i1(n,e.l);if(t<1)throw Error(`Invalid field number: ${t} (at position ${e.l})`);return e.m=t,e.h=n,!0}function Br(e){switch(e.h){case 0:e.h!=0?Br(e):Mc(e.g);break;case 1:ea(e=e.g,e.g+8);break;case 2:if(e.h!=2)Br(e);else{var t=Bn(e.g);ea(e=e.g,e.g+t)}break;case 5:ea(e=e.g,e.g+4);break;case 3:for(t=e.m;;){if(!o1(e))throw Error("Unmatched start-group tag: stream EOF");if(e.h==4){if(e.m!=t)throw Error("Unmatched end-group tag");break}Br(e)}break;default:throw i1(e.h,e.l)}}function ns(e,t,n){const i=e.g.l,a=Bn(e.g),l=e.g.g+a;let s=l-i;if(s<=0&&(e.g.l=l,n(t,e,void 0,void 0,void 0),s=l-e.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${a} bytes, instead read ${a-s} bytes, either the data ended unexpectedly or the message misreported its own length`);return e.g.g=l,e.g.l=i,t}function Oc(e){var t=Bn(e.g),n=l1(e=e.g,t);if(e=e.h,w5){var i,a=e;(i=Zu)||(i=Zu=new TextDecoder("utf-8",{fatal:!0})),t=n+t,a=n===0&&t===a.length?a:a.subarray(n,t);try{var l=i.decode(a)}catch(r){if(br===void 0){try{i.decode(new Uint8Array([128]))}catch{}try{i.decode(new Uint8Array([97])),br=!0}catch{br=!1}}throw!br&&(Zu=void 0),r}}else{t=(l=n)+t,n=[];let r,o=null;for(;l<t;){var s=e[l++];s<128?n.push(s):s<224?l>=t?Ki():(r=e[l++],s<194||(192&r)!=128?(l--,Ki()):n.push((31&s)<<6|63&r)):s<240?l>=t-1?Ki():(r=e[l++],(192&r)!=128||s===224&&r<160||s===237&&r>=160||(192&(i=e[l++]))!=128?(l--,Ki()):n.push((15&s)<<12|(63&r)<<6|63&i)):s<=244?l>=t-2?Ki():(r=e[l++],(192&r)!=128||r-144+(s<<28)>>30||(192&(i=e[l++]))!=128||(192&(a=e[l++]))!=128?(l--,Ki()):(s=(7&s)<<18|(63&r)<<12|(63&i)<<6|63&a,s-=65536,n.push(55296+(s>>10&1023),56320+(1023&s)))):Ki(),n.length>=8192&&(o=fh(o,n),n.length=0)}l=fh(o,n)}return l}function u1(e){const t=Bn(e.g);return s1(e.g,t)}function Gr(e,t,n){var i=Bn(e.g);for(i=e.g.g+i;e.g.g<i;)n.push(t(e.g))}var Hr=[];function on(e,t,n){t.g?t.m(e,t.g,t.h,n):t.m(e,t.h,n)}var k=class{constructor(e,t){this.u=Jh(e,t)}toJSON(){try{var e=Wh(this)}finally{Zh=void 0}return e}l(){var e=kp;return e.g?e.l(this,e.g,e.h):e.l(this,e.h,e.defaultValue)}clone(){const e=this.u;return new this.constructor(kr(e,0|e[L],!1))}O(){return!!(2&(0|this.u[L]))}};function c1(e){return e?/^\d+$/.test(e)?(Mr(e),new Lc(ne,xe)):null:J5||(J5=new Lc(0,0))}k.prototype.W=Wl,k.prototype.toString=function(){return this.u.toString()};var Lc=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let J5;function f1(e){return e?/^-?\d+$/.test(e)?(Mr(e),new Uc(ne,xe)):null:P5||(P5=new Uc(0,0))}var Uc=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let P5;function Ha(e,t,n){for(;n>0||t>127;)e.g.push(127&t|128),t=(t>>>7|n<<25)>>>0,n>>>=7;e.g.push(t)}function Va(e,t){for(;t>127;)e.g.push(127&t|128),t>>>=7;e.g.push(t)}function Vr(e,t){if(t>=0)Va(e,t);else{for(let n=0;n<9;n++)e.g.push(127&t|128),t>>=7;e.g.push(1)}}function is(e,t){e.g.push(t>>>0&255),e.g.push(t>>>8&255),e.g.push(t>>>16&255),e.g.push(t>>>24&255)}function Fa(e,t){t.length!==0&&(e.l.push(t),e.h+=t.length)}function xt(e,t,n){Va(e.g,8*t+n)}function zc(e,t){return xt(e,t,2),t=e.g.end(),Fa(e,t),t.push(e.h),t}function Rc(e,t){var n=t.pop();for(n=e.h+e.g.length()-n;n>127;)t.push(127&n|128),n>>>=7,e.h++;t.push(n),e.h++}function Fr(e,t,n){xt(e,t,2),Va(e.g,n.length),Fa(e,e.g.end()),Fa(e,n)}function qr(e,t,n,i){n!=null&&(t=zc(e,t),i(n,e),Rc(e,t))}function un(){const e=class{constructor(){throw Error()}};return Object.setPrototypeOf(e,e.prototype),e}var Bc=un(),d1=un(),Gc=un(),Hc=un(),h1=un(),m1=un(),Vc=un(),w1=un(),g1=un(),qa=class{constructor(e,t,n){this.g=e,this.h=t,e=Bc,this.l=!!e&&n===e||!1}};function Yr(e,t){return new qa(e,t,Bc)}function p1(e,t,n,i,a){qr(e,n,S1(t,i),a)}const $5=Yr(function(e,t,n,i,a){return e.h===2&&(ns(e,Tc(t,i,n),a),!0)},p1),ep=Yr(function(e,t,n,i,a){return e.h===2&&(ns(e,Tc(t,i,n),a),!0)},p1);var Xr=Symbol(),Fc=Symbol(),y1=Symbol(),v1=Symbol();let b1,x1;function ta(e,t,n,i){var a=i[e];if(a)return a;(a={}).Ma=i,a.T=function(h){switch(typeof h){case"boolean":return Kh||(Kh=[0,void 0,!0]);case"number":return h>0?void 0:h===0?K5||(K5=[0,void 0]):[-h,void 0];case"string":return[0,h];case"object":return h}}(i[0]);var l=i[1];let s=1;l&&l.constructor===Object&&(a.ga=l,typeof(l=i[++s])=="function"&&(a.la=!0,b1??(b1=l),x1??(x1=i[s+1]),l=i[s+=2]));const r={};for(;l&&Array.isArray(l)&&l.length&&typeof l[0]=="number"&&l[0]>0;){for(var o=0;o<l.length;o++)r[l[o]]=l;l=i[++s]}for(o=1;l!==void 0;){let h;typeof l=="number"&&(o+=l,l=i[++s]);var c=void 0;if(l instanceof qa?h=l:(h=$5,s--),h==null?void 0:h.l){l=i[++s],c=i;var d=s;typeof l=="function"&&(l=l(),c[d]=l),c=l}for(d=o+1,typeof(l=i[++s])=="number"&&l<0&&(d-=l,l=i[++s]);o<d;o++){const f=r[o];c?n(a,o,h,c,f):t(a,o,h,f)}}return i[e]=a}function E1(e){return Array.isArray(e)?e[0]instanceof qa?e:[ep,e]:[e,void 0]}function S1(e,t){return e instanceof k?e.u:Array.isArray(e)?mi(e,t,!1):void 0}function qc(e,t,n,i){const a=n.g;e[t]=i?(l,s,r)=>a(l,s,r,i):a}function Yc(e,t,n,i,a){const l=n.g;let s,r;e[t]=(o,c,d)=>l(o,c,d,r||(r=ta(Fc,qc,Yc,i).T),s||(s=Xc(i)),a)}function Xc(e){let t=e[y1];if(t!=null)return t;const n=ta(Fc,qc,Yc,e);return t=n.la?(i,a)=>b1(i,a,n):(i,a)=>{const l=0|i[L];for(;o1(a)&&a.h!=4;){var s=a.m,r=n[s];if(r==null){var o=n.ga;o&&(o=o[s])&&(o=tp(o))!=null&&(r=n[s]=o)}r!=null&&r(a,i,s)||(s=(r=a).l,Br(r),r.fa?r=void 0:(o=r.g.g-s,r.g.g=s,r=s1(r.g,o)),s=i,r&&((o=s[ka])?o.push(r):s[ka]=[r]))}return 8192&l&&Oa(i),!0},e[y1]=t}function tp(e){const t=(e=E1(e))[0].g;if(e=e[1]){const n=Xc(e),i=ta(Fc,qc,Yc,e).T;return(a,l,s)=>t(a,l,s,i,n)}return t}function Qr(e,t,n){e[t]=n.h}function Zr(e,t,n,i){let a,l;const s=n.h;e[t]=(r,o,c)=>s(r,o,c,l||(l=ta(Xr,Qr,Zr,i).T),a||(a=_1(i)))}function _1(e){let t=e[v1];if(!t){const n=ta(Xr,Qr,Zr,e);t=(i,a)=>T1(i,a,n),e[v1]=t}return t}function T1(e,t,n){(function(i,a,l){const s=512&a?0:-1,r=i.length,o=r+((a=64&a?256&a:!!r&&Ar(i[r-1]))?-1:0);for(let c=0;c<o;c++)l(c-s,i[c]);if(a){i=i[r-1];for(const c in i)!isNaN(c)&&l(+c,i[c])}})(e,0|e[L]|(n.T[1]?512:0),(i,a)=>{if(a!=null){var l=function(s,r){var o=s[r];if(o)return o;if((o=s.ga)&&(o=o[r])){var c=(o=E1(o))[0].h;if(o=o[1]){const d=_1(o),h=ta(Xr,Qr,Zr,o).T;o=s.la?x1(h,d):(f,w,v)=>c(f,w,v,h,d)}else o=c;return s[r]=o}}(n,i);l&&l(t,a,i)}}),(e=lc(e))&&function(i,a){Fa(i,i.g.end());for(let l=0;l<a.length;l++)Fa(i,$u(a[l])||new Uint8Array(0))}(t,e)}function Ya(e,t){if(Array.isArray(t)){var n=0|t[L];if(4&n)return t;for(var i=0,a=0;i<t.length;i++){const l=e(t[i]);l!=null&&(t[a++]=l)}return a<i&&(t.length=a),De(t,-6145&(5|n)),2&n&&Object.freeze(t),t}}function tt(e,t,n){return new qa(e,t,n)}function Xa(e,t,n){return new qa(e,t,n)}function nt(e,t,n){pe(e,0|e[L],t,n)}var np=Yr(function(e,t,n,i,a){return e.h===2&&(e=ns(e,mi([void 0,void 0],i,!0),a),ci(i=0|t[L]),(a=Ln(t,i,n))instanceof yn?2&a.M?((a=a.da()).push(e),pe(t,i,n,a)):a.Ja(e):Array.isArray(a)?(2&(0|a[L])&&pe(t,i,n,a=$h(a)),a.push(e)):pe(t,i,n,[e]),!0)},function(e,t,n,i,a){if(t instanceof yn)t.forEach((l,s)=>{qr(e,n,mi([s,l],i,!1),a)});else if(Array.isArray(t))for(let l=0;l<t.length;l++){const s=t[l];Array.isArray(s)&&qr(e,n,mi(s,i,!1),a)}});function A1(e,t,n){if(t=function(i){if(i==null)return i;const a=typeof i;if(a==="bigint")return String(Pl(64,i));if($l(i)){if(a==="string")return Fh(i);if(a==="number")return fc(i)}}(t),t!=null&&(typeof t=="string"&&f1(t),t!=null))switch(xt(e,n,0),typeof t){case"number":e=e.g,Ji(t),Ha(e,ne,xe);break;case"bigint":n=BigInt.asUintN(64,t),n=new Uc(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Ha(e.g,n.h,n.g);break;default:n=f1(t),Ha(e.g,n.h,n.g)}}function N1(e,t,n){(t=Ua(t))!=null&&t!=null&&(xt(e,n,0),Vr(e.g,t))}function j1(e,t,n){(t=Rh(t))!=null&&(xt(e,n,0),e.g.g.push(t?1:0))}function M1(e,t,n){(t=Ra(t))!=null&&Fr(e,n,dh(t))}function C1(e,t,n,i,a){qr(e,n,S1(t,i),a)}function D1(e,t,n){t==null||typeof t=="string"||t instanceof On||(Ii(t)?Ii(t)&&tc(Ah):t=void 0),t!=null&&Fr(e,n,Nc(t).buffer)}function k1(e,t,n){return(e.h===5||e.h===2)&&(t=Ga(t,0|t[L],n,!1),e.h==2?Gr(e,Dc,t):t.push(Dc(e.g)),!0)}var Gn=tt(function(e,t,n){if(e.h!==1)return!1;var i=e.g;e=Cc(i);const a=Cc(i);i=2*(a>>31)+1;const l=a>>>20&2047;return e=4294967296*(1048575&a)+e,nt(t,n,l==2047?e?NaN:i*(1/0):l==0?5e-324*i*e:i*Math.pow(2,l-1075)*(e+4503599627370496)),!0},function(e,t,n){(t=hi(t))!=null&&(xt(e,n,1),e=e.g,(n=Oh||(Oh=new DataView(new ArrayBuffer(8)))).setFloat64(0,+t,!0),ne=n.getUint32(0,!0),xe=n.getUint32(4,!0),is(e,ne),is(e,xe))},un()),ke=tt(function(e,t,n){return e.h===5&&(nt(t,n,Dc(e.g)),!0)},function(e,t,n){(t=hi(t))!=null&&(xt(e,n,5),e=e.g,rc(t),is(e,ne))},Vc),ip=Xa(k1,function(e,t,n){if((t=Ya(hi,t))!=null)for(let s=0;s<t.length;s++){var i=e,a=n,l=t[s];l!=null&&(xt(i,a,5),i=i.g,rc(l),is(i,ne))}},Vc),Qc=Xa(k1,function(e,t,n){if((t=Ya(hi,t))!=null&&t.length){xt(e,n,2),Va(e.g,4*t.length);for(let i=0;i<t.length;i++)n=e.g,rc(t[i]),is(n,ne)}},Vc),pi=tt(function(e,t,n){return e.h===0&&(nt(t,n,jc(e.g,uc)),!0)},A1,m1),Zc=tt(function(e,t,n){return e.h===0&&(nt(t,n,(e=jc(e.g,uc))===0?void 0:e),!0)},A1,m1),ap=tt(function(e,t,n){return e.h===0&&(nt(t,n,jc(e.g,oc)),!0)},function(e,t,n){if((t=B5(t))!=null&&(typeof t=="string"&&c1(t),t!=null))switch(xt(e,n,0),typeof t){case"number":e=e.g,Ji(t),Ha(e,ne,xe);break;case"bigint":n=BigInt.asUintN(64,t),n=new Lc(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Ha(e.g,n.h,n.g);break;default:n=c1(t),Ha(e.g,n.h,n.g)}},un()),Ee=tt(function(e,t,n){return e.h===0&&(nt(t,n,gi(e.g)),!0)},N1,Hc),Kr=Xa(function(e,t,n){return(e.h===0||e.h===2)&&(t=Ga(t,0|t[L],n,!1),e.h==2?Gr(e,gi,t):t.push(gi(e.g)),!0)},function(e,t,n){if((t=Ya(Ua,t))!=null&&t.length){n=zc(e,n);for(let i=0;i<t.length;i++)Vr(e.g,t[i]);Rc(e,n)}},Hc),Qa=tt(function(e,t,n){return e.h===0&&(nt(t,n,(e=gi(e.g))===0?void 0:e),!0)},N1,Hc),de=tt(function(e,t,n){return e.h===0&&(nt(t,n,Mc(e.g)),!0)},j1,d1),Za=tt(function(e,t,n){return e.h===0&&(nt(t,n,(e=Mc(e.g))===!1?void 0:e),!0)},j1,d1),Je=Xa(function(e,t,n){return e.h===2&&(e=Oc(e),Ga(t,0|t[L],n,!1).push(e),!0)},function(e,t,n){if((t=Ya(Ra,t))!=null)for(let s=0;s<t.length;s++){var i=e,a=n,l=t[s];l!=null&&Fr(i,a,dh(l))}},Gc),yi=tt(function(e,t,n){return e.h===2&&(nt(t,n,(e=Oc(e))===""?void 0:e),!0)},M1,Gc),P=tt(function(e,t,n){return e.h===2&&(nt(t,n,Oc(e)),!0)},M1,Gc),Re=function(e,t,n=Bc){return new qa(e,t,n)}(function(e,t,n,i,a){return e.h===2&&(i=mi(void 0,i,!0),Ga(t,0|t[L],n,!0).push(i),ns(e,i,a),!0)},function(e,t,n,i,a){if(Array.isArray(t))for(let l=0;l<t.length;l++)C1(e,t[l],n,i,a)}),$=Yr(function(e,t,n,i,a,l){return e.h===2&&(e1(t,0|t[L],l,n),ns(e,t=Tc(t,i,n),a),!0)},C1),O1=tt(function(e,t,n){return e.h===2&&(nt(t,n,u1(e)),!0)},D1,w1),lp=Xa(function(e,t,n){return(e.h===0||e.h===2)&&(t=Ga(t,0|t[L],n,!1),e.h==2?Gr(e,Bn,t):t.push(Bn(e.g)),!0)},function(e,t,n){if((t=Ya(Bh,t))!=null)for(let s=0;s<t.length;s++){var i=e,a=n,l=t[s];l!=null&&(xt(i,a,0),Va(i.g,l))}},h1),sp=tt(function(e,t,n){return e.h===0&&(nt(t,n,(e=Bn(e.g))===0?void 0:e),!0)},function(e,t,n){(t=Bh(t))!=null&&t!=null&&(xt(e,n,0),Va(e.g,t))},h1),Et=tt(function(e,t,n){return e.h===0&&(nt(t,n,gi(e.g)),!0)},function(e,t,n){(t=Ua(t))!=null&&(t=parseInt(t,10),xt(e,n,0),Vr(e.g,t))},g1);class rp{constructor(t,n){this.h=t,this.g=n,this.l=Z,this.m=z,this.defaultValue=void 0}register(){Er(this)}}function cn(e,t){return new rp(e,t)}function vi(e,t){return(n,i)=>{if(Hr.length){const l=Hr.pop();l.o(i),kc(l.g,n,i),n=l}else n=new class{constructor(l,s){if(r1.length){const r=r1.pop();kc(r,l,s),l=r}else l=new class{constructor(r,o){this.h=null,this.m=!1,this.g=this.l=this.j=0,kc(this,r,o)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.aa=!1}}(l,s);this.g=l,this.l=this.g.g,this.h=this.m=-1,this.o(s)}o({fa:l=!1}={}){this.fa=l}}(n,i);try{const l=new e,s=l.u;Xc(t)(s,n);var a=l}finally{n.g.clear(),n.m=-1,n.h=-1,Hr.length<100&&Hr.push(n)}return a}}function Ir(e){return function(){const t=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const s=this.g;return this.g=[],s}}}};T1(this.u,t,ta(Xr,Qr,Zr,e)),Fa(t,t.g.end());const n=new Uint8Array(t.h),i=t.l,a=i.length;let l=0;for(let s=0;s<a;s++){const r=i[s];n.set(r,l),l+=r.length}return t.l=[n],n}}var L1=class extends k{constructor(e){super(e)}},U1=[0,yi,tt(function(e,t,n){return e.h===2&&(nt(t,n,(e=u1(e))===Wi()?void 0:e),!0)},function(e,t,n){if(t!=null){if(t instanceof k){const i=t.Oa;return void(i&&(t=i(t),t!=null&&Fr(e,n,Nc(t).buffer)))}if(Array.isArray(t))return}D1(e,t,n)},w1)];let Kc,z1=globalThis.trustedTypes;function R1(e){Kc===void 0&&(Kc=function(){let n=null;if(!z1)return n;try{const i=a=>a;n=z1.createPolicy("goog#html",{createHTML:i,createScript:i,createScriptURL:i})}catch{}return n}());var t=Kc;return new class{constructor(n){this.g=n}toString(){return this.g+""}}(t?t.createScriptURL(e):e)}function op(e,...t){if(t.length===0)return R1(e[0]);let n=e[0];for(let i=0;i<t.length;i++)n+=encodeURIComponent(t[i])+e[i+1];return R1(n)}var B1=[0,Ee,Et,de,-1,Kr,Et,-1],up=class extends k{constructor(e){super(e)}},G1=[0,de,P,de,Et,-1,Xa(function(e,t,n){return(e.h===0||e.h===2)&&(t=Ga(t,0|t[L],n,!1),e.h==2?Gr(e,W5,t):t.push(gi(e.g)),!0)},function(e,t,n){if((t=Ya(Ua,t))!=null&&t.length){n=zc(e,n);for(let i=0;i<t.length;i++)Vr(e.g,t[i]);Rc(e,n)}},g1),P,-1,[0,de,-1],Et,de,-1],H1=[0,P,-2],V1=class extends k{constructor(e){super(e)}},F1=[0],q1=[0,Ee,de,1,de,-3],St=class extends k{constructor(e){super(e,2)}},Oe={};Oe[336783863]=[0,P,de,-1,Ee,[0,[1,2,3,4,5,6,7,8,9],$,F1,$,G1,$,H1,$,q1,$,B1,$,[0,P,-2],$,[0,P,Et],$,[0,Et,P,-1],$,[0,Et,-1]],[0,P],de,[0,[1,3],[2,4],$,[0,Kr],-1,$,[0,Je],-1,Re,[0,P,-1]],P];var Y1=[0,Zc,-1,Za,-3,Zc,Kr,yi,Qa,Zc,-1,Za,Qa,Za,-2,yi];function _t(e,t){xc(e,2,za(t),"")}function se(e,t){Ur(e,3,t)}function Y(e,t){Ur(e,4,t)}var it=class extends k{constructor(e){super(e,500)}o(e){return z(this,0,7,e)}},as=[-1,{}],X1=[0,P,1,as],Q1=[0,P,Je,as];function Tt(e,t){zr(e,1,it,t)}function ue(e,t){Ur(e,10,t)}function I(e,t){Ur(e,15,t)}var ft=class extends k{constructor(e){super(e,500)}o(e){return z(this,0,1001,e)}},Z1=[-500,Re,[-500,yi,-1,Je,-3,[-2,Oe,de],Re,U1,Qa,-1,X1,Q1,Re,[0,yi,Za],yi,Y1,Qa,Je,987,Je],4,Re,[-500,P,-1,[-1,{}],998,P],Re,[-500,P,Je,-1,[-2,{},de],997,Je,-1],Qa,Re,[-500,P,Je,as,998,Je],Je,Qa,X1,Q1,Re,[0,yi,-1,as],Je,-2,Y1,yi,-1,Za,[0,Za,sp],978,as,Re,U1];ft.prototype.g=Ir(Z1);var cp=vi(ft,Z1),fp=class extends k{constructor(e){super(e)}},K1=class extends k{constructor(e){super(e)}g(){return zn(this,fp,1)}},I1=[0,Re,[0,Ee,ke,P,-1]],Wr=vi(K1,I1),dp=class extends k{constructor(e){super(e)}},hp=class extends k{constructor(e){super(e)}},Ic=class extends k{constructor(e){super(e)}h(){return Z(this,dp,2)}g(){return zn(this,hp,5)}},W1=vi(class extends k{constructor(e){super(e)}},[0,Je,Kr,Qc,[0,Et,[0,Ee,-3],[0,ke,-3],[0,Ee,-1,[0,Re,[0,Ee,-2]]],Re,[0,ke,-1,P,ke]],P,-1,pi,Re,[0,Ee,ke],Je,pi]),J1=class extends k{constructor(e){super(e)}},Ka=vi(class extends k{constructor(e){super(e)}},[0,Re,[0,ke,-4]]),P1=class extends k{constructor(e){super(e)}},ls=vi(class extends k{constructor(e){super(e)}},[0,Re,[0,ke,-4]]),mp=class extends k{constructor(e){super(e)}},wp=[0,Ee,-1,Qc,Et],$1=class extends k{constructor(e){super(e)}};$1.prototype.g=Ir([0,ke,-4,pi]);var gp=class extends k{constructor(e){super(e)}},pp=vi(class extends k{constructor(e){super(e)}},[0,Re,[0,1,Ee,P,I1],pi]),e0=class extends k{constructor(e){super(e)}},yp=class extends k{constructor(e){super(e)}ma(){const e=Ph(this);return e??Wi()}},vp=class extends k{constructor(e){super(e)}},t0=[1,2],bp=vi(class extends k{constructor(e){super(e)}},[0,Re,[0,t0,$,[0,Qc],$,[0,O1],Ee,P],pi]),Wc=class extends k{constructor(e){super(e)}},n0=[0,P,Ee,ke,Je,-1],i0=class extends k{constructor(e){super(e)}},xp=[0,de,-1],a0=class extends k{constructor(e){super(e)}},Jr=[1,2,3,4,5],Pr=class extends k{constructor(e){super(e)}g(){return Ph(this)!=null}h(){return Vt(this,2)!=null}},he=class extends k{constructor(e){super(e)}g(){return Rh(Ba(this,2))??!1}},l0=[0,O1,P,[0,Ee,pi,-1],[0,ap,pi]],je=[0,l0,de,[0,Jr,$,q1,$,G1,$,B1,$,F1,$,H1],Et],$r=class extends k{constructor(e){super(e)}},Jc=[0,je,ke,-1,Ee],Ep=cn(502141897,$r);Oe[502141897]=Jc;var Sp=vi(class extends k{constructor(e){super(e)}},[0,[0,Et,-1,ip,lp],wp]),s0=class extends k{constructor(e){super(e)}},r0=class extends k{constructor(e){super(e)}},Pc=[0,je,ke,[0,je],de],o0=[0,je,Jc,Pc,ke,[0,[0,l0]]],_p=cn(508968150,r0);Oe[508968150]=o0,Oe[508968149]=Pc;var u0=class extends k{constructor(e){super(e)}},Tp=cn(513916220,u0);Oe[513916220]=[0,je,o0,Ee];var Ia=class extends k{constructor(e){super(e)}h(){return Z(this,Wc,2)}g(){le(this,2)}},c0=[0,je,n0];Oe[478825465]=c0;var Ap=class extends k{constructor(e){super(e)}},f0=class extends k{constructor(e){super(e)}},$c=class extends k{constructor(e){super(e)}},ef=class extends k{constructor(e){super(e)}},d0=class extends k{constructor(e){super(e)}},h0=[0,je,[0,je],c0,-1],m0=[0,je,ke,Ee],tf=[0,je,ke],w0=[0,je,m0,tf,ke],Np=cn(479097054,d0);Oe[479097054]=[0,je,w0,h0],Oe[463370452]=h0,Oe[464864288]=m0;var jp=cn(462713202,ef);Oe[462713202]=w0,Oe[474472470]=tf;var Mp=class extends k{constructor(e){super(e)}},g0=class extends k{constructor(e){super(e)}},p0=class extends k{constructor(e){super(e)}},y0=class extends k{constructor(e){super(e)}},nf=[0,je,ke,-1,Ee],af=[0,je,ke,de];y0.prototype.g=Ir([0,je,tf,[0,je],Jc,Pc,nf,af]);var v0=class extends k{constructor(e){super(e)}},Cp=cn(456383383,v0);Oe[456383383]=[0,je,n0];var b0=class extends k{constructor(e){super(e)}},Dp=cn(476348187,b0);Oe[476348187]=[0,je,xp];var x0=class extends k{constructor(e){super(e)}},E0=class extends k{constructor(e){super(e)}},S0=[0,Et,-1],kp=cn(458105876,class extends k{constructor(e){super(e)}g(){var e=this.u;const t=0|e[L],n=2&t;return e=function(i,a,l){var s=E0;const r=2&a;let o=!1;if(l==null){if(r)return Ih();l=[]}else if(l.constructor===yn){if(!(2&l.M)||r)return l;l=l.da()}else Array.isArray(l)?o=!!(2&(0|l[L])):l=[];if(r){if(!l.length)return Ih();o||(o=!0,Oa(l))}else o&&(o=!1,l=$h(l));return o||(64&(0|l[L])?l[L]&=-33:32&a&&_r(l,32)),pe(i,a,2,s=new yn(l,s,G5,void 0)),s}(e,t,Ln(e,t,2)),!n&&E0&&(e.pa=!0),e}});Oe[458105876]=[0,S0,np,[!0,pi,[0,P,-1,Je]]];var lf=class extends k{constructor(e){super(e)}},_0=cn(458105758,lf);Oe[458105758]=[0,je,P,S0];var T0=class extends k{constructor(e){super(e)}},Op=cn(443442058,T0);Oe[443442058]=[0,je,P,Ee,ke,Je,-1,de,ke],Oe[514774813]=nf;var A0=class extends k{constructor(e){super(e)}},Lp=cn(516587230,A0);function sf(e,t){return t=t?t.clone():new Wc,e.displayNamesLocale!==void 0?le(t,1,za(e.displayNamesLocale)):e.displayNamesLocale===void 0&&le(t,1),e.maxResults!==void 0?vn(t,2,e.maxResults):"maxResults"in e&&le(t,2),e.scoreThreshold!==void 0?O(t,3,e.scoreThreshold):"scoreThreshold"in e&&le(t,3),e.categoryAllowlist!==void 0?Rr(t,4,e.categoryAllowlist):"categoryAllowlist"in e&&le(t,4),e.categoryDenylist!==void 0?Rr(t,5,e.categoryDenylist):"categoryDenylist"in e&&le(t,5),t}function rf(e,t=-1,n=""){return{categories:e.map(i=>({index:Ht(i,1)??0??-1,score:Ne(i,2)??0,categoryName:Vt(i,3)??""??"",displayName:Vt(i,4)??""??""})),headIndex:t,headName:n}}function N0(e){var s,r;var t=$i(e,3,hi,Pi()),n=$i(e,2,Ua,Pi()),i=$i(e,1,Ra,Pi()),a=$i(e,9,Ra,Pi());const l={categories:[],keypoints:[]};for(let o=0;o<t.length;o++)l.categories.push({score:t[o],index:n[o]??-1,categoryName:i[o]??"",displayName:a[o]??""});if((t=(s=Z(e,Ic,4))==null?void 0:s.h())&&(l.boundingBox={originX:Ht(t,1)??0,originY:Ht(t,2)??0,width:Ht(t,3)??0,height:Ht(t,4)??0,angle:0}),(r=Z(e,Ic,4))==null?void 0:r.g().length)for(const o of Z(e,Ic,4).g())l.keypoints.push({x:Lr(o,1)??0,y:Lr(o,2)??0,score:Lr(o,4)??0,label:Vt(o,3)??""});return l}function eo(e){const t=[];for(const n of zn(e,P1,1))t.push({x:Ne(n,1)??0,y:Ne(n,2)??0,z:Ne(n,3)??0,visibility:Ne(n,4)??0});return t}function ss(e){const t=[];for(const n of zn(e,J1,1))t.push({x:Ne(n,1)??0,y:Ne(n,2)??0,z:Ne(n,3)??0,visibility:Ne(n,4)??0});return t}function j0(e){return Array.from(e,t=>t>127?t-256:t)}function M0(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);let n=0,i=0,a=0;for(let l=0;l<e.length;l++)n+=e[l]*t[l],i+=e[l]*e[l],a+=t[l]*t[l];if(i<=0||a<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(i*a)}let to;Oe[516587230]=[0,je,nf,af,ke],Oe[518928384]=af;const Up=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function C0(){if(to===void 0)try{await WebAssembly.instantiate(Up),to=!0}catch{to=!1}return to}async function rs(e,t=op``){const n=await C0()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${t}/${e}_${n}.js`,wasmBinaryPath:`${t}/${e}_${n}.wasm`}}var na=class{};function D0(){var e=navigator;return typeof OffscreenCanvas<"u"&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(e)||!!((e=e.userAgent.match(/Version\/([\d]+).*Safari/))&&e.length>=1&&Number(e[1])>=17))}async function k0(e){if(typeof importScripts!="function"){const t=document.createElement("script");return t.src=e.toString(),t.crossOrigin="anonymous",new Promise((n,i)=>{t.addEventListener("load",()=>{n()},!1),t.addEventListener("error",a=>{i(a)},!1),document.body.appendChild(t)})}importScripts(e.toString())}function O0(e){return e.videoWidth!==void 0?[e.videoWidth,e.videoHeight]:e.naturalWidth!==void 0?[e.naturalWidth,e.naturalHeight]:e.displayWidth!==void 0?[e.displayWidth,e.displayHeight]:[e.width,e.height]}function U(e,t,n){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(t=e.i.stringToNewUTF8(t)),e.i._free(t)}function L0(e,t,n){if(!e.i.canvas)throw Error("No OpenGL canvas configured.");if(n?e.i._bindTextureToStream(n):e.i._bindTextureToCanvas(),!(n=e.i.canvas.getContext("webgl2")||e.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[i,a]=O0(t);return!e.l||i===e.i.canvas.width&&a===e.i.canvas.height||(e.i.canvas.width=i,e.i.canvas.height=a),[i,a]}function U0(e,t,n){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const i=new Uint32Array(t.length);for(let a=0;a<t.length;a++)i[a]=e.i.stringToNewUTF8(t[a]);t=e.i._malloc(4*i.length),e.i.HEAPU32.set(i,t>>2),n(t);for(const a of i)e.i._free(a);e.i._free(t)}function bn(e,t,n){e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=n}function bi(e,t,n){let i=[];e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=(a,l,s)=>{l?(n(i,s),i=[]):i.push(a)}}na.forVisionTasks=function(e){return rs("vision",e)},na.forTextTasks=function(e){return rs("text",e)},na.forGenAiExperimentalTasks=function(e){return rs("genai_experimental",e)},na.forGenAiTasks=function(e){return rs("genai",e)},na.forAudioTasks=function(e){return rs("audio",e)},na.isSimdSupported=function(){return C0()};async function zp(e,t,n,i){return e=await(async(a,l,s,r,o)=>{if(l&&await k0(l),!self.ModuleFactory||s&&(await k0(s),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&o&&((l=self.Module).locateFile=o.locateFile,o.mainScriptUrlOrBlob&&(l.mainScriptUrlOrBlob=o.mainScriptUrlOrBlob)),o=await self.ModuleFactory(self.Module||o),self.ModuleFactory=self.Module=void 0,new a(o,r)})(e,n.wasmLoaderPath,n.assetLoaderPath,t,{locateFile:a=>a.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&a.endsWith(".data")?n.assetBinaryPath.toString():a}),await e.o(i),e}function of(e,t){const n=Z(e.baseOptions,Pr,1)||new Pr;typeof t=="string"?(le(n,2,za(t)),le(n,1)):t instanceof Uint8Array&&(le(n,1,ac(t,!1)),le(n,2)),z(e.baseOptions,0,1,n)}function z0(e){try{const t=e.G.length;if(t===1)throw Error(e.G[0].message);if(t>1)throw Error("Encountered multiple errors: "+e.G.map(n=>n.message).join(", "))}finally{e.G=[]}}function C(e,t){e.B=Math.max(e.B,t)}function no(e,t){e.A=new it,_t(e.A,"PassThroughCalculator"),se(e.A,"free_memory"),Y(e.A,"free_memory_unused_out"),ue(t,"free_memory"),Tt(t,e.A)}function Wa(e,t){se(e.A,t),Y(e.A,t+"_unused_out")}function io(e){e.g.addBoolToStream(!0,"free_memory",e.B)}var uf=class{constructor(e){this.g=e,this.G=[],this.B=0,this.g.setAutoRenderToScreen(!1)}l(e,t=!0){var n,i,a,l,s,r;if(t){const o=e.baseOptions||{};if((n=e.baseOptions)!=null&&n.modelAssetBuffer&&((i=e.baseOptions)!=null&&i.modelAssetPath))throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!((a=Z(this.baseOptions,Pr,1))!=null&&a.g()||(l=Z(this.baseOptions,Pr,1))!=null&&l.h()||(s=e.baseOptions)!=null&&s.modelAssetBuffer||(r=e.baseOptions)!=null&&r.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(c,d){let h=Z(c.baseOptions,a0,3);if(!h){var f=h=new a0,w=new V1;es(f,4,Jr,w)}"delegate"in d&&(d.delegate==="GPU"?(d=h,f=new up,es(d,2,Jr,f)):(d=h,f=new V1,es(d,4,Jr,f))),z(c.baseOptions,0,3,h)}(this,o),o.modelAssetPath)return fetch(o.modelAssetPath.toString()).then(c=>{if(c.ok)return c.arrayBuffer();throw Error(`Failed to fetch model: ${o.modelAssetPath} (${c.status})`)}).then(c=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(c),!0,!1,!1),of(this,"/model.dat"),this.m(),this.J()});if(o.modelAssetBuffer instanceof Uint8Array)of(this,o.modelAssetBuffer);else if(o.modelAssetBuffer)return async function(c){const d=[];for(var h=0;;){const{done:f,value:w}=await c.read();if(f)break;d.push(w),h+=w.length}if(d.length===0)return new Uint8Array(0);if(d.length===1)return d[0];c=new Uint8Array(h),h=0;for(const f of d)c.set(f,h),h+=f.length;return c}(o.modelAssetBuffer).then(c=>{of(this,c),this.m(),this.J()})}return this.m(),this.J(),Promise.resolve()}J(){}ca(){let e;if(this.g.ca(t=>{e=cp(t)}),!e)throw Error("Failed to retrieve CalculatorGraphConfig");return e}setGraph(e,t){this.g.attachErrorListener((n,i)=>{this.G.push(Error(i))}),this.g.Ha(),this.g.setGraph(e,t),this.A=void 0,z0(this)}finishProcessing(){this.g.finishProcessing(),z0(this)}close(){this.A=void 0,this.g.closeGraph()}};function Hn(e,t){if(!e)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}uf.prototype.close=uf.prototype.close;class Rp{constructor(t,n,i,a){this.g=t,this.h=n,this.m=i,this.l=a}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function R0(e,t,n){const i=e.g;if(n=Hn(i.createShader(n),"Failed to create WebGL shader"),i.shaderSource(n,t),i.compileShader(n),!i.getShaderParameter(n,i.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${i.getShaderInfoLog(n)}`);return i.attachShader(e.h,n),n}function B0(e,t){const n=e.g,i=Hn(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(i);const a=Hn(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,a),n.enableVertexAttribArray(e.P),n.vertexAttribPointer(e.P,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const l=Hn(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,l),n.enableVertexAttribArray(e.J),n.vertexAttribPointer(e.J,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(t?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new Rp(n,i,a,l)}function cf(e,t){if(e.g){if(t!==e.g)throw Error("Cannot change GL context once initialized")}else e.g=t}function ff(e,t,n,i){return cf(e,t),e.h||(e.m(),e.C()),n?(e.s||(e.s=B0(e,!0)),n=e.s):(e.v||(e.v=B0(e,!1)),n=e.v),t.useProgram(e.h),n.bind(),e.l(),e=i(),n.g.bindVertexArray(null),e}function ao(e,t,n){return cf(e,t),e=Hn(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n??t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n??t.LINEAR),t.bindTexture(t.TEXTURE_2D,null),e}function lo(e,t,n){cf(e,t),e.A||(e.A=Hn(t.createFramebuffer(),"Failed to create framebuffe.")),t.bindFramebuffer(t.FRAMEBUFFER,e.A),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0)}function df(e){var t;(t=e.g)==null||t.bindFramebuffer(e.g.FRAMEBUFFER,null)}var hf=class{G(){return`
9
+ */var Xw=Symbol.for("react.transitional.element"),Qw=Symbol.for("react.fragment");function $2(e,t,n){var i=null;if(n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:Xw,type:e,key:i,ref:t!==void 0?t:null,props:n}}_r.Fragment=Qw,_r.jsx=$2,_r.jsxs=$2,P2.exports=_r;var u=P2.exports;const Fo={},xn={api:{baseUrl:"/api",retryConfig:{attempts:3,backoff:"exponential",baseDelay:1e3}},ui:{baseColor:"#3B82F6",borderRadius:"8px"},interview:{allow_answer_editing:!0,timers:{thinkingDuration:30,answeringDuration:120,editingDuration:30},stt:{provider:"groq",model:"whisper-large-v3-turbo",language:"en"},tts:{provider:"piper"},proctoring:{enabled:!0,gazeAnalysisEnabled:!0}}},Yo="iw-storage";function Zw(){if(!(typeof{url:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:qo&&qo.tagName.toUpperCase()==="SCRIPT"&&qo.src||new URL("widget.umd.js",document.baseURI).href}<"u"&&(Fo!=null&&Fo.VITE_IW_SECRET)))return typeof process<"u"&&process.env.NEXT_PUBLIC_IW_SECRET?process.env.NEXT_PUBLIC_IW_SECRET:typeof window<"u"&&window.__IW_SECRET__?window.__IW_SECRET__:"proctoring-data-seed"}const e1=Zw(),Tr=30,Kw={SCREENSHOT:"screenshot"},Xo="AES-GCM",Qo=12;async function t1(e){const n=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",n);return crypto.subtle.importKey("raw",i,Xo,!1,["encrypt","decrypt"])}function Iw(){return crypto.getRandomValues(new Uint8Array(Qo))}async function Jw(e,t="default-seed"){try{const n=typeof e=="string"?e:JSON.stringify(e),a=new TextEncoder().encode(n),l=await t1(t),s=Iw(),r=await crypto.subtle.encrypt({name:Xo,iv:s},l,a),o=new Uint8Array(s.length+r.byteLength);return o.set(new Uint8Array(s),0),o.set(new Uint8Array(r),s.length),btoa(String.fromCharCode(...Array.from(o)))}catch(n){throw console.error("Encryption failed:",n),new Error("Failed to encrypt data")}}async function Ww(e,t="default-seed"){try{const n=atob(e),i=new Uint8Array(n.length);for(let c=0;c<n.length;c++)i[c]=n.charCodeAt(c);const a=i.slice(0,Qo),l=i.slice(Qo),s=await t1(t),r=await crypto.subtle.decrypt({name:Xo,iv:a},s,l);return new TextDecoder().decode(r)}catch(n){throw console.error("Decryption failed:",n),new Error("Failed to decrypt data")}}async function Pw(e,t="default-seed"){return Jw(e,t)}async function $w(e,t="default-seed"){const n=await Ww(e,t);try{return JSON.parse(n)}catch{return n}}const Wl=y.createContext(null),e6=async()=>{try{const e=sessionStorage.getItem(Yo);if(e){const n=(await $w(e,e1)).state;return{logViolations:(n==null?void 0:n.logViolations)||[],totalViolations:(n==null?void 0:n.totalViolations)||0,gazeViolationCounters:(n==null?void 0:n.gazeViolationCounters)||{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:(n==null?void 0:n.referenceSet)??!1,referenceRef:(n==null?void 0:n.referenceRef)??{x:.5,y:.5,noseX:.5,noseY:.5}}}}catch(e){console.error("Failed to load proctoring data from session storage:",e)}return{logViolations:[],totalViolations:0,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:!1,referenceRef:{x:.5,y:.5,noseX:.5,noseY:.5}}},Pl=async e=>{try{const t=await Pw({state:e,version:0},e1);sessionStorage.setItem(Yo,t)}catch(t){console.error("Failed to save proctoring data to session storage:",t)}},t6=({children:e})=>{const t=y.useRef({logViolations:[],totalViolations:0,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:!1,referenceRef:{x:.5,y:.5,noseX:.5,noseY:.5}}),n=y.useRef(new Set);y.useEffect(()=>{e6().then(d=>{t.current=d,i()})},[]);const i=y.useCallback(()=>{n.current.forEach(d=>d())},[]),a=y.useCallback(d=>(n.current.add(d),()=>{n.current.delete(d)}),[]),l=y.useCallback(()=>t.current,[]),s=y.useCallback(d=>{t.current={...t.current,logViolations:[...t.current.logViolations,d],totalViolations:t.current.totalViolations+1},Pl(t.current),i()},[i]),r=y.useCallback(d=>{const m={...t.current.gazeViolationCounters};d==="looking_away"&&(m.lookingAwayCount+=1),d==="no_face_detected"&&(m.noFaceDetectedCount+=1),d==="multiple_faces"&&(m.multipleFacesCount+=1),m.totalGazeViolations=m.lookingAwayCount+m.noFaceDetectedCount+m.multipleFacesCount,t.current={...t.current,gazeViolationCounters:m},Pl(t.current),i()},[i]),o=y.useCallback(()=>{t.current={...t.current,logViolations:[],totalViolations:0},Pl(t.current),i()},[i]),c=y.useCallback(()=>{t.current={...t.current,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0}},Pl(t.current),i()},[i]),f=y.useCallback((d,m)=>{t.current={...t.current,referenceSet:d,referenceRef:m},Pl(t.current),i()},[i]),h=y.useMemo(()=>({getState:l,addViolation:s,clearViolations:o,subscribe:a,incrementGazeViolation:r,clearGazeViolationCounters:c,setReferenceData:f}),[l,s,o,a,r,c,f]);return u.jsx(Wl.Provider,{value:h,children:e})},n1=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useProctoringStore must be used within a ProctoringProvider");const t=y.useSyncExternalStore(e.subscribe,e.getState,e.getState);return{logViolations:t.logViolations,totalViolations:t.totalViolations,addViolation:e.addViolation,clearViolations:e.clearViolations,gazeViolationCounters:t.gazeViolationCounters,referenceSet:t.referenceSet,referenceRef:t.referenceRef,incrementGazeViolation:e.incrementGazeViolation,clearGazeViolationCounters:e.clearGazeViolationCounters,setReferenceData:e.setReferenceData}},n6=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useViolations must be used within a ProctoringProvider");return y.useSyncExternalStore(e.subscribe,()=>e.getState().logViolations,()=>e.getState().logViolations)},i6=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useTotalViolations must be used within a ProctoringProvider");return y.useSyncExternalStore(e.subscribe,()=>e.getState().totalViolations,()=>e.getState().totalViolations)},a6=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useProctoringActions must be used within a ProctoringProvider");return{addViolation:e.addViolation,clearViolations:e.clearViolations}},i1=y.createContext(null);function Zo({config:e={},children:t}){var i,a,l,s;const n={api:{...xn.api,...e.api,retryConfig:{...xn.api.retryConfig,...(i=e.api)==null?void 0:i.retryConfig}},ui:{...xn.ui,...e.ui},interview:{...xn.interview,...e.interview,timers:{...xn.interview.timers,...(a=e.interview)==null?void 0:a.timers},stt:{...xn.interview.stt,...(l=e.interview)==null?void 0:l.stt},tts:{...xn.interview.tts,...(s=e.interview)==null?void 0:s.tts}}};return u.jsx(i1.Provider,{value:n,children:u.jsx(t6,{children:t})})}function Ar(){const e=y.useContext(i1);if(!e)throw new Error("useInterviewConfig must be used within an InterviewWidgetProvider. Wrap your component tree with <InterviewWidgetProvider config={...}>");return e}function a1(){return Ar().api||xn.api}function $l(){return Ar().ui||xn.ui}function Ko(){return Ar().interview||xn.interview}function l6(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function s6(e,t,n){return"#"+[e,t,n].map(i=>{const a=Math.round(i).toString(16);return a.length===1?"0"+a:a}).join("")}function r6(e,t){const n=l6(e);if(!n)return e;const i=n.r+(255-n.r)*t,a=n.g+(255-n.g)*t,l=n.b+(255-n.b)*t;return s6(i,a,l)}function u6(e){return new Promise(t=>setTimeout(t,e))}function o6(e){return`linear-gradient(to left, ${r6(e,.4)}, ${e})`}const c6=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);function f6(e){try{const t=e.split(".");if(t.length!==3||!t[1])throw new Error("Invalid JWT token");const i=t[1].replace(/-/g,"+").replace(/_/g,"/"),a=i.padEnd(i.length+(4-i.length%4)%4,"="),l=atob(a);return JSON.parse(l)}catch(t){return console.error("Error decoding JWT:",t),null}}const l1=e=>{var t;return!e||typeof e!="string"?"":(t=e.charAt(0))==null?void 0:t.toUpperCase()},Io=e=>{const t=Math.max(0,Math.floor(e)),n=Math.floor(t/60).toString().padStart(2,"0"),i=(t%60).toString().padStart(2,"0");return`${n}:${i}`},es=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),u.jsx("path",{d:"M12 9v4"}),u.jsx("path",{d:"M12 17h.01"})]}),d6=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-bolt-icon prefix__lucide-bolt",...e,children:[u.jsx("path",{d:"M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z"}),u.jsx("circle",{cx:12,cy:12,r:4})]}),h6=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-camera-off-icon prefix__lucide-camera-off",...e,children:[u.jsx("path",{d:"M14.564 14.558a3 3 0 11-4.122-4.121M2 2l20 20"}),u.jsx("path",{d:"M20 20H4a2 2 0 01-2-2V9a2 2 0 012-2h1.997a2 2 0 00.819-.175M9.695 4.024A2 2 0 0110.004 4h3.993a2 2 0 011.76 1.05l.486.9A2 2 0 0018.003 7H20a2 2 0 012 2v7.344"})]}),Nr=e=>u.jsx("svg",{width:"10",height:"9",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:u.jsx("path",{d:"M0.75 5.5C0.75 5.5 2.35 6.4125 3.15 7.75C3.15 7.75 5.55 2.5 8.75 0.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),s1=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M12 2a10 10 0 0 1 7.38 16.75"}),u.jsx("path",{d:"M12 6v6l4 2"}),u.jsx("path",{d:"M2.5 8.875a10 10 0 0 0-.5 3"}),u.jsx("path",{d:"M2.83 16a10 10 0 0 0 2.43 3.4"}),u.jsx("path",{d:"M4.636 5.235a10 10 0 0 1 .891-.857"}),u.jsx("path",{d:"M8.644 21.42a10 10 0 0 0 7.631-.38"})]}),m6=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M12 6v6l4 2"}),u.jsx("circle",{cx:"12",cy:"12",r:"10"})]}),r1=e=>u.jsx("svg",{className:"iw-w-5 iw-h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",...e,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),u1=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}),u.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),g6=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),u.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),u.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),w6=e=>u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M2.66797 2H13.3346",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M3.66797 2V3.35359C3.66797 4.18151 4.05252 4.96247 4.70874 5.46726L8.0013 8L11.2938 5.46726C11.9501 4.96247 12.3346 4.18151 12.3346 3.35359V2",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M3.66797 14V12.6464C3.66797 11.8185 4.05252 11.0375 4.70874 10.5327L8.0013 8L11.2938 10.5327C11.9501 11.0375 12.3346 11.8185 12.3346 12.6464V14",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M2.66797 14H13.3346",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"})]}),Jo=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),u.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),u.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),o1=({className:e,...t})=>u.jsx("div",{children:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`iw-animate-spin ${e}`,...t,children:[u.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.jsx("path",{d:"M12 6l0 -3"}),u.jsx("path",{d:"M16.25 7.75l2.15 -2.15"}),u.jsx("path",{d:"M18 12l3 0"}),u.jsx("path",{d:"M16.25 16.25l2.15 2.15"}),u.jsx("path",{d:"M12 18l0 3"}),u.jsx("path",{d:"M7.75 16.25l-2.15 2.15"}),u.jsx("path",{d:"M6 12l-3 0"}),u.jsx("path",{d:"M7.75 7.75l-2.15 -2.15"})]})}),y6=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M17 7V11C17 13.7614 14.7614 16 12 16C9.23858 16 7 13.7614 7 11V7C7 4.23858 9.23858 2 12 2C14.7614 2 17 4.23858 17 7Z",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M20 11C20 15.4183 16.4183 19 12 19M12 19C7.58172 19 4 15.4183 4 11M12 19V22M12 22H15M12 22H9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),p6=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M2 2L22 22",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M4 11C4 15.4183 7.58172 19 12 19M12 19C13.9545 19 15.7454 18.2991 17.1348 17.1348M12 19V22M12 22H15M12 22H9M20 11C20 12.6514 19.4996 14.1859 18.6422 15.4603",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M7 6.98V11C7 13.7614 9.23858 16 12 16C13.1354 16 14.1647 15.6096 15.004 14.972M16.4387 13.244C16.7973 12.5545 17 11.8309 17 11V6.98C17 4.21858 14.7614 2 12 2C10.1312 2 8.53009 2.96527 7.672 4.484",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"})]}),v6=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}),u.jsx("line",{x1:"8",x2:"16",y1:"21",y2:"21"}),u.jsx("line",{x1:"12",x2:"12",y1:"17",y2:"21"})]}),b6=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),u.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),u.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),x6=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}),u.jsx("path",{d:"m9 12 2 2 4-4"})]}),S6=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-target-icon prefix__lucide-target",...e,children:[u.jsx("circle",{cx:12,cy:12,r:10}),u.jsx("circle",{cx:12,cy:12,r:6}),u.jsx("circle",{cx:12,cy:12,r:2})]}),E6=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-users-icon prefix__lucide-users",...e,children:[u.jsx("path",{d:"M16 21v-2a4 4 0 00-4-4H6a4 4 0 00-4 4v2M16 3.128a4 4 0 010 7.744M22 21v-2a4 4 0 00-3-3.87"}),u.jsx("circle",{cx:9,cy:7,r:4})]}),_6=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M11 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M2 11C2 7.70017 2 6.05025 3.02513 5.02513C4.05025 4 5.70017 4 9 4H10C13.2998 4 14.9497 4 15.9749 5.02513C17 6.05025 17 7.70017 17 11V13C17 16.2998 17 17.9497 15.9749 18.9749C14.9497 20 13.2998 20 10 20H9C5.70017 20 4.05025 20 3.02513 18.9749C2 17.9497 2 16.2998 2 13V11Z",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M17 8.90585L17.1259 8.80196C19.2417 7.05623 20.2996 6.18336 21.1498 6.60482C22 7.02628 22 8.42355 22 11.2181V12.7819C22 15.5765 22 16.9737 21.1498 17.3952C20.2996 17.8166 19.2417 16.9438 17.1259 15.198L17 15.0941",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),T6=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M2.00195 2L21.9773 22",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M16.8517 16.8668C16.7225 17.8052 16.4666 18.4659 15.9596 18.9735C14.9357 19.9987 13.2878 19.9987 9.99206 19.9987H8.99329C5.69755 19.9987 4.04967 19.9987 3.02581 18.9735C2.00195 17.9484 2.00195 16.2985 2.00195 12.9987V10.9987C2.00195 7.69885 2.00195 6.04893 3.02581 5.0238C3.36833 4.68086 3.78068 4.45265 4.3012 4.30078",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M8.23633 4.00052C8.47821 4 8.73001 4 8.99223 4H9.99099C13.2868 4 14.9347 4 15.9585 5.02513C16.9823 6.05025 16.9823 7.70017 16.9823 11V12.7574M16.9823 9.23142L19.3019 7.52913C20.773 6.54073 21.449 7.17196 21.6675 7.64847C22.1192 8.92813 21.9769 11.3936 21.9769 14.5417C21.8704 16.555 21.5953 16.7719 21.3138 16.9939L21.3108 16.9962",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),ts={FACE_DETECTED:"face_detected",NO_FACE:"no_face_detected",MULTIPLE_FACES:"multiple_faces",LOOKING_AWAY:"looking_away",CAMERA_ERROR:"camera_error"},c1={[ts.FACE_DETECTED]:{icon:u1,iconColor:"iw-text-green-600",iconBg:"iw-bg-green-50",iconBorder:"iw-border-green-100",title:"All Good",subtitle:"Everything looks normal",description:"Your gaze is properly focused on the screen. Continue with your interview.",buttonText:"Continue"},[ts.NO_FACE]:{icon:h6,iconColor:"iw-text-orange-600",iconBg:"iw-bg-orange-50",iconBorder:"iw-border-orange-100",title:"Face Not Detected",subtitle:"We can't see you in the camera",description:"Please ensure you're positioned properly in front of the camera and that your face is clearly visible.",buttonText:"I Understood"},[ts.MULTIPLE_FACES]:{icon:E6,iconColor:"iw-text-red-600",iconBg:"iw-bg-red-50",iconBorder:"iw-border-red-100",title:"Multiple People Detected",subtitle:"More than one person is visible",description:"For interview integrity, please ensure you are alone in the room and only your face is visible to the camera.",buttonText:"I Understood"},[ts.LOOKING_AWAY]:{icon:S6,iconColor:"iw-text-amber-600",iconBg:"iw-bg-amber-50",iconBorder:"iw-border-amber-200/75",title:"Stay Focused",subtitle:"We noticed you looked away from the screen",description:"To ensure interview integrity, please keep your attention on the screen throughout the session.",buttonText:"I Understood"},[ts.CAMERA_ERROR]:{icon:es,iconColor:"iw-text-red-600",iconBg:"iw-bg-red-50",iconBorder:"iw-border-red-100",title:"Camera Issue",subtitle:"There's a problem with your camera",description:"Please check your camera connection and permissions, then refresh the page to continue.",buttonText:"I Understood"}};function A6(e){var t;if(!navigator.onLine)return{type:"network",message:"No internet connection",retryable:!0,userMessage:"Please check your internet connection and try again."};if(e.name==="AbortError"||(t=e.message)!=null&&t.includes("timeout"))return{type:"timeout",message:"Request timed out",retryable:!0,userMessage:"The request is taking longer than expected. Please try again."};if(e.status){const{status:n}=e;if(n===401||n===403)return{type:"auth",status:n,message:"Authentication failed",retryable:!1,userMessage:"Your session has expired. Please refresh the page."};if(n===429)return{type:"rate-limit",status:n,message:"Too many requests",retryable:!0,userMessage:"Please wait a moment before trying again."};if(n>=500)return{type:"server",status:n,message:`Server error: ${n}`,retryable:!0,userMessage:"Our servers are experiencing issues. Please try again in a few moments."};if(n>=400)return{type:"client",status:n,message:`Client error: ${n}`,retryable:!1,userMessage:"There was an issue with your request. Please check your input."}}return{type:"unknown",message:e.message||"Unknown error occurred",retryable:!0,userMessage:"Something unexpected happened. Please try again.",originalError:e}}async function ui(e,t={},n={attempts:3,backoff:"exponential",baseDelay:1e3,maxDelay:1e4,jitter:!0}){let i;for(let a=1;a<=n.attempts;a++)try{const l=new AbortController,s=setTimeout(()=>l.abort(),6e4),r=await fetch(e,{...t,signal:l.signal});if(clearTimeout(s),r.status>=400&&r.status<500&&r.status!==429)return r;if(!r.ok)throw new Error(`HTTP ${r.status}: ${r.statusText}`);return r}catch(l){i=l;const s=A6(l);if(!s.retryable||a===n.attempts)throw s;const r=N6(a,n);console.warn(`API request failed (attempt ${a}/${n.attempts}), retrying in ${r}ms:`,s.message),await new Promise(o=>setTimeout(o,r))}throw i}function N6(e,t){let n;return t.backoff==="exponential"?n=t.baseDelay*Math.pow(2,e-1):n=t.baseDelay,n=Math.min(n,t.maxDelay),t.jitter&&(n=n*(.5+Math.random()*.5)),Math.round(n)}const oi={v2:"/v2"},ci={GENERATE_QUESTION:e=>`${oi.v2}/interviews/${e}/next-question`,SCREENSHOT_UPLOAD:e=>`${oi.v2}/interviews/${e}/assets/upload-url`,CONFIRM_UPLOAD:e=>`${oi.v2}/interviews/assets/${e}/confirm`,TRANSCRIBE_ANSWER:e=>`${oi.v2}/interviews/${e}/transcribe-answer`,SUBMIT_ANSWER:e=>`${oi.v2}/interviews/${e}/submit-answer`,EXIT:e=>`${oi.v2}/interviews/${e}/exit`,CONFIG:e=>`${oi.v2}/interviews/${e}/config`,TRANSCRIPTION:e=>`${oi.v2}/interviews/${e}/transcript`};class f1{constructor(t={}){Qt(this,"config");this.config=t}updateConfig(t){this.config={...this.config,...t}}getHeaders(){var n;const t={"Content-Type":"application/json"};return(n=this.config)!=null&&n.authToken&&(t.Authorization=`Bearer ${this.config.authToken}`),t}getBaseUrl(){var t;return((t=this.config)==null?void 0:t.baseUrl)||"/api"}async generateQuestion({interviewId:t,isInterviewDone:n=!1}){const i=await ui(`${this.getBaseUrl()}${ci.GENERATE_QUESTION(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({interview_id:t,is_interview_done:n})});if(!i.ok)throw new Error(`Failed to get questions: ${i.status}`);return await i.json()}async submitAnswer({interviewId:t,qnaId:n,answer:i}){const a=await ui(`${this.getBaseUrl()}${ci.SUBMIT_ANSWER(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({qna_id:n,answer_text:i})});if(!a.ok)throw new Error(`Failed to submit answer: ${a.status}`);return await a.json()}async exitInterview(t){const n=await ui(`${this.getBaseUrl()}${ci.EXIT(t)}`,{method:"POST",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to exit interview: ${n.status}`)}async getInterviewConfig(t){const n=await ui(`${this.getBaseUrl()}${ci.CONFIG(t)}`,{method:"GET",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to get interview config: ${n.status}`);return await n.json()}async requestScreenshotUploadUrl(t,n=`screenshot-${Date.now()}.jpeg`){const i=await ui(`${this.getBaseUrl()}${ci.SCREENSHOT_UPLOAD(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({filename:n,mime_type:"image/jpeg",asset_type:Kw.SCREENSHOT})});if(!i.ok)throw new Error(`Failed to request screenshot upload URL: ${i.status}`);return await i.json()}async uploadScreenshot(t,n){const i=await fetch(t,{method:"PUT",body:n,headers:{"Content-Type":"image/jpeg"}});if(!i.ok)throw new Error(`Failed to upload screenshot: ${i.status}`)}async confirmScreenshotUpload(t){const n=await ui(`${this.getBaseUrl()}${ci.CONFIRM_UPLOAD(t)}`,{method:"POST",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to confirm screenshot upload: ${n.status}`)}async getInterviewTranscription(t){const n=await ui(`${this.getBaseUrl()}${ci.TRANSCRIPTION(t)}`,{method:"GET",headers:{...this.getHeaders(),"x-auth-token":"interview-engine-api-key"}});if(!n.ok)throw new Error(`Failed to get interview transcription: ${n.status}`);return await n.json()}}const j6=new f1,M6=({gazeAnalysisEnabled:e,isModelLoaded:t,stats:n,statusMessage:i,loadingProgress:a})=>u.jsx("div",{className:"iw-w-full",children:u.jsxs("div",{className:"iw-border-strock iw-rounded-md iw-border iw-bg-gray-50 iw-p-4",children:[u.jsxs("h3",{className:"iw-m-0 iw-mb-2.5",children:["Status: ",i]}),a>0&&a<100&&u.jsxs("div",{className:"iw-mb-2.5",children:[u.jsx("div",{className:"iw-h-2 iw-w-full iw-rounded iw-bg-gray-300",children:u.jsx("div",{className:"iw-h-full iw-rounded iw-bg-blue-600 iw-transition-all iw-duration-300 iw-ease-out",style:{width:`${a}%`}})}),u.jsxs("small",{className:"iw-text-gray-600",children:["Loading model... ",a.toFixed(1),"%"]})]}),u.jsxs("div",{className:"iw-grid iw-grid-cols-2 iw-gap-2.5 iw-text-sm",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"FPS:"})," ",u.jsx("span",{className:n.fps<15?"iw-text-red-600":n.fps<25?"iw-text-orange-500":"iw-text-green-600",children:n.fps})]}),u.jsxs("div",{children:[u.jsx("strong",{children:"Model:"})," ",t?"✓ Loaded":"✗ Loading"]}),e&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{children:[u.jsx("strong",{children:"Engagement:"})," ",n.engagement.toFixed(1),"%"]}),u.jsxs("div",{children:[u.jsx("strong",{children:"Looking:"})," ",u.jsx("span",{className:n.isLookingAway?"iw-text-red-600":"iw-text-green-600",children:n.isLookingAway?"Away":"At Screen"})]})]})]}),n.referenceFaceNotDetected&&u.jsxs("div",{className:"iw-text-gray-dark iw-mt-2.5 iw-w-full iw-rounded-md iw-bg-[#ffeb3b] iw-p-2.5 iw-text-sm",children:[u.jsx("strong",{children:"Reference Face Not Detected"}),u.jsx("br",{}),"The previously set reference face is no longer in view."]}),n.multipleFacesDetected&&u.jsxs("div",{className:"iw-mt-2.5 iw-rounded iw-bg-red-50 iw-p-2.5 iw-text-sm iw-text-red-700",children:[u.jsx("strong",{children:"Multiple Faces Detected"}),u.jsx("br",{}),"Please ensure only one person is in the frame."]}),!e&&u.jsxs("div",{className:"iw-mt-2.5 iw-rounded iw-bg-blue-50 iw-p-2.5 iw-text-sm iw-text-blue-700",children:[u.jsx("strong",{children:"Gaze Analysis Disabled"}),u.jsx("br",{}),"Enable to track engagement and attention levels."]})]})}),C6=({showControls:e,isBubbleOpen:t,setIsBubbleOpen:n,setReference:i,clearCache:a,isModelLoaded:l,gazeAnalysisEnabled:s,referenceSet:r,showLandmarks:o,setShowLandmarks:c,showEngagementBar:f,setShowEngagementBar:h,handleToggleGazeAnalysis:d,stats:m,statusMessage:v,loadingProgress:x})=>e?u.jsxs(u.Fragment,{children:[u.jsx("button",{onClick:()=>n(!t),className:"iw-absolute iw-right-4 iw-bottom-4 iw-z-10 iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-full iw-text-white",children:u.jsx(d6,{className:"iw-size-4.5"})}),t&&u.jsxs("div",{className:"iw-absolute iw-right-4 iw-bottom-16 iw-z-10 iw-max-h-96 iw-w-80 iw-overflow-y-auto iw-rounded-md iw-bg-gray-50 iw-p-4 iw-shadow-lg",children:[u.jsx("h4",{className:"m-0 mb-2.5",children:"Controls"}),u.jsx("button",{onClick:i,disabled:!l||!s,className:`iw-mb-2.5 iw-block iw-w-full iw-rounded border-none iw-px-4 iw-py-2 iw-text-sm iw-text-white ${!l||!s?"iw-cursor-not-allowed iw-bg-gray-400":"iw-cursor-pointer iw-bg-blue-600 hover:iw-bg-blue-700"}`,children:r?"Reference Set ✓":"Set Reference"}),u.jsx("button",{onClick:a,className:"iw-mb-4 iw-block iw-w-full iw-cursor-pointer iw-rounded iw-border-none iw-bg-red-600 iw-px-4 iw-py-2 iw-text-sm iw-text-white hover:iw-bg-red-700",children:"Clear Model Cache"}),u.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-2.5",children:[u.jsxs("label",{className:"iw-flex iw-cursor-pointer iw-items-center iw-gap-2",children:[u.jsx("input",{type:"checkbox",checked:s,onChange:E=>d(E.target.checked)}),u.jsx("strong",{children:"Enable Gaze Analysis"})]}),u.jsxs("label",{className:`iw-flex iw-cursor-pointer iw-items-center iw-gap-2 ${s?"iw-opacity-100":"iw-opacity-60"}`,children:[u.jsx("input",{type:"checkbox",checked:o,onChange:E=>c(E.target.checked),disabled:!s}),"Show Landmarks"]}),u.jsxs("label",{className:`iw-flex iw-cursor-pointer iw-items-center iw-gap-2 ${s?"iw-opacity-100":"iw-opacity-60"}`,children:[u.jsx("input",{type:"checkbox",checked:f,onChange:E=>h(E.target.checked),disabled:!s}),"Show Engagement Bar"]})]}),r&&u.jsx(M6,{gazeAnalysisEnabled:s,isModelLoaded:l,loadingProgress:x,stats:m,statusMessage:v})]})]}):null;var Oa=typeof self<"u"?self:{};function ns(e,t){e:{for(var n=["CLOSURE_FLAGS"],i=Oa,a=0;a<n.length;a++)if((i=i[n[a]])==null){n=null;break e}n=i}return(e=n&&n[e])!=null?e:t}function Ki(){throw Error("Invalid UTF8")}function d1(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}let jr,Wo;const D6=typeof TextDecoder<"u";let O6;const z6=typeof TextEncoder<"u";function h1(e){if(z6)e=(O6||(O6=new TextEncoder)).encode(e);else{let n=0;const i=new Uint8Array(3*e.length);for(let a=0;a<e.length;a++){var t=e.charCodeAt(a);if(t<128)i[n++]=t;else{if(t<2048)i[n++]=t>>6|192;else{if(t>=55296&&t<=57343){if(t<=56319&&a<e.length){const l=e.charCodeAt(++a);if(l>=56320&&l<=57343){t=1024*(t-55296)+l-56320+65536,i[n++]=t>>18|240,i[n++]=t>>12&63|128,i[n++]=t>>6&63|128,i[n++]=63&t|128;continue}a--}t=65533}i[n++]=t>>12|224,i[n++]=t>>6&63|128}i[n++]=63&t|128}}e=n===i.length?i:i.subarray(0,n)}return e}function m1(e){Oa.setTimeout(()=>{throw e},0)}var Po,k6=ns(610401301,!1),g1=ns(748402147,!0),$o=ns(824648567,!0),ec=ns(824656860,ns(1,!0));function w1(){var e=Oa.navigator;return e&&(e=e.userAgent)?e:""}const y1=Oa.navigator;function Mr(e){return Mr[" "](e),e}Po=y1&&y1.userAgentData||null,Mr[" "]=function(){};const p1={};let is=null;function L6(e){const t=e.length;let n=3*t/4;n%3?n=Math.floor(n):"=.".indexOf(e[t-1])!=-1&&(n="=.".indexOf(e[t-2])!=-1?n-2:n-1);const i=new Uint8Array(n);let a=0;return function(l,s){function r(c){for(;o<l.length;){const f=l.charAt(o++),h=is[f];if(h!=null)return h;if(!/^[\s\xa0]*$/.test(f))throw Error("Unknown base64 encoding at char: "+f)}return c}v1();let o=0;for(;;){const c=r(-1),f=r(0),h=r(64),d=r(64);if(d===64&&c===-1)break;s(c<<2|f>>4),h!=64&&(s(f<<4&240|h>>2),d!=64&&s(h<<6&192|d))}}(e,function(l){i[a++]=l}),a!==n?i.subarray(0,a):i}function v1(){if(!is){is={};var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const i=e.concat(t[n].split(""));p1[n]=i;for(let a=0;a<i.length;a++){const l=i[a];is[l]===void 0&&(is[l]=a)}}}}var U6=typeof Uint8Array<"u",b1=!(!(k6&&Po&&Po.brands.length>0)&&(w1().indexOf("Trident")!=-1||w1().indexOf("MSIE")!=-1))&&typeof btoa=="function";const x1=/[-_.]/g,B6={"-":"+",_:"/",".":"="};function R6(e){return B6[e]||""}function S1(e){if(!b1)return L6(e);e=x1.test(e)?e.replace(x1,R6):e,e=atob(e);const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function tc(e){return U6&&e!=null&&e instanceof Uint8Array}var za={};function Ii(){return G6||(G6=new Sn(null,za))}function nc(e){E1(za);var t=e.g;return(t=t==null||tc(t)?t:typeof t=="string"?S1(t):null)==null?t:e.g=t}var Sn=class{h(){return new Uint8Array(nc(this)||0)}constructor(e,t){if(E1(t),this.g=e,e!=null&&e.length===0)throw Error("ByteString should be constructed with non-empty values")}};let G6,H6;function E1(e){if(e!==za)throw Error("illegal external caller")}function _1(e,t){e.__closure__error__context__984382||(e.__closure__error__context__984382={}),e.__closure__error__context__984382.severity=t}function ic(e){return _1(e=Error(e),"warning"),e}function ka(e,t){if(e!=null){var n=H6??(H6={}),i=n[e]||0;i>=t||(n[e]=i+1,_1(e=Error(),"incident"),m1(e))}}function La(){return typeof BigInt=="function"}var Ua=typeof Symbol=="function"&&typeof Symbol()=="symbol";function En(e,t,n=!1){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?n&&Symbol.for&&e?Symbol.for(e):e!=null?Symbol(e):Symbol():t}var V6=En("jas",void 0,!0),T1=En(void 0,"0di"),as=En(void 0,"1oa"),Et=En(void 0,Symbol()),q6=En(void 0,"0ub"),F6=En(void 0,"0ubs"),ac=En(void 0,"0ubsb"),Y6=En(void 0,"0actk"),Ba=En("m_m","Pa",!0),A1=En();const N1={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},j1=Object.defineProperties,O=Ua?V6:"Ga";var Ji;const M1=[];function ls(e,t){Ua||O in e||j1(e,N1),e[O]|=t}function Ge(e,t){Ua||O in e||j1(e,N1),e[O]=t}function ss(e){return ls(e,34),e}function rs(e){return ls(e,8192),e}Ge(M1,7),Ji=Object.freeze(M1);var Ra={};function _t(e,t){return t===void 0?e.h!==Wi&&!!(2&(0|e.v[O])):!!(2&t)&&e.h!==Wi}const Wi={};function lc(e,t){if(e!=null){if(typeof e=="string")e=e?new Sn(e,za):Ii();else if(e.constructor!==Sn)if(tc(e))e=e.length?new Sn(new Uint8Array(e),za):Ii();else{if(!t)throw Error();e=void 0}}return e}class C1{constructor(t,n,i){this.g=t,this.h=n,this.l=i}next(){const t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}var X6=Object.freeze({});function D1(e,t,n){const i=128&t?0:-1,a=e.length;var l;(l=!!a)&&(l=(l=e[a-1])!=null&&typeof l=="object"&&l.constructor===Object);const s=a+(l?-1:0);for(t=128&t?1:0;t<s;t++)n(t-i,e[t]);if(l){e=e[a-1];for(const r in e)!isNaN(r)&&n(+r,e[r])}}var O1={};function Ga(e){return 128&e?O1:void 0}function Cr(e){return e.Na=!0,e}var Q6=Cr(e=>typeof e=="number"),z1=Cr(e=>typeof e=="string"),Z6=Cr(e=>typeof e=="boolean"),Dr=typeof Oa.BigInt=="function"&&typeof Oa.BigInt(0)=="bigint";function Tt(e){var t=e;if(z1(t)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t))throw Error(String(t))}else if(Q6(t)&&!Number.isSafeInteger(t))throw Error(String(t));return Dr?BigInt(e):e=Z6(e)?e?"1":"0":z1(e)?e.trim()||"0":String(e)}var sc=Cr(e=>Dr?e>=I6&&e<=W6:e[0]==="-"?k1(e,K6):k1(e,J6));const K6=Number.MIN_SAFE_INTEGER.toString(),I6=Dr?BigInt(Number.MIN_SAFE_INTEGER):void 0,J6=Number.MAX_SAFE_INTEGER.toString(),W6=Dr?BigInt(Number.MAX_SAFE_INTEGER):void 0;function k1(e,t){if(e.length>t.length)return!1;if(e.length<t.length||e===t)return!0;for(let n=0;n<e.length;n++){const i=e[n],a=t[n];if(i>a)return!1;if(i<a)return!0}}const P6=typeof Uint8Array.prototype.slice=="function";let $6,we=0,De=0;function L1(e){const t=e>>>0;we=t,De=(e-t)/4294967296>>>0}function Ha(e){if(e<0){L1(-e);const[t,n]=fc(we,De);we=t>>>0,De=n>>>0}else L1(e)}function rc(e){const t=$6||($6=new DataView(new ArrayBuffer(8)));t.setFloat32(0,+e,!0),De=0,we=t.getUint32(0,!0)}function uc(e,t){const n=4294967296*t+(e>>>0);return Number.isSafeInteger(n)?n:us(e,t)}function e5(e,t){return Tt(La()?BigInt.asUintN(64,(BigInt(t>>>0)<<BigInt(32))+BigInt(e>>>0)):us(e,t))}function oc(e,t){const n=2147483648&t;return n&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),typeof(e=uc(e,t))=="number"?n?-e:e:n?"-"+e:e}function U1(e,t){return La()?Tt(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(t))<<BigInt(32))+BigInt.asUintN(32,BigInt(e)))):Tt(cc(e,t))}function us(e,t){if(e>>>=0,(t>>>=0)<=2097151)var n=""+(4294967296*t+e);else La()?n=""+(BigInt(t)<<BigInt(32)|BigInt(e)):(e=(16777215&e)+6777216*(n=16777215&(e>>>24|t<<8))+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,e>=1e7&&(n+=e/1e7>>>0,e%=1e7),n>=1e7&&(t+=n/1e7>>>0,n%=1e7),n=t+B1(n)+B1(e));return n}function B1(e){return e=String(e),"0000000".slice(e.length)+e}function cc(e,t){if(2147483648&t)if(La())e=""+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{const[n,i]=fc(e,t);e="-"+us(n,i)}else e=us(e,t);return e}function Or(e){if(e.length<16)Ha(Number(e));else if(La())e=BigInt(e),we=Number(e&BigInt(4294967295))>>>0,De=Number(e>>BigInt(32)&BigInt(4294967295));else{const t=+(e[0]==="-");De=we=0;const n=e.length;for(let i=t,a=(n-t)%6+t;a<=n;i=a,a+=6){const l=Number(e.slice(i,a));De*=1e6,we=1e6*we+l,we>=4294967296&&(De+=Math.trunc(we/4294967296),De>>>=0,we>>>=0)}if(t){const[i,a]=fc(we,De);we=i,De=a}}}function fc(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}function hn(e){return Array.prototype.slice.call(e)}const os=typeof BigInt=="function"?BigInt.asIntN:void 0,t5=typeof BigInt=="function"?BigInt.asUintN:void 0,Pi=Number.isSafeInteger,zr=Number.isFinite,Va=Math.trunc,n5=Tt(0);function cs(e){if(e!=null&&typeof e!="number")throw Error(`Value of float/double field must be a number, found ${typeof e}: ${e}`);return e}function _n(e){return e==null||typeof e=="number"?e:e==="NaN"||e==="Infinity"||e==="-Infinity"?Number(e):void 0}function fs(e){if(e!=null&&typeof e!="boolean"){var t=typeof e;throw Error(`Expected boolean but got ${t!="object"?t:e?Array.isArray(e)?"array":t:"null"}: ${e}`)}return e}function R1(e){return e==null||typeof e=="boolean"?e:typeof e=="number"?!!e:void 0}const i5=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function ds(e){switch(typeof e){case"bigint":return!0;case"number":return zr(e);case"string":return i5.test(e);default:return!1}}function qa(e){if(e==null)return e;if(typeof e=="string"&&e)e=+e;else if(typeof e!="number")return;return zr(e)?0|e:void 0}function G1(e){if(e==null)return e;if(typeof e=="string"&&e)e=+e;else if(typeof e!="number")return;return zr(e)?e>>>0:void 0}function H1(e){const t=e.length;return(e[0]==="-"?t<20||t===20&&e<="-9223372036854775808":t<19||t===19&&e<="9223372036854775807")?e:(Or(e),cc(we,De))}function dc(e){return e=Va(e),Pi(e)||(Ha(e),e=oc(we,De)),e}function V1(e){var t=Va(Number(e));return Pi(t)?String(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),H1(e))}function q1(e){var t=Va(Number(e));return Pi(t)?Tt(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),La()?Tt(os(64,BigInt(e))):Tt(H1(e)))}function F1(e){return Pi(e)?e=Tt(dc(e)):(e=Va(e),Pi(e)?e=String(e):(Ha(e),e=cc(we,De)),e=Tt(e)),e}function a5(e){return e==null?e:typeof e=="bigint"?(sc(e)?e=Number(e):(e=os(64,e),e=sc(e)?Number(e):String(e)),e):ds(e)?typeof e=="number"?dc(e):V1(e):void 0}function kr(e){const t=typeof e;return e==null?e:t==="bigint"?Tt(os(64,e)):ds(e)?t==="string"?q1(e):F1(e):void 0}function Y1(e){if(typeof e!="string")throw Error();return e}function hs(e){if(e!=null&&typeof e!="string")throw Error();return e}function We(e){return e==null||typeof e=="string"?e:void 0}function hc(e,t,n,i){return e!=null&&e[Ba]===Ra?e:Array.isArray(e)?((i=(n=0|e[O])|32&i|2&i)!==n&&Ge(e,i),new t(e)):(n?2&i?((e=t[T1])||(ss((e=new t).v),e=t[T1]=e),t=e):t=new t:t=void 0,t)}function l5(e,t,n){if(t)e:{if(!ds(t=e))throw ic("int64");switch(typeof t){case"string":t=q1(t);break e;case"bigint":t=Tt(os(64,t));break e;default:t=F1(t)}}else t=kr(e);return(e=t)==null?n?n5:void 0:e}const s5={};let r5=function(){try{return Mr(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class mc{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,n){return this.g.set(t,n),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,n){return this.g.forEach(t,n)}[Symbol.iterator](){return this.entries()}}const u5=r5?(Object.setPrototypeOf(mc.prototype,Map.prototype),Object.defineProperties(mc.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),mc):class extends Map{constructor(){super()}};function X1(e){return e}function gc(e){if(2&e.J)throw Error("Cannot mutate an immutable Map")}var Bn=class extends u5{constructor(e,t,n=X1,i=X1){super(),this.J=0|e[O],this.K=t,this.S=n,this.fa=this.K?o5:i;for(let a=0;a<e.length;a++){const l=e[a],s=n(l[0],!1,!0);let r=l[1];t?r===void 0&&(r=null):r=i(l[1],!1,!0,void 0,void 0,this.J),super.set(s,r)}}V(e){return rs(Array.from(super.entries(),e))}clear(){gc(this),super.clear()}delete(e){return gc(this),super.delete(this.S(e,!0,!1))}entries(){if(this.K){var e=super.keys();e=new C1(e,c5,this)}else e=super.entries();return e}values(){if(this.K){var e=super.keys();e=new C1(e,Bn.prototype.get,this)}else e=super.values();return e}forEach(e,t){this.K?super.forEach((n,i,a)=>{e.call(t,a.get(i),i,a)}):super.forEach(e,t)}set(e,t){return gc(this),(e=this.S(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.fa(t,!0,!0,this.K,!1,this.J))}Ma(e){const t=this.S(e[0],!1,!0);e=e[1],e=this.K?e===void 0?null:e:this.fa(e,!1,!0,void 0,!1,this.J),super.set(t,e)}has(e){return super.has(this.S(e,!1,!1))}get(e){e=this.S(e,!1,!1);const t=super.get(e);if(t!==void 0){var n=this.K;return n?((n=this.fa(t,!1,!0,n,this.ra,this.J))!==t&&super.set(e,n),n):t}}[Symbol.iterator](){return this.entries()}};function o5(e,t,n,i,a,l){return e=hc(e,i,n,l),a&&(e=pc(e)),e}function c5(e){return[e,this.get(e)]}let f5;function Q1(){return f5||(f5=new Bn(ss([]),void 0,void 0,void 0,s5))}function Lr(e){return Et?e[Et]:void 0}function Ur(e,t){for(const n in e)!isNaN(n)&&t(e,+n,e[n])}Bn.prototype.toJSON=void 0;var wc=class{};const d5={Ka:!0};function h5(e,t){t<100||ka(F6,1)}function Br(e,t,n,i){const a=i!==void 0;i=!!i;var l,s=Et;!a&&Ua&&s&&(l=e[s])&&Ur(l,h5),s=[];var r=e.length;let o;l=4294967295;let c=!1;const f=!!(64&t),h=f?128&t?0:-1:void 0;1&t||(o=r&&e[r-1],o!=null&&typeof o=="object"&&o.constructor===Object?l=--r:o=void 0,!f||128&t||a||(c=!0,l=l-h+h)),t=void 0;for(var d=0;d<r;d++){let m=e[d];if(m!=null&&(m=n(m,i))!=null)if(f&&d>=l){const v=d-h;(t??(t={}))[v]=m}else s[d]=m}if(o)for(let m in o){if((r=o[m])==null||(r=n(r,i))==null)continue;let v;d=+m,f&&!Number.isNaN(d)&&(v=d+h)<l?s[v]=r:(t??(t={}))[m]=r}return t&&(c?s.push(t):s[l]=t),a&&Et&&(e=Lr(e))&&e instanceof wc&&(s[Et]=function(m){const v=new wc;return Ur(m,(x,E,g)=>{v[E]=hn(g)}),v.da=m.da,v}(e)),s}function m5(e){return e[0]=ms(e[0]),e[1]=ms(e[1]),e}function ms(e){switch(typeof e){case"number":return Number.isFinite(e)?e:""+e;case"bigint":return sc(e)?Number(e):""+e;case"boolean":return e?1:0;case"object":if(Array.isArray(e)){var t=0|e[O];return e.length===0&&1&t?void 0:Br(e,t,ms)}if(e!=null&&e[Ba]===Ra)return Z1(e);if(e instanceof Sn){if((t=e.g)==null)e="";else if(typeof t=="string")e=t;else{if(b1){for(var n="",i=0,a=t.length-10240;i<a;)n+=String.fromCharCode.apply(null,t.subarray(i,i+=10240));n+=String.fromCharCode.apply(null,i?t.subarray(i):t),t=btoa(n)}else{n===void 0&&(n=0),v1(),n=p1[n],i=Array(Math.floor(t.length/3)),a=n[64]||"";let c=0,f=0;for(;c<t.length-2;c+=3){var l=t[c],s=t[c+1],r=t[c+2],o=n[l>>2];l=n[(3&l)<<4|s>>4],s=n[(15&s)<<2|r>>6],r=n[63&r],i[f++]=o+l+s+r}switch(o=0,r=a,t.length-c){case 2:r=n[(15&(o=t[c+1]))<<2]||a;case 1:t=t[c],i[f]=n[t>>2]+n[(3&t)<<4|o>>4]+r+a}t=i.join("")}e=e.g=t}return e}return e instanceof Bn?e=e.size!==0?e.V(m5):void 0:void 0}return e}function Z1(e){return Br(e=e.v,0|e[O],ms)}let g5,w5;function $i(e,t){return K1(e,t[0],t[1])}function K1(e,t,n,i=0){if(e==null){var a=32;n?(e=[n],a|=128):e=[],t&&(a=-16760833&a|(1023&t)<<14)}else{if(!Array.isArray(e))throw Error("narr");if(a=0|e[O],g1&&1&a)throw Error("rfarr");if(2048&a&&!(2&a)&&function(){if(g1)throw Error("carr");ka(Y6,5)}(),256&a)throw Error("farr");if(64&a)return(a|i)!==a&&Ge(e,a|i),e;if(n&&(a|=128,n!==e[0]))throw Error("mid");e:{a|=64;var l=(n=e).length;if(l){var s=l-1;const o=n[s];if(o!=null&&typeof o=="object"&&o.constructor===Object){if((s-=t=128&a?0:-1)>=1024)throw Error("pvtlmt");for(var r in o)(l=+r)<s&&(n[l+t]=o[r],delete o[r]);a=-16760833&a|(1023&s)<<14;break e}}if(t){if((r=Math.max(t,l-(128&a?0:-1)))>1024)throw Error("spvt");a=-16760833&a|(1023&r)<<14}}}return Ge(e,64|a|i),e}function y5(e,t){if(typeof e!="object")return e;if(Array.isArray(e)){var n=0|e[O];return e.length===0&&1&n?void 0:I1(e,n,t)}if(e!=null&&e[Ba]===Ra)return J1(e);if(e instanceof Bn){if(2&(t=e.J))return e;if(!e.size)return;if(n=ss(e.V()),e.K)for(e=0;e<n.length;e++){const i=n[e];let a=i[1];a=a==null||typeof a!="object"?void 0:a!=null&&a[Ba]===Ra?J1(a):Array.isArray(a)?I1(a,0|a[O],!!(32&t)):void 0,i[1]=a}return n}return e instanceof Sn?e:void 0}function I1(e,t,n){return 2&t||(!n||4096&t||16&t?e=Fa(e,t,!1,n&&!(16&t)):(ls(e,34),4&t&&Object.freeze(e))),e}function yc(e,t,n){return e=new e.constructor(t),n&&(e.h=Wi),e.m=Wi,e}function J1(e){const t=e.v,n=0|t[O];return _t(e,n)?e:vc(e,t,n)?yc(e,t):Fa(t,n)}function Fa(e,t,n,i){return i??(i=!!(34&t)),e=Br(e,t,y5,i),i=32,n&&(i|=2),Ge(e,t=16769217&t|i),e}function pc(e){const t=e.v,n=0|t[O];return _t(e,n)?vc(e,t,n)?yc(e,t,!0):new e.constructor(Fa(t,n,!1)):e}function Ya(e){if(e.h!==Wi)return!1;var t=e.v;return ls(t=Fa(t,0|t[O]),2048),e.v=t,e.h=void 0,e.m=void 0,!0}function Xa(e){if(!Ya(e)&&_t(e,0|e.v[O]))throw Error()}function ea(e,t){t===void 0&&(t=0|e[O]),32&t&&!(4096&t)&&Ge(e,4096|t)}function vc(e,t,n){return!!(2&n)||!(!(32&n)||4096&n)&&(Ge(t,2|n),e.h=Wi,!0)}const p5=Tt(0),fi={};function de(e,t,n,i,a){if((t=Rn(e.v,t,n,a))!==null||i&&e.m!==Wi)return t}function Rn(e,t,n,i){if(t===-1)return null;const a=t+(n?0:-1),l=e.length-1;let s,r;if(!(l<1+(n?0:-1))){if(a>=l)if(s=e[l],s!=null&&typeof s=="object"&&s.constructor===Object)n=s[t],r=!0;else{if(a!==l)return;n=s}else n=e[a];if(i&&n!=null){if((i=i(n))==null)return i;if(!Object.is(i,n))return r?s[t]=i:e[a]=i,i}return n}}function ne(e,t,n,i){Xa(e),He(e=e.v,0|e[O],t,n,i)}function He(e,t,n,i,a){const l=n+(a?0:-1);var s=e.length-1;if(s>=1+(a?0:-1)&&l>=s){const r=e[s];if(r!=null&&typeof r=="object"&&r.constructor===Object)return r[n]=i,t}return l<=s?(e[l]=i,t):(i!==void 0&&(n>=(s=(t??(t=0|e[O]))>>14&1023||536870912)?i!=null&&(e[s+(a?0:-1)]={[n]:i}):e[l]=i),t)}function ta(){return X6===void 0?2:4}function na(e,t,n,i,a){let l=e.v,s=0|l[O];i=_t(e,s)?1:i,a=!!a||i===3,i===2&&Ya(e)&&(l=e.v,s=0|l[O]);let r=(e=bc(l,t))===Ji?7:0|e[O],o=xc(r,s);var c=!(4&o);if(c){4&o&&(e=hn(e),r=0,o=aa(o,s),s=He(l,s,t,e));let f=0,h=0;for(;f<e.length;f++){const d=n(e[f]);d!=null&&(e[h++]=d)}h<f&&(e.length=h),n=-513&(4|o),o=n&=-1025,o&=-4097}return o!==r&&(Ge(e,o),2&o&&Object.freeze(e)),W1(e,o,l,s,t,i,c,a)}function W1(e,t,n,i,a,l,s,r){let o=t;return l===1||l===4&&(2&t||!(16&t)&&32&i)?ia(t)||((t|=!e.length||s&&!(4096&t)||32&i&&!(4096&t||16&t)?2:256)!==o&&Ge(e,t),Object.freeze(e)):(l===2&&ia(t)&&(e=hn(e),o=0,t=aa(t,i),i=He(n,i,a,e)),ia(t)||(r||(t|=16),t!==o&&Ge(e,t))),2&t||!(4096&t||16&t)||ea(n,i),e}function bc(e,t,n){return e=Rn(e,t,n),Array.isArray(e)?e:Ji}function xc(e,t){return 2&t&&(e|=2),1|e}function ia(e){return!!(2&e)&&!!(4&e)||!!(256&e)}function P1(e){return lc(e,!0)}function $1(e){e=hn(e);for(let t=0;t<e.length;t++){const n=e[t]=hn(e[t]);Array.isArray(n[1])&&(n[1]=ss(n[1]))}return rs(e)}function di(e,t,n,i){Xa(e),He(e=e.v,0|e[O],t,(i==="0"?Number(n)===0:n===i)?void 0:n)}function Qa(e,t,n){if(2&t)throw Error();const i=Ga(t);let a=bc(e,n,i),l=a===Ji?7:0|a[O],s=xc(l,t);return(2&s||ia(s)||16&s)&&(s===l||ia(s)||Ge(a,s),a=hn(a),l=0,s=aa(s,t),He(e,t,n,a,i)),s&=-13,s!==l&&Ge(a,s),a}function Sc(e,t){var n=l0;return _c(Ec(e=e.v),e,void 0,n)===t?t:-1}function Ec(e){if(Ua)return e[as]??(e[as]=new Map);if(as in e)return e[as];const t=new Map;return Object.defineProperty(e,as,{value:t}),t}function eh(e,t,n,i,a){const l=Ec(e),s=_c(l,e,t,n,a);return s!==i&&(s&&(t=He(e,t,s,void 0,a)),l.set(n,i)),t}function _c(e,t,n,i,a){let l=e.get(i);if(l!=null)return l;l=0;for(let s=0;s<i.length;s++){const r=i[s];Rn(t,r,a)!=null&&(l!==0&&(n=He(t,n,l,void 0,a)),l=r)}return e.set(i,l),l}function Tc(e,t,n){let i=0|e[O];const a=Ga(i),l=Rn(e,n,a);let s;if(l!=null&&l[Ba]===Ra){if(!_t(l))return Ya(l),l.v;s=l.v}else Array.isArray(l)&&(s=l);if(s){const r=0|s[O];2&r&&(s=Fa(s,r))}return s=$i(s,t),s!==l&&He(e,i,n,s,a),s}function th(e,t,n,i,a){let l=!1;if((i=Rn(e,i,a,s=>{const r=hc(s,n,!1,t);return l=r!==s&&r!=null,r}))!=null)return l&&!_t(i)&&ea(e,t),i}function I(e,t,n,i){let a=e.v,l=0|a[O];if((t=th(a,l,t,n,i))==null)return t;if(l=0|a[O],!_t(e,l)){const s=pc(t);s!==t&&(Ya(e)&&(a=e.v,l=0|a[O]),l=He(a,l,n,t=s,i),ea(a,l))}return t}function nh(e,t,n,i,a,l,s,r){var o=_t(e,n);l=o?1:l,s=!!s||l===3,o=r&&!o,(l===2||o)&&Ya(e)&&(n=0|(t=e.v)[O]);var c=(e=bc(t,a))===Ji?7:0|e[O],f=xc(c,n);if(r=!(4&f)){var h=e,d=n;const m=!!(2&f);m&&(d|=2);let v=!m,x=!0,E=0,g=0;for(;E<h.length;E++){const w=hc(h[E],i,!1,d);if(w instanceof i){if(!m){const p=_t(w);v&&(v=!p),x&&(x=p)}h[g++]=w}}g<E&&(h.length=g),f|=4,f=x?-4097&f:4096|f,f=v?8|f:-9&f}if(f!==c&&(Ge(e,f),2&f&&Object.freeze(e)),o&&!(8&f||!e.length&&(l===1||l===4&&(2&f||!(16&f)&&32&n)))){for(ia(f)&&(e=hn(e),f=aa(f,n),n=He(t,n,a,e)),i=e,o=f,c=0;c<i.length;c++)(h=i[c])!==(f=pc(h))&&(i[c]=f);o|=8,Ge(e,f=o=i.length?4096|o:-4097&o)}return W1(e,f,t,n,a,l,r,s)}function Gn(e,t,n){const i=e.v;return nh(e,i,0|i[O],t,n,ta(),!1,!0)}function ih(e){return e==null&&(e=void 0),e}function U(e,t,n,i,a){return ne(e,n,i=ih(i),a),i&&!_t(i)&&ea(e.v),e}function gs(e,t,n,i){e:{var a=i=ih(i);Xa(e);const l=e.v;let s=0|l[O];if(a==null){const r=Ec(l);if(_c(r,l,s,n)!==t)break e;r.set(n,0)}else s=eh(l,s,n,t);He(l,s,t,a)}i&&!_t(i)&&ea(e.v)}function aa(e,t){return-273&(2&t?2|e:-3&e)}function Ac(e,t,n,i){var a=i;Xa(e),e=nh(e,i=e.v,0|i[O],n,t,2,!0),a=a??new n,e.push(a),t=n=e===Ji?7:0|e[O],(a=_t(a))?(n&=-9,e.length===1&&(n&=-4097)):n|=4096,n!==t&&Ge(e,n),a||ea(i)}function Zt(e,t,n){return qa(de(e,t,void 0,n))}function ah(e){return(ec?de(e,2,void 0,void 0,kr):kr(de(e,2)))??p5}function Te(e,t){return de(e,t,void 0,void 0,_n)??0}function Hn(e,t,n){if(n!=null){if(typeof n!="number"||!zr(n))throw ic("int32");n|=0}ne(e,t,n)}function L(e,t,n){ne(e,t,cs(n))}function At(e,t,n){di(e,t,hs(n),"")}function Rr(e,t,n){{Xa(e);const s=e.v;let r=0|s[O];if(n==null)He(s,r,t);else{var i=e=n===Ji?7:0|n[O],a=ia(e),l=a||Object.isFrozen(n);for(a||(e=0),l||(n=hn(n),i=0,e=aa(e,r),l=!1),e|=5,e|=(4&e?512&e?512:1024&e?1024:0:void 0)??(ec?1024:0),a=0;a<n.length;a++){const o=n[a],c=Y1(o);Object.is(o,c)||(l&&(n=hn(n),i=0,e=aa(e,r),l=!1),n[a]=c)}e!==i&&(l&&(n=hn(n),e=aa(e,r)),Ge(n,e)),He(s,r,t,n)}}}function Gr(e,t,n){Xa(e),na(e,t,We,2,!0).push(Y1(n))}var Za=class{constructor(e,t,n){if(this.buffer=e,n&&!t)throw Error();this.g=t}};function Nc(e,t){if(typeof e=="string")return new Za(S1(e),t);if(Array.isArray(e))return new Za(new Uint8Array(e),t);if(e.constructor===Uint8Array)return new Za(e,!1);if(e.constructor===ArrayBuffer)return e=new Uint8Array(e),new Za(e,!1);if(e.constructor===Sn)return t=nc(e)||new Uint8Array(0),new Za(t,!0,e);if(e instanceof Uint8Array)return e=e.constructor===Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Za(e,!1);throw Error()}function Ka(e,t){let n,i=0,a=0,l=0;const s=e.h;let r=e.g;do n=s[r++],i|=(127&n)<<l,l+=7;while(l<32&&128&n);if(l>32)for(a|=(127&n)>>4,l=3;l<32&&128&n;l+=7)n=s[r++],a|=(127&n)<<l;if(la(e,r),!(128&n))return t(i>>>0,a>>>0);throw Error()}function jc(e){let t=0,n=e.g;const i=n+10,a=e.h;for(;n<i;){const l=a[n++];if(t|=l,(128&l)==0)return la(e,n),!!(127&t)}throw Error()}function hi(e){const t=e.h;let n=e.g,i=t[n++],a=127&i;if(128&i&&(i=t[n++],a|=(127&i)<<7,128&i&&(i=t[n++],a|=(127&i)<<14,128&i&&(i=t[n++],a|=(127&i)<<21,128&i&&(i=t[n++],a|=i<<28,128&i&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++])))))throw Error();return la(e,n),a}function Vn(e){return hi(e)>>>0}function Hr(e){var t=e.h;const n=e.g;var i=t[n],a=t[n+1];const l=t[n+2];return t=t[n+3],la(e,e.g+4),e=2*((a=(i<<0|a<<8|l<<16|t<<24)>>>0)>>31)+1,i=a>>>23&255,a&=8388607,i==255?a?NaN:e*(1/0):i==0?1401298464324817e-60*e*a:e*Math.pow(2,i-150)*(a+8388608)}function v5(e){return hi(e)}function la(e,t){if(e.g=t,t>e.l)throw Error()}function lh(e,t){if(t<0)throw Error();const n=e.g;if((t=n+t)>e.l)throw Error();return e.g=t,n}function sh(e,t){if(t==0)return Ii();var n=lh(e,t);return e.Y&&e.j?n=e.h.subarray(n,n+t):(e=e.h,n=n===(t=n+t)?new Uint8Array(0):P6?e.slice(n,t):new Uint8Array(e.subarray(n,t))),n.length==0?Ii():new Sn(n,za)}var rh=[];function uh(e,t,n,i){if(Fr.length){const a=Fr.pop();return a.o(i),a.g.init(e,t,n,i),a}return new b5(e,t,n,i)}function oh(e){e.g.clear(),e.l=-1,e.h=-1,Fr.length<100&&Fr.push(e)}function ch(e){var t=e.g;if(t.g==t.l)return!1;e.m=e.g.g;var n=Vn(e.g);if(t=n>>>3,!((n&=7)>=0&&n<=5)||t<1)throw Error();return e.l=t,e.h=n,!0}function Vr(e){switch(e.h){case 0:e.h!=0?Vr(e):jc(e.g);break;case 1:la(e=e.g,e.g+8);break;case 2:if(e.h!=2)Vr(e);else{var t=Vn(e.g);la(e=e.g,e.g+t)}break;case 5:la(e=e.g,e.g+4);break;case 3:for(t=e.l;;){if(!ch(e))throw Error();if(e.h==4){if(e.l!=t)throw Error();break}Vr(e)}break;default:throw Error()}}function ws(e,t,n){const i=e.g.l;var a=Vn(e.g);let l=(a=e.g.g+a)-i;if(l<=0&&(e.g.l=a,n(t,e,void 0,void 0,void 0),l=a-e.g.g),l)throw Error();return e.g.g=a,e.g.l=i,t}function Mc(e){var t=Vn(e.g),n=lh(e=e.g,t);if(e=e.h,D6){var i,a=e;(i=Wo)||(i=Wo=new TextDecoder("utf-8",{fatal:!0})),t=n+t,a=n===0&&t===a.length?a:a.subarray(n,t);try{var l=i.decode(a)}catch(r){if(jr===void 0){try{i.decode(new Uint8Array([128]))}catch{}try{i.decode(new Uint8Array([97])),jr=!0}catch{jr=!1}}throw!jr&&(Wo=void 0),r}}else{t=(l=n)+t,n=[];let r,o=null;for(;l<t;){var s=e[l++];s<128?n.push(s):s<224?l>=t?Ki():(r=e[l++],s<194||(192&r)!=128?(l--,Ki()):n.push((31&s)<<6|63&r)):s<240?l>=t-1?Ki():(r=e[l++],(192&r)!=128||s===224&&r<160||s===237&&r>=160||(192&(i=e[l++]))!=128?(l--,Ki()):n.push((15&s)<<12|(63&r)<<6|63&i)):s<=244?l>=t-2?Ki():(r=e[l++],(192&r)!=128||r-144+(s<<28)>>30||(192&(i=e[l++]))!=128||(192&(a=e[l++]))!=128?(l--,Ki()):(s=(7&s)<<18|(63&r)<<12|(63&i)<<6|63&a,s-=65536,n.push(55296+(s>>10&1023),56320+(1023&s)))):Ki(),n.length>=8192&&(o=d1(o,n),n.length=0)}l=d1(o,n)}return l}function fh(e){const t=Vn(e.g);return sh(e.g,t)}function qr(e,t,n){var i=Vn(e.g);for(i=e.g.g+i;e.g.g<i;)n.push(t(e.g))}var b5=class{constructor(e,t,n,i){if(rh.length){const a=rh.pop();a.init(e,t,n,i),e=a}else e=new class{constructor(a,l,s,r){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.init(a,l,s,r)}init(a,l,s,{Y:r=!1,ea:o=!1}={}){this.Y=r,this.ea=o,a&&(a=Nc(a,this.ea),this.h=a.buffer,this.j=a.g,this.m=l||0,this.l=s!==void 0?this.m+s:this.h.length,this.g=this.m)}clear(){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.Y=!1}}(e,t,n,i);this.g=e,this.m=this.g.g,this.h=this.l=-1,this.o(i)}o({ha:e=!1}={}){this.ha=e}},Fr=[];function dh(e){return e?/^\d+$/.test(e)?(Or(e),new Cc(we,De)):null:x5||(x5=new Cc(0,0))}var Cc=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let x5;function hh(e){return e?/^-?\d+$/.test(e)?(Or(e),new Dc(we,De)):null:S5||(S5=new Dc(0,0))}var Dc=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let S5;function Ia(e,t,n){for(;n>0||t>127;)e.g.push(127&t|128),t=(t>>>7|n<<25)>>>0,n>>>=7;e.g.push(t)}function Ja(e,t){for(;t>127;)e.g.push(127&t|128),t>>>=7;e.g.push(t)}function Yr(e,t){if(t>=0)Ja(e,t);else{for(let n=0;n<9;n++)e.g.push(127&t|128),t>>=7;e.g.push(1)}}function Oc(e){var t=we;e.g.push(t>>>0&255),e.g.push(t>>>8&255),e.g.push(t>>>16&255),e.g.push(t>>>24&255)}function Wa(e,t){t.length!==0&&(e.l.push(t),e.h+=t.length)}function Kt(e,t,n){Ja(e.g,8*t+n)}function zc(e,t){return Kt(e,t,2),t=e.g.end(),Wa(e,t),t.push(e.h),t}function kc(e,t){var n=t.pop();for(n=e.h+e.g.length()-n;n>127;)t.push(127&n|128),n>>>=7,e.h++;t.push(n),e.h++}function Xr(e,t,n){Kt(e,t,2),Ja(e.g,n.length),Wa(e,e.g.end()),Wa(e,n)}function Qr(e,t,n,i){n!=null&&(t=zc(e,t),i(n,e),kc(e,t))}function Tn(){const e=class{constructor(){throw Error()}};return Object.setPrototypeOf(e,e.prototype),e}var Lc=Tn(),mh=Tn(),Uc=Tn(),Bc=Tn(),gh=Tn(),wh=Tn(),E5=Tn(),Zr=Tn(),yh=Tn(),ph=Tn();function An(e,t,n){var i=e.v;Et&&Et in i&&(i=i[Et])&&delete i[t.g],t.h?t.j(e,t.h,t.g,n,t.l):t.j(e,t.g,n,t.l)}var z=class{constructor(e,t){this.v=K1(e,t,void 0,2048)}toJSON(){return Z1(this)}j(){var a;var e=ly,t=this.v,n=e.g,i=Et;if(Ua&&i&&((a=t[i])==null?void 0:a[n])!=null&&ka(q6,3),t=e.g,A1&&Et&&A1===void 0&&(i=(n=this.v)[Et])&&(i=i.da))try{i(n,t,d5)}catch(l){m1(l)}return e.h?e.m(this,e.h,e.g,e.l):e.m(this,e.g,e.defaultValue,e.l)}clone(){const e=this.v,t=0|e[O];return vc(this,e,t)?yc(this,e,!0):new this.constructor(Fa(e,t,!1))}};z.prototype[Ba]=Ra,z.prototype.toString=function(){return this.v.toString()};var Pa=class{constructor(e,t,n){this.g=e,this.h=t,e=Lc,this.l=!!e&&n===e||!1}};function Kr(e,t){return new Pa(e,t,Lc)}function vh(e,t,n,i,a){Qr(e,n,Th(t,i),a)}const _5=Kr(function(e,t,n,i,a){return e.h===2&&(ws(e,Tc(t,i,n),a),!0)},vh),T5=Kr(function(e,t,n,i,a){return e.h===2&&(ws(e,Tc(t,i,n),a),!0)},vh);var Ir=Symbol(),Jr=Symbol(),Rc=Symbol(),bh=Symbol(),xh=Symbol();let Sh,Eh;function sa(e,t,n,i){var a=i[e];if(a)return a;(a={}).qa=i,a.T=function(h){switch(typeof h){case"boolean":return g5||(g5=[0,void 0,!0]);case"number":return h>0?void 0:h===0?w5||(w5=[0,void 0]):[-h,void 0];case"string":return[0,h];case"object":return h}}(i[0]);var l=i[1];let s=1;l&&l.constructor===Object&&(a.ba=l,typeof(l=i[++s])=="function"&&(a.ma=!0,Sh??(Sh=l),Eh??(Eh=i[s+1]),l=i[s+=2]));const r={};for(;l&&Array.isArray(l)&&l.length&&typeof l[0]=="number"&&l[0]>0;){for(var o=0;o<l.length;o++)r[l[o]]=l;l=i[++s]}for(o=1;l!==void 0;){let h;typeof l=="number"&&(o+=l,l=i[++s]);var c=void 0;if(l instanceof Pa?h=l:(h=_5,s--),h==null?void 0:h.l){l=i[++s],c=i;var f=s;typeof l=="function"&&(l=l(),c[f]=l),c=l}for(f=o+1,typeof(l=i[++s])=="number"&&l<0&&(f-=l,l=i[++s]);o<f;o++){const d=r[o];c?n(a,o,h,c,d):t(a,o,h,d)}}return i[e]=a}function _h(e){return Array.isArray(e)?e[0]instanceof Pa?e:[T5,e]:[e,void 0]}function Th(e,t){return e instanceof z?e.v:Array.isArray(e)?$i(e,t):void 0}function Gc(e,t,n,i){const a=n.g;e[t]=i?(l,s,r)=>a(l,s,r,i):a}function Hc(e,t,n,i,a){const l=n.g;let s,r;e[t]=(o,c,f)=>l(o,c,f,r||(r=sa(Jr,Gc,Hc,i).T),s||(s=Vc(i)),a)}function Vc(e){let t=e[Rc];if(t!=null)return t;const n=sa(Jr,Gc,Hc,e);return t=n.ma?(i,a)=>Sh(i,a,n):(i,a)=>{for(;ch(a)&&a.h!=4;){var l=a.l,s=n[l];if(s==null){var r=n.ba;r&&(r=r[l])&&(r=N5(r))!=null&&(s=n[l]=r)}if(s==null||!s(a,i,l)){if(s=(r=a).m,Vr(r),r.ha)var o=void 0;else o=r.g.g-s,r.g.g=s,o=sh(r.g,o);s=void 0,r=i,o&&((s=r[Et]??(r[Et]=new wc))[l]??(s[l]=[])).push(o)}}return(i=Lr(i))&&(i.da=n.qa[xh]),!0},e[Rc]=t,e[xh]=A5.bind(e),t}function A5(e,t,n,i){var a=this[Jr];const l=this[Rc],s=$i(void 0,a.T),r=Lr(e);if(r){var o=!1,c=a.ba;if(c){if(a=(f,h,d)=>{if(d.length!==0)if(c[h])for(const m of d){f=uh(m);try{o=!0,l(s,f)}finally{oh(f)}}else i==null||i(e,h,d)},t==null)Ur(r,a);else if(r!=null){const f=r[t];f&&a(r,t,f)}if(o){let f=0|e[O];if(2&f&&2048&f&&!(n!=null&&n.Ka))throw Error();const h=Ga(f),d=(m,v)=>{if(Rn(e,m,h)!=null){if((n==null?void 0:n.Qa)===1)return;throw Error()}v!=null&&(f=He(e,f,m,v,h)),delete r[m]};t==null?D1(s,0|s[O],(m,v)=>{d(m,v)}):d(t,Rn(s,t,h))}}}}function N5(e){const t=(e=_h(e))[0].g;if(e=e[1]){const n=Vc(e),i=sa(Jr,Gc,Hc,e).T;return(a,l,s)=>t(a,l,s,i,n)}return t}function Wr(e,t,n){e[t]=n.h}function Pr(e,t,n,i){let a,l;const s=n.h;e[t]=(r,o,c)=>s(r,o,c,l||(l=sa(Ir,Wr,Pr,i).T),a||(a=Ah(i)))}function Ah(e){let t=e[bh];if(!t){const n=sa(Ir,Wr,Pr,e);t=(i,a)=>Nh(i,a,n),e[bh]=t}return t}function Nh(e,t,n){D1(e,0|e[O],(i,a)=>{if(a!=null){var l=function(s,r){var o=s[r];if(o)return o;if((o=s.ba)&&(o=o[r])){var c=(o=_h(o))[0].h;if(o=o[1]){const f=Ah(o),h=sa(Ir,Wr,Pr,o).T;o=s.ma?Eh(h,f):(d,m,v)=>c(d,m,v,h,f)}else o=c;return s[r]=o}}(n,i);l?l(t,a,i):i<500||ka(ac,3)}}),(e=Lr(e))&&Ur(e,(i,a,l)=>{for(Wa(t,t.g.end()),i=0;i<l.length;i++)Wa(t,nc(l[i])||new Uint8Array(0))})}const j5=Tt(0);function $a(e,t){if(Array.isArray(t)){var n=0|t[O];if(4&n)return t;for(var i=0,a=0;i<t.length;i++){const l=e(t[i]);l!=null&&(t[a++]=l)}return a<i&&(t.length=a),(e=-1537&(5|n))!==n&&Ge(t,e),2&e&&Object.freeze(t),t}}function lt(e,t,n){return new Pa(e,t,n)}function el(e,t,n){return new Pa(e,t,n)}function Ye(e,t,n){He(e,0|e[O],t,n,Ga(0|e[O]))}var M5=Kr(function(e,t,n,i,a){if(e.h!==2)return!1;if(e=hn(e=ws(e,$i([void 0,void 0],i),a)),a=Ga(i=0|t[O]),2&i)throw Error();let l=Rn(t,n,a);if(l instanceof Bn)2&l.J?(l=l.V(),l.push(e),He(t,i,n,l,a)):l.Ma(e);else if(Array.isArray(l)){var s=0|l[O];8192&s||Ge(l,s|=8192),2&s&&(l=$1(l),He(t,i,n,l,a)),l.push(e)}else He(t,i,n,rs([e]),a);return!0},function(e,t,n,i,a){if(t instanceof Bn)t.forEach((l,s)=>{Qr(e,n,$i([s,l],i),a)});else if(Array.isArray(t)){for(let l=0;l<t.length;l++){const s=t[l];Array.isArray(s)&&Qr(e,n,$i(s,i),a)}rs(t)}});function jh(e,t,n){(t=_n(t))!=null&&(Kt(e,n,5),e=e.g,rc(t),Oc(e))}function Mh(e,t,n){if(t=function(i){if(i==null)return i;const a=typeof i;if(a==="bigint")return String(os(64,i));if(ds(i)){if(a==="string")return V1(i);if(a==="number")return dc(i)}}(t),t!=null&&(typeof t=="string"&&hh(t),t!=null))switch(Kt(e,n,0),typeof t){case"number":e=e.g,Ha(t),Ia(e,we,De);break;case"bigint":n=BigInt.asUintN(64,t),n=new Dc(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Ia(e.g,n.h,n.g);break;default:n=hh(t),Ia(e.g,n.h,n.g)}}function Ch(e,t,n){(t=qa(t))!=null&&t!=null&&(Kt(e,n,0),Yr(e.g,t))}function Dh(e,t,n){(t=R1(t))!=null&&(Kt(e,n,0),e.g.g.push(t?1:0))}function Oh(e,t,n){(t=We(t))!=null&&Xr(e,n,h1(t))}function zh(e,t,n,i,a){Qr(e,n,Th(t,i),a)}function kh(e,t,n){(t=t==null||typeof t=="string"||t instanceof Sn?t:void 0)!=null&&Xr(e,n,Nc(t,!0).buffer)}function Lh(e,t,n){return(e.h===5||e.h===2)&&(t=Qa(t,0|t[O],n),e.h==2?qr(e,Hr,t):t.push(Hr(e.g)),!0)}var Oe=lt(function(e,t,n){return e.h===5&&(Ye(t,n,Hr(e.g)),!0)},jh,Zr),C5=el(Lh,function(e,t,n){if((t=$a(_n,t))!=null)for(let s=0;s<t.length;s++){var i=e,a=n,l=t[s];l!=null&&(Kt(i,a,5),i=i.g,rc(l),Oc(i))}},Zr),qc=el(Lh,function(e,t,n){if((t=$a(_n,t))!=null&&t.length){Kt(e,n,2),Ja(e.g,4*t.length);for(let i=0;i<t.length;i++)n=e.g,rc(t[i]),Oc(n)}},Zr),D5=lt(function(e,t,n){return e.h===5&&(Ye(t,n,(e=Hr(e.g))===0?void 0:e),!0)},jh,Zr),mi=lt(function(e,t,n){return $o?(e.h!==0?e=!1:(Ye(t,n,Ka(e.g,U1)),e=!0),e):e.h===0&&(Ye(t,n,Ka(e.g,oc)),!0)},Mh,wh),Fc=lt(function(e,t,n){return $o?(e.h!==0?t=!1:(Ye(t,n,(e=Ka(e.g,U1))===j5?void 0:e),t=!0),t):e.h===0&&(Ye(t,n,(e=Ka(e.g,oc))===0?void 0:e),!0)},Mh,wh),O5=lt(function(e,t,n){return $o?(e.h!==0?e=!1:(Ye(t,n,Ka(e.g,e5)),e=!0),e):e.h===0&&(Ye(t,n,Ka(e.g,uc)),!0)},function(e,t,n){if(t=function(i){if(i==null)return i;var a=typeof i;if(a==="bigint")return String(t5(64,i));if(ds(i)){if(a==="string")return a=Va(Number(i)),Pi(a)&&a>=0?i=String(a):((a=i.indexOf("."))!==-1&&(i=i.substring(0,a)),(a=i[0]!=="-"&&((a=i.length)<20||a===20&&i<="18446744073709551615"))||(Or(i),i=us(we,De))),i;if(a==="number")return(i=Va(i))>=0&&Pi(i)||(Ha(i),i=uc(we,De)),i}}(t),t!=null&&(typeof t=="string"&&dh(t),t!=null))switch(Kt(e,n,0),typeof t){case"number":e=e.g,Ha(t),Ia(e,we,De);break;case"bigint":n=BigInt.asUintN(64,t),n=new Cc(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Ia(e.g,n.h,n.g);break;default:n=dh(t),Ia(e.g,n.h,n.g)}},E5),Xe=lt(function(e,t,n){return e.h===0&&(Ye(t,n,hi(e.g)),!0)},Ch,Bc),ys=el(function(e,t,n){return(e.h===0||e.h===2)&&(t=Qa(t,0|t[O],n),e.h==2?qr(e,hi,t):t.push(hi(e.g)),!0)},function(e,t,n){if((t=$a(qa,t))!=null&&t.length){n=zc(e,n);for(let i=0;i<t.length;i++)Yr(e.g,t[i]);kc(e,n)}},Bc),tl=lt(function(e,t,n){return e.h===0&&(Ye(t,n,(e=hi(e.g))===0?void 0:e),!0)},Ch,Bc),Ae=lt(function(e,t,n){return e.h===0&&(Ye(t,n,jc(e.g)),!0)},Dh,mh),ra=lt(function(e,t,n){return e.h===0&&(Ye(t,n,(e=jc(e.g))===!1?void 0:e),!0)},Dh,mh),at=el(function(e,t,n){return e.h===2&&(e=Mc(e),Qa(t,0|t[O],n).push(e),!0)},function(e,t,n){if((t=$a(We,t))!=null)for(let s=0;s<t.length;s++){var i=e,a=n,l=t[s];l!=null&&Xr(i,a,h1(l))}},Uc),gi=lt(function(e,t,n){return e.h===2&&(Ye(t,n,(e=Mc(e))===""?void 0:e),!0)},Oh,Uc),re=lt(function(e,t,n){return e.h===2&&(Ye(t,n,Mc(e)),!0)},Oh,Uc),Qe=function(e,t,n=Lc){return new Pa(e,t,n)}(function(e,t,n,i,a){return e.h===2&&(i=$i(void 0,i),Qa(t,0|t[O],n).push(i),ws(e,i,a),!0)},function(e,t,n,i,a){if(Array.isArray(t)){for(let l=0;l<t.length;l++)zh(e,t[l],n,i,a);1&(e=0|t[O])||Ge(t,1|e)}}),Ne=Kr(function(e,t,n,i,a,l){if(e.h!==2)return!1;let s=0|t[O];return eh(t,s,l,n,Ga(s)),ws(e,t=Tc(t,i,n),a),!0},zh),Uh=lt(function(e,t,n){return e.h===2&&(Ye(t,n,fh(e)),!0)},kh,yh),z5=el(function(e,t,n){return(e.h===0||e.h===2)&&(t=Qa(t,0|t[O],n),e.h==2?qr(e,Vn,t):t.push(Vn(e.g)),!0)},function(e,t,n){if((t=$a(G1,t))!=null)for(let s=0;s<t.length;s++){var i=e,a=n,l=t[s];l!=null&&(Kt(i,a,0),Ja(i.g,l))}},gh),k5=lt(function(e,t,n){return e.h===0&&(Ye(t,n,(e=Vn(e.g))===0?void 0:e),!0)},function(e,t,n){(t=G1(t))!=null&&t!=null&&(Kt(e,n,0),Ja(e.g,t))},gh),Nt=lt(function(e,t,n){return e.h===0&&(Ye(t,n,hi(e.g)),!0)},function(e,t,n){(t=qa(t))!=null&&(t=parseInt(t,10),Kt(e,n,0),Yr(e.g,t))},ph);class L5{constructor(t,n){var i=jt;this.g=t,this.h=n,this.m=I,this.j=U,this.defaultValue=void 0,this.l=i.Oa!=null?O1:void 0}register(){Mr(this)}}function Nn(e,t){return new L5(e,t)}function wi(e,t){return(n,i)=>{{const l={ea:!0};i&&Object.assign(l,i),n=uh(n,void 0,void 0,l);try{const s=new e,r=s.v;Vc(t)(r,n);var a=s}finally{oh(n)}}return a}}function $r(e){return function(){const t=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const s=this.g;return this.g=[],s}}}};Nh(this.v,t,sa(Ir,Wr,Pr,e)),Wa(t,t.g.end());const n=new Uint8Array(t.h),i=t.l,a=i.length;let l=0;for(let s=0;s<a;s++){const r=i[s];n.set(r,l),l+=r.length}return t.l=[n],n}}var Bh=class extends z{constructor(e){super(e)}},Rh=[0,gi,lt(function(e,t,n){return e.h===2&&(Ye(t,n,(e=fh(e))===Ii()?void 0:e),!0)},function(e,t,n){if(t!=null){if(t instanceof z){const i=t.Ra;return void(i?(t=i(t),t!=null&&Xr(e,n,Nc(t,!0).buffer)):ka(ac,3))}if(Array.isArray(t))return void ka(ac,3)}kh(e,t,n)},yh)];let Yc,Gh=globalThis.trustedTypes;function Hh(e){var t;return Yc===void 0&&(Yc=function(){let n=null;if(!Gh)return n;try{const i=a=>a;n=Gh.createPolicy("goog#html",{createHTML:i,createScript:i,createScriptURL:i})}catch{}return n}()),e=(t=Yc)?t.createScriptURL(e):e,new class{constructor(n){this.g=n}toString(){return this.g+""}}(e)}function U5(e,...t){if(t.length===0)return Hh(e[0]);let n=e[0];for(let i=0;i<t.length;i++)n+=encodeURIComponent(t[i])+e[i+1];return Hh(n)}var Vh=[0,Xe,Nt,Ae,-1,ys,Nt,-1,Ae],B5=class extends z{constructor(e){super(e)}},qh=[0,Ae,re,Ae,Nt,-1,el(function(e,t,n){return(e.h===0||e.h===2)&&(t=Qa(t,0|t[O],n),e.h==2?qr(e,v5,t):t.push(hi(e.g)),!0)},function(e,t,n){if((t=$a(qa,t))!=null&&t.length){n=zc(e,n);for(let i=0;i<t.length;i++)Yr(e.g,t[i]);kc(e,n)}},ph),re,-1,[0,Ae,-1],Nt,Ae,-1],Fh=[0,3,Ae,-1,2,[0,Xe],[0,Nt,Ae],[0,re,-1],[0]],Yh=[0,re,-2],Xh=class extends z{constructor(e){super(e)}},Qh=[0],Zh=[0,Xe,Ae,1,Ae,-4],jt=class extends z{constructor(e){super(e,2)}},Ve={};Ve[336783863]=[0,re,Ae,-1,Xe,[0,[1,2,3,4,5,6,7,8,9],Ne,Qh,Ne,qh,Ne,Yh,Ne,Zh,Ne,Vh,Ne,[0,re,-2],Ne,[0,re,Nt],Ne,Fh,Ne,[0,Nt,-1,Ae]],[0,re],Ae,[0,[1,3],[2,4],Ne,[0,ys],-1,Ne,[0,at],-1,Qe,[0,re,-1]],re];var Kh=[0,Fc,-1,ra,-3,Fc,ys,gi,tl,Fc,-1,ra,tl,ra,-2,gi];function he(e,t){Gr(e,3,t)}function Q(e,t){Gr(e,4,t)}var dt=class extends z{constructor(e){super(e,500)}o(e){return U(this,0,7,e)}},ps=[-1,{}],Ih=[0,re,1,ps],Jh=[0,re,at,ps];function It(e,t){Ac(e,1,dt,t)}function ye(e,t){Gr(e,10,t)}function J(e,t){Gr(e,15,t)}var Mt=class extends z{constructor(e){super(e,500)}o(e){return U(this,0,1001,e)}},Wh=[-500,Qe,[-500,gi,-1,at,-3,[-2,Ve,Ae],Qe,Rh,tl,-1,Ih,Jh,Qe,[0,gi,ra],gi,Kh,tl,at,987,at],4,Qe,[-500,re,-1,[-1,{}],998,re],Qe,[-500,re,at,-1,[-2,{},Ae],997,at,-1],tl,Qe,[-500,re,at,ps,998,at],at,tl,Ih,Jh,Qe,[0,gi,-1,ps],at,-2,Kh,gi,-1,ra,[0,ra,k5],978,ps,Qe,Rh];Mt.prototype.g=$r(Wh);var R5=wi(Mt,Wh),G5=class extends z{constructor(e){super(e)}},Ph=class extends z{constructor(e){super(e)}g(){return Gn(this,G5,1)}},$h=[0,Qe,[0,Xe,Oe,re,-1]],eu=wi(Ph,$h),H5=class extends z{constructor(e){super(e)}},V5=class extends z{constructor(e){super(e)}},Xc=class extends z{constructor(e){super(e)}l(){return I(this,H5,2)}g(){return Gn(this,V5,5)}},e0=wi(class extends z{constructor(e){super(e)}},[0,at,ys,qc,[0,Nt,[0,Xe,-3],[0,Oe,-3],[0,Xe,-1,[0,Qe,[0,Xe,-2]]],Qe,[0,Oe,-1,re,Oe]],re,-1,mi,Qe,[0,Xe,Oe],at,mi]),t0=class extends z{constructor(e){super(e)}},nl=wi(class extends z{constructor(e){super(e)}},[0,Qe,[0,Oe,-4]]),n0=class extends z{constructor(e){super(e)}},vs=wi(class extends z{constructor(e){super(e)}},[0,Qe,[0,Oe,-4]]),q5=class extends z{constructor(e){super(e)}},F5=[0,Xe,-1,qc,Nt],i0=class extends z{constructor(e){super(e)}};i0.prototype.g=$r([0,Oe,-4,mi]);var Y5=class extends z{constructor(e){super(e)}},X5=wi(class extends z{constructor(e){super(e)}},[0,Qe,[0,1,Xe,re,$h],mi]),a0=class extends z{constructor(e){super(e)}},Q5=class extends z{constructor(e){super(e)}na(){const e=de(this,1,void 0,void 0,P1);return e??Ii()}},Z5=class extends z{constructor(e){super(e)}},l0=[1,2],K5=wi(class extends z{constructor(e){super(e)}},[0,Qe,[0,l0,Ne,[0,qc],Ne,[0,Uh],Xe,re],mi]),Qc=class extends z{constructor(e){super(e)}},s0=[0,re,Xe,Oe,at,-1],r0=class extends z{constructor(e){super(e)}},I5=[0,Ae,-1],u0=class extends z{constructor(e){super(e)}},tu=[1,2,3,4,5,6],nu=class extends z{constructor(e){super(e)}g(){return de(this,1,void 0,void 0,P1)!=null}l(){return We(de(this,2))!=null}},ve=class extends z{constructor(e){super(e)}g(){return R1(de(this,2))??!1}},o0=[0,Uh,re,[0,Xe,mi,-1],[0,O5,mi]],ze=[0,o0,Ae,[0,tu,Ne,Zh,Ne,qh,Ne,Vh,Ne,Qh,Ne,Yh,Ne,Fh],Nt],iu=class extends z{constructor(e){super(e)}},Zc=[0,ze,Oe,-1,Xe],J5=Nn(502141897,iu);Ve[502141897]=Zc;var W5=wi(class extends z{constructor(e){super(e)}},[0,[0,Nt,-1,C5,z5],F5]),c0=class extends z{constructor(e){super(e)}},f0=class extends z{constructor(e){super(e)}},Kc=[0,ze,Oe,[0,ze],Ae],P5=Nn(508968150,f0);Ve[508968150]=[0,ze,Zc,Kc,Oe,[0,[0,o0]]],Ve[508968149]=Kc;var il=class extends z{constructor(e){super(e)}l(){return I(this,Qc,2)}g(){ne(this,2)}},d0=[0,ze,s0];Ve[478825465]=d0;var $5=class extends z{constructor(e){super(e)}},h0=class extends z{constructor(e){super(e)}},Ic=class extends z{constructor(e){super(e)}},Jc=class extends z{constructor(e){super(e)}},m0=class extends z{constructor(e){super(e)}},g0=[0,ze,[0,ze],d0,-1],w0=[0,ze,Oe,Xe],Wc=[0,ze,Oe],y0=[0,ze,w0,Wc,Oe],ey=Nn(479097054,m0);Ve[479097054]=[0,ze,y0,g0],Ve[463370452]=g0,Ve[464864288]=w0;var ty=Nn(462713202,Jc);Ve[462713202]=y0,Ve[474472470]=Wc;var ny=class extends z{constructor(e){super(e)}},p0=class extends z{constructor(e){super(e)}},v0=class extends z{constructor(e){super(e)}},b0=class extends z{constructor(e){super(e)}},Pc=[0,ze,Oe,-1,Xe],$c=[0,ze,Oe,Ae];b0.prototype.g=$r([0,ze,Wc,[0,ze],Zc,Kc,Pc,$c]);var x0=class extends z{constructor(e){super(e)}},iy=Nn(456383383,x0);Ve[456383383]=[0,ze,s0];var S0=class extends z{constructor(e){super(e)}},ay=Nn(476348187,S0);Ve[476348187]=[0,ze,I5];var E0=class extends z{constructor(e){super(e)}},_0=class extends z{constructor(e){super(e)}},T0=[0,Nt,-1],ly=Nn(458105876,class extends z{constructor(e){super(e)}g(){let e;var t=this.v;const n=0|t[O];return e=_t(this,n),t=function(i,a,l,s){var r=_0;!s&&Ya(i)&&(l=0|(a=i.v)[O]);var o=Rn(a,2);if(i=!1,o==null){if(s)return Q1();o=[]}else if(o.constructor===Bn){if(!(2&o.J)||s)return o;o=o.V()}else Array.isArray(o)?i=!!(2&(0|o[O])):o=[];if(s){if(!o.length)return Q1();i||(i=!0,ss(o))}else i&&(i=!1,rs(o),o=$1(o));return!i&&32&l&&ls(o,32),l=He(a,l,2,s=new Bn(o,r,l5,void 0)),i||ea(a,l),s}(this,t,n,e),!e&&_0&&(t.ra=!0),t}});Ve[458105876]=[0,T0,M5,[!0,mi,[0,re,-1,at]],[0,ys,Ae,Nt]];var ef=class extends z{constructor(e){super(e)}},A0=Nn(458105758,ef);Ve[458105758]=[0,ze,re,T0];var tf=class extends z{constructor(e){super(e)}},N0=[0,D5,-1,ra],sy=class extends z{constructor(e){super(e)}},j0=class extends z{constructor(e){super(e)}},nf=[1,2];j0.prototype.g=$r([0,nf,Ne,N0,Ne,[0,Qe,N0]]);var M0=class extends z{constructor(e){super(e)}},ry=Nn(443442058,M0);Ve[443442058]=[0,ze,re,Xe,Oe,at,-1,Ae,Oe],Ve[514774813]=Pc;var C0=class extends z{constructor(e){super(e)}},uy=Nn(516587230,C0);function af(e,t){return t=t?t.clone():new Qc,e.displayNamesLocale!==void 0?ne(t,1,hs(e.displayNamesLocale)):e.displayNamesLocale===void 0&&ne(t,1),e.maxResults!==void 0?Hn(t,2,e.maxResults):"maxResults"in e&&ne(t,2),e.scoreThreshold!==void 0?L(t,3,e.scoreThreshold):"scoreThreshold"in e&&ne(t,3),e.categoryAllowlist!==void 0?Rr(t,4,e.categoryAllowlist):"categoryAllowlist"in e&&ne(t,4),e.categoryDenylist!==void 0?Rr(t,5,e.categoryDenylist):"categoryDenylist"in e&&ne(t,5),t}function D0(e){const t=Number(e);return Number.isSafeInteger(t)?t:String(e)}function lf(e,t=-1,n=""){return{categories:e.map(i=>({index:Zt(i,1)??0??-1,score:Te(i,2)??0,categoryName:We(de(i,3))??""??"",displayName:We(de(i,4))??""??""})),headIndex:t,headName:n}}function oy(e){const t={classifications:Gn(e,Y5,1).map(n=>{var i;return lf(((i=I(n,Ph,4))==null?void 0:i.g())??[],Zt(n,2)??0,We(de(n,3))??"")})};return function(n){return a5(ec?de(n,2,void 0,void 0,kr):de(n,2))}(e)!=null&&(t.timestampMs=D0(ah(e))),t}function O0(e){var s,r;var t=na(e,3,_n,ta()),n=na(e,2,qa,ta()),i=na(e,1,We,ta()),a=na(e,9,We,ta());const l={categories:[],keypoints:[]};for(let o=0;o<t.length;o++)l.categories.push({score:t[o],index:n[o]??-1,categoryName:i[o]??"",displayName:a[o]??""});if((t=(s=I(e,Xc,4))==null?void 0:s.l())&&(l.boundingBox={originX:Zt(t,1,fi)??0,originY:Zt(t,2,fi)??0,width:Zt(t,3,fi)??0,height:Zt(t,4,fi)??0,angle:0}),(r=I(e,Xc,4))==null?void 0:r.g().length)for(const o of I(e,Xc,4).g())l.keypoints.push({x:de(o,1,void 0,fi,_n)??0,y:de(o,2,void 0,fi,_n)??0,score:de(o,4,void 0,fi,_n)??0,label:We(de(o,3,void 0,fi))??""});return l}function au(e){const t=[];for(const n of Gn(e,n0,1))t.push({x:Te(n,1)??0,y:Te(n,2)??0,z:Te(n,3)??0,visibility:Te(n,4)??0});return t}function bs(e){const t=[];for(const n of Gn(e,t0,1))t.push({x:Te(n,1)??0,y:Te(n,2)??0,z:Te(n,3)??0,visibility:Te(n,4)??0});return t}function z0(e){return Array.from(e,t=>t>127?t-256:t)}function k0(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);let n=0,i=0,a=0;for(let l=0;l<e.length;l++)n+=e[l]*t[l],i+=e[l]*e[l],a+=t[l]*t[l];if(i<=0||a<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(i*a)}let lu;Ve[516587230]=[0,ze,Pc,$c,Oe],Ve[518928384]=$c;const cy=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function L0(){if(lu===void 0)try{await WebAssembly.instantiate(cy),lu=!0}catch{lu=!1}return lu}async function xs(e,t=U5``){const n=await L0()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${t}/${e}_${n}.js`,wasmBinaryPath:`${t}/${e}_${n}.wasm`}}var ua=class{};function U0(){var e=navigator;return typeof OffscreenCanvas<"u"&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(e)||!!((e=e.userAgent.match(/Version\/([\d]+).*Safari/))&&e.length>=1&&Number(e[1])>=17))}async function B0(e){if(typeof importScripts!="function"){const t=document.createElement("script");return t.src=e.toString(),t.crossOrigin="anonymous",new Promise((n,i)=>{t.addEventListener("load",()=>{n()},!1),t.addEventListener("error",a=>{i(a)},!1),document.body.appendChild(t)})}try{importScripts(e.toString())}catch(t){if(!(t instanceof TypeError))throw t;await self.import(e.toString())}}function R0(e){return e.videoWidth!==void 0?[e.videoWidth,e.videoHeight]:e.naturalWidth!==void 0?[e.naturalWidth,e.naturalHeight]:e.displayWidth!==void 0?[e.displayWidth,e.displayHeight]:[e.width,e.height]}function k(e,t,n){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(t=e.i.stringToNewUTF8(t)),e.i._free(t)}function G0(e,t,n){if(!e.i.canvas)throw Error("No OpenGL canvas configured.");if(n?e.i._bindTextureToStream(n):e.i._bindTextureToCanvas(),!(n=e.i.canvas.getContext("webgl2")||e.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[i,a]=R0(t);return!e.l||i===e.i.canvas.width&&a===e.i.canvas.height||(e.i.canvas.width=i,e.i.canvas.height=a),[i,a]}function H0(e,t,n){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const i=new Uint32Array(t.length);for(let a=0;a<t.length;a++)i[a]=e.i.stringToNewUTF8(t[a]);t=e.i._malloc(4*i.length),e.i.HEAPU32.set(i,t>>2),n(t);for(const a of i)e.i._free(a);e.i._free(t)}function jn(e,t,n){e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=n}function yi(e,t,n){let i=[];e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=(a,l,s)=>{l?(n(i,s),i=[]):i.push(a)}}ua.forVisionTasks=function(e){return xs("vision",e)},ua.forTextTasks=function(e){return xs("text",e)},ua.forGenAiExperimentalTasks=function(e){return xs("genai_experimental",e)},ua.forGenAiTasks=function(e){return xs("genai",e)},ua.forAudioTasks=function(e){return xs("audio",e)},ua.isSimdSupported=function(){return L0()};async function fy(e,t,n,i){return e=await(async(a,l,s,r,o)=>{if(l&&await B0(l),!self.ModuleFactory||s&&(await B0(s),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&o&&((l=self.Module).locateFile=o.locateFile,o.mainScriptUrlOrBlob&&(l.mainScriptUrlOrBlob=o.mainScriptUrlOrBlob)),o=await self.ModuleFactory(self.Module||o),self.ModuleFactory=self.Module=void 0,new a(o,r)})(e,n.wasmLoaderPath,n.assetLoaderPath,t,{locateFile:a=>a.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&a.endsWith(".data")?n.assetBinaryPath.toString():a}),await e.o(i),e}function sf(e,t){const n=I(e.baseOptions,nu,1)||new nu;typeof t=="string"?(ne(n,2,hs(t)),ne(n,1)):t instanceof Uint8Array&&(ne(n,1,lc(t,!1)),ne(n,2)),U(e.baseOptions,0,1,n)}function V0(e){try{const t=e.H.length;if(t===1)throw Error(e.H[0].message);if(t>1)throw Error("Encountered multiple errors: "+e.H.map(n=>n.message).join(", "))}finally{e.H=[]}}function C(e,t){e.C=Math.max(e.C,t)}function su(e,t){e.B=new dt,At(e.B,2,"PassThroughCalculator"),he(e.B,"free_memory"),Q(e.B,"free_memory_unused_out"),ye(t,"free_memory"),It(t,e.B)}function al(e,t){he(e.B,t),Q(e.B,t+"_unused_out")}function ru(e){e.g.addBoolToStream(!0,"free_memory",e.C)}var rf=class{constructor(e){this.g=e,this.H=[],this.C=0,this.g.setAutoRenderToScreen(!1)}l(e,t=!0){var n,i,a,l,s,r;if(t){const o=e.baseOptions||{};if((n=e.baseOptions)!=null&&n.modelAssetBuffer&&((i=e.baseOptions)!=null&&i.modelAssetPath))throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!((a=I(this.baseOptions,nu,1))!=null&&a.g()||(l=I(this.baseOptions,nu,1))!=null&&l.l()||(s=e.baseOptions)!=null&&s.modelAssetBuffer||(r=e.baseOptions)!=null&&r.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(c,f){let h=I(c.baseOptions,u0,3);if(!h){var d=h=new u0,m=new Xh;gs(d,4,tu,m)}"delegate"in f&&(f.delegate==="GPU"?(f=h,d=new B5,gs(f,2,tu,d)):(f=h,d=new Xh,gs(f,4,tu,d))),U(c.baseOptions,0,3,h)}(this,o),o.modelAssetPath)return fetch(o.modelAssetPath.toString()).then(c=>{if(c.ok)return c.arrayBuffer();throw Error(`Failed to fetch model: ${o.modelAssetPath} (${c.status})`)}).then(c=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(c),!0,!1,!1),sf(this,"/model.dat"),this.m(),this.L()});if(o.modelAssetBuffer instanceof Uint8Array)sf(this,o.modelAssetBuffer);else if(o.modelAssetBuffer)return async function(c){const f=[];for(var h=0;;){const{done:d,value:m}=await c.read();if(d)break;f.push(m),h+=m.length}if(f.length===0)return new Uint8Array(0);if(f.length===1)return f[0];c=new Uint8Array(h),h=0;for(const d of f)c.set(d,h),h+=d.length;return c}(o.modelAssetBuffer).then(c=>{sf(this,c),this.m(),this.L()})}return this.m(),this.L(),Promise.resolve()}L(){}ca(){let e;if(this.g.ca(t=>{e=R5(t)}),!e)throw Error("Failed to retrieve CalculatorGraphConfig");return e}setGraph(e,t){this.g.attachErrorListener((n,i)=>{this.H.push(Error(i))}),this.g.Ja(),this.g.setGraph(e,t),this.B=void 0,V0(this)}finishProcessing(){this.g.finishProcessing(),V0(this)}close(){this.B=void 0,this.g.closeGraph()}};function pi(e,t){if(!e)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}rf.prototype.close=rf.prototype.close;class dy{constructor(t,n,i,a){this.g=t,this.h=n,this.m=i,this.l=a}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function q0(e,t,n){const i=e.g;if(n=pi(i.createShader(n),"Failed to create WebGL shader"),i.shaderSource(n,t),i.compileShader(n),!i.getShaderParameter(n,i.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${i.getShaderInfoLog(n)}`);return i.attachShader(e.h,n),n}function F0(e,t){const n=e.g,i=pi(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(i);const a=pi(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,a),n.enableVertexAttribArray(e.O),n.vertexAttribPointer(e.O,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const l=pi(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,l),n.enableVertexAttribArray(e.L),n.vertexAttribPointer(e.L,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(t?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new dy(n,i,a,l)}function uf(e,t){if(e.g){if(t!==e.g)throw Error("Cannot change GL context once initialized")}else e.g=t}function hy(e,t,n,i){return uf(e,t),e.h||(e.m(),e.D()),n?(e.u||(e.u=F0(e,!0)),n=e.u):(e.A||(e.A=F0(e,!1)),n=e.A),t.useProgram(e.h),n.bind(),e.l(),e=i(),n.g.bindVertexArray(null),e}function Y0(e,t,n){return uf(e,t),e=pi(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n??t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n??t.LINEAR),t.bindTexture(t.TEXTURE_2D,null),e}function X0(e,t,n){uf(e,t),e.B||(e.B=pi(t.createFramebuffer(),"Failed to create framebuffe.")),t.bindFramebuffer(t.FRAMEBUFFER,e.B),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0)}function my(e){var t;(t=e.g)==null||t.bindFramebuffer(e.g.FRAMEBUFFER,null)}var Q0=class{H(){return`
10
10
  precision mediump float;
11
11
  varying vec2 vTex;
12
12
  uniform sampler2D inputTexture;
13
13
  void main() {
14
14
  gl_FragColor = texture2D(inputTexture, vTex);
15
15
  }
16
- `}m(){const e=this.g;if(this.h=Hn(e.createProgram(),"Failed to create WebGL program"),this.Z=R0(this,`
16
+ `}m(){const e=this.g;if(this.h=pi(e.createProgram(),"Failed to create WebGL program"),this.X=q0(this,`
17
17
  attribute vec2 aVertex;
18
18
  attribute vec2 aTex;
19
19
  varying vec2 vTex;
20
20
  void main(void) {
21
21
  gl_Position = vec4(aVertex, 0.0, 1.0);
22
22
  vTex = aTex;
23
- }`,e.VERTEX_SHADER),this.Y=R0(this,this.G(),e.FRAGMENT_SHADER),e.linkProgram(this.h),!e.getProgramParameter(this.h,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.h)}`);this.P=e.getAttribLocation(this.h,"aVertex"),this.J=e.getAttribLocation(this.h,"aTex")}C(){}l(){}close(){if(this.h){const e=this.g;e.deleteProgram(this.h),e.deleteShader(this.Z),e.deleteShader(this.Y)}this.A&&this.g.deleteFramebuffer(this.A),this.v&&this.v.close(),this.s&&this.s.close()}};function Vn(e,t){switch(t){case 0:return e.g.find(n=>n instanceof Uint8Array);case 1:return e.g.find(n=>n instanceof Float32Array);case 2:return e.g.find(n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function mf(e){var t=Vn(e,1);if(!t){if(t=Vn(e,0))t=new Float32Array(t).map(i=>i/255);else{t=new Float32Array(e.width*e.height);const i=Ja(e);var n=wf(e);if(lo(n,i,G0(e)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(e.width*e.height*4),i.readPixels(0,0,e.width,e.height,i.RGBA,i.FLOAT,n);for(let a=0,l=0;a<t.length;++a,l+=4)t[a]=n[l]}else i.readPixels(0,0,e.width,e.height,i.RED,i.FLOAT,t)}e.g.push(t)}return t}function G0(e){let t=Vn(e,2);if(!t){const n=Ja(e);t=V0(e);const i=mf(e),a=H0(e);n.texImage2D(n.TEXTURE_2D,0,a,e.width,e.height,0,n.RED,n.FLOAT,i),gf(e)}return t}function Ja(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=Hn(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function H0(e){if(e=Ja(e),!so)if(e.getExtension("EXT_color_buffer_float")&&e.getExtension("OES_texture_float_linear")&&e.getExtension("EXT_float_blend"))so=e.R32F;else{if(!e.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");so=e.R16F}return so}function wf(e){return e.l||(e.l=new hf),e.l}function V0(e){const t=Ja(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=Vn(e,2);return n||(n=ao(wf(e),t,e.m?t.LINEAR:t.NEAREST),e.g.push(n),e.j=!0),t.bindTexture(t.TEXTURE_2D,n),n}function gf(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var so,Ve=class{constructor(e,t,n,i,a,l,s){this.g=e,this.m=t,this.j=n,this.canvas=i,this.l=a,this.width=l,this.height=s,this.j&&--F0===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Da(){return!!Vn(this,0)}ja(){return!!Vn(this,1)}R(){return!!Vn(this,2)}ia(){return(t=Vn(e=this,0))||(t=mf(e),t=new Uint8Array(t.map(n=>255*n)),e.g.push(t)),t;var e,t}ha(){return mf(this)}N(){return G0(this)}clone(){const e=[];for(const t of this.g){let n;if(t instanceof Uint8Array)n=new Uint8Array(t);else if(t instanceof Float32Array)n=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{const i=Ja(this),a=wf(this);i.activeTexture(i.TEXTURE1),n=ao(a,i,this.m?i.LINEAR:i.NEAREST),i.bindTexture(i.TEXTURE_2D,n);const l=H0(this);i.texImage2D(i.TEXTURE_2D,0,l,this.width,this.height,0,i.RED,i.FLOAT,null),i.bindTexture(i.TEXTURE_2D,null),lo(a,i,n),ff(a,i,!1,()=>{V0(this),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),gf(this)}),df(a),gf(this)}}e.push(n)}return new Ve(e,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ja(this).deleteTexture(Vn(this,2)),F0=-1}};Ve.prototype.close=Ve.prototype.close,Ve.prototype.clone=Ve.prototype.clone,Ve.prototype.getAsWebGLTexture=Ve.prototype.N,Ve.prototype.getAsFloat32Array=Ve.prototype.ha,Ve.prototype.getAsUint8Array=Ve.prototype.ia,Ve.prototype.hasWebGLTexture=Ve.prototype.R,Ve.prototype.hasFloat32Array=Ve.prototype.ja,Ve.prototype.hasUint8Array=Ve.prototype.Da;var F0=250;function xn(e,t){switch(t){case 0:return e.g.find(n=>n instanceof ImageData);case 1:return e.g.find(n=>typeof ImageBitmap<"u"&&n instanceof ImageBitmap);case 2:return e.g.find(n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function q0(e){var t=xn(e,0);if(!t){t=Pa(e);const n=oo(e),i=new Uint8Array(e.width*e.height*4);lo(n,t,ro(e)),t.readPixels(0,0,e.width,e.height,t.RGBA,t.UNSIGNED_BYTE,i),df(n),t=new ImageData(new Uint8ClampedArray(i.buffer),e.width,e.height),e.g.push(t)}return t}function ro(e){let t=xn(e,2);if(!t){const n=Pa(e);t=uo(e);const i=xn(e,1)||q0(e);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,i),os(e)}return t}function Pa(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=Hn(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function oo(e){return e.l||(e.l=new hf),e.l}function uo(e){const t=Pa(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=xn(e,2);return n||(n=ao(oo(e),t),e.g.push(n),e.m=!0),t.bindTexture(t.TEXTURE_2D,n),n}function os(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}function Y0(e){const t=Pa(e);return ff(oo(e),t,!0,()=>function(n,i){const a=n.canvas;if(a.width===n.width&&a.height===n.height)return i();const l=a.width,s=a.height;return a.width=n.width,a.height=n.height,n=i(),a.width=l,a.height=s,n}(e,()=>{if(t.bindFramebuffer(t.FRAMEBUFFER,null),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),!(e.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return e.canvas.transferToImageBitmap()}))}var Fe=class{constructor(e,t,n,i,a,l,s){this.g=e,this.j=t,this.m=n,this.canvas=i,this.l=a,this.width=l,this.height=s,(this.j||this.m)&&--X0===0&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ca(){return!!xn(this,0)}ka(){return!!xn(this,1)}R(){return!!xn(this,2)}Aa(){return q0(this)}za(){var e=xn(this,1);return e||(ro(this),uo(this),e=Y0(this),os(this),this.g.push(e),this.j=!0),e}N(){return ro(this)}clone(){const e=[];for(const t of this.g){let n;if(t instanceof ImageData)n=new ImageData(t.data,this.width,this.height);else if(t instanceof WebGLTexture){const i=Pa(this),a=oo(this);i.activeTexture(i.TEXTURE1),n=ao(a,i),i.bindTexture(i.TEXTURE_2D,n),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,this.width,this.height,0,i.RGBA,i.UNSIGNED_BYTE,null),i.bindTexture(i.TEXTURE_2D,null),lo(a,i,n),ff(a,i,!1,()=>{uo(this),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),os(this)}),df(a),os(this)}else{if(!(t instanceof ImageBitmap))throw Error(`Type is not supported: ${t}`);ro(this),uo(this),n=Y0(this),os(this)}e.push(n)}return new Fe(e,this.ka(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&xn(this,1).close(),this.m&&Pa(this).deleteTexture(xn(this,2)),X0=-1}};Fe.prototype.close=Fe.prototype.close,Fe.prototype.clone=Fe.prototype.clone,Fe.prototype.getAsWebGLTexture=Fe.prototype.N,Fe.prototype.getAsImageBitmap=Fe.prototype.za,Fe.prototype.getAsImageData=Fe.prototype.Aa,Fe.prototype.hasWebGLTexture=Fe.prototype.R,Fe.prototype.hasImageBitmap=Fe.prototype.ka,Fe.prototype.hasImageData=Fe.prototype.Ca;var X0=250;function fn(...e){return e.map(([t,n])=>({start:t,end:n}))}const Bp=function(e){return class extends e{Ha(){this.i._registerModelResourcesGraphService()}}}((Q0=class{constructor(e,t){this.l=!0,this.i=e,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",t!==void 0?this.i.canvas=t:D0()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(e){const t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(".pbtxt")||e.endsWith(".textproto")),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){const n=e.length,i=this.i._malloc(n);this.i.HEAPU8.set(e,i),t?this.i._changeBinaryGraph(n,i):this.i._changeTextGraph(n,i),this.i._free(i)}configureAudio(e,t,n,i,a){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),U(this,i||"input_audio",l=>{U(this,a=a||"audio_header",s=>{this.i._configureAudio(l,s,e,t??0,n)})})}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}ca(e){bn(this,"__graph_config__",t=>{e(t)}),U(this,"__graph_config__",t=>{this.i._getGraphConfig(t,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(e){this.i.errorListener=e}attachEmptyPacketListener(e,t){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[e]=t}addAudioToStream(e,t,n){this.addAudioToStreamWithShape(e,0,0,t,n)}addAudioToStreamWithShape(e,t,n,i,a){const l=4*e.length;this.h!==l&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(l),this.h=l),this.i.HEAPF32.set(e,this.g/4),U(this,i,s=>{this.i._addAudioToInputStream(this.g,t,n,s,a)})}addGpuBufferToStream(e,t,n){U(this,t,i=>{const[a,l]=L0(this,e,i);this.i._addBoundTextureToStream(i,a,l,n)})}addBoolToStream(e,t,n){U(this,t,i=>{this.i._addBoolToInputStream(e,i,n)})}addDoubleToStream(e,t,n){U(this,t,i=>{this.i._addDoubleToInputStream(e,i,n)})}addFloatToStream(e,t,n){U(this,t,i=>{this.i._addFloatToInputStream(e,i,n)})}addIntToStream(e,t,n){U(this,t,i=>{this.i._addIntToInputStream(e,i,n)})}addUintToStream(e,t,n){U(this,t,i=>{this.i._addUintToInputStream(e,i,n)})}addStringToStream(e,t,n){U(this,t,i=>{U(this,e,a=>{this.i._addStringToInputStream(a,i,n)})})}addStringRecordToStream(e,t,n){U(this,t,i=>{U0(this,Object.keys(e),a=>{U0(this,Object.values(e),l=>{this.i._addFlatHashMapToInputStream(a,l,Object.keys(e).length,i,n)})})})}addProtoToStream(e,t,n,i){U(this,n,a=>{U(this,t,l=>{const s=this.i._malloc(e.length);this.i.HEAPU8.set(e,s),this.i._addProtoToInputStream(s,e.length,l,a,i),this.i._free(s)})})}addEmptyPacketToStream(e,t){U(this,e,n=>{this.i._addEmptyPacketToInputStream(n,t)})}addBoolVectorToStream(e,t,n){U(this,t,i=>{const a=this.i._allocateBoolVector(e.length);if(!a)throw Error("Unable to allocate new bool vector on heap.");for(const l of e)this.i._addBoolVectorEntry(a,l);this.i._addBoolVectorToInputStream(a,i,n)})}addDoubleVectorToStream(e,t,n){U(this,t,i=>{const a=this.i._allocateDoubleVector(e.length);if(!a)throw Error("Unable to allocate new double vector on heap.");for(const l of e)this.i._addDoubleVectorEntry(a,l);this.i._addDoubleVectorToInputStream(a,i,n)})}addFloatVectorToStream(e,t,n){U(this,t,i=>{const a=this.i._allocateFloatVector(e.length);if(!a)throw Error("Unable to allocate new float vector on heap.");for(const l of e)this.i._addFloatVectorEntry(a,l);this.i._addFloatVectorToInputStream(a,i,n)})}addIntVectorToStream(e,t,n){U(this,t,i=>{const a=this.i._allocateIntVector(e.length);if(!a)throw Error("Unable to allocate new int vector on heap.");for(const l of e)this.i._addIntVectorEntry(a,l);this.i._addIntVectorToInputStream(a,i,n)})}addUintVectorToStream(e,t,n){U(this,t,i=>{const a=this.i._allocateUintVector(e.length);if(!a)throw Error("Unable to allocate new unsigned int vector on heap.");for(const l of e)this.i._addUintVectorEntry(a,l);this.i._addUintVectorToInputStream(a,i,n)})}addStringVectorToStream(e,t,n){U(this,t,i=>{const a=this.i._allocateStringVector(e.length);if(!a)throw Error("Unable to allocate new string vector on heap.");for(const l of e)U(this,l,s=>{this.i._addStringVectorEntry(a,s)});this.i._addStringVectorToInputStream(a,i,n)})}addBoolToInputSidePacket(e,t){U(this,t,n=>{this.i._addBoolToInputSidePacket(e,n)})}addDoubleToInputSidePacket(e,t){U(this,t,n=>{this.i._addDoubleToInputSidePacket(e,n)})}addFloatToInputSidePacket(e,t){U(this,t,n=>{this.i._addFloatToInputSidePacket(e,n)})}addIntToInputSidePacket(e,t){U(this,t,n=>{this.i._addIntToInputSidePacket(e,n)})}addUintToInputSidePacket(e,t){U(this,t,n=>{this.i._addUintToInputSidePacket(e,n)})}addStringToInputSidePacket(e,t){U(this,t,n=>{U(this,e,i=>{this.i._addStringToInputSidePacket(i,n)})})}addProtoToInputSidePacket(e,t,n){U(this,n,i=>{U(this,t,a=>{const l=this.i._malloc(e.length);this.i.HEAPU8.set(e,l),this.i._addProtoToInputSidePacket(l,e.length,a,i),this.i._free(l)})})}addBoolVectorToInputSidePacket(e,t){U(this,t,n=>{const i=this.i._allocateBoolVector(e.length);if(!i)throw Error("Unable to allocate new bool vector on heap.");for(const a of e)this.i._addBoolVectorEntry(i,a);this.i._addBoolVectorToInputSidePacket(i,n)})}addDoubleVectorToInputSidePacket(e,t){U(this,t,n=>{const i=this.i._allocateDoubleVector(e.length);if(!i)throw Error("Unable to allocate new double vector on heap.");for(const a of e)this.i._addDoubleVectorEntry(i,a);this.i._addDoubleVectorToInputSidePacket(i,n)})}addFloatVectorToInputSidePacket(e,t){U(this,t,n=>{const i=this.i._allocateFloatVector(e.length);if(!i)throw Error("Unable to allocate new float vector on heap.");for(const a of e)this.i._addFloatVectorEntry(i,a);this.i._addFloatVectorToInputSidePacket(i,n)})}addIntVectorToInputSidePacket(e,t){U(this,t,n=>{const i=this.i._allocateIntVector(e.length);if(!i)throw Error("Unable to allocate new int vector on heap.");for(const a of e)this.i._addIntVectorEntry(i,a);this.i._addIntVectorToInputSidePacket(i,n)})}addUintVectorToInputSidePacket(e,t){U(this,t,n=>{const i=this.i._allocateUintVector(e.length);if(!i)throw Error("Unable to allocate new unsigned int vector on heap.");for(const a of e)this.i._addUintVectorEntry(i,a);this.i._addUintVectorToInputSidePacket(i,n)})}addStringVectorToInputSidePacket(e,t){U(this,t,n=>{const i=this.i._allocateStringVector(e.length);if(!i)throw Error("Unable to allocate new string vector on heap.");for(const a of e)U(this,a,l=>{this.i._addStringVectorEntry(i,l)});this.i._addStringVectorToInputSidePacket(i,n)})}attachBoolListener(e,t){bn(this,e,t),U(this,e,n=>{this.i._attachBoolListener(n)})}attachBoolVectorListener(e,t){bi(this,e,t),U(this,e,n=>{this.i._attachBoolVectorListener(n)})}attachIntListener(e,t){bn(this,e,t),U(this,e,n=>{this.i._attachIntListener(n)})}attachIntVectorListener(e,t){bi(this,e,t),U(this,e,n=>{this.i._attachIntVectorListener(n)})}attachUintListener(e,t){bn(this,e,t),U(this,e,n=>{this.i._attachUintListener(n)})}attachUintVectorListener(e,t){bi(this,e,t),U(this,e,n=>{this.i._attachUintVectorListener(n)})}attachDoubleListener(e,t){bn(this,e,t),U(this,e,n=>{this.i._attachDoubleListener(n)})}attachDoubleVectorListener(e,t){bi(this,e,t),U(this,e,n=>{this.i._attachDoubleVectorListener(n)})}attachFloatListener(e,t){bn(this,e,t),U(this,e,n=>{this.i._attachFloatListener(n)})}attachFloatVectorListener(e,t){bi(this,e,t),U(this,e,n=>{this.i._attachFloatVectorListener(n)})}attachStringListener(e,t){bn(this,e,t),U(this,e,n=>{this.i._attachStringListener(n)})}attachStringVectorListener(e,t){bi(this,e,t),U(this,e,n=>{this.i._attachStringVectorListener(n)})}attachProtoListener(e,t,n){bn(this,e,t),U(this,e,i=>{this.i._attachProtoListener(i,n||!1)})}attachProtoVectorListener(e,t,n){bi(this,e,t),U(this,e,i=>{this.i._attachProtoVectorListener(i,n||!1)})}attachAudioListener(e,t,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),bn(this,e,(i,a)=>{i=new Float32Array(i.buffer,i.byteOffset,i.length/4),t(i,a)}),U(this,e,i=>{this.i._attachAudioListener(i,n||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends Q0{get ea(){return this.i}oa(e,t,n){U(this,t,i=>{const[a,l]=L0(this,e,i);this.ea._addBoundTextureAsImageToStream(i,a,l,n)})}V(e,t){bn(this,e,t),U(this,e,n=>{this.ea._attachImageListener(n)})}ba(e,t){bi(this,e,t),U(this,e,n=>{this.ea._attachImageVectorListener(n)})}}));var Q0,Ft=class extends Bp{};async function q(e,t,n){return async function(i,a,l,s){return zp(i,a,l,s)}(e,n.canvas??(D0()?void 0:document.createElement("canvas")),t,n)}function Z0(e,t,n,i){if(e.U){const l=new $1;if(n!=null&&n.regionOfInterest){if(!e.na)throw Error("This task doesn't support region-of-interest.");var a=n.regionOfInterest;if(a.left>=a.right||a.top>=a.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(a.left<0||a.top<0||a.right>1||a.bottom>1)throw Error("Expected RectF values to be in [0,1].");O(l,1,(a.left+a.right)/2),O(l,2,(a.top+a.bottom)/2),O(l,4,a.right-a.left),O(l,3,a.bottom-a.top)}else O(l,1,.5),O(l,2,.5),O(l,4,1),O(l,3,1);if(n!=null&&n.rotationDegrees){if((n==null?void 0:n.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(O(l,5,-Math.PI*n.rotationDegrees/180),(n==null?void 0:n.rotationDegrees)%180!=0){const[s,r]=O0(t);n=Ne(l,3)*r/s,a=Ne(l,4)*s/r,O(l,4,n),O(l,3,a)}}e.g.addProtoToStream(l.g(),"mediapipe.NormalizedRect",e.U,i)}e.g.oa(t,e.Z,i??performance.now()),e.finishProcessing()}function qt(e,t,n){var i;if((i=e.baseOptions)!=null&&i.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Z0(e,t,n,e.B+1)}function En(e,t,n,i){var a;if(!((a=e.baseOptions)!=null&&a.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Z0(e,t,n,i)}function $a(e,t,n,i){var a=t.data;const l=t.width,s=l*(t=t.height);if((a instanceof Uint8Array||a instanceof Float32Array)&&a.length!==s)throw Error("Unsupported channel count: "+a.length/s);return e=new Ve([a],n,!1,e.g.i.canvas,e.P,l,t),i?e.clone():e}var dt=class extends uf{constructor(e,t,n,i){super(e),this.g=e,this.Z=t,this.U=n,this.na=i,this.P=new hf}l(e,t=!0){if("runningMode"in e&&ts(this.baseOptions,2,!!e.runningMode&&e.runningMode!=="IMAGE"),e.canvas!==void 0&&this.g.i.canvas!==e.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(e,t)}close(){this.P.close(),super.close()}};dt.prototype.close=dt.prototype.close;var Yt=class extends dt{constructor(e,t){super(new Ft(e,t),"image_in","norm_rect_in",!1),this.j={detections:[]},z(e=this.h=new $r,0,1,t=new he),O(this.h,2,.5),O(this.h,3,.3)}get baseOptions(){return Z(this.h,he,1)}set baseOptions(e){z(this.h,0,1,e)}o(e){return"minDetectionConfidence"in e&&O(this.h,2,e.minDetectionConfidence??.5),"minSuppressionThreshold"in e&&O(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}D(e,t){return this.j={detections:[]},qt(this,e,t),this.j}F(e,t,n){return this.j={detections:[]},En(this,e,n,t),this.j}m(){var e=new ft;ue(e,"image_in"),ue(e,"norm_rect_in"),I(e,"detections");const t=new St;on(t,Ep,this.h);const n=new it;_t(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),se(n,"IMAGE:image_in"),se(n,"NORM_RECT:norm_rect_in"),Y(n,"DETECTIONS:detections"),n.o(t),Tt(e,n),this.g.attachProtoVectorListener("detections",(i,a)=>{for(const l of i)i=W1(l),this.j.detections.push(N0(i));C(this,a)}),this.g.attachEmptyPacketListener("detections",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Yt.prototype.detectForVideo=Yt.prototype.F,Yt.prototype.detect=Yt.prototype.D,Yt.prototype.setOptions=Yt.prototype.o,Yt.createFromModelPath=async function(e,t){return q(Yt,e,{baseOptions:{modelAssetPath:t}})},Yt.createFromModelBuffer=function(e,t){return q(Yt,e,{baseOptions:{modelAssetBuffer:t}})},Yt.createFromOptions=function(e,t){return q(Yt,e,t)};var pf=fn([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),yf=fn([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),vf=fn([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),K0=fn([474,475],[475,476],[476,477],[477,474]),bf=fn([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),xf=fn([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),I0=fn([469,470],[470,471],[471,472],[472,469]),Ef=fn([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),W0=[...pf,...yf,...vf,...bf,...xf,...Ef],J0=fn([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function P0(e){e.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var ye=class extends dt{constructor(e,t){super(new Ft(e,t),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,z(e=this.h=new r0,0,1,t=new he),this.v=new s0,z(this.h,0,3,this.v),this.s=new $r,z(this.h,0,2,this.s),vn(this.s,4,1),O(this.s,2,.5),O(this.v,2,.5),O(this.h,4,.5)}get baseOptions(){return Z(this.h,he,1)}set baseOptions(e){z(this.h,0,1,e)}o(e){return"numFaces"in e&&vn(this.s,4,e.numFaces??1),"minFaceDetectionConfidence"in e&&O(this.s,2,e.minFaceDetectionConfidence??.5),"minTrackingConfidence"in e&&O(this.h,4,e.minTrackingConfidence??.5),"minFacePresenceConfidence"in e&&O(this.v,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}D(e,t){return P0(this),qt(this,e,t),this.j}F(e,t,n){return P0(this),En(this,e,n,t),this.j}m(){var e=new ft;ue(e,"image_in"),ue(e,"norm_rect"),I(e,"face_landmarks");const t=new St;on(t,_p,this.h);const n=new it;_t(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),se(n,"IMAGE:image_in"),se(n,"NORM_RECT:norm_rect"),Y(n,"NORM_LANDMARKS:face_landmarks"),n.o(t),Tt(e,n),this.g.attachProtoVectorListener("face_landmarks",(i,a)=>{for(const l of i)i=ls(l),this.j.faceLandmarks.push(eo(i));C(this,a)}),this.g.attachEmptyPacketListener("face_landmarks",i=>{C(this,i)}),this.outputFaceBlendshapes&&(I(e,"blendshapes"),Y(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(i,a)=>{if(this.outputFaceBlendshapes)for(const l of i)i=Wr(l),this.j.faceBlendshapes.push(rf(i.g()??[]));C(this,a)}),this.g.attachEmptyPacketListener("blendshapes",i=>{C(this,i)})),this.outputFacialTransformationMatrixes&&(I(e,"face_geometry"),Y(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(i,a)=>{if(this.outputFacialTransformationMatrixes)for(const l of i)(i=Z(Sp(l),mp,2))&&this.j.facialTransformationMatrixes.push({rows:Ht(i,1)??0??0,columns:Ht(i,2)??0??0,data:$i(i,3,hi,Pi()).slice()??[]});C(this,a)}),this.g.attachEmptyPacketListener("face_geometry",i=>{C(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ye.prototype.detectForVideo=ye.prototype.F,ye.prototype.detect=ye.prototype.D,ye.prototype.setOptions=ye.prototype.o,ye.createFromModelPath=function(e,t){return q(ye,e,{baseOptions:{modelAssetPath:t}})},ye.createFromModelBuffer=function(e,t){return q(ye,e,{baseOptions:{modelAssetBuffer:t}})},ye.createFromOptions=function(e,t){return q(ye,e,t)},ye.FACE_LANDMARKS_LIPS=pf,ye.FACE_LANDMARKS_LEFT_EYE=yf,ye.FACE_LANDMARKS_LEFT_EYEBROW=vf,ye.FACE_LANDMARKS_LEFT_IRIS=K0,ye.FACE_LANDMARKS_RIGHT_EYE=bf,ye.FACE_LANDMARKS_RIGHT_EYEBROW=xf,ye.FACE_LANDMARKS_RIGHT_IRIS=I0,ye.FACE_LANDMARKS_FACE_OVAL=Ef,ye.FACE_LANDMARKS_CONTOURS=W0,ye.FACE_LANDMARKS_TESSELATION=J0;var Sn=class extends dt{constructor(e,t){super(new Ft(e,t),"image_in","norm_rect",!0),z(e=this.j=new u0,0,1,t=new he)}get baseOptions(){return Z(this.j,he,1)}set baseOptions(e){z(this.j,0,1,e)}o(e){return super.l(e)}Ka(e,t,n){const i=typeof t!="function"?t:{};if(this.h=typeof t=="function"?t:n,qt(this,e,i??{}),!this.h)return this.s}m(){var e=new ft;ue(e,"image_in"),ue(e,"norm_rect"),I(e,"stylized_image");const t=new St;on(t,Tp,this.j);const n=new it;_t(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),se(n,"IMAGE:image_in"),se(n,"NORM_RECT:norm_rect"),Y(n,"STYLIZED_IMAGE:stylized_image"),n.o(t),Tt(e,n),this.g.V("stylized_image",(i,a)=>{var l=!this.h,s=i.data,r=i.width;const o=r*(i=i.height);if(s instanceof Uint8Array)if(s.length===3*o){const c=new Uint8ClampedArray(4*o);for(let d=0;d<o;++d)c[4*d]=s[3*d],c[4*d+1]=s[3*d+1],c[4*d+2]=s[3*d+2],c[4*d+3]=255;s=new ImageData(c,r,i)}else{if(s.length!==4*o)throw Error("Unsupported channel count: "+s.length/o);s=new ImageData(new Uint8ClampedArray(s.buffer,s.byteOffset,s.length),r,i)}else if(!(s instanceof WebGLTexture))throw Error(`Unsupported format: ${s.constructor.name}`);r=new Fe([s],!1,!1,this.g.i.canvas,this.P,r,i),this.s=l=l?r.clone():r,this.h&&this.h(l),C(this,a)}),this.g.attachEmptyPacketListener("stylized_image",i=>{this.s=null,this.h&&this.h(null),C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Sn.prototype.stylize=Sn.prototype.Ka,Sn.prototype.setOptions=Sn.prototype.o,Sn.createFromModelPath=function(e,t){return q(Sn,e,{baseOptions:{modelAssetPath:t}})},Sn.createFromModelBuffer=function(e,t){return q(Sn,e,{baseOptions:{modelAssetBuffer:t}})},Sn.createFromOptions=function(e,t){return q(Sn,e,t)};var Sf=fn([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function $0(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function e3(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function t3(e,t=!0){const n=[];for(const a of e){var i=Wr(a);e=[];for(const l of i.g())i=t&&Ht(l,1)!=null?Ht(l,1)??0:-1,e.push({score:Ne(l,2)??0,index:i,categoryName:Vt(l,3)??""??"",displayName:Vt(l,4)??""??""});n.push(e)}return n}var At=class extends dt{constructor(e,t){super(new Ft(e,t),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],z(e=this.j=new d0,0,1,t=new he),this.s=new ef,z(this.j,0,2,this.s),this.C=new $c,z(this.s,0,3,this.C),this.v=new f0,z(this.s,0,2,this.v),this.h=new Ap,z(this.j,0,3,this.h),O(this.v,2,.5),O(this.s,4,.5),O(this.C,2,.5)}get baseOptions(){return Z(this.j,he,1)}set baseOptions(e){z(this.j,0,1,e)}o(e){var a,l,s,r;if(vn(this.v,3,e.numHands??1),"minHandDetectionConfidence"in e&&O(this.v,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&O(this.s,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&O(this.C,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new Ia,n=t,i=sf(e.cannedGesturesClassifierOptions,(a=Z(this.h,Ia,3))==null?void 0:a.h());z(n,0,2,i),z(this.h,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&((l=Z(this.h,Ia,3))==null||l.g());return e.customGesturesClassifierOptions?(z(n=t=new Ia,0,2,i=sf(e.customGesturesClassifierOptions,(s=Z(this.h,Ia,4))==null?void 0:s.h())),z(this.h,0,4,t)):e.customGesturesClassifierOptions===void 0&&((r=Z(this.h,Ia,4))==null||r.g()),this.l(e)}Fa(e,t){return $0(this),qt(this,e,t),e3(this)}Ga(e,t,n){return $0(this),En(this,e,n,t),e3(this)}m(){var e=new ft;ue(e,"image_in"),ue(e,"norm_rect"),I(e,"hand_gestures"),I(e,"hand_landmarks"),I(e,"world_hand_landmarks"),I(e,"handedness");const t=new St;on(t,Np,this.j);const n=new it;_t(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),se(n,"IMAGE:image_in"),se(n,"NORM_RECT:norm_rect"),Y(n,"HAND_GESTURES:hand_gestures"),Y(n,"LANDMARKS:hand_landmarks"),Y(n,"WORLD_LANDMARKS:world_hand_landmarks"),Y(n,"HANDEDNESS:handedness"),n.o(t),Tt(e,n),this.g.attachProtoVectorListener("hand_landmarks",(i,a)=>{for(const l of i){i=ls(l);const s=[];for(const r of zn(i,P1,1))s.push({x:Ne(r,1)??0,y:Ne(r,2)??0,z:Ne(r,3)??0,visibility:Ne(r,4)??0});this.landmarks.push(s)}C(this,a)}),this.g.attachEmptyPacketListener("hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("world_hand_landmarks",(i,a)=>{for(const l of i){i=Ka(l);const s=[];for(const r of zn(i,J1,1))s.push({x:Ne(r,1)??0,y:Ne(r,2)??0,z:Ne(r,3)??0,visibility:Ne(r,4)??0});this.worldLandmarks.push(s)}C(this,a)}),this.g.attachEmptyPacketListener("world_hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("hand_gestures",(i,a)=>{this.gestures.push(...t3(i,!1)),C(this,a)}),this.g.attachEmptyPacketListener("hand_gestures",i=>{C(this,i)}),this.g.attachProtoVectorListener("handedness",(i,a)=>{this.handedness.push(...t3(i)),C(this,a)}),this.g.attachEmptyPacketListener("handedness",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function n3(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}At.prototype.recognizeForVideo=At.prototype.Ga,At.prototype.recognize=At.prototype.Fa,At.prototype.setOptions=At.prototype.o,At.createFromModelPath=function(e,t){return q(At,e,{baseOptions:{modelAssetPath:t}})},At.createFromModelBuffer=function(e,t){return q(At,e,{baseOptions:{modelAssetBuffer:t}})},At.createFromOptions=function(e,t){return q(At,e,t)},At.HAND_CONNECTIONS=Sf;var Nt=class extends dt{constructor(e,t){super(new Ft(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],z(e=this.h=new ef,0,1,t=new he),this.s=new $c,z(this.h,0,3,this.s),this.j=new f0,z(this.h,0,2,this.j),vn(this.j,3,1),O(this.j,2,.5),O(this.s,2,.5),O(this.h,4,.5)}get baseOptions(){return Z(this.h,he,1)}set baseOptions(e){z(this.h,0,1,e)}o(e){return"numHands"in e&&vn(this.j,3,e.numHands??1),"minHandDetectionConfidence"in e&&O(this.j,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&O(this.h,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&O(this.s,2,e.minHandPresenceConfidence??.5),this.l(e)}D(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],qt(this,e,t),n3(this)}F(e,t,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],En(this,e,n,t),n3(this)}m(){var e=new ft;ue(e,"image_in"),ue(e,"norm_rect"),I(e,"hand_landmarks"),I(e,"world_hand_landmarks"),I(e,"handedness");const t=new St;on(t,jp,this.h);const n=new it;_t(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),se(n,"IMAGE:image_in"),se(n,"NORM_RECT:norm_rect"),Y(n,"LANDMARKS:hand_landmarks"),Y(n,"WORLD_LANDMARKS:world_hand_landmarks"),Y(n,"HANDEDNESS:handedness"),n.o(t),Tt(e,n),this.g.attachProtoVectorListener("hand_landmarks",(i,a)=>{for(const l of i)i=ls(l),this.landmarks.push(eo(i));C(this,a)}),this.g.attachEmptyPacketListener("hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("world_hand_landmarks",(i,a)=>{for(const l of i)i=Ka(l),this.worldLandmarks.push(ss(i));C(this,a)}),this.g.attachEmptyPacketListener("world_hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("handedness",(i,a)=>{var l=this.handedness,s=l.push;const r=[];for(const o of i){i=Wr(o);const c=[];for(const d of i.g())c.push({score:Ne(d,2)??0,index:Ht(d,1)??0??-1,categoryName:Vt(d,3)??""??"",displayName:Vt(d,4)??""??""});r.push(c)}s.call(l,...r),C(this,a)}),this.g.attachEmptyPacketListener("handedness",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Nt.prototype.detectForVideo=Nt.prototype.F,Nt.prototype.detect=Nt.prototype.D,Nt.prototype.setOptions=Nt.prototype.o,Nt.createFromModelPath=function(e,t){return q(Nt,e,{baseOptions:{modelAssetPath:t}})},Nt.createFromModelBuffer=function(e,t){return q(Nt,e,{baseOptions:{modelAssetBuffer:t}})},Nt.createFromOptions=function(e,t){return q(Nt,e,t)},Nt.HAND_CONNECTIONS=Sf;var i3=fn([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function a3(e){e.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function l3(e){try{if(!e.C)return e.h;e.C(e.h)}finally{io(e)}}function co(e,t){e=ls(e),t.push(eo(e))}var me=class extends dt{constructor(e,t){super(new Ft(e,t),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,z(e=this.j=new y0,0,1,t=new he),this.K=new $c,z(this.j,0,2,this.K),this.Y=new Mp,z(this.j,0,3,this.Y),this.s=new $r,z(this.j,0,4,this.s),this.H=new s0,z(this.j,0,5,this.H),this.v=new g0,z(this.j,0,6,this.v),this.L=new p0,z(this.j,0,7,this.L),O(this.s,2,.5),O(this.s,3,.3),O(this.H,2,.5),O(this.v,2,.5),O(this.v,3,.3),O(this.L,2,.5),O(this.K,2,.5)}get baseOptions(){return Z(this.j,he,1)}set baseOptions(e){z(this.j,0,1,e)}o(e){return"minFaceDetectionConfidence"in e&&O(this.s,2,e.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in e&&O(this.s,3,e.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in e&&O(this.H,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"minPoseDetectionConfidence"in e&&O(this.v,2,e.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in e&&O(this.v,3,e.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in e&&O(this.L,2,e.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in e&&O(this.K,2,e.minHandLandmarksConfidence??.5),this.l(e)}D(e,t,n){const i=typeof t!="function"?t:{};return this.C=typeof t=="function"?t:n,a3(this),qt(this,e,i),l3(this)}F(e,t,n,i){const a=typeof n!="function"?n:{};return this.C=typeof n=="function"?n:i,a3(this),En(this,e,a,t),l3(this)}m(){var e=new ft;ue(e,"input_frames_image"),I(e,"pose_landmarks"),I(e,"pose_world_landmarks"),I(e,"face_landmarks"),I(e,"left_hand_landmarks"),I(e,"left_hand_world_landmarks"),I(e,"right_hand_landmarks"),I(e,"right_hand_world_landmarks");const t=new St,n=new L1;xc(n,1,za("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(a,l){if(l!=null)if(Array.isArray(l))le(a,2,Dr(l,pc,void 0,void 0,!1));else{if(!(typeof l=="string"||l instanceof On||Ii(l)))throw Error("invalid value in Any.value field: "+l+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");xc(a,2,ac(l,!1),Wi())}}(n,this.j.g());const i=new it;_t(i,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),zr(i,8,L1,n),se(i,"IMAGE:input_frames_image"),Y(i,"POSE_LANDMARKS:pose_landmarks"),Y(i,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),Y(i,"FACE_LANDMARKS:face_landmarks"),Y(i,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),Y(i,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),Y(i,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),Y(i,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),i.o(t),Tt(e,i),no(this,e),this.g.attachProtoListener("pose_landmarks",(a,l)=>{co(a,this.h.poseLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("pose_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("pose_world_landmarks",(a,l)=>{var s=this.h.poseWorldLandmarks;a=Ka(a),s.push(ss(a)),C(this,l)}),this.g.attachEmptyPacketListener("pose_world_landmarks",a=>{C(this,a)}),this.outputPoseSegmentationMasks&&(Y(i,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),Wa(this,"pose_segmentation_mask"),this.g.V("pose_segmentation_mask",(a,l)=>{this.h.poseSegmentationMasks=[$a(this,a,!0,!this.C)],C(this,l)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",a=>{this.h.poseSegmentationMasks=[],C(this,a)})),this.g.attachProtoListener("face_landmarks",(a,l)=>{co(a,this.h.faceLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("face_landmarks",a=>{C(this,a)}),this.outputFaceBlendshapes&&(I(e,"extra_blendshapes"),Y(i,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(a,l)=>{var s=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(a=Wr(a),s.push(rf(a.g()??[]))),C(this,l)}),this.g.attachEmptyPacketListener("extra_blendshapes",a=>{C(this,a)})),this.g.attachProtoListener("left_hand_landmarks",(a,l)=>{co(a,this.h.leftHandLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("left_hand_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("left_hand_world_landmarks",(a,l)=>{var s=this.h.leftHandWorldLandmarks;a=Ka(a),s.push(ss(a)),C(this,l)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("right_hand_landmarks",(a,l)=>{co(a,this.h.rightHandLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("right_hand_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("right_hand_world_landmarks",(a,l)=>{var s=this.h.rightHandWorldLandmarks;a=Ka(a),s.push(ss(a)),C(this,l)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",a=>{C(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};me.prototype.detectForVideo=me.prototype.F,me.prototype.detect=me.prototype.D,me.prototype.setOptions=me.prototype.o,me.createFromModelPath=function(e,t){return q(me,e,{baseOptions:{modelAssetPath:t}})},me.createFromModelBuffer=function(e,t){return q(me,e,{baseOptions:{modelAssetBuffer:t}})},me.createFromOptions=function(e,t){return q(me,e,t)},me.HAND_CONNECTIONS=Sf,me.POSE_CONNECTIONS=i3,me.FACE_LANDMARKS_LIPS=pf,me.FACE_LANDMARKS_LEFT_EYE=yf,me.FACE_LANDMARKS_LEFT_EYEBROW=vf,me.FACE_LANDMARKS_LEFT_IRIS=K0,me.FACE_LANDMARKS_RIGHT_EYE=bf,me.FACE_LANDMARKS_RIGHT_EYEBROW=xf,me.FACE_LANDMARKS_RIGHT_IRIS=I0,me.FACE_LANDMARKS_FACE_OVAL=Ef,me.FACE_LANDMARKS_CONTOURS=W0,me.FACE_LANDMARKS_TESSELATION=J0;var Xt=class extends dt{constructor(e,t){super(new Ft(e,t),"input_image","norm_rect",!0),this.j={classifications:[]},z(e=this.h=new v0,0,1,t=new he)}get baseOptions(){return Z(this.h,he,1)}set baseOptions(e){z(this.h,0,1,e)}o(e){return z(this.h,0,2,sf(e,Z(this.h,Wc,2))),this.l(e)}qa(e,t){return this.j={classifications:[]},qt(this,e,t),this.j}ra(e,t,n){return this.j={classifications:[]},En(this,e,n,t),this.j}m(){var e=new ft;ue(e,"input_image"),ue(e,"norm_rect"),I(e,"classifications");const t=new St;on(t,Cp,this.h);const n=new it;_t(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),se(n,"IMAGE:input_image"),se(n,"NORM_RECT:norm_rect"),Y(n,"CLASSIFICATIONS:classifications"),n.o(t),Tt(e,n),this.g.attachProtoListener("classifications",(i,a)=>{this.j=function(l){const s={classifications:zn(l,gp,1).map(r=>{var o;return rf(((o=Z(r,K1,4))==null?void 0:o.g())??[],Ht(r,2)??0,Vt(r,3)??"")})};return dc(Ba(l,2))!=null&&(s.timestampMs=dc(Ba(l,2))??0),s}(pp(i)),C(this,a)}),this.g.attachEmptyPacketListener("classifications",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Xt.prototype.classifyForVideo=Xt.prototype.ra,Xt.prototype.classify=Xt.prototype.qa,Xt.prototype.setOptions=Xt.prototype.o,Xt.createFromModelPath=function(e,t){return q(Xt,e,{baseOptions:{modelAssetPath:t}})},Xt.createFromModelBuffer=function(e,t){return q(Xt,e,{baseOptions:{modelAssetBuffer:t}})},Xt.createFromOptions=function(e,t){return q(Xt,e,t)};var jt=class extends dt{constructor(e,t){super(new Ft(e,t),"image_in","norm_rect",!0),this.h=new b0,this.embeddings={embeddings:[]},z(e=this.h,0,1,t=new he)}get baseOptions(){return Z(this.h,he,1)}set baseOptions(e){z(this.h,0,1,e)}o(e){var t=this.h,n=Z(this.h,i0,2);return n=n?n.clone():new i0,e.l2Normalize!==void 0?ts(n,1,e.l2Normalize):"l2Normalize"in e&&le(n,1),e.quantize!==void 0?ts(n,2,e.quantize):"quantize"in e&&le(n,2),z(t,0,2,n),this.l(e)}xa(e,t){return qt(this,e,t),this.embeddings}ya(e,t,n){return En(this,e,n,t),this.embeddings}m(){var e=new ft;ue(e,"image_in"),ue(e,"norm_rect"),I(e,"embeddings_out");const t=new St;on(t,Dp,this.h);const n=new it;_t(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),se(n,"IMAGE:image_in"),se(n,"NORM_RECT:norm_rect"),Y(n,"EMBEDDINGS:embeddings_out"),n.o(t),Tt(e,n),this.g.attachProtoListener("embeddings_out",(i,a)=>{i=bp(i),this.embeddings=function(l){return{embeddings:zn(l,vp,1).map(s=>{var o,c;const r={headIndex:Ht(s,3)??0??-1,headName:Vt(s,4)??""??""};if(t1(s,e0,Ec(s,1))!==void 0)s=$i(s=Z(s,e0,Ec(s,1)),1,hi,Pi()),r.floatEmbedding=s.slice();else{const d=new Uint8Array(0);r.quantizedEmbedding=((c=(o=Z(s,yp,Ec(s,2)))==null?void 0:o.ma())==null?void 0:c.h())??d}return r}),timestampMs:dc(Ba(l,2))??0}}(i),C(this,a)}),this.g.attachEmptyPacketListener("embeddings_out",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};jt.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=M0(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");e=M0(j0(e.quantizedEmbedding),j0(t.quantizedEmbedding))}return e},jt.prototype.embedForVideo=jt.prototype.ya,jt.prototype.embed=jt.prototype.xa,jt.prototype.setOptions=jt.prototype.o,jt.createFromModelPath=function(e,t){return q(jt,e,{baseOptions:{modelAssetPath:t}})},jt.createFromModelBuffer=function(e,t){return q(jt,e,{baseOptions:{modelAssetBuffer:t}})},jt.createFromOptions=function(e,t){return q(jt,e,t)};var _f=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach(n=>{n.close()}),(t=this.categoryMask)==null||t.close()}};function s3(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function r3(e){try{const t=new _f(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{io(e)}}_f.prototype.close=_f.prototype.close;var ht=class extends dt{constructor(e,t){super(new Ft(e,t),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new lf,this.v=new x0,z(this.h,0,3,this.v),z(e=this.h,0,1,t=new he)}get baseOptions(){return Z(this.h,he,1)}set baseOptions(e){z(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?le(this.h,2,za(e.displayNamesLocale)):"displayNamesLocale"in e&&le(this.h,2),"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}J(){(function(e){var n,i;const t=zn(e.ca(),it,1).filter(a=>(Vt(a,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(e.s=[],t.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");t.length===1&&(((i=(n=Z(t[0],St,7))==null?void 0:n.l())==null?void 0:i.g())??new Map).forEach((a,l)=>{e.s[Number(l)]=Vt(a,1)??""})})(this)}segment(e,t,n){const i=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:n,s3(this),qt(this,e,i),r3(this)}Ia(e,t,n,i){const a=typeof n!="function"?n:{};return this.j=typeof n=="function"?n:i,s3(this),En(this,e,a,t),r3(this)}Ba(){return this.s}m(){var e=new ft;ue(e,"image_in"),ue(e,"norm_rect");const t=new St;on(t,_0,this.h);const n=new it;_t(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),se(n,"IMAGE:image_in"),se(n,"NORM_RECT:norm_rect"),n.o(t),Tt(e,n),no(this,e),this.outputConfidenceMasks&&(I(e,"confidence_masks"),Y(n,"CONFIDENCE_MASKS:confidence_masks"),Wa(this,"confidence_masks"),this.g.ba("confidence_masks",(i,a)=>{this.confidenceMasks=i.map(l=>$a(this,l,!0,!this.j)),C(this,a)}),this.g.attachEmptyPacketListener("confidence_masks",i=>{this.confidenceMasks=[],C(this,i)})),this.outputCategoryMask&&(I(e,"category_mask"),Y(n,"CATEGORY_MASK:category_mask"),Wa(this,"category_mask"),this.g.V("category_mask",(i,a)=>{this.categoryMask=$a(this,i,!1,!this.j),C(this,a)}),this.g.attachEmptyPacketListener("category_mask",i=>{this.categoryMask=void 0,C(this,i)})),I(e,"quality_scores"),Y(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(i,a)=>{this.qualityScores=i,C(this,a)}),this.g.attachEmptyPacketListener("quality_scores",i=>{this.categoryMask=void 0,C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ht.prototype.getLabels=ht.prototype.Ba,ht.prototype.segmentForVideo=ht.prototype.Ia,ht.prototype.segment=ht.prototype.segment,ht.prototype.setOptions=ht.prototype.o,ht.createFromModelPath=function(e,t){return q(ht,e,{baseOptions:{modelAssetPath:t}})},ht.createFromModelBuffer=function(e,t){return q(ht,e,{baseOptions:{modelAssetBuffer:t}})},ht.createFromOptions=function(e,t){return q(ht,e,t)};var Tf=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach(n=>{n.close()}),(t=this.categoryMask)==null||t.close()}};Tf.prototype.close=Tf.prototype.close;var Gp=class extends k{constructor(e){super(e)}},el=[0,Ee,-2],fo=[0,Gn,-3,de,Gn,-1],o3=[0,fo],u3=[0,fo,Ee,-1],Af=class extends k{constructor(e){super(e)}},c3=[0,Gn,-1,de],Hp=class extends k{constructor(e){super(e)}},f3=class extends k{constructor(e){super(e)}},Nf=[1,2,3,4,5,6,7,8,9,10,14,15],d3=class extends k{constructor(e){super(e)}};d3.prototype.g=Ir([0,Re,[0,Nf,$,fo,$,[0,fo,el],$,o3,$,[0,o3,el],$,c3,$,[0,Gn,-3,de,Et],$,[0,Gn,-3,de],$,[0,P,Gn,-2,de,Ee,de,-1,2,Gn,el],$,u3,$,[0,u3,el],Gn,el,P,$,[0,Gn,-3,de,el,-1],$,[0,Re,c3]],P,[0,P,Ee,-1,de]]);var _n=class extends dt{constructor(e,t){super(new Ft(e,t),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new lf,this.s=new x0,z(this.h,0,3,this.s),z(e=this.h,0,1,t=new he)}get baseOptions(){return Z(this.h,he,1)}set baseOptions(e){z(this.h,0,1,e)}o(e){return"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}segment(e,t,n,i){const a=typeof n!="function"?n:{};this.j=typeof n=="function"?n:i,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.B+1,i=new d3;const l=new f3;var s=new Gp;if(vn(s,1,255),z(l,0,12,s),t.keypoint&&t.scribble)throw Error("Cannot provide both keypoint and scribble.");if(t.keypoint){var r=new Af;ts(r,3,!0),O(r,1,t.keypoint.x),O(r,2,t.keypoint.y),es(l,5,Nf,r)}else{if(!t.scribble)throw Error("Must provide either a keypoint or a scribble.");for(r of(s=new Hp,t.scribble))ts(t=new Af,3,!0),O(t,1,r.x),O(t,2,r.y),zr(s,1,Af,t);es(l,15,Nf,s)}zr(i,1,f3,l),this.g.addProtoToStream(i.g(),"drishti.RenderData","roi_in",n),qt(this,e,a);e:{try{const c=new Tf(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var o=c;break e}this.j(c)}finally{io(this)}o=void 0}return o}m(){var e=new ft;ue(e,"image_in"),ue(e,"roi_in"),ue(e,"norm_rect_in");const t=new St;on(t,_0,this.h);const n=new it;_t(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),se(n,"IMAGE:image_in"),se(n,"ROI:roi_in"),se(n,"NORM_RECT:norm_rect_in"),n.o(t),Tt(e,n),no(this,e),this.outputConfidenceMasks&&(I(e,"confidence_masks"),Y(n,"CONFIDENCE_MASKS:confidence_masks"),Wa(this,"confidence_masks"),this.g.ba("confidence_masks",(i,a)=>{this.confidenceMasks=i.map(l=>$a(this,l,!0,!this.j)),C(this,a)}),this.g.attachEmptyPacketListener("confidence_masks",i=>{this.confidenceMasks=[],C(this,i)})),this.outputCategoryMask&&(I(e,"category_mask"),Y(n,"CATEGORY_MASK:category_mask"),Wa(this,"category_mask"),this.g.V("category_mask",(i,a)=>{this.categoryMask=$a(this,i,!1,!this.j),C(this,a)}),this.g.attachEmptyPacketListener("category_mask",i=>{this.categoryMask=void 0,C(this,i)})),I(e,"quality_scores"),Y(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(i,a)=>{this.qualityScores=i,C(this,a)}),this.g.attachEmptyPacketListener("quality_scores",i=>{this.categoryMask=void 0,C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};_n.prototype.segment=_n.prototype.segment,_n.prototype.setOptions=_n.prototype.o,_n.createFromModelPath=function(e,t){return q(_n,e,{baseOptions:{modelAssetPath:t}})},_n.createFromModelBuffer=function(e,t){return q(_n,e,{baseOptions:{modelAssetBuffer:t}})},_n.createFromOptions=function(e,t){return q(_n,e,t)};var Qt=class extends dt{constructor(e,t){super(new Ft(e,t),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},z(e=this.h=new T0,0,1,t=new he)}get baseOptions(){return Z(this.h,he,1)}set baseOptions(e){z(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?le(this.h,2,za(e.displayNamesLocale)):"displayNamesLocale"in e&&le(this.h,2),e.maxResults!==void 0?vn(this.h,3,e.maxResults):"maxResults"in e&&le(this.h,3),e.scoreThreshold!==void 0?O(this.h,4,e.scoreThreshold):"scoreThreshold"in e&&le(this.h,4),e.categoryAllowlist!==void 0?Rr(this.h,5,e.categoryAllowlist):"categoryAllowlist"in e&&le(this.h,5),e.categoryDenylist!==void 0?Rr(this.h,6,e.categoryDenylist):"categoryDenylist"in e&&le(this.h,6),this.l(e)}D(e,t){return this.j={detections:[]},qt(this,e,t),this.j}F(e,t,n){return this.j={detections:[]},En(this,e,n,t),this.j}m(){var e=new ft;ue(e,"input_frame_gpu"),ue(e,"norm_rect"),I(e,"detections");const t=new St;on(t,Op,this.h);const n=new it;_t(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),se(n,"IMAGE:input_frame_gpu"),se(n,"NORM_RECT:norm_rect"),Y(n,"DETECTIONS:detections"),n.o(t),Tt(e,n),this.g.attachProtoVectorListener("detections",(i,a)=>{for(const l of i)i=W1(l),this.j.detections.push(N0(i));C(this,a)}),this.g.attachEmptyPacketListener("detections",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Qt.prototype.detectForVideo=Qt.prototype.F,Qt.prototype.detect=Qt.prototype.D,Qt.prototype.setOptions=Qt.prototype.o,Qt.createFromModelPath=async function(e,t){return q(Qt,e,{baseOptions:{modelAssetPath:t}})},Qt.createFromModelBuffer=function(e,t){return q(Qt,e,{baseOptions:{modelAssetBuffer:t}})},Qt.createFromOptions=function(e,t){return q(Qt,e,t)};var jf=class{constructor(e,t,n){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=n}close(){var e;(e=this.segmentationMasks)==null||e.forEach(t=>{t.close()})}};function h3(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function m3(e){try{const t=new jf(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.s)return t;e.s(t)}finally{io(e)}}jf.prototype.close=jf.prototype.close;var Mt=class extends dt{constructor(e,t){super(new Ft(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,z(e=this.h=new A0,0,1,t=new he),this.v=new p0,z(this.h,0,3,this.v),this.j=new g0,z(this.h,0,2,this.j),vn(this.j,4,1),O(this.j,2,.5),O(this.v,2,.5),O(this.h,4,.5)}get baseOptions(){return Z(this.h,he,1)}set baseOptions(e){z(this.h,0,1,e)}o(e){return"numPoses"in e&&vn(this.j,4,e.numPoses??1),"minPoseDetectionConfidence"in e&&O(this.j,2,e.minPoseDetectionConfidence??.5),"minTrackingConfidence"in e&&O(this.h,4,e.minTrackingConfidence??.5),"minPosePresenceConfidence"in e&&O(this.v,2,e.minPosePresenceConfidence??.5),"outputSegmentationMasks"in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}D(e,t,n){const i=typeof t!="function"?t:{};return this.s=typeof t=="function"?t:n,h3(this),qt(this,e,i),m3(this)}F(e,t,n,i){const a=typeof n!="function"?n:{};return this.s=typeof n=="function"?n:i,h3(this),En(this,e,a,t),m3(this)}m(){var e=new ft;ue(e,"image_in"),ue(e,"norm_rect"),I(e,"normalized_landmarks"),I(e,"world_landmarks"),I(e,"segmentation_masks");const t=new St;on(t,Lp,this.h);const n=new it;_t(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),se(n,"IMAGE:image_in"),se(n,"NORM_RECT:norm_rect"),Y(n,"NORM_LANDMARKS:normalized_landmarks"),Y(n,"WORLD_LANDMARKS:world_landmarks"),n.o(t),Tt(e,n),no(this,e),this.g.attachProtoVectorListener("normalized_landmarks",(i,a)=>{this.landmarks=[];for(const l of i)i=ls(l),this.landmarks.push(eo(i));C(this,a)}),this.g.attachEmptyPacketListener("normalized_landmarks",i=>{this.landmarks=[],C(this,i)}),this.g.attachProtoVectorListener("world_landmarks",(i,a)=>{this.worldLandmarks=[];for(const l of i)i=Ka(l),this.worldLandmarks.push(ss(i));C(this,a)}),this.g.attachEmptyPacketListener("world_landmarks",i=>{this.worldLandmarks=[],C(this,i)}),this.outputSegmentationMasks&&(Y(n,"SEGMENTATION_MASK:segmentation_masks"),Wa(this,"segmentation_masks"),this.g.ba("segmentation_masks",(i,a)=>{this.segmentationMasks=i.map(l=>$a(this,l,!0,!this.s)),C(this,a)}),this.g.attachEmptyPacketListener("segmentation_masks",i=>{this.segmentationMasks=[],C(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Mt.prototype.detectForVideo=Mt.prototype.F,Mt.prototype.detect=Mt.prototype.D,Mt.prototype.setOptions=Mt.prototype.o,Mt.createFromModelPath=function(e,t){return q(Mt,e,{baseOptions:{modelAssetPath:t}})},Mt.createFromModelBuffer=function(e,t){return q(Mt,e,{baseOptions:{modelAssetBuffer:t}})},Mt.createFromOptions=function(e,t){return q(Mt,e,t)},Mt.POSE_CONNECTIONS=i3;const ho="https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task",Vp="https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm",Fp=()=>{const e=p.useRef(null),[t,n]=p.useState(!1),[i,a]=p.useState("Initializing..."),[l,s]=p.useState(0),[r,o]=p.useState(!1);p.useEffect(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(f=>{console.log("ServiceWorker registered:",f)}).catch(f=>{console.log("ServiceWorker registration failed:",f)})},[]);const c=async()=>"caches"in window?await(await caches.open("mediapipe-models-v1")).match(ho)!==void 0:!1,d=async()=>{try{const f=await fetch(ho),w=f.headers.get("content-length"),v=w?parseInt(w,10):0;if(!f.body)throw new Error("No response body");const x=f.body.getReader();let _=0;const m=[];for(;;){const{done:g,value:y}=await x.read();if(g)break;if(m.push(y),_+=y.length,v){const b=Math.round(_/v*100);s(b),a(`Downloading model... ${b}%`)}}return"caches"in window&&await(await caches.open("mediapipe-models-v1")).put(ho,new Response(new Blob(m),{headers:{"Content-Type":"application/octet-stream"}})),!0}catch(f){return console.error("Failed to preload model:",f),!1}};return p.useEffect(()=>{(async()=>{try{a("Checking cached models..."),await c()?a("Using cached model..."):(a("Model not cached. Downloading..."),await d()),a("Loading MediaPipe WASM...");const v=await na.forVisionTasks(Vp);a("Creating face landmarker...");const x=await ye.createFromOptions(v,{baseOptions:{modelAssetPath:ho,delegate:"GPU"},runningMode:"VIDEO",outputFaceBlendshapes:!0,numFaces:2});e.current=x,n(!0),a("Model loaded successfully ✅")}catch(w){console.error("Model init error:",w),a(`Error: ${w==null?void 0:w.message}`),(w==null?void 0:w.name)==="NotAllowedError"&&o(!0)}})()},[]),{faceLandmarkerRef:e,isModelLoaded:t,statusMessage:i,setStatusMessage:a,loadingProgress:l,permissionDenied:r,clearCache:async()=>{"caches"in window&&(await caches.delete("mediapipe-models-v1"),a("Cache cleared. Please refresh to re-download models."))}}},qp=()=>{const[e,t]=p.useState(0),n=p.useRef({lastTime:0,frames:0,fps:0}),i=p.useCallback(()=>{const a=performance.now(),l=n.current;if(l.frames++,a-l.lastTime>=1e3){const s=Math.round(l.frames*1e3/(a-l.lastTime));t(s),l.frames=0,l.lastTime=a}},[]);return{fps:e,updateFPS:i}},Yp=()=>{const e=p.useRef({value:100,isLookingAway:!1}),t=p.useCallback((l,s,r,o)=>{if(!l||!r||!s)return;const c=l.getContext("2d");if(!c)return;const{width:d,height:h}=l;if(c.clearRect(0,0,d,h),c.drawImage(s,0,0,d,h),o){c.fillStyle="#00FF00";for(const f of r)c.fillRect(f.x*d-.5,f.y*h-.5,1,1)}},[]),n=p.useCallback(l=>{const s=e.current.value/100,r=100,o=20,c=20,d=40;l.fillStyle="rgba(0, 0, 0, 0.3)",l.fillRect(c,d,o,r),l.fillStyle=`rgba(${Math.floor(255*(1-s))}, ${Math.floor(255*s)}, 0, 0.8)`;const h=r*s;l.fillRect(c,d+r-h,o,h),l.fillStyle="#FFFFFF",l.fillRect(c,d+r*(1-s),o,2)},[]),i=p.useCallback((l,s,r,o,c,d,h)=>{if(t(l,s,r,o),c&&d&&h){const f=l.getContext("2d");f&&n(f)}},[t,n]),a=p.useCallback((l,s)=>{const r=l.getContext("2d");r&&(r.clearRect(0,0,l.width,l.height),r.drawImage(s,0,0,l.width,l.height))},[]);return{drawLandmarks:t,drawEngagementBar:n,drawWithEngagementBar:i,clearCanvas:a,engagementRef:e}},Xp=50,Qp=()=>{const[e,t]=p.useState(100),[n,i]=p.useState(!1),a=p.useRef(0),l=p.useCallback((s,r,o)=>{if(!o||s.length<468)return;const c=s[33],d=s[263],h=s[1];if(!c||!d||!h)return;const f=(c.x+d.x)*.5,w=(c.y+d.y)*.5,v=f-r.x,x=w-r.y,_=Math.sqrt(v*v+x*x),m=Math.abs(h.y-r.noseY)*100,g=Math.abs(h.x-r.noseX)*100,y=Math.max(0,100-(_*200+m+g)),b=y<Xp,S=performance.now();return S-a.current>100&&(t(y),i(b),a.current=S),{engagement:y,isLookingAway:b}},[]);return{engagement:e,isLookingAway:n,analyzeGaze:l,setEngagement:t,setIsLookingAway:i}},Zp=.05,Kp=()=>{const[e,t]=p.useState(!1),[n,i]=p.useState(!1),a=p.useCallback((r,o)=>Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),[]),l=p.useCallback((r,o)=>{if(!r||!o)return 0;const c=[1,33,263,61,291,10,152];let d=0,h=0;const f=o[33],w=o[263],v=r[33],x=r[263];if(!f||!w||!v||!x)return 0;const _=a(f,w),m=a(v,x);if(_===0||m===0)return 0;for(const y of c){const b=o[y],S=r[y];if(b&&S){const A=f.x+(S.x-v.x)*_/m,T=f.y+(S.y-v.y)*_/m;d+=a(b,{x:A,y:T}),h++}}return h===0?0:d/h},[a]),s=p.useCallback((r,o,c,d)=>{if(!r.faceLandmarks||r.faceLandmarks.length===0)return o?(d("Reference face not detected."),i(!0),t(!1)):i(!1),null;if(o&&c){let h=null,f=0;for(const w of r.faceLandmarks)l(w,c)<Zp&&(h=w,f++);return f===1?(t(!1),i(!1),d("Reference face tracked."),h):f>1?(t(!0),i(!1),d("Multiple matching faces detected. Tracking suspended."),null):(t(!1),i(!0),d("Reference face not detected."),null)}else{r.faceLandmarks.length>1?(t(!0),d("Multiple faces detected. Set reference for single face tracking.")):(t(!1),d("No reference set. Detecting first face."));const h=r.faceLandmarks[0];return!h||h.length<468?null:h}},[l]);return{multipleFacesDetected:e,referenceFaceNotDetected:n,analyzeFace:s,setMultipleFacesDetected:t,setReferenceFaceNotDetected:i}},Ip=1e3,Wp=(e,t)=>{const[n,i]=p.useState(!1),[a,l]=p.useState("face_detected"),{incrementGazeViolation:s}=th(),{multipleFacesDetected:r,referenceFaceNotDetected:o,isLookingAway:c}=e;p.useEffect(()=>{let f;return(c||r||o)&&t?f=setTimeout(()=>{i(!0),c?(l("looking_away"),s("looking_away")):r?(l("multiple_faces"),s("multiple_faces")):o&&(l("no_face_detected"),s("no_face_detected"))},Ip):(i(!1),l("face_detected")),()=>{clearTimeout(f)}},[c,r,o,t,s]);const d=p.useCallback(()=>r?"multiple_faces":o?"no_face_detected":c?"looking_away":"face_detected",[r,o,c]),h=p.useCallback(()=>{i(!1),l("face_detected")},[]);return{showGazeWarningModal:n,faceDetectionState:a,getWarningType:d,closeWarningModal:h,setShowGazeWarningModal:i,setFaceDetectionState:l}};class Se extends Error{constructor(t,n,i=!1){super(t),this.code=n,this.recoverable=i,this.name="STTError"}}class Jp{constructor(t={}){Bt(this,"config");Bt(this,"mediaRecorder",null);Bt(this,"audioChunks",[]);Bt(this,"recordingStream",null);Bt(this,"autoStopTimeoutId",null);this.config={baseUrl:"http://localhost:8000",provider:"groq",model:"whisper-large-v3-turbo",language:"en",includeTimestamps:!1,temperature:0,...t}}updateConfig(t){this.config={...this.config,...t}}isRecordingSupported(){return!!(navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia=="function"&&window.MediaRecorder)}async startRecording(t,n){var i;if(!this.isRecordingSupported())throw new Se("Audio recording is not supported in this browser","RECORDING_NOT_SUPPORTED",!1);if(this.isRecording())throw new Se("Recording is already in progress","ALREADY_RECORDING",!0);try{this.recordingStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,sampleRate:44100}}),this.audioChunks=[];const a=this.getSupportedMimeType();this.mediaRecorder=new MediaRecorder(this.recordingStream,{mimeType:a}),this.mediaRecorder.ondataavailable=l=>{var s;l.data.size>0&&(this.audioChunks.push(l.data),(s=n==null?void 0:n.onDataAvailable)==null||s.call(n,l.data))},this.mediaRecorder.onstop=()=>{var l;(l=n==null?void 0:n.onStop)==null||l.call(n)},this.mediaRecorder.onerror=l=>{var r;const s=new Se(`Recording failed: ${l.error}`,"RECORDING_ERROR",!0);(r=n==null?void 0:n.onError)==null||r.call(n,s),this.cleanup()},this.mediaRecorder.start(100),(i=n==null?void 0:n.onStart)==null||i.call(n),t&&t>0&&(this.autoStopTimeoutId=setTimeout(()=>{this.isRecording()&&this.stopRecording()},t*1e3))}catch(a){if(this.cleanup(),a instanceof Error){if(a.name==="NotAllowedError"||a.name==="PermissionDeniedError")throw new Se("Microphone permission was denied","PERMISSION_DENIED",!1);if(a.name==="NotFoundError")throw new Se("No microphone found","NO_MICROPHONE",!1)}throw new Se(`Failed to start recording: ${a instanceof Error?a.message:String(a)}`,"START_RECORDING_FAILED",!0)}}async stopRecording(){if(this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null),!this.mediaRecorder||!this.isRecording())throw new Se("No active recording to stop","NO_ACTIVE_RECORDING",!1);return new Promise((t,n)=>{if(!this.mediaRecorder){n(new Se("MediaRecorder is null","MEDIARECORDER_NULL",!1));return}const i=this.mediaRecorder,a=()=>{try{const l=i.mimeType||"audio/webm",s=new Blob(this.audioChunks,{type:l});this.cleanup(),t(s)}catch(l){n(new Se(`Failed to create audio blob: ${l instanceof Error?l.message:String(l)}`,"BLOB_CREATION_FAILED",!1))}};i.addEventListener("stop",a,{once:!0}),i.stop()})}async transcribe(t){const{audioBlob:n}=t;if(!n||n.size===0)throw new Se("Audio blob is empty or invalid","INVALID_AUDIO",!1);try{const i=new FormData,a=new File([n],"recording.wav",{type:n.type||"audio/wav"});if(i.append("file",a),i.append("qna_id",this.config.qnaId||""),!this.config.interviewId)throw new Se("Interview ID is missing from configuration","MISSING_INTERVIEW_ID",!1);const l=await si(`${this.config.baseUrl}${oi.TRANSCRIBE_ANSWER(this.config.interviewId)}`,{method:"POST",headers:{accept:"application/json","X-STT-Provider":this.config.provider||"groq",...this.config.authToken&&{Authorization:`Bearer ${this.config.authToken}`}},body:i},{attempts:1,backoff:"exponential",baseDelay:1e3,maxDelay:3e3,jitter:!0});if(!l.ok){const r=await l.text();let o=`STT request failed: ${l.status} ${l.statusText}`;try{const c=JSON.parse(r);o=c.message||c.error||o}catch{o=r||o}throw new Se(o,`HTTP_${l.status}`,l.status>=500)}return{transcript:(await l.json()).data.transcribed_text??""}}catch(i){throw i instanceof Se?i:new Se(`Transcription failed: ${i instanceof Error?i.message:String(i)}`,"TRANSCRIPTION_FAILED",!0)}}cancelRecording(){this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null),this.mediaRecorder&&this.isRecording()&&this.mediaRecorder.stop(),this.cleanup()}isRecording(){return this.mediaRecorder!==null&&this.mediaRecorder.state==="recording"}getSupportedMimeType(){const t=["audio/webm","audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/wav"];for(const n of t)if(MediaRecorder.isTypeSupported(n))return n;return"audio/webm"}getRecordingStream(){return this.recordingStream}cleanup(){this.recordingStream&&(this.recordingStream.getTracks().forEach(t=>t.stop()),this.recordingStream=null),this.mediaRecorder=null,this.audioChunks=[],this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null)}}const tl=new Jp,Pp=(e,t,n,i)=>{const a=p.useRef(null);return p.useEffect(()=>{if(!t)return;const l=async()=>{try{const o=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:640},height:{ideal:480},facingMode:"user"}});e.current&&(e.current.srcObject=o,e.current.onloadeddata=()=>{n()})}catch(o){console.error("Camera access error:",o),i("Camera access failed")}},s=a.current,r=e.current;return l(),()=>{s&&cancelAnimationFrame(s),r!=null&&r.srcObject&&r.srcObject.getTracks().forEach(c=>c.stop())}},[t,n]),p.useEffect(()=>{const l=tl.getRecordingStream();if(l&&e.current){e.current.srcObject=l;const s=l.getVideoTracks(),r=l.getAudioTracks(),o=()=>{console.log("Media track ended - permission may have been revoked")};[...s,...r].forEach(c=>{c.addEventListener("ended",o)})}},[]),{animationFrameRef:a}},$p=(e,t,n,i,a,l,s,r,o,c,d,h,f,w,v)=>{const x=p.useRef(null),_=p.useCallback(()=>{var b;const m=e.current,g=t.current,y=n.current;if(!m||m.readyState<2||!y||!g){x.current=requestAnimationFrame(_);return}i();try{const S=performance.now(),A=y.detectForVideo(m,S);if(((b=A.faceLandmarks)==null?void 0:b.length)>0){v(!1);const T=a(A,o,c.current,w);T?(l(g,m,T,d,h,f,o),o&&f&&r(T,c.current,f)):s(g,m)}else s(g,m),o?(v(!0),w("Reference face not detected.")):v(!1)}catch(S){console.error("Face detection error:",S)}x.current=requestAnimationFrame(_)},[e,t,n,i,a,l,s,r,o,c,d,h,f,w,v]);return{renderLoop:_,animationFrameRef:x}},e6=(e,t,n,i)=>{const{referenceSet:a,referenceRef:l,setReferenceData:s}=th(),r=p.useRef(l),o=p.useCallback(()=>{r.current=l},[l]),c=p.useCallback(()=>{var f;const d=e.current,h=t.current;if(console.log({faceLandmarker:d,video:h}),!(!d||!h))try{const w=performance.now(),v=d.detectForVideo(h,w);if((f=v.faceLandmarks)!=null&&f[0]){const x=v.faceLandmarks[0],_=x[33],m=x[263],g=x[1];_&&m&&g&&(r.current={x:(_.x+m.x)*.5,y:(_.y+m.y)*.5,noseX:g.x,noseY:g.y},s(!0,r.current),n("Reference set. Gaze tracking active."),console.log("Reference set. Gaze tracking active.",r.current),i&&i())}}catch(w){console.error("Set reference error:",w),n("Failed to set reference")}},[e,t,n,s,i]);return{referenceSet:a,referenceRef:r,setReference:c,syncReference:o}},Mf=({isOpen:e,onClose:t,children:n,title:i,showCloseButton:a=!0,closeOnOverlayClick:l=!0,closeOnEscape:s=!0,className:r=""})=>{if(p.useEffect(()=>{if(!e||!s)return;const d=h=>{h.key==="Escape"&&t()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,s,t]),p.useEffect(()=>(e?(document.body.style.overflow="hidden",document.body.classList.add("interview-widget-container")):(document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")),()=>{document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")}),[e]),!e)return null;const o=d=>{l&&d.target===d.currentTarget&&t()},c=u.jsxs("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center",children:[u.jsx("div",{className:"iw-fixed iw-inset-0 iw-bg-black iw-bg-opacity-50 iw-transition-opacity",onClick:o}),u.jsxs("div",{className:`iw-relative iw-bg-white iw-rounded-lg iw-shadow-xl iw-max-w-md iw-w-full iw-mx-4 iw-max-h-[90vh] iw-overflow-hidden ${r}`,role:"dialog","aria-modal":"true","aria-labelledby":i?"dialog-title":void 0,children:[(i||a)&&u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between iw-p-4 iw-border-b iw-border-gray-200",children:[i&&u.jsx("h2",{id:"dialog-title",className:"iw-text-lg iw-font-semibold iw-text-gray-900",children:i}),a&&u.jsx("button",{onClick:t,className:"iw-p-1 iw-text-gray-400 iw-hover:text-gray-600 iw-transition-colors iw-rounded iw-hover:bg-gray-100","aria-label":"Close dialog",children:u.jsx("svg",{className:"iw-w-5 iw-h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),u.jsx("div",{className:"iw-p-4 iw-overflow-y-auto",children:n})]})]});return Zi.createPortal(c,document.body)},w3=({children:e,variant:t="primary",size:n="md",fullWidth:i=!1,isLoading:a=!1,disabled:l,className:s="",...r})=>{const o="iw-inline-flex iw-items-center iw-justify-center iw-rounded-md iw-font-medium iw-transition-colors iw-focus:outline-none iw-focus:ring-2 iw-focus:ring-primary-500 iw-focus:ring-offset-2",c={primary:"iw-bg-primary-600 iw-text-white iw-hover:bg-primary-700 iw-border iw-border-transparent",secondary:"iw-bg-primary-100 iw-text-primary-700 iw-hover:bg-primary-200 iw-border iw-border-transparent",outline:"iw-bg-transparent iw-text-primary-700 iw-border iw-border-primary-500 iw-hover:bg-primary-50",text:"iw-bg-transparent iw-text-primary-600 iw-hover:bg-primary-50 iw-border iw-border-transparent",gradient:"iw-text-white iw-border iw-border-transparent iw-bg-gradient-to-r iw-from-purple-500 iw-to-indigo-500 hover:iw-from-purple-600 hover:iw-to-indigo-600"},d={sm:"iw-px-3 iw-py-1.5 iw-text-sm",md:"iw-px-4 iw-py-2.5 iw-text-sm",lg:"iw-px-5 iw-py-3 iw-text-base"},h="iw-disabled:opacity-50 iw-disabled:cursor-not-allowed iw-disabled:pointer-events-none",f=i?"iw-w-full":"";return u.jsxs("button",{className:`${o} ${c[t]} ${d[n]} ${f} ${h} ${s}`,disabled:l||a,...r,children:[a&&u.jsx(oh,{height:16,width:16,style:{marginRight:"3px"}}),e]})},us=e=>{const{baseColor:t,borderRadius:n}=yr(),{loading:i,children:a,...l}=e;return u.jsx(w3,{style:{background:Zg(t),borderRadius:n},...l,children:i?u.jsx(oh,{}):a})};function t6({isOpen:e,onClose:t,warningType:n}){const i=uh[n],a=i.icon,l=()=>{t()};return n==="face_detected"?null:u.jsx(Mf,{isOpen:e,onClose:t,children:e&&u.jsx("div",{className:"iw-bg-white iw-border-white iw-border iw-p-0 iw-shadow-lg sm:iw-max-w-md",children:u.jsxs("div",{children:[u.jsx("div",{className:"iw-sr-only",children:i.description}),u.jsxs("div",{className:"iw-px-8 iw-py-8 iw-text-center",children:[u.jsx("div",{className:`iw-mx-auto iw-mb-6 iw-flex iw-h-16 iw-w-16 iw-items-center iw-justify-center iw-rounded-full ${i.iconBg} border ${i.iconBorder}`,children:u.jsx(a,{className:`iw-h-7 iw-w-7 ${i.iconColor}`})}),u.jsx("h1",{className:"iw-text-foreground iw-mb-3 iw-text-2xl iw-font-bold iw-tracking-tight",children:i.title}),u.jsx("h2",{className:"iw-text-gray-500 iw-mb-6 iw-text-base iw-font-medium",children:i.subtitle}),u.jsx("p",{className:"iw-text-neutral-400 iw-mx-auto iw-mb-8 iw-max-w-sm iw-text-sm iw-leading-relaxed",children:i.description}),u.jsx(us,{onClick:l,className:"iw-w-full iw-bg-gray-800 iw-text-white hover:iw-bg-gray-800",children:i.buttonText})]})]})})})}const g3=p.forwardRef(({className:e="",interviewId:t="",interview_duration:n,showProctoringUI:i=!0,onSetReference:a,isAnswering:l,onProctoringStatusChange:s,showStatusOverlay:r=!1},o)=>{var jg;const{authToken:c}=ih(),d=c?Ig(c):null,{borderRadius:h}=yr(),f=h??18,{proctoring:w}=Yu(),v=!!(w!=null&&w.gazeAnalysisEnabled),[x,_]=p.useState(!1),[m,g]=p.useState((w==null?void 0:w.showLandmarks)??!1),[y,b]=p.useState(i&&((w==null?void 0:w.showEngagementBar)??!0)),[S,A]=p.useState(v),[T,N]=p.useState(!1),M=p.useRef(null),D=p.useRef(null),ge=p.useRef(null),et=p.useRef(null),pt=p.useCallback(async bt=>{const mr=M.current,ut=ge.current;if(!mr||!ut)return;const Fl=ut.getContext("2d");Fl&&(ut.width=mr.videoWidth,ut.height=mr.videoHeight,Fl.save(),Fl.scale(-1,1),Fl.drawImage(mr,-ut.width,0,ut.width,ut.height),Fl.restore(),await new Promise(Ru=>ut.toBlob(Ru,"image/jpeg")))},[d5,t]);p.useEffect(()=>{let bt;return l&&(N(!0),bt=setTimeout(()=>N(!1),1e3)),()=>{bt&&clearTimeout(bt)}},[l]);const{faceLandmarkerRef:yt,isModelLoaded:vt,statusMessage:j,setStatusMessage:B,loadingProgress:R,permissionDenied:J,clearCache:ae}=Fp(),{fps:st,updateFPS:gn}=qp(),{drawWithEngagementBar:sn,clearCanvas:Rt,engagementRef:rt}=Yp(),{engagement:ot,isLookingAway:rn,analyzeGaze:Ce,setEngagement:Xi,setIsLookingAway:Vl}=Qp(),{multipleFacesDetected:fr,referenceFaceNotDetected:dr,analyzeFace:I2,setMultipleFacesDetected:Ou,setReferenceFaceNotDetected:Aa}=Kp(),{referenceSet:hr,referenceRef:Lu,setReference:H,syncReference:Ae}=e6(yt,M,B,a),Na={multipleFacesDetected:fr,referenceFaceNotDetected:dr,isLookingAway:rn},{showGazeWarningModal:Uu,getWarningType:zu,closeWarningModal:Tg,setShowGazeWarningModal:Ag,setFaceDetectionState:Ng}=Wp(Na,v&&!r);p.useEffect(()=>{if(s){const bt=zu()||"face_detected";s(bt)}},[fr,dr,rn,zu,s]);const{renderLoop:_7}=$p(M,D,yt,gn,I2,sn,Rt,Ce,hr,Lu,m,y,v,B,Aa);Pp(M,vt,_7,B),p.useEffect(()=>{Ae()},[Ae]),p.useEffect(()=>{rt&&rt.current&&(rt.current.value=ot,rt.current.isLookingAway=rn)},[ot,rn,rt]);const T7=p.useCallback(bt=>{A(bt),bt||(Xi(100),Vl(!1))},[Xi,Vl]),A7=p.useCallback(()=>{Vl(!1),Ou(!1),Aa(!1),Ng("face_detected"),Ag(!1),Tg()},[Vl,Ou,Aa,Ng,Ag,Tg]),N7={engagement:ot,fps:st,isLookingAway:rn,multipleFacesDetected:fr,referenceFaceNotDetected:dr};return p.useEffect(()=>{const bt=[];return(async()=>{try{const ut=await navigator.mediaDevices.getUserMedia({video:!0,audio:!1});et.current=ut,M.current&&(M.current.srcObject=ut);const Ru=(n??gr)*60*1e3/3,j7=[0,1,2].map((ja,Qi)=>({label:`capture-${Qi+1}`,start:Qi*Ru,end:(Qi+1)*Ru})),M7=(ja,Qi)=>ja===Qi?ja:Math.random()*(Qi-ja)+ja;j7.forEach(({label:ja,start:Qi,end:C7},D7)=>{let W2;D7===0?W2=3e3:W2=M7(Qi,C7),bt.push(setTimeout(()=>{pt(ja)},W2))})}catch(ut){console.error("Error accessing camera:",ut)}})(),()=>{et.current&&et.current.getTracks().forEach(ut=>ut.stop()),bt.forEach(clearTimeout)}},[pt]),p.useImperativeHandle(o,()=>({setReference:()=>{H()},stopCamera:()=>{et.current&&(et.current.getTracks().forEach(bt=>bt.stop()),et.current=null)}}),[H]),u.jsxs("div",{className:`iw-relative iw-h-full iw-w-full ${e}`,children:[J?u.jsxs("div",{className:"iw-rounded-md iw-border iw-border-red-600 iw-p-5 iw-text-red-600",children:[u.jsx("h2",{children:"Camera Permission Denied"}),u.jsx("p",{children:"Please allow camera access to use this application."})]}):u.jsx("div",{className:"iw-flex iw-w-full iw-h-full iw-justify-start iw-items-start",children:u.jsxs("div",{className:`iw-relative iw-max-w-full iw-max-h-full iw-aspect-video iw-rounded-2xl iw-overflow-hidden iw-bg-black ${T?"iw-animate-answer-start":""} ${l?"iw-border-4 iw-border-[#6296FB]":""}`,style:{width:"100%",height:"auto",minHeight:"0"},children:[u.jsx("video",{ref:M,autoPlay:!0,playsInline:!0,muted:!0,className:"iw-absolute iw-inset-0 iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)"}}),v&&u.jsx("canvas",{ref:D,width:320,height:240,className:"iw-absolute iw-inset-0 iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)",borderRadius:f}}),u.jsx("canvas",{ref:ge,style:{display:"none"}}),i&&u.jsxs("div",{className:"iw-absolute iw-top-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-[#FFEBE6] iw-px-2 iw-py-1 iw-backdrop-blur-md",children:[u.jsx("div",{className:"iw-size-2 iw-animate-pulse iw-rounded-full iw-bg-red-500"}),u.jsx("span",{className:"iw-font-medium iw-text-xs iw-text-[#E94315]",children:"RECORDING"})]}),i&&((jg=d==null?void 0:d.data)==null?void 0:jg.user_name)&&u.jsx("div",{className:"iw-absolute iw-z-50 iw-bottom-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-[#F1F5FE] iw-px-3 iw-py-1 iw-backdrop-blur-md",children:u.jsx("span",{className:"iw-font-medium iw-text-xs iw-text-[#062260]",children:d.data.user_name})}),i&&u.jsx("div",{className:"iw-absolute iw-bottom-4 iw-right-4",children:u.jsx(m5,{showControls:(w==null?void 0:w.showControls)??!1,isBubbleOpen:x,setIsBubbleOpen:_,setReference:H,clearCache:ae,isModelLoaded:vt,gazeAnalysisEnabled:S&&v,referenceSet:hr,showLandmarks:m,setShowLandmarks:g,showEngagementBar:y,setShowEngagementBar:b,handleToggleGazeAnalysis:T7,stats:N7,statusMessage:j,loadingProgress:R})}),r&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"iw-absolute iw-inset-0 iw-pointer-events-none iw-z-10 ",style:{background:"radial-gradient(ellipse 20% 40% at 50% 45%, transparent 99.5%, rgba(0,0,0,0.35) 100%)"}}),u.jsx("div",{className:"iw-absolute iw-bottom-2 iw-inset-x-0 iw-flex iw-justify-center iw-pointer-events-none iw-z-20",children:u.jsx(n6,{status:zu()??"face_detected"})})]})]})}),v&&Uu&&!r&&u.jsx(t6,{isOpen:Uu,onClose:A7,warningType:zu()})]})}),n6=({status:e})=>{const t=uh[e];if(!t)return null;const n=e!=="face_detected";return u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-gap-2",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2 iw-px-3 iw-py-1 iw-rounded-full iw-backdrop-blur-md iw-shadow-sm transition-colors duration-300 iw-text-white",children:[u.jsx("div",{className:`iw-flex iw-h-4 iw-w-4 iw-items-center iw-size-2.5 iw-justify-center iw-rounded-full iw-text-white ${n?"iw-bg-[#E94315]":"iw-bg-[#22C55E]"}`,children:n?u.jsx(sh,{}):u.jsx(vr,{})}),u.jsx("span",{className:"iw-text-sm iw-font-medium",children:e==="face_detected"?"Face detected clearly":t.title})]}),n&&u.jsx("span",{className:"iw-text-white iw-text-center iw-text-sm iw-drop-shadow-sm iw-max-w-[400px] iw-px-3 ",children:"Sit upright & look directly into the camera"})]})},p3=({micEnabled:e=!1,videoEnabled:t=!1,buttonText:n,onButtonClick:i,isAgreed:a,onAgreedToggle:l,showCheckbox:s=!0,showMediaIcons:r=!0,disabled:o=!1})=>{const c=o||!a||r&&(!e||!t);return u.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-6 iw-w-full",children:[s&&u.jsxs("div",{className:"iw-flex iw-items-start iw-gap-3 iw-bg-[#F1F5FE] iw-rounded-xl iw-p-4 iw-border iw-border-[#E7EAF1]",children:[u.jsx("div",{className:`iw-mt-0.5 iw-h-5 iw-w-5 iw-min-w-[20px] iw-rounded iw-border iw-flex iw-items-center iw-justify-center iw-cursor-pointer iw-transition-colors ${a?"iw-bg-[#062260] iw-border-[#062260]":"iw-bg-white iw-border-[#B3B9CB]"}`,onClick:d=>{d.stopPropagation(),l(!a)},children:a&&u.jsx(vr,{className:"iw-size-3 iw-text-white"})}),u.jsx("label",{onClick:()=>l(!a),className:"iw-text-sm iw-text-[#062260] iw-font-medium iw-cursor-pointer iw-select-none",children:"By continuing, you acknowledge and consent to the use of your face data exclusively for interview monitoring"})]}),u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-4",children:[r&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"iw-relative",children:[u.jsx("div",{className:`iw-flex iw-h-12 iw-w-16 iw-items-center iw-justify-center iw-rounded-xl iw-border iw-transition-all ${e?"iw-border-[#E7EAF1] iw-bg-white iw-text-[#062260]":"iw-border-rose-200 iw-bg-rose-50 iw-text-rose-600"}`,children:e?u.jsx(t5,{className:"iw-h-6 iw-w-6"}):u.jsx(n5,{className:"iw-h-6 iw-w-6"})}),e&&u.jsx("div",{className:"iw-absolute -iw-right-1 -iw-top-1 iw-flex iw-h-4 iw-w-4 iw-items-center iw-justify-center iw-rounded-full iw-bg-[#22C55E] iw-text-white",children:u.jsx(vr,{className:"iw-h-2.5 iw-w-2.5"})})]}),u.jsxs("div",{className:"iw-relative",children:[u.jsx("div",{className:`iw-flex iw-h-12 iw-w-16 iw-items-center iw-justify-center iw-rounded-xl iw-border iw-transition-all ${t?"iw-border-[#E7EAF1] iw-bg-white iw-text-[#062260]":"iw-border-rose-200 iw-bg-rose-50 iw-text-rose-600"}`,children:t?u.jsx(o5,{className:"iw-h-6 iw-w-6"}):u.jsx(u5,{className:"iw-h-6 iw-w-6"})}),t&&u.jsx("div",{className:"iw-absolute -iw-right-1 -iw-top-1 iw-flex iw-h-4 iw-w-4 iw-items-center iw-justify-center iw-rounded-full iw-bg-[#22C55E] iw-text-white",children:u.jsx(vr,{className:"iw-h-2.5 iw-w-2.5"})})]})]}),u.jsx(w3,{onClick:i,disabled:c,className:`iw-h-12 iw-flex-1 iw-max-w-[220px] !iw-bg-[#F1F5FE] !iw-text-[#062260] !iw-font-bold iw-border-none iw-rounded-lg ${c?"iw-opacity-50":"hover:iw-opacity-75"}`,children:n})]})]})},i6=({steps:e,currentStepIndex:t})=>u.jsx("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-4 iw-w-full iw-py-6",children:e.map((n,i)=>{const a=i<t,l=i===t;return u.jsxs(p.Fragment,{children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[u.jsx("div",{className:`iw-flex iw-size-9 iw-text-[#062260] iw-items-center iw-justify-center iw-rounded-full iw-font-semibold iw-border ${l||a?"iw-border-[#0EB00E] iw-bg-[#E9FFE6]":"iw-border-[#BDE0FD] iw-bg-[#E6F3FF]"}`,children:a?u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:u.jsx("polyline",{points:"20 6 9 17 4 12"})}):i+1}),u.jsx("span",{className:`iw-text-sm iw-font-medium ${l||a?"iw-text-[#062260]":"iw-text-[#5C6686]"}`,children:n.label})]}),i<e.length-1&&u.jsx("div",{className:"iw-flex-1 iw-max-w-[120px] iw-border-t iw-border-dotted iw-border-[#B3B9CB]"})]},i)})}),a6=["Don't refresh or reload the page during your assessment","Don't switch tabs or open other applications while session is ongoing","Don't leave your position during the session","Don't disable or interfere with video/audio monitoring"],l6=({isOpen:e,onStart:t,gazeEnabled:n=!1,videoFeedRef:i,interviewId:a="",interview_duration:l=gr})=>{const s=p.useRef(null),r=p.useRef(null),[o,c]=p.useState(!1),[d,h]=p.useState(!1),[f,w]=p.useState(0),[v,x]=p.useState(!1),_=p.useRef(null),m=p.useRef(null),g=M=>{_.current=M,i&&(typeof i=="function"?i(M):i.current=M)},y=()=>{r.current&&(r.current.getTracks().forEach(M=>M.stop()),r.current=null)},b=async()=>{try{const M=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:1280},height:{ideal:720}},audio:!0});r.current=M,s.current&&(s.current.srcObject=M),c(!0)}catch(M){console.error("Media permission error:",M);let D="Unable to access camera or microphone.";(M==null?void 0:M.name)==="NotAllowedError"?D="Permissions denied. Please allow access to camera and microphone.":(M==null?void 0:M.name)==="NotFoundError"?D="No camera/microphone found. Please connect a device and retry.":M!=null&&M.message&&(D=M.message),c(!1),console.log(D)}finally{}};if(p.useEffect(()=>{if(!e){y();return}return b(),()=>y()},[e]),p.useEffect(()=>()=>{m.current&&(clearInterval(m.current),m.current=null)},[]),!e)return null;const[S,A]=p.useState("face_detected"),T=async()=>{h(!0);const M=()=>{var D;return(D=_.current)==null?void 0:D.setReference()};M(),m.current&&clearInterval(m.current),m.current=setInterval(M,500)},N=[{label:n?"Calibrate your camera":"Camera & Mic permission"},{label:"Basic guidelines"}];return u.jsx("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-gray-900/40 iw-backdrop-blur-sm iw-p-4 iw-overflow-auto",children:u.jsxs("div",{className:"iw-w-full iw-max-w-[700px] iw-bg-white iw-rounded-xl iw-shadow-2xl iw-overflow-auto",children:[u.jsxs("div",{className:"iw-px-5 iw-pt-5",children:[u.jsx("h2",{className:"iw-text-[#062260] iw-text-2xl iw-font-medium iw-tracking-tight",children:"Final checks before you go live"}),u.jsx("div",{className:"iw-mt-4 iw-bg-[#F1F5FE] iw-rounded-xl iw-p-3 iw-border iw-border-[#E7EAF1]",children:u.jsx("p",{className:"iw-text-[#5C6686] iw-text-sm iw-leading-relaxed",children:"To ensure the integrity of the interview process, this platform uses your device’s camera to monitor your face and gaze direction. We do not store any outside this session"})}),u.jsx("div",{className:"iw-mt-6 iw-border-b iw-border-dashed iw-border-[#B3B9CB] iw-w-full"}),u.jsx(i6,{steps:N,currentStepIndex:f})]}),u.jsx("div",{className:"iw-px-5 iw-pb-5 iw-flex iw-flex-col iw-items-center",children:f===0?u.jsxs("div",{className:"iw-w-full iw-flex iw-flex-col iw-items-center iw-gap-6",children:[u.jsx("div",{className:"iw-w-full iw-max-w-[600px] iw-aspect-video iw-bg-slate-100 iw-rounded-2xl iw-overflow-hidden iw-relative iw-border iw-border-slate-200",children:n?u.jsx(g3,{ref:g,interviewId:a,interview_duration:l,showProctoringUI:!1,showStatusOverlay:!0,onProctoringStatusChange:A,onSetReference:()=>{m.current&&(clearInterval(m.current),m.current=null),h(!1),w(1)}}):u.jsx("video",{ref:s,autoPlay:!0,playsInline:!0,muted:!0,className:"iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)"}})}),u.jsx(p3,{micEnabled:o,videoEnabled:o,buttonText:n?d?"Calibrating...":"Start calibrate":"Next",onButtonClick:()=>{n?T():w(1)},disabled:!v||n&&S!=="face_detected"||!n&&!o,isAgreed:v,onAgreedToggle:x})]}):u.jsxs("div",{className:"iw-w-full iw-flex iw-flex-col iw-gap-6",children:[u.jsx("div",{className:"iw-w-full iw-bg-[#F8FAFF] iw-rounded-2xl iw-p-8 iw-flex iw-flex-col iw-gap-5",children:a6.map((M,D)=>u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-4",children:[u.jsx("div",{className:"iw-flex iw-h-7 iw-w-7 iw-min-w-[28px] iw-items-center iw-justify-center iw-rounded-full iw-bg-[#DBEAFE] iw-text-[#062260] iw-text-xs iw-font-bold",children:D+1}),u.jsx("span",{className:"iw-text-[#5C6686] iw-font-medium",children:M})]},D))}),u.jsx(p3,{buttonText:"Start interview",onButtonClick:()=>{t(),y()},isAgreed:v,onAgreedToggle:x,showMediaIcons:!1})]})})]})})};var K=(e=>(e.IDLE="idle",e.FETCHING_QUESTION="fetching_question",e.READING_QUESTION="reading_question",e.THINKING="thinking",e.ANSWERING="answering",e.TRANSCRIBING="transcribing",e.EDITING="editing",e.SUBMITTING="submitting",e.COMPLETED="completed",e))(K||{});const y3={thinkingDuration:0,answeringDuration:120,editingDuration:30},v3={idle:{next:"fetching_question"},fetching_question:{next:"reading_question"},reading_question:{next:"answering"},thinking:{next:"answering",duration:0},answering:{next:"transcribing",duration:120},transcribing:{next:"editing"},editing:{next:"submitting",duration:30},submitting:{next:"completed"},completed:{next:"completed"}};class s6{constructor(t={},n={}){Bt(this,"config");Bt(this,"state");Bt(this,"phaseIntervalId",null);Bt(this,"globalIntervalId",null);Bt(this,"callbacks");this.config={...y3,...t},this.callbacks=n,this.state={phase:"idle",currentPhaseTimeRemaining:0,totalTimeElapsed:0,currentQuestionNumber:0}}updateConfig(t){this.config={...this.config,...t}}getState(){return{...this.state}}startQuestion(){this.state.currentQuestionNumber===0&&this.startGlobalTimer(),this.state.currentQuestionNumber=this.state.currentQuestionNumber+1,this.state.phase="fetching_question",this.notifyChange()}nextPhase(){const t=this.state.phase;let n=v3[t];if(!n)return;if(n.next==="editing"&&this.config.editingDuration===0){const a=v3.editing;a&&(n=a)}this.stopPhaseTimer(),this.state.phase=n.next;const i=this.getDurationForPhase(n.next);i>0?(this.state.currentPhaseTimeRemaining=i,this.startPhaseTimer()):this.state.currentPhaseTimeRemaining=0,this.notifyChange()}completeInterview(){var t,n;this.stopGlobalTimer(),this.stopPhaseTimer(),this.state.phase="completed",(n=(t=this.callbacks).onInterviewEnd)==null||n.call(t),this.notifyChange()}destroy(){this.stopPhaseTimer(),this.stopGlobalTimer()}getDurationForPhase(t){switch(t){case"thinking":return this.config.thinkingDuration;case"answering":return this.config.answeringDuration;case"editing":return this.config.editingDuration;default:return 0}}startGlobalTimer(){this.globalIntervalId=setInterval(()=>{var t,n;this.state.totalTimeElapsed++,(n=(t=this.callbacks).onTick)==null||n.call(t,this.getState())},1e3)}stopGlobalTimer(){this.globalIntervalId&&(clearInterval(this.globalIntervalId),this.globalIntervalId=null)}startPhaseTimer(){this.phaseIntervalId=setInterval(()=>{this.state.currentPhaseTimeRemaining--,this.state.currentPhaseTimeRemaining<=0&&this.nextPhase()},1e3)}stopPhaseTimer(){this.phaseIntervalId&&(clearInterval(this.phaseIntervalId),this.phaseIntervalId=null)}notifyChange(){var t,n;(n=(t=this.callbacks).onPhaseChange)==null||n.call(t,this.state.phase,this.getState())}}function r6(e={}){const{config:t={},callbacks:n={}}=e,i=p.useRef(null);i.current||(i.current=new s6(t,{}));const a=i.current,[l,s]=p.useState(a.getState()),r=p.useCallback(()=>{s(a.getState())},[a]);p.useEffect(()=>{const h={onPhaseChange:(f,w)=>{var v;r(),(v=n.onPhaseChange)==null||v.call(n,f,w)},onTick:f=>{var w;r(),(w=n.onTick)==null||w.call(n,f)},onInterviewEnd:()=>{var f;r(),(f=n.onInterviewEnd)==null||f.call(n)}};a.callbacks=h},[a,n,r]),p.useEffect(()=>{a.updateConfig(t)},[a,t]),p.useEffect(()=>()=>{a.destroy()},[a]);const o=p.useCallback(()=>{a.startQuestion(),r()},[a,r]),c=p.useCallback(()=>{a.nextPhase(),r()},[a,r]),d=p.useCallback(()=>{a.completeInterview(),r()},[a,r]);return{state:l,startQuestion:o,nextPhase:c,completeInterview:d,timerService:a}}function o6(e,t={}){const[n,i]=p.useState({data:null,loading:!1,error:null}),a=p.useCallback(async(...l)=>{var s,r,o,c;i(d=>({...d,loading:!0,error:null}));try{const d=await e(...l);i(h=>({...h,data:d,loading:!1,error:null})),(s=t.onSuccess)==null||s.call(t,d),(r=t.onSettled)==null||r.call(t,d,null)}catch(d){const h=d.type?d:{type:"unknown",message:d.message||"Unknown error",retryable:!0,userMessage:"Something went wrong. Please try again.",originalError:d};i(f=>({...f,loading:!1,error:h})),(o=t.onError)==null||o.call(t,h),(c=t.onSettled)==null||c.call(t,null,h)}},[e,t]);return{...n,execute:a}}const u6=e=>{const[t,n]=p.useState(null),[i,a]=p.useState(!1),l=document,s=()=>!!(l.fullscreenEnabled||l.webkitFullscreenEnabled||l.mozFullScreenEnabled||l.msFullscreenEnabled),r=()=>l.fullscreenElement||l.webkitFullscreenElement||l.mozFullScreenElement||l.msFullscreenElement,o=async w=>{var v;try{if(!s())throw new Error("Fullscreen is not supported in this environment");w.requestFullscreen?await w.requestFullscreen():w.webkitRequestFullscreen?await w.webkitRequestFullscreen():w.mozRequestFullScreen?await w.mozRequestFullScreen():w.msRequestFullscreen&&await w.msRequestFullscreen()}catch(x){const _={name:"FullscreenError",message:x instanceof Error?x.message:"Failed to enter fullscreen"};n(_),(v=e==null?void 0:e.onError)==null||v.call(e,_)}},c=async()=>{var w;try{l.exitFullscreen?await l.exitFullscreen():l.webkitExitFullscreen?await l.webkitExitFullscreen():l.mozCancelFullScreen?await l.mozCancelFullScreen():l.msExitFullscreen&&await l.msExitFullscreen()}catch(v){const x={name:"FullscreenError",message:v instanceof Error?v.message:"Failed to exit fullscreen"};n(x),(w=e==null?void 0:e.onError)==null||w.call(e,x)}},d=p.useCallback(()=>{var v;const w=!!r();a(w),(v=e==null?void 0:e.onFullScreenChange)==null||v.call(e,w)},[e]);p.useEffect(()=>{const w=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];return w.forEach(v=>{document.addEventListener(v,d)}),()=>{w.forEach(v=>{document.removeEventListener(v,d)})}},[d]);const h=async w=>{n(null);const v=w??document.documentElement;await o(v)};return{isFullScreen:i,toggleFullScreen:async w=>{i?await c():await h(w)},enterFullScreen:h,exitFullScreen:c,error:t}};function b3(){const e=pr();return p.useMemo(()=>{const n=e.api||{};return new ch(n)},[e.api])}const c6=e=>{p.useEffect(()=>{const t=i=>{(i.ctrlKey||i.metaKey)&&["c","v","a","t","n","w","r","s","p"].includes(i.key.toLowerCase())&&(i.preventDefault(),e({type:"blocked_shortcut",severity:"low",details:{action:"shortcut_pressed",reason:`Attempted to use a blocked keyboard shortcut: Ctrl + ${i.key}`}})),i.key.startsWith("F")&&i.key.length<=3&&(i.preventDefault(),e({type:"blocked_function_key",severity:"low",details:{action:"function_key_pressed",reason:`Attempted to use a blocked function key: ${i.key}`}})),i.altKey&&i.key==="Tab"&&(i.preventDefault(),e({type:"alt_tab_attempt",severity:"medium",details:{action:"alt_tab",reason:"Attempted to use the Alt + Tab shortcut"}}))},n=i=>{i.preventDefault(),e({type:"right_click_attempt",severity:"low",details:{action:"right_click",reason:"Attempted to use the right click"}})};return document.addEventListener("keydown",t),document.addEventListener("contextmenu",n),()=>{document.removeEventListener("keydown",t),document.removeEventListener("contextmenu",n)}},[e])},f6=(e={})=>{const[t,n]=p.useState(!1),[i,a]=p.useState(!1),[l,s]=p.useState(null),[r,o]=p.useState(null),[c,d]=p.useState(null);e.config&&tl.updateConfig(e.config);const h=p.useCallback(async x=>{var _;try{o(null),s(null),d(null),await tl.startRecording(x,{onStart:()=>{var m;n(!0),(m=e.onStart)==null||m.call(e)},onStop:()=>{var m;n(!1),(m=e.onStop)==null||m.call(e)},onError:m=>{var y;const g=m instanceof Se?m:new Se(m.message,"RECORDING_ERROR",!0);o(g),n(!1),(y=e.onError)==null||y.call(e,g)}})}catch(m){const g=m instanceof Se?m:new Se(m instanceof Error?m.message:String(m),"START_FAILED",!1);throw o(g),n(!1),(_=e.onError)==null||_.call(e,g),g}},[]),f=p.useCallback(async()=>{var x,_;try{const m=await tl.stopRecording();return d(m),n(!1),(x=e.onStop)==null||x.call(e),m}catch(m){const g=m instanceof Se?m:new Se(m instanceof Error?m.message:String(m),"STOP_FAILED",!1);throw o(g),n(!1),(_=e.onError)==null||_.call(e,g),g}},[]),w=p.useCallback(async(x,_={})=>{var m,g;try{o(null),a(!0);const y={audioBlob:x,..._},b=await tl.transcribe(y);return s(b.transcript),a(!1),(m=e.onTranscriptionComplete)==null||m.call(e,b),b}catch(y){const b=y instanceof Se?y:new Se(y instanceof Error?y.message:String(y),"TRANSCRIPTION_FAILED",!0);throw o(b),a(!1),(g=e.onError)==null||g.call(e,b),b}},[]),v=p.useCallback(()=>{tl.cancelRecording(),n(!1),d(null)},[]);return{startRecording:h,stopRecording:f,transcribe:w,cancelRecording:v,isRecording:t,isTranscribing:i,transcript:l,error:r,audioBlob:c}},d6=e=>{const t=p.useRef(null),n=p.useRef(!1);p.useEffect(()=>{const i=()=>{document.hidden&&(n.current=!0,t.current&&(clearTimeout(t.current),t.current=null),e({type:"tab_switch",severity:"high",details:{action:"tab_hidden",reason:"Attempted to switch tabs or applications"}}),setTimeout(()=>{n.current=!1},100))},a=()=>{n.current||(t.current=setTimeout(()=>{n.current||e({type:"focus_loss",severity:"medium",details:{action:"window_blur",reason:"Focus lost from the interview window"}}),t.current=null},50))};return document.addEventListener("visibilitychange",i),window.addEventListener("blur",a),()=>{document.removeEventListener("visibilitychange",i),window.removeEventListener("blur",a),t.current&&clearTimeout(t.current)}},[e])},h6=()=>{p.useEffect(()=>{const e=document.createElement("style");return e.textContent=`
23
+ }`,e.VERTEX_SHADER),this.W=q0(this,this.H(),e.FRAGMENT_SHADER),e.linkProgram(this.h),!e.getProgramParameter(this.h,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.h)}`);this.O=e.getAttribLocation(this.h,"aVertex"),this.L=e.getAttribLocation(this.h,"aTex")}D(){}l(){}close(){if(this.h){const e=this.g;e.deleteProgram(this.h),e.deleteShader(this.X),e.deleteShader(this.W)}this.B&&this.g.deleteFramebuffer(this.B),this.A&&this.A.close(),this.u&&this.u.close()}};function qn(e,t){switch(t){case 0:return e.g.find(n=>n instanceof Uint8Array);case 1:return e.g.find(n=>n instanceof Float32Array);case 2:return e.g.find(n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function of(e){var t=qn(e,1);if(!t){if(t=qn(e,0))t=new Float32Array(t).map(i=>i/255);else{t=new Float32Array(e.width*e.height);const i=ll(e);var n=cf(e);if(X0(n,i,Z0(e)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(e.width*e.height*4),i.readPixels(0,0,e.width,e.height,i.RGBA,i.FLOAT,n);for(let a=0,l=0;a<t.length;++a,l+=4)t[a]=n[l]}else i.readPixels(0,0,e.width,e.height,i.RED,i.FLOAT,t)}e.g.push(t)}return t}function Z0(e){let t=qn(e,2);if(!t){const n=ll(e);t=I0(e);const i=of(e),a=K0(e);n.texImage2D(n.TEXTURE_2D,0,a,e.width,e.height,0,n.RED,n.FLOAT,i),ff(e)}return t}function ll(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=pi(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function K0(e){if(e=ll(e),!uu)if(e.getExtension("EXT_color_buffer_float")&&e.getExtension("OES_texture_float_linear")&&e.getExtension("EXT_float_blend"))uu=e.R32F;else{if(!e.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");uu=e.R16F}return uu}function cf(e){return e.l||(e.l=new Q0),e.l}function I0(e){const t=ll(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=qn(e,2);return n||(n=Y0(cf(e),t,e.m?t.LINEAR:t.NEAREST),e.g.push(n),e.j=!0),t.bindTexture(t.TEXTURE_2D,n),n}function ff(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var uu,Ze=class{constructor(e,t,n,i,a,l,s){this.g=e,this.m=t,this.j=n,this.canvas=i,this.l=a,this.width=l,this.height=s,this.j&&--J0===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Fa(){return!!qn(this,0)}ka(){return!!qn(this,1)}R(){return!!qn(this,2)}ja(){return(t=qn(e=this,0))||(t=of(e),t=new Uint8Array(t.map(n=>Math.round(255*n))),e.g.push(t)),t;var e,t}ia(){return of(this)}N(){return Z0(this)}clone(){const e=[];for(const t of this.g){let n;if(t instanceof Uint8Array)n=new Uint8Array(t);else if(t instanceof Float32Array)n=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{const i=ll(this),a=cf(this);i.activeTexture(i.TEXTURE1),n=Y0(a,i,this.m?i.LINEAR:i.NEAREST),i.bindTexture(i.TEXTURE_2D,n);const l=K0(this);i.texImage2D(i.TEXTURE_2D,0,l,this.width,this.height,0,i.RED,i.FLOAT,null),i.bindTexture(i.TEXTURE_2D,null),X0(a,i,n),hy(a,i,!1,()=>{I0(this),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),ff(this)}),my(a),ff(this)}}e.push(n)}return new Ze(e,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&ll(this).deleteTexture(qn(this,2)),J0=-1}};Ze.prototype.close=Ze.prototype.close,Ze.prototype.clone=Ze.prototype.clone,Ze.prototype.getAsWebGLTexture=Ze.prototype.N,Ze.prototype.getAsFloat32Array=Ze.prototype.ia,Ze.prototype.getAsUint8Array=Ze.prototype.ja,Ze.prototype.hasWebGLTexture=Ze.prototype.R,Ze.prototype.hasFloat32Array=Ze.prototype.ka,Ze.prototype.hasUint8Array=Ze.prototype.Fa;var J0=250;function mn(...e){return e.map(([t,n])=>({start:t,end:n}))}const gy=function(e){return class extends e{Ja(){this.i._registerModelResourcesGraphService()}}}((W0=class{constructor(e,t){this.l=!0,this.i=e,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",t!==void 0?this.i.canvas=t:U0()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(e){const t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(".pbtxt")||e.endsWith(".textproto")),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){const n=e.length,i=this.i._malloc(n);this.i.HEAPU8.set(e,i),t?this.i._changeBinaryGraph(n,i):this.i._changeTextGraph(n,i),this.i._free(i)}configureAudio(e,t,n,i,a){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),k(this,i||"input_audio",l=>{k(this,a=a||"audio_header",s=>{this.i._configureAudio(l,s,e,t??0,n)})})}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}ca(e){jn(this,"__graph_config__",t=>{e(t)}),k(this,"__graph_config__",t=>{this.i._getGraphConfig(t,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(e){this.i.errorListener=e}attachEmptyPacketListener(e,t){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[e]=t}addAudioToStream(e,t,n){this.addAudioToStreamWithShape(e,0,0,t,n)}addAudioToStreamWithShape(e,t,n,i,a){const l=4*e.length;this.h!==l&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(l),this.h=l),this.i.HEAPF32.set(e,this.g/4),k(this,i,s=>{this.i._addAudioToInputStream(this.g,t,n,s,a)})}addGpuBufferToStream(e,t,n){k(this,t,i=>{const[a,l]=G0(this,e,i);this.i._addBoundTextureToStream(i,a,l,n)})}addBoolToStream(e,t,n){k(this,t,i=>{this.i._addBoolToInputStream(e,i,n)})}addDoubleToStream(e,t,n){k(this,t,i=>{this.i._addDoubleToInputStream(e,i,n)})}addFloatToStream(e,t,n){k(this,t,i=>{this.i._addFloatToInputStream(e,i,n)})}addIntToStream(e,t,n){k(this,t,i=>{this.i._addIntToInputStream(e,i,n)})}addUintToStream(e,t,n){k(this,t,i=>{this.i._addUintToInputStream(e,i,n)})}addStringToStream(e,t,n){k(this,t,i=>{k(this,e,a=>{this.i._addStringToInputStream(a,i,n)})})}addStringRecordToStream(e,t,n){k(this,t,i=>{H0(this,Object.keys(e),a=>{H0(this,Object.values(e),l=>{this.i._addFlatHashMapToInputStream(a,l,Object.keys(e).length,i,n)})})})}addProtoToStream(e,t,n,i){k(this,n,a=>{k(this,t,l=>{const s=this.i._malloc(e.length);this.i.HEAPU8.set(e,s),this.i._addProtoToInputStream(s,e.length,l,a,i),this.i._free(s)})})}addEmptyPacketToStream(e,t){k(this,e,n=>{this.i._addEmptyPacketToInputStream(n,t)})}addBoolVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateBoolVector(e.length);if(!a)throw Error("Unable to allocate new bool vector on heap.");for(const l of e)this.i._addBoolVectorEntry(a,l);this.i._addBoolVectorToInputStream(a,i,n)})}addDoubleVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateDoubleVector(e.length);if(!a)throw Error("Unable to allocate new double vector on heap.");for(const l of e)this.i._addDoubleVectorEntry(a,l);this.i._addDoubleVectorToInputStream(a,i,n)})}addFloatVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateFloatVector(e.length);if(!a)throw Error("Unable to allocate new float vector on heap.");for(const l of e)this.i._addFloatVectorEntry(a,l);this.i._addFloatVectorToInputStream(a,i,n)})}addIntVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateIntVector(e.length);if(!a)throw Error("Unable to allocate new int vector on heap.");for(const l of e)this.i._addIntVectorEntry(a,l);this.i._addIntVectorToInputStream(a,i,n)})}addUintVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateUintVector(e.length);if(!a)throw Error("Unable to allocate new unsigned int vector on heap.");for(const l of e)this.i._addUintVectorEntry(a,l);this.i._addUintVectorToInputStream(a,i,n)})}addStringVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateStringVector(e.length);if(!a)throw Error("Unable to allocate new string vector on heap.");for(const l of e)k(this,l,s=>{this.i._addStringVectorEntry(a,s)});this.i._addStringVectorToInputStream(a,i,n)})}addBoolToInputSidePacket(e,t){k(this,t,n=>{this.i._addBoolToInputSidePacket(e,n)})}addDoubleToInputSidePacket(e,t){k(this,t,n=>{this.i._addDoubleToInputSidePacket(e,n)})}addFloatToInputSidePacket(e,t){k(this,t,n=>{this.i._addFloatToInputSidePacket(e,n)})}addIntToInputSidePacket(e,t){k(this,t,n=>{this.i._addIntToInputSidePacket(e,n)})}addUintToInputSidePacket(e,t){k(this,t,n=>{this.i._addUintToInputSidePacket(e,n)})}addStringToInputSidePacket(e,t){k(this,t,n=>{k(this,e,i=>{this.i._addStringToInputSidePacket(i,n)})})}addProtoToInputSidePacket(e,t,n){k(this,n,i=>{k(this,t,a=>{const l=this.i._malloc(e.length);this.i.HEAPU8.set(e,l),this.i._addProtoToInputSidePacket(l,e.length,a,i),this.i._free(l)})})}addBoolVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateBoolVector(e.length);if(!i)throw Error("Unable to allocate new bool vector on heap.");for(const a of e)this.i._addBoolVectorEntry(i,a);this.i._addBoolVectorToInputSidePacket(i,n)})}addDoubleVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateDoubleVector(e.length);if(!i)throw Error("Unable to allocate new double vector on heap.");for(const a of e)this.i._addDoubleVectorEntry(i,a);this.i._addDoubleVectorToInputSidePacket(i,n)})}addFloatVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateFloatVector(e.length);if(!i)throw Error("Unable to allocate new float vector on heap.");for(const a of e)this.i._addFloatVectorEntry(i,a);this.i._addFloatVectorToInputSidePacket(i,n)})}addIntVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateIntVector(e.length);if(!i)throw Error("Unable to allocate new int vector on heap.");for(const a of e)this.i._addIntVectorEntry(i,a);this.i._addIntVectorToInputSidePacket(i,n)})}addUintVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateUintVector(e.length);if(!i)throw Error("Unable to allocate new unsigned int vector on heap.");for(const a of e)this.i._addUintVectorEntry(i,a);this.i._addUintVectorToInputSidePacket(i,n)})}addStringVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateStringVector(e.length);if(!i)throw Error("Unable to allocate new string vector on heap.");for(const a of e)k(this,a,l=>{this.i._addStringVectorEntry(i,l)});this.i._addStringVectorToInputSidePacket(i,n)})}attachBoolListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachBoolListener(n)})}attachBoolVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachBoolVectorListener(n)})}attachIntListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachIntListener(n)})}attachIntVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachIntVectorListener(n)})}attachUintListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachUintListener(n)})}attachUintVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachUintVectorListener(n)})}attachDoubleListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachDoubleListener(n)})}attachDoubleVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachDoubleVectorListener(n)})}attachFloatListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachFloatListener(n)})}attachFloatVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachFloatVectorListener(n)})}attachStringListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachStringListener(n)})}attachStringVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachStringVectorListener(n)})}attachProtoListener(e,t,n){jn(this,e,t),k(this,e,i=>{this.i._attachProtoListener(i,n||!1)})}attachProtoVectorListener(e,t,n){yi(this,e,t),k(this,e,i=>{this.i._attachProtoVectorListener(i,n||!1)})}attachAudioListener(e,t,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),jn(this,e,(i,a)=>{i=new Float32Array(i.buffer,i.byteOffset,i.length/4),t(i,a)}),k(this,e,i=>{this.i._attachAudioListener(i,n||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends W0{get ga(){return this.i}pa(e,t,n){k(this,t,i=>{const[a,l]=G0(this,e,i);this.ga._addBoundTextureAsImageToStream(i,a,l,n)})}Z(e,t){jn(this,e,t),k(this,e,n=>{this.ga._attachImageListener(n)})}aa(e,t){yi(this,e,t),k(this,e,n=>{this.ga._attachImageVectorListener(n)})}}));var W0,gn=class extends gy{};async function Z(e,t,n){return async function(i,a,l,s){return fy(i,a,l,s)}(e,n.canvas??(U0()?void 0:document.createElement("canvas")),t,n)}function P0(e,t,n,i){if(e.U){const l=new i0;if(n!=null&&n.regionOfInterest){if(!e.oa)throw Error("This task doesn't support region-of-interest.");var a=n.regionOfInterest;if(a.left>=a.right||a.top>=a.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(a.left<0||a.top<0||a.right>1||a.bottom>1)throw Error("Expected RectF values to be in [0,1].");L(l,1,(a.left+a.right)/2),L(l,2,(a.top+a.bottom)/2),L(l,4,a.right-a.left),L(l,3,a.bottom-a.top)}else L(l,1,.5),L(l,2,.5),L(l,4,1),L(l,3,1);if(n!=null&&n.rotationDegrees){if((n==null?void 0:n.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(L(l,5,-Math.PI*n.rotationDegrees/180),(n==null?void 0:n.rotationDegrees)%180!=0){const[s,r]=R0(t);n=Te(l,3)*r/s,a=Te(l,4)*s/r,L(l,4,n),L(l,3,a)}}e.g.addProtoToStream(l.g(),"mediapipe.NormalizedRect",e.U,i)}e.g.pa(t,e.X,i??performance.now()),e.finishProcessing()}function wn(e,t,n){var i;if((i=e.baseOptions)!=null&&i.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");P0(e,t,n,e.C+1)}function Mn(e,t,n,i){var a;if(!((a=e.baseOptions)!=null&&a.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");P0(e,t,n,i)}function sl(e,t,n,i){var a=t.data;const l=t.width,s=l*(t=t.height);if((a instanceof Uint8Array||a instanceof Float32Array)&&a.length!==s)throw Error("Unsupported channel count: "+a.length/s);return e=new Ze([a],n,!1,e.g.i.canvas,e.P,l,t),i?e.clone():e}var Ct=class extends rf{constructor(e,t,n,i){super(e),this.g=e,this.X=t,this.U=n,this.oa=i,this.P=new Q0}l(e,t=!0){if("runningMode"in e&&ne(this.baseOptions,2,fs(!!e.runningMode&&e.runningMode!=="IMAGE")),e.canvas!==void 0&&this.g.i.canvas!==e.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(e,t)}close(){this.P.close(),super.close()}};Ct.prototype.close=Ct.prototype.close;var Jt=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect_in",!1),this.j={detections:[]},U(e=this.h=new iu,0,1,t=new ve),L(this.h,2,.5),L(this.h,3,.3)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return"minDetectionConfidence"in e&&L(this.h,2,e.minDetectionConfidence??.5),"minSuppressionThreshold"in e&&L(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}F(e,t){return this.j={detections:[]},wn(this,e,t),this.j}G(e,t,n){return this.j={detections:[]},Mn(this,e,n,t),this.j}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect_in"),J(e,"detections");const t=new jt;An(t,J5,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect_in"),Q(n,"DETECTIONS:detections"),n.o(t),It(e,n),this.g.attachProtoVectorListener("detections",(i,a)=>{for(const l of i)i=e0(l),this.j.detections.push(O0(i));C(this,a)}),this.g.attachEmptyPacketListener("detections",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Jt.prototype.detectForVideo=Jt.prototype.G,Jt.prototype.detect=Jt.prototype.F,Jt.prototype.setOptions=Jt.prototype.o,Jt.createFromModelPath=async function(e,t){return Z(Jt,e,{baseOptions:{modelAssetPath:t}})},Jt.createFromModelBuffer=function(e,t){return Z(Jt,e,{baseOptions:{modelAssetBuffer:t}})},Jt.createFromOptions=function(e,t){return Z(Jt,e,t)};var df=mn([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),hf=mn([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),mf=mn([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),$0=mn([474,475],[475,476],[476,477],[477,474]),gf=mn([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),wf=mn([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),e3=mn([469,470],[470,471],[471,472],[472,469]),yf=mn([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),t3=[...df,...hf,...mf,...gf,...wf,...yf],n3=mn([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function i3(e){e.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var pe=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,U(e=this.h=new f0,0,1,t=new ve),this.A=new c0,U(this.h,0,3,this.A),this.u=new iu,U(this.h,0,2,this.u),Hn(this.u,4,1),L(this.u,2,.5),L(this.A,2,.5),L(this.h,4,.5)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return"numFaces"in e&&Hn(this.u,4,e.numFaces??1),"minFaceDetectionConfidence"in e&&L(this.u,2,e.minFaceDetectionConfidence??.5),"minTrackingConfidence"in e&&L(this.h,4,e.minTrackingConfidence??.5),"minFacePresenceConfidence"in e&&L(this.A,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}F(e,t){return i3(this),wn(this,e,t),this.j}G(e,t,n){return i3(this),Mn(this,e,n,t),this.j}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect"),J(e,"face_landmarks");const t=new jt;An(t,P5,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),Q(n,"NORM_LANDMARKS:face_landmarks"),n.o(t),It(e,n),this.g.attachProtoVectorListener("face_landmarks",(i,a)=>{for(const l of i)i=vs(l),this.j.faceLandmarks.push(au(i));C(this,a)}),this.g.attachEmptyPacketListener("face_landmarks",i=>{C(this,i)}),this.outputFaceBlendshapes&&(J(e,"blendshapes"),Q(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(i,a)=>{if(this.outputFaceBlendshapes)for(const l of i)i=eu(l),this.j.faceBlendshapes.push(lf(i.g()??[]));C(this,a)}),this.g.attachEmptyPacketListener("blendshapes",i=>{C(this,i)})),this.outputFacialTransformationMatrixes&&(J(e,"face_geometry"),Q(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(i,a)=>{if(this.outputFacialTransformationMatrixes)for(const l of i)(i=I(i=W5(l),q5,2))&&this.j.facialTransformationMatrixes.push({rows:Zt(i,1)??0??0,columns:Zt(i,2)??0??0,data:na(i,3,_n,ta()).slice()??[]});C(this,a)}),this.g.attachEmptyPacketListener("face_geometry",i=>{C(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};pe.prototype.detectForVideo=pe.prototype.G,pe.prototype.detect=pe.prototype.F,pe.prototype.setOptions=pe.prototype.o,pe.createFromModelPath=function(e,t){return Z(pe,e,{baseOptions:{modelAssetPath:t}})},pe.createFromModelBuffer=function(e,t){return Z(pe,e,{baseOptions:{modelAssetBuffer:t}})},pe.createFromOptions=function(e,t){return Z(pe,e,t)},pe.FACE_LANDMARKS_LIPS=df,pe.FACE_LANDMARKS_LEFT_EYE=hf,pe.FACE_LANDMARKS_LEFT_EYEBROW=mf,pe.FACE_LANDMARKS_LEFT_IRIS=$0,pe.FACE_LANDMARKS_RIGHT_EYE=gf,pe.FACE_LANDMARKS_RIGHT_EYEBROW=wf,pe.FACE_LANDMARKS_RIGHT_IRIS=e3,pe.FACE_LANDMARKS_FACE_OVAL=yf,pe.FACE_LANDMARKS_CONTOURS=t3,pe.FACE_LANDMARKS_TESSELATION=n3;var pf=mn([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function a3(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function l3(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function s3(e,t=!0){const n=[];for(const a of e){var i=eu(a);e=[];for(const l of i.g())i=t&&Zt(l,1)!=null?Zt(l,1)??0:-1,e.push({score:Te(l,2)??0,index:i,categoryName:We(de(l,3))??""??"",displayName:We(de(l,4))??""??""});n.push(e)}return n}var Dt=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],U(e=this.j=new m0,0,1,t=new ve),this.u=new Jc,U(this.j,0,2,this.u),this.D=new Ic,U(this.u,0,3,this.D),this.A=new h0,U(this.u,0,2,this.A),this.h=new $5,U(this.j,0,3,this.h),L(this.A,2,.5),L(this.u,4,.5),L(this.D,2,.5)}get baseOptions(){return I(this.j,ve,1)}set baseOptions(e){U(this.j,0,1,e)}o(e){var a,l,s,r;if(Hn(this.A,3,e.numHands??1),"minHandDetectionConfidence"in e&&L(this.A,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&L(this.u,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&L(this.D,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new il,n=t,i=af(e.cannedGesturesClassifierOptions,(a=I(this.h,il,3))==null?void 0:a.l());U(n,0,2,i),U(this.h,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&((l=I(this.h,il,3))==null||l.g());return e.customGesturesClassifierOptions?(U(n=t=new il,0,2,i=af(e.customGesturesClassifierOptions,(s=I(this.h,il,4))==null?void 0:s.l())),U(this.h,0,4,t)):e.customGesturesClassifierOptions===void 0&&((r=I(this.h,il,4))==null||r.g()),this.l(e)}Ha(e,t){return a3(this),wn(this,e,t),l3(this)}Ia(e,t,n){return a3(this),Mn(this,e,n,t),l3(this)}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect"),J(e,"hand_gestures"),J(e,"hand_landmarks"),J(e,"world_hand_landmarks"),J(e,"handedness");const t=new jt;An(t,ey,this.j);const n=new dt;At(n,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),Q(n,"HAND_GESTURES:hand_gestures"),Q(n,"LANDMARKS:hand_landmarks"),Q(n,"WORLD_LANDMARKS:world_hand_landmarks"),Q(n,"HANDEDNESS:handedness"),n.o(t),It(e,n),this.g.attachProtoVectorListener("hand_landmarks",(i,a)=>{for(const l of i){i=vs(l);const s=[];for(const r of Gn(i,n0,1))s.push({x:Te(r,1)??0,y:Te(r,2)??0,z:Te(r,3)??0,visibility:Te(r,4)??0});this.landmarks.push(s)}C(this,a)}),this.g.attachEmptyPacketListener("hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("world_hand_landmarks",(i,a)=>{for(const l of i){i=nl(l);const s=[];for(const r of Gn(i,t0,1))s.push({x:Te(r,1)??0,y:Te(r,2)??0,z:Te(r,3)??0,visibility:Te(r,4)??0});this.worldLandmarks.push(s)}C(this,a)}),this.g.attachEmptyPacketListener("world_hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("hand_gestures",(i,a)=>{this.gestures.push(...s3(i,!1)),C(this,a)}),this.g.attachEmptyPacketListener("hand_gestures",i=>{C(this,i)}),this.g.attachProtoVectorListener("handedness",(i,a)=>{this.handedness.push(...s3(i)),C(this,a)}),this.g.attachEmptyPacketListener("handedness",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function r3(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}Dt.prototype.recognizeForVideo=Dt.prototype.Ia,Dt.prototype.recognize=Dt.prototype.Ha,Dt.prototype.setOptions=Dt.prototype.o,Dt.createFromModelPath=function(e,t){return Z(Dt,e,{baseOptions:{modelAssetPath:t}})},Dt.createFromModelBuffer=function(e,t){return Z(Dt,e,{baseOptions:{modelAssetBuffer:t}})},Dt.createFromOptions=function(e,t){return Z(Dt,e,t)},Dt.HAND_CONNECTIONS=pf;var Ot=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],U(e=this.h=new Jc,0,1,t=new ve),this.u=new Ic,U(this.h,0,3,this.u),this.j=new h0,U(this.h,0,2,this.j),Hn(this.j,3,1),L(this.j,2,.5),L(this.u,2,.5),L(this.h,4,.5)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return"numHands"in e&&Hn(this.j,3,e.numHands??1),"minHandDetectionConfidence"in e&&L(this.j,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&L(this.h,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&L(this.u,2,e.minHandPresenceConfidence??.5),this.l(e)}F(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],wn(this,e,t),r3(this)}G(e,t,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Mn(this,e,n,t),r3(this)}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect"),J(e,"hand_landmarks"),J(e,"world_hand_landmarks"),J(e,"handedness");const t=new jt;An(t,ty,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),Q(n,"LANDMARKS:hand_landmarks"),Q(n,"WORLD_LANDMARKS:world_hand_landmarks"),Q(n,"HANDEDNESS:handedness"),n.o(t),It(e,n),this.g.attachProtoVectorListener("hand_landmarks",(i,a)=>{for(const l of i)i=vs(l),this.landmarks.push(au(i));C(this,a)}),this.g.attachEmptyPacketListener("hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("world_hand_landmarks",(i,a)=>{for(const l of i)i=nl(l),this.worldLandmarks.push(bs(i));C(this,a)}),this.g.attachEmptyPacketListener("world_hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("handedness",(i,a)=>{var l=this.handedness,s=l.push;const r=[];for(const o of i){i=eu(o);const c=[];for(const f of i.g())c.push({score:Te(f,2)??0,index:Zt(f,1)??0??-1,categoryName:We(de(f,3))??""??"",displayName:We(de(f,4))??""??""});r.push(c)}s.call(l,...r),C(this,a)}),this.g.attachEmptyPacketListener("handedness",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ot.prototype.detectForVideo=Ot.prototype.G,Ot.prototype.detect=Ot.prototype.F,Ot.prototype.setOptions=Ot.prototype.o,Ot.createFromModelPath=function(e,t){return Z(Ot,e,{baseOptions:{modelAssetPath:t}})},Ot.createFromModelBuffer=function(e,t){return Z(Ot,e,{baseOptions:{modelAssetBuffer:t}})},Ot.createFromOptions=function(e,t){return Z(Ot,e,t)},Ot.HAND_CONNECTIONS=pf;var u3=mn([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function o3(e){e.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function c3(e){try{if(!e.D)return e.h;e.D(e.h)}finally{ru(e)}}function ou(e,t){e=vs(e),t.push(au(e))}var me=class extends Ct{constructor(e,t){super(new gn(e,t),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,U(e=this.j=new b0,0,1,t=new ve),this.I=new Ic,U(this.j,0,2,this.I),this.W=new ny,U(this.j,0,3,this.W),this.u=new iu,U(this.j,0,4,this.u),this.O=new c0,U(this.j,0,5,this.O),this.A=new p0,U(this.j,0,6,this.A),this.M=new v0,U(this.j,0,7,this.M),L(this.u,2,.5),L(this.u,3,.3),L(this.O,2,.5),L(this.A,2,.5),L(this.A,3,.3),L(this.M,2,.5),L(this.I,2,.5)}get baseOptions(){return I(this.j,ve,1)}set baseOptions(e){U(this.j,0,1,e)}o(e){return"minFaceDetectionConfidence"in e&&L(this.u,2,e.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in e&&L(this.u,3,e.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in e&&L(this.O,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"minPoseDetectionConfidence"in e&&L(this.A,2,e.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in e&&L(this.A,3,e.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in e&&L(this.M,2,e.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in e&&L(this.I,2,e.minHandLandmarksConfidence??.5),this.l(e)}F(e,t,n){const i=typeof t!="function"?t:{};return this.D=typeof t=="function"?t:n,o3(this),wn(this,e,i),c3(this)}G(e,t,n,i){const a=typeof n!="function"?n:{};return this.D=typeof n=="function"?n:i,o3(this),Mn(this,e,a,t),c3(this)}m(){var e=new Mt;ye(e,"input_frames_image"),J(e,"pose_landmarks"),J(e,"pose_world_landmarks"),J(e,"face_landmarks"),J(e,"left_hand_landmarks"),J(e,"left_hand_world_landmarks"),J(e,"right_hand_landmarks"),J(e,"right_hand_world_landmarks");const t=new jt,n=new Bh;At(n,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),function(a,l){if(l!=null)if(Array.isArray(l))ne(a,2,Br(l,0,ms));else{if(!(typeof l=="string"||l instanceof Sn||tc(l)))throw Error("invalid value in Any.value field: "+l+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");di(a,2,lc(l,!1),Ii())}}(n,this.j.g());const i=new dt;At(i,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Ac(i,8,Bh,n),he(i,"IMAGE:input_frames_image"),Q(i,"POSE_LANDMARKS:pose_landmarks"),Q(i,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),Q(i,"FACE_LANDMARKS:face_landmarks"),Q(i,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),Q(i,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),Q(i,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),Q(i,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),i.o(t),It(e,i),su(this,e),this.g.attachProtoListener("pose_landmarks",(a,l)=>{ou(a,this.h.poseLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("pose_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("pose_world_landmarks",(a,l)=>{var s=this.h.poseWorldLandmarks;a=nl(a),s.push(bs(a)),C(this,l)}),this.g.attachEmptyPacketListener("pose_world_landmarks",a=>{C(this,a)}),this.outputPoseSegmentationMasks&&(Q(i,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),al(this,"pose_segmentation_mask"),this.g.Z("pose_segmentation_mask",(a,l)=>{this.h.poseSegmentationMasks=[sl(this,a,!0,!this.D)],C(this,l)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",a=>{this.h.poseSegmentationMasks=[],C(this,a)})),this.g.attachProtoListener("face_landmarks",(a,l)=>{ou(a,this.h.faceLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("face_landmarks",a=>{C(this,a)}),this.outputFaceBlendshapes&&(J(e,"extra_blendshapes"),Q(i,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(a,l)=>{var s=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(a=eu(a),s.push(lf(a.g()??[]))),C(this,l)}),this.g.attachEmptyPacketListener("extra_blendshapes",a=>{C(this,a)})),this.g.attachProtoListener("left_hand_landmarks",(a,l)=>{ou(a,this.h.leftHandLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("left_hand_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("left_hand_world_landmarks",(a,l)=>{var s=this.h.leftHandWorldLandmarks;a=nl(a),s.push(bs(a)),C(this,l)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("right_hand_landmarks",(a,l)=>{ou(a,this.h.rightHandLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("right_hand_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("right_hand_world_landmarks",(a,l)=>{var s=this.h.rightHandWorldLandmarks;a=nl(a),s.push(bs(a)),C(this,l)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",a=>{C(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};me.prototype.detectForVideo=me.prototype.G,me.prototype.detect=me.prototype.F,me.prototype.setOptions=me.prototype.o,me.createFromModelPath=function(e,t){return Z(me,e,{baseOptions:{modelAssetPath:t}})},me.createFromModelBuffer=function(e,t){return Z(me,e,{baseOptions:{modelAssetBuffer:t}})},me.createFromOptions=function(e,t){return Z(me,e,t)},me.HAND_CONNECTIONS=pf,me.POSE_CONNECTIONS=u3,me.FACE_LANDMARKS_LIPS=df,me.FACE_LANDMARKS_LEFT_EYE=hf,me.FACE_LANDMARKS_LEFT_EYEBROW=mf,me.FACE_LANDMARKS_LEFT_IRIS=$0,me.FACE_LANDMARKS_RIGHT_EYE=gf,me.FACE_LANDMARKS_RIGHT_EYEBROW=wf,me.FACE_LANDMARKS_RIGHT_IRIS=e3,me.FACE_LANDMARKS_FACE_OVAL=yf,me.FACE_LANDMARKS_CONTOURS=t3,me.FACE_LANDMARKS_TESSELATION=n3;var Wt=class extends Ct{constructor(e,t){super(new gn(e,t),"input_image","norm_rect",!0),this.j={classifications:[]},U(e=this.h=new x0,0,1,t=new ve)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return U(this.h,0,2,af(e,I(this.h,Qc,2))),this.l(e)}sa(e,t){return this.j={classifications:[]},wn(this,e,t),this.j}ta(e,t,n){return this.j={classifications:[]},Mn(this,e,n,t),this.j}m(){var e=new Mt;ye(e,"input_image"),ye(e,"norm_rect"),J(e,"classifications");const t=new jt;An(t,iy,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),he(n,"IMAGE:input_image"),he(n,"NORM_RECT:norm_rect"),Q(n,"CLASSIFICATIONS:classifications"),n.o(t),It(e,n),this.g.attachProtoListener("classifications",(i,a)=>{this.j=oy(X5(i)),C(this,a)}),this.g.attachEmptyPacketListener("classifications",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Wt.prototype.classifyForVideo=Wt.prototype.ta,Wt.prototype.classify=Wt.prototype.sa,Wt.prototype.setOptions=Wt.prototype.o,Wt.createFromModelPath=function(e,t){return Z(Wt,e,{baseOptions:{modelAssetPath:t}})},Wt.createFromModelBuffer=function(e,t){return Z(Wt,e,{baseOptions:{modelAssetBuffer:t}})},Wt.createFromOptions=function(e,t){return Z(Wt,e,t)};var zt=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!0),this.h=new S0,this.embeddings={embeddings:[]},U(e=this.h,0,1,t=new ve)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){var t=this.h,n=I(this.h,r0,2);return n=n?n.clone():new r0,e.l2Normalize!==void 0?ne(n,1,fs(e.l2Normalize)):"l2Normalize"in e&&ne(n,1),e.quantize!==void 0?ne(n,2,fs(e.quantize)):"quantize"in e&&ne(n,2),U(t,0,2,n),this.l(e)}za(e,t){return wn(this,e,t),this.embeddings}Aa(e,t,n){return Mn(this,e,n,t),this.embeddings}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect"),J(e,"embeddings_out");const t=new jt;An(t,ay,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),Q(n,"EMBEDDINGS:embeddings_out"),n.o(t),It(e,n),this.g.attachProtoListener("embeddings_out",(i,a)=>{i=K5(i),this.embeddings=function(l){return{embeddings:Gn(l,Z5,1).map(s=>{var c,f;const r={headIndex:Zt(s,3)??0??-1,headName:We(de(s,4))??""??""};var o=s.v;return th(o,0|o[O],a0,Sc(s,1))!==void 0?(s=na(s=I(s,a0,Sc(s,1),void 0),1,_n,ta()),r.floatEmbedding=s.slice()):(o=new Uint8Array(0),r.quantizedEmbedding=((f=(c=I(s,Q5,Sc(s,2),void 0))==null?void 0:c.na())==null?void 0:f.h())??o),r}),timestampMs:D0(ah(l))}}(i),C(this,a)}),this.g.attachEmptyPacketListener("embeddings_out",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};zt.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=k0(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");e=k0(z0(e.quantizedEmbedding),z0(t.quantizedEmbedding))}return e},zt.prototype.embedForVideo=zt.prototype.Aa,zt.prototype.embed=zt.prototype.za,zt.prototype.setOptions=zt.prototype.o,zt.createFromModelPath=function(e,t){return Z(zt,e,{baseOptions:{modelAssetPath:t}})},zt.createFromModelBuffer=function(e,t){return Z(zt,e,{baseOptions:{modelAssetBuffer:t}})},zt.createFromOptions=function(e,t){return Z(zt,e,t)};var vf=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach(n=>{n.close()}),(t=this.categoryMask)==null||t.close()}};function wy(e){var n,i;const t=function(a){return Gn(a,dt,1)}(e.ca()).filter(a=>(We(de(a,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(e.u=[],t.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");t.length===1&&(((i=(n=I(t[0],jt,7))==null?void 0:n.j())==null?void 0:i.g())??new Map).forEach((a,l)=>{e.u[Number(l)]=We(de(a,1))??""})}function f3(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function d3(e){try{const t=new vf(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{ru(e)}}vf.prototype.close=vf.prototype.close;var ht=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ef,this.A=new E0,U(this.h,0,3,this.A),U(e=this.h,0,1,t=new ve)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?ne(this.h,2,hs(e.displayNamesLocale)):"displayNamesLocale"in e&&ne(this.h,2),"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}L(){wy(this)}segment(e,t,n){const i=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:n,f3(this),wn(this,e,i),d3(this)}La(e,t,n,i){const a=typeof n!="function"?n:{};return this.j=typeof n=="function"?n:i,f3(this),Mn(this,e,a,t),d3(this)}Da(){return this.u}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect");const t=new jt;An(t,A0,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),n.o(t),It(e,n),su(this,e),this.outputConfidenceMasks&&(J(e,"confidence_masks"),Q(n,"CONFIDENCE_MASKS:confidence_masks"),al(this,"confidence_masks"),this.g.aa("confidence_masks",(i,a)=>{this.confidenceMasks=i.map(l=>sl(this,l,!0,!this.j)),C(this,a)}),this.g.attachEmptyPacketListener("confidence_masks",i=>{this.confidenceMasks=[],C(this,i)})),this.outputCategoryMask&&(J(e,"category_mask"),Q(n,"CATEGORY_MASK:category_mask"),al(this,"category_mask"),this.g.Z("category_mask",(i,a)=>{this.categoryMask=sl(this,i,!1,!this.j),C(this,a)}),this.g.attachEmptyPacketListener("category_mask",i=>{this.categoryMask=void 0,C(this,i)})),J(e,"quality_scores"),Q(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(i,a)=>{this.qualityScores=i,C(this,a)}),this.g.attachEmptyPacketListener("quality_scores",i=>{this.categoryMask=void 0,C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ht.prototype.getLabels=ht.prototype.Da,ht.prototype.segmentForVideo=ht.prototype.La,ht.prototype.segment=ht.prototype.segment,ht.prototype.setOptions=ht.prototype.o,ht.createFromModelPath=function(e,t){return Z(ht,e,{baseOptions:{modelAssetPath:t}})},ht.createFromModelBuffer=function(e,t){return Z(ht,e,{baseOptions:{modelAssetBuffer:t}})},ht.createFromOptions=function(e,t){return Z(ht,e,t)};var bf=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach(n=>{n.close()}),(t=this.categoryMask)==null||t.close()}};bf.prototype.close=bf.prototype.close;var Cn=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ef,this.u=new E0,U(this.h,0,3,this.u),U(e=this.h,0,1,t=new ve)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}segment(e,t,n,i){const a=typeof n!="function"?n:{};if(this.j=typeof n=="function"?n:i,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.C+1,i=new j0,t.keypoint&&t.scribble)throw Error("Cannot provide both keypoint and scribble.");if(t.keypoint){var l=new tf;di(l,3,fs(!0),!1),di(l,1,cs(t.keypoint.x),0),di(l,2,cs(t.keypoint.y),0),gs(i,1,nf,l)}else{if(!t.scribble)throw Error("Must provide either a keypoint or a scribble.");{const r=new sy;for(l of t.scribble)di(t=new tf,3,fs(!0),!1),di(t,1,cs(l.x),0),di(t,2,cs(l.y),0),Ac(r,1,tf,t);gs(i,2,nf,r)}}this.g.addProtoToStream(i.g(),"mediapipe.tasks.vision.interactive_segmenter.proto.RegionOfInterest","roi_in",n),wn(this,e,a);e:{try{const r=new bf(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var s=r;break e}this.j(r)}finally{ru(this)}s=void 0}return s}m(){var e=new Mt;ye(e,"image_in"),ye(e,"roi_in"),ye(e,"norm_rect_in");const t=new jt;An(t,A0,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"),he(n,"IMAGE:image_in"),he(n,"ROI:roi_in"),he(n,"NORM_RECT:norm_rect_in"),n.o(t),It(e,n),su(this,e),this.outputConfidenceMasks&&(J(e,"confidence_masks"),Q(n,"CONFIDENCE_MASKS:confidence_masks"),al(this,"confidence_masks"),this.g.aa("confidence_masks",(i,a)=>{this.confidenceMasks=i.map(l=>sl(this,l,!0,!this.j)),C(this,a)}),this.g.attachEmptyPacketListener("confidence_masks",i=>{this.confidenceMasks=[],C(this,i)})),this.outputCategoryMask&&(J(e,"category_mask"),Q(n,"CATEGORY_MASK:category_mask"),al(this,"category_mask"),this.g.Z("category_mask",(i,a)=>{this.categoryMask=sl(this,i,!1,!this.j),C(this,a)}),this.g.attachEmptyPacketListener("category_mask",i=>{this.categoryMask=void 0,C(this,i)})),J(e,"quality_scores"),Q(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(i,a)=>{this.qualityScores=i,C(this,a)}),this.g.attachEmptyPacketListener("quality_scores",i=>{this.categoryMask=void 0,C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Cn.prototype.segment=Cn.prototype.segment,Cn.prototype.setOptions=Cn.prototype.o,Cn.createFromModelPath=function(e,t){return Z(Cn,e,{baseOptions:{modelAssetPath:t}})},Cn.createFromModelBuffer=function(e,t){return Z(Cn,e,{baseOptions:{modelAssetBuffer:t}})},Cn.createFromOptions=function(e,t){return Z(Cn,e,t)};var Pt=class extends Ct{constructor(e,t){super(new gn(e,t),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},U(e=this.h=new M0,0,1,t=new ve)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?ne(this.h,2,hs(e.displayNamesLocale)):"displayNamesLocale"in e&&ne(this.h,2),e.maxResults!==void 0?Hn(this.h,3,e.maxResults):"maxResults"in e&&ne(this.h,3),e.scoreThreshold!==void 0?L(this.h,4,e.scoreThreshold):"scoreThreshold"in e&&ne(this.h,4),e.categoryAllowlist!==void 0?Rr(this.h,5,e.categoryAllowlist):"categoryAllowlist"in e&&ne(this.h,5),e.categoryDenylist!==void 0?Rr(this.h,6,e.categoryDenylist):"categoryDenylist"in e&&ne(this.h,6),this.l(e)}F(e,t){return this.j={detections:[]},wn(this,e,t),this.j}G(e,t,n){return this.j={detections:[]},Mn(this,e,n,t),this.j}m(){var e=new Mt;ye(e,"input_frame_gpu"),ye(e,"norm_rect"),J(e,"detections");const t=new jt;An(t,ry,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),he(n,"IMAGE:input_frame_gpu"),he(n,"NORM_RECT:norm_rect"),Q(n,"DETECTIONS:detections"),n.o(t),It(e,n),this.g.attachProtoVectorListener("detections",(i,a)=>{for(const l of i)i=e0(l),this.j.detections.push(O0(i));C(this,a)}),this.g.attachEmptyPacketListener("detections",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Pt.prototype.detectForVideo=Pt.prototype.G,Pt.prototype.detect=Pt.prototype.F,Pt.prototype.setOptions=Pt.prototype.o,Pt.createFromModelPath=async function(e,t){return Z(Pt,e,{baseOptions:{modelAssetPath:t}})},Pt.createFromModelBuffer=function(e,t){return Z(Pt,e,{baseOptions:{modelAssetBuffer:t}})},Pt.createFromOptions=function(e,t){return Z(Pt,e,t)};var xf=class{constructor(e,t,n){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=n}close(){var e;(e=this.segmentationMasks)==null||e.forEach(t=>{t.close()})}};function h3(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function m3(e){try{const t=new xf(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.u)return t;e.u(t)}finally{ru(e)}}xf.prototype.close=xf.prototype.close;var kt=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,U(e=this.h=new C0,0,1,t=new ve),this.A=new v0,U(this.h,0,3,this.A),this.j=new p0,U(this.h,0,2,this.j),Hn(this.j,4,1),L(this.j,2,.5),L(this.A,2,.5),L(this.h,4,.5)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return"numPoses"in e&&Hn(this.j,4,e.numPoses??1),"minPoseDetectionConfidence"in e&&L(this.j,2,e.minPoseDetectionConfidence??.5),"minTrackingConfidence"in e&&L(this.h,4,e.minTrackingConfidence??.5),"minPosePresenceConfidence"in e&&L(this.A,2,e.minPosePresenceConfidence??.5),"outputSegmentationMasks"in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}F(e,t,n){const i=typeof t!="function"?t:{};return this.u=typeof t=="function"?t:n,h3(this),wn(this,e,i),m3(this)}G(e,t,n,i){const a=typeof n!="function"?n:{};return this.u=typeof n=="function"?n:i,h3(this),Mn(this,e,a,t),m3(this)}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect"),J(e,"normalized_landmarks"),J(e,"world_landmarks"),J(e,"segmentation_masks");const t=new jt;An(t,uy,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),Q(n,"NORM_LANDMARKS:normalized_landmarks"),Q(n,"WORLD_LANDMARKS:world_landmarks"),n.o(t),It(e,n),su(this,e),this.g.attachProtoVectorListener("normalized_landmarks",(i,a)=>{this.landmarks=[];for(const l of i)i=vs(l),this.landmarks.push(au(i));C(this,a)}),this.g.attachEmptyPacketListener("normalized_landmarks",i=>{this.landmarks=[],C(this,i)}),this.g.attachProtoVectorListener("world_landmarks",(i,a)=>{this.worldLandmarks=[];for(const l of i)i=nl(l),this.worldLandmarks.push(bs(i));C(this,a)}),this.g.attachEmptyPacketListener("world_landmarks",i=>{this.worldLandmarks=[],C(this,i)}),this.outputSegmentationMasks&&(Q(n,"SEGMENTATION_MASK:segmentation_masks"),al(this,"segmentation_masks"),this.g.aa("segmentation_masks",(i,a)=>{this.segmentationMasks=i.map(l=>sl(this,l,!0,!this.u)),C(this,a)}),this.g.attachEmptyPacketListener("segmentation_masks",i=>{this.segmentationMasks=[],C(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};kt.prototype.detectForVideo=kt.prototype.G,kt.prototype.detect=kt.prototype.F,kt.prototype.setOptions=kt.prototype.o,kt.createFromModelPath=function(e,t){return Z(kt,e,{baseOptions:{modelAssetPath:t}})},kt.createFromModelBuffer=function(e,t){return Z(kt,e,{baseOptions:{modelAssetBuffer:t}})},kt.createFromOptions=function(e,t){return Z(kt,e,t)},kt.POSE_CONNECTIONS=u3;const cu="https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task",yy="https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm",py=()=>{const e=y.useRef(null),[t,n]=y.useState(!1),[i,a]=y.useState("Initializing..."),[l,s]=y.useState(0),[r,o]=y.useState(!1);y.useEffect(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(d=>{console.log("ServiceWorker registered:",d)}).catch(d=>{console.log("ServiceWorker registration failed:",d)})},[]);const c=async()=>"caches"in window?await(await caches.open("mediapipe-models-v1")).match(cu)!==void 0:!1,f=async()=>{try{const d=await fetch(cu),m=d.headers.get("content-length"),v=m?parseInt(m,10):0;if(!d.body)throw new Error("No response body");const x=d.body.getReader();let E=0;const g=[];for(;;){const{done:w,value:p}=await x.read();if(w)break;if(g.push(p),E+=p.length,v){const b=Math.round(E/v*100);s(b),a(`Downloading model... ${b}%`)}}return"caches"in window&&await(await caches.open("mediapipe-models-v1")).put(cu,new Response(new Blob(g),{headers:{"Content-Type":"application/octet-stream"}})),!0}catch(d){return console.error("Failed to preload model:",d),!1}};return y.useEffect(()=>{(async()=>{try{a("Checking cached models..."),await c()?a("Using cached model..."):(a("Model not cached. Downloading..."),await f()),a("Loading MediaPipe WASM...");const v=await ua.forVisionTasks(yy);a("Creating face landmarker...");const x=await pe.createFromOptions(v,{baseOptions:{modelAssetPath:cu,delegate:"GPU"},runningMode:"VIDEO",outputFaceBlendshapes:!0,numFaces:2});e.current=x,n(!0),a("Model loaded successfully ✅")}catch(m){console.error("Model init error:",m),a(`Error: ${m==null?void 0:m.message}`),(m==null?void 0:m.name)==="NotAllowedError"&&o(!0)}})()},[]),{faceLandmarkerRef:e,isModelLoaded:t,statusMessage:i,setStatusMessage:a,loadingProgress:l,permissionDenied:r,clearCache:async()=>{"caches"in window&&(await caches.delete("mediapipe-models-v1"),a("Cache cleared. Please refresh to re-download models."))}}},vy=()=>{const[e,t]=y.useState(0),n=y.useRef({lastTime:0,frames:0,fps:0}),i=y.useCallback(()=>{const a=performance.now(),l=n.current;if(l.frames++,a-l.lastTime>=1e3){const s=Math.round(l.frames*1e3/(a-l.lastTime));t(s),l.frames=0,l.lastTime=a}},[]);return{fps:e,updateFPS:i}},by=()=>{const e=y.useRef({value:100,isLookingAway:!1}),t=y.useCallback((l,s,r,o)=>{if(!l||!r||!s)return;const c=l.getContext("2d");if(!c)return;const{width:f,height:h}=l;if(c.clearRect(0,0,f,h),c.drawImage(s,0,0,f,h),o){c.fillStyle="#00FF00";for(const d of r)c.fillRect(d.x*f-.5,d.y*h-.5,1,1)}},[]),n=y.useCallback(l=>{const s=e.current.value/100,r=100,o=20,c=20,f=40;l.fillStyle="rgba(0, 0, 0, 0.3)",l.fillRect(c,f,o,r),l.fillStyle=`rgba(${Math.floor(255*(1-s))}, ${Math.floor(255*s)}, 0, 0.8)`;const h=r*s;l.fillRect(c,f+r-h,o,h),l.fillStyle="#FFFFFF",l.fillRect(c,f+r*(1-s),o,2)},[]),i=y.useCallback((l,s,r,o,c,f,h)=>{if(t(l,s,r,o),c&&f&&h){const d=l.getContext("2d");d&&n(d)}},[t,n]),a=y.useCallback((l,s)=>{const r=l.getContext("2d");r&&(r.clearRect(0,0,l.width,l.height),r.drawImage(s,0,0,l.width,l.height))},[]);return{drawLandmarks:t,drawEngagementBar:n,drawWithEngagementBar:i,clearCanvas:a,engagementRef:e}},xy=50,Sy=()=>{const[e,t]=y.useState(100),[n,i]=y.useState(!1),a=y.useRef(0),l=y.useCallback((s,r,o)=>{if(!o||s.length<468)return;const c=s[33],f=s[263],h=s[1];if(!c||!f||!h)return;const d=(c.x+f.x)*.5,m=(c.y+f.y)*.5,v=d-r.x,x=m-r.y,E=Math.sqrt(v*v+x*x),g=Math.abs(h.y-r.noseY)*100,w=Math.abs(h.x-r.noseX)*100,p=Math.max(0,100-(E*200+g+w)),b=p<xy,A=performance.now();return A-a.current>100&&(t(p),i(b),a.current=A),{engagement:p,isLookingAway:b}},[]);return{engagement:e,isLookingAway:n,analyzeGaze:l,setEngagement:t,setIsLookingAway:i}},Ey=.05,_y=()=>{const[e,t]=y.useState(!1),[n,i]=y.useState(!1),a=y.useCallback((r,o)=>Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),[]),l=y.useCallback((r,o)=>{if(!r||!o)return 0;const c=[1,33,263,61,291,10,152];let f=0,h=0;const d=o[33],m=o[263],v=r[33],x=r[263];if(!d||!m||!v||!x)return 0;const E=a(d,m),g=a(v,x);if(E===0||g===0)return 0;for(const p of c){const b=o[p],A=r[p];if(b&&A){const N=d.x+(A.x-v.x)*E/g,_=d.y+(A.y-v.y)*E/g;f+=a(b,{x:N,y:_}),h++}}return h===0?0:f/h},[a]),s=y.useCallback((r,o,c,f)=>{if(!r.faceLandmarks||r.faceLandmarks.length===0)return o?(f("Reference face not detected."),i(!0),t(!1)):i(!1),null;if(o&&c){let h=null,d=0;for(const m of r.faceLandmarks)l(m,c)<Ey&&(h=m,d++);return d===1?(t(!1),i(!1),f("Reference face tracked."),h):d>1?(t(!0),i(!1),f("Multiple matching faces detected. Tracking suspended."),null):(t(!1),i(!0),f("Reference face not detected."),null)}else{r.faceLandmarks.length>1?(t(!0),f("Multiple faces detected. Set reference for single face tracking.")):(t(!1),f("No reference set. Detecting first face."));const h=r.faceLandmarks[0];return!h||h.length<468?null:h}},[l]);return{multipleFacesDetected:e,referenceFaceNotDetected:n,analyzeFace:s,setMultipleFacesDetected:t,setReferenceFaceNotDetected:i}},Ty=1e3,Ay=(e,t)=>{const[n,i]=y.useState(!1),[a,l]=y.useState("face_detected"),{incrementGazeViolation:s}=n1(),{multipleFacesDetected:r,referenceFaceNotDetected:o,isLookingAway:c}=e;y.useEffect(()=>{let d;return(c||r||o)&&t?d=setTimeout(()=>{i(!0),c?(l("looking_away"),s("looking_away")):r?(l("multiple_faces"),s("multiple_faces")):o&&(l("no_face_detected"),s("no_face_detected"))},Ty):(i(!1),l("face_detected")),()=>{clearTimeout(d)}},[c,r,o,t,s]);const f=y.useCallback(()=>r?"multiple_faces":o?"no_face_detected":c?"looking_away":"face_detected",[r,o,c]),h=y.useCallback(()=>{i(!1),l("face_detected")},[]);return{showGazeWarningModal:n,faceDetectionState:a,getWarningType:f,closeWarningModal:h,setShowGazeWarningModal:i,setFaceDetectionState:l}};class be extends Error{constructor(t,n,i=!1){super(t),this.code=n,this.recoverable=i,this.name="STTError"}}class Ny{constructor(t={}){Qt(this,"config");Qt(this,"mediaRecorder",null);Qt(this,"audioChunks",[]);Qt(this,"recordingStream",null);Qt(this,"autoStopTimeoutId",null);this.config={baseUrl:"http://localhost:8000",provider:"groq",model:"whisper-large-v3-turbo",language:"en",includeTimestamps:!1,temperature:0,...t}}updateConfig(t){this.config={...this.config,...t}}isRecordingSupported(){return!!(navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia=="function"&&window.MediaRecorder)}async startRecording(t,n){var i;if(!this.isRecordingSupported())throw new be("Audio recording is not supported in this browser","RECORDING_NOT_SUPPORTED",!1);if(this.isRecording())throw new be("Recording is already in progress","ALREADY_RECORDING",!0);try{this.recordingStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,sampleRate:44100}}),this.audioChunks=[];const a=this.getSupportedMimeType();this.mediaRecorder=new MediaRecorder(this.recordingStream,{mimeType:a}),this.mediaRecorder.ondataavailable=l=>{var s;l.data.size>0&&(this.audioChunks.push(l.data),(s=n==null?void 0:n.onDataAvailable)==null||s.call(n,l.data))},this.mediaRecorder.onstop=()=>{var l;(l=n==null?void 0:n.onStop)==null||l.call(n)},this.mediaRecorder.onerror=l=>{var r;const s=new be(`Recording failed: ${l.error}`,"RECORDING_ERROR",!0);(r=n==null?void 0:n.onError)==null||r.call(n,s),this.cleanup()},this.mediaRecorder.start(100),(i=n==null?void 0:n.onStart)==null||i.call(n),t&&t>0&&(this.autoStopTimeoutId=setTimeout(()=>{this.isRecording()&&this.stopRecording()},t*1e3))}catch(a){if(this.cleanup(),a instanceof Error){if(a.name==="NotAllowedError"||a.name==="PermissionDeniedError")throw new be("Microphone permission was denied","PERMISSION_DENIED",!1);if(a.name==="NotFoundError")throw new be("No microphone found","NO_MICROPHONE",!1)}throw new be(`Failed to start recording: ${a instanceof Error?a.message:String(a)}`,"START_RECORDING_FAILED",!0)}}async stopRecording(){if(this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null),!this.mediaRecorder||!this.isRecording())throw new be("No active recording to stop","NO_ACTIVE_RECORDING",!1);return new Promise((t,n)=>{if(!this.mediaRecorder){n(new be("MediaRecorder is null","MEDIARECORDER_NULL",!1));return}const i=this.mediaRecorder,a=()=>{try{const l=i.mimeType||"audio/webm",s=new Blob(this.audioChunks,{type:l});this.cleanup(),t(s)}catch(l){n(new be(`Failed to create audio blob: ${l instanceof Error?l.message:String(l)}`,"BLOB_CREATION_FAILED",!1))}};i.addEventListener("stop",a,{once:!0}),i.stop()})}async transcribe(t){const{audioBlob:n}=t;if(!n||n.size===0)throw new be("Audio blob is empty or invalid","INVALID_AUDIO",!1);try{const i=new FormData,a=new File([n],"recording.wav",{type:n.type||"audio/wav"});if(i.append("file",a),i.append("qna_id",this.config.qnaId||""),!this.config.interviewId)throw new be("Interview ID is missing from configuration","MISSING_INTERVIEW_ID",!1);const l=await ui(`${this.config.baseUrl}${ci.TRANSCRIBE_ANSWER(this.config.interviewId)}`,{method:"POST",headers:{accept:"application/json","X-STT-Provider":this.config.provider||"groq",...this.config.authToken&&{Authorization:`Bearer ${this.config.authToken}`}},body:i},{attempts:1,backoff:"exponential",baseDelay:1e3,maxDelay:3e3,jitter:!0});if(!l.ok){const r=await l.text();let o=`STT request failed: ${l.status} ${l.statusText}`;try{const c=JSON.parse(r);o=c.message||c.error||o}catch{o=r||o}throw new be(o,`HTTP_${l.status}`,l.status>=500)}return{transcript:(await l.json()).data.transcribed_text??""}}catch(i){throw i instanceof be?i:new be(`Transcription failed: ${i instanceof Error?i.message:String(i)}`,"TRANSCRIPTION_FAILED",!0)}}cancelRecording(){this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null),this.mediaRecorder&&this.isRecording()&&this.mediaRecorder.stop(),this.cleanup()}isRecording(){return this.mediaRecorder!==null&&this.mediaRecorder.state==="recording"}getSupportedMimeType(){const t=["audio/webm","audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/wav"];for(const n of t)if(MediaRecorder.isTypeSupported(n))return n;return"audio/webm"}getRecordingStream(){return this.recordingStream}cleanup(){this.recordingStream&&(this.recordingStream.getTracks().forEach(t=>t.stop()),this.recordingStream=null),this.mediaRecorder=null,this.audioChunks=[],this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null)}}const rl=new Ny,jy=(e,t,n,i)=>{const a=y.useRef(null);return y.useEffect(()=>{if(!t)return;const l=async()=>{try{const o=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:640},height:{ideal:480},facingMode:"user"}});e.current&&(e.current.srcObject=o,e.current.onloadeddata=()=>{n()})}catch(o){console.error("Camera access error:",o),i("Camera access failed")}},s=a.current,r=e.current;return l(),()=>{s&&cancelAnimationFrame(s),r!=null&&r.srcObject&&r.srcObject.getTracks().forEach(c=>c.stop())}},[t,n]),y.useEffect(()=>{const l=rl.getRecordingStream();if(l&&e.current){e.current.srcObject=l;const s=l.getVideoTracks(),r=l.getAudioTracks(),o=()=>{console.log("Media track ended - permission may have been revoked")};[...s,...r].forEach(c=>{c.addEventListener("ended",o)})}},[]),{animationFrameRef:a}},My=(e,t,n,i,a,l,s,r,o,c,f,h,d,m,v)=>{const x=y.useRef(null),E=y.useCallback(()=>{var b;const g=e.current,w=t.current,p=n.current;if(!g||g.readyState<2||!p||!w){x.current=requestAnimationFrame(E);return}i();try{const A=performance.now(),N=p.detectForVideo(g,A);if(((b=N.faceLandmarks)==null?void 0:b.length)>0){v(!1);const _=a(N,o,c.current,m);_?(l(w,g,_,f,h,d,o),o&&d&&r(_,c.current,d)):s(w,g)}else s(w,g),o?(v(!0),m("Reference face not detected.")):v(!1)}catch(A){console.error("Face detection error:",A)}x.current=requestAnimationFrame(E)},[e,t,n,i,a,l,s,r,o,c,f,h,d,m,v]);return{renderLoop:E,animationFrameRef:x}},Cy=(e,t,n,i)=>{const{referenceSet:a,referenceRef:l,setReferenceData:s}=n1(),r=y.useRef(l),o=y.useCallback(()=>{r.current=l},[l]),c=y.useCallback(()=>{var d;const f=e.current,h=t.current;if(console.log({faceLandmarker:f,video:h}),!(!f||!h))try{const m=performance.now(),v=f.detectForVideo(h,m);if((d=v.faceLandmarks)!=null&&d[0]){const x=v.faceLandmarks[0],E=x[33],g=x[263],w=x[1];E&&g&&w&&(r.current={x:(E.x+g.x)*.5,y:(E.y+g.y)*.5,noseX:w.x,noseY:w.y},s(!0,r.current),n("Reference set. Gaze tracking active."),console.log("Reference set. Gaze tracking active.",r.current),i&&i())}}catch(m){console.error("Set reference error:",m),n("Failed to set reference")}},[e,t,n,s,i]);return{referenceSet:a,referenceRef:r,setReference:c,syncReference:o}},Sf=({isOpen:e,onClose:t,children:n,title:i,showCloseButton:a=!0,closeOnOverlayClick:l=!0,closeOnEscape:s=!0,className:r=""})=>{if(y.useEffect(()=>{if(!e||!s)return;const f=h=>{h.key==="Escape"&&t()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,s,t]),y.useEffect(()=>(e?(document.body.style.overflow="hidden",document.body.classList.add("interview-widget-container")):(document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")),()=>{document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")}),[e]),!e)return null;const o=f=>{l&&f.target===f.currentTarget&&t()},c=u.jsxs("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center",children:[u.jsx("div",{className:"iw-fixed iw-inset-0 iw-bg-black iw-bg-opacity-50 iw-transition-opacity",onClick:o}),u.jsxs("div",{className:`iw-relative iw-bg-white iw-rounded-lg iw-shadow-xl iw-max-w-md iw-w-full iw-mx-4 iw-max-h-[90vh] iw-overflow-hidden ${r}`,role:"dialog","aria-modal":"true","aria-labelledby":i?"dialog-title":void 0,children:[(i||a)&&u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between iw-p-4 iw-border-b iw-border-gray-200",children:[i&&u.jsx("h2",{id:"dialog-title",className:"iw-text-lg iw-font-semibold iw-text-gray-900",children:i}),a&&u.jsx("button",{onClick:t,className:"iw-p-1 iw-text-gray-400 iw-hover:text-gray-600 iw-transition-colors iw-rounded iw-hover:bg-gray-100","aria-label":"Close dialog",children:u.jsx("svg",{className:"iw-w-5 iw-h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),u.jsx("div",{className:"iw-p-4 iw-overflow-y-auto",children:n})]})]});return Zi.createPortal(c,document.body)},g3=({children:e,variant:t="primary",size:n="md",fullWidth:i=!1,isLoading:a=!1,disabled:l,className:s="",...r})=>{const o="iw-inline-flex iw-items-center iw-justify-center iw-rounded-md iw-font-medium iw-transition-colors iw-focus:outline-none iw-focus:ring-2 iw-focus:ring-primary-500 iw-focus:ring-offset-2",c={primary:"iw-bg-primary-600 iw-text-white iw-hover:bg-primary-700 iw-border iw-border-transparent",secondary:"iw-bg-primary-100 iw-text-primary-700 iw-hover:bg-primary-200 iw-border iw-border-transparent",outline:"iw-bg-transparent iw-text-primary-700 iw-border iw-border-primary-500 iw-hover:bg-primary-50",text:"iw-bg-transparent iw-text-primary-600 iw-hover:bg-primary-50 iw-border iw-border-transparent",gradient:"iw-text-white iw-border iw-border-transparent iw-bg-gradient-to-r iw-from-purple-500 iw-to-indigo-500 hover:iw-from-purple-600 hover:iw-to-indigo-600"},f={sm:"iw-px-3 iw-py-1.5 iw-text-sm",md:"iw-px-4 iw-py-2.5 iw-text-sm",lg:"iw-px-5 iw-py-3 iw-text-base"},h="iw-disabled:opacity-50 iw-disabled:cursor-not-allowed iw-disabled:pointer-events-none",d=i?"iw-w-full":"";return u.jsxs("button",{className:`${o} ${c[t]} ${f[n]} ${d} ${h} ${s}`,disabled:l||a,...r,children:[a&&u.jsx(o1,{height:16,width:16,style:{marginRight:"3px"}}),e]})},Ss=e=>{const{baseColor:t,borderRadius:n}=$l(),{loading:i,children:a,...l}=e;return u.jsx(g3,{style:{background:o6(t),borderRadius:n},...l,children:i?u.jsx(o1,{}):a})};function Dy({isOpen:e,onClose:t,warningType:n}){const i=c1[n],a=i.icon,l=()=>{t()};return n==="face_detected"?null:u.jsx(Sf,{isOpen:e,onClose:t,children:e&&u.jsx("div",{className:"iw-bg-white iw-border-white iw-border iw-p-0 iw-shadow-lg sm:iw-max-w-md",children:u.jsxs("div",{children:[u.jsx("div",{className:"iw-sr-only",children:i.description}),u.jsxs("div",{className:"iw-px-8 iw-py-8 iw-text-center",children:[u.jsx("div",{className:`iw-mx-auto iw-mb-6 iw-flex iw-h-16 iw-w-16 iw-items-center iw-justify-center iw-rounded-full ${i.iconBg} border ${i.iconBorder}`,children:u.jsx(a,{className:`iw-h-7 iw-w-7 ${i.iconColor}`})}),u.jsx("h1",{className:"iw-text-foreground iw-mb-3 iw-text-2xl iw-font-bold iw-tracking-tight",children:i.title}),u.jsx("h2",{className:"iw-text-gray-500 iw-mb-6 iw-text-base iw-font-medium",children:i.subtitle}),u.jsx("p",{className:"iw-text-neutral-400 iw-mx-auto iw-mb-8 iw-max-w-sm iw-text-sm iw-leading-relaxed",children:i.description}),u.jsx(Ss,{onClick:l,className:"iw-w-full iw-bg-gray-800 iw-text-white hover:iw-bg-gray-800",children:i.buttonText})]})]})})})}const w3=y.forwardRef(({className:e="",interviewId:t="",interview_duration:n,showProctoringUI:i=!0,onSetReference:a,isAnswering:l,onProctoringStatusChange:s,showStatusOverlay:r=!1},o)=>{var Yw;const{authToken:c}=a1(),f=c?f6(c):null,{borderRadius:h}=$l(),d=h??18,{proctoring:m}=Ko(),v=!!(m!=null&&m.gazeAnalysisEnabled),[x,E]=y.useState(!1),[g,w]=y.useState((m==null?void 0:m.showLandmarks)??!1),[p,b]=y.useState(i&&((m==null?void 0:m.showEngagementBar)??!0)),[A,N]=y.useState(v),[_,M]=y.useState(!1),T=y.useRef(null),D=y.useRef(null),Ee=y.useRef(null),Re=y.useRef(null),rt=y.useCallback(async St=>{const Er=T.current,ft=Ee.current;if(!Er||!ft)return;const Jl=ft.getContext("2d");Jl&&(ft.width=Er.videoWidth,ft.height=Er.videoHeight,Jl.save(),Jl.scale(-1,1),Jl.drawImage(Er,-ft.width,0,ft.width,ft.height),Jl.restore(),await new Promise(Vo=>ft.toBlob(Vo,"image/jpeg")))},[j6,t]);y.useEffect(()=>{let St;return l&&(M(!0),St=setTimeout(()=>M(!1),1e3)),()=>{St&&clearTimeout(St)}},[l]);const{faceLandmarkerRef:cn,isModelLoaded:xt,statusMessage:j,setStatusMessage:G,loadingProgress:R,permissionDenied:$,clearCache:se}=py(),{fps:ut,updateFPS:bn}=vy(),{drawWithEngagementBar:fn,clearCanvas:Xt,engagementRef:ot}=by(),{engagement:ct,isLookingAway:dn,analyzeGaze:Ce,setEngagement:Xi,setIsLookingAway:Il}=Sy(),{multipleFacesDetected:br,referenceFaceNotDetected:xr,analyzeFace:J2,setMultipleFacesDetected:Bo,setReferenceFaceNotDetected:Ma}=_y(),{referenceSet:Sr,referenceRef:Ro,setReference:V,syncReference:_e}=Cy(cn,T,G,a),Ca={multipleFacesDetected:br,referenceFaceNotDetected:xr,isLookingAway:dn},{showGazeWarningModal:Go,getWarningType:Ho,closeWarningModal:Vw,setShowGazeWarningModal:qw,setFaceDetectionState:Fw}=Ay(Ca,v&&!r);y.useEffect(()=>{if(s){const St=Ho()||"face_detected";s(St)}},[br,xr,dn,Ho,s]);const{renderLoop:e7}=My(T,D,cn,bn,J2,fn,Xt,Ce,Sr,Ro,g,p,v,G,Ma);jy(T,xt,e7,G),y.useEffect(()=>{_e()},[_e]),y.useEffect(()=>{ot&&ot.current&&(ot.current.value=ct,ot.current.isLookingAway=dn)},[ct,dn,ot]);const t7=y.useCallback(St=>{N(St),St||(Xi(100),Il(!1))},[Xi,Il]),n7=y.useCallback(()=>{Il(!1),Bo(!1),Ma(!1),Fw("face_detected"),qw(!1),Vw()},[Il,Bo,Ma,Fw,qw,Vw]),i7={engagement:ct,fps:ut,isLookingAway:dn,multipleFacesDetected:br,referenceFaceNotDetected:xr};return y.useEffect(()=>{const St=[];return(async()=>{try{const ft=await navigator.mediaDevices.getUserMedia({video:!0,audio:!1});Re.current=ft,T.current&&(T.current.srcObject=ft);const Vo=(n??Tr)*60*1e3/3,a7=[0,1,2].map((Da,Qi)=>({label:`capture-${Qi+1}`,start:Qi*Vo,end:(Qi+1)*Vo})),l7=(Da,Qi)=>Da===Qi?Da:Math.random()*(Qi-Da)+Da;a7.forEach(({label:Da,start:Qi,end:s7},r7)=>{let W2;r7===0?W2=3e3:W2=l7(Qi,s7),St.push(setTimeout(()=>{rt(Da)},W2))})}catch(ft){console.error("Error accessing camera:",ft)}})(),()=>{Re.current&&Re.current.getTracks().forEach(ft=>ft.stop()),St.forEach(clearTimeout)}},[rt]),y.useImperativeHandle(o,()=>({setReference:()=>{V()},stopCamera:()=>{Re.current&&(Re.current.getTracks().forEach(St=>St.stop()),Re.current=null)}}),[V]),u.jsxs("div",{className:`iw-relative iw-h-full iw-w-full ${e}`,children:[$?u.jsxs("div",{className:"iw-rounded-md iw-border iw-border-red-600 iw-p-5 iw-text-red-600",children:[u.jsx("h2",{children:"Camera Permission Denied"}),u.jsx("p",{children:"Please allow camera access to use this application."})]}):u.jsx("div",{className:"iw-flex iw-w-full iw-h-full iw-justify-start iw-items-start",children:u.jsxs("div",{className:`iw-relative iw-max-w-full iw-max-h-full iw-aspect-video iw-rounded-2xl iw-overflow-hidden iw-bg-black ${_?"iw-animate-answer-start":""} ${l?"iw-border-4 iw-border-[#6296FB]":""}`,style:{width:"100%",height:"auto",minHeight:"0"},children:[u.jsx("video",{ref:T,autoPlay:!0,playsInline:!0,muted:!0,className:"iw-absolute iw-inset-0 iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)"}}),v&&u.jsx("canvas",{ref:D,width:320,height:240,className:"iw-absolute iw-inset-0 iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)",borderRadius:d}}),u.jsx("canvas",{ref:Ee,style:{display:"none"}}),i&&u.jsxs("div",{className:"iw-absolute iw-top-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-[#FFEBE6] iw-px-2 iw-py-1 iw-backdrop-blur-md",children:[u.jsx("div",{className:"iw-size-2 iw-animate-pulse iw-rounded-full iw-bg-red-500"}),u.jsx("span",{className:"iw-font-medium iw-text-xs iw-text-[#E94315]",children:"RECORDING"})]}),i&&((Yw=f==null?void 0:f.data)==null?void 0:Yw.user_name)&&u.jsx("div",{className:"iw-absolute iw-z-50 iw-bottom-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-[#F1F5FE] iw-px-3 iw-py-1 iw-backdrop-blur-md",children:u.jsx("span",{className:"iw-font-medium iw-text-xs iw-text-[#062260]",children:f.data.user_name})}),i&&u.jsx("div",{className:"iw-absolute iw-bottom-4 iw-right-4",children:u.jsx(C6,{showControls:(m==null?void 0:m.showControls)??!1,isBubbleOpen:x,setIsBubbleOpen:E,setReference:V,clearCache:se,isModelLoaded:xt,gazeAnalysisEnabled:A&&v,referenceSet:Sr,showLandmarks:g,setShowLandmarks:w,showEngagementBar:p,setShowEngagementBar:b,handleToggleGazeAnalysis:t7,stats:i7,statusMessage:j,loadingProgress:R})}),r&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"iw-absolute iw-inset-0 iw-pointer-events-none iw-z-10 ",style:{background:"radial-gradient(ellipse 20% 40% at 50% 45%, transparent 99.5%, rgba(0,0,0,0.35) 100%)"}}),u.jsx("div",{className:"iw-absolute iw-bottom-2 iw-inset-x-0 iw-flex iw-justify-center iw-pointer-events-none iw-z-20",children:u.jsx(Oy,{status:Ho()??"face_detected"})})]})]})}),v&&Go&&!r&&u.jsx(Dy,{isOpen:Go,onClose:n7,warningType:Ho()})]})}),Oy=({status:e})=>{const t=c1[e];if(!t)return null;const n=e!=="face_detected";return u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-gap-2",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2 iw-px-3 iw-py-1 iw-rounded-full iw-backdrop-blur-md iw-shadow-sm transition-colors duration-300 iw-text-white",children:[u.jsx("div",{className:`iw-flex iw-h-4 iw-w-4 iw-items-center iw-size-2.5 iw-justify-center iw-rounded-full iw-text-white ${n?"iw-bg-[#E94315]":"iw-bg-[#22C55E]"}`,children:n?u.jsx(r1,{}):u.jsx(Nr,{})}),u.jsx("span",{className:"iw-text-sm iw-font-medium",children:e==="face_detected"?"Face detected clearly":t.title})]}),n&&u.jsx("span",{className:"iw-text-white iw-text-center iw-text-sm iw-drop-shadow-sm iw-max-w-[400px] iw-px-3 ",children:"Sit upright & look directly into the camera"})]})},y3=({micEnabled:e=!1,videoEnabled:t=!1,buttonText:n,onButtonClick:i,isAgreed:a,onAgreedToggle:l,showCheckbox:s=!0,showMediaIcons:r=!0,disabled:o=!1})=>{const c=o||!a||r&&(!e||!t);return u.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-6 iw-w-full",children:[s&&u.jsxs("div",{className:"iw-flex iw-items-start iw-gap-3 iw-bg-[#F1F5FE] iw-rounded-xl iw-p-4 iw-border iw-border-[#E7EAF1]",children:[u.jsx("div",{className:`iw-mt-0.5 iw-h-5 iw-w-5 iw-min-w-[20px] iw-rounded iw-border iw-flex iw-items-center iw-justify-center iw-cursor-pointer iw-transition-colors ${a?"iw-bg-[#062260] iw-border-[#062260]":"iw-bg-white iw-border-[#B3B9CB]"}`,onClick:f=>{f.stopPropagation(),l(!a)},children:a&&u.jsx(Nr,{className:"iw-size-3 iw-text-white"})}),u.jsx("label",{onClick:()=>l(!a),className:"iw-text-sm iw-text-[#062260] iw-font-medium iw-cursor-pointer iw-select-none",children:"By continuing, you acknowledge and consent to the use of your face data exclusively for interview monitoring"})]}),u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-4",children:[r&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"iw-relative",children:[u.jsx("div",{className:`iw-flex iw-h-12 iw-w-16 iw-items-center iw-justify-center iw-rounded-xl iw-border iw-transition-all ${e?"iw-border-[#E7EAF1] iw-bg-white iw-text-[#062260]":"iw-border-rose-200 iw-bg-rose-50 iw-text-rose-600"}`,children:e?u.jsx(y6,{className:"iw-h-6 iw-w-6"}):u.jsx(p6,{className:"iw-h-6 iw-w-6"})}),e&&u.jsx("div",{className:"iw-absolute -iw-right-1 -iw-top-1 iw-flex iw-h-4 iw-w-4 iw-items-center iw-justify-center iw-rounded-full iw-bg-[#22C55E] iw-text-white",children:u.jsx(Nr,{className:"iw-h-2.5 iw-w-2.5"})})]}),u.jsxs("div",{className:"iw-relative",children:[u.jsx("div",{className:`iw-flex iw-h-12 iw-w-16 iw-items-center iw-justify-center iw-rounded-xl iw-border iw-transition-all ${t?"iw-border-[#E7EAF1] iw-bg-white iw-text-[#062260]":"iw-border-rose-200 iw-bg-rose-50 iw-text-rose-600"}`,children:t?u.jsx(_6,{className:"iw-h-6 iw-w-6"}):u.jsx(T6,{className:"iw-h-6 iw-w-6"})}),t&&u.jsx("div",{className:"iw-absolute -iw-right-1 -iw-top-1 iw-flex iw-h-4 iw-w-4 iw-items-center iw-justify-center iw-rounded-full iw-bg-[#22C55E] iw-text-white",children:u.jsx(Nr,{className:"iw-h-2.5 iw-w-2.5"})})]})]}),u.jsx(g3,{onClick:i,disabled:c,className:`iw-h-12 iw-flex-1 iw-max-w-[220px] !iw-bg-[#F1F5FE] !iw-text-[#062260] !iw-font-bold iw-border-none iw-rounded-lg ${c?"iw-opacity-50":"hover:iw-opacity-75"}`,children:n})]})]})},zy=({steps:e,currentStepIndex:t})=>u.jsx("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-4 iw-w-full iw-py-6",children:e.map((n,i)=>{const a=i<t,l=i===t;return u.jsxs(y.Fragment,{children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[u.jsx("div",{className:`iw-flex iw-size-9 iw-text-[#062260] iw-items-center iw-justify-center iw-rounded-full iw-font-semibold iw-border ${l||a?"iw-border-[#0EB00E] iw-bg-[#E9FFE6]":"iw-border-[#BDE0FD] iw-bg-[#E6F3FF]"}`,children:a?u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:u.jsx("polyline",{points:"20 6 9 17 4 12"})}):i+1}),u.jsx("span",{className:`iw-text-sm iw-font-medium ${l||a?"iw-text-[#062260]":"iw-text-[#5C6686]"}`,children:n.label})]}),i<e.length-1&&u.jsx("div",{className:"iw-flex-1 iw-max-w-[120px] iw-border-t iw-border-dotted iw-border-[#B3B9CB]"})]},i)})}),ky=["Don't refresh or reload the page during your assessment","Don't switch tabs or open other applications while session is ongoing","Don't leave your position during the session","Don't disable or interfere with video/audio monitoring"],Ly=({isOpen:e,onStart:t,gazeEnabled:n=!1,videoFeedRef:i,interviewId:a="",interview_duration:l=Tr})=>{const s=y.useRef(null),r=y.useRef(null),[o,c]=y.useState(!1),[f,h]=y.useState(!1),[d,m]=y.useState(0),[v,x]=y.useState(!1),E=y.useRef(null),g=y.useRef(null),w=T=>{E.current=T,i&&(typeof i=="function"?i(T):i.current=T)},p=()=>{r.current&&(r.current.getTracks().forEach(T=>T.stop()),r.current=null)},b=async()=>{try{const T=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:1280},height:{ideal:720}},audio:!0});r.current=T,s.current&&(s.current.srcObject=T),c(!0)}catch(T){console.error("Media permission error:",T);let D="Unable to access camera or microphone.";(T==null?void 0:T.name)==="NotAllowedError"?D="Permissions denied. Please allow access to camera and microphone.":(T==null?void 0:T.name)==="NotFoundError"?D="No camera/microphone found. Please connect a device and retry.":T!=null&&T.message&&(D=T.message),c(!1),console.log(D)}finally{}};if(y.useEffect(()=>{if(!e){p();return}return b(),()=>p()},[e]),y.useEffect(()=>()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),!e)return null;const[A,N]=y.useState("face_detected"),_=async()=>{h(!0);const T=()=>{var D;return(D=E.current)==null?void 0:D.setReference()};T(),g.current&&clearInterval(g.current),g.current=setInterval(T,500)},M=[{label:n?"Calibrate your camera":"Camera & Mic permission"},{label:"Basic guidelines"}];return u.jsx("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-gray-900/40 iw-backdrop-blur-sm iw-p-4 iw-overflow-auto",children:u.jsxs("div",{className:"iw-w-full iw-max-w-[700px] iw-bg-white iw-rounded-xl iw-shadow-2xl iw-overflow-auto",children:[u.jsxs("div",{className:"iw-px-5 iw-pt-5",children:[u.jsx("h2",{className:"iw-text-[#062260] iw-text-2xl iw-font-medium iw-tracking-tight",children:"Final checks before you go live"}),u.jsx("div",{className:"iw-mt-4 iw-bg-[#F1F5FE] iw-rounded-xl iw-p-3 iw-border iw-border-[#E7EAF1]",children:u.jsx("p",{className:"iw-text-[#5C6686] iw-text-sm iw-leading-relaxed",children:"To ensure the integrity of the interview process, this platform uses your device’s camera to monitor your face and gaze direction. We do not store any outside this session"})}),u.jsx("div",{className:"iw-mt-6 iw-border-b iw-border-dashed iw-border-[#B3B9CB] iw-w-full"}),u.jsx(zy,{steps:M,currentStepIndex:d})]}),u.jsx("div",{className:"iw-px-5 iw-pb-5 iw-flex iw-flex-col iw-items-center",children:d===0?u.jsxs("div",{className:"iw-w-full iw-flex iw-flex-col iw-items-center iw-gap-6",children:[u.jsx("div",{className:"iw-w-full iw-max-w-[600px] iw-aspect-video iw-bg-slate-100 iw-rounded-2xl iw-overflow-hidden iw-relative iw-border iw-border-slate-200",children:n?u.jsx(w3,{ref:w,interviewId:a,interview_duration:l,showProctoringUI:!1,showStatusOverlay:!0,onProctoringStatusChange:N,onSetReference:()=>{g.current&&(clearInterval(g.current),g.current=null),h(!1),m(1)}}):u.jsx("video",{ref:s,autoPlay:!0,playsInline:!0,muted:!0,className:"iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)"}})}),u.jsx(y3,{micEnabled:o,videoEnabled:o,buttonText:n?f?"Calibrating...":"Start calibrate":"Next",onButtonClick:()=>{n?_():m(1)},disabled:!v||n&&A!=="face_detected"||!n&&!o,isAgreed:v,onAgreedToggle:x})]}):u.jsxs("div",{className:"iw-w-full iw-flex iw-flex-col iw-gap-6",children:[u.jsx("div",{className:"iw-w-full iw-bg-[#F8FAFF] iw-rounded-2xl iw-p-8 iw-flex iw-flex-col iw-gap-5",children:ky.map((T,D)=>u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-4",children:[u.jsx("div",{className:"iw-flex iw-h-7 iw-w-7 iw-min-w-[28px] iw-items-center iw-justify-center iw-rounded-full iw-bg-[#DBEAFE] iw-text-[#062260] iw-text-xs iw-font-bold",children:D+1}),u.jsx("span",{className:"iw-text-[#5C6686] iw-font-medium",children:T})]},D))}),u.jsx(y3,{buttonText:"Start interview",onButtonClick:()=>{t(),p()},isAgreed:v,onAgreedToggle:x,showMediaIcons:!1})]})})]})})};var K=(e=>(e.IDLE="idle",e.FETCHING_QUESTION="fetching_question",e.READING_QUESTION="reading_question",e.THINKING="thinking",e.ANSWERING="answering",e.TRANSCRIBING="transcribing",e.EDITING="editing",e.SUBMITTING="submitting",e.COMPLETED="completed",e))(K||{});const p3={thinkingDuration:0,answeringDuration:120,editingDuration:30},v3={idle:{next:"fetching_question"},fetching_question:{next:"reading_question"},reading_question:{next:"answering"},thinking:{next:"answering",duration:0},answering:{next:"transcribing",duration:120},transcribing:{next:"editing"},editing:{next:"submitting",duration:30},submitting:{next:"completed"},completed:{next:"completed"}};class Uy{constructor(t={},n={}){Qt(this,"config");Qt(this,"state");Qt(this,"phaseIntervalId",null);Qt(this,"globalIntervalId",null);Qt(this,"callbacks");this.config={...p3,...t},this.callbacks=n,this.state={phase:"idle",currentPhaseTimeRemaining:0,totalTimeElapsed:0,currentQuestionNumber:0}}updateConfig(t){this.config={...this.config,...t}}getState(){return{...this.state}}startQuestion(){this.state.currentQuestionNumber===0&&this.startGlobalTimer(),this.state.currentQuestionNumber=this.state.currentQuestionNumber+1,this.state.phase="fetching_question",this.notifyChange()}nextPhase(){const t=this.state.phase;let n=v3[t];if(!n)return;if(n.next==="editing"&&this.config.editingDuration===0){const a=v3.editing;a&&(n=a)}this.stopPhaseTimer(),this.state.phase=n.next;const i=this.getDurationForPhase(n.next);i>0?(this.state.currentPhaseTimeRemaining=i,this.startPhaseTimer()):this.state.currentPhaseTimeRemaining=0,this.notifyChange()}completeInterview(){var t,n;this.stopGlobalTimer(),this.stopPhaseTimer(),this.state.phase="completed",(n=(t=this.callbacks).onInterviewEnd)==null||n.call(t),this.notifyChange()}destroy(){this.stopPhaseTimer(),this.stopGlobalTimer()}getDurationForPhase(t){switch(t){case"thinking":return this.config.thinkingDuration;case"answering":return this.config.answeringDuration;case"editing":return this.config.editingDuration;default:return 0}}startGlobalTimer(){this.globalIntervalId=setInterval(()=>{var t,n;this.state.totalTimeElapsed++,(n=(t=this.callbacks).onTick)==null||n.call(t,this.getState())},1e3)}stopGlobalTimer(){this.globalIntervalId&&(clearInterval(this.globalIntervalId),this.globalIntervalId=null)}startPhaseTimer(){this.phaseIntervalId=setInterval(()=>{this.state.currentPhaseTimeRemaining--,this.state.currentPhaseTimeRemaining<=0&&this.nextPhase()},1e3)}stopPhaseTimer(){this.phaseIntervalId&&(clearInterval(this.phaseIntervalId),this.phaseIntervalId=null)}notifyChange(){var t,n;(n=(t=this.callbacks).onPhaseChange)==null||n.call(t,this.state.phase,this.getState())}}function By(e={}){const{config:t={},callbacks:n={}}=e,i=y.useRef(null);i.current||(i.current=new Uy(t,{}));const a=i.current,[l,s]=y.useState(a.getState()),r=y.useCallback(()=>{s(a.getState())},[a]);y.useEffect(()=>{const h={onPhaseChange:(d,m)=>{var v;r(),(v=n.onPhaseChange)==null||v.call(n,d,m)},onTick:d=>{var m;r(),(m=n.onTick)==null||m.call(n,d)},onInterviewEnd:()=>{var d;r(),(d=n.onInterviewEnd)==null||d.call(n)}};a.callbacks=h},[a,n,r]),y.useEffect(()=>{a.updateConfig(t)},[a,t]),y.useEffect(()=>()=>{a.destroy()},[a]);const o=y.useCallback(()=>{a.startQuestion(),r()},[a,r]),c=y.useCallback(()=>{a.nextPhase(),r()},[a,r]),f=y.useCallback(()=>{a.completeInterview(),r()},[a,r]);return{state:l,startQuestion:o,nextPhase:c,completeInterview:f,timerService:a}}function Ry(e,t={}){const[n,i]=y.useState({data:null,loading:!1,error:null}),a=y.useCallback(async(...l)=>{var s,r,o,c;i(f=>({...f,loading:!0,error:null}));try{const f=await e(...l);i(h=>({...h,data:f,loading:!1,error:null})),(s=t.onSuccess)==null||s.call(t,f),(r=t.onSettled)==null||r.call(t,f,null)}catch(f){const h=f.type?f:{type:"unknown",message:f.message||"Unknown error",retryable:!0,userMessage:"Something went wrong. Please try again.",originalError:f};i(d=>({...d,loading:!1,error:h})),(o=t.onError)==null||o.call(t,h),(c=t.onSettled)==null||c.call(t,null,h)}},[e,t]);return{...n,execute:a}}const Gy=e=>{const[t,n]=y.useState(null),[i,a]=y.useState(!1),l=document,s=()=>!!(l.fullscreenEnabled||l.webkitFullscreenEnabled||l.mozFullScreenEnabled||l.msFullscreenEnabled),r=()=>l.fullscreenElement||l.webkitFullscreenElement||l.mozFullScreenElement||l.msFullscreenElement,o=async m=>{var v;try{if(!s())throw new Error("Fullscreen is not supported in this environment");m.requestFullscreen?await m.requestFullscreen():m.webkitRequestFullscreen?await m.webkitRequestFullscreen():m.mozRequestFullScreen?await m.mozRequestFullScreen():m.msRequestFullscreen&&await m.msRequestFullscreen()}catch(x){const E={name:"FullscreenError",message:x instanceof Error?x.message:"Failed to enter fullscreen"};n(E),(v=e==null?void 0:e.onError)==null||v.call(e,E)}},c=async()=>{var m;try{l.exitFullscreen?await l.exitFullscreen():l.webkitExitFullscreen?await l.webkitExitFullscreen():l.mozCancelFullScreen?await l.mozCancelFullScreen():l.msExitFullscreen&&await l.msExitFullscreen()}catch(v){const x={name:"FullscreenError",message:v instanceof Error?v.message:"Failed to exit fullscreen"};n(x),(m=e==null?void 0:e.onError)==null||m.call(e,x)}},f=y.useCallback(()=>{var v;const m=!!r();a(m),(v=e==null?void 0:e.onFullScreenChange)==null||v.call(e,m)},[e]);y.useEffect(()=>{const m=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];return m.forEach(v=>{document.addEventListener(v,f)}),()=>{m.forEach(v=>{document.removeEventListener(v,f)})}},[f]);const h=async m=>{n(null);const v=m??document.documentElement;await o(v)};return{isFullScreen:i,toggleFullScreen:async m=>{i?await c():await h(m)},enterFullScreen:h,exitFullScreen:c,error:t}};function b3(){const e=Ar();return y.useMemo(()=>{const n=e.api||{};return new f1(n)},[e.api])}const Hy=e=>{y.useEffect(()=>{const t=i=>{(i.ctrlKey||i.metaKey)&&["c","v","a","t","n","w","r","s","p"].includes(i.key.toLowerCase())&&(i.preventDefault(),e({type:"blocked_shortcut",severity:"low",details:{action:"shortcut_pressed",reason:`Attempted to use a blocked keyboard shortcut: Ctrl + ${i.key}`}})),i.key.startsWith("F")&&i.key.length<=3&&(i.preventDefault(),e({type:"blocked_function_key",severity:"low",details:{action:"function_key_pressed",reason:`Attempted to use a blocked function key: ${i.key}`}})),i.altKey&&i.key==="Tab"&&(i.preventDefault(),e({type:"alt_tab_attempt",severity:"medium",details:{action:"alt_tab",reason:"Attempted to use the Alt + Tab shortcut"}}))},n=i=>{i.preventDefault(),e({type:"right_click_attempt",severity:"low",details:{action:"right_click",reason:"Attempted to use the right click"}})};return document.addEventListener("keydown",t),document.addEventListener("contextmenu",n),()=>{document.removeEventListener("keydown",t),document.removeEventListener("contextmenu",n)}},[e])},Vy=(e={})=>{const[t,n]=y.useState(!1),[i,a]=y.useState(!1),[l,s]=y.useState(null),[r,o]=y.useState(null),[c,f]=y.useState(null);e.config&&rl.updateConfig(e.config);const h=y.useCallback(async x=>{var E;try{o(null),s(null),f(null),await rl.startRecording(x,{onStart:()=>{var g;n(!0),(g=e.onStart)==null||g.call(e)},onStop:()=>{var g;n(!1),(g=e.onStop)==null||g.call(e)},onError:g=>{var p;const w=g instanceof be?g:new be(g.message,"RECORDING_ERROR",!0);o(w),n(!1),(p=e.onError)==null||p.call(e,w)}})}catch(g){const w=g instanceof be?g:new be(g instanceof Error?g.message:String(g),"START_FAILED",!1);throw o(w),n(!1),(E=e.onError)==null||E.call(e,w),w}},[]),d=y.useCallback(async()=>{var x,E;try{const g=await rl.stopRecording();return f(g),n(!1),(x=e.onStop)==null||x.call(e),g}catch(g){const w=g instanceof be?g:new be(g instanceof Error?g.message:String(g),"STOP_FAILED",!1);throw o(w),n(!1),(E=e.onError)==null||E.call(e,w),w}},[]),m=y.useCallback(async(x,E={})=>{var g,w;try{o(null),a(!0);const p={audioBlob:x,...E},b=await rl.transcribe(p);return s(b.transcript),a(!1),(g=e.onTranscriptionComplete)==null||g.call(e,b),b}catch(p){const b=p instanceof be?p:new be(p instanceof Error?p.message:String(p),"TRANSCRIPTION_FAILED",!0);throw o(b),a(!1),(w=e.onError)==null||w.call(e,b),b}},[]),v=y.useCallback(()=>{rl.cancelRecording(),n(!1),f(null)},[]);return{startRecording:h,stopRecording:d,transcribe:m,cancelRecording:v,isRecording:t,isTranscribing:i,transcript:l,error:r,audioBlob:c}},qy=e=>{const t=y.useRef(null),n=y.useRef(!1);y.useEffect(()=>{const i=()=>{document.hidden&&(n.current=!0,t.current&&(clearTimeout(t.current),t.current=null),e({type:"tab_switch",severity:"high",details:{action:"tab_hidden",reason:"Attempted to switch tabs or applications"}}),setTimeout(()=>{n.current=!1},100))},a=()=>{n.current||(t.current=setTimeout(()=>{n.current||e({type:"focus_loss",severity:"medium",details:{action:"window_blur",reason:"Focus lost from the interview window"}}),t.current=null},50))};return document.addEventListener("visibilitychange",i),window.addEventListener("blur",a),()=>{document.removeEventListener("visibilitychange",i),window.removeEventListener("blur",a),t.current&&clearTimeout(t.current)}},[e])},Fy=()=>{y.useEffect(()=>{const e=document.createElement("style");return e.textContent=`
24
24
  * {
25
25
  -webkit-user-select: none !important;
26
26
  -moz-user-select: none !important;
@@ -33,7 +33,7 @@
33
33
  -ms-user-select: text !important;
34
34
  user-select: text !important;
35
35
  }
36
- `,document.head.appendChild(e),()=>{document.head.removeChild(e)}},[])};class m6{constructor(){Bt(this,"currentAudio",null)}async play(t,n){var i,a;try{if(this.stop(),(i=n==null?void 0:n.onStart)==null||i.call(n),!t)throw new Error("No audio data provided");const l=window.atob(t),s=new Uint8Array(l==null?void 0:l.length);for(let c=0;c<(l==null?void 0:l.length);c++)s[c]=l==null?void 0:l.charCodeAt(c);const r=new Blob([s],{type:"audio/wav"}),o=URL.createObjectURL(r);return this.currentAudio=new Audio(o),new Promise((c,d)=>{if(!this.currentAudio){d(new Error("Audio element not created"));return}const h=this.currentAudio;h.onended=()=>{var f;URL.revokeObjectURL(o),this.currentAudio=null,(f=n==null?void 0:n.onEnd)==null||f.call(n),c()},h.onerror=f=>{var v;URL.revokeObjectURL(o),this.currentAudio=null;const w=new Error(`Audio playback failed: ${f}`);(v=n==null?void 0:n.onError)==null||v.call(n,w),d(w)},h.play().catch(f=>{var v;URL.revokeObjectURL(o),this.currentAudio=null;const w=new Error(`Failed to play audio: ${f.message}`);(v=n==null?void 0:n.onError)==null||v.call(n,w),d(w)})})}catch(l){const s=l instanceof Error?l:new Error(`TTS Error: ${String(l)}`);throw(a=n==null?void 0:n.onError)==null||a.call(n,s),s}}stop(){this.currentAudio&&(this.currentAudio.pause(),this.currentAudio.currentTime=0,this.currentAudio=null)}isPlaying(){return this.currentAudio!==null&&!this.currentAudio.paused}}const x3=new m6,w6=(e={})=>{const[t,n]=p.useState(!1),[i,a]=p.useState(!1),[l,s]=p.useState(null),r=p.useCallback(async c=>{var d;try{s(null),a(!0),await x3.play(c,{onStart:()=>{var h;a(!1),n(!0),(h=e.onStart)==null||h.call(e)},onEnd:()=>{var h;n(!1),(h=e.onEnd)==null||h.call(e)},onError:h=>{var f;n(!1),a(!1),s(h),(f=e.onError)==null||f.call(e,h)}})}catch(h){const f=h instanceof Error?h:new Error(String(h));throw s(f),n(!1),a(!1),(d=e.onError)==null||d.call(e,f),f}},[e]),o=p.useCallback(()=>{x3.stop(),n(!1),a(!1)},[]);return{speak:r,stop:o,isPlaying:t,isLoading:i,error:l}},g6=({onViolation:e,onEnd:t,maxViolations:n=5})=>{const{addViolation:i}=Fg(),a=Hg(),l=Vg(),s=p.useRef(l);p.useEffect(()=>{s.current=l},[l]);const r=p.useCallback(c=>{t&&t(c,s.current)},[t]);return{logViolation:p.useCallback(({type:c,severity:d,details:h})=>{const f={id:Kg(),type:c,severity:d,details:h,timestamp:Date.now()};i(f);const w=s.current+1;e&&e(f,w),w>=n&&r("excessive_violations")},[i,e,n,r]),onInterviewEnd:r,violationCount:l,logList:a}},p6=()=>{p.useEffect(()=>{function e(){console.clear(),console.log(`
36
+ `,document.head.appendChild(e),()=>{document.head.removeChild(e)}},[])};class Yy{constructor(){Qt(this,"currentAudio",null)}async play(t,n){var i,a;try{if(this.stop(),(i=n==null?void 0:n.onStart)==null||i.call(n),!t)throw new Error("No audio data provided");const l=window.atob(t),s=new Uint8Array(l==null?void 0:l.length);for(let c=0;c<(l==null?void 0:l.length);c++)s[c]=l==null?void 0:l.charCodeAt(c);const r=new Blob([s],{type:"audio/wav"}),o=URL.createObjectURL(r);return this.currentAudio=new Audio(o),new Promise((c,f)=>{if(!this.currentAudio){f(new Error("Audio element not created"));return}const h=this.currentAudio;h.onended=()=>{var d;URL.revokeObjectURL(o),this.currentAudio=null,(d=n==null?void 0:n.onEnd)==null||d.call(n),c()},h.onerror=d=>{var v;URL.revokeObjectURL(o),this.currentAudio=null;const m=new Error(`Audio playback failed: ${d}`);(v=n==null?void 0:n.onError)==null||v.call(n,m),f(m)},h.play().catch(d=>{var v;URL.revokeObjectURL(o),this.currentAudio=null;const m=new Error(`Failed to play audio: ${d.message}`);(v=n==null?void 0:n.onError)==null||v.call(n,m),f(m)})})}catch(l){const s=l instanceof Error?l:new Error(`TTS Error: ${String(l)}`);throw(a=n==null?void 0:n.onError)==null||a.call(n,s),s}}stop(){this.currentAudio&&(this.currentAudio.pause(),this.currentAudio.currentTime=0,this.currentAudio=null)}isPlaying(){return this.currentAudio!==null&&!this.currentAudio.paused}}const x3=new Yy,Xy=(e={})=>{const[t,n]=y.useState(!1),[i,a]=y.useState(!1),[l,s]=y.useState(null),r=y.useCallback(async c=>{var f;try{s(null),a(!0),await x3.play(c,{onStart:()=>{var h;a(!1),n(!0),(h=e.onStart)==null||h.call(e)},onEnd:()=>{var h;n(!1),(h=e.onEnd)==null||h.call(e)},onError:h=>{var d;n(!1),a(!1),s(h),(d=e.onError)==null||d.call(e,h)}})}catch(h){const d=h instanceof Error?h:new Error(String(h));throw s(d),n(!1),a(!1),(f=e.onError)==null||f.call(e,d),d}},[e]),o=y.useCallback(()=>{x3.stop(),n(!1),a(!1)},[]);return{speak:r,stop:o,isPlaying:t,isLoading:i,error:l}},Qy=({onViolation:e,onEnd:t,maxViolations:n=5})=>{const{addViolation:i}=a6(),a=n6(),l=i6(),s=y.useRef(l);y.useEffect(()=>{s.current=l},[l]);const r=y.useCallback(c=>{t&&t(c,s.current)},[t]);return{logViolation:y.useCallback(({type:c,severity:f,details:h})=>{const d={id:c6(),type:c,severity:f,details:h,timestamp:Date.now()};i(d);const m=s.current+1;e&&e(d,m),m>=n&&r("excessive_violations")},[i,e,n,r]),onInterviewEnd:r,violationCount:l,logList:a}},Zy=()=>{y.useEffect(()=>{function e(){console.clear(),console.log(`
37
37
  %c
38
38
  ╔═══════════════════════════════════════════════════════════════════════╗
39
39
  ║ ║
@@ -79,7 +79,7 @@
79
79
  │ │
80
80
  │ 💡 IMMEDIATE ACTION REQUIRED: │
81
81
  │ Close developer tools to continue interview │
82
- └─────────────────────────────────────────────────────────────┘`,"color: #ffd93d; font-size: 14px; font-family: monospace; background: rgba(255, 217, 61, 0.1); padding: 10px;")}const t={open:!1,orientation:null},n=160,i=setInterval(()=>{window.outerHeight-window.innerHeight>n||window.outerWidth-window.innerWidth>n?t.open||(t.open=!0,t.orientation=window.outerWidth-window.innerWidth>n?"vertical":"horizontal",e()):t.open&&(t.open=!1,console.log("%c🌟 Developer tools closed. Interview continues smoothly! ✨","color: #4ecdc4; font-weight: bold; text-shadow: 0 0 10px #4ecdc4;"))},500),a=s=>{if(s.keyCode===123||s.ctrlKey&&s.shiftKey&&(s.keyCode===73||s.keyCode===74)||s.ctrlKey&&s.keyCode===85)return s.preventDefault(),console.log("%c🎭 Nice try! Keyboard shortcuts are disabled during interviews ✨","color: #ffd93d; font-weight: bold; text-shadow: 0 0 10px #ffd93d;"),!1},l=s=>(s.preventDefault(),console.log("%c🌈 Right-click menu disabled for interview integrity! 🎪","color: #ff9ff3; font-weight: bold; text-shadow: 0 0 10px #ff9ff3;"),!1);return document.addEventListener("keydown",a),document.addEventListener("contextmenu",l),()=>{clearInterval(i),document.removeEventListener("keydown",a),document.removeEventListener("contextmenu",l),delete window.showStats,delete window.interviewTips}},[])};var E3={exports:{}},mo={},S3={exports:{}},_3={};/**
82
+ └─────────────────────────────────────────────────────────────┘`,"color: #ffd93d; font-size: 14px; font-family: monospace; background: rgba(255, 217, 61, 0.1); padding: 10px;")}const t={open:!1,orientation:null},n=160,i=setInterval(()=>{window.outerHeight-window.innerHeight>n||window.outerWidth-window.innerWidth>n?t.open||(t.open=!0,t.orientation=window.outerWidth-window.innerWidth>n?"vertical":"horizontal",e()):t.open&&(t.open=!1,console.log("%c🌟 Developer tools closed. Interview continues smoothly! ✨","color: #4ecdc4; font-weight: bold; text-shadow: 0 0 10px #4ecdc4;"))},500),a=s=>{if(s.keyCode===123||s.ctrlKey&&s.shiftKey&&(s.keyCode===73||s.keyCode===74)||s.ctrlKey&&s.keyCode===85)return s.preventDefault(),console.log("%c🎭 Nice try! Keyboard shortcuts are disabled during interviews ✨","color: #ffd93d; font-weight: bold; text-shadow: 0 0 10px #ffd93d;"),!1},l=s=>(s.preventDefault(),console.log("%c🌈 Right-click menu disabled for interview integrity! 🎪","color: #ff9ff3; font-weight: bold; text-shadow: 0 0 10px #ff9ff3;"),!1);return document.addEventListener("keydown",a),document.addEventListener("contextmenu",l),()=>{clearInterval(i),document.removeEventListener("keydown",a),document.removeEventListener("contextmenu",l),delete window.showStats,delete window.interviewTips}},[])};var S3={exports:{}},fu={},E3={exports:{}},_3={};/**
83
83
  * @license React
84
84
  * scheduler.production.js
85
85
  *
@@ -87,7 +87,7 @@
87
87
  *
88
88
  * This source code is licensed under the MIT license found in the
89
89
  * LICENSE file in the root directory of this source tree.
90
- */(function(e){function t(j,B){var R=j.length;j.push(B);e:for(;0<R;){var J=R-1>>>1,ae=j[J];if(0<a(ae,B))j[J]=B,j[R]=ae,R=J;else break e}}function n(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var B=j[0],R=j.pop();if(R!==B){j[0]=R;e:for(var J=0,ae=j.length,st=ae>>>1;J<st;){var gn=2*(J+1)-1,sn=j[gn],Rt=gn+1,rt=j[Rt];if(0>a(sn,R))Rt<ae&&0>a(rt,sn)?(j[J]=rt,j[Rt]=R,J=Rt):(j[J]=sn,j[gn]=R,J=gn);else if(Rt<ae&&0>a(rt,R))j[J]=rt,j[Rt]=R,J=Rt;else break e}}return B}function a(j,B){var R=j.sortIndex-B.sortIndex;return R!==0?R:j.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,r=s.now();e.unstable_now=function(){return s.now()-r}}var o=[],c=[],d=1,h=null,f=3,w=!1,v=!1,x=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function y(j){for(var B=n(c);B!==null;){if(B.callback===null)i(c);else if(B.startTime<=j)i(c),B.sortIndex=B.expirationTime,t(o,B);else break;B=n(c)}}function b(j){if(x=!1,y(j),!v)if(n(o)!==null)v=!0,yt();else{var B=n(c);B!==null&&vt(b,B.startTime-j)}}var S=!1,A=-1,T=5,N=-1;function M(){return!(e.unstable_now()-N<T)}function D(){if(S){var j=e.unstable_now();N=j;var B=!0;try{e:{v=!1,x&&(x=!1,m(A),A=-1),w=!0;var R=f;try{t:{for(y(j),h=n(o);h!==null&&!(h.expirationTime>j&&M());){var J=h.callback;if(typeof J=="function"){h.callback=null,f=h.priorityLevel;var ae=J(h.expirationTime<=j);if(j=e.unstable_now(),typeof ae=="function"){h.callback=ae,y(j),B=!0;break t}h===n(o)&&i(o),y(j)}else i(o);h=n(o)}if(h!==null)B=!0;else{var st=n(c);st!==null&&vt(b,st.startTime-j),B=!1}}break e}finally{h=null,f=R,w=!1}B=void 0}}finally{B?ge():S=!1}}}var ge;if(typeof g=="function")ge=function(){g(D)};else if(typeof MessageChannel<"u"){var et=new MessageChannel,pt=et.port2;et.port1.onmessage=D,ge=function(){pt.postMessage(null)}}else ge=function(){_(D,0)};function yt(){S||(S=!0,ge())}function vt(j,B){A=_(function(){j(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_continueExecution=function(){v||w||(v=!0,yt())},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(o)},e.unstable_next=function(j){switch(f){case 1:case 2:case 3:var B=3;break;default:B=f}var R=f;f=B;try{return j()}finally{f=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,B){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var R=f;f=j;try{return B()}finally{f=R}},e.unstable_scheduleCallback=function(j,B,R){var J=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?J+R:J):R=J,j){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=R+ae,j={id:d++,callback:B,priorityLevel:j,startTime:R,expirationTime:ae,sortIndex:-1},R>J?(j.sortIndex=R,t(c,j),n(o)===null&&j===n(c)&&(x?(m(A),A=-1):x=!0,vt(b,R-J))):(j.sortIndex=ae,t(o,j),v||w||(v=!0,yt())),j},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(j){var B=f;return function(){var R=f;f=B;try{return j.apply(this,arguments)}finally{f=R}}}})(_3),S3.exports=_3;var y6=S3.exports;/**
90
+ */(function(e){function t(j,G){var R=j.length;j.push(G);e:for(;0<R;){var $=R-1>>>1,se=j[$];if(0<a(se,G))j[$]=G,j[R]=se,R=$;else break e}}function n(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var G=j[0],R=j.pop();if(R!==G){j[0]=R;e:for(var $=0,se=j.length,ut=se>>>1;$<ut;){var bn=2*($+1)-1,fn=j[bn],Xt=bn+1,ot=j[Xt];if(0>a(fn,R))Xt<se&&0>a(ot,fn)?(j[$]=ot,j[Xt]=R,$=Xt):(j[$]=fn,j[bn]=R,$=bn);else if(Xt<se&&0>a(ot,R))j[$]=ot,j[Xt]=R,$=Xt;else break e}}return G}function a(j,G){var R=j.sortIndex-G.sortIndex;return R!==0?R:j.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,r=s.now();e.unstable_now=function(){return s.now()-r}}var o=[],c=[],f=1,h=null,d=3,m=!1,v=!1,x=!1,E=!1,g=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;function b(j){for(var G=n(c);G!==null;){if(G.callback===null)i(c);else if(G.startTime<=j)i(c),G.sortIndex=G.expirationTime,t(o,G);else break;G=n(c)}}function A(j){if(x=!1,b(j),!v)if(n(o)!==null)v=!0,N||(N=!0,Re());else{var G=n(c);G!==null&&xt(A,G.startTime-j)}}var N=!1,_=-1,M=5,T=-1;function D(){return E?!0:!(e.unstable_now()-T<M)}function Ee(){if(E=!1,N){var j=e.unstable_now();T=j;var G=!0;try{e:{v=!1,x&&(x=!1,w(_),_=-1),m=!0;var R=d;try{t:{for(b(j),h=n(o);h!==null&&!(h.expirationTime>j&&D());){var $=h.callback;if(typeof $=="function"){h.callback=null,d=h.priorityLevel;var se=$(h.expirationTime<=j);if(j=e.unstable_now(),typeof se=="function"){h.callback=se,b(j),G=!0;break t}h===n(o)&&i(o),b(j)}else i(o);h=n(o)}if(h!==null)G=!0;else{var ut=n(c);ut!==null&&xt(A,ut.startTime-j),G=!1}}break e}finally{h=null,d=R,m=!1}G=void 0}}finally{G?Re():N=!1}}}var Re;if(typeof p=="function")Re=function(){p(Ee)};else if(typeof MessageChannel<"u"){var rt=new MessageChannel,cn=rt.port2;rt.port1.onmessage=Ee,Re=function(){cn.postMessage(null)}}else Re=function(){g(Ee,0)};function xt(j,G){_=g(function(){j(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(j){switch(d){case 1:case 2:case 3:var G=3;break;default:G=d}var R=d;d=G;try{return j()}finally{d=R}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(j,G){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var R=d;d=j;try{return G()}finally{d=R}},e.unstable_scheduleCallback=function(j,G,R){var $=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?$+R:$):R=$,j){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=R+se,j={id:f++,callback:G,priorityLevel:j,startTime:R,expirationTime:se,sortIndex:-1},R>$?(j.sortIndex=R,t(c,j),n(o)===null&&j===n(c)&&(x?(w(_),_=-1):x=!0,xt(A,R-$))):(j.sortIndex=se,t(o,j),v||m||(v=!0,N||(N=!0,Re()))),j},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(j){var G=d;return function(){var R=d;d=G;try{return j.apply(this,arguments)}finally{d=R}}}})(_3),E3.exports=_3;var Ky=E3.exports;/**
91
91
  * @license React
92
92
  * react-dom-client.production.js
93
93
  *
@@ -95,15 +95,15 @@
95
95
  *
96
96
  * This source code is licensed under the MIT license found in the
97
97
  * LICENSE file in the root directory of this source tree.
98
- */var Be=y6,T3=p,v6=Zi;function E(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function A3(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}var b6=Symbol.for("react.element"),wo=Symbol.for("react.transitional.element"),cs=Symbol.for("react.portal"),nl=Symbol.for("react.fragment"),N3=Symbol.for("react.strict_mode"),Cf=Symbol.for("react.profiler"),x6=Symbol.for("react.provider"),j3=Symbol.for("react.consumer"),Fn=Symbol.for("react.context"),Df=Symbol.for("react.forward_ref"),kf=Symbol.for("react.suspense"),Of=Symbol.for("react.suspense_list"),Lf=Symbol.for("react.memo"),xi=Symbol.for("react.lazy"),M3=Symbol.for("react.offscreen"),E6=Symbol.for("react.memo_cache_sentinel"),C3=Symbol.iterator;function fs(e){return e===null||typeof e!="object"?null:(e=C3&&e[C3]||e["@@iterator"],typeof e=="function"?e:null)}var S6=Symbol.for("react.client.reference");function Uf(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===S6?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case nl:return"Fragment";case cs:return"Portal";case Cf:return"Profiler";case N3:return"StrictMode";case kf:return"Suspense";case Of:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Fn:return(e.displayName||"Context")+".Provider";case j3:return(e._context.displayName||"Context")+".Consumer";case Df:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Lf:return t=e.displayName||null,t!==null?t:Uf(e.type)||"Memo";case xi:t=e._payload,e=e._init;try{return Uf(e(t))}catch{}}return null}var G=T3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=Object.assign,zf,D3;function ds(e){if(zf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);zf=t&&t[1]||"",D3=-1<n.stack.indexOf(`
98
+ */var qe=Ky,T3=y,Iy=Zi;function S(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function A3(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Es(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function N3(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function j3(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function M3(e){if(Es(e)!==e)throw Error(S(188))}function Jy(e){var t=e.alternate;if(!t){if(t=Es(e),t===null)throw Error(S(188));return t!==e?null:e}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var l=a.alternate;if(l===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===l.child){for(l=a.child;l;){if(l===n)return M3(a),e;if(l===i)return M3(a),t;l=l.sibling}throw Error(S(188))}if(n.return!==i.return)n=a,i=l;else{for(var s=!1,r=a.child;r;){if(r===n){s=!0,n=a,i=l;break}if(r===i){s=!0,i=a,n=l;break}r=r.sibling}if(!s){for(r=l.child;r;){if(r===n){s=!0,n=l,i=a;break}if(r===i){s=!0,i=l,n=a;break}r=r.sibling}if(!s)throw Error(S(189))}}if(n.alternate!==i)throw Error(S(190))}if(n.tag!==3)throw Error(S(188));return n.stateNode.current===n?e:t}function C3(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C3(e),t!==null)return t;e=e.sibling}return null}var oe=Object.assign,Wy=Symbol.for("react.element"),du=Symbol.for("react.transitional.element"),_s=Symbol.for("react.portal"),ul=Symbol.for("react.fragment"),D3=Symbol.for("react.strict_mode"),Ef=Symbol.for("react.profiler"),O3=Symbol.for("react.consumer"),Fn=Symbol.for("react.context"),_f=Symbol.for("react.forward_ref"),Tf=Symbol.for("react.suspense"),Af=Symbol.for("react.suspense_list"),Nf=Symbol.for("react.memo"),vi=Symbol.for("react.lazy"),jf=Symbol.for("react.activity"),Py=Symbol.for("react.memo_cache_sentinel"),z3=Symbol.iterator;function Ts(e){return e===null||typeof e!="object"?null:(e=z3&&e[z3]||e["@@iterator"],typeof e=="function"?e:null)}var $y=Symbol.for("react.client.reference");function Mf(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===$y?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ul:return"Fragment";case Ef:return"Profiler";case D3:return"StrictMode";case Tf:return"Suspense";case Af:return"SuspenseList";case jf:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _s:return"Portal";case Fn:return e.displayName||"Context";case O3:return(e._context.displayName||"Context")+".Consumer";case _f:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nf:return t=e.displayName||null,t!==null?t:Mf(e.type)||"Memo";case vi:t=e._payload,e=e._init;try{return Mf(e(t))}catch{}}return null}var As=Array.isArray,B=T3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Iy.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oa={pending:!1,data:null,method:null,action:null},Cf=[],ol=-1;function Dn(e){return{current:e}}function Ke(e){0>ol||(e.current=Cf[ol],Cf[ol]=null,ol--)}function ue(e,t){ol++,Cf[ol]=e.current,e.current=t}var On=Dn(null),Ns=Dn(null),bi=Dn(null),hu=Dn(null);function mu(e,t){switch(ue(bi,t),ue(Ns,e),ue(On,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?aw(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=aw(t),e=lw(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ke(On),ue(On,e)}function cl(){Ke(On),Ke(Ns),Ke(bi)}function Df(e){e.memoizedState!==null&&ue(hu,e);var t=On.current,n=lw(t,e.type);t!==n&&(ue(Ns,e),ue(On,n))}function gu(e){Ns.current===e&&(Ke(On),Ke(Ns)),hu.current===e&&(Ke(hu),wr._currentValue=oa)}var Of,k3;function ca(e){if(Of===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Of=t&&t[1]||"",k3=-1<n.stack.indexOf(`
99
99
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
100
- `+zf+e+D3}var Rf=!1;function Bf(e,t){if(!e||Rf)return"";Rf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(w){var f=w}Reflect.construct(e,[],h)}else{try{h.call()}catch(w){f=w}e.call(h.prototype)}}else{try{throw Error()}catch(w){f=w}(h=e())&&typeof h.catch=="function"&&h.catch(function(){})}}catch(w){if(w&&f&&typeof w.stack=="string")return[w.stack,f.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var l=i.DetermineComponentFrameRoot(),s=l[0],r=l[1];if(s&&r){var o=s.split(`
100
+ `+Of+e+k3}var zf=!1;function kf(e,t){if(!e||zf)return"";zf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(m){var d=m}Reflect.construct(e,[],h)}else{try{h.call()}catch(m){d=m}e.call(h.prototype)}}else{try{throw Error()}catch(m){d=m}(h=e())&&typeof h.catch=="function"&&h.catch(function(){})}}catch(m){if(m&&d&&typeof m.stack=="string")return[m.stack,d.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var l=i.DetermineComponentFrameRoot(),s=l[0],r=l[1];if(s&&r){var o=s.split(`
101
101
  `),c=r.split(`
102
- `);for(a=i=0;i<o.length&&!o[i].includes("DetermineComponentFrameRoot");)i++;for(;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;if(i===o.length||a===c.length)for(i=o.length-1,a=c.length-1;1<=i&&0<=a&&o[i]!==c[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==c[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==c[a]){var d=`
103
- `+o[i].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=i&&0<=a);break}}}finally{Rf=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ds(n):""}function _6(e){switch(e.tag){case 26:case 27:case 5:return ds(e.type);case 16:return ds("Lazy");case 13:return ds("Suspense");case 19:return ds("SuspenseList");case 0:case 15:return e=Bf(e.type,!1),e;case 11:return e=Bf(e.type.render,!1),e;case 1:return e=Bf(e.type,!0),e;default:return""}}function k3(e){try{var t="";do t+=_6(e),e=e.return;while(e);return t}catch(n){return`
104
- Error generating stack: `+n.message+`
105
- `+n.stack}}function il(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function O3(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function L3(e){if(il(e)!==e)throw Error(E(188))}function T6(e){var t=e.alternate;if(!t){if(t=il(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var l=a.alternate;if(l===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===l.child){for(l=a.child;l;){if(l===n)return L3(a),e;if(l===i)return L3(a),t;l=l.sibling}throw Error(E(188))}if(n.return!==i.return)n=a,i=l;else{for(var s=!1,r=a.child;r;){if(r===n){s=!0,n=a,i=l;break}if(r===i){s=!0,i=a,n=l;break}r=r.sibling}if(!s){for(r=l.child;r;){if(r===n){s=!0,n=l,i=a;break}if(r===i){s=!0,i=l,n=a;break}r=r.sibling}if(!s)throw Error(E(189))}}if(n.alternate!==i)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function U3(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=U3(e),t!==null)return t;e=e.sibling}return null}var hs=Array.isArray,fe=v6.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ia={pending:!1,data:null,method:null,action:null},Gf=[],al=-1;function Tn(e){return{current:e}}function qe(e){0>al||(e.current=Gf[al],Gf[al]=null,al--)}function we(e,t){al++,Gf[al]=e.current,e.current=t}var An=Tn(null),ms=Tn(null),Ei=Tn(null),go=Tn(null);function po(e,t){switch(we(Ei,t),we(ms,e),we(An,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Zw(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=Zw(e),t=Kw(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}qe(An),we(An,t)}function ll(){qe(An),qe(ms),qe(Ei)}function Hf(e){e.memoizedState!==null&&we(go,e);var t=An.current,n=Kw(t,e.type);t!==n&&(we(ms,e),we(An,n))}function yo(e){ms.current===e&&(qe(An),qe(ms)),go.current===e&&(qe(go),sr._currentValue=ia)}var Vf=Object.prototype.hasOwnProperty,Ff=Be.unstable_scheduleCallback,qf=Be.unstable_cancelCallback,A6=Be.unstable_shouldYield,N6=Be.unstable_requestPaint,Nn=Be.unstable_now,j6=Be.unstable_getCurrentPriorityLevel,z3=Be.unstable_ImmediatePriority,R3=Be.unstable_UserBlockingPriority,vo=Be.unstable_NormalPriority,M6=Be.unstable_LowPriority,B3=Be.unstable_IdlePriority,C6=Be.log,D6=Be.unstable_setDisableYieldValue,ws=null,Ct=null;function k6(e){if(Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(ws,e,void 0,(e.current.flags&128)===128)}catch{}}function Si(e){if(typeof C6=="function"&&D6(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(ws,e)}catch{}}var Dt=Math.clz32?Math.clz32:U6,O6=Math.log,L6=Math.LN2;function U6(e){return e>>>=0,e===0?32:31-(O6(e)/L6|0)|0}var bo=128,xo=4194304;function aa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Eo(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,a=e.suspendedLanes,l=e.pingedLanes,s=e.warmLanes;e=e.finishedLanes!==0;var r=n&134217727;return r!==0?(n=r&~a,n!==0?i=aa(n):(l&=r,l!==0?i=aa(l):e||(s=r&~s,s!==0&&(i=aa(s))))):(r=n&~a,r!==0?i=aa(r):l!==0?i=aa(l):e||(s=n&~s,s!==0&&(i=aa(s)))),i===0?0:t!==0&&t!==i&&!(t&a)&&(a=i&-i,s=t&-t,a>=s||a===32&&(s&4194176)!==0)?t:i}function gs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function z6(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function G3(){var e=bo;return bo<<=1,!(bo&4194176)&&(bo=128),e}function H3(){var e=xo;return xo<<=1,!(xo&62914560)&&(xo=4194304),e}function Yf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ps(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function R6(e,t,n,i,a,l){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var r=e.entanglements,o=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0<n;){var d=31-Dt(n),h=1<<d;r[d]=0,o[d]=-1;var f=c[d];if(f!==null)for(c[d]=null,d=0;d<f.length;d++){var w=f[d];w!==null&&(w.lane&=-536870913)}n&=~h}i!==0&&V3(e,i,0),l!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=l&~(s&~t))}function V3(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Dt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|n&4194218}function F3(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Dt(n),a=1<<i;a&t|e[i]&t&&(e[i]|=t),n&=~a}}function q3(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Y3(){var e=fe.p;return e!==0?e:(e=window.event,e===void 0?32:dg(e.type))}function B6(e,t){var n=fe.p;try{return fe.p=e,t()}finally{fe.p=n}}var _i=Math.random().toString(36).slice(2),Pe="__reactFiber$"+_i,mt="__reactProps$"+_i,sl="__reactContainer$"+_i,Xf="__reactEvents$"+_i,G6="__reactListeners$"+_i,H6="__reactHandles$"+_i,X3="__reactResources$"+_i,ys="__reactMarker$"+_i;function Qf(e){delete e[Pe],delete e[mt],delete e[Xf],delete e[G6],delete e[H6]}function la(e){var t=e[Pe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[sl]||n[Pe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Jw(e);e!==null;){if(n=e[Pe])return n;e=Jw(e)}return t}e=n,n=e.parentNode}return null}function rl(e){if(e=e[Pe]||e[sl]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function vs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(E(33))}function ol(e){var t=e[X3];return t||(t=e[X3]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ye(e){e[ys]=!0}var Q3=new Set,Z3={};function sa(e,t){ul(e,t),ul(e+"Capture",t)}function ul(e,t){for(Z3[e]=t,e=0;e<t.length;e++)Q3.add(t[e])}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),V6=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),K3={},I3={};function F6(e){return Vf.call(I3,e)?!0:Vf.call(K3,e)?!1:V6.test(e)?I3[e]=!0:(K3[e]=!0,!1)}function So(e,t,n){if(F6(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function _o(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Yn(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}function Zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function W3(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function q6(e){var t=W3(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){i=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(s){i=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function To(e){e._valueTracker||(e._valueTracker=q6(e))}function J3(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=W3(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function Ao(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Y6=/[\n"\\]/g;function Kt(e){return e.replace(Y6,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zf(e,t,n,i,a,l,s,r){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zt(t)):e.value!==""+Zt(t)&&(e.value=""+Zt(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Kf(e,s,Zt(t)):n!=null?Kf(e,s,Zt(n)):i!=null&&e.removeAttribute("value"),a==null&&l!=null&&(e.defaultChecked=!!l),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+Zt(r):e.removeAttribute("name")}function P3(e,t,n,i,a,l,s,r){if(l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.type=l),t!=null||n!=null){if(!(l!=="submit"&&l!=="reset"||t!=null))return;n=n!=null?""+Zt(n):"",t=t!=null?""+Zt(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}i=i??a,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=r?e.checked:!!i,e.defaultChecked=!!i,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s)}function Kf(e,t,n){t==="number"&&Ao(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function cl(e,t,n,i){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&i&&(e[n].defaultSelected=!0)}else{for(n=""+Zt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function $3(e,t,n){if(t!=null&&(t=""+Zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Zt(n):""}function e4(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(E(92));if(hs(i)){if(1<i.length)throw Error(E(93));i=i[0]}n=i}n==null&&(n=""),t=n}n=Zt(t),e.defaultValue=n,i=e.textContent,i===n&&i!==""&&i!==null&&(e.value=i)}function fl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var X6=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function t4(e,t,n){var i=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,n):typeof n!="number"||n===0||X6.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function n4(e,t,n){if(t!=null&&typeof t!="object")throw Error(E(62));if(e=e.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var a in t)i=t[a],t.hasOwnProperty(a)&&n[a]!==i&&t4(e,a,i)}else for(var l in t)t.hasOwnProperty(l)&&t4(e,l,t[l])}function If(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Q6=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Z6=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function No(e){return Z6.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Wf=null;function Jf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dl=null,hl=null;function i4(e){var t=rl(e);if(t&&(e=t.stateNode)){var n=e[mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zf(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Kt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=i[mt]||null;if(!a)throw Error(E(90));Zf(i,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)i=n[t],i.form===e.form&&J3(i)}break e;case"textarea":$3(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&cl(e,!!n.multiple,t,!1)}}}var Pf=!1;function a4(e,t,n){if(Pf)return e(t,n);Pf=!0;try{var i=e(t);return i}finally{if(Pf=!1,(dl!==null||hl!==null)&&(cu(),dl&&(t=dl,e=hl,hl=dl=null,i4(t),e)))for(t=0;t<e.length;t++)i4(e[t])}}function bs(e,t){var n=e.stateNode;if(n===null)return null;var i=n[mt]||null;if(i===null)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(E(231,t,typeof n));return n}var $f=!1;if(qn)try{var xs={};Object.defineProperty(xs,"passive",{get:function(){$f=!0}}),window.addEventListener("test",xs,xs),window.removeEventListener("test",xs,xs)}catch{$f=!1}var Ti=null,ed=null,jo=null;function l4(){if(jo)return jo;var e,t=ed,n=t.length,i,a="value"in Ti?Ti.value:Ti.textContent,l=a.length;for(e=0;e<n&&t[e]===a[e];e++);var s=n-e;for(i=1;i<=s&&t[n-i]===a[l-i];i++);return jo=a.slice(e,1<i?1-i:void 0)}function Mo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Co(){return!0}function s4(){return!1}function wt(e){function t(n,i,a,l,s){this._reactName=n,this._targetInst=a,this.type=i,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(l):l[r]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Co:s4,this.isPropagationStopped=s4,this}return ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Co)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Co)},persist:function(){},isPersistent:Co}),t}var ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=wt(ra),Es=ce({},ra,{view:0,detail:0}),K6=wt(Es),td,nd,Ss,ko=ce({},Es,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ad,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ss&&(Ss&&e.type==="mousemove"?(td=e.screenX-Ss.screenX,nd=e.screenY-Ss.screenY):nd=td=0,Ss=e),td)},movementY:function(e){return"movementY"in e?e.movementY:nd}}),r4=wt(ko),I6=ce({},ko,{dataTransfer:0}),W6=wt(I6),J6=ce({},Es,{relatedTarget:0}),id=wt(J6),P6=ce({},ra,{animationName:0,elapsedTime:0,pseudoElement:0}),$6=wt(P6),ey=ce({},ra,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ty=wt(ey),ny=ce({},ra,{data:0}),o4=wt(ny),iy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ay={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ly={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ly[e])?!!t[e]:!1}function ad(){return sy}var ry=ce({},Es,{key:function(e){if(e.key){var t=iy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ay[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ad,charCode:function(e){return e.type==="keypress"?Mo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),oy=wt(ry),uy=ce({},ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),u4=wt(uy),cy=ce({},Es,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ad}),fy=wt(cy),dy=ce({},ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),hy=wt(dy),my=ce({},ko,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),wy=wt(my),gy=ce({},ra,{newState:0,oldState:0}),py=wt(gy),yy=[9,13,27,32],ld=qn&&"CompositionEvent"in window,_s=null;qn&&"documentMode"in document&&(_s=document.documentMode);var vy=qn&&"TextEvent"in window&&!_s,c4=qn&&(!ld||_s&&8<_s&&11>=_s),f4=" ",d4=!1;function h4(e,t){switch(e){case"keyup":return yy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m4(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ml=!1;function by(e,t){switch(e){case"compositionend":return m4(t);case"keypress":return t.which!==32?null:(d4=!0,f4);case"textInput":return e=t.data,e===f4&&d4?null:e;default:return null}}function xy(e,t){if(ml)return e==="compositionend"||!ld&&h4(e,t)?(e=l4(),jo=ed=Ti=null,ml=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return c4&&t.locale!=="ko"?null:t.data;default:return null}}var Ey={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function w4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ey[e.type]:t==="textarea"}function g4(e,t,n,i){dl?hl?hl.push(i):hl=[i]:dl=i,t=wu(t,"onChange"),0<t.length&&(n=new Do("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Ts=null,As=null;function Sy(e){Fw(e,0)}function Oo(e){var t=vs(e);if(J3(t))return e}function p4(e,t){if(e==="change")return t}var y4=!1;if(qn){var sd;if(qn){var rd="oninput"in document;if(!rd){var v4=document.createElement("div");v4.setAttribute("oninput","return;"),rd=typeof v4.oninput=="function"}sd=rd}else sd=!1;y4=sd&&(!document.documentMode||9<document.documentMode)}function b4(){Ts&&(Ts.detachEvent("onpropertychange",x4),As=Ts=null)}function x4(e){if(e.propertyName==="value"&&Oo(As)){var t=[];g4(t,As,e,Jf(e)),a4(Sy,t)}}function _y(e,t,n){e==="focusin"?(b4(),Ts=t,As=n,Ts.attachEvent("onpropertychange",x4)):e==="focusout"&&b4()}function Ty(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Oo(As)}function Ay(e,t){if(e==="click")return Oo(t)}function Ny(e,t){if(e==="input"||e==="change")return Oo(t)}function jy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:jy;function Ns(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var a=n[i];if(!Vf.call(t,a)||!kt(e[a],t[a]))return!1}return!0}function E4(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function S4(e,t){var n=E4(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=E4(n)}}function _4(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_4(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function T4(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ao(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ao(e.document)}return t}function od(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function My(e,t){var n=T4(t);t=e.focusedElem;var i=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&_4(t.ownerDocument.documentElement,t)){if(i!==null&&od(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var a=t.textContent.length,l=Math.min(i.start,a);i=i.end===void 0?l:Math.min(i.end,a),!n.extend&&l>i&&(a=i,i=l,l=a),a=S4(t,l);var s=S4(t,i);a&&s&&(n.rangeCount!==1||n.anchorNode!==a.node||n.anchorOffset!==a.offset||n.focusNode!==s.node||n.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(a.node,a.offset),n.removeAllRanges(),l>i?(n.addRange(e),n.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<e.length;t++)n=e[t],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var Cy=qn&&"documentMode"in document&&11>=document.documentMode,wl=null,ud=null,js=null,cd=!1;function A4(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cd||wl==null||wl!==Ao(i)||(i=wl,"selectionStart"in i&&od(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),js&&Ns(js,i)||(js=i,i=wu(ud,"onSelect"),0<i.length&&(t=new Do("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=wl)))}function oa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var gl={animationend:oa("Animation","AnimationEnd"),animationiteration:oa("Animation","AnimationIteration"),animationstart:oa("Animation","AnimationStart"),transitionrun:oa("Transition","TransitionRun"),transitionstart:oa("Transition","TransitionStart"),transitioncancel:oa("Transition","TransitionCancel"),transitionend:oa("Transition","TransitionEnd")},fd={},N4={};qn&&(N4=document.createElement("div").style,"AnimationEvent"in window||(delete gl.animationend.animation,delete gl.animationiteration.animation,delete gl.animationstart.animation),"TransitionEvent"in window||delete gl.transitionend.transition);function ua(e){if(fd[e])return fd[e];if(!gl[e])return e;var t=gl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in N4)return fd[e]=t[n];return e}var j4=ua("animationend"),M4=ua("animationiteration"),C4=ua("animationstart"),Dy=ua("transitionrun"),ky=ua("transitionstart"),Oy=ua("transitioncancel"),D4=ua("transitionend"),k4=new Map,O4="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function dn(e,t){k4.set(e,t),sa(t,[e])}var It=[],pl=0,dd=0;function Lo(){for(var e=pl,t=dd=pl=0;t<e;){var n=It[t];It[t++]=null;var i=It[t];It[t++]=null;var a=It[t];It[t++]=null;var l=It[t];if(It[t++]=null,i!==null&&a!==null){var s=i.pending;s===null?a.next=a:(a.next=s.next,s.next=a),i.pending=a}l!==0&&L4(n,a,l)}}function Uo(e,t,n,i){It[pl++]=e,It[pl++]=t,It[pl++]=n,It[pl++]=i,dd|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function hd(e,t,n,i){return Uo(e,t,n,i),zo(e)}function Ai(e,t){return Uo(e,null,null,t),zo(e)}function L4(e,t,n){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n);for(var a=!1,l=e.return;l!==null;)l.childLanes|=n,i=l.alternate,i!==null&&(i.childLanes|=n),l.tag===22&&(e=l.stateNode,e===null||e._visibility&1||(a=!0)),e=l,l=l.return;a&&t!==null&&e.tag===3&&(l=e.stateNode,a=31-Dt(n),l=l.hiddenUpdates,e=l[a],e===null?l[a]=[t]:e.push(t),t.lane=n|536870912)}function zo(e){if(50<$s)throw $s=0,v2=null,Error(E(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yl={},U4=new WeakMap;function Wt(e,t){if(typeof e=="object"&&e!==null){var n=U4.get(e);return n!==void 0?n:(t={value:e,source:t,stack:k3(t)},U4.set(e,t),t)}return{value:e,source:t,stack:k3(t)}}var vl=[],bl=0,Ro=null,Bo=0,Jt=[],Pt=0,ca=null,Xn=1,Qn="";function fa(e,t){vl[bl++]=Bo,vl[bl++]=Ro,Ro=e,Bo=t}function z4(e,t,n){Jt[Pt++]=Xn,Jt[Pt++]=Qn,Jt[Pt++]=ca,ca=e;var i=Xn;e=Qn;var a=32-Dt(i)-1;i&=~(1<<a),n+=1;var l=32-Dt(t)+a;if(30<l){var s=a-a%5;l=(i&(1<<s)-1).toString(32),i>>=s,a-=s,Xn=1<<32-Dt(t)+a|n<<a|i,Qn=l+e}else Xn=1<<l|n<<a|i,Qn=e}function md(e){e.return!==null&&(fa(e,1),z4(e,1,0))}function wd(e){for(;e===Ro;)Ro=vl[--bl],vl[bl]=null,Bo=vl[--bl],vl[bl]=null;for(;e===ca;)ca=Jt[--Pt],Jt[Pt]=null,Qn=Jt[--Pt],Jt[Pt]=null,Xn=Jt[--Pt],Jt[Pt]=null}var at=null,Ze=null,W=!1,hn=null,jn=!1,gd=Error(E(519));function da(e){var t=Error(E(418,""));throw Ds(Wt(t,e)),gd}function R4(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[Pe]=e,t[mt]=i,n){case"dialog":X("cancel",t),X("close",t);break;case"iframe":case"object":case"embed":X("load",t);break;case"video":case"audio":for(n=0;n<tr.length;n++)X(tr[n],t);break;case"source":X("error",t);break;case"img":case"image":case"link":X("error",t),X("load",t);break;case"details":X("toggle",t);break;case"input":X("invalid",t),P3(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0),To(t);break;case"select":X("invalid",t);break;case"textarea":X("invalid",t),e4(t,i.value,i.defaultValue,i.children),To(t)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||i.suppressHydrationWarning===!0||Qw(t.textContent,n)?(i.popover!=null&&(X("beforetoggle",t),X("toggle",t)),i.onScroll!=null&&X("scroll",t),i.onScrollEnd!=null&&X("scrollend",t),i.onClick!=null&&(t.onclick=gu),t=!0):t=!1,t||da(e)}function B4(e){for(at=e.return;at;)switch(at.tag){case 3:case 27:jn=!0;return;case 5:case 13:jn=!1;return;default:at=at.return}}function Ms(e){if(e!==at)return!1;if(!W)return B4(e),W=!0,!1;var t=!1,n;if((n=e.tag!==3&&e.tag!==27)&&((n=e.tag===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||z2(e.type,e.memoizedProps)),n=!n),n&&(t=!0),t&&Ze&&da(e),B4(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Ze=wn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Ze=null}}else Ze=at?wn(e.stateNode.nextSibling):null;return!0}function Cs(){Ze=at=null,W=!1}function Ds(e){hn===null?hn=[e]:hn.push(e)}var ks=Error(E(460)),G4=Error(E(474)),pd={then:function(){}};function H4(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Go(){}function V4(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Go,Go),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e===ks?Error(E(483)):e;default:if(typeof t.status=="string")t.then(Go,Go);else{if(e=re,e!==null&&100<e.shellSuspendCounter)throw Error(E(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=i}},function(i){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e===ks?Error(E(483)):e}throw Os=t,ks}}var Os=null;function F4(){if(Os===null)throw Error(E(459));var e=Os;return Os=null,e}var xl=null,Ls=0;function Ho(e){var t=Ls;return Ls+=1,xl===null&&(xl=[]),V4(xl,e,t)}function Us(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Vo(e,t){throw t.$$typeof===b6?Error(E(525)):(e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function q4(e){var t=e._init;return t(e._payload)}function Y4(e){function t(m,g){if(e){var y=m.deletions;y===null?(m.deletions=[g],m.flags|=16):y.push(g)}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function i(m){for(var g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function a(m,g){return m=Bi(m,g),m.index=0,m.sibling=null,m}function l(m,g,y){return m.index=y,e?(y=m.alternate,y!==null?(y=y.index,y<g?(m.flags|=33554434,g):y):(m.flags|=33554434,g)):(m.flags|=1048576,g)}function s(m){return e&&m.alternate===null&&(m.flags|=33554434),m}function r(m,g,y,b){return g===null||g.tag!==6?(g=f2(y,m.mode,b),g.return=m,g):(g=a(g,y),g.return=m,g)}function o(m,g,y,b){var S=y.type;return S===nl?d(m,g,y.props.children,b,y.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===xi&&q4(S)===g.type)?(g=a(g,y.props),Us(g,y),g.return=m,g):(g=lu(y.type,y.key,y.props,null,m.mode,b),Us(g,y),g.return=m,g)}function c(m,g,y,b){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=d2(y,m.mode,b),g.return=m,g):(g=a(g,y.children||[]),g.return=m,g)}function d(m,g,y,b,S){return g===null||g.tag!==7?(g=Ea(y,m.mode,b,S),g.return=m,g):(g=a(g,y),g.return=m,g)}function h(m,g,y){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=f2(""+g,m.mode,y),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case wo:return y=lu(g.type,g.key,g.props,null,m.mode,y),Us(y,g),y.return=m,y;case cs:return g=d2(g,m.mode,y),g.return=m,g;case xi:var b=g._init;return g=b(g._payload),h(m,g,y)}if(hs(g)||fs(g))return g=Ea(g,m.mode,y,null),g.return=m,g;if(typeof g.then=="function")return h(m,Ho(g),y);if(g.$$typeof===Fn)return h(m,nu(m,g),y);Vo(m,g)}return null}function f(m,g,y,b){var S=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return S!==null?null:r(m,g,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case wo:return y.key===S?o(m,g,y,b):null;case cs:return y.key===S?c(m,g,y,b):null;case xi:return S=y._init,y=S(y._payload),f(m,g,y,b)}if(hs(y)||fs(y))return S!==null?null:d(m,g,y,b,null);if(typeof y.then=="function")return f(m,g,Ho(y),b);if(y.$$typeof===Fn)return f(m,g,nu(m,y),b);Vo(m,y)}return null}function w(m,g,y,b,S){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return m=m.get(y)||null,r(g,m,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case wo:return m=m.get(b.key===null?y:b.key)||null,o(g,m,b,S);case cs:return m=m.get(b.key===null?y:b.key)||null,c(g,m,b,S);case xi:var A=b._init;return b=A(b._payload),w(m,g,y,b,S)}if(hs(b)||fs(b))return m=m.get(y)||null,d(g,m,b,S,null);if(typeof b.then=="function")return w(m,g,y,Ho(b),S);if(b.$$typeof===Fn)return w(m,g,y,nu(g,b),S);Vo(g,b)}return null}function v(m,g,y,b){for(var S=null,A=null,T=g,N=g=0,M=null;T!==null&&N<y.length;N++){T.index>N?(M=T,T=null):M=T.sibling;var D=f(m,T,y[N],b);if(D===null){T===null&&(T=M);break}e&&T&&D.alternate===null&&t(m,T),g=l(D,g,N),A===null?S=D:A.sibling=D,A=D,T=M}if(N===y.length)return n(m,T),W&&fa(m,N),S;if(T===null){for(;N<y.length;N++)T=h(m,y[N],b),T!==null&&(g=l(T,g,N),A===null?S=T:A.sibling=T,A=T);return W&&fa(m,N),S}for(T=i(T);N<y.length;N++)M=w(T,m,N,y[N],b),M!==null&&(e&&M.alternate!==null&&T.delete(M.key===null?N:M.key),g=l(M,g,N),A===null?S=M:A.sibling=M,A=M);return e&&T.forEach(function(ge){return t(m,ge)}),W&&fa(m,N),S}function x(m,g,y,b){if(y==null)throw Error(E(151));for(var S=null,A=null,T=g,N=g=0,M=null,D=y.next();T!==null&&!D.done;N++,D=y.next()){T.index>N?(M=T,T=null):M=T.sibling;var ge=f(m,T,D.value,b);if(ge===null){T===null&&(T=M);break}e&&T&&ge.alternate===null&&t(m,T),g=l(ge,g,N),A===null?S=ge:A.sibling=ge,A=ge,T=M}if(D.done)return n(m,T),W&&fa(m,N),S;if(T===null){for(;!D.done;N++,D=y.next())D=h(m,D.value,b),D!==null&&(g=l(D,g,N),A===null?S=D:A.sibling=D,A=D);return W&&fa(m,N),S}for(T=i(T);!D.done;N++,D=y.next())D=w(T,m,N,D.value,b),D!==null&&(e&&D.alternate!==null&&T.delete(D.key===null?N:D.key),g=l(D,g,N),A===null?S=D:A.sibling=D,A=D);return e&&T.forEach(function(et){return t(m,et)}),W&&fa(m,N),S}function _(m,g,y,b){if(typeof y=="object"&&y!==null&&y.type===nl&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case wo:e:{for(var S=y.key;g!==null;){if(g.key===S){if(S=y.type,S===nl){if(g.tag===7){n(m,g.sibling),b=a(g,y.props.children),b.return=m,m=b;break e}}else if(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===xi&&q4(S)===g.type){n(m,g.sibling),b=a(g,y.props),Us(b,y),b.return=m,m=b;break e}n(m,g);break}else t(m,g);g=g.sibling}y.type===nl?(b=Ea(y.props.children,m.mode,b,y.key),b.return=m,m=b):(b=lu(y.type,y.key,y.props,null,m.mode,b),Us(b,y),b.return=m,m=b)}return s(m);case cs:e:{for(S=y.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(m,g.sibling),b=a(g,y.children||[]),b.return=m,m=b;break e}else{n(m,g);break}else t(m,g);g=g.sibling}b=d2(y,m.mode,b),b.return=m,m=b}return s(m);case xi:return S=y._init,y=S(y._payload),_(m,g,y,b)}if(hs(y))return v(m,g,y,b);if(fs(y)){if(S=fs(y),typeof S!="function")throw Error(E(150));return y=S.call(y),x(m,g,y,b)}if(typeof y.then=="function")return _(m,g,Ho(y),b);if(y.$$typeof===Fn)return _(m,g,nu(m,y),b);Vo(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,g!==null&&g.tag===6?(n(m,g.sibling),b=a(g,y),b.return=m,m=b):(n(m,g),b=f2(y,m.mode,b),b.return=m,m=b),s(m)):n(m,g)}return function(m,g,y,b){try{Ls=0;var S=_(m,g,y,b);return xl=null,S}catch(T){if(T===ks)throw T;var A=nn(29,T,null,m.mode);return A.lanes=b,A.return=m,A}finally{}}}var ha=Y4(!0),X4=Y4(!1),El=Tn(null),Fo=Tn(0);function Q4(e,t){e=ii,we(Fo,e),we(El,t),ii=e|t.baseLanes}function yd(){we(Fo,ii),we(El,El.current)}function vd(){ii=Fo.current,qe(El),qe(Fo)}var $t=Tn(null),Mn=null;function Ni(e){var t=e.alternate;we(Ge,Ge.current&1),we($t,e),Mn===null&&(t===null||El.current!==null||t.memoizedState!==null)&&(Mn=e)}function Z4(e){if(e.tag===22){if(we(Ge,Ge.current),we($t,e),Mn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Mn=e)}}else ji()}function ji(){we(Ge,Ge.current),we($t,$t.current)}function Zn(e){qe($t),Mn===e&&(Mn=null),qe(Ge)}var Ge=Tn(0);function qo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ly=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Uy=Be.unstable_scheduleCallback,zy=Be.unstable_NormalPriority,He={$$typeof:Fn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bd(){return{controller:new Ly,data:new Map,refCount:0}}function zs(e){e.refCount--,e.refCount===0&&Uy(zy,function(){e.controller.abort()})}var Rs=null,xd=0,Sl=0,_l=null;function Ry(e,t){if(Rs===null){var n=Rs=[];xd=0,Sl=N2(),_l={status:"pending",value:void 0,then:function(i){n.push(i)}}}return xd++,t.then(K4,K4),t}function K4(){if(--xd===0&&Rs!==null){_l!==null&&(_l.status="fulfilled");var e=Rs;Rs=null,Sl=0,_l=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function By(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(i.status="rejected",i.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),i}var I4=G.S;G.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ry(e,t),I4!==null&&I4(e,t)};var ma=Tn(null);function Ed(){var e=ma.current;return e!==null?e:re.pooledCache}function Yo(e,t){t===null?we(ma,ma.current):we(ma,t.pool)}function W4(){var e=Ed();return e===null?null:{parent:He._currentValue,pool:e}}var Mi=0,V=null,ee=null,Le=null,Xo=!1,Tl=!1,wa=!1,Qo=0,Bs=0,Al=null,Gy=0;function Me(){throw Error(E(321))}function Sd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kt(e[n],t[n]))return!1;return!0}function _d(e,t,n,i,a,l){return Mi=l,V=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?ga:Ci,wa=!1,l=n(i,a),wa=!1,Tl&&(l=P4(t,n,i,a)),J4(e),l}function J4(e){G.H=Cn;var t=ee!==null&&ee.next!==null;if(Mi=0,Le=ee=V=null,Xo=!1,Bs=0,Al=null,t)throw Error(E(300));e===null||Xe||(e=e.dependencies,e!==null&&tu(e)&&(Xe=!0))}function P4(e,t,n,i){V=e;var a=0;do{if(Tl&&(Al=null),Bs=0,Tl=!1,25<=a)throw Error(E(301));if(a+=1,Le=ee=null,e.updateQueue!=null){var l=e.updateQueue;l.lastEffect=null,l.events=null,l.stores=null,l.memoCache!=null&&(l.memoCache.index=0)}G.H=pa,l=t(n,i)}while(Tl);return l}function Hy(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?Gs(t):t,e=e.useState()[0],(ee!==null?ee.memoizedState:null)!==e&&(V.flags|=1024),t}function Td(){var e=Qo!==0;return Qo=0,e}function Ad(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Nd(e){if(Xo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xo=!1}Mi=0,Le=ee=V=null,Tl=!1,Bs=Qo=0,Al=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?V.memoizedState=Le=e:Le=Le.next=e,Le}function Ue(){if(ee===null){var e=V.alternate;e=e!==null?e.memoizedState:null}else e=ee.next;var t=Le===null?V.memoizedState:Le.next;if(t!==null)Le=t,ee=e;else{if(e===null)throw V.alternate===null?Error(E(467)):Error(E(310));ee=e,e={memoizedState:ee.memoizedState,baseState:ee.baseState,baseQueue:ee.baseQueue,queue:ee.queue,next:null},Le===null?V.memoizedState=Le=e:Le=Le.next=e}return Le}var Zo;Zo=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function Gs(e){var t=Bs;return Bs+=1,Al===null&&(Al=[]),e=V4(Al,e,t),t=V,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?ga:Ci),e}function Ko(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gs(e);if(e.$$typeof===Fn)return $e(e)}throw Error(E(438,String(e)))}function jd(e){var t=null,n=V.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=V.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Zo(),V.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=E6;return t.index++,n}function Kn(e,t){return typeof t=="function"?t(e):t}function Io(e){var t=Ue();return Md(t,ee,e)}function Md(e,t,n){var i=e.queue;if(i===null)throw Error(E(311));i.lastRenderedReducer=n;var a=e.baseQueue,l=i.pending;if(l!==null){if(a!==null){var s=a.next;a.next=l.next,l.next=s}t.baseQueue=a=l,i.pending=null}if(l=e.baseState,a===null)e.memoizedState=l;else{t=a.next;var r=s=null,o=null,c=t,d=!1;do{var h=c.lane&-536870913;if(h!==c.lane?(Q&h)===h:(Mi&h)===h){var f=c.revertLane;if(f===0)o!==null&&(o=o.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===Sl&&(d=!0);else if((Mi&f)===f){c=c.next,f===Sl&&(d=!0);continue}else h={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(r=o=h,s=l):o=o.next=h,V.lanes|=f,Gi|=f;h=c.action,wa&&n(l,h),l=c.hasEagerState?c.eagerState:n(l,h)}else f={lane:h,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(r=o=f,s=l):o=o.next=f,V.lanes|=h,Gi|=h;c=c.next}while(c!==null&&c!==t);if(o===null?s=l:o.next=r,!kt(l,e.memoizedState)&&(Xe=!0,d&&(n=_l,n!==null)))throw n;e.memoizedState=l,e.baseState=s,e.baseQueue=o,i.lastRenderedState=l}return a===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Cd(e){var t=Ue(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,l=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do l=e(l,s.action),s=s.next;while(s!==a);kt(l,t.memoizedState)||(Xe=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,i]}function $4(e,t,n){var i=V,a=Ue(),l=W;if(l){if(n===void 0)throw Error(E(407));n=n()}else n=t();var s=!kt((ee||a).memoizedState,n);if(s&&(a.memoizedState=n,Xe=!0),a=a.queue,Od(nm.bind(null,i,a,e),[e]),a.getSnapshot!==t||s||Le!==null&&Le.memoizedState.tag&1){if(i.flags|=2048,Nl(9,tm.bind(null,i,a,n,t),{destroy:void 0},null),re===null)throw Error(E(349));l||Mi&60||em(i,t,n)}return n}function em(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=V.updateQueue,t===null?(t=Zo(),V.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function tm(e,t,n,i){t.value=n,t.getSnapshot=i,im(t)&&am(e)}function nm(e,t,n){return n(function(){im(t)&&am(e)})}function im(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kt(e,n)}catch{return!0}}function am(e){var t=Ai(e,2);t!==null&&lt(t,e,2)}function Dd(e){var t=gt();if(typeof e=="function"){var n=e;if(e=n(),wa){Si(!0);try{n()}finally{Si(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},t}function lm(e,t,n,i){return e.baseState=n,Md(e,ee,typeof i=="function"?i:Kn)}function Vy(e,t,n,i,a){if(Po(e))throw Error(E(485));if(e=t.action,e!==null){var l={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){l.listeners.push(s)}};G.T!==null?n(!0):l.isTransition=!1,i(l),n=t.pending,n===null?(l.next=t.pending=l,sm(t,l)):(l.next=n.next,t.pending=n.next=l)}}function sm(e,t){var n=t.action,i=t.payload,a=e.state;if(t.isTransition){var l=G.T,s={};G.T=s;try{var r=n(a,i),o=G.S;o!==null&&o(s,r),rm(e,t,r)}catch(c){kd(e,t,c)}finally{G.T=l}}else try{l=n(a,i),rm(e,t,l)}catch(c){kd(e,t,c)}}function rm(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){om(e,t,i)},function(i){return kd(e,t,i)}):om(e,t,n)}function om(e,t,n){t.status="fulfilled",t.value=n,um(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,sm(e,n)))}function kd(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,um(t),t=t.next;while(t!==i)}e.action=null}function um(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function cm(e,t){return t}function fm(e,t){if(W){var n=re.formState;if(n!==null){e:{var i=V;if(W){if(Ze){t:{for(var a=Ze,l=jn;a.nodeType!==8;){if(!l){a=null;break t}if(a=wn(a.nextSibling),a===null){a=null;break t}}l=a.data,a=l==="F!"||l==="F"?a:null}if(a){Ze=wn(a.nextSibling),i=a.data==="F!";break e}}da(i)}i=!1}i&&(t=n[0])}}return n=gt(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cm,lastRenderedState:t},n.queue=i,n=Mm.bind(null,V,i),i.dispatch=n,i=Dd(!1),l=Bd.bind(null,V,!1,i.queue),i=gt(),a={state:t,dispatch:null,action:e,pending:null},i.queue=a,n=Vy.bind(null,V,a,l,n),a.dispatch=n,i.memoizedState=e,[t,n,!1]}function dm(e){var t=Ue();return hm(t,ee,e)}function hm(e,t,n){t=Md(e,t,cm)[0],e=Io(Kn)[0],t=typeof t=="object"&&t!==null&&typeof t.then=="function"?Gs(t):t;var i=Ue(),a=i.queue,l=a.dispatch;return n!==i.memoizedState&&(V.flags|=2048,Nl(9,Fy.bind(null,a,n),{destroy:void 0},null)),[t,l,e]}function Fy(e,t){e.action=t}function mm(e){var t=Ue(),n=ee;if(n!==null)return hm(t,n,e);Ue(),t=t.memoizedState,n=Ue();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Nl(e,t,n,i){return e={tag:e,create:t,inst:n,deps:i,next:null},t=V.updateQueue,t===null&&(t=Zo(),V.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function wm(){return Ue().memoizedState}function Wo(e,t,n,i){var a=gt();V.flags|=e,a.memoizedState=Nl(1|t,n,{destroy:void 0},i===void 0?null:i)}function Jo(e,t,n,i){var a=Ue();i=i===void 0?null:i;var l=a.memoizedState.inst;ee!==null&&i!==null&&Sd(i,ee.memoizedState.deps)?a.memoizedState=Nl(t,n,l,i):(V.flags|=e,a.memoizedState=Nl(1|t,n,l,i))}function gm(e,t){Wo(8390656,8,e,t)}function Od(e,t){Jo(2048,8,e,t)}function pm(e,t){return Jo(4,2,e,t)}function ym(e,t){return Jo(4,4,e,t)}function vm(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bm(e,t,n){n=n!=null?n.concat([e]):null,Jo(4,4,vm.bind(null,t,e),n)}function Ld(){}function xm(e,t){var n=Ue();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&Sd(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Em(e,t){var n=Ue();t=t===void 0?null:t;var i=n.memoizedState;if(t!==null&&Sd(t,i[1]))return i[0];if(i=e(),wa){Si(!0);try{e()}finally{Si(!1)}}return n.memoizedState=[i,t],i}function Ud(e,t,n){return n===void 0||Mi&1073741824?e.memoizedState=t:(e.memoizedState=n,e=_w(),V.lanes|=e,Gi|=e,n)}function Sm(e,t,n,i){return kt(n,t)?n:El.current!==null?(e=Ud(e,n,i),kt(e,t)||(Xe=!0),e):Mi&42?(e=_w(),V.lanes|=e,Gi|=e,t):(Xe=!0,e.memoizedState=n)}function _m(e,t,n,i,a){var l=fe.p;fe.p=l!==0&&8>l?l:8;var s=G.T,r={};G.T=r,Bd(e,!1,t,n);try{var o=a(),c=G.S;if(c!==null&&c(r,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var d=By(o,i);Hs(e,t,d,zt(e))}else Hs(e,t,i,zt(e))}catch(h){Hs(e,t,{then:function(){},status:"rejected",reason:h},zt())}finally{fe.p=l,G.T=s}}function qy(){}function zd(e,t,n,i){if(e.tag!==5)throw Error(E(476));var a=Tm(e).queue;_m(e,a,t,ia,n===null?qy:function(){return Am(e),n(i)})}function Tm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ia,baseState:ia,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:ia},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Am(e){var t=Tm(e).next.queue;Hs(e,t,{},zt())}function Rd(){return $e(sr)}function Nm(){return Ue().memoizedState}function jm(){return Ue().memoizedState}function Yy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=zt();e=Oi(n);var i=Li(t,e,n);i!==null&&(lt(i,t,n),qs(i,t,n)),t={cache:bd()},e.payload=t;return}t=t.return}}function Xy(e,t,n){var i=zt();n={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Po(e)?Cm(t,n):(n=hd(e,t,n,i),n!==null&&(lt(n,e,i),Dm(n,t,i)))}function Mm(e,t,n){var i=zt();Hs(e,t,n,i)}function Hs(e,t,n,i){var a={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Po(e))Cm(t,a);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,r=l(s,n);if(a.hasEagerState=!0,a.eagerState=r,kt(r,s))return Uo(e,t,a,0),re===null&&Lo(),!1}catch{}finally{}if(n=hd(e,t,a,i),n!==null)return lt(n,e,i),Dm(n,t,i),!0}return!1}function Bd(e,t,n,i){if(i={lane:2,revertLane:N2(),action:i,hasEagerState:!1,eagerState:null,next:null},Po(e)){if(t)throw Error(E(479))}else t=hd(e,n,i,2),t!==null&&lt(t,e,2)}function Po(e){var t=e.alternate;return e===V||t!==null&&t===V}function Cm(e,t){Tl=Xo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Dm(e,t,n){if(n&4194176){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,F3(e,n)}}var Cn={readContext:$e,use:Ko,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useLayoutEffect:Me,useInsertionEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useSyncExternalStore:Me,useId:Me};Cn.useCacheRefresh=Me,Cn.useMemoCache=Me,Cn.useHostTransitionStatus=Me,Cn.useFormState=Me,Cn.useActionState=Me,Cn.useOptimistic=Me;var ga={readContext:$e,use:Ko,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:$e,useEffect:gm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Wo(4194308,4,vm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wo(4194308,4,e,t)},useInsertionEffect:function(e,t){Wo(4,2,e,t)},useMemo:function(e,t){var n=gt();t=t===void 0?null:t;var i=e();if(wa){Si(!0);try{e()}finally{Si(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=gt();if(n!==void 0){var a=n(t);if(wa){Si(!0);try{n(t)}finally{Si(!1)}}}else a=t;return i.memoizedState=i.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},i.queue=e,e=e.dispatch=Xy.bind(null,V,e),[i.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:function(e){e=Dd(e);var t=e.queue,n=Mm.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ld,useDeferredValue:function(e,t){var n=gt();return Ud(n,e,t)},useTransition:function(){var e=Dd(!1);return e=_m.bind(null,V,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=V,a=gt();if(W){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),re===null)throw Error(E(349));Q&60||em(i,t,n)}a.memoizedState=n;var l={value:n,getSnapshot:t};return a.queue=l,gm(nm.bind(null,i,l,e),[e]),i.flags|=2048,Nl(9,tm.bind(null,i,l,n,t),{destroy:void 0},null),n},useId:function(){var e=gt(),t=re.identifierPrefix;if(W){var n=Qn,i=Xn;n=(i&~(1<<32-Dt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Qo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Gy++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return gt().memoizedState=Yy.bind(null,V)}};ga.useMemoCache=jd,ga.useHostTransitionStatus=Rd,ga.useFormState=fm,ga.useActionState=fm,ga.useOptimistic=function(e){var t=gt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Bd.bind(null,V,!0,n),n.dispatch=t,[e,t]};var Ci={readContext:$e,use:Ko,useCallback:xm,useContext:$e,useEffect:Od,useImperativeHandle:bm,useInsertionEffect:pm,useLayoutEffect:ym,useMemo:Em,useReducer:Io,useRef:wm,useState:function(){return Io(Kn)},useDebugValue:Ld,useDeferredValue:function(e,t){var n=Ue();return Sm(n,ee.memoizedState,e,t)},useTransition:function(){var e=Io(Kn)[0],t=Ue().memoizedState;return[typeof e=="boolean"?e:Gs(e),t]},useSyncExternalStore:$4,useId:Nm};Ci.useCacheRefresh=jm,Ci.useMemoCache=jd,Ci.useHostTransitionStatus=Rd,Ci.useFormState=dm,Ci.useActionState=dm,Ci.useOptimistic=function(e,t){var n=Ue();return lm(n,ee,e,t)};var pa={readContext:$e,use:Ko,useCallback:xm,useContext:$e,useEffect:Od,useImperativeHandle:bm,useInsertionEffect:pm,useLayoutEffect:ym,useMemo:Em,useReducer:Cd,useRef:wm,useState:function(){return Cd(Kn)},useDebugValue:Ld,useDeferredValue:function(e,t){var n=Ue();return ee===null?Ud(n,e,t):Sm(n,ee.memoizedState,e,t)},useTransition:function(){var e=Cd(Kn)[0],t=Ue().memoizedState;return[typeof e=="boolean"?e:Gs(e),t]},useSyncExternalStore:$4,useId:Nm};pa.useCacheRefresh=jm,pa.useMemoCache=jd,pa.useHostTransitionStatus=Rd,pa.useFormState=mm,pa.useActionState=mm,pa.useOptimistic=function(e,t){var n=Ue();return ee!==null?lm(n,ee,e,t):(n.baseState=e,[e,n.queue.dispatch])};function Gd(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:ce({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hd={isMounted:function(e){return(e=e._reactInternals)?il(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=zt(),a=Oi(i);a.payload=t,n!=null&&(a.callback=n),t=Li(e,a,i),t!==null&&(lt(t,e,i),qs(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=zt(),a=Oi(i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Li(e,a,i),t!==null&&(lt(t,e,i),qs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=zt(),i=Oi(n);i.tag=2,t!=null&&(i.callback=t),t=Li(e,i,n),t!==null&&(lt(t,e,n),qs(t,e,n))}};function km(e,t,n,i,a,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,l,s):t.prototype&&t.prototype.isPureReactComponent?!Ns(n,i)||!Ns(a,l):!0}function Om(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Hd.enqueueReplaceState(t,t.state,null)}function ya(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=ce({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}var $o=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Lm(e){$o(e)}function Um(e){console.error(e)}function zm(e){$o(e)}function eu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Rm(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Vd(e,t,n){return n=Oi(n),n.tag=3,n.payload={element:null},n.callback=function(){eu(e,t)},n}function Bm(e){return e=Oi(e),e.tag=3,e}function Gm(e,t,n,i){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var l=i.value;e.payload=function(){return a(l)},e.callback=function(){Rm(t,n,i)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){Rm(t,n,i),typeof a!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var r=i.stack;this.componentDidCatch(i.value,{componentStack:r!==null?r:""})})}function Qy(e,t,n,i,a){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&Fs(t,n,a,!0),n=$t.current,n!==null){switch(n.tag){case 13:return Mn===null?E2():n.alternate===null&&Te===0&&(Te=3),n.flags&=-257,n.flags|=65536,n.lanes=a,i===pd?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),_2(e,i,a)),!1;case 22:return n.flags|=65536,i===pd?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),_2(e,i,a)),!1}throw Error(E(435,n.tag))}return _2(e,i,a),E2(),!1}if(W)return t=$t.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,i!==gd&&(e=Error(E(422),{cause:i}),Ds(Wt(e,n)))):(i!==gd&&(t=Error(E(423),{cause:i}),Ds(Wt(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,i=Wt(i,n),a=Vd(e.stateNode,i,a),n2(e,a),Te!==4&&(Te=2)),!1;var l=Error(E(520),{cause:i});if(l=Wt(l,n),Js===null?Js=[l]:Js.push(l),Te!==4&&(Te=2),t===null)return!0;i=Wt(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Vd(n.stateNode,i,e),n2(n,e),!1;case 1:if(t=n.type,l=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||l!==null&&typeof l.componentDidCatch=="function"&&(Hi===null||!Hi.has(l))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Bm(a),Gm(a,e,n,i),n2(n,a),!1}n=n.return}while(n!==null);return!1}var Hm=Error(E(461)),Xe=!1;function Ke(e,t,n,i){t.child=e===null?X4(t,null,n,i):ha(t,e.child,n,i)}function Vm(e,t,n,i,a){n=n.render;var l=t.ref;if("ref"in i){var s={};for(var r in i)r!=="ref"&&(s[r]=i[r])}else s=i;return ba(t),i=_d(e,t,n,s,l,a),r=Td(),e!==null&&!Xe?(Ad(e,t,a),In(e,t,a)):(W&&r&&md(t),t.flags|=1,Ke(e,t,i,a),t.child)}function Fm(e,t,n,i,a){if(e===null){var l=n.type;return typeof l=="function"&&!c2(l)&&l.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=l,qm(e,t,l,i,a)):(e=lu(n.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!Wd(e,a)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:Ns,n(s,i)&&e.ref===t.ref)return In(e,t,a)}return t.flags|=1,e=Bi(l,i),e.ref=t.ref,e.return=t,t.child=e}function qm(e,t,n,i,a){if(e!==null){var l=e.memoizedProps;if(Ns(l,i)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=i=l,Wd(e,a))e.flags&131072&&(Xe=!0);else return t.lanes=e.lanes,In(e,t,a)}return Fd(e,t,n,i,a)}function Ym(e,t,n){var i=t.pendingProps,a=i.children,l=(t.stateNode._pendingVisibility&2)!==0,s=e!==null?e.memoizedState:null;if(Vs(e,t),i.mode==="hidden"||l){if(t.flags&128){if(i=s!==null?s.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;t.childLanes=l&~i}else t.childLanes=0,t.child=null;return Xm(e,t,i,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Yo(t,s!==null?s.cachePool:null),s!==null?Q4(t,s):yd(),Z4(t);else return t.lanes=t.childLanes=536870912,Xm(e,t,s!==null?s.baseLanes|n:n,n)}else s!==null?(Yo(t,s.cachePool),Q4(t,s),ji(),t.memoizedState=null):(e!==null&&Yo(t,null),yd(),ji());return Ke(e,t,a,n),t.child}function Xm(e,t,n,i){var a=Ed();return a=a===null?null:{parent:He._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Yo(t,null),yd(),Z4(t),e!==null&&Fs(e,t,i,!0),null}function Vs(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=2097664);else{if(typeof n!="function"&&typeof n!="object")throw Error(E(284));(e===null||e.ref!==n)&&(t.flags|=2097664)}}function Fd(e,t,n,i,a){return ba(t),n=_d(e,t,n,i,void 0,a),i=Td(),e!==null&&!Xe?(Ad(e,t,a),In(e,t,a)):(W&&i&&md(t),t.flags|=1,Ke(e,t,n,a),t.child)}function Qm(e,t,n,i,a,l){return ba(t),t.updateQueue=null,n=P4(t,i,n,a),J4(e),i=Td(),e!==null&&!Xe?(Ad(e,t,l),In(e,t,l)):(W&&i&&md(t),t.flags|=1,Ke(e,t,n,l),t.child)}function Zm(e,t,n,i,a){if(ba(t),t.stateNode===null){var l=yl,s=n.contextType;typeof s=="object"&&s!==null&&(l=$e(s)),l=new n(i,l),t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Hd,t.stateNode=l,l._reactInternals=t,l=t.stateNode,l.props=i,l.state=t.memoizedState,l.refs={},e2(t),s=n.contextType,l.context=typeof s=="object"&&s!==null?$e(s):yl,l.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(Gd(t,n,s,i),l.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(s=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),s!==l.state&&Hd.enqueueReplaceState(l,l.state,null),Xs(t,i,l,a),Ys(),l.state=t.memoizedState),typeof l.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){l=t.stateNode;var r=t.memoizedProps,o=ya(n,r);l.props=o;var c=l.context,d=n.contextType;s=yl,typeof d=="object"&&d!==null&&(s=$e(d));var h=n.getDerivedStateFromProps;d=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,d||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(r||c!==s)&&Om(t,l,i,s),ki=!1;var f=t.memoizedState;l.state=f,Xs(t,i,l,a),Ys(),c=t.memoizedState,r||f!==c||ki?(typeof h=="function"&&(Gd(t,n,h,i),c=t.memoizedState),(o=ki||km(t,n,o,i,f,c,s))?(d||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=c),l.props=i,l.state=c,l.context=s,i=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{l=t.stateNode,t2(e,t),s=t.memoizedProps,d=ya(n,s),l.props=d,h=t.pendingProps,f=l.context,c=n.contextType,o=yl,typeof c=="object"&&c!==null&&(o=$e(c)),r=n.getDerivedStateFromProps,(c=typeof r=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==h||f!==o)&&Om(t,l,i,o),ki=!1,f=t.memoizedState,l.state=f,Xs(t,i,l,a),Ys();var w=t.memoizedState;s!==h||f!==w||ki||e!==null&&e.dependencies!==null&&tu(e.dependencies)?(typeof r=="function"&&(Gd(t,n,r,i),w=t.memoizedState),(d=ki||km(t,n,d,i,f,w,o)||e!==null&&e.dependencies!==null&&tu(e.dependencies))?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(i,w,o),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(i,w,o)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=w),l.props=i,l.state=w,l.context=o,i=d):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),i=!1)}return l=i,Vs(e,t),i=(t.flags&128)!==0,l||i?(l=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:l.render(),t.flags|=1,e!==null&&i?(t.child=ha(t,e.child,null,a),t.child=ha(t,null,n,a)):Ke(e,t,n,a),t.memoizedState=l.state,e=t.child):e=In(e,t,a),e}function Km(e,t,n,i){return Cs(),t.flags|=256,Ke(e,t,n,i),t.child}var qd={dehydrated:null,treeContext:null,retryLane:0};function Yd(e){return{baseLanes:e,cachePool:W4()}}function Xd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=an),e}function Im(e,t,n){var i=t.pendingProps,a=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(Ge.current&2)!==0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(W){if(a?Ni(t):ji(),W){var r=Ze,o;if(o=r){e:{for(o=r,r=jn;o.nodeType!==8;){if(!r){r=null;break e}if(o=wn(o.nextSibling),o===null){r=null;break e}}r=o}r!==null?(t.memoizedState={dehydrated:r,treeContext:ca!==null?{id:Xn,overflow:Qn}:null,retryLane:536870912},o=nn(18,null,null,0),o.stateNode=r,o.return=t,t.child=o,at=t,Ze=null,o=!0):o=!1}o||da(t)}if(r=t.memoizedState,r!==null&&(r=r.dehydrated,r!==null))return r.data==="$!"?t.lanes=16:t.lanes=536870912,null;Zn(t)}return r=i.children,i=i.fallback,a?(ji(),a=t.mode,r=Zd({mode:"hidden",children:r},a),i=Ea(i,a,n,null),r.return=t,i.return=t,r.sibling=i,t.child=r,a=t.child,a.memoizedState=Yd(n),a.childLanes=Xd(e,s,n),t.memoizedState=qd,i):(Ni(t),Qd(t,r))}if(o=e.memoizedState,o!==null&&(r=o.dehydrated,r!==null)){if(l)t.flags&256?(Ni(t),t.flags&=-257,t=Kd(e,t,n)):t.memoizedState!==null?(ji(),t.child=e.child,t.flags|=128,t=null):(ji(),a=i.fallback,r=t.mode,i=Zd({mode:"visible",children:i.children},r),a=Ea(a,r,n,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,ha(t,e.child,null,n),i=t.child,i.memoizedState=Yd(n),i.childLanes=Xd(e,s,n),t.memoizedState=qd,t=a);else if(Ni(t),r.data==="$!"){if(s=r.nextSibling&&r.nextSibling.dataset,s)var c=s.dgst;s=c,i=Error(E(419)),i.stack="",i.digest=s,Ds({value:i,source:null,stack:null}),t=Kd(e,t,n)}else if(Xe||Fs(e,t,n,!1),s=(n&e.childLanes)!==0,Xe||s){if(s=re,s!==null){if(i=n&-n,i&42)i=1;else switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=64;break;case 268435456:i=134217728;break;default:i=0}if(i=i&(s.suspendedLanes|n)?0:i,i!==0&&i!==o.retryLane)throw o.retryLane=i,Ai(e,i),lt(s,e,i),Hm}r.data==="$?"||E2(),t=Kd(e,t,n)}else r.data==="$?"?(t.flags|=128,t.child=e.child,t=rv.bind(null,e),r._reactRetry=t,t=null):(e=o.treeContext,Ze=wn(r.nextSibling),at=t,W=!0,hn=null,jn=!1,e!==null&&(Jt[Pt++]=Xn,Jt[Pt++]=Qn,Jt[Pt++]=ca,Xn=e.id,Qn=e.overflow,ca=t),t=Qd(t,i.children),t.flags|=4096);return t}return a?(ji(),a=i.fallback,r=t.mode,o=e.child,c=o.sibling,i=Bi(o,{mode:"hidden",children:i.children}),i.subtreeFlags=o.subtreeFlags&31457280,c!==null?a=Bi(c,a):(a=Ea(a,r,n,null),a.flags|=2),a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,r=e.child.memoizedState,r===null?r=Yd(n):(o=r.cachePool,o!==null?(c=He._currentValue,o=o.parent!==c?{parent:c,pool:c}:o):o=W4(),r={baseLanes:r.baseLanes|n,cachePool:o}),a.memoizedState=r,a.childLanes=Xd(e,s,n),t.memoizedState=qd,i):(Ni(t),n=e.child,e=n.sibling,n=Bi(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Qd(e,t){return t=Zd({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Zd(e,t){return xw(e,t,0,null)}function Kd(e,t,n){return ha(t,e.child,null,n),e=Qd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wm(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Pd(e.return,t,n)}function Id(e,t,n,i,a){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=i,l.tail=n,l.tailMode=a)}function Jm(e,t,n){var i=t.pendingProps,a=i.revealOrder,l=i.tail;if(Ke(e,t,i.children,n),i=Ge.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wm(e,n,t);else if(e.tag===19)Wm(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}switch(we(Ge,i),a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&qo(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Id(t,!1,a,n,l);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&qo(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Id(t,!0,n,null,l);break;case"together":Id(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function In(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gi|=t.lanes,!(n&t.childLanes))if(e!==null){if(Fs(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=Bi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Bi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Wd(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&tu(e)))}function Zy(e,t,n){switch(t.tag){case 3:po(t,t.stateNode.containerInfo),Di(t,He,e.memoizedState.cache),Cs();break;case 27:case 5:Hf(t);break;case 4:po(t,t.stateNode.containerInfo);break;case 10:Di(t,t.type,t.memoizedProps.value);break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Ni(t),t.flags|=128,null):n&t.child.childLanes?Im(e,t,n):(Ni(t),e=In(e,t,n),e!==null?e.sibling:null);Ni(t);break;case 19:var a=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(Fs(e,t,n,!1),i=(n&t.childLanes)!==0),a){if(i)return Jm(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),we(Ge,Ge.current),i)break;return null;case 22:case 23:return t.lanes=0,Ym(e,t,n);case 24:Di(t,He,e.memoizedState.cache)}return In(e,t,n)}function Pm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xe=!0;else{if(!Wd(e,n)&&!(t.flags&128))return Xe=!1,Zy(e,t,n);Xe=!!(e.flags&131072)}else Xe=!1,W&&t.flags&1048576&&z4(t,Bo,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var i=t.elementType,a=i._init;if(i=a(i._payload),t.type=i,typeof i=="function")c2(i)?(e=ya(i,e),t.tag=1,t=Zm(null,t,i,e,n)):(t.tag=0,t=Fd(null,t,i,e,n));else{if(i!=null){if(a=i.$$typeof,a===Df){t.tag=11,t=Vm(null,t,i,e,n);break e}else if(a===Lf){t.tag=14,t=Fm(null,t,i,e,n);break e}}throw t=Uf(i)||i,Error(E(306,t,""))}}return t;case 0:return Fd(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,a=ya(i,t.pendingProps),Zm(e,t,i,a,n);case 3:e:{if(po(t,t.stateNode.containerInfo),e===null)throw Error(E(387));var l=t.pendingProps;a=t.memoizedState,i=a.element,t2(e,t),Xs(t,l,null,n);var s=t.memoizedState;if(l=s.cache,Di(t,He,l),l!==a.cache&&$d(t,[He],n,!0),Ys(),l=s.element,a.isDehydrated)if(a={element:l,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Km(e,t,l,n);break e}else if(l!==i){i=Wt(Error(E(424)),t),Ds(i),t=Km(e,t,l,n);break e}else for(Ze=wn(t.stateNode.containerInfo.firstChild),at=t,W=!0,hn=null,jn=!0,n=X4(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Cs(),l===i){t=In(e,t,n);break e}Ke(e,t,l,n)}t=t.child}return t;case 26:return Vs(e,t),e===null?(n=tg(t.type,null,t.pendingProps,null))?t.memoizedState=n:W||(n=t.type,e=t.pendingProps,i=pu(Ei.current).createElement(n),i[Pe]=t,i[mt]=e,Ie(i,n,e),Ye(i),t.stateNode=i):t.memoizedState=tg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Hf(t),e===null&&W&&(i=t.stateNode=Pw(t.type,t.pendingProps,Ei.current),at=t,jn=!0,Ze=wn(i.firstChild)),i=t.pendingProps.children,e!==null||W?Ke(e,t,i,n):t.child=ha(t,null,i,n),Vs(e,t),t.child;case 5:return e===null&&W&&((a=i=Ze)&&(i=Sv(i,t.type,t.pendingProps,jn),i!==null?(t.stateNode=i,at=t,Ze=wn(i.firstChild),jn=!1,a=!0):a=!1),a||da(t)),Hf(t),a=t.type,l=t.pendingProps,s=e!==null?e.memoizedProps:null,i=l.children,z2(a,l)?i=null:s!==null&&z2(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=_d(e,t,Hy,null,null,n),sr._currentValue=a),Vs(e,t),Ke(e,t,i,n),t.child;case 6:return e===null&&W&&((e=n=Ze)&&(n=_v(n,t.pendingProps,jn),n!==null?(t.stateNode=n,at=t,Ze=null,e=!0):e=!1),e||da(t)),null;case 13:return Im(e,t,n);case 4:return po(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=ha(t,null,i,n):Ke(e,t,i,n),t.child;case 11:return Vm(e,t,t.type,t.pendingProps,n);case 7:return Ke(e,t,t.pendingProps,n),t.child;case 8:return Ke(e,t,t.pendingProps.children,n),t.child;case 12:return Ke(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,Di(t,t.type,i.value),Ke(e,t,i.children,n),t.child;case 9:return a=t.type._context,i=t.pendingProps.children,ba(t),a=$e(a),i=i(a),t.flags|=1,Ke(e,t,i,n),t.child;case 14:return Fm(e,t,t.type,t.pendingProps,n);case 15:return qm(e,t,t.type,t.pendingProps,n);case 19:return Jm(e,t,n);case 22:return Ym(e,t,n);case 24:return ba(t),i=$e(He),e===null?(a=Ed(),a===null&&(a=re,l=bd(),a.pooledCache=l,l.refCount++,l!==null&&(a.pooledCacheLanes|=n),a=l),t.memoizedState={parent:i,cache:a},e2(t),Di(t,He,a)):(e.lanes&n&&(t2(e,t),Xs(t,null,null,n),Ys()),a=e.memoizedState,l=t.memoizedState,a.parent!==i?(a={parent:i,cache:i},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Di(t,He,i)):(i=l.cache,Di(t,He,i),i!==a.cache&&$d(t,[He],n,!0))),Ke(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(E(156,t.tag))}var Jd=Tn(null),va=null,Wn=null;function Di(e,t,n){we(Jd,t._currentValue),t._currentValue=n}function Jn(e){e._currentValue=Jd.current,qe(Jd)}function Pd(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function $d(e,t,n,i){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var l=a.dependencies;if(l!==null){var s=a.child;l=l.firstContext;e:for(;l!==null;){var r=l;l=a;for(var o=0;o<t.length;o++)if(r.context===t[o]){l.lanes|=n,r=l.alternate,r!==null&&(r.lanes|=n),Pd(l.return,n,e),i||(s=null);break e}l=r.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(E(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Pd(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Fs(e,t,n,i){e=null;for(var a=t,l=!1;a!==null;){if(!l){if(a.flags&524288)l=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(E(387));if(s=s.memoizedProps,s!==null){var r=a.type;kt(a.pendingProps.value,s.value)||(e!==null?e.push(r):e=[r])}}else if(a===go.current){if(s=a.alternate,s===null)throw Error(E(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(sr):e=[sr])}a=a.return}e!==null&&$d(t,e,n,i),t.flags|=262144}function tu(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ba(e){va=e,Wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $e(e){return $m(va,e)}function nu(e,t){return va===null&&ba(e),$m(e,t)}function $m(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wn===null){if(e===null)throw Error(E(308));Wn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wn=Wn.next=t;return n}var ki=!1;function e2(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function t2(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Oi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Li(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,be&2){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,t=zo(e),L4(e,null,n),t}return Uo(e,i,t,n),zo(e)}function qs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194176)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,F3(e,n)}}function n2(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var a=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};l===null?a=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?a=l=t:l=l.next=t}else a=l=t;n={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:l,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var i2=!1;function Ys(){if(i2){var e=_l;if(e!==null)throw e}}function Xs(e,t,n,i){i2=!1;var a=e.updateQueue;ki=!1;var l=a.firstBaseUpdate,s=a.lastBaseUpdate,r=a.shared.pending;if(r!==null){a.shared.pending=null;var o=r,c=o.next;o.next=null,s===null?l=c:s.next=c,s=o;var d=e.alternate;d!==null&&(d=d.updateQueue,r=d.lastBaseUpdate,r!==s&&(r===null?d.firstBaseUpdate=c:r.next=c,d.lastBaseUpdate=o))}if(l!==null){var h=a.baseState;s=0,d=c=o=null,r=l;do{var f=r.lane&-536870913,w=f!==r.lane;if(w?(Q&f)===f:(i&f)===f){f!==0&&f===Sl&&(i2=!0),d!==null&&(d=d.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var v=e,x=r;f=t;var _=n;switch(x.tag){case 1:if(v=x.payload,typeof v=="function"){h=v.call(_,h,f);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,f=typeof v=="function"?v.call(_,h,f):v,f==null)break e;h=ce({},h,f);break e;case 2:ki=!0}}f=r.callback,f!==null&&(e.flags|=64,w&&(e.flags|=8192),w=a.callbacks,w===null?a.callbacks=[f]:w.push(f))}else w={lane:f,tag:r.tag,payload:r.payload,callback:r.callback,next:null},d===null?(c=d=w,o=h):d=d.next=w,s|=f;if(r=r.next,r===null){if(r=a.shared.pending,r===null)break;w=r,r=w.next,w.next=null,a.lastBaseUpdate=w,a.shared.pending=null}}while(!0);d===null&&(o=h),a.baseState=o,a.firstBaseUpdate=c,a.lastBaseUpdate=d,l===null&&(a.shared.lanes=0),Gi|=s,e.lanes=s,e.memoizedState=h}}function ew(e,t){if(typeof e!="function")throw Error(E(191,e));e.call(t)}function tw(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ew(n[e],t)}function Qs(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var a=i.next;n=a;do{if((n.tag&e)===e){i=void 0;var l=n.create,s=n.inst;i=l(),s.destroy=i}n=n.next}while(n!==a)}}catch(r){ie(t,t.return,r)}}function Ui(e,t,n){try{var i=t.updateQueue,a=i!==null?i.lastEffect:null;if(a!==null){var l=a.next;i=l;do{if((i.tag&e)===e){var s=i.inst,r=s.destroy;if(r!==void 0){s.destroy=void 0,a=t;var o=n;try{r()}catch(c){ie(a,o,c)}}}i=i.next}while(i!==l)}}catch(c){ie(t,t.return,c)}}function nw(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{tw(t,n)}catch(i){ie(e,e.return,i)}}}function iw(e,t,n){n.props=ya(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){ie(e,t,i)}}function xa(e,t){try{var n=e.ref;if(n!==null){var i=e.stateNode;switch(e.tag){case 26:case 27:case 5:var a=i;break;default:a=i}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(l){ie(e,t,l)}}function Ot(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(a){ie(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){ie(e,t,a)}else n.current=null}function aw(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(a){ie(e,e.return,a)}}function lw(e,t,n){try{var i=e.stateNode;yv(i,e.type,n,t),i[mt]=t}catch(a){ie(e,e.return,a)}}function sw(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27||e.tag===4}function a2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==27&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function l2(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gu));else if(i!==4&&i!==27&&(e=e.child,e!==null))for(l2(e,t,n),e=e.sibling;e!==null;)l2(e,t,n),e=e.sibling}function iu(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&i!==27&&(e=e.child,e!==null))for(iu(e,t,n),e=e.sibling;e!==null;)iu(e,t,n),e=e.sibling}var Pn=!1,_e=!1,s2=!1,rw=typeof WeakSet=="function"?WeakSet:Set,Qe=null,ow=!1;function Ky(e,t){if(e=e.containerInfo,L2=Su,e=T4(e),od(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,l=i.focusNode;i=i.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,r=-1,o=-1,c=0,d=0,h=e,f=null;t:for(;;){for(var w;h!==n||a!==0&&h.nodeType!==3||(r=s+a),h!==l||i!==0&&h.nodeType!==3||(o=s+i),h.nodeType===3&&(s+=h.nodeValue.length),(w=h.firstChild)!==null;)f=h,h=w;for(;;){if(h===e)break t;if(f===n&&++c===a&&(r=s),f===l&&++d===i&&(o=s),(w=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=w}n=r===-1||o===-1?null:{start:r,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(U2={focusedElem:e,selectionRange:n},Su=!1,Qe=t;Qe!==null;)if(t=Qe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qe=e;else for(;Qe!==null;){switch(t=Qe,l=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&l!==null){e=void 0,n=t,a=l.memoizedProps,l=l.memoizedState,i=n.stateNode;try{var v=ya(n.type,a,n.elementType===n.type);e=i.getSnapshotBeforeUpdate(v,l),i.__reactInternalSnapshotBeforeUpdate=e}catch(x){ie(n,n.return,x)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)G2(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":G2(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(E(163))}if(e=t.sibling,e!==null){e.return=t.return,Qe=e;break}Qe=t.return}return v=ow,ow=!1,v}function uw(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:ei(e,n),i&4&&Qs(5,n);break;case 1:if(ei(e,n),i&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){ie(n,n.return,r)}else{var a=ya(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){ie(n,n.return,r)}}i&64&&nw(n),i&512&&xa(n,n.return);break;case 3:if(ei(e,n),i&64&&(i=n.updateQueue,i!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{tw(i,e)}catch(r){ie(n,n.return,r)}}break;case 26:ei(e,n),i&512&&xa(n,n.return);break;case 27:case 5:ei(e,n),t===null&&i&4&&aw(n),i&512&&xa(n,n.return);break;case 12:ei(e,n);break;case 13:ei(e,n),i&4&&dw(e,n);break;case 22:if(a=n.memoizedState!==null||Pn,!a){t=t!==null&&t.memoizedState!==null||_e;var l=Pn,s=_e;Pn=a,(_e=t)&&!s?zi(e,n,(n.subtreeFlags&8772)!==0):ei(e,n),Pn=l,_e=s}i&512&&(n.memoizedProps.mode==="manual"?xa(n,n.return):Ot(n,n.return));break;default:ei(e,n)}}function cw(e){var t=e.alternate;t!==null&&(e.alternate=null,cw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Qf(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ze=null,Lt=!1;function $n(e,t,n){for(n=n.child;n!==null;)fw(e,t,n),n=n.sibling}function fw(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(ws,n)}catch{}switch(n.tag){case 26:_e||Ot(n,t),$n(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:_e||Ot(n,t);var i=ze,a=Lt;for(ze=n.stateNode,$n(e,t,n),n=n.stateNode,t=n.attributes;t.length;)n.removeAttributeNode(t[0]);Qf(n),ze=i,Lt=a;break;case 5:_e||Ot(n,t);case 6:a=ze;var l=Lt;if(ze=null,$n(e,t,n),ze=a,Lt=l,ze!==null)if(Lt)try{e=ze,i=n.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)}catch(s){ie(n,t,s)}else try{ze.removeChild(n.stateNode)}catch(s){ie(n,t,s)}break;case 18:ze!==null&&(Lt?(t=ze,n=n.stateNode,t.nodeType===8?B2(t.parentNode,n):t.nodeType===1&&B2(t,n),cr(t)):B2(ze,n.stateNode));break;case 4:i=ze,a=Lt,ze=n.stateNode.containerInfo,Lt=!0,$n(e,t,n),ze=i,Lt=a;break;case 0:case 11:case 14:case 15:_e||Ui(2,n,t),_e||Ui(4,n,t),$n(e,t,n);break;case 1:_e||(Ot(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&iw(n,t,i)),$n(e,t,n);break;case 21:$n(e,t,n);break;case 22:_e||Ot(n,t),_e=(i=_e)||n.memoizedState!==null,$n(e,t,n),_e=i;break;default:$n(e,t,n)}}function dw(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{cr(e)}catch(n){ie(t,t.return,n)}}function Iy(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rw),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rw),t;default:throw Error(E(435,e.tag))}}function r2(e,t){var n=Iy(e);t.forEach(function(i){var a=ov.bind(null,e,i);n.has(i)||(n.add(i),i.then(a,a))})}function en(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i],l=e,s=t,r=s;e:for(;r!==null;){switch(r.tag){case 27:case 5:ze=r.stateNode,Lt=!1;break e;case 3:ze=r.stateNode.containerInfo,Lt=!0;break e;case 4:ze=r.stateNode.containerInfo,Lt=!0;break e}r=r.return}if(ze===null)throw Error(E(160));fw(l,s,a),ze=null,Lt=!1,l=a.alternate,l!==null&&(l.return=null),a.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)hw(t,e),t=t.sibling}var mn=null;function hw(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:en(t,e),tn(e),i&4&&(Ui(3,e,e.return),Qs(3,e),Ui(5,e,e.return));break;case 1:en(t,e),tn(e),i&512&&(_e||n===null||Ot(n,n.return)),i&64&&Pn&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var a=mn;if(en(t,e),tn(e),i&512&&(_e||n===null||Ot(n,n.return)),i&4){var l=n!==null?n.memoizedState:null;if(i=e.memoizedState,n===null)if(i===null)if(e.stateNode===null){e:{i=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(i){case"title":l=a.getElementsByTagName("title")[0],(!l||l[ys]||l[Pe]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=a.createElement(i),a.head.insertBefore(l,a.querySelector("head > title"))),Ie(l,i,n),l[Pe]=e,Ye(l),i=l;break e;case"link":var s=ag("link","href",a).get(i+(n.href||""));if(s){for(var r=0;r<s.length;r++)if(l=s[r],l.getAttribute("href")===(n.href==null?null:n.href)&&l.getAttribute("rel")===(n.rel==null?null:n.rel)&&l.getAttribute("title")===(n.title==null?null:n.title)&&l.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(r,1);break t}}l=a.createElement(i),Ie(l,i,n),a.head.appendChild(l);break;case"meta":if(s=ag("meta","content",a).get(i+(n.content||""))){for(r=0;r<s.length;r++)if(l=s[r],l.getAttribute("content")===(n.content==null?null:""+n.content)&&l.getAttribute("name")===(n.name==null?null:n.name)&&l.getAttribute("property")===(n.property==null?null:n.property)&&l.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&l.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(r,1);break t}}l=a.createElement(i),Ie(l,i,n),a.head.appendChild(l);break;default:throw Error(E(468,i))}l[Pe]=e,Ye(l),i=l}e.stateNode=i}else lg(a,e.type,e.stateNode);else e.stateNode=ig(a,i,e.memoizedProps);else l!==i?(l===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):l.count--,i===null?lg(a,e.type,e.stateNode):ig(a,i,e.memoizedProps)):i===null&&e.stateNode!==null&&lw(e,e.memoizedProps,n.memoizedProps)}break;case 27:if(i&4&&e.alternate===null){a=e.stateNode,l=e.memoizedProps;try{for(var o=a.firstChild;o;){var c=o.nextSibling,d=o.nodeName;o[ys]||d==="HEAD"||d==="BODY"||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=c}for(var h=e.type,f=a.attributes;f.length;)a.removeAttributeNode(f[0]);Ie(a,h,l),a[Pe]=e,a[mt]=l}catch(v){ie(e,e.return,v)}}case 5:if(en(t,e),tn(e),i&512&&(_e||n===null||Ot(n,n.return)),e.flags&32){a=e.stateNode;try{fl(a,"")}catch(v){ie(e,e.return,v)}}i&4&&e.stateNode!=null&&(a=e.memoizedProps,lw(e,a,n!==null?n.memoizedProps:a)),i&1024&&(s2=!0);break;case 6:if(en(t,e),tn(e),i&4){if(e.stateNode===null)throw Error(E(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(v){ie(e,e.return,v)}}break;case 3:if(bu=null,a=mn,mn=yu(t.containerInfo),en(t,e),mn=a,tn(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{cr(t.containerInfo)}catch(v){ie(e,e.return,v)}s2&&(s2=!1,mw(e));break;case 4:i=mn,mn=yu(e.stateNode.containerInfo),en(t,e),tn(e),mn=i;break;case 12:en(t,e),tn(e);break;case 13:en(t,e),tn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(g2=Nn()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,r2(e,i)));break;case 22:if(i&512&&(_e||n===null||Ot(n,n.return)),o=e.memoizedState!==null,c=n!==null&&n.memoizedState!==null,d=Pn,h=_e,Pn=d||o,_e=h||c,en(t,e),_e=h,Pn=d,tn(e),t=e.stateNode,t._current=e,t._visibility&=-3,t._visibility|=t._pendingVisibility&2,i&8192&&(t._visibility=o?t._visibility&-2:t._visibility|1,o&&(t=Pn||_e,n===null||c||t||jl(e)),e.memoizedProps===null||e.memoizedProps.mode!=="manual"))e:for(n=null,t=e;;){if(t.tag===5||t.tag===26||t.tag===27){if(n===null){c=n=t;try{if(a=c.stateNode,o)l=a.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{s=c.stateNode,r=c.memoizedProps.style;var w=r!=null&&r.hasOwnProperty("display")?r.display:null;s.style.display=w==null||typeof w=="boolean"?"":(""+w).trim()}}catch(v){ie(c,c.return,v)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=o?"":c.memoizedProps}catch(v){ie(c,c.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,r2(e,n))));break;case 19:en(t,e),tn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,r2(e,i)));break;case 21:break;default:en(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{if(e.tag!==27){e:{for(var n=e.return;n!==null;){if(sw(n)){var i=n;break e}n=n.return}throw Error(E(160))}switch(i.tag){case 27:var a=i.stateNode,l=a2(e);iu(e,l,a);break;case 5:var s=i.stateNode;i.flags&32&&(fl(s,""),i.flags&=-33);var r=a2(e);iu(e,r,s);break;case 3:case 4:var o=i.stateNode.containerInfo,c=a2(e);l2(e,c,o);break;default:throw Error(E(161))}}}catch(d){ie(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function mw(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;mw(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ei(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)uw(e,t.alternate,t),t=t.sibling}function jl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ui(4,t,t.return),jl(t);break;case 1:Ot(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&iw(t,t.return,n),jl(t);break;case 26:case 27:case 5:Ot(t,t.return),jl(t);break;case 22:Ot(t,t.return),t.memoizedState===null&&jl(t);break;default:jl(t)}e=e.sibling}}function zi(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,a=e,l=t,s=l.flags;switch(l.tag){case 0:case 11:case 15:zi(a,l,n),Qs(4,l);break;case 1:if(zi(a,l,n),i=l,a=i.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(c){ie(i,i.return,c)}if(i=l,a=i.updateQueue,a!==null){var r=i.stateNode;try{var o=a.shared.hiddenCallbacks;if(o!==null)for(a.shared.hiddenCallbacks=null,a=0;a<o.length;a++)ew(o[a],r)}catch(c){ie(i,i.return,c)}}n&&s&64&&nw(l),xa(l,l.return);break;case 26:case 27:case 5:zi(a,l,n),n&&i===null&&s&4&&aw(l),xa(l,l.return);break;case 12:zi(a,l,n);break;case 13:zi(a,l,n),n&&s&4&&dw(a,l);break;case 22:l.memoizedState===null&&zi(a,l,n),xa(l,l.return);break;default:zi(a,l,n)}t=t.sibling}}function o2(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&zs(n))}function u2(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zs(e))}function Ri(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ww(e,t,n,i),t=t.sibling}function ww(e,t,n,i){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Ri(e,t,n,i),a&2048&&Qs(9,t);break;case 3:Ri(e,t,n,i),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zs(e)));break;case 12:if(a&2048){Ri(e,t,n,i),e=t.stateNode;try{var l=t.memoizedProps,s=l.id,r=l.onPostCommit;typeof r=="function"&&r(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){ie(t,t.return,o)}}else Ri(e,t,n,i);break;case 23:break;case 22:l=t.stateNode,t.memoizedState!==null?l._visibility&4?Ri(e,t,n,i):Zs(e,t):l._visibility&4?Ri(e,t,n,i):(l._visibility|=4,Ml(e,t,n,i,(t.subtreeFlags&10256)!==0)),a&2048&&o2(t.alternate,t);break;case 24:Ri(e,t,n,i),a&2048&&u2(t.alternate,t);break;default:Ri(e,t,n,i)}}function Ml(e,t,n,i,a){for(a=a&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var l=e,s=t,r=n,o=i,c=s.flags;switch(s.tag){case 0:case 11:case 15:Ml(l,s,r,o,a),Qs(8,s);break;case 23:break;case 22:var d=s.stateNode;s.memoizedState!==null?d._visibility&4?Ml(l,s,r,o,a):Zs(l,s):(d._visibility|=4,Ml(l,s,r,o,a)),a&&c&2048&&o2(s.alternate,s);break;case 24:Ml(l,s,r,o,a),a&&c&2048&&u2(s.alternate,s);break;default:Ml(l,s,r,o,a)}t=t.sibling}}function Zs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,i=t,a=i.flags;switch(i.tag){case 22:Zs(n,i),a&2048&&o2(i.alternate,i);break;case 24:Zs(n,i),a&2048&&u2(i.alternate,i);break;default:Zs(n,i)}t=t.sibling}}var Ks=8192;function Cl(e){if(e.subtreeFlags&Ks)for(e=e.child;e!==null;)gw(e),e=e.sibling}function gw(e){switch(e.tag){case 26:Cl(e),e.flags&Ks&&e.memoizedState!==null&&Rv(mn,e.memoizedState,e.memoizedProps);break;case 5:Cl(e);break;case 3:case 4:var t=mn;mn=yu(e.stateNode.containerInfo),Cl(e),mn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Ks,Ks=16777216,Cl(e),Ks=t):Cl(e));break;default:Cl(e)}}function pw(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Is(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Qe=i,vw(i,e)}pw(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)yw(e),e=e.sibling}function yw(e){switch(e.tag){case 0:case 11:case 15:Is(e),e.flags&2048&&Ui(9,e,e.return);break;case 3:Is(e);break;case 12:Is(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&4&&(e.return===null||e.return.tag!==13)?(t._visibility&=-5,au(e)):Is(e);break;default:Is(e)}}function au(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Qe=i,vw(i,e)}pw(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ui(8,t,t.return),au(t);break;case 22:n=t.stateNode,n._visibility&4&&(n._visibility&=-5,au(t));break;default:au(t)}e=e.sibling}}function vw(e,t){for(;Qe!==null;){var n=Qe;switch(n.tag){case 0:case 11:case 15:Ui(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:zs(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,Qe=i;else e:for(n=e;Qe!==null;){i=Qe;var a=i.sibling,l=i.return;if(cw(i),i===n){Qe=null;break e}if(a!==null){a.return=l,Qe=a;break e}Qe=l}}}function Wy(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,t,n,i){return new Wy(e,t,n,i)}function c2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bi(e,t){var n=e.alternate;return n===null?(n=nn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&31457280,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function bw(e,t){e.flags&=31457282;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function lu(e,t,n,i,a,l){var s=0;if(i=e,typeof e=="function")c2(e)&&(s=1);else if(typeof e=="string")s=Uv(e,n,An.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case nl:return Ea(n.children,a,l,t);case N3:s=8,a|=24;break;case Cf:return e=nn(12,n,t,a|2),e.elementType=Cf,e.lanes=l,e;case kf:return e=nn(13,n,t,a),e.elementType=kf,e.lanes=l,e;case Of:return e=nn(19,n,t,a),e.elementType=Of,e.lanes=l,e;case M3:return xw(n,a,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x6:case Fn:s=10;break e;case j3:s=9;break e;case Df:s=11;break e;case Lf:s=14;break e;case xi:s=16,i=null;break e}s=29,n=Error(E(130,e===null?"null":typeof e,"")),i=null}return t=nn(s,n,t,a),t.elementType=e,t.type=i,t.lanes=l,t}function Ea(e,t,n,i){return e=nn(7,e,i,t),e.lanes=n,e}function xw(e,t,n,i){e=nn(22,e,i,t),e.elementType=M3,e.lanes=n;var a={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var l=a._current;if(l===null)throw Error(E(456));if(!(a._pendingVisibility&2)){var s=Ai(l,2);s!==null&&(a._pendingVisibility|=2,lt(s,l,2))}},attach:function(){var l=a._current;if(l===null)throw Error(E(456));if(a._pendingVisibility&2){var s=Ai(l,2);s!==null&&(a._pendingVisibility&=-3,lt(s,l,2))}}};return e.stateNode=a,e}function f2(e,t,n){return e=nn(6,e,null,t),e.lanes=n,e}function d2(e,t,n){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ti(e){e.flags|=4}function Ew(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!sg(t)){if(t=$t.current,t!==null&&((Q&4194176)===Q?Mn!==null:(Q&62914560)!==Q&&!(Q&536870912)||t!==Mn))throw Os=pd,G4;e.flags|=8192}}function su(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?H3():536870912,e.lanes|=t,kl|=t)}function Ws(e,t){if(!W)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags&31457280,i|=a.flags&31457280,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Jy(e,t,n){var i=t.pendingProps;switch(wd(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ve(t),null;case 1:return ve(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Jn(He),ll(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ms(t)?ti(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,hn!==null&&(b2(hn),hn=null))),ve(t),null;case 26:return n=t.memoizedState,e===null?(ti(t),n!==null?(ve(t),Ew(t,n)):(ve(t),t.flags&=-16777217)):n?n!==e.memoizedState?(ti(t),ve(t),Ew(t,n)):(ve(t),t.flags&=-16777217):(e.memoizedProps!==i&&ti(t),ve(t),t.flags&=-16777217),null;case 27:yo(t),n=Ei.current;var a=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ti(t);else{if(!i){if(t.stateNode===null)throw Error(E(166));return ve(t),null}e=An.current,Ms(t)?R4(t):(e=Pw(a,i,n),t.stateNode=e,ti(t))}return ve(t),null;case 5:if(yo(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ti(t);else{if(!i){if(t.stateNode===null)throw Error(E(166));return ve(t),null}if(e=An.current,Ms(t))R4(t);else{switch(a=pu(Ei.current),e){case 1:e=a.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=a.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=a.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=a.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof i.is=="string"?a.createElement("select",{is:i.is}):a.createElement("select"),i.multiple?e.multiple=!0:i.size&&(e.size=i.size);break;default:e=typeof i.is=="string"?a.createElement(n,{is:i.is}):a.createElement(n)}}e[Pe]=t,e[mt]=i;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=e;e:switch(Ie(e,n,i),n){case"button":case"input":case"select":case"textarea":e=!!i.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ti(t)}}return ve(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&ti(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(E(166));if(e=Ei.current,Ms(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,a=at,a!==null)switch(a.tag){case 27:case 5:i=a.memoizedProps}e[Pe]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||Qw(e.nodeValue,n)),e||da(t)}else e=pu(e).createTextNode(i),e[Pe]=t,t.stateNode=e}return ve(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ms(t),i!==null&&i.dehydrated!==null){if(e===null){if(!a)throw Error(E(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(E(317));a[Pe]=t}else Cs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ve(t),a=!1}else hn!==null&&(b2(hn),hn=null),a=!0;if(!a)return t.flags&256?(Zn(t),t):(Zn(t),null)}if(Zn(t),t.flags&128)return t.lanes=n,t;if(n=i!==null,e=e!==null&&e.memoizedState!==null,n){i=t.child,a=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(a=i.alternate.memoizedState.cachePool.pool);var l=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),l!==a&&(i.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),su(t,t.updateQueue),ve(t),null;case 4:return ll(),e===null&&D2(t.stateNode.containerInfo),ve(t),null;case 10:return Jn(t.type),ve(t),null;case 19:if(qe(Ge),a=t.memoizedState,a===null)return ve(t),null;if(i=(t.flags&128)!==0,l=a.rendering,l===null)if(i)Ws(a,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=qo(e),l!==null){for(t.flags|=128,Ws(a,!1),e=l.updateQueue,t.updateQueue=e,su(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)bw(n,e),n=n.sibling;return we(Ge,Ge.current&1|2),t.child}e=e.sibling}a.tail!==null&&Nn()>ru&&(t.flags|=128,i=!0,Ws(a,!1),t.lanes=4194304)}else{if(!i)if(e=qo(l),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,su(t,e),Ws(a,!0),a.tail===null&&a.tailMode==="hidden"&&!l.alternate&&!W)return ve(t),null}else 2*Nn()-a.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,i=!0,Ws(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(e=a.last,e!==null?e.sibling=l:t.child=l,a.last=l)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Nn(),t.sibling=null,e=Ge.current,we(Ge,i?e&1|2:e&1),t):(ve(t),null);case 22:case 23:return Zn(t),vd(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?n&536870912&&!(t.flags&128)&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),n=t.updateQueue,n!==null&&su(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&qe(ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Jn(He),ve(t),null;case 25:return null}throw Error(E(156,t.tag))}function Py(e,t){switch(wd(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jn(He),ll(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return yo(t),null;case 13:if(Zn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qe(Ge),null;case 4:return ll(),null;case 10:return Jn(t.type),null;case 22:case 23:return Zn(t),vd(),e!==null&&qe(ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jn(He),null;case 25:return null;default:return null}}function Sw(e,t){switch(wd(t),t.tag){case 3:Jn(He),ll();break;case 26:case 27:case 5:yo(t);break;case 4:ll();break;case 13:Zn(t);break;case 19:qe(Ge);break;case 10:Jn(t.type);break;case 22:case 23:Zn(t),vd(),e!==null&&qe(ma);break;case 24:Jn(He)}}var $y={getCacheForType:function(e){var t=$e(He),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},ev=typeof WeakMap=="function"?WeakMap:Map,be=0,re=null,F=null,Q=0,oe=0,Ut=null,ni=!1,Dl=!1,h2=!1,ii=0,Te=0,Gi=0,Sa=0,m2=0,an=0,kl=0,Js=null,Dn=null,w2=!1,g2=0,ru=1/0,ou=null,Hi=null,uu=!1,_a=null,Ps=0,p2=0,y2=null,$s=0,v2=null;function zt(){if(be&2&&Q!==0)return Q&-Q;if(G.T!==null){var e=Sl;return e!==0?e:N2()}return Y3()}function _w(){an===0&&(an=!(Q&536870912)||W?G3():536870912);var e=$t.current;return e!==null&&(e.flags|=32),an}function lt(e,t,n){(e===re&&oe===2||e.cancelPendingCommit!==null)&&(Ol(e,0),ai(e,Q,an,!1)),ps(e,n),(!(be&2)||e!==re)&&(e===re&&(!(be&2)&&(Sa|=n),Te===4&&ai(e,Q,an,!1)),kn(e))}function Tw(e,t,n){if(be&6)throw Error(E(327));var i=!n&&(t&60)===0&&(t&e.expiredLanes)===0||gs(e,t),a=i?iv(e,t):S2(e,t,!0),l=i;do{if(a===0){Dl&&!i&&ai(e,t,0,!1);break}else if(a===6)ai(e,t,0,!ni);else{if(n=e.current.alternate,l&&!tv(n)){a=S2(e,t,!1),l=!1;continue}if(a===2){if(l=t,e.errorRecoveryDisabledLanes&l)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var r=e;a=Js;var o=r.current.memoizedState.isDehydrated;if(o&&(Ol(r,s).flags|=256),s=S2(r,s,!1),s!==2){if(h2&&!o){r.errorRecoveryDisabledLanes|=l,Sa|=l,a=4;break e}l=Dn,Dn=a,l!==null&&b2(l)}a=s}if(l=!1,a!==2)continue}}if(a===1){Ol(e,0),ai(e,t,0,!0);break}e:{switch(i=e,a){case 0:case 1:throw Error(E(345));case 4:if((t&4194176)===t){ai(i,t,an,!ni);break e}break;case 2:Dn=null;break;case 3:case 5:break;default:throw Error(E(329))}if(i.finishedWork=n,i.finishedLanes=t,(t&62914560)===t&&(l=g2+300-Nn(),10<l)){if(ai(i,t,an,!ni),Eo(i,0)!==0)break e;i.timeoutHandle=Iw(Aw.bind(null,i,n,Dn,ou,w2,t,an,Sa,kl,ni,2,-0,0),l);break e}Aw(i,n,Dn,ou,w2,t,an,Sa,kl,ni,0,-0,0)}}break}while(!0);kn(e)}function b2(e){Dn===null?Dn=e:Dn.push.apply(Dn,e)}function Aw(e,t,n,i,a,l,s,r,o,c,d,h,f){var w=t.subtreeFlags;if((w&8192||(w&16785408)===16785408)&&(lr={stylesheets:null,count:0,unsuspend:zv},gw(t),t=Bv(),t!==null)){e.cancelPendingCommit=t(Ow.bind(null,e,n,i,a,s,r,o,1,h,f)),ai(e,l,s,!c);return}Ow(e,n,i,a,s,r,o,d,h,f)}function tv(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var a=n[i],l=a.getSnapshot;a=a.value;try{if(!kt(l(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ai(e,t,n,i){t&=~m2,t&=~Sa,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var a=t;0<a;){var l=31-Dt(a),s=1<<l;i[l]=-1,a&=~s}n!==0&&V3(e,n,t)}function cu(){return be&6?!0:(er(0),!1)}function x2(){if(F!==null){if(oe===0)var e=F.return;else e=F,Wn=va=null,Nd(e),xl=null,Ls=0,e=F;for(;e!==null;)Sw(e.alternate,e),e=e.return;F=null}}function Ol(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,bv(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),x2(),re=e,F=n=Bi(e.current,null),Q=t,oe=0,Ut=null,ni=!1,Dl=gs(e,t),h2=!1,kl=an=m2=Sa=Gi=Te=0,Dn=Js=null,w2=!1,t&8&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var a=31-Dt(i),l=1<<a;t|=e[a],i&=~l}return ii=t,Lo(),n}function Nw(e,t){V=null,G.H=Cn,t===ks?(t=F4(),oe=3):t===G4?(t=F4(),oe=4):oe=t===Hm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,F===null&&(Te=1,eu(e,Wt(t,e.current)))}function jw(){var e=G.H;return G.H=Cn,e===null?Cn:e}function Mw(){var e=G.A;return G.A=$y,e}function E2(){Te=4,ni||(Q&4194176)!==Q&&$t.current!==null||(Dl=!0),!(Gi&134217727)&&!(Sa&134217727)||re===null||ai(re,Q,an,!1)}function S2(e,t,n){var i=be;be|=2;var a=jw(),l=Mw();(re!==e||Q!==t)&&(ou=null,Ol(e,t)),t=!1;var s=Te;e:do try{if(oe!==0&&F!==null){var r=F,o=Ut;switch(oe){case 8:x2(),s=6;break e;case 3:case 2:case 6:$t.current===null&&(t=!0);var c=oe;if(oe=0,Ut=null,Ll(e,r,o,c),n&&Dl){s=0;break e}break;default:c=oe,oe=0,Ut=null,Ll(e,r,o,c)}}nv(),s=Te;break}catch(d){Nw(e,d)}while(!0);return t&&e.shellSuspendCounter++,Wn=va=null,be=i,G.H=a,G.A=l,F===null&&(re=null,Q=0,Lo()),s}function nv(){for(;F!==null;)Cw(F)}function iv(e,t){var n=be;be|=2;var i=jw(),a=Mw();re!==e||Q!==t?(ou=null,ru=Nn()+500,Ol(e,t)):Dl=gs(e,t);e:do try{if(oe!==0&&F!==null){t=F;var l=Ut;t:switch(oe){case 1:oe=0,Ut=null,Ll(e,t,l,1);break;case 2:if(H4(l)){oe=0,Ut=null,Dw(t);break}t=function(){oe===2&&re===e&&(oe=7),kn(e)},l.then(t,t);break e;case 3:oe=7;break e;case 4:oe=5;break e;case 7:H4(l)?(oe=0,Ut=null,Dw(t)):(oe=0,Ut=null,Ll(e,t,l,7));break;case 5:var s=null;switch(F.tag){case 26:s=F.memoizedState;case 5:case 27:var r=F;if(!s||sg(s)){oe=0,Ut=null;var o=r.sibling;if(o!==null)F=o;else{var c=r.return;c!==null?(F=c,fu(c)):F=null}break t}}oe=0,Ut=null,Ll(e,t,l,5);break;case 6:oe=0,Ut=null,Ll(e,t,l,6);break;case 8:x2(),Te=6;break e;default:throw Error(E(462))}}av();break}catch(d){Nw(e,d)}while(!0);return Wn=va=null,G.H=i,G.A=a,be=n,F!==null?0:(re=null,Q=0,Lo(),Te)}function av(){for(;F!==null&&!A6();)Cw(F)}function Cw(e){var t=Pm(e.alternate,e,ii);e.memoizedProps=e.pendingProps,t===null?fu(e):F=t}function Dw(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Qm(n,t,t.pendingProps,t.type,void 0,Q);break;case 11:t=Qm(n,t,t.pendingProps,t.type.render,t.ref,Q);break;case 5:Nd(t);default:Sw(n,t),t=F=bw(t,ii),t=Pm(n,t,ii)}e.memoizedProps=e.pendingProps,t===null?fu(e):F=t}function Ll(e,t,n,i){Wn=va=null,Nd(t),xl=null,Ls=0;var a=t.return;try{if(Qy(e,a,t,n,Q)){Te=1,eu(e,Wt(n,e.current)),F=null;return}}catch(l){if(a!==null)throw F=a,l;Te=1,eu(e,Wt(n,e.current)),F=null;return}t.flags&32768?(W||i===1?e=!0:Dl||Q&536870912?e=!1:(ni=e=!0,(i===2||i===3||i===6)&&(i=$t.current,i!==null&&i.tag===13&&(i.flags|=16384))),kw(t,e)):fu(t)}function fu(e){var t=e;do{if(t.flags&32768){kw(t,ni);return}e=t.return;var n=Jy(t.alternate,t,ii);if(n!==null){F=n;return}if(t=t.sibling,t!==null){F=t;return}F=t=e}while(t!==null);Te===0&&(Te=5)}function kw(e,t){do{var n=Py(e.alternate,e);if(n!==null){n.flags&=32767,F=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){F=e;return}F=e=n}while(e!==null);Te=6,F=null}function Ow(e,t,n,i,a,l,s,r,o,c){var d=G.T,h=fe.p;try{fe.p=2,G.T=null,lv(e,t,n,i,h,a,l,s,r,o,c)}finally{G.T=d,fe.p=h}}function lv(e,t,n,i,a,l,s,r){do Ul();while(_a!==null);if(be&6)throw Error(E(327));var o=e.finishedWork;if(i=e.finishedLanes,o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(E(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var c=o.lanes|o.childLanes;if(c|=dd,R6(e,i,c,l,s,r),e===re&&(F=re=null,Q=0),!(o.subtreeFlags&10256)&&!(o.flags&10256)||uu||(uu=!0,p2=c,y2=n,uv(vo,function(){return Ul(),null})),n=(o.flags&15990)!==0,o.subtreeFlags&15990||n?(n=G.T,G.T=null,l=fe.p,fe.p=2,s=be,be|=4,Ky(e,o),hw(o,e),My(U2,e.containerInfo),Su=!!L2,U2=L2=null,e.current=o,uw(e,o.alternate,o),N6(),be=s,fe.p=l,G.T=n):e.current=o,uu?(uu=!1,_a=e,Ps=i):Lw(e,c),c=e.pendingLanes,c===0&&(Hi=null),k6(o.stateNode),kn(e),t!==null)for(a=e.onRecoverableError,o=0;o<t.length;o++)c=t[o],a(c.value,{componentStack:c.stack});return Ps&3&&Ul(),c=e.pendingLanes,i&4194218&&c&42?e===v2?$s++:($s=0,v2=e):$s=0,er(0),null}function Lw(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,zs(t)))}function Ul(){if(_a!==null){var e=_a,t=p2;p2=0;var n=q3(Ps),i=G.T,a=fe.p;try{if(fe.p=32>n?32:n,G.T=null,_a===null)var l=!1;else{n=y2,y2=null;var s=_a,r=Ps;if(_a=null,Ps=0,be&6)throw Error(E(331));var o=be;if(be|=4,yw(s.current),ww(s,s.current,r,n),be=o,er(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(ws,s)}catch{}l=!0}return l}finally{fe.p=a,G.T=i,Lw(e,t)}}return!1}function Uw(e,t,n){t=Wt(n,t),t=Vd(e.stateNode,t,2),e=Li(e,t,2),e!==null&&(ps(e,2),kn(e))}function ie(e,t,n){if(e.tag===3)Uw(e,e,n);else for(;t!==null;){if(t.tag===3){Uw(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Hi===null||!Hi.has(i))){e=Wt(n,e),n=Bm(2),i=Li(t,n,2),i!==null&&(Gm(n,i,t,e),ps(i,2),kn(i));break}}t=t.return}}function _2(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new ev;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(n)||(h2=!0,a.add(n),e=sv.bind(null,e,t,n),t.then(e,e))}function sv(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,re===e&&(Q&n)===n&&(Te===4||Te===3&&(Q&62914560)===Q&&300>Nn()-g2?!(be&2)&&Ol(e,0):m2|=n,kl===Q&&(kl=0)),kn(e)}function zw(e,t){t===0&&(t=H3()),e=Ai(e,t),e!==null&&(ps(e,t),kn(e))}function rv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zw(e,n)}function ov(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(E(314))}i!==null&&i.delete(t),zw(e,n)}function uv(e,t){return Ff(e,t)}var du=null,zl=null,T2=!1,hu=!1,A2=!1,Ta=0;function kn(e){e!==zl&&e.next===null&&(zl===null?du=zl=e:zl=zl.next=e),hu=!0,T2||(T2=!0,fv(cv))}function er(e,t){if(!A2&&hu){A2=!0;do for(var n=!1,i=du;i!==null;){if(e!==0){var a=i.pendingLanes;if(a===0)var l=0;else{var s=i.suspendedLanes,r=i.pingedLanes;l=(1<<31-Dt(42|e)+1)-1,l&=a&~(s&~r),l=l&201326677?l&201326677|1:l?l|2:0}l!==0&&(n=!0,Gw(i,l))}else l=Q,l=Eo(i,i===re?l:0),!(l&3)||gs(i,l)||(n=!0,Gw(i,l));i=i.next}while(n);A2=!1}}function cv(){hu=T2=!1;var e=0;Ta!==0&&(vv()&&(e=Ta),Ta=0);for(var t=Nn(),n=null,i=du;i!==null;){var a=i.next,l=Rw(i,t);l===0?(i.next=null,n===null?du=a:n.next=a,a===null&&(zl=n)):(n=i,(e!==0||l&3)&&(hu=!0)),i=a}er(e)}function Rw(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,l=e.pendingLanes&-62914561;0<l;){var s=31-Dt(l),r=1<<s,o=a[s];o===-1?(!(r&n)||r&i)&&(a[s]=z6(r,t)):o<=t&&(e.expiredLanes|=r),l&=~r}if(t=re,n=Q,n=Eo(e,e===t?n:0),i=e.callbackNode,n===0||e===t&&oe===2||e.cancelPendingCommit!==null)return i!==null&&i!==null&&qf(i),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||gs(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&qf(i),q3(n)){case 2:case 8:n=R3;break;case 32:n=vo;break;case 268435456:n=B3;break;default:n=vo}return i=Bw.bind(null,e),n=Ff(n,i),e.callbackPriority=t,e.callbackNode=n,t}return i!==null&&i!==null&&qf(i),e.callbackPriority=2,e.callbackNode=null,2}function Bw(e,t){var n=e.callbackNode;if(Ul()&&e.callbackNode!==n)return null;var i=Q;return i=Eo(e,e===re?i:0),i===0?null:(Tw(e,i,t),Rw(e,Nn()),e.callbackNode!=null&&e.callbackNode===n?Bw.bind(null,e):null)}function Gw(e,t){if(Ul())return null;Tw(e,t,!0)}function fv(e){xv(function(){be&6?Ff(z3,e):e()})}function N2(){return Ta===0&&(Ta=G3()),Ta}function Hw(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:No(""+e)}function Vw(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function dv(e,t,n,i,a){if(t==="submit"&&n&&n.stateNode===a){var l=Hw((a[mt]||null).action),s=i.submitter;s&&(t=(t=s[mt]||null)?Hw(t.formAction):s.getAttribute("formAction"),t!==null&&(l=t,s=null));var r=new Do("action","action",null,i,a);e.push({event:r,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Ta!==0){var o=s?Vw(a,s):new FormData(a);zd(n,{pending:!0,data:o,method:a.method,action:l},null,o)}}else typeof l=="function"&&(r.preventDefault(),o=s?Vw(a,s):new FormData(a),zd(n,{pending:!0,data:o,method:a.method,action:l},l,o))},currentTarget:a}]})}}for(var j2=0;j2<O4.length;j2++){var M2=O4[j2],hv=M2.toLowerCase(),mv=M2[0].toUpperCase()+M2.slice(1);dn(hv,"on"+mv)}dn(j4,"onAnimationEnd"),dn(M4,"onAnimationIteration"),dn(C4,"onAnimationStart"),dn("dblclick","onDoubleClick"),dn("focusin","onFocus"),dn("focusout","onBlur"),dn(Dy,"onTransitionRun"),dn(ky,"onTransitionStart"),dn(Oy,"onTransitionCancel"),dn(D4,"onTransitionEnd"),ul("onMouseEnter",["mouseout","mouseover"]),ul("onMouseLeave",["mouseout","mouseover"]),ul("onPointerEnter",["pointerout","pointerover"]),ul("onPointerLeave",["pointerout","pointerover"]),sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sa("onBeforeInput",["compositionend","keypress","textInput","paste"]),sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var tr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),wv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(tr));function Fw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],a=i.event;i=i.listeners;e:{var l=void 0;if(t)for(var s=i.length-1;0<=s;s--){var r=i[s],o=r.instance,c=r.currentTarget;if(r=r.listener,o!==l&&a.isPropagationStopped())break e;l=r,a.currentTarget=c;try{l(a)}catch(d){$o(d)}a.currentTarget=null,l=o}else for(s=0;s<i.length;s++){if(r=i[s],o=r.instance,c=r.currentTarget,r=r.listener,o!==l&&a.isPropagationStopped())break e;l=r,a.currentTarget=c;try{l(a)}catch(d){$o(d)}a.currentTarget=null,l=o}}}}function X(e,t){var n=t[Xf];n===void 0&&(n=t[Xf]=new Set);var i=e+"__bubble";n.has(i)||(qw(t,e,2,!1),n.add(i))}function C2(e,t,n){var i=0;t&&(i|=4),qw(n,e,i,t)}var mu="_reactListening"+Math.random().toString(36).slice(2);function D2(e){if(!e[mu]){e[mu]=!0,Q3.forEach(function(n){n!=="selectionchange"&&(wv.has(n)||C2(n,!1,e),C2(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mu]||(t[mu]=!0,C2("selectionchange",!1,t))}}function qw(e,t,n,i){switch(dg(t)){case 2:var a=Vv;break;case 8:a=Fv;break;default:a=Y2}n=a.bind(null,t,n,e),a=void 0,!$f||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function k2(e,t,n,i,a){var l=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var s=i.tag;if(s===3||s===4){var r=i.stateNode.containerInfo;if(r===a||r.nodeType===8&&r.parentNode===a)break;if(s===4)for(s=i.return;s!==null;){var o=s.tag;if((o===3||o===4)&&(o=s.stateNode.containerInfo,o===a||o.nodeType===8&&o.parentNode===a))return;s=s.return}for(;r!==null;){if(s=la(r),s===null)return;if(o=s.tag,o===5||o===6||o===26||o===27){i=l=s;continue e}r=r.parentNode}}i=i.return}a4(function(){var c=l,d=Jf(n),h=[];e:{var f=k4.get(e);if(f!==void 0){var w=Do,v=e;switch(e){case"keypress":if(Mo(n)===0)break e;case"keydown":case"keyup":w=oy;break;case"focusin":v="focus",w=id;break;case"focusout":v="blur",w=id;break;case"beforeblur":case"afterblur":w=id;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":w=r4;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=W6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=fy;break;case j4:case M4:case C4:w=$6;break;case D4:w=hy;break;case"scroll":case"scrollend":w=K6;break;case"wheel":w=wy;break;case"copy":case"cut":case"paste":w=ty;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=u4;break;case"toggle":case"beforetoggle":w=py}var x=(t&4)!==0,_=!x&&(e==="scroll"||e==="scrollend"),m=x?f!==null?f+"Capture":null:f;x=[];for(var g=c,y;g!==null;){var b=g;if(y=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||y===null||m===null||(b=bs(g,m),b!=null&&x.push(nr(g,b,y))),_)break;g=g.return}0<x.length&&(f=new w(f,v,null,n,d),h.push({event:f,listeners:x}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",f&&n!==Wf&&(v=n.relatedTarget||n.fromElement)&&(la(v)||v[sl]))break e;if((w||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,w?(v=n.relatedTarget||n.toElement,w=c,v=v?la(v):null,v!==null&&(_=il(v),x=v.tag,v!==_||x!==5&&x!==27&&x!==6)&&(v=null)):(w=null,v=c),w!==v)){if(x=r4,b="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=u4,b="onPointerLeave",m="onPointerEnter",g="pointer"),_=w==null?f:vs(w),y=v==null?f:vs(v),f=new x(b,g+"leave",w,n,d),f.target=_,f.relatedTarget=y,b=null,la(d)===c&&(x=new x(m,g+"enter",v,n,d),x.target=y,x.relatedTarget=_,b=x),_=b,w&&v)t:{for(x=w,m=v,g=0,y=x;y;y=Rl(y))g++;for(y=0,b=m;b;b=Rl(b))y++;for(;0<g-y;)x=Rl(x),g--;for(;0<y-g;)m=Rl(m),y--;for(;g--;){if(x===m||m!==null&&x===m.alternate)break t;x=Rl(x),m=Rl(m)}x=null}else x=null;w!==null&&Yw(h,f,w,x,!1),v!==null&&_!==null&&Yw(h,_,v,x,!0)}}e:{if(f=c?vs(c):window,w=f.nodeName&&f.nodeName.toLowerCase(),w==="select"||w==="input"&&f.type==="file")var S=p4;else if(w4(f))if(y4)S=Ny;else{S=Ty;var A=_y}else w=f.nodeName,!w||w.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?c&&If(c.elementType)&&(S=p4):S=Ay;if(S&&(S=S(e,c))){g4(h,S,n,d);break e}A&&A(e,f,c),e==="focusout"&&c&&f.type==="number"&&c.memoizedProps.value!=null&&Kf(f,"number",f.value)}switch(A=c?vs(c):window,e){case"focusin":(w4(A)||A.contentEditable==="true")&&(wl=A,ud=c,js=null);break;case"focusout":js=ud=wl=null;break;case"mousedown":cd=!0;break;case"contextmenu":case"mouseup":case"dragend":cd=!1,A4(h,n,d);break;case"selectionchange":if(Cy)break;case"keydown":case"keyup":A4(h,n,d)}var T;if(ld)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else ml?h4(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(c4&&n.locale!=="ko"&&(ml||N!=="onCompositionStart"?N==="onCompositionEnd"&&ml&&(T=l4()):(Ti=d,ed="value"in Ti?Ti.value:Ti.textContent,ml=!0)),A=wu(c,N),0<A.length&&(N=new o4(N,e,null,n,d),h.push({event:N,listeners:A}),T?N.data=T:(T=m4(n),T!==null&&(N.data=T)))),(T=vy?by(e,n):xy(e,n))&&(N=wu(c,"onBeforeInput"),0<N.length&&(A=new o4("onBeforeInput","beforeinput",null,n,d),h.push({event:A,listeners:N}),A.data=T)),dv(h,e,c,n,d)}Fw(h,t)})}function nr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wu(e,t){for(var n=t+"Capture",i=[];e!==null;){var a=e,l=a.stateNode;a=a.tag,a!==5&&a!==26&&a!==27||l===null||(a=bs(e,n),a!=null&&i.unshift(nr(e,a,l)),a=bs(e,t),a!=null&&i.push(nr(e,a,l))),e=e.return}return i}function Rl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yw(e,t,n,i,a){for(var l=t._reactName,s=[];n!==null&&n!==i;){var r=n,o=r.alternate,c=r.stateNode;if(r=r.tag,o!==null&&o===i)break;r!==5&&r!==26&&r!==27||c===null||(o=c,a?(c=bs(n,l),c!=null&&s.unshift(nr(n,c,o))):a||(c=bs(n,l),c!=null&&s.push(nr(n,c,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var gv=/\r\n?/g,pv=/\u0000|\uFFFD/g;function Xw(e){return(typeof e=="string"?e:""+e).replace(gv,`
106
- `).replace(pv,"")}function Qw(e,t){return t=Xw(t),Xw(e)===t}function gu(){}function te(e,t,n,i,a,l){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||fl(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&fl(e,""+i);break;case"className":_o(e,"class",i);break;case"tabIndex":_o(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":_o(e,n,i);break;case"style":n4(e,i,l);break;case"data":if(t!=="object"){_o(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=No(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof l=="function"&&(n==="formAction"?(t!=="input"&&te(e,t,"name",a.name,a,null),te(e,t,"formEncType",a.formEncType,a,null),te(e,t,"formMethod",a.formMethod,a,null),te(e,t,"formTarget",a.formTarget,a,null)):(te(e,t,"encType",a.encType,a,null),te(e,t,"method",a.method,a,null),te(e,t,"target",a.target,a,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=No(""+i),e.setAttribute(n,i);break;case"onClick":i!=null&&(e.onclick=gu);break;case"onScroll":i!=null&&X("scroll",e);break;case"onScrollEnd":i!=null&&X("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(E(61));if(n=i.__html,n!=null){if(a.children!=null)throw Error(E(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}n=No(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":i===!0?e.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":X("beforetoggle",e),X("toggle",e),So(e,"popover",i);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":So(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Q6.get(n)||n,So(e,n,i))}}function O2(e,t,n,i,a,l){switch(n){case"style":n4(e,i,l);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(E(61));if(n=i.__html,n!=null){if(a.children!=null)throw Error(E(60));e.innerHTML=n}}break;case"children":typeof i=="string"?fl(e,i):(typeof i=="number"||typeof i=="bigint")&&fl(e,""+i);break;case"onScroll":i!=null&&X("scroll",e);break;case"onScrollEnd":i!=null&&X("scrollend",e);break;case"onClick":i!=null&&(e.onclick=gu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Z3.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),l=e[mt]||null,l=l!=null?l[n]:null,typeof l=="function"&&e.removeEventListener(t,l,a),typeof i=="function")){typeof l!="function"&&l!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,a);break e}n in e?e[n]=i:i===!0?e.setAttribute(n,""):So(e,n,i)}}}function Ie(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":X("error",e),X("load",e);var i=!1,a=!1,l;for(l in n)if(n.hasOwnProperty(l)){var s=n[l];if(s!=null)switch(l){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(E(137,t));default:te(e,t,l,s,n,null)}}a&&te(e,t,"srcSet",n.srcSet,n,null),i&&te(e,t,"src",n.src,n,null);return;case"input":X("invalid",e);var r=l=s=a=null,o=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(d!=null)switch(i){case"name":a=d;break;case"type":s=d;break;case"checked":o=d;break;case"defaultChecked":c=d;break;case"value":l=d;break;case"defaultValue":r=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(E(137,t));break;default:te(e,t,i,d,n,null)}}P3(e,l,r,o,c,s,a,!1),To(e);return;case"select":X("invalid",e),i=s=l=null;for(a in n)if(n.hasOwnProperty(a)&&(r=n[a],r!=null))switch(a){case"value":l=r;break;case"defaultValue":s=r;break;case"multiple":i=r;default:te(e,t,a,r,n,null)}t=l,n=s,e.multiple=!!i,t!=null?cl(e,!!i,t,!1):n!=null&&cl(e,!!i,n,!0);return;case"textarea":X("invalid",e),l=a=i=null;for(s in n)if(n.hasOwnProperty(s)&&(r=n[s],r!=null))switch(s){case"value":i=r;break;case"defaultValue":a=r;break;case"children":l=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(E(91));break;default:te(e,t,s,r,n,null)}e4(e,i,a,l),To(e);return;case"option":for(o in n)if(n.hasOwnProperty(o)&&(i=n[o],i!=null))switch(o){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:te(e,t,o,i,n,null)}return;case"dialog":X("cancel",e),X("close",e);break;case"iframe":case"object":X("load",e);break;case"video":case"audio":for(i=0;i<tr.length;i++)X(tr[i],e);break;case"image":X("error",e),X("load",e);break;case"details":X("toggle",e);break;case"embed":case"source":case"link":X("error",e),X("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(i=n[c],i!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(E(137,t));default:te(e,t,c,i,n,null)}return;default:if(If(t)){for(d in n)n.hasOwnProperty(d)&&(i=n[d],i!==void 0&&O2(e,t,d,i,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(i=n[r],i!=null&&te(e,t,r,i,n,null))}function yv(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,l=null,s=null,r=null,o=null,c=null,d=null;for(w in n){var h=n[w];if(n.hasOwnProperty(w)&&h!=null)switch(w){case"checked":break;case"value":break;case"defaultValue":o=h;default:i.hasOwnProperty(w)||te(e,t,w,null,i,h)}}for(var f in i){var w=i[f];if(h=n[f],i.hasOwnProperty(f)&&(w!=null||h!=null))switch(f){case"type":l=w;break;case"name":a=w;break;case"checked":c=w;break;case"defaultChecked":d=w;break;case"value":s=w;break;case"defaultValue":r=w;break;case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(E(137,t));break;default:w!==h&&te(e,t,f,w,i,h)}}Zf(e,s,r,o,c,d,l,a);return;case"select":w=s=r=f=null;for(l in n)if(o=n[l],n.hasOwnProperty(l)&&o!=null)switch(l){case"value":break;case"multiple":w=o;default:i.hasOwnProperty(l)||te(e,t,l,null,i,o)}for(a in i)if(l=i[a],o=n[a],i.hasOwnProperty(a)&&(l!=null||o!=null))switch(a){case"value":f=l;break;case"defaultValue":r=l;break;case"multiple":s=l;default:l!==o&&te(e,t,a,l,i,o)}t=r,n=s,i=w,f!=null?cl(e,!!n,f,!1):!!i!=!!n&&(t!=null?cl(e,!!n,t,!0):cl(e,!!n,n?[]:"",!1));return;case"textarea":w=f=null;for(r in n)if(a=n[r],n.hasOwnProperty(r)&&a!=null&&!i.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:te(e,t,r,null,i,a)}for(s in i)if(a=i[s],l=n[s],i.hasOwnProperty(s)&&(a!=null||l!=null))switch(s){case"value":f=a;break;case"defaultValue":w=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(E(91));break;default:a!==l&&te(e,t,s,a,i,l)}$3(e,f,w);return;case"option":for(var v in n)if(f=n[v],n.hasOwnProperty(v)&&f!=null&&!i.hasOwnProperty(v))switch(v){case"selected":e.selected=!1;break;default:te(e,t,v,null,i,f)}for(o in i)if(f=i[o],w=n[o],i.hasOwnProperty(o)&&f!==w&&(f!=null||w!=null))switch(o){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:te(e,t,o,f,i,w)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in n)f=n[x],n.hasOwnProperty(x)&&f!=null&&!i.hasOwnProperty(x)&&te(e,t,x,null,i,f);for(c in i)if(f=i[c],w=n[c],i.hasOwnProperty(c)&&f!==w&&(f!=null||w!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(E(137,t));break;default:te(e,t,c,f,i,w)}return;default:if(If(t)){for(var _ in n)f=n[_],n.hasOwnProperty(_)&&f!==void 0&&!i.hasOwnProperty(_)&&O2(e,t,_,void 0,i,f);for(d in i)f=i[d],w=n[d],!i.hasOwnProperty(d)||f===w||f===void 0&&w===void 0||O2(e,t,d,f,i,w);return}}for(var m in n)f=n[m],n.hasOwnProperty(m)&&f!=null&&!i.hasOwnProperty(m)&&te(e,t,m,null,i,f);for(h in i)f=i[h],w=n[h],!i.hasOwnProperty(h)||f===w||f==null&&w==null||te(e,t,h,f,i,w)}var L2=null,U2=null;function pu(e){return e.nodeType===9?e:e.ownerDocument}function Zw(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Kw(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function z2(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var R2=null;function vv(){var e=window.event;return e&&e.type==="popstate"?e===R2?!1:(R2=e,!0):(R2=null,!1)}var Iw=typeof setTimeout=="function"?setTimeout:void 0,bv=typeof clearTimeout=="function"?clearTimeout:void 0,Ww=typeof Promise=="function"?Promise:void 0,xv=typeof queueMicrotask=="function"?queueMicrotask:typeof Ww<"u"?function(e){return Ww.resolve(null).then(e).catch(Ev)}:Iw;function Ev(e){setTimeout(function(){throw e})}function B2(e,t){var n=t,i=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(i===0){e.removeChild(a),cr(t);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=a}while(n);cr(t)}function G2(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":G2(n),Qf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Sv(e,t,n,i){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[ys])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(l=e.getAttribute("rel"),l==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(l!==a.rel||e.getAttribute("href")!==(a.href==null?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(l=e.getAttribute("src"),(l!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&l&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var l=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===l)return e}else return e;if(e=wn(e.nextSibling),e===null)break}return null}function _v(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=wn(e.nextSibling),e===null))return null;return e}function wn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}function Jw(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function Pw(e,t,n){switch(t=pu(n),e){case"html":if(e=t.documentElement,!e)throw Error(E(452));return e;case"head":if(e=t.head,!e)throw Error(E(453));return e;case"body":if(e=t.body,!e)throw Error(E(454));return e;default:throw Error(E(451))}}var ln=new Map,$w=new Set;function yu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.ownerDocument}var li=fe.d;fe.d={f:Tv,r:Av,D:Nv,C:jv,L:Mv,m:Cv,X:kv,S:Dv,M:Ov};function Tv(){var e=li.f(),t=cu();return e||t}function Av(e){var t=rl(e);t!==null&&t.tag===5&&t.type==="form"?Am(t):li.r(e)}var Bl=typeof document>"u"?null:document;function eg(e,t,n){var i=Bl;if(i&&typeof t=="string"&&t){var a=Kt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),$w.has(a)||($w.add(a),e={rel:e,crossOrigin:n,href:t},i.querySelector(a)===null&&(t=i.createElement("link"),Ie(t,"link",e),Ye(t),i.head.appendChild(t)))}}function Nv(e){li.D(e),eg("dns-prefetch",e,null)}function jv(e,t){li.C(e,t),eg("preconnect",e,t)}function Mv(e,t,n){li.L(e,t,n);var i=Bl;if(i&&e&&t){var a='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Kt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Kt(n.imageSizes)+'"]')):a+='[href="'+Kt(e)+'"]';var l=a;switch(t){case"style":l=Gl(e);break;case"script":l=Hl(e)}ln.has(l)||(e=ce({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),ln.set(l,e),i.querySelector(a)!==null||t==="style"&&i.querySelector(ir(l))||t==="script"&&i.querySelector(ar(l))||(t=i.createElement("link"),Ie(t,"link",e),Ye(t),i.head.appendChild(t)))}}function Cv(e,t){li.m(e,t);var n=Bl;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Kt(i)+'"][href="'+Kt(e)+'"]',l=a;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":l=Hl(e)}if(!ln.has(l)&&(e=ce({rel:"modulepreload",href:e},t),ln.set(l,e),n.querySelector(a)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ar(l)))return}i=n.createElement("link"),Ie(i,"link",e),Ye(i),n.head.appendChild(i)}}}function Dv(e,t,n){li.S(e,t,n);var i=Bl;if(i&&e){var a=ol(i).hoistableStyles,l=Gl(e);t=t||"default";var s=a.get(l);if(!s){var r={loading:0,preload:null};if(s=i.querySelector(ir(l)))r.loading=5;else{e=ce({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ln.get(l))&&H2(e,n);var o=s=i.createElement("link");Ye(o),Ie(o,"link",e),o._p=new Promise(function(c,d){o.onload=c,o.onerror=d}),o.addEventListener("load",function(){r.loading|=1}),o.addEventListener("error",function(){r.loading|=2}),r.loading|=4,vu(s,t,i)}s={type:"stylesheet",instance:s,count:1,state:r},a.set(l,s)}}}function kv(e,t){li.X(e,t);var n=Bl;if(n&&e){var i=ol(n).hoistableScripts,a=Hl(e),l=i.get(a);l||(l=n.querySelector(ar(a)),l||(e=ce({src:e,async:!0},t),(t=ln.get(a))&&V2(e,t),l=n.createElement("script"),Ye(l),Ie(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},i.set(a,l))}}function Ov(e,t){li.M(e,t);var n=Bl;if(n&&e){var i=ol(n).hoistableScripts,a=Hl(e),l=i.get(a);l||(l=n.querySelector(ar(a)),l||(e=ce({src:e,async:!0,type:"module"},t),(t=ln.get(a))&&V2(e,t),l=n.createElement("script"),Ye(l),Ie(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},i.set(a,l))}}function tg(e,t,n,i){var a=(a=Ei.current)?yu(a):null;if(!a)throw Error(E(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Gl(n.href),n=ol(a).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Gl(n.href);var l=ol(a).hoistableStyles,s=l.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},l.set(e,s),(l=a.querySelector(ir(e)))&&!l._p&&(s.instance=l,s.state.loading=5),ln.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ln.set(e,n),l||Lv(a,e,n,s.state))),t&&i===null)throw Error(E(528,""));return s}if(t&&i!==null)throw Error(E(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Hl(n),n=ol(a).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(E(444,e))}}function Gl(e){return'href="'+Kt(e)+'"'}function ir(e){return'link[rel="stylesheet"]['+e+"]"}function ng(e){return ce({},e,{"data-precedence":e.precedence,precedence:null})}function Lv(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Ie(t,"link",n),Ye(t),e.head.appendChild(t))}function Hl(e){return'[src="'+Kt(e)+'"]'}function ar(e){return"script[async]"+e}function ig(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Kt(n.href)+'"]');if(i)return t.instance=i,Ye(i),i;var a=ce({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ye(i),Ie(i,"style",a),vu(i,n.precedence,e),t.instance=i;case"stylesheet":a=Gl(n.href);var l=e.querySelector(ir(a));if(l)return t.state.loading|=4,t.instance=l,Ye(l),l;i=ng(n),(a=ln.get(a))&&H2(i,a),l=(e.ownerDocument||e).createElement("link"),Ye(l);var s=l;return s._p=new Promise(function(r,o){s.onload=r,s.onerror=o}),Ie(l,"link",i),t.state.loading|=4,vu(l,n.precedence,e),t.instance=l;case"script":return l=Hl(n.src),(a=e.querySelector(ar(l)))?(t.instance=a,Ye(a),a):(i=n,(a=ln.get(l))&&(i=ce({},n),V2(i,a)),e=e.ownerDocument||e,a=e.createElement("script"),Ye(a),Ie(a,"link",i),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(E(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(i=t.instance,t.state.loading|=4,vu(i,n.precedence,e));return t.instance}function vu(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=i.length?i[i.length-1]:null,l=a,s=0;s<i.length;s++){var r=i[s];if(r.dataset.precedence===t)l=r;else if(l!==a)break}l?l.parentNode.insertBefore(e,l.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function H2(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function V2(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var bu=null;function ag(e,t,n){if(bu===null){var i=new Map,a=bu=new Map;a.set(n,i)}else a=bu,i=a.get(n),i||(i=new Map,a.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var l=n[a];if(!(l[ys]||l[Pe]||e==="link"&&l.getAttribute("rel")==="stylesheet")&&l.namespaceURI!=="http://www.w3.org/2000/svg"){var s=l.getAttribute(t)||"";s=e+s;var r=i.get(s);r?r.push(l):i.set(s,[l])}}return i}function lg(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Uv(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function sg(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var lr=null;function zv(){}function Rv(e,t,n){if(lr===null)throw Error(E(475));var i=lr;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var a=Gl(n.href),l=e.querySelector(ir(a));if(l){e=l._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=xu.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=l,Ye(l);return}l=e.ownerDocument||e,n=ng(n),(a=ln.get(a))&&H2(n,a),l=l.createElement("link"),Ye(l);var s=l;s._p=new Promise(function(r,o){s.onload=r,s.onerror=o}),Ie(l,"link",n),t.instance=l}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(i.count++,t=xu.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}function Bv(){if(lr===null)throw Error(E(475));var e=lr;return e.stylesheets&&e.count===0&&F2(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&F2(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function xu(){if(this.count--,this.count===0){if(this.stylesheets)F2(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Eu=null;function F2(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Eu=new Map,t.forEach(Gv,e),Eu=null,xu.call(e))}function Gv(e,t){if(!(t.state.loading&4)){var n=Eu.get(e);if(n)var i=n.get(null);else{n=new Map,Eu.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),l=0;l<a.length;l++){var s=a[l];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),i=s)}i&&n.set(null,i)}a=t.instance,s=a.getAttribute("data-precedence"),l=n.get(s)||i,l===i&&n.set(null,a),n.set(s,a),this.count++,i=xu.bind(this),a.addEventListener("load",i),a.addEventListener("error",i),l?l.parentNode.insertBefore(a,l.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var sr={$$typeof:Fn,Provider:null,Consumer:null,_currentValue:ia,_currentValue2:ia,_threadCount:0};function Hv(e,t,n,i,a,l,s,r){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Yf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yf(0),this.hiddenUpdates=Yf(null),this.identifierPrefix=i,this.onUncaughtError=a,this.onCaughtError=l,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=r,this.incompleteTransitions=new Map}function rg(e,t,n,i,a,l,s,r,o,c,d,h){return e=new Hv(e,t,n,s,r,o,c,h),t=1,l===!0&&(t|=24),l=nn(3,null,null,t),e.current=l,l.stateNode=e,t=bd(),t.refCount++,e.pooledCache=t,t.refCount++,l.memoizedState={element:i,isDehydrated:n,cache:t},e2(l),e}function og(e){return e?(e=yl,e):yl}function ug(e,t,n,i,a,l){a=og(a),i.context===null?i.context=a:i.pendingContext=a,i=Oi(t),i.payload={element:n},l=l===void 0?null:l,l!==null&&(i.callback=l),n=Li(e,i,t),n!==null&&(lt(n,e,t),qs(n,e,t))}function cg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function q2(e,t){cg(e,t),(e=e.alternate)&&cg(e,t)}function fg(e){if(e.tag===13){var t=Ai(e,67108864);t!==null&&lt(t,e,67108864),q2(e,67108864)}}var Su=!0;function Vv(e,t,n,i){var a=G.T;G.T=null;var l=fe.p;try{fe.p=2,Y2(e,t,n,i)}finally{fe.p=l,G.T=a}}function Fv(e,t,n,i){var a=G.T;G.T=null;var l=fe.p;try{fe.p=8,Y2(e,t,n,i)}finally{fe.p=l,G.T=a}}function Y2(e,t,n,i){if(Su){var a=X2(i);if(a===null)k2(e,t,i,_u,n),hg(e,i);else if(Yv(a,e,t,n,i))i.stopPropagation();else if(hg(e,i),t&4&&-1<qv.indexOf(e)){for(;a!==null;){var l=rl(a);if(l!==null)switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var s=aa(l.pendingLanes);if(s!==0){var r=l;for(r.pendingLanes|=2,r.entangledLanes|=2;s;){var o=1<<31-Dt(s);r.entanglements[1]|=o,s&=~o}kn(l),!(be&6)&&(ru=Nn()+500,er(0))}}break;case 13:r=Ai(l,2),r!==null&&lt(r,l,2),cu(),q2(l,2)}if(l=X2(i),l===null&&k2(e,t,i,_u,n),l===a)break;a=l}a!==null&&i.stopPropagation()}else k2(e,t,i,null,n)}}function X2(e){return e=Jf(e),Q2(e)}var _u=null;function Q2(e){if(_u=null,e=la(e),e!==null){var t=il(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=O3(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _u=e,null}function dg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(j6()){case z3:return 2;case R3:return 8;case vo:case M6:return 32;case B3:return 268435456;default:return 32}default:return 32}}var Z2=!1,Vi=null,Fi=null,qi=null,rr=new Map,or=new Map,Yi=[],qv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function hg(e,t){switch(e){case"focusin":case"focusout":Vi=null;break;case"dragenter":case"dragleave":Fi=null;break;case"mouseover":case"mouseout":qi=null;break;case"pointerover":case"pointerout":rr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":or.delete(t.pointerId)}}function ur(e,t,n,i,a,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:l,targetContainers:[a]},t!==null&&(t=rl(t),t!==null&&fg(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Yv(e,t,n,i,a){switch(t){case"focusin":return Vi=ur(Vi,e,t,n,i,a),!0;case"dragenter":return Fi=ur(Fi,e,t,n,i,a),!0;case"mouseover":return qi=ur(qi,e,t,n,i,a),!0;case"pointerover":var l=a.pointerId;return rr.set(l,ur(rr.get(l)||null,e,t,n,i,a)),!0;case"gotpointercapture":return l=a.pointerId,or.set(l,ur(or.get(l)||null,e,t,n,i,a)),!0}return!1}function mg(e){var t=la(e.target);if(t!==null){var n=il(t);if(n!==null){if(t=n.tag,t===13){if(t=O3(n),t!==null){e.blockedOn=t,B6(e.priority,function(){if(n.tag===13){var i=zt(),a=Ai(n,i);a!==null&&lt(a,n,i),q2(n,i)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Tu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=X2(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);Wf=i,n.target.dispatchEvent(i),Wf=null}else return t=rl(n),t!==null&&fg(t),e.blockedOn=n,!1;t.shift()}return!0}function wg(e,t,n){Tu(e)&&n.delete(t)}function Xv(){Z2=!1,Vi!==null&&Tu(Vi)&&(Vi=null),Fi!==null&&Tu(Fi)&&(Fi=null),qi!==null&&Tu(qi)&&(qi=null),rr.forEach(wg),or.forEach(wg)}function Au(e,t){e.blockedOn===t&&(e.blockedOn=null,Z2||(Z2=!0,Be.unstable_scheduleCallback(Be.unstable_NormalPriority,Xv)))}var Nu=null;function gg(e){Nu!==e&&(Nu=e,Be.unstable_scheduleCallback(Be.unstable_NormalPriority,function(){Nu===e&&(Nu=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],a=e[t+2];if(typeof i!="function"){if(Q2(i||n)===null)continue;break}var l=rl(n);l!==null&&(e.splice(t,3),t-=3,zd(l,{pending:!0,data:a,method:n.method,action:i},i,a))}}))}function cr(e){function t(o){return Au(o,e)}Vi!==null&&Au(Vi,e),Fi!==null&&Au(Fi,e),qi!==null&&Au(qi,e),rr.forEach(t),or.forEach(t);for(var n=0;n<Yi.length;n++){var i=Yi[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Yi.length&&(n=Yi[0],n.blockedOn===null);)mg(n),n.blockedOn===null&&Yi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var a=n[i],l=n[i+1],s=a[mt]||null;if(typeof l=="function")s||gg(n);else if(s){var r=null;if(l&&l.hasAttribute("formAction")){if(a=l,s=l[mt]||null)r=s.formAction;else if(Q2(a)!==null)continue}else r=s.action;typeof r=="function"?n[i+1]=r:(n.splice(i,3),i-=3),gg(n)}}}function K2(e){this._internalRoot=e}ju.prototype.render=K2.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));var n=t.current,i=zt();ug(n,i,e,t,null,null)},ju.prototype.unmount=K2.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;e.tag===0&&Ul(),ug(e.current,2,null,e,null,null),cu(),t[sl]=null}};function ju(e){this._internalRoot=e}ju.prototype.unstable_scheduleHydration=function(e){if(e){var t=Y3();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yi.length&&t!==0&&t<Yi[n].priority;n++);Yi.splice(n,0,e),n===0&&mg(e)}};var pg=T3.version;if(pg!=="19.0.0")throw Error(E(527,pg,"19.0.0"));fe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=T6(t),e=e!==null?U3(e):null,e=e===null?null:e.stateNode,e};var Qv={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:G,findFiberByHostInstance:la,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mu.isDisabled&&Mu.supportsFiber)try{ws=Mu.inject(Qv),Ct=Mu}catch{}}mo.createRoot=function(e,t){if(!A3(e))throw Error(E(299));var n=!1,i="",a=Lm,l=Um,s=zm,r=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(l=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(r=t.unstable_transitionCallbacks)),t=rg(e,1,!1,null,null,n,i,a,l,s,r,null),e[sl]=t.current,D2(e.nodeType===8?e.parentNode:e),new K2(t)},mo.hydrateRoot=function(e,t,n){if(!A3(e))throw Error(E(299));var i=!1,a="",l=Lm,s=Um,r=zm,o=null,c=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(l=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(o=n.unstable_transitionCallbacks),n.formState!==void 0&&(c=n.formState)),t=rg(e,1,!0,t,n??null,i,a,l,s,r,o,c),t.context=og(null),n=t.current,i=zt(),a=Oi(i),a.callback=null,Li(n,a,i),t.current.lanes=i,ps(t,i),kn(t),e[sl]=t.current,D2(e),new ju(t)},mo.version="19.0.0";function yg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yg)}catch(e){console.error(e)}}yg(),E3.exports=mo;var Zv=E3.exports;const vg=e=>u.jsx("span",{className:"iw-text-2xl",children:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...e,children:[u.jsx("path",{d:"M0 0C9.01627 8.39148 22.9837 8.39148 32 0C23.6085 9.01627 23.6085 22.9837 32 32C22.9837 23.6085 9.01627 23.6085 0 32C8.39148 22.9837 8.39148 9.01627 0 0Z",fill:"url(#paint0_linear_6039_13039)"}),u.jsx("defs",{children:u.jsxs("linearGradient",{id:"paint0_linear_6039_13039",x1:"16",y1:"-3.5",x2:"41.5",y2:"29",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{offset:"0.210966",stopColor:"#1E06CB"}),u.jsx("stop",{offset:"0.740385",stopColor:"#DB38EF"})]})})]})}),Kv=()=>u.jsx(qu,{config:{api:{baseUrl:"http://localhost:8000/api",authToken:""},interview:{proctoring:{enabled:!1,gazeAnalysisEnabled:!1,showControls:!1,showEngagementBar:!1,showLandmarks:!1}}},children:u.jsx("div",{className:"interview-widget-container",children:u.jsx(ku,{title:"Frontend Developer",brandName:"Previa",brandLogo:u.jsx(vg,{}),interviewId:"ea3cb06a-c168-4ad3-8084-4165a79473d3",className:"iw-rounded-none iw-shadow-none",onInterviewEnd:()=>{console.log("🎉🎉 Interview ended 🎉🎉"),window.location.reload(),sessionStorage.clear()},onInterviewDisqualify:()=>{console.log("❌ Interview disqualified ❌")}})})}),Iv=document.getElementById("root");Zv.createRoot(Iv).render(u.jsx(Kv,{}));const Wv=(e,t,n)=>Math.max(t,Math.min(n,e)),bg=e=>{const t=Math.max(0,Math.floor(e)),n=Math.floor(t/60).toString().padStart(2,"0"),i=(t%60).toString().padStart(2,"0");return`${n}:${i}`},Cu=({total:e,remaining:t,size:n=64,strokeWidth:i=6,className:a="",showLabel:l=!0})=>{const s=Math.max(1,e||1),r=Wv(t/s,0,1),{radius:o,circumference:c,dashOffset:d,center:h}=p.useMemo(()=>{const v=(n-i)/2,x=2*Math.PI*v,_=x*(1-r),m=Math.round(i)%2===1,g=n/2+(m?.5:0);return{radius:v,circumference:x,dashOffset:_,center:g}},[n,i,r]),f=p.useMemo(()=>r<=.25?"iw-stroke-red-500":r<=.5?"iw-stroke-yellow-500":"iw-stroke-green-500",[r]),w=r<=.25?"iw-animate-pulse":"";return u.jsxs("div",{className:`iw-relative iw-inline-flex iw-items-center iw-justify-center iw-rounded-full iw-bg-white ${a}`,style:{width:n,height:n},"aria-label":`Time remaining ${bg(t)}`,role:"timer","aria-live":"polite",children:[u.jsx("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,preserveAspectRatio:"xMidYMid meet",children:u.jsxs("g",{transform:`rotate(-90 ${h} ${h})`,children:[u.jsx("circle",{cx:h,cy:h,r:o,className:"iw-stroke-gray-200",strokeWidth:i,fill:"none",shapeRendering:"geometricPrecision",vectorEffect:"non-scaling-stroke"}),u.jsx("circle",{cx:h,cy:h,r:o,className:`${f} ${w}`,strokeWidth:i,strokeLinecap:"round",fill:"none",strokeDasharray:c,strokeDashoffset:d,shapeRendering:"geometricPrecision",vectorEffect:"non-scaling-stroke",style:{transition:"stroke-dashoffset 0.3s ease, stroke 0.2s ease"}})]})}),l?u.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0",children:u.jsx("span",{className:`iw-text-[11px] iw-font-semibold iw-tabular-nums ${r<=.25?"iw-text-red-600":r<=.5?"iw-text-yellow-600":"iw-text-green-600"}`,children:bg(t)})}):u.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0",children:u.jsx(e5,{})})]})},Jv=({timerState:e,answeringTime:t})=>{const n=(e==null?void 0:e.currentPhaseTimeRemaining)||0,i=t||y3.answeringDuration;return u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[u.jsx(Cu,{total:i,remaining:n,size:50,strokeWidth:4,showLabel:!1,className:"iw-shadow-sm iw-border iw-border-gray-100"}),u.jsxs("div",{className:"iw-flex iw-flex-col",children:[u.jsx("span",{className:"iw-text-[#5C6686]",children:"Time left to answer"}),u.jsxs("span",{className:"iw-text-xl iw-font-bold iw-text-[#062260]",children:[Xu(n)," mins"]})]})]})},Pv=({question:e,isLoading:t=!1,phase:n,brandName:i,timerState:a,answeringTime:l})=>u.jsx("div",{className:"iw-rounded-xl iw-mb-4 message-animation iw-text-gray-800 iw-py-1",children:u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-4",children:[u.jsx("div",{className:`iw-flex iw-flex-col iw-items-center iw-justify-center iw-relative iw-h-16 iw-w-16 iw-shrink-0 iw-shadow iw-rounded-full iw-border-[#E8EEFE] iw-border-4 ${n===K.READING_QUESTION?"iw-animate-speaking":""}`,children:u.jsx("div",{className:"iw-bg-transparent iw-flex iw-items-center iw-justify-center iw-rounded-full iw-size-full",style:{backgroundImage:"linear-gradient(#B5D0FD, #FFFFFF)"},children:u.jsx(vg,{className:"iw-size-8"})})}),u.jsx($v,{phase:n,question:e,isLoading:t,brandName:i,timerState:a,answeringTime:l})]})}),$v=({phase:e,question:t,isLoading:n,brandName:i,timerState:a,answeringTime:l})=>{const s=i||"We",r=i?"is":"are";if(n||e===K.FETCHING_QUESTION||e===K.IDLE)return u.jsxs("div",{className:"iw-animate-pulse iw-w-full iw-space-y-3 iw-mr-10",children:[u.jsx("div",{className:"iw-h-5 iw-bg-gray-200 iw-rounded iw-w-full"}),u.jsx("div",{className:"iw-h-5 iw-bg-gray-200 iw-rounded iw-w-3/4"})]});const o=()=>u.jsxs("span",{className:"iw-animate-dot-wave iw-ml-1",children:[u.jsx("span",{children:"."}),u.jsx("span",{children:"."}),u.jsx("span",{children:"."})]});switch(e){case K.ANSWERING:return u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between iw-w-full",children:[u.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:["Listening",u.jsx(o,{})]}),u.jsx(Jv,{timerState:a,answeringTime:l})]});case K.TRANSCRIBING:return u.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:[s," ",r," analyzing your answer",u.jsx(o,{})]});case(K.EDITING||K.SUBMITTING):return u.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:[s," ",r," waiting for your answer..."]});default:return u.jsx("p",{className:"iw-text-lg iw-leading-7",children:t==null?void 0:t.question})}},e7=({label:e,error:t,fullWidth:n=!1,className:i="",id:a,...l})=>{const s=a||`textarea-${Math.random().toString(36).substring(2,9)}`,r="iw-block iw-rounded-md iw-border iw-border-gray-300 iw-shadow-sm iw-px-4 iw-py-2 iw-text-sm iw-transition-all",o=t?"iw-border-red-500 iw-focus:border-red-500 iw-focus:ring-red-500":"",c=n?"iw-w-full":"",d=i.includes("iw-h-full")||n?"iw-h-full":"";return u.jsxs("div",{className:`iw-h-full iw-flex iw-flex-col ${n?"iw-w-full":""}`,children:[e&&u.jsx("label",{htmlFor:s,className:"iw-block iw-text-sm iw-font-medium iw-text-gray-700 iw-mb-1",children:e}),u.jsx("textarea",{id:s,className:`${r} ${o} ${c} ${d} ${i}`,"aria-invalid":t?"true":"false",...l}),t&&u.jsx("p",{className:"iw-mt-1 iw-text-sm iw-text-red-600",children:t})]})},t7=({answerText:e,onAnswerChange:t,timerState:n,editingTime:i})=>u.jsxs("div",{className:"iw-w-full iw-bg-white iw-rounded-xl iw-border iw-border-[#84bbf5] iw-overflow-hidden iw-rounded-tr-none",children:[u.jsx("div",{className:"iw-p-2 iw-pb-0",children:u.jsx(e7,{value:e,onChange:t,placeholder:"Type your answer here...",className:"iw-w-full iw-h-64 iw-resize-none iw-bg-transparent iw-border-none iw-text-[#062260] iw-text-base iw-leading-relaxed focus-visible:iw-outline-0 iw-p-0",disabled:n.phase===K.SUBMITTING})}),u.jsxs("div",{className:"iw-bg-[#F1F5FE] iw-px-2 iw-py-2 iw-flex iw-items-center iw-justify-between iw-border-t iw-border-[#E8EEFE]",children:[u.jsx("span",{className:"iw-text-[#062260] iw-text-sm iw-font-medium iw-line-clamp-1",children:"Time left to edit answer"}),u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[u.jsx(Cu,{total:i,remaining:n.currentPhaseTimeRemaining,size:32,strokeWidth:3,showLabel:!1}),u.jsx("span",{className:"iw-text-[#062260] iw-text-sm iw-font-bold",children:`${Xu(n.currentPhaseTimeRemaining)} mins`})]})]})]}),xg=({children:e})=>u.jsx("div",{className:"iw-flex iw-flex-col iw-items-start iw-mt-3 iw-gap-1",children:e}),n7=({children:e})=>u.jsx("div",{className:"iw-flex iw-flex-col iw-items-end iw-mt-3 iw-gap-1",children:e}),i7=({questionNumber:e})=>u.jsxs("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#E6F3FF",border:"1px solid #BDE0FD"},children:[" Q",e]}),Eg=({label:e})=>u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2 iw-text-sm iw-text-gray-500 iw-bg-[#F1F5FE] iw-px-4 iw-py-1.5 iw-rounded-full iw-my-2 iw-font-semibold",children:[e&&u.jsx("span",{className:"iw-font-medium",children:e}),u.jsxs("span",{className:"iw-animate-dot-wave iw-text-2xl",children:[u.jsx("span",{children:"."}),u.jsx("span",{children:"."}),u.jsx("span",{children:"."})]})]}),a7=({phase:e,questionNumber:t})=>{switch(e){case K.FETCHING_QUESTION:return u.jsxs(xg,{children:[u.jsx(i7,{questionNumber:t+1}),u.jsx(Eg,{})]});case K.ANSWERING:return u.jsx(n7,{children:u.jsx(Eg,{label:"You"})});case K.TRANSCRIBING:return u.jsx(xg,{children:u.jsxs("div",{className:"iw-flex iw-items-center iw-px-1 iw-py-1.5 iw-rounded-lg iw-mb-2 iw-text-sm iw-bg-[#F2E8FE]",children:[u.jsx("img",{src:"../../../../src/assets/transcribing.gif",alt:"Transcribing",className:"iw-h-8 iw-w-12"}),u.jsx("span",{className:"iw-text-sm iw-text-[#062260]",children:"Analyzing answer…"})]})});default:return null}},l7=({item:e,index:t,isCurrentQuestion:n=!1,isEditable:i=!1,answerText:a="",onAnswerChange:l,timerState:s,editingTime:r})=>{const o=i&&s&&r!==void 0,c=o||e.answer;return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-start",children:[u.jsxs("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#E6F3FF",border:"1px solid #BDE0FD"},children:["Q",t+1]}),u.jsx("div",{className:"iw-w-full iw-p-4 iw-rounded-xl iw-text-[#062260] iw-text-base iw-leading-relaxed iw-rounded-tl-none",style:{backgroundColor:"#F1F5FE",border:n?"2px solid #84bbf5":"1px solid transparent"},children:e.question})]}),c&&u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-end iw-mt-4",children:[u.jsx("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#F2E8FE",border:"1px solid #E9D5FF"},children:"You"}),o?u.jsx(t7,{answerText:a||"",onAnswerChange:l,timerState:s,editingTime:r}):u.jsx("div",{className:"iw-w-full iw-p-4 iw-rounded-xl iw-text-[#062260] iw-text-base iw-leading-relaxed iw-rounded-tr-none",style:{backgroundColor:"#F7F1FE"},children:e.answer})]}),n&&u.jsx(a7,{phase:s==null?void 0:s.phase,questionNumber:t+1})]})},s7=()=>u.jsx("div",{className:"iw-space-y-6 iw-animate-pulse",children:[1,2,3].map(e=>u.jsxs("div",{className:`iw-flex iw-flex-col ${e%2===0?"iw-items-end":"iw-items-start"} iw-gap-2`,children:[u.jsx("div",{className:"iw-h-8 iw-w-16 iw-bg-gray-200 iw-rounded-full"}),u.jsx("div",{className:"iw-h-24 iw-w-full iw-bg-gray-100 iw-rounded-xl"})]},e))}),r7=({transcript:e,isLoading:t,className:n="",bottomRef:i,isEditing:a,answerText:l,onAnswerChange:s,timerState:r,editingTime:o})=>u.jsxs("div",{className:`iw-h-full iw-flex iw-flex-col iw-bg-white iw-scroll-smooth iw-p-6 iw-pr-2 iw-min-w-32 iw-border iw-rounded-tr-2xl iw-rounded-br-2xl iw-border-[#E8EEFE] ${n}`,children:[u.jsxs("div",{className:"iw-mb-6",children:[u.jsx("h2",{className:"iw-text-lg iw-font-semibold iw-mb-4",style:{color:"#062260"},children:"Interview transcript"}),u.jsx("div",{className:"iw-h-px iw-w-full iw-border-t iw-border-dashed iw-border-gray-300"})]}),u.jsxs("div",{className:"iw-flex-1 iw-overflow-y-auto iw-pr-2 iw-space-y-6 iw-scrollbar-thin iw-max-w-xl iw-pb-5",children:[t?u.jsx(s7,{}):e==null?void 0:e.map((c,d)=>u.jsx(l7,{item:c,index:d,isCurrentQuestion:d===(e==null?void 0:e.length)-1,isEditable:!!(d===(e==null?void 0:e.length)-1&&a),answerText:l||"",onAnswerChange:s||(()=>{}),timerState:r,editingTime:o},c.qna_id)),u.jsx("div",{ref:i})]})]}),o7=({interviewId:e,className:t="",currentQuestion:n,lastSubmittedAnswer:i,isEditing:a,answerText:l,onAnswerChange:s,timerState:r,editingTime:o})=>{const c=b3(),[d,h]=p.useState([]),[f,w]=p.useState(!0),v=p.useRef(null);return p.useEffect(()=>{var x;(x=v.current)==null||x.scrollIntoView({behavior:"smooth"})},[d,l,r==null?void 0:r.phase]),p.useEffect(()=>{(async()=>{var _;try{const m=await c.getInterviewTranscription(e);h(((_=m==null?void 0:m.data)==null?void 0:_.question_answers)||[])}catch(m){console.error("Failed to fetch transcript:",m)}finally{w(!1)}})()},[e,c]),p.useEffect(()=>{n&&h(x=>{if(x.some(g=>g.qna_id===n.qna_id))return x;const m={qna_id:n.qna_id,question:n.question,answer:null,question_generated_at:new Date().toISOString(),answer_submitted_at:null};return[...x,m]})},[n]),p.useEffect(()=>{i!=null&&i.answer?h(x=>x.map(_=>_.qna_id===i.qnaId?{..._,answer:i.answer,answer_submitted_at:new Date().toISOString()}:_)):l&&h(x=>x.map(_=>_.qna_id===(i==null?void 0:i.qnaId)?{..._,answer:l,answer_submitted_at:new Date().toISOString()}:_))},[i,l]),u.jsx(r7,{transcript:d,isLoading:f||(d==null?void 0:d.length)===0,className:t,bottomRef:v,isEditing:a,answerText:l,onAnswerChange:s,timerState:r,editingTime:o})},u7=({onClick:e,text:t="Submit response"})=>(p.useEffect(()=>{if(typeof window>"u")return;const n=i=>{const a=i.metaKey||i.ctrlKey,l=i.key===" ",s=i.target;s.tagName==="INPUT"||s.isContentEditable||a&&l&&(i.preventDefault(),e())};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e]),u.jsx("div",{className:"iw-fixed iw-bottom-10 iw-left-1/4 iw-transform iw--translate-x-1/2 iw-z-50",children:u.jsxs("button",{onClick:e,className:"iw-flex iw-items-center iw-gap-3 iw-bg-[#4C6CFF] hover:iw-bg-[#4c6dffd5] iw-text-white iw-px-5 iw-py-3 iw-rounded-lg iw-shadow-lg iw-transition-all iw-duration-200 iw-group",children:[u.jsx("span",{className:"iw-font-semibold iw-text-sm",children:t}),u.jsx("span",{className:"iw-bg-white/90 iw-text-[#062260] iw-px-2 iw-py-1 iw-rounded iw-text-xs iw-font-mono iw-font-bold group-hover:iw-bg-white iw-transition-colors",children:"Press Ctrl / ⌘ + Space"})]})})),Sg=({brandName:e,currentQuestion:t,state:n,phase:i,className:a="",interviewId:l="",interview_duration:s=gr,videoFeedRef:r,lastSubmittedAnswer:o,onNextPhase:c,answerText:d,onAnswerChange:h,editingTime:f,answeringTime:w})=>u.jsxs("div",{className:`iw-px-4 iw-py-3 ${a} iw-h-[calc(100vh_-_120px)] iw-max-h-[calc(100vh_-_120px)] iw-flex iw-gap-0 iw-relative`,children:[u.jsxs("div",{className:"iw-flex iw-flex-col iw-flex-1 iw-p-5 iw-bg-white/50 iw-border iw-border-[#E8EEFE] iw-rounded-s-3xl iw-overflow-hidden",children:[u.jsx("div",{className:"iw-flex iw-items-start iw-justify-between iw-gap-3 iw-mb-4",children:u.jsx("div",{className:"iw-flex-1",children:u.jsx(Pv,{question:t,isLoading:i===K.FETCHING_QUESTION||i===K.IDLE,phase:i,brandName:e,timerState:n,answeringTime:w})})}),u.jsx("div",{className:"iw-flex-1 iw-min-h-0 iw-rounded-[16px] iw-overflow-hidden iw-relative",children:u.jsx(g3,{ref:r,interviewId:l,interview_duration:s,isAnswering:i===K.ANSWERING})})]}),u.jsx("div",{className:"iw-interview-transcription iw-w-1/4 iw-min-w-32 iw-h-full",children:u.jsx(o7,{interviewId:l,currentQuestion:t,lastSubmittedAnswer:o,isEditing:i===K.EDITING,answerText:d,onAnswerChange:h,timerState:n,editingTime:f})}),c&&(i===K.ANSWERING||i===K.EDITING)&&u.jsx(u7,{onClick:c,text:i===K.ANSWERING?"Submit Response":"Submit Final Response"})]}),c7=({confirmExitInterview:e,isOpen:t,onClose:n})=>u.jsx(Mf,{isOpen:t,onClose:n,title:"Exit Interview",closeOnOverlayClick:!1,children:u.jsxs("div",{className:"iw-space-y-5",children:[u.jsxs("div",{className:"iw-flex iw-items-start iw-gap-3 iw-rounded-xl iw-p-2",children:[u.jsx("div",{className:"iw-flex iw-h-10 iw-w-10 iw-flex-none iw-items-center iw-justify-center iw-rounded-full iw-bg-rose-100 iw-text-rose-600",children:"!"}),u.jsxs("div",{className:"iw-space-y-2",children:[u.jsx("p",{className:"iw-text-sm iw-font-semibold iw-text-rose-600",children:"Leaving now will end your interview !"}),u.jsx("p",{className:"iw-text-sm iw-text-slate-500",children:"Are you sure you want to exit? All progress will be lost and you will not be able to resume."})]})]}),u.jsxs("div",{className:"iw-flex iw-flex-col-reverse iw-gap-2 sm:iw-flex-row sm:iw-items-center sm:iw-justify-end iw-pb-1",children:[u.jsx("button",{className:"iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-border iw-border-slate-200 iw-bg-white iw-px-4 iw-py-2 iw-text-sm iw-font-medium iw-text-slate-600 iw-shadow-sm iw-transition hover:iw-bg-slate-50",onClick:n,children:"Stay in interview"}),u.jsx("button",{className:"iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-px-4 iw-py-2 iw-text-sm iw-font-semibold iw-text-white iw-transition hover:iw-brightness-110",style:{background:"linear-gradient(to right, rgba(244, 63, 94, 0.8), rgba(225, 29, 72, 0.8))",boxShadow:"0 12px 30px -16px rgba(244, 63, 94, 0.65)"},onClick:e,children:"Confirm exit"})]})]})}),_g=({title:e,brandName:t,brandLogo:n,onExit:i,totalDuration:a=30,elapsedTime:l=0})=>{const{baseColor:s}=yr(),[r,o]=p.useState(!1),c=Math.min(l/(a*60)*100,100),d=()=>u.jsxs("div",{className:"iw-px-4 iw-pb-2 iw-flex iw-items-center iw-gap-3",children:[u.jsx("div",{className:"iw-flex-1 iw-h-4 iw-bg-[#F2F4F7] iw-rounded-full iw-overflow-hidden iw-border iw-border-blue-100 iw-relative",children:u.jsx("div",{className:"iw-h-full iw-bg-[#0EB00E] iw-rounded-full iw-transition-all iw-duration-1000 iw-ease-linear",style:{width:`${c}%`}})}),u.jsxs("div",{className:"iw-text-sm iw-font-medium iw-whitespace-nowrap",children:[u.jsx("span",{className:"iw-text-[#062260]",children:Xu(l)}),u.jsxs("span",{className:"iw-text-[#667085]",children:["/",a," Min"]})]})]});return u.jsxs("header",{className:"iw-w-full iw-text-gray-900 iw-shadow-sm",children:[u.jsxs("div",{className:"iw-mx-auto iw-flex iw-items-center iw-justify-between iw-p-4 iw-pt-1 iw-mb-2 iw-border-b iw-border-[#B3B9CB] iw-border-dashed",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-space-x-2",children:[n||u.jsx("div",{className:"iw-h-7 iw-w-7 iw-rounded-md iw-flex iw-items-center iw-justify-center iw-text-white iw-font-semibold",style:{backgroundColor:s},children:ah(t)}),u.jsx("p",{className:"iw-text-xl iw-font-semibold",children:t})]}),u.jsx("h1",{className:"iw-text-2xl iw-font-semibold iw-text-gradient-silver",children:e}),u.jsx("button",{className:"iw-text-sm iw-text-[#E94315] iw-min-w-10 iw-rounded-md hover:iw-bg-orange-100 iw-p-2",onClick:()=>o(!0),children:u.jsxs("span",{className:"iw-flex iw-items-center iw-gap-1 iw-text-[18px] iw-font-semibold iw-whitespace-nowrap",children:[u.jsx(sh,{className:"iw-text-[#E94315] iw-size-5"}),"Leave interview"]})})]}),u.jsx(d,{}),u.jsx("div",{className:"iw-h-px iw-bg-gray-200"}),u.jsx(c7,{isOpen:r,confirmExitInterview:()=>{i(),o(!1)},onClose:()=>o(!1)})]})},f7=({className:e="",width:t,height:n=56,barWidth:i=3,gap:a=2,fftSize:l=1024,smoothingTimeConstant:s=.8,mediaStream:r,startOnMount:o=!0})=>{const{baseColor:c}=yr(),d=p.useRef(null),h=p.useRef(null),f=p.useRef(null),w=p.useRef(null),v=p.useRef(null),x=p.useRef(null),_=p.useRef(!1),[m,g]=p.useState(null);p.useEffect(()=>{if(t||!h.current)return;const b=h.current,S=()=>{const T=d.current;if(!T)return;const N=b.clientWidth,M=n;T.width=Math.max(1,Math.floor(N*window.devicePixelRatio||1)),T.height=Math.max(1,Math.floor(M*window.devicePixelRatio||1))},A=new ResizeObserver(S);return A.observe(b),S(),()=>A.disconnect()},[t,n]),p.useEffect(()=>{if(!t)return;const b=d.current;b&&(b.width=Math.max(1,Math.floor(t*(window.devicePixelRatio||1))),b.height=Math.max(1,Math.floor(n*(window.devicePixelRatio||1))))},[t,n]),p.useEffect(()=>{let b=!1;return(async()=>{try{const A=new(window.AudioContext||window.webkitAudioContext);f.current=A;let T=r;if(!T){if(!o)return;T=await navigator.mediaDevices.getUserMedia({audio:!0,video:!1}),_.current=!0}if(b)return;const N=A.createAnalyser();N.fftSize=l,N.smoothingTimeConstant=s,w.current=N;const M=A.createMediaStreamSource(T);v.current=M,M.connect(N),y()}catch(A){g((A==null?void 0:A.message)||"Failed to initialize microphone")}})(),()=>{var A,T,N,M;b=!0,x.current&&cancelAnimationFrame(x.current);try{(A=v.current)==null||A.disconnect()}catch{}try{(T=w.current)==null||T.disconnect()}catch{}_.current&&((M=((N=v.current)==null?void 0:N.mediaStream)||void 0)==null||M.getTracks().forEach(D=>D.stop())),f.current&&f.current.state!=="closed"&&f.current.close()}},[r,l,s,o]);const y=()=>{const b=d.current,S=w.current;if(!b||!S)return;const A=b.getContext("2d");if(!A)return;const T=window.devicePixelRatio||1,N=b.width,M=b.height,D=S.frequencyBinCount,ge=new Uint8Array(D),et=()=>{x.current=requestAnimationFrame(et),S.getByteTimeDomainData(ge),A.clearRect(0,0,N,M),A.fillStyle="rgba(0,0,0,0)",A.fillRect(0,0,N,M);const pt=Math.max(1,Math.floor(i*T)),yt=Math.max(1,Math.floor(a*T)),vt=pt+yt,j=Math.max(8,Math.floor((N+yt)/vt)),B=Math.floor(ge.length/j);for(let R=0;R<j;R++){const J=Math.min(ge.length-1,R*B),ae=ge[J]/128-1,st=Math.abs(ae),gn=Math.pow(st,.6),sn=Math.max(M*.06,gn*(M*.9)),Rt=R*vt,rt=(M-sn)/2,ot=140-Math.min(140,140*st),rn=85,Ce=48+Math.floor(12*(1-st));A.fillStyle=`${c}`,A.shadowColor=`hsla(${ot}, ${rn}%, ${Ce}%, ${.25*st})`,A.shadowBlur=8*st;const Xi=Math.min(pt/2,sn/2);d7(A,Rt,rt,pt,sn,Xi),A.fill()}};et()};return u.jsxs("div",{ref:h,className:`iw-relative iw-w-full iw-overflow-hidden iw-rounded-md iw-bg-gray-50 ${e}`,style:{height:n},children:[u.jsx("canvas",{ref:d,className:"iw-w-full iw-h-full"}),m&&u.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center",children:u.jsx("span",{className:"iw-text-xs iw-text-red-600 iw-bg-red-50 iw-border iw-border-red-200 iw-px-2 iw-py-1 iw-rounded",children:m})})]})};function d7(e,t,n,i,a,l){const s=Math.min(l,i/2,a/2);e.beginPath(),e.moveTo(t+s,n),e.lineTo(t+i-s,n),e.quadraticCurveTo(t+i,n,t+i,n+s),e.lineTo(t+i,n+a-s),e.quadraticCurveTo(t+i,n+a,t+i-s,n+a),e.lineTo(t+s,n+a),e.quadraticCurveTo(t,n+a,t,n+a-s),e.lineTo(t,n+s),e.quadraticCurveTo(t,n,t+s,n),e.closePath()}const h7=({state:e,answeringTime:t,nextPhase:n,sttError:i})=>u.jsxs("div",{className:"iw-flex iw-flex-col iw-justify-between iw-h-full ",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between",children:[u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"You may start speaking now. We're listening...."}),u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-2",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-1",children:[u.jsx(lh,{className:"iw-size-4 iw-text-orange-600"}),u.jsx("p",{className:"iw-text-gray-700 iw-text-sm",children:"Time to talk: "})]}),u.jsx(Cu,{total:t,remaining:e.currentPhaseTimeRemaining,size:50,strokeWidth:4})]})]}),u.jsx("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:"Done talking? Click the button to review your answer."})]}),u.jsxs("div",{children:[u.jsx(f7,{}),i&&u.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Recording error: ",i.message]})]}),u.jsx("div",{className:"iw-w-full iw-grid iw-grid-cols-1",children:u.jsx(us,{onClick:()=>{n()},children:"Transcribe My Answer"})})]});function m7(){const[e,t]=p.useState(!0),n=p.useMemo(()=>[0,1,2].map(i=>({id:i})),[]);return p.useEffect(()=>{const i=setInterval(()=>{t(a=>!a)},1500);return()=>clearInterval(i)},[]),u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-h-full",children:[u.jsx("div",{className:"iw-relative iw-w-80 iw-h-48 ","aria-hidden":!0,children:n.map((i,a)=>{const l=a*50,s=e?l:l+12,r=e?1:.08,o=a*140;return u.jsx("div",{role:"presentation",className:"iw-absolute iw-w-full iw-rounded-lg iw-p-4 iw-shadow-md iw-bg-gradient-to-b iw-from-gray-50 iw-to-gray-100 iw-overflow-hidden",style:{top:0,transform:`translateY(${s}px)`,opacity:r,transition:`transform 600ms cubic-bezier(.2,.9,.3,1) ${o}ms, opacity 400ms ease ${o}ms`},children:u.jsxs("div",{className:"iw-flex iw-gap-3 iw-items-center",children:[u.jsx("div",{className:"iw-w-10 iw-h-10 iw-bg-gray-300 iw-rounded iw-flex-shrink-0"}),u.jsxs("div",{className:"iw-flex-1 iw-space-y-2",children:[u.jsx("div",{className:"iw-h-2 iw-bg-gray-300 iw-rounded iw-w-24"}),u.jsx("div",{className:"iw-h-2 iw-bg-gray-300 iw-rounded iw-w-32"})]})]})},i.id)})}),u.jsx("div",{className:"iw-text-center",children:u.jsx("p",{className:"iw-text-gray-500 iw-font-medium",children:"Preparing your question..."})})]})}const w7=({size:e="192px",className:t,colors:n,animationDuration:i=20})=>{const l={...{bg:"oklch(95% 0.02 264.695)",c1:"oklch(75% 0.15 350)",c2:"oklch(80% 0.12 200)",c3:"oklch(78% 0.14 280)"},...n},s=parseInt(e.replace("px",""),10),r=s<50?Math.max(s*.008,1):Math.max(s*.015,4),o=s<50?Math.max(s*.004,1.2):Math.max(s*.008,1.5),c=s<50?Math.max(s*.004,.05):Math.max(s*.008,.1),d=s<50?Math.max(s*.004,.5):Math.max(s*.008,2),h=s<30?"0%":s<50?"5%":s<100?"15%":"25%",f=s<30?1.1:s<50?Math.max(o*1.2,1.3):o;return u.jsx("div",{className:`siri-orb ${t}`,style:{width:e,height:e,"--bg":l.bg,"--c1":l.c1,"--c2":l.c2,"--c3":l.c3,"--animation-duration":`${i}s`,"--blur-amount":`${r}px`,"--contrast-amount":f,"--dot-size":`${c}px`,"--shadow-spread":`${d}px`,"--mask-radius":h},children:u.jsx("style",{children:`
102
+ `);for(a=i=0;i<o.length&&!o[i].includes("DetermineComponentFrameRoot");)i++;for(;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;if(i===o.length||a===c.length)for(i=o.length-1,a=c.length-1;1<=i&&0<=a&&o[i]!==c[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==c[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==c[a]){var f=`
103
+ `+o[i].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=i&&0<=a);break}}}finally{zf=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ca(n):""}function ep(e,t){switch(e.tag){case 26:case 27:case 5:return ca(e.type);case 16:return ca("Lazy");case 13:return e.child!==t&&t!==null?ca("Suspense Fallback"):ca("Suspense");case 19:return ca("SuspenseList");case 0:case 15:return kf(e.type,!1);case 11:return kf(e.type.render,!1);case 1:return kf(e.type,!0);case 31:return ca("Activity");default:return""}}function L3(e){try{var t="",n=null;do t+=ep(e,n),n=e,e=e.return;while(e);return t}catch(i){return`
104
+ Error generating stack: `+i.message+`
105
+ `+i.stack}}var Lf=Object.prototype.hasOwnProperty,Uf=qe.unstable_scheduleCallback,Bf=qe.unstable_cancelCallback,tp=qe.unstable_shouldYield,np=qe.unstable_requestPaint,Lt=qe.unstable_now,ip=qe.unstable_getCurrentPriorityLevel,U3=qe.unstable_ImmediatePriority,B3=qe.unstable_UserBlockingPriority,wu=qe.unstable_NormalPriority,ap=qe.unstable_LowPriority,R3=qe.unstable_IdlePriority,lp=qe.log,sp=qe.unstable_setDisableYieldValue,js=null,Ut=null;function xi(e){if(typeof lp=="function"&&sp(e),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(js,e)}catch{}}var Bt=Math.clz32?Math.clz32:op,rp=Math.log,up=Math.LN2;function op(e){return e>>>=0,e===0?32:31-(rp(e)/up|0)|0}var yu=256,pu=262144,vu=4194304;function fa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function bu(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var a=0,l=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var r=i&134217727;return r!==0?(i=r&~l,i!==0?a=fa(i):(s&=r,s!==0?a=fa(s):n||(n=r&~e,n!==0&&(a=fa(n))))):(r=i&~l,r!==0?a=fa(r):s!==0?a=fa(s):n||(n=i&~e,n!==0&&(a=fa(n)))),a===0?0:t!==0&&t!==a&&!(t&l)&&(l=a&-a,n=t&-t,l>=n||l===32&&(n&4194048)!==0)?t:a}function Ms(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function cp(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function G3(){var e=vu;return vu<<=1,!(vu&62914560)&&(vu=4194304),e}function Rf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Cs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fp(e,t,n,i,a,l){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var r=e.entanglements,o=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0<n;){var f=31-Bt(n),h=1<<f;r[f]=0,o[f]=-1;var d=c[f];if(d!==null)for(c[f]=null,f=0;f<d.length;f++){var m=d[f];m!==null&&(m.lane&=-536870913)}n&=~h}i!==0&&H3(e,i,0),l!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=l&~(s&~t))}function H3(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Bt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|n&261930}function V3(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Bt(n),a=1<<i;a&t|e[i]&t&&(e[i]|=t),n&=~a}}function q3(e,t){var n=t&-t;return n=n&42?1:Gf(n),n&(e.suspendedLanes|t)?0:n}function Gf(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Hf(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function F3(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:jw(e.type))}function Y3(e,t){var n=W.p;try{return W.p=e,t()}finally{W.p=n}}var Si=Math.random().toString(36).slice(2),Pe="__reactFiber$"+Si,mt="__reactProps$"+Si,fl="__reactContainer$"+Si,Vf="__reactEvents$"+Si,dp="__reactListeners$"+Si,hp="__reactHandles$"+Si,X3="__reactResources$"+Si,Ds="__reactMarker$"+Si;function qf(e){delete e[Pe],delete e[mt],delete e[Vf],delete e[dp],delete e[hp]}function dl(e){var t=e[Pe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fl]||n[Pe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=dw(e);e!==null;){if(n=e[Pe])return n;e=dw(e)}return t}e=n,n=e.parentNode}return null}function hl(e){if(e=e[Pe]||e[fl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Os(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(S(33))}function ml(e){var t=e[X3];return t||(t=e[X3]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ie(e){e[Ds]=!0}var Q3=new Set,Z3={};function da(e,t){gl(e,t),gl(e+"Capture",t)}function gl(e,t){for(Z3[e]=t,e=0;e<t.length;e++)Q3.add(t[e])}var mp=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),K3={},I3={};function gp(e){return Lf.call(I3,e)?!0:Lf.call(K3,e)?!1:mp.test(e)?I3[e]=!0:(K3[e]=!0,!1)}function xu(e,t,n){if(gp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Su(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Yn(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}function $t(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function J3(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wp(e,t,n){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var a=i.get,l=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){n=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ff(e){if(!e._valueTracker){var t=J3(e)?"checked":"value";e._valueTracker=wp(e,t,""+e[t])}}function W3(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=J3(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function Eu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var yp=/[\n"\\]/g;function en(e){return e.replace(yp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Yf(e,t,n,i,a,l,s,r){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+$t(t)):e.value!==""+$t(t)&&(e.value=""+$t(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Xf(e,s,$t(t)):n!=null?Xf(e,s,$t(n)):i!=null&&e.removeAttribute("value"),a==null&&l!=null&&(e.defaultChecked=!!l),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+$t(r):e.removeAttribute("name")}function P3(e,t,n,i,a,l,s,r){if(l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.type=l),t!=null||n!=null){if(!(l!=="submit"&&l!=="reset"||t!=null)){Ff(e);return}n=n!=null?""+$t(n):"",t=t!=null?""+$t(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}i=i??a,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=r?e.checked:!!i,e.defaultChecked=!!i,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Ff(e)}function Xf(e,t,n){t==="number"&&Eu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wl(e,t,n,i){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&i&&(e[n].defaultSelected=!0)}else{for(n=""+$t(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function $3(e,t,n){if(t!=null&&(t=""+$t(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+$t(n):""}function e4(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(S(92));if(As(i)){if(1<i.length)throw Error(S(93));i=i[0]}n=i}n==null&&(n=""),t=n}n=$t(t),e.defaultValue=n,i=e.textContent,i===n&&i!==""&&i!==null&&(e.value=i),Ff(e)}function yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function t4(e,t,n){var i=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,n):typeof n!="number"||n===0||pp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function n4(e,t,n){if(t!=null&&typeof t!="object")throw Error(S(62));if(e=e.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var a in t)i=t[a],t.hasOwnProperty(a)&&n[a]!==i&&t4(e,a,i)}else for(var l in t)t.hasOwnProperty(l)&&t4(e,l,t[l])}function Qf(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),bp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function _u(e){return bp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xn(){}var Zf=null;function Kf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pl=null,vl=null;function i4(e){var t=hl(e);if(t&&(e=t.stateNode)){var n=e[mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Yf(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+en(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=i[mt]||null;if(!a)throw Error(S(90));Yf(i,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)i=n[t],i.form===e.form&&W3(i)}break e;case"textarea":$3(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&wl(e,!!n.multiple,t,!1)}}}var If=!1;function a4(e,t,n){if(If)return e(t,n);If=!0;try{var i=e(t);return i}finally{if(If=!1,(pl!==null||vl!==null)&&(fo(),pl&&(t=pl,e=vl,vl=pl=null,i4(t),e)))for(t=0;t<e.length;t++)i4(e[t])}}function zs(e,t){var n=e.stateNode;if(n===null)return null;var i=n[mt]||null;if(i===null)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(S(231,t,typeof n));return n}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jf=!1;if(Qn)try{var ks={};Object.defineProperty(ks,"passive",{get:function(){Jf=!0}}),window.addEventListener("test",ks,ks),window.removeEventListener("test",ks,ks)}catch{Jf=!1}var Ei=null,Wf=null,Tu=null;function l4(){if(Tu)return Tu;var e,t=Wf,n=t.length,i,a="value"in Ei?Ei.value:Ei.textContent,l=a.length;for(e=0;e<n&&t[e]===a[e];e++);var s=n-e;for(i=1;i<=s&&t[n-i]===a[l-i];i++);return Tu=a.slice(e,1<i?1-i:void 0)}function Au(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nu(){return!0}function s4(){return!1}function gt(e){function t(n,i,a,l,s){this._reactName=n,this._targetInst=a,this.type=i,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(l):l[r]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Nu:s4,this.isPropagationStopped=s4,this}return oe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Nu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Nu)},persist:function(){},isPersistent:Nu}),t}var ha={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ju=gt(ha),Ls=oe({},ha,{view:0,detail:0}),xp=gt(Ls),Pf,$f,Us,Mu=oe({},Ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:td,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Us&&(Us&&e.type==="mousemove"?(Pf=e.screenX-Us.screenX,$f=e.screenY-Us.screenY):$f=Pf=0,Us=e),Pf)},movementY:function(e){return"movementY"in e?e.movementY:$f}}),r4=gt(Mu),Sp=oe({},Mu,{dataTransfer:0}),Ep=gt(Sp),_p=oe({},Ls,{relatedTarget:0}),ed=gt(_p),Tp=oe({},ha,{animationName:0,elapsedTime:0,pseudoElement:0}),Ap=gt(Tp),Np=oe({},ha,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jp=gt(Np),Mp=oe({},ha,{data:0}),u4=gt(Mp),Cp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dp={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Op={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Op[e])?!!t[e]:!1}function td(){return zp}var kp=oe({},Ls,{key:function(e){if(e.key){var t=Cp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Au(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Dp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:td,charCode:function(e){return e.type==="keypress"?Au(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Au(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Lp=gt(kp),Up=oe({},Mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),o4=gt(Up),Bp=oe({},Ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:td}),Rp=gt(Bp),Gp=oe({},ha,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hp=gt(Gp),Vp=oe({},Mu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),qp=gt(Vp),Fp=oe({},ha,{newState:0,oldState:0}),Yp=gt(Fp),Xp=[9,13,27,32],nd=Qn&&"CompositionEvent"in window,Bs=null;Qn&&"documentMode"in document&&(Bs=document.documentMode);var Qp=Qn&&"TextEvent"in window&&!Bs,c4=Qn&&(!nd||Bs&&8<Bs&&11>=Bs),f4=" ",d4=!1;function h4(e,t){switch(e){case"keyup":return Xp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m4(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bl=!1;function Zp(e,t){switch(e){case"compositionend":return m4(t);case"keypress":return t.which!==32?null:(d4=!0,f4);case"textInput":return e=t.data,e===f4&&d4?null:e;default:return null}}function Kp(e,t){if(bl)return e==="compositionend"||!nd&&h4(e,t)?(e=l4(),Tu=Wf=Ei=null,bl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return c4&&t.locale!=="ko"?null:t.data;default:return null}}var Ip={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function g4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ip[e.type]:t==="textarea"}function w4(e,t,n,i){pl?vl?vl.push(i):vl=[i]:pl=i,t=vo(t,"onChange"),0<t.length&&(n=new ju("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Rs=null,Gs=null;function Jp(e){Pg(e,0)}function Cu(e){var t=Os(e);if(W3(t))return e}function y4(e,t){if(e==="change")return t}var p4=!1;if(Qn){var id;if(Qn){var ad="oninput"in document;if(!ad){var v4=document.createElement("div");v4.setAttribute("oninput","return;"),ad=typeof v4.oninput=="function"}id=ad}else id=!1;p4=id&&(!document.documentMode||9<document.documentMode)}function b4(){Rs&&(Rs.detachEvent("onpropertychange",x4),Gs=Rs=null)}function x4(e){if(e.propertyName==="value"&&Cu(Gs)){var t=[];w4(t,Gs,e,Kf(e)),a4(Jp,t)}}function Wp(e,t,n){e==="focusin"?(b4(),Rs=t,Gs=n,Rs.attachEvent("onpropertychange",x4)):e==="focusout"&&b4()}function Pp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Cu(Gs)}function $p(e,t){if(e==="click")return Cu(t)}function ev(e,t){if(e==="input"||e==="change")return Cu(t)}function tv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rt=typeof Object.is=="function"?Object.is:tv;function Hs(e,t){if(Rt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var a=n[i];if(!Lf.call(t,a)||!Rt(e[a],t[a]))return!1}return!0}function S4(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function E4(e,t){var n=S4(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=S4(n)}}function _4(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_4(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function T4(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Eu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Eu(e.document)}return t}function ld(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var nv=Qn&&"documentMode"in document&&11>=document.documentMode,xl=null,sd=null,Vs=null,rd=!1;function A4(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;rd||xl==null||xl!==Eu(i)||(i=xl,"selectionStart"in i&&ld(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Vs&&Hs(Vs,i)||(Vs=i,i=vo(sd,"onSelect"),0<i.length&&(t=new ju("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=xl)))}function ma(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sl={animationend:ma("Animation","AnimationEnd"),animationiteration:ma("Animation","AnimationIteration"),animationstart:ma("Animation","AnimationStart"),transitionrun:ma("Transition","TransitionRun"),transitionstart:ma("Transition","TransitionStart"),transitioncancel:ma("Transition","TransitionCancel"),transitionend:ma("Transition","TransitionEnd")},ud={},N4={};Qn&&(N4=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function ga(e){if(ud[e])return ud[e];if(!Sl[e])return e;var t=Sl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in N4)return ud[e]=t[n];return e}var j4=ga("animationend"),M4=ga("animationiteration"),C4=ga("animationstart"),iv=ga("transitionrun"),av=ga("transitionstart"),lv=ga("transitioncancel"),D4=ga("transitionend"),O4=new Map,od="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");od.push("scrollEnd");function yn(e,t){O4.set(e,t),da(t,[e])}var Du=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},tn=[],El=0,cd=0;function Ou(){for(var e=El,t=cd=El=0;t<e;){var n=tn[t];tn[t++]=null;var i=tn[t];tn[t++]=null;var a=tn[t];tn[t++]=null;var l=tn[t];if(tn[t++]=null,i!==null&&a!==null){var s=i.pending;s===null?a.next=a:(a.next=s.next,s.next=a),i.pending=a}l!==0&&z4(n,a,l)}}function zu(e,t,n,i){tn[El++]=e,tn[El++]=t,tn[El++]=n,tn[El++]=i,cd|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function fd(e,t,n,i){return zu(e,t,n,i),ku(e)}function wa(e,t){return zu(e,null,null,t),ku(e)}function z4(e,t,n){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n);for(var a=!1,l=e.return;l!==null;)l.childLanes|=n,i=l.alternate,i!==null&&(i.childLanes|=n),l.tag===22&&(e=l.stateNode,e===null||e._visibility&1||(a=!0)),e=l,l=l.return;return e.tag===3?(l=e.stateNode,a&&t!==null&&(a=31-Bt(n),e=l.hiddenUpdates,i=e[a],i===null?e[a]=[t]:i.push(t),t.lane=n|536870912),l):null}function ku(e){if(50<or)throw or=0,b2=null,Error(S(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _l={};function sv(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(e,t,n,i){return new sv(e,t,n,i)}function dd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,t){var n=e.alternate;return n===null?(n=Gt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function k4(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Lu(e,t,n,i,a,l){var s=0;if(i=e,typeof e=="function")dd(e)&&(s=1);else if(typeof e=="string")s=f8(e,n,On.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case jf:return e=Gt(31,n,t,a),e.elementType=jf,e.lanes=l,e;case ul:return ya(n.children,a,l,t);case D3:s=8,a|=24;break;case Ef:return e=Gt(12,n,t,a|2),e.elementType=Ef,e.lanes=l,e;case Tf:return e=Gt(13,n,t,a),e.elementType=Tf,e.lanes=l,e;case Af:return e=Gt(19,n,t,a),e.elementType=Af,e.lanes=l,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fn:s=10;break e;case O3:s=9;break e;case _f:s=11;break e;case Nf:s=14;break e;case vi:s=16,i=null;break e}s=29,n=Error(S(130,e===null?"null":typeof e,"")),i=null}return t=Gt(s,n,t,a),t.elementType=e,t.type=i,t.lanes=l,t}function ya(e,t,n,i){return e=Gt(7,e,i,t),e.lanes=n,e}function hd(e,t,n){return e=Gt(6,e,null,t),e.lanes=n,e}function L4(e){var t=Gt(18,null,null,0);return t.stateNode=e,t}function md(e,t,n){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var U4=new WeakMap;function nn(e,t){if(typeof e=="object"&&e!==null){var n=U4.get(e);return n!==void 0?n:(t={value:e,source:t,stack:L3(t)},U4.set(e,t),t)}return{value:e,source:t,stack:L3(t)}}var Tl=[],Al=0,Uu=null,qs=0,an=[],ln=0,_i=null,zn=1,kn="";function Kn(e,t){Tl[Al++]=qs,Tl[Al++]=Uu,Uu=e,qs=t}function B4(e,t,n){an[ln++]=zn,an[ln++]=kn,an[ln++]=_i,_i=e;var i=zn;e=kn;var a=32-Bt(i)-1;i&=~(1<<a),n+=1;var l=32-Bt(t)+a;if(30<l){var s=a-a%5;l=(i&(1<<s)-1).toString(32),i>>=s,a-=s,zn=1<<32-Bt(t)+a|n<<a|i,kn=l+e}else zn=1<<l|n<<a|i,kn=e}function gd(e){e.return!==null&&(Kn(e,1),B4(e,1,0))}function wd(e){for(;e===Uu;)Uu=Tl[--Al],Tl[Al]=null,qs=Tl[--Al],Tl[Al]=null;for(;e===_i;)_i=an[--ln],an[ln]=null,kn=an[--ln],an[ln]=null,zn=an[--ln],an[ln]=null}function R4(e,t){an[ln++]=zn,an[ln++]=kn,an[ln++]=_i,zn=t.id,kn=t.overflow,_i=e}var $e=null,ce=null,X=!1,Ti=null,sn=!1,yd=Error(S(519));function Ai(e){var t=Error(S(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fs(nn(t,e)),yd}function G4(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[Pe]=e,t[mt]=i,n){case"dialog":F("cancel",t),F("close",t);break;case"iframe":case"object":case"embed":F("load",t);break;case"video":case"audio":for(n=0;n<fr.length;n++)F(fr[n],t);break;case"source":F("error",t);break;case"img":case"image":case"link":F("error",t),F("load",t);break;case"details":F("toggle",t);break;case"input":F("invalid",t),P3(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":F("invalid",t);break;case"textarea":F("invalid",t),e4(t,i.value,i.defaultValue,i.children)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||i.suppressHydrationWarning===!0||nw(t.textContent,n)?(i.popover!=null&&(F("beforetoggle",t),F("toggle",t)),i.onScroll!=null&&F("scroll",t),i.onScrollEnd!=null&&F("scrollend",t),i.onClick!=null&&(t.onclick=Xn),t=!0):t=!1,t||Ai(e,!0)}function H4(e){for($e=e.return;$e;)switch($e.tag){case 5:case 31:case 13:sn=!1;return;case 27:case 3:sn=!0;return;default:$e=$e.return}}function Nl(e){if(e!==$e)return!1;if(!X)return H4(e),X=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||L2(e.type,e.memoizedProps)),n=!n),n&&ce&&Ai(e),H4(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));ce=fw(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));ce=fw(e)}else t===27?(t=ce,Hi(e.type)?(e=H2,H2=null,ce=e):ce=t):ce=$e?un(e.stateNode.nextSibling):null;return!0}function pa(){ce=$e=null,X=!1}function pd(){var e=Ti;return e!==null&&(vt===null?vt=e:vt.push.apply(vt,e),Ti=null),e}function Fs(e){Ti===null?Ti=[e]:Ti.push(e)}var vd=Dn(null),va=null,In=null;function Ni(e,t,n){ue(vd,t._currentValue),t._currentValue=n}function Jn(e){e._currentValue=vd.current,Ke(vd)}function bd(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function xd(e,t,n,i){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var l=a.dependencies;if(l!==null){var s=a.child;l=l.firstContext;e:for(;l!==null;){var r=l;l=a;for(var o=0;o<t.length;o++)if(r.context===t[o]){l.lanes|=n,r=l.alternate,r!==null&&(r.lanes|=n),bd(l.return,n,e),i||(s=null);break e}l=r.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(S(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),bd(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function jl(e,t,n,i){e=null;for(var a=t,l=!1;a!==null;){if(!l){if(a.flags&524288)l=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(S(387));if(s=s.memoizedProps,s!==null){var r=a.type;Rt(a.pendingProps.value,s.value)||(e!==null?e.push(r):e=[r])}}else if(a===hu.current){if(s=a.alternate,s===null)throw Error(S(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(wr):e=[wr])}a=a.return}e!==null&&xd(t,e,n,i),t.flags|=262144}function Bu(e){for(e=e.firstContext;e!==null;){if(!Rt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ba(e){va=e,In=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function et(e){return V4(va,e)}function Ru(e,t){return va===null&&ba(e),V4(e,t)}function V4(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},In===null){if(e===null)throw Error(S(308));In=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else In=In.next=t;return n}var rv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},uv=qe.unstable_scheduleCallback,ov=qe.unstable_NormalPriority,ke={$$typeof:Fn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sd(){return{controller:new rv,data:new Map,refCount:0}}function Ys(e){e.refCount--,e.refCount===0&&uv(ov,function(){e.controller.abort()})}var Xs=null,Ed=0,Ml=0,Cl=null;function cv(e,t){if(Xs===null){var n=Xs=[];Ed=0,Ml=A2(),Cl={status:"pending",value:void 0,then:function(i){n.push(i)}}}return Ed++,t.then(q4,q4),t}function q4(){if(--Ed===0&&Xs!==null){Cl!==null&&(Cl.status="fulfilled");var e=Xs;Xs=null,Ml=0,Cl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fv(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(i.status="rejected",i.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),i}var F4=B.S;B.S=function(e,t){Ag=Lt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&cv(e,t),F4!==null&&F4(e,t)};var xa=Dn(null);function _d(){var e=xa.current;return e!==null?e:le.pooledCache}function Gu(e,t){t===null?ue(xa,xa.current):ue(xa,t.pool)}function Y4(){var e=_d();return e===null?null:{parent:ke._currentValue,pool:e}}var Dl=Error(S(460)),Td=Error(S(474)),Hu=Error(S(542)),Vu={then:function(){}};function X4(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Q4(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xn,Xn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,K4(e),e;default:if(typeof t.status=="string")t.then(Xn,Xn);else{if(e=le,e!==null&&100<e.shellSuspendCounter)throw Error(S(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=i}},function(i){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,K4(e),e}throw Ea=t,Dl}}function Sa(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ea=n,Dl):n}}var Ea=null;function Z4(){if(Ea===null)throw Error(S(459));var e=Ea;return Ea=null,e}function K4(e){if(e===Dl||e===Hu)throw Error(S(483))}var Ol=null,Qs=0;function qu(e){var t=Qs;return Qs+=1,Ol===null&&(Ol=[]),Q4(Ol,e,t)}function Zs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fu(e,t){throw t.$$typeof===Wy?Error(S(525)):(e=Object.prototype.toString.call(t),Error(S(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function I4(e){function t(g,w){if(e){var p=g.deletions;p===null?(g.deletions=[w],g.flags|=16):p.push(w)}}function n(g,w){if(!e)return null;for(;w!==null;)t(g,w),w=w.sibling;return null}function i(g){for(var w=new Map;g!==null;)g.key!==null?w.set(g.key,g):w.set(g.index,g),g=g.sibling;return w}function a(g,w){return g=Zn(g,w),g.index=0,g.sibling=null,g}function l(g,w,p){return g.index=p,e?(p=g.alternate,p!==null?(p=p.index,p<w?(g.flags|=67108866,w):p):(g.flags|=67108866,w)):(g.flags|=1048576,w)}function s(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function r(g,w,p,b){return w===null||w.tag!==6?(w=hd(p,g.mode,b),w.return=g,w):(w=a(w,p),w.return=g,w)}function o(g,w,p,b){var A=p.type;return A===ul?f(g,w,p.props.children,b,p.key):w!==null&&(w.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===vi&&Sa(A)===w.type)?(w=a(w,p.props),Zs(w,p),w.return=g,w):(w=Lu(p.type,p.key,p.props,null,g.mode,b),Zs(w,p),w.return=g,w)}function c(g,w,p,b){return w===null||w.tag!==4||w.stateNode.containerInfo!==p.containerInfo||w.stateNode.implementation!==p.implementation?(w=md(p,g.mode,b),w.return=g,w):(w=a(w,p.children||[]),w.return=g,w)}function f(g,w,p,b,A){return w===null||w.tag!==7?(w=ya(p,g.mode,b,A),w.return=g,w):(w=a(w,p),w.return=g,w)}function h(g,w,p){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=hd(""+w,g.mode,p),w.return=g,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case du:return p=Lu(w.type,w.key,w.props,null,g.mode,p),Zs(p,w),p.return=g,p;case _s:return w=md(w,g.mode,p),w.return=g,w;case vi:return w=Sa(w),h(g,w,p)}if(As(w)||Ts(w))return w=ya(w,g.mode,p,null),w.return=g,w;if(typeof w.then=="function")return h(g,qu(w),p);if(w.$$typeof===Fn)return h(g,Ru(g,w),p);Fu(g,w)}return null}function d(g,w,p,b){var A=w!==null?w.key:null;if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return A!==null?null:r(g,w,""+p,b);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case du:return p.key===A?o(g,w,p,b):null;case _s:return p.key===A?c(g,w,p,b):null;case vi:return p=Sa(p),d(g,w,p,b)}if(As(p)||Ts(p))return A!==null?null:f(g,w,p,b,null);if(typeof p.then=="function")return d(g,w,qu(p),b);if(p.$$typeof===Fn)return d(g,w,Ru(g,p),b);Fu(g,p)}return null}function m(g,w,p,b,A){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return g=g.get(p)||null,r(w,g,""+b,A);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case du:return g=g.get(b.key===null?p:b.key)||null,o(w,g,b,A);case _s:return g=g.get(b.key===null?p:b.key)||null,c(w,g,b,A);case vi:return b=Sa(b),m(g,w,p,b,A)}if(As(b)||Ts(b))return g=g.get(p)||null,f(w,g,b,A,null);if(typeof b.then=="function")return m(g,w,p,qu(b),A);if(b.$$typeof===Fn)return m(g,w,p,Ru(w,b),A);Fu(w,b)}return null}function v(g,w,p,b){for(var A=null,N=null,_=w,M=w=0,T=null;_!==null&&M<p.length;M++){_.index>M?(T=_,_=null):T=_.sibling;var D=d(g,_,p[M],b);if(D===null){_===null&&(_=T);break}e&&_&&D.alternate===null&&t(g,_),w=l(D,w,M),N===null?A=D:N.sibling=D,N=D,_=T}if(M===p.length)return n(g,_),X&&Kn(g,M),A;if(_===null){for(;M<p.length;M++)_=h(g,p[M],b),_!==null&&(w=l(_,w,M),N===null?A=_:N.sibling=_,N=_);return X&&Kn(g,M),A}for(_=i(_);M<p.length;M++)T=m(_,g,M,p[M],b),T!==null&&(e&&T.alternate!==null&&_.delete(T.key===null?M:T.key),w=l(T,w,M),N===null?A=T:N.sibling=T,N=T);return e&&_.forEach(function(Ee){return t(g,Ee)}),X&&Kn(g,M),A}function x(g,w,p,b){if(p==null)throw Error(S(151));for(var A=null,N=null,_=w,M=w=0,T=null,D=p.next();_!==null&&!D.done;M++,D=p.next()){_.index>M?(T=_,_=null):T=_.sibling;var Ee=d(g,_,D.value,b);if(Ee===null){_===null&&(_=T);break}e&&_&&Ee.alternate===null&&t(g,_),w=l(Ee,w,M),N===null?A=Ee:N.sibling=Ee,N=Ee,_=T}if(D.done)return n(g,_),X&&Kn(g,M),A;if(_===null){for(;!D.done;M++,D=p.next())D=h(g,D.value,b),D!==null&&(w=l(D,w,M),N===null?A=D:N.sibling=D,N=D);return X&&Kn(g,M),A}for(_=i(_);!D.done;M++,D=p.next())D=m(_,g,M,D.value,b),D!==null&&(e&&D.alternate!==null&&_.delete(D.key===null?M:D.key),w=l(D,w,M),N===null?A=D:N.sibling=D,N=D);return e&&_.forEach(function(Re){return t(g,Re)}),X&&Kn(g,M),A}function E(g,w,p,b){if(typeof p=="object"&&p!==null&&p.type===ul&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case du:e:{for(var A=p.key;w!==null;){if(w.key===A){if(A=p.type,A===ul){if(w.tag===7){n(g,w.sibling),b=a(w,p.props.children),b.return=g,g=b;break e}}else if(w.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===vi&&Sa(A)===w.type){n(g,w.sibling),b=a(w,p.props),Zs(b,p),b.return=g,g=b;break e}n(g,w);break}else t(g,w);w=w.sibling}p.type===ul?(b=ya(p.props.children,g.mode,b,p.key),b.return=g,g=b):(b=Lu(p.type,p.key,p.props,null,g.mode,b),Zs(b,p),b.return=g,g=b)}return s(g);case _s:e:{for(A=p.key;w!==null;){if(w.key===A)if(w.tag===4&&w.stateNode.containerInfo===p.containerInfo&&w.stateNode.implementation===p.implementation){n(g,w.sibling),b=a(w,p.children||[]),b.return=g,g=b;break e}else{n(g,w);break}else t(g,w);w=w.sibling}b=md(p,g.mode,b),b.return=g,g=b}return s(g);case vi:return p=Sa(p),E(g,w,p,b)}if(As(p))return v(g,w,p,b);if(Ts(p)){if(A=Ts(p),typeof A!="function")throw Error(S(150));return p=A.call(p),x(g,w,p,b)}if(typeof p.then=="function")return E(g,w,qu(p),b);if(p.$$typeof===Fn)return E(g,w,Ru(g,p),b);Fu(g,p)}return typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint"?(p=""+p,w!==null&&w.tag===6?(n(g,w.sibling),b=a(w,p),b.return=g,g=b):(n(g,w),b=hd(p,g.mode,b),b.return=g,g=b),s(g)):n(g,w)}return function(g,w,p,b){try{Qs=0;var A=E(g,w,p,b);return Ol=null,A}catch(_){if(_===Dl||_===Hu)throw _;var N=Gt(29,_,null,g.mode);return N.lanes=b,N.return=g,N}finally{}}}var _a=I4(!0),J4=I4(!1),ji=!1;function Ad(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Mi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ci(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,P&2){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,t=ku(e),z4(e,null,n),t}return zu(e,i,t,n),ku(e)}function Ks(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,V3(e,n)}}function jd(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var a=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};l===null?a=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?a=l=t:l=l.next=t}else a=l=t;n={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:l,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Md=!1;function Is(){if(Md){var e=Cl;if(e!==null)throw e}}function Js(e,t,n,i){Md=!1;var a=e.updateQueue;ji=!1;var l=a.firstBaseUpdate,s=a.lastBaseUpdate,r=a.shared.pending;if(r!==null){a.shared.pending=null;var o=r,c=o.next;o.next=null,s===null?l=c:s.next=c,s=o;var f=e.alternate;f!==null&&(f=f.updateQueue,r=f.lastBaseUpdate,r!==s&&(r===null?f.firstBaseUpdate=c:r.next=c,f.lastBaseUpdate=o))}if(l!==null){var h=a.baseState;s=0,f=c=o=null,r=l;do{var d=r.lane&-536870913,m=d!==r.lane;if(m?(Y&d)===d:(i&d)===d){d!==0&&d===Ml&&(Md=!0),f!==null&&(f=f.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var v=e,x=r;d=t;var E=n;switch(x.tag){case 1:if(v=x.payload,typeof v=="function"){h=v.call(E,h,d);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,d=typeof v=="function"?v.call(E,h,d):v,d==null)break e;h=oe({},h,d);break e;case 2:ji=!0}}d=r.callback,d!==null&&(e.flags|=64,m&&(e.flags|=8192),m=a.callbacks,m===null?a.callbacks=[d]:m.push(d))}else m={lane:d,tag:r.tag,payload:r.payload,callback:r.callback,next:null},f===null?(c=f=m,o=h):f=f.next=m,s|=d;if(r=r.next,r===null){if(r=a.shared.pending,r===null)break;m=r,r=m.next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}while(!0);f===null&&(o=h),a.baseState=o,a.firstBaseUpdate=c,a.lastBaseUpdate=f,l===null&&(a.shared.lanes=0),Li|=s,e.lanes=s,e.memoizedState=h}}function W4(e,t){if(typeof e!="function")throw Error(S(191,e));e.call(t)}function P4(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)W4(n[e],t)}var zl=Dn(null),Yu=Dn(0);function $4(e,t){e=li,ue(Yu,e),ue(zl,t),li=e|t.baseLanes}function Cd(){ue(Yu,li),ue(zl,zl.current)}function Dd(){li=Yu.current,Ke(zl),Ke(Yu)}var Ht=Dn(null),rn=null;function Di(e){var t=e.alternate;ue(je,je.current&1),ue(Ht,e),rn===null&&(t===null||zl.current!==null||t.memoizedState!==null)&&(rn=e)}function Od(e){ue(je,je.current),ue(Ht,e),rn===null&&(rn=e)}function em(e){e.tag===22?(ue(je,je.current),ue(Ht,e),rn===null&&(rn=e)):Oi()}function Oi(){ue(je,je.current),ue(Ht,Ht.current)}function Vt(e){Ke(Ht),rn===e&&(rn=null),Ke(je)}var je=Dn(0);function Xu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||R2(n)||G2(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wn=0,H=null,ie=null,Le=null,Qu=!1,kl=!1,Ta=!1,Zu=0,Ws=0,Ll=null,dv=0;function xe(){throw Error(S(321))}function zd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rt(e[n],t[n]))return!1;return!0}function kd(e,t,n,i,a,l){return Wn=l,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?Bm:Id,Ta=!1,l=n(i,a),Ta=!1,kl&&(l=nm(t,n,i,a)),tm(e),l}function tm(e){B.H=er;var t=ie!==null&&ie.next!==null;if(Wn=0,Le=ie=H=null,Qu=!1,Ws=0,Ll=null,t)throw Error(S(300));e===null||Ue||(e=e.dependencies,e!==null&&Bu(e)&&(Ue=!0))}function nm(e,t,n,i){H=e;var a=0;do{if(kl&&(Ll=null),Ws=0,kl=!1,25<=a)throw Error(S(301));if(a+=1,Le=ie=null,e.updateQueue!=null){var l=e.updateQueue;l.lastEffect=null,l.events=null,l.stores=null,l.memoCache!=null&&(l.memoCache.index=0)}B.H=Rm,l=t(n,i)}while(kl);return l}function hv(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?Ps(t):t,e=e.useState()[0],(ie!==null?ie.memoizedState:null)!==e&&(H.flags|=1024),t}function Ld(){var e=Zu!==0;return Zu=0,e}function Ud(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Bd(e){if(Qu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qu=!1}Wn=0,Le=ie=H=null,kl=!1,Ws=Zu=0,Ll=null}function st(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?H.memoizedState=Le=e:Le=Le.next=e,Le}function Me(){if(ie===null){var e=H.alternate;e=e!==null?e.memoizedState:null}else e=ie.next;var t=Le===null?H.memoizedState:Le.next;if(t!==null)Le=t,ie=e;else{if(e===null)throw H.alternate===null?Error(S(467)):Error(S(310));ie=e,e={memoizedState:ie.memoizedState,baseState:ie.baseState,baseQueue:ie.baseQueue,queue:ie.queue,next:null},Le===null?H.memoizedState=Le=e:Le=Le.next=e}return Le}function Ku(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ps(e){var t=Ws;return Ws+=1,Ll===null&&(Ll=[]),e=Q4(Ll,e,t),t=H,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?Bm:Id),e}function Iu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ps(e);if(e.$$typeof===Fn)return et(e)}throw Error(S(438,String(e)))}function Rd(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=H.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ku(),H.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=Py;return t.index++,n}function Pn(e,t){return typeof t=="function"?t(e):t}function Ju(e){var t=Me();return Gd(t,ie,e)}function Gd(e,t,n){var i=e.queue;if(i===null)throw Error(S(311));i.lastRenderedReducer=n;var a=e.baseQueue,l=i.pending;if(l!==null){if(a!==null){var s=a.next;a.next=l.next,l.next=s}t.baseQueue=a=l,i.pending=null}if(l=e.baseState,a===null)e.memoizedState=l;else{t=a.next;var r=s=null,o=null,c=t,f=!1;do{var h=c.lane&-536870913;if(h!==c.lane?(Y&h)===h:(Wn&h)===h){var d=c.revertLane;if(d===0)o!==null&&(o=o.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===Ml&&(f=!0);else if((Wn&d)===d){c=c.next,d===Ml&&(f=!0);continue}else h={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(r=o=h,s=l):o=o.next=h,H.lanes|=d,Li|=d;h=c.action,Ta&&n(l,h),l=c.hasEagerState?c.eagerState:n(l,h)}else d={lane:h,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(r=o=d,s=l):o=o.next=d,H.lanes|=h,Li|=h;c=c.next}while(c!==null&&c!==t);if(o===null?s=l:o.next=r,!Rt(l,e.memoizedState)&&(Ue=!0,f&&(n=Cl,n!==null)))throw n;e.memoizedState=l,e.baseState=s,e.baseQueue=o,i.lastRenderedState=l}return a===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Hd(e){var t=Me(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,l=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do l=e(l,s.action),s=s.next;while(s!==a);Rt(l,t.memoizedState)||(Ue=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,i]}function im(e,t,n){var i=H,a=Me(),l=X;if(l){if(n===void 0)throw Error(S(407));n=n()}else n=t();var s=!Rt((ie||a).memoizedState,n);if(s&&(a.memoizedState=n,Ue=!0),a=a.queue,Fd(sm.bind(null,i,a,e),[e]),a.getSnapshot!==t||s||Le!==null&&Le.memoizedState.tag&1){if(i.flags|=2048,Ul(9,{destroy:void 0},lm.bind(null,i,a,n,t),null),le===null)throw Error(S(349));l||Wn&127||am(i,t,n)}return n}function am(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=Ku(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function lm(e,t,n,i){t.value=n,t.getSnapshot=i,rm(t)&&um(e)}function sm(e,t,n){return n(function(){rm(t)&&um(e)})}function rm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rt(e,n)}catch{return!0}}function um(e){var t=wa(e,2);t!==null&&bt(t,e,2)}function Vd(e){var t=st();if(typeof e=="function"){var n=e;if(e=n(),Ta){xi(!0);try{n()}finally{xi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:e},t}function om(e,t,n,i){return e.baseState=n,Gd(e,ie,typeof i=="function"?i:Pn)}function mv(e,t,n,i,a){if($u(e))throw Error(S(485));if(e=t.action,e!==null){var l={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){l.listeners.push(s)}};B.T!==null?n(!0):l.isTransition=!1,i(l),n=t.pending,n===null?(l.next=t.pending=l,cm(t,l)):(l.next=n.next,t.pending=n.next=l)}}function cm(e,t){var n=t.action,i=t.payload,a=e.state;if(t.isTransition){var l=B.T,s={};B.T=s;try{var r=n(a,i),o=B.S;o!==null&&o(s,r),fm(e,t,r)}catch(c){qd(e,t,c)}finally{l!==null&&s.types!==null&&(l.types=s.types),B.T=l}}else try{l=n(a,i),fm(e,t,l)}catch(c){qd(e,t,c)}}function fm(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){dm(e,t,i)},function(i){return qd(e,t,i)}):dm(e,t,n)}function dm(e,t,n){t.status="fulfilled",t.value=n,hm(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,cm(e,n)))}function qd(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,hm(t),t=t.next;while(t!==i)}e.action=null}function hm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mm(e,t){return t}function gm(e,t){if(X){var n=le.formState;if(n!==null){e:{var i=H;if(X){if(ce){t:{for(var a=ce,l=sn;a.nodeType!==8;){if(!l){a=null;break t}if(a=un(a.nextSibling),a===null){a=null;break t}}l=a.data,a=l==="F!"||l==="F"?a:null}if(a){ce=un(a.nextSibling),i=a.data==="F!";break e}}Ai(i)}i=!1}i&&(t=n[0])}}return n=st(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mm,lastRenderedState:t},n.queue=i,n=km.bind(null,H,i),i.dispatch=n,i=Vd(!1),l=Kd.bind(null,H,!1,i.queue),i=st(),a={state:t,dispatch:null,action:e,pending:null},i.queue=a,n=mv.bind(null,H,a,l,n),a.dispatch=n,i.memoizedState=e,[t,n,!1]}function wm(e){var t=Me();return ym(t,ie,e)}function ym(e,t,n){if(t=Gd(e,t,mm)[0],e=Ju(Pn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ps(t)}catch(s){throw s===Dl?Hu:s}else i=t;t=Me();var a=t.queue,l=a.dispatch;return n!==t.memoizedState&&(H.flags|=2048,Ul(9,{destroy:void 0},gv.bind(null,a,n),null)),[i,l,e]}function gv(e,t){e.action=t}function pm(e){var t=Me(),n=ie;if(n!==null)return ym(t,n,e);Me(),t=t.memoizedState,n=Me();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Ul(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},t=H.updateQueue,t===null&&(t=Ku(),H.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function vm(){return Me().memoizedState}function Wu(e,t,n,i){var a=st();H.flags|=e,a.memoizedState=Ul(1|t,{destroy:void 0},n,i===void 0?null:i)}function Pu(e,t,n,i){var a=Me();i=i===void 0?null:i;var l=a.memoizedState.inst;ie!==null&&i!==null&&zd(i,ie.memoizedState.deps)?a.memoizedState=Ul(t,l,n,i):(H.flags|=e,a.memoizedState=Ul(1|t,l,n,i))}function bm(e,t){Wu(8390656,8,e,t)}function Fd(e,t){Pu(2048,8,e,t)}function wv(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=Ku(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function xm(e){var t=Me().memoizedState;return wv({ref:t,nextImpl:e}),function(){if(P&2)throw Error(S(440));return t.impl.apply(void 0,arguments)}}function Sm(e,t){return Pu(4,2,e,t)}function Em(e,t){return Pu(4,4,e,t)}function _m(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Tm(e,t,n){n=n!=null?n.concat([e]):null,Pu(4,4,_m.bind(null,t,e),n)}function Yd(){}function Am(e,t){var n=Me();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&zd(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Nm(e,t){var n=Me();t=t===void 0?null:t;var i=n.memoizedState;if(t!==null&&zd(t,i[1]))return i[0];if(i=e(),Ta){xi(!0);try{e()}finally{xi(!1)}}return n.memoizedState=[i,t],i}function Xd(e,t,n){return n===void 0||Wn&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=jg(),H.lanes|=e,Li|=e,n)}function jm(e,t,n,i){return Rt(n,t)?n:zl.current!==null?(e=Xd(e,n,i),Rt(e,t)||(Ue=!0),e):!(Wn&42)||Wn&1073741824&&!(Y&261930)?(Ue=!0,e.memoizedState=n):(e=jg(),H.lanes|=e,Li|=e,t)}function Mm(e,t,n,i,a){var l=W.p;W.p=l!==0&&8>l?l:8;var s=B.T,r={};B.T=r,Kd(e,!1,t,n);try{var o=a(),c=B.S;if(c!==null&&c(r,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var f=fv(o,i);$s(e,t,f,Yt(e))}else $s(e,t,i,Yt(e))}catch(h){$s(e,t,{then:function(){},status:"rejected",reason:h},Yt())}finally{W.p=l,s!==null&&r.types!==null&&(s.types=r.types),B.T=s}}function yv(){}function Qd(e,t,n,i){if(e.tag!==5)throw Error(S(476));var a=Cm(e).queue;Mm(e,a,t,oa,n===null?yv:function(){return Dm(e),n(i)})}function Cm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oa,baseState:oa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:oa},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Dm(e){var t=Cm(e);t.next===null&&(t=e.alternate.memoizedState),$s(e,t.next.queue,{},Yt())}function Zd(){return et(wr)}function Om(){return Me().memoizedState}function zm(){return Me().memoizedState}function pv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Yt();e=Mi(n);var i=Ci(t,e,n);i!==null&&(bt(i,t,n),Ks(i,t,n)),t={cache:Sd()},e.payload=t;return}t=t.return}}function vv(e,t,n){var i=Yt();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},$u(e)?Lm(t,n):(n=fd(e,t,n,i),n!==null&&(bt(n,e,i),Um(n,t,i)))}function km(e,t,n){var i=Yt();$s(e,t,n,i)}function $s(e,t,n,i){var a={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if($u(e))Lm(t,a);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,r=l(s,n);if(a.hasEagerState=!0,a.eagerState=r,Rt(r,s))return zu(e,t,a,0),le===null&&Ou(),!1}catch{}finally{}if(n=fd(e,t,a,i),n!==null)return bt(n,e,i),Um(n,t,i),!0}return!1}function Kd(e,t,n,i){if(i={lane:2,revertLane:A2(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},$u(e)){if(t)throw Error(S(479))}else t=fd(e,n,i,2),t!==null&&bt(t,e,2)}function $u(e){var t=e.alternate;return e===H||t!==null&&t===H}function Lm(e,t){kl=Qu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Um(e,t,n){if(n&4194048){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,V3(e,n)}}var er={readContext:et,use:Iu,useCallback:xe,useContext:xe,useEffect:xe,useImperativeHandle:xe,useLayoutEffect:xe,useInsertionEffect:xe,useMemo:xe,useReducer:xe,useRef:xe,useState:xe,useDebugValue:xe,useDeferredValue:xe,useTransition:xe,useSyncExternalStore:xe,useId:xe,useHostTransitionStatus:xe,useFormState:xe,useActionState:xe,useOptimistic:xe,useMemoCache:xe,useCacheRefresh:xe};er.useEffectEvent=xe;var Bm={readContext:et,use:Iu,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:et,useEffect:bm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Wu(4194308,4,_m.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wu(4194308,4,e,t)},useInsertionEffect:function(e,t){Wu(4,2,e,t)},useMemo:function(e,t){var n=st();t=t===void 0?null:t;var i=e();if(Ta){xi(!0);try{e()}finally{xi(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=st();if(n!==void 0){var a=n(t);if(Ta){xi(!0);try{n(t)}finally{xi(!1)}}}else a=t;return i.memoizedState=i.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},i.queue=e,e=e.dispatch=vv.bind(null,H,e),[i.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:function(e){e=Vd(e);var t=e.queue,n=km.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Yd,useDeferredValue:function(e,t){var n=st();return Xd(n,e,t)},useTransition:function(){var e=Vd(!1);return e=Mm.bind(null,H,e.queue,!0,!1),st().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=H,a=st();if(X){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),le===null)throw Error(S(349));Y&127||am(i,t,n)}a.memoizedState=n;var l={value:n,getSnapshot:t};return a.queue=l,bm(sm.bind(null,i,l,e),[e]),i.flags|=2048,Ul(9,{destroy:void 0},lm.bind(null,i,l,n,t),null),n},useId:function(){var e=st(),t=le.identifierPrefix;if(X){var n=kn,i=zn;n=(i&~(1<<32-Bt(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Zu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=dv++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Zd,useFormState:gm,useActionState:gm,useOptimistic:function(e){var t=st();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Kd.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:Rd,useCacheRefresh:function(){return st().memoizedState=pv.bind(null,H)},useEffectEvent:function(e){var t=st(),n={impl:e};return t.memoizedState=n,function(){if(P&2)throw Error(S(440));return n.impl.apply(void 0,arguments)}}},Id={readContext:et,use:Iu,useCallback:Am,useContext:et,useEffect:Fd,useImperativeHandle:Tm,useInsertionEffect:Sm,useLayoutEffect:Em,useMemo:Nm,useReducer:Ju,useRef:vm,useState:function(){return Ju(Pn)},useDebugValue:Yd,useDeferredValue:function(e,t){var n=Me();return jm(n,ie.memoizedState,e,t)},useTransition:function(){var e=Ju(Pn)[0],t=Me().memoizedState;return[typeof e=="boolean"?e:Ps(e),t]},useSyncExternalStore:im,useId:Om,useHostTransitionStatus:Zd,useFormState:wm,useActionState:wm,useOptimistic:function(e,t){var n=Me();return om(n,ie,e,t)},useMemoCache:Rd,useCacheRefresh:zm};Id.useEffectEvent=xm;var Rm={readContext:et,use:Iu,useCallback:Am,useContext:et,useEffect:Fd,useImperativeHandle:Tm,useInsertionEffect:Sm,useLayoutEffect:Em,useMemo:Nm,useReducer:Hd,useRef:vm,useState:function(){return Hd(Pn)},useDebugValue:Yd,useDeferredValue:function(e,t){var n=Me();return ie===null?Xd(n,e,t):jm(n,ie.memoizedState,e,t)},useTransition:function(){var e=Hd(Pn)[0],t=Me().memoizedState;return[typeof e=="boolean"?e:Ps(e),t]},useSyncExternalStore:im,useId:Om,useHostTransitionStatus:Zd,useFormState:pm,useActionState:pm,useOptimistic:function(e,t){var n=Me();return ie!==null?om(n,ie,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Rd,useCacheRefresh:zm};Rm.useEffectEvent=xm;function Jd(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:oe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wd={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Yt(),a=Mi(i);a.payload=t,n!=null&&(a.callback=n),t=Ci(e,a,i),t!==null&&(bt(t,e,i),Ks(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Yt(),a=Mi(i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Ci(e,a,i),t!==null&&(bt(t,e,i),Ks(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Yt(),i=Mi(n);i.tag=2,t!=null&&(i.callback=t),t=Ci(e,i,n),t!==null&&(bt(t,e,n),Ks(t,e,n))}};function Gm(e,t,n,i,a,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,l,s):t.prototype&&t.prototype.isPureReactComponent?!Hs(n,i)||!Hs(a,l):!0}function Hm(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Wd.enqueueReplaceState(t,t.state,null)}function Aa(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=oe({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Vm(e){Du(e)}function qm(e){console.error(e)}function Fm(e){Du(e)}function eo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Ym(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Pd(e,t,n){return n=Mi(n),n.tag=3,n.payload={element:null},n.callback=function(){eo(e,t)},n}function Xm(e){return e=Mi(e),e.tag=3,e}function Qm(e,t,n,i){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var l=i.value;e.payload=function(){return a(l)},e.callback=function(){Ym(t,n,i)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){Ym(t,n,i),typeof a!="function"&&(Ui===null?Ui=new Set([this]):Ui.add(this));var r=i.stack;this.componentDidCatch(i.value,{componentStack:r!==null?r:""})})}function bv(e,t,n,i,a){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&jl(t,n,a,!0),n=Ht.current,n!==null){switch(n.tag){case 31:case 13:return rn===null?ho():n.alternate===null&&Se===0&&(Se=3),n.flags&=-257,n.flags|=65536,n.lanes=a,i===Vu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),E2(e,i,a)),!1;case 22:return n.flags|=65536,i===Vu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),E2(e,i,a)),!1}throw Error(S(435,n.tag))}return E2(e,i,a),ho(),!1}if(X)return t=Ht.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,i!==yd&&(e=Error(S(422),{cause:i}),Fs(nn(e,n)))):(i!==yd&&(t=Error(S(423),{cause:i}),Fs(nn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,i=nn(i,n),a=Pd(e.stateNode,i,a),jd(e,a),Se!==4&&(Se=2)),!1;var l=Error(S(520),{cause:i});if(l=nn(l,n),ur===null?ur=[l]:ur.push(l),Se!==4&&(Se=2),t===null)return!0;i=nn(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Pd(n.stateNode,i,e),jd(n,e),!1;case 1:if(t=n.type,l=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||l!==null&&typeof l.componentDidCatch=="function"&&(Ui===null||!Ui.has(l))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Xm(a),Qm(a,e,n,i),jd(n,a),!1}n=n.return}while(n!==null);return!1}var $d=Error(S(461)),Ue=!1;function tt(e,t,n,i){t.child=e===null?J4(t,null,n,i):_a(t,e.child,n,i)}function Zm(e,t,n,i,a){n=n.render;var l=t.ref;if("ref"in i){var s={};for(var r in i)r!=="ref"&&(s[r]=i[r])}else s=i;return ba(t),i=kd(e,t,n,s,l,a),r=Ld(),e!==null&&!Ue?(Ud(e,t,a),$n(e,t,a)):(X&&r&&gd(t),t.flags|=1,tt(e,t,i,a),t.child)}function Km(e,t,n,i,a){if(e===null){var l=n.type;return typeof l=="function"&&!dd(l)&&l.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=l,Im(e,t,l,i,a)):(e=Lu(n.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!r2(e,a)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:Hs,n(s,i)&&e.ref===t.ref)return $n(e,t,a)}return t.flags|=1,e=Zn(l,i),e.ref=t.ref,e.return=t,t.child=e}function Im(e,t,n,i,a){if(e!==null){var l=e.memoizedProps;if(Hs(l,i)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=i=l,r2(e,a))e.flags&131072&&(Ue=!0);else return t.lanes=e.lanes,$n(e,t,a)}return e2(e,t,n,i,a)}function Jm(e,t,n,i){var a=i.children,l=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if(t.flags&128){if(l=l!==null?l.baseLanes|n:n,e!==null){for(i=t.child=e.child,a=0;i!==null;)a=a|i.lanes|i.childLanes,i=i.sibling;i=a&~l}else i=0,t.child=null;return Wm(e,t,l,n,i)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gu(t,l!==null?l.cachePool:null),l!==null?$4(t,l):Cd(),em(t);else return i=t.lanes=536870912,Wm(e,t,l!==null?l.baseLanes|n:n,n,i)}else l!==null?(Gu(t,l.cachePool),$4(t,l),Oi(),t.memoizedState=null):(e!==null&&Gu(t,null),Cd(),Oi());return tt(e,t,a,n),t.child}function tr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Wm(e,t,n,i,a){var l=_d();return l=l===null?null:{parent:ke._currentValue,pool:l},t.memoizedState={baseLanes:n,cachePool:l},e!==null&&Gu(t,null),Cd(),em(t),e!==null&&jl(e,t,i,!0),t.childLanes=a,null}function to(e,t){return t=io({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pm(e,t,n){return _a(t,e.child,null,n),e=to(t,t.pendingProps),e.flags|=2,Vt(t),t.memoizedState=null,e}function xv(e,t,n){var i=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(X){if(i.mode==="hidden")return e=to(t,i),t.lanes=536870912,tr(null,e);if(Od(t),(e=ce)?(e=cw(e,sn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i!==null?{id:zn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},n=L4(e),n.return=t,t.child=n,$e=t,ce=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return to(t,i)}var l=e.memoizedState;if(l!==null){var s=l.dehydrated;if(Od(t),a)if(t.flags&256)t.flags&=-257,t=Pm(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(S(558));else if(Ue||jl(e,t,n,!1),a=(n&e.childLanes)!==0,Ue||a){if(i=le,i!==null&&(s=q3(i,n),s!==0&&s!==l.retryLane))throw l.retryLane=s,wa(e,s),bt(i,e,s),$d;ho(),t=Pm(e,t,n)}else e=l.treeContext,ce=un(s.nextSibling),$e=t,X=!0,Ti=null,sn=!1,e!==null&&R4(t,e),t=to(t,i),t.flags|=4096;return t}return e=Zn(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function no(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(S(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function e2(e,t,n,i,a){return ba(t),n=kd(e,t,n,i,void 0,a),i=Ld(),e!==null&&!Ue?(Ud(e,t,a),$n(e,t,a)):(X&&i&&gd(t),t.flags|=1,tt(e,t,n,a),t.child)}function $m(e,t,n,i,a,l){return ba(t),t.updateQueue=null,n=nm(t,i,n,a),tm(e),i=Ld(),e!==null&&!Ue?(Ud(e,t,l),$n(e,t,l)):(X&&i&&gd(t),t.flags|=1,tt(e,t,n,l),t.child)}function eg(e,t,n,i,a){if(ba(t),t.stateNode===null){var l=_l,s=n.contextType;typeof s=="object"&&s!==null&&(l=et(s)),l=new n(i,l),t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Wd,t.stateNode=l,l._reactInternals=t,l=t.stateNode,l.props=i,l.state=t.memoizedState,l.refs={},Ad(t),s=n.contextType,l.context=typeof s=="object"&&s!==null?et(s):_l,l.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(Jd(t,n,s,i),l.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(s=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),s!==l.state&&Wd.enqueueReplaceState(l,l.state,null),Js(t,i,l,a),Is(),l.state=t.memoizedState),typeof l.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){l=t.stateNode;var r=t.memoizedProps,o=Aa(n,r);l.props=o;var c=l.context,f=n.contextType;s=_l,typeof f=="object"&&f!==null&&(s=et(f));var h=n.getDerivedStateFromProps;f=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(r||c!==s)&&Hm(t,l,i,s),ji=!1;var d=t.memoizedState;l.state=d,Js(t,i,l,a),Is(),c=t.memoizedState,r||d!==c||ji?(typeof h=="function"&&(Jd(t,n,h,i),c=t.memoizedState),(o=ji||Gm(t,n,o,i,d,c,s))?(f||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=c),l.props=i,l.state=c,l.context=s,i=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{l=t.stateNode,Nd(e,t),s=t.memoizedProps,f=Aa(n,s),l.props=f,h=t.pendingProps,d=l.context,c=n.contextType,o=_l,typeof c=="object"&&c!==null&&(o=et(c)),r=n.getDerivedStateFromProps,(c=typeof r=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==h||d!==o)&&Hm(t,l,i,o),ji=!1,d=t.memoizedState,l.state=d,Js(t,i,l,a),Is();var m=t.memoizedState;s!==h||d!==m||ji||e!==null&&e.dependencies!==null&&Bu(e.dependencies)?(typeof r=="function"&&(Jd(t,n,r,i),m=t.memoizedState),(f=ji||Gm(t,n,f,i,d,m,o)||e!==null&&e.dependencies!==null&&Bu(e.dependencies))?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(i,m,o),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(i,m,o)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=m),l.props=i,l.state=m,l.context=o,i=f):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),i=!1)}return l=i,no(e,t),i=(t.flags&128)!==0,l||i?(l=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:l.render(),t.flags|=1,e!==null&&i?(t.child=_a(t,e.child,null,a),t.child=_a(t,null,n,a)):tt(e,t,n,a),t.memoizedState=l.state,e=t.child):e=$n(e,t,a),e}function tg(e,t,n,i){return pa(),t.flags|=256,tt(e,t,n,i),t.child}var t2={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function n2(e){return{baseLanes:e,cachePool:Y4()}}function i2(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ft),e}function ng(e,t,n){var i=t.pendingProps,a=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(je.current&2)!==0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(X){if(a?Di(t):Oi(),(e=ce)?(e=cw(e,sn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i!==null?{id:zn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},n=L4(e),n.return=t,t.child=n,$e=t,ce=null)):e=null,e===null)throw Ai(t);return G2(e)?t.lanes=32:t.lanes=536870912,null}var r=i.children;return i=i.fallback,a?(Oi(),a=t.mode,r=io({mode:"hidden",children:r},a),i=ya(i,a,n,null),r.return=t,i.return=t,r.sibling=i,t.child=r,i=t.child,i.memoizedState=n2(n),i.childLanes=i2(e,s,n),t.memoizedState=t2,tr(null,i)):(Di(t),a2(t,r))}var o=e.memoizedState;if(o!==null&&(r=o.dehydrated,r!==null)){if(l)t.flags&256?(Di(t),t.flags&=-257,t=l2(e,t,n)):t.memoizedState!==null?(Oi(),t.child=e.child,t.flags|=128,t=null):(Oi(),r=i.fallback,a=t.mode,i=io({mode:"visible",children:i.children},a),r=ya(r,a,n,null),r.flags|=2,i.return=t,r.return=t,i.sibling=r,t.child=i,_a(t,e.child,null,n),i=t.child,i.memoizedState=n2(n),i.childLanes=i2(e,s,n),t.memoizedState=t2,t=tr(null,i));else if(Di(t),G2(r)){if(s=r.nextSibling&&r.nextSibling.dataset,s)var c=s.dgst;s=c,i=Error(S(419)),i.stack="",i.digest=s,Fs({value:i,source:null,stack:null}),t=l2(e,t,n)}else if(Ue||jl(e,t,n,!1),s=(n&e.childLanes)!==0,Ue||s){if(s=le,s!==null&&(i=q3(s,n),i!==0&&i!==o.retryLane))throw o.retryLane=i,wa(e,i),bt(s,e,i),$d;R2(r)||ho(),t=l2(e,t,n)}else R2(r)?(t.flags|=192,t.child=e.child,t=null):(e=o.treeContext,ce=un(r.nextSibling),$e=t,X=!0,Ti=null,sn=!1,e!==null&&R4(t,e),t=a2(t,i.children),t.flags|=4096);return t}return a?(Oi(),r=i.fallback,a=t.mode,o=e.child,c=o.sibling,i=Zn(o,{mode:"hidden",children:i.children}),i.subtreeFlags=o.subtreeFlags&65011712,c!==null?r=Zn(c,r):(r=ya(r,a,n,null),r.flags|=2),r.return=t,i.return=t,i.sibling=r,t.child=i,tr(null,i),i=t.child,r=e.child.memoizedState,r===null?r=n2(n):(a=r.cachePool,a!==null?(o=ke._currentValue,a=a.parent!==o?{parent:o,pool:o}:a):a=Y4(),r={baseLanes:r.baseLanes|n,cachePool:a}),i.memoizedState=r,i.childLanes=i2(e,s,n),t.memoizedState=t2,tr(e.child,i)):(Di(t),n=e.child,e=n.sibling,n=Zn(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function a2(e,t){return t=io({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function io(e,t){return e=Gt(22,e,null,t),e.lanes=0,e}function l2(e,t,n){return _a(t,e.child,null,n),e=a2(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ig(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),bd(e.return,t,n)}function s2(e,t,n,i,a,l){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:a,treeForkCount:l}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=a,s.treeForkCount=l)}function ag(e,t,n){var i=t.pendingProps,a=i.revealOrder,l=i.tail;i=i.children;var s=je.current,r=(s&2)!==0;if(r?(s=s&1|2,t.flags|=128):s&=1,ue(je,s),tt(e,t,i,n),i=X?qs:0,!r&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ig(e,n,t);else if(e.tag===19)ig(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Xu(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),s2(t,!1,a,n,l,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Xu(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}s2(t,!0,n,null,l,i);break;case"together":s2(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function $n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Li|=t.lanes,!(n&t.childLanes))if(e!==null){if(jl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,n=Zn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function r2(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Bu(e)))}function Sv(e,t,n){switch(t.tag){case 3:mu(t,t.stateNode.containerInfo),Ni(t,ke,e.memoizedState.cache),pa();break;case 27:case 5:Df(t);break;case 4:mu(t,t.stateNode.containerInfo);break;case 10:Ni(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Od(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Di(t),t.flags|=128,null):n&t.child.childLanes?ng(e,t,n):(Di(t),e=$n(e,t,n),e!==null?e.sibling:null);Di(t);break;case 19:var a=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(jl(e,t,n,!1),i=(n&t.childLanes)!==0),a){if(i)return ag(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),ue(je,je.current),i)break;return null;case 22:return t.lanes=0,Jm(e,t,n,t.pendingProps);case 24:Ni(t,ke,e.memoizedState.cache)}return $n(e,t,n)}function lg(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ue=!0;else{if(!r2(e,n)&&!(t.flags&128))return Ue=!1,Sv(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,X&&t.flags&1048576&&B4(t,qs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Sa(t.elementType),t.type=e,typeof e=="function")dd(e)?(i=Aa(e,i),t.tag=1,t=eg(null,t,e,i,n)):(t.tag=0,t=e2(null,t,e,i,n));else{if(e!=null){var a=e.$$typeof;if(a===_f){t.tag=11,t=Zm(null,t,e,i,n);break e}else if(a===Nf){t.tag=14,t=Km(null,t,e,i,n);break e}}throw t=Mf(e)||e,Error(S(306,t,""))}}return t;case 0:return e2(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,a=Aa(i,t.pendingProps),eg(e,t,i,a,n);case 3:e:{if(mu(t,t.stateNode.containerInfo),e===null)throw Error(S(387));i=t.pendingProps;var l=t.memoizedState;a=l.element,Nd(e,t),Js(t,i,null,n);var s=t.memoizedState;if(i=s.cache,Ni(t,ke,i),i!==l.cache&&xd(t,[ke],n,!0),Is(),i=s.element,l.isDehydrated)if(l={element:i,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){t=tg(e,t,i,n);break e}else if(i!==a){a=nn(Error(S(424)),t),Fs(a),t=tg(e,t,i,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ce=un(e.firstChild),$e=t,X=!0,Ti=null,sn=!0,n=J4(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(pa(),i===a){t=$n(e,t,n);break e}tt(e,t,i,n)}t=t.child}return t;case 26:return no(e,t),e===null?(n=ww(t.type,null,t.pendingProps,null))?t.memoizedState=n:X||(n=t.type,e=t.pendingProps,i=bo(bi.current).createElement(n),i[Pe]=t,i[mt]=e,nt(i,n,e),Ie(i),t.stateNode=i):t.memoizedState=ww(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Df(t),e===null&&X&&(i=t.stateNode=hw(t.type,t.pendingProps,bi.current),$e=t,sn=!0,a=ce,Hi(t.type)?(H2=a,ce=un(i.firstChild)):ce=a),tt(e,t,t.pendingProps.children,n),no(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&X&&((a=i=ce)&&(i=Pv(i,t.type,t.pendingProps,sn),i!==null?(t.stateNode=i,$e=t,ce=un(i.firstChild),sn=!1,a=!0):a=!1),a||Ai(t)),Df(t),a=t.type,l=t.pendingProps,s=e!==null?e.memoizedProps:null,i=l.children,L2(a,l)?i=null:s!==null&&L2(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=kd(e,t,hv,null,null,n),wr._currentValue=a),no(e,t),tt(e,t,i,n),t.child;case 6:return e===null&&X&&((e=n=ce)&&(n=$v(n,t.pendingProps,sn),n!==null?(t.stateNode=n,$e=t,ce=null,e=!0):e=!1),e||Ai(t)),null;case 13:return ng(e,t,n);case 4:return mu(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=_a(t,null,i,n):tt(e,t,i,n),t.child;case 11:return Zm(e,t,t.type,t.pendingProps,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,Ni(t,t.type,i.value),tt(e,t,i.children,n),t.child;case 9:return a=t.type._context,i=t.pendingProps.children,ba(t),a=et(a),i=i(a),t.flags|=1,tt(e,t,i,n),t.child;case 14:return Km(e,t,t.type,t.pendingProps,n);case 15:return Im(e,t,t.type,t.pendingProps,n);case 19:return ag(e,t,n);case 31:return xv(e,t,n);case 22:return Jm(e,t,n,t.pendingProps);case 24:return ba(t),i=et(ke),e===null?(a=_d(),a===null&&(a=le,l=Sd(),a.pooledCache=l,l.refCount++,l!==null&&(a.pooledCacheLanes|=n),a=l),t.memoizedState={parent:i,cache:a},Ad(t),Ni(t,ke,a)):(e.lanes&n&&(Nd(e,t),Js(t,null,null,n),Is()),a=e.memoizedState,l=t.memoizedState,a.parent!==i?(a={parent:i,cache:i},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ni(t,ke,i)):(i=l.cache,Ni(t,ke,i),i!==a.cache&&xd(t,[ke],n,!0))),tt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(S(156,t.tag))}function ei(e){e.flags|=4}function u2(e,t,n,i,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Og())e.flags|=8192;else throw Ea=Vu,Td}else e.flags&=-16777217}function sg(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!xw(t))if(Og())e.flags|=8192;else throw Ea=Vu,Td}function ao(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?G3():536870912,e.lanes|=t,Hl|=t)}function nr(e,t){if(!X)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags&65011712,i|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Ev(e,t,n){var i=t.pendingProps;switch(wd(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fe(t),null;case 1:return fe(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Jn(ke),cl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Nl(t)?ei(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pd())),fe(t),null;case 26:var a=t.type,l=t.memoizedState;return e===null?(ei(t),l!==null?(fe(t),sg(t,l)):(fe(t),u2(t,a,null,i,n))):l?l!==e.memoizedState?(ei(t),fe(t),sg(t,l)):(fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&ei(t),fe(t),u2(t,a,e,i,n)),null;case 27:if(gu(t),n=bi.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ei(t);else{if(!i){if(t.stateNode===null)throw Error(S(166));return fe(t),null}e=On.current,Nl(t)?G4(t):(e=hw(a,i,n),t.stateNode=e,ei(t))}return fe(t),null;case 5:if(gu(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ei(t);else{if(!i){if(t.stateNode===null)throw Error(S(166));return fe(t),null}if(l=On.current,Nl(t))G4(t);else{var s=bo(bi.current);switch(l){case 1:l=s.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:l=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":l=s.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":l=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":l=s.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild);break;case"select":l=typeof i.is=="string"?s.createElement("select",{is:i.is}):s.createElement("select"),i.multiple?l.multiple=!0:i.size&&(l.size=i.size);break;default:l=typeof i.is=="string"?s.createElement(a,{is:i.is}):s.createElement(a)}}l[Pe]=t,l[mt]=i;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)l.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=l;e:switch(nt(l,a,i),a){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&ei(t)}}return fe(t),u2(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&ei(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(S(166));if(e=bi.current,Nl(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,a=$e,a!==null)switch(a.tag){case 27:case 5:i=a.memoizedProps}e[Pe]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||nw(e.nodeValue,n)),e||Ai(t,!0)}else e=bo(e).createTextNode(i),e[Pe]=t,t.stateNode=e}return fe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=Nl(t),n!==null){if(e===null){if(!i)throw Error(S(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(557));e[Pe]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fe(t),e=!1}else n=pd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Vt(t),t):(Vt(t),null);if(t.flags&128)throw Error(S(558))}return fe(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Nl(t),i!==null&&i.dehydrated!==null){if(e===null){if(!a)throw Error(S(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(S(317));a[Pe]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fe(t),a=!1}else a=pd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Vt(t),t):(Vt(t),null)}return Vt(t),t.flags&128?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(i=t.child,a=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(a=i.alternate.memoizedState.cachePool.pool),l=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),l!==a&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ao(t,t.updateQueue),fe(t),null);case 4:return cl(),e===null&&C2(t.stateNode.containerInfo),fe(t),null;case 10:return Jn(t.type),fe(t),null;case 19:if(Ke(je),i=t.memoizedState,i===null)return fe(t),null;if(a=(t.flags&128)!==0,l=i.rendering,l===null)if(a)nr(i,!1);else{if(Se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=Xu(e),l!==null){for(t.flags|=128,nr(i,!1),e=l.updateQueue,t.updateQueue=e,ao(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)k4(n,e),n=n.sibling;return ue(je,je.current&1|2),X&&Kn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Lt()>oo&&(t.flags|=128,a=!0,nr(i,!1),t.lanes=4194304)}else{if(!a)if(e=Xu(l),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ao(t,e),nr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!X)return fe(t),null}else 2*Lt()-i.renderingStartTime>oo&&n!==536870912&&(t.flags|=128,a=!0,nr(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(e=i.last,e!==null?e.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Lt(),e.sibling=null,n=je.current,ue(je,a?n&1|2:n&1),X&&Kn(t,i.treeForkCount),e):(fe(t),null);case 22:case 23:return Vt(t),Dd(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?n&536870912&&!(t.flags&128)&&(fe(t),t.subtreeFlags&6&&(t.flags|=8192)):fe(t),n=t.updateQueue,n!==null&&ao(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&Ke(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Jn(ke),fe(t),null;case 25:return null;case 30:return null}throw Error(S(156,t.tag))}function _v(e,t){switch(wd(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jn(ke),cl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return gu(t),null;case 31:if(t.memoizedState!==null){if(Vt(t),t.alternate===null)throw Error(S(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ke(je),null;case 4:return cl(),null;case 10:return Jn(t.type),null;case 22:case 23:return Vt(t),Dd(),e!==null&&Ke(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jn(ke),null;case 25:return null;default:return null}}function rg(e,t){switch(wd(t),t.tag){case 3:Jn(ke),cl();break;case 26:case 27:case 5:gu(t);break;case 4:cl();break;case 31:t.memoizedState!==null&&Vt(t);break;case 13:Vt(t);break;case 19:Ke(je);break;case 10:Jn(t.type);break;case 22:case 23:Vt(t),Dd(),e!==null&&Ke(xa);break;case 24:Jn(ke)}}function ir(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var a=i.next;n=a;do{if((n.tag&e)===e){i=void 0;var l=n.create,s=n.inst;i=l(),s.destroy=i}n=n.next}while(n!==a)}}catch(r){te(t,t.return,r)}}function zi(e,t,n){try{var i=t.updateQueue,a=i!==null?i.lastEffect:null;if(a!==null){var l=a.next;i=l;do{if((i.tag&e)===e){var s=i.inst,r=s.destroy;if(r!==void 0){s.destroy=void 0,a=t;var o=n,c=r;try{c()}catch(f){te(a,o,f)}}}i=i.next}while(i!==l)}}catch(f){te(t,t.return,f)}}function ug(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{P4(t,n)}catch(i){te(e,e.return,i)}}}function og(e,t,n){n.props=Aa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){te(e,t,i)}}function ar(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(a){te(e,t,a)}}function Ln(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(a){te(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){te(e,t,a)}else n.current=null}function cg(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(a){te(e,e.return,a)}}function o2(e,t,n){try{var i=e.stateNode;Qv(i,e.type,n,t),i[mt]=t}catch(a){te(e,e.return,a)}}function fg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hi(e.type)||e.tag===4}function c2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Hi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function f2(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xn));else if(i!==4&&(i===27&&Hi(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(f2(e,t,n),e=e.sibling;e!==null;)f2(e,t,n),e=e.sibling}function lo(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&Hi(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(lo(e,t,n),e=e.sibling;e!==null;)lo(e,t,n),e=e.sibling}function dg(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);nt(t,i,n),t[Pe]=e,t[mt]=n}catch(l){te(e,e.return,l)}}var ti=!1,Be=!1,d2=!1,hg=typeof WeakSet=="function"?WeakSet:Set,Je=null;function Tv(e,t){if(e=e.containerInfo,z2=No,e=T4(e),ld(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,l=i.focusNode;i=i.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,r=-1,o=-1,c=0,f=0,h=e,d=null;t:for(;;){for(var m;h!==n||a!==0&&h.nodeType!==3||(r=s+a),h!==l||i!==0&&h.nodeType!==3||(o=s+i),h.nodeType===3&&(s+=h.nodeValue.length),(m=h.firstChild)!==null;)d=h,h=m;for(;;){if(h===e)break t;if(d===n&&++c===a&&(r=s),d===l&&++f===i&&(o=s),(m=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=m}n=r===-1||o===-1?null:{start:r,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(k2={focusedElem:e,selectionRange:n},No=!1,Je=t;Je!==null;)if(t=Je,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Je=e;else for(;Je!==null;){switch(t=Je,l=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&l!==null){e=void 0,n=t,a=l.memoizedProps,l=l.memoizedState,i=n.stateNode;try{var v=Aa(n.type,a);e=i.getSnapshotBeforeUpdate(v,l),i.__reactInternalSnapshotBeforeUpdate=e}catch(x){te(n,n.return,x)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)B2(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":B2(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(S(163))}if(e=t.sibling,e!==null){e.return=t.return,Je=e;break}Je=t.return}}function mg(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:ii(e,n),i&4&&ir(5,n);break;case 1:if(ii(e,n),i&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(s){te(n,n.return,s)}else{var a=Aa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){te(n,n.return,s)}}i&64&&ug(n),i&512&&ar(n,n.return);break;case 3:if(ii(e,n),i&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{P4(e,t)}catch(s){te(n,n.return,s)}}break;case 27:t===null&&i&4&&dg(n);case 26:case 5:ii(e,n),t===null&&i&4&&cg(n),i&512&&ar(n,n.return);break;case 12:ii(e,n);break;case 31:ii(e,n),i&4&&yg(e,n);break;case 13:ii(e,n),i&4&&pg(e,n),i&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=kv.bind(null,n),e8(e,n))));break;case 22:if(i=n.memoizedState!==null||ti,!i){t=t!==null&&t.memoizedState!==null||Be,a=ti;var l=Be;ti=i,(Be=t)&&!l?ai(e,n,(n.subtreeFlags&8772)!==0):ii(e,n),ti=a,Be=l}break;case 30:break;default:ii(e,n)}}function gg(e){var t=e.alternate;t!==null&&(e.alternate=null,gg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qf(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ge=null,wt=!1;function ni(e,t,n){for(n=n.child;n!==null;)wg(e,t,n),n=n.sibling}function wg(e,t,n){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(js,n)}catch{}switch(n.tag){case 26:Be||Ln(n,t),ni(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Be||Ln(n,t);var i=ge,a=wt;Hi(n.type)&&(ge=n.stateNode,wt=!1),ni(e,t,n),hr(n.stateNode),ge=i,wt=a;break;case 5:Be||Ln(n,t);case 6:if(i=ge,a=wt,ge=null,ni(e,t,n),ge=i,wt=a,ge!==null)if(wt)try{(ge.nodeType===9?ge.body:ge.nodeName==="HTML"?ge.ownerDocument.body:ge).removeChild(n.stateNode)}catch(l){te(n,t,l)}else try{ge.removeChild(n.stateNode)}catch(l){te(n,t,l)}break;case 18:ge!==null&&(wt?(e=ge,uw(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Kl(e)):uw(ge,n.stateNode));break;case 4:i=ge,a=wt,ge=n.stateNode.containerInfo,wt=!0,ni(e,t,n),ge=i,wt=a;break;case 0:case 11:case 14:case 15:zi(2,n,t),Be||zi(4,n,t),ni(e,t,n);break;case 1:Be||(Ln(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&og(n,t,i)),ni(e,t,n);break;case 21:ni(e,t,n);break;case 22:Be=(i=Be)||n.memoizedState!==null,ni(e,t,n),Be=i;break;default:ni(e,t,n)}}function yg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kl(e)}catch(n){te(t,t.return,n)}}}function pg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kl(e)}catch(n){te(t,t.return,n)}}function Av(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new hg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new hg),t;default:throw Error(S(435,e.tag))}}function so(e,t){var n=Av(e);t.forEach(function(i){if(!n.has(i)){n.add(i);var a=Lv.bind(null,e,i);i.then(a,a)}})}function yt(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i],l=e,s=t,r=s;e:for(;r!==null;){switch(r.tag){case 27:if(Hi(r.type)){ge=r.stateNode,wt=!1;break e}break;case 5:ge=r.stateNode,wt=!1;break e;case 3:case 4:ge=r.stateNode.containerInfo,wt=!0;break e}r=r.return}if(ge===null)throw Error(S(160));wg(l,s,a),ge=null,wt=!1,l=a.alternate,l!==null&&(l.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vg(t,e),t=t.sibling}var pn=null;function vg(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yt(t,e),pt(e),i&4&&(zi(3,e,e.return),ir(3,e),zi(5,e,e.return));break;case 1:yt(t,e),pt(e),i&512&&(Be||n===null||Ln(n,n.return)),i&64&&ti&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var a=pn;if(yt(t,e),pt(e),i&512&&(Be||n===null||Ln(n,n.return)),i&4){var l=n!==null?n.memoizedState:null;if(i=e.memoizedState,n===null)if(i===null)if(e.stateNode===null){e:{i=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(i){case"title":l=a.getElementsByTagName("title")[0],(!l||l[Ds]||l[Pe]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=a.createElement(i),a.head.insertBefore(l,a.querySelector("head > title"))),nt(l,i,n),l[Pe]=e,Ie(l),i=l;break e;case"link":var s=vw("link","href",a).get(i+(n.href||""));if(s){for(var r=0;r<s.length;r++)if(l=s[r],l.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&l.getAttribute("rel")===(n.rel==null?null:n.rel)&&l.getAttribute("title")===(n.title==null?null:n.title)&&l.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(r,1);break t}}l=a.createElement(i),nt(l,i,n),a.head.appendChild(l);break;case"meta":if(s=vw("meta","content",a).get(i+(n.content||""))){for(r=0;r<s.length;r++)if(l=s[r],l.getAttribute("content")===(n.content==null?null:""+n.content)&&l.getAttribute("name")===(n.name==null?null:n.name)&&l.getAttribute("property")===(n.property==null?null:n.property)&&l.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&l.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(r,1);break t}}l=a.createElement(i),nt(l,i,n),a.head.appendChild(l);break;default:throw Error(S(468,i))}l[Pe]=e,Ie(l),i=l}e.stateNode=i}else bw(a,e.type,e.stateNode);else e.stateNode=pw(a,i,e.memoizedProps);else l!==i?(l===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):l.count--,i===null?bw(a,e.type,e.stateNode):pw(a,i,e.memoizedProps)):i===null&&e.stateNode!==null&&o2(e,e.memoizedProps,n.memoizedProps)}break;case 27:yt(t,e),pt(e),i&512&&(Be||n===null||Ln(n,n.return)),n!==null&&i&4&&o2(e,e.memoizedProps,n.memoizedProps);break;case 5:if(yt(t,e),pt(e),i&512&&(Be||n===null||Ln(n,n.return)),e.flags&32){a=e.stateNode;try{yl(a,"")}catch(v){te(e,e.return,v)}}i&4&&e.stateNode!=null&&(a=e.memoizedProps,o2(e,a,n!==null?n.memoizedProps:a)),i&1024&&(d2=!0);break;case 6:if(yt(t,e),pt(e),i&4){if(e.stateNode===null)throw Error(S(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(v){te(e,e.return,v)}}break;case 3:if(Eo=null,a=pn,pn=xo(t.containerInfo),yt(t,e),pn=a,pt(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Kl(t.containerInfo)}catch(v){te(e,e.return,v)}d2&&(d2=!1,bg(e));break;case 4:i=pn,pn=xo(e.stateNode.containerInfo),yt(t,e),pt(e),pn=i;break;case 12:yt(t,e),pt(e);break;case 31:yt(t,e),pt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,so(e,i)));break;case 13:yt(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uo=Lt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,so(e,i)));break;case 22:a=e.memoizedState!==null;var o=n!==null&&n.memoizedState!==null,c=ti,f=Be;if(ti=c||a,Be=f||o,yt(t,e),Be=f,ti=c,pt(e),i&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||o||ti||Be||Na(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){o=n=t;try{if(l=o.stateNode,a)s=l.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{r=o.stateNode;var h=o.memoizedProps.style,d=h!=null&&h.hasOwnProperty("display")?h.display:null;r.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(v){te(o,o.return,v)}}}else if(t.tag===6){if(n===null){o=t;try{o.stateNode.nodeValue=a?"":o.memoizedProps}catch(v){te(o,o.return,v)}}}else if(t.tag===18){if(n===null){o=t;try{var m=o.stateNode;a?ow(m,!0):ow(o.stateNode,!1)}catch(v){te(o,o.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,so(e,n))));break;case 19:yt(t,e),pt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,so(e,i)));break;case 30:break;case 21:break;default:yt(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var n,i=e.return;i!==null;){if(fg(i)){n=i;break}i=i.return}if(n==null)throw Error(S(160));switch(n.tag){case 27:var a=n.stateNode,l=c2(e);lo(e,l,a);break;case 5:var s=n.stateNode;n.flags&32&&(yl(s,""),n.flags&=-33);var r=c2(e);lo(e,r,s);break;case 3:case 4:var o=n.stateNode.containerInfo,c=c2(e);f2(e,c,o);break;default:throw Error(S(161))}}catch(f){te(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ii(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mg(e,t.alternate,t),t=t.sibling}function Na(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zi(4,t,t.return),Na(t);break;case 1:Ln(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&og(t,t.return,n),Na(t);break;case 27:hr(t.stateNode);case 26:case 5:Ln(t,t.return),Na(t);break;case 22:t.memoizedState===null&&Na(t);break;case 30:Na(t);break;default:Na(t)}e=e.sibling}}function ai(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,a=e,l=t,s=l.flags;switch(l.tag){case 0:case 11:case 15:ai(a,l,n),ir(4,l);break;case 1:if(ai(a,l,n),i=l,a=i.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(c){te(i,i.return,c)}if(i=l,a=i.updateQueue,a!==null){var r=i.stateNode;try{var o=a.shared.hiddenCallbacks;if(o!==null)for(a.shared.hiddenCallbacks=null,a=0;a<o.length;a++)W4(o[a],r)}catch(c){te(i,i.return,c)}}n&&s&64&&ug(l),ar(l,l.return);break;case 27:dg(l);case 26:case 5:ai(a,l,n),n&&i===null&&s&4&&cg(l),ar(l,l.return);break;case 12:ai(a,l,n);break;case 31:ai(a,l,n),n&&s&4&&yg(a,l);break;case 13:ai(a,l,n),n&&s&4&&pg(a,l);break;case 22:l.memoizedState===null&&ai(a,l,n),ar(l,l.return);break;case 30:break;default:ai(a,l,n)}t=t.sibling}}function h2(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ys(n))}function m2(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ys(e))}function vn(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xg(e,t,n,i),t=t.sibling}function xg(e,t,n,i){var a=t.flags;switch(t.tag){case 0:case 11:case 15:vn(e,t,n,i),a&2048&&ir(9,t);break;case 1:vn(e,t,n,i);break;case 3:vn(e,t,n,i),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ys(e)));break;case 12:if(a&2048){vn(e,t,n,i),e=t.stateNode;try{var l=t.memoizedProps,s=l.id,r=l.onPostCommit;typeof r=="function"&&r(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){te(t,t.return,o)}}else vn(e,t,n,i);break;case 31:vn(e,t,n,i);break;case 13:vn(e,t,n,i);break;case 23:break;case 22:l=t.stateNode,s=t.alternate,t.memoizedState!==null?l._visibility&2?vn(e,t,n,i):lr(e,t):l._visibility&2?vn(e,t,n,i):(l._visibility|=2,Bl(e,t,n,i,(t.subtreeFlags&10256)!==0||!1)),a&2048&&h2(s,t);break;case 24:vn(e,t,n,i),a&2048&&m2(t.alternate,t);break;default:vn(e,t,n,i)}}function Bl(e,t,n,i,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var l=e,s=t,r=n,o=i,c=s.flags;switch(s.tag){case 0:case 11:case 15:Bl(l,s,r,o,a),ir(8,s);break;case 23:break;case 22:var f=s.stateNode;s.memoizedState!==null?f._visibility&2?Bl(l,s,r,o,a):lr(l,s):(f._visibility|=2,Bl(l,s,r,o,a)),a&&c&2048&&h2(s.alternate,s);break;case 24:Bl(l,s,r,o,a),a&&c&2048&&m2(s.alternate,s);break;default:Bl(l,s,r,o,a)}t=t.sibling}}function lr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,i=t,a=i.flags;switch(i.tag){case 22:lr(n,i),a&2048&&h2(i.alternate,i);break;case 24:lr(n,i),a&2048&&m2(i.alternate,i);break;default:lr(n,i)}t=t.sibling}}var sr=8192;function Rl(e,t,n){if(e.subtreeFlags&sr)for(e=e.child;e!==null;)Sg(e,t,n),e=e.sibling}function Sg(e,t,n){switch(e.tag){case 26:Rl(e,t,n),e.flags&sr&&e.memoizedState!==null&&d8(n,pn,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,n);break;case 3:case 4:var i=pn;pn=xo(e.stateNode.containerInfo),Rl(e,t,n),pn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=sr,sr=16777216,Rl(e,t,n),sr=i):Rl(e,t,n));break;default:Rl(e,t,n)}}function Eg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function rr(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Je=i,Tg(i,e)}Eg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_g(e),e=e.sibling}function _g(e){switch(e.tag){case 0:case 11:case 15:rr(e),e.flags&2048&&zi(9,e,e.return);break;case 3:rr(e);break;case 12:rr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ro(e)):rr(e);break;default:rr(e)}}function ro(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Je=i,Tg(i,e)}Eg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zi(8,t,t.return),ro(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ro(t));break;default:ro(t)}e=e.sibling}}function Tg(e,t){for(;Je!==null;){var n=Je;switch(n.tag){case 0:case 11:case 15:zi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Ys(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,Je=i;else e:for(n=e;Je!==null;){i=Je;var a=i.sibling,l=i.return;if(gg(i),i===n){Je=null;break e}if(a!==null){a.return=l,Je=a;break e}Je=l}}}var Nv={getCacheForType:function(e){var t=et(ke),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return et(ke).controller.signal}},jv=typeof WeakMap=="function"?WeakMap:Map,P=0,le=null,q=null,Y=0,ee=0,qt=null,ki=!1,Gl=!1,g2=!1,li=0,Se=0,Li=0,ja=0,w2=0,Ft=0,Hl=0,ur=null,vt=null,y2=!1,uo=0,Ag=0,oo=1/0,co=null,Ui=null,Fe=0,Bi=null,Vl=null,si=0,p2=0,v2=null,Ng=null,or=0,b2=null;function Yt(){return P&2&&Y!==0?Y&-Y:B.T!==null?A2():F3()}function jg(){if(Ft===0)if(!(Y&536870912)||X){var e=pu;pu<<=1,!(pu&3932160)&&(pu=262144),Ft=e}else Ft=536870912;return e=Ht.current,e!==null&&(e.flags|=32),Ft}function bt(e,t,n){(e===le&&(ee===2||ee===9)||e.cancelPendingCommit!==null)&&(ql(e,0),Ri(e,Y,Ft,!1)),Cs(e,n),(!(P&2)||e!==le)&&(e===le&&(!(P&2)&&(ja|=n),Se===4&&Ri(e,Y,Ft,!1)),Un(e))}function Mg(e,t,n){if(P&6)throw Error(S(327));var i=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ms(e,t),a=i?Dv(e,t):S2(e,t,!0),l=i;do{if(a===0){Gl&&!i&&Ri(e,t,0,!1);break}else{if(n=e.current.alternate,l&&!Mv(n)){a=S2(e,t,!1),l=!1;continue}if(a===2){if(l=t,e.errorRecoveryDisabledLanes&l)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var r=e;a=ur;var o=r.current.memoizedState.isDehydrated;if(o&&(ql(r,s).flags|=256),s=S2(r,s,!1),s!==2){if(g2&&!o){r.errorRecoveryDisabledLanes|=l,ja|=l,a=4;break e}l=vt,vt=a,l!==null&&(vt===null?vt=l:vt.push.apply(vt,l))}a=s}if(l=!1,a!==2)continue}}if(a===1){ql(e,0),Ri(e,t,0,!0);break}e:{switch(i=e,l=a,l){case 0:case 1:throw Error(S(345));case 4:if((t&4194048)!==t)break;case 6:Ri(i,t,Ft,!ki);break e;case 2:vt=null;break;case 3:case 5:break;default:throw Error(S(329))}if((t&62914560)===t&&(a=uo+300-Lt(),10<a)){if(Ri(i,t,Ft,!ki),bu(i,0,!0)!==0)break e;si=t,i.timeoutHandle=sw(Cg.bind(null,i,n,vt,co,y2,t,Ft,ja,Hl,ki,l,"Throttled",-0,0),a);break e}Cg(i,n,vt,co,y2,t,Ft,ja,Hl,ki,l,null,-0,0)}}break}while(!0);Un(e)}function Cg(e,t,n,i,a,l,s,r,o,c,f,h,d,m){if(e.timeoutHandle=-1,h=t.subtreeFlags,h&8192||(h&16785408)===16785408){h={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},Sg(t,l,h);var v=(l&62914560)===l?uo-Lt():(l&4194048)===l?Ag-Lt():0;if(v=h8(h,v),v!==null){si=l,e.cancelPendingCommit=v(Rg.bind(null,e,t,l,n,i,a,s,r,o,f,h,null,d,m)),Ri(e,l,s,!c);return}}Rg(e,t,l,n,i,a,s,r,o)}function Mv(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var a=n[i],l=a.getSnapshot;a=a.value;try{if(!Rt(l(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ri(e,t,n,i){t&=~w2,t&=~ja,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var a=t;0<a;){var l=31-Bt(a),s=1<<l;i[l]=-1,a&=~s}n!==0&&H3(e,n,t)}function fo(){return P&6?!0:(cr(0),!1)}function x2(){if(q!==null){if(ee===0)var e=q.return;else e=q,In=va=null,Bd(e),Ol=null,Qs=0,e=q;for(;e!==null;)rg(e.alternate,e),e=e.return;q=null}}function ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Iv(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),si=0,x2(),le=e,q=n=Zn(e.current,null),Y=t,ee=0,qt=null,ki=!1,Gl=Ms(e,t),g2=!1,Hl=Ft=w2=ja=Li=Se=0,vt=ur=null,y2=!1,t&8&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var a=31-Bt(i),l=1<<a;t|=e[a],i&=~l}return li=t,Ou(),n}function Dg(e,t){H=null,B.H=er,t===Dl||t===Hu?(t=Z4(),ee=3):t===Td?(t=Z4(),ee=4):ee=t===$d?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,q===null&&(Se=1,eo(e,nn(t,e.current)))}function Og(){var e=Ht.current;return e===null?!0:(Y&4194048)===Y?rn===null:(Y&62914560)===Y||Y&536870912?e===rn:!1}function zg(){var e=B.H;return B.H=er,e===null?er:e}function kg(){var e=B.A;return B.A=Nv,e}function ho(){Se=4,ki||(Y&4194048)!==Y&&Ht.current!==null||(Gl=!0),!(Li&134217727)&&!(ja&134217727)||le===null||Ri(le,Y,Ft,!1)}function S2(e,t,n){var i=P;P|=2;var a=zg(),l=kg();(le!==e||Y!==t)&&(co=null,ql(e,t)),t=!1;var s=Se;e:do try{if(ee!==0&&q!==null){var r=q,o=qt;switch(ee){case 8:x2(),s=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var c=ee;if(ee=0,qt=null,Fl(e,r,o,c),n&&Gl){s=0;break e}break;default:c=ee,ee=0,qt=null,Fl(e,r,o,c)}}Cv(),s=Se;break}catch(f){Dg(e,f)}while(!0);return t&&e.shellSuspendCounter++,In=va=null,P=i,B.H=a,B.A=l,q===null&&(le=null,Y=0,Ou()),s}function Cv(){for(;q!==null;)Lg(q)}function Dv(e,t){var n=P;P|=2;var i=zg(),a=kg();le!==e||Y!==t?(co=null,oo=Lt()+500,ql(e,t)):Gl=Ms(e,t);e:do try{if(ee!==0&&q!==null){t=q;var l=qt;t:switch(ee){case 1:ee=0,qt=null,Fl(e,t,l,1);break;case 2:case 9:if(X4(l)){ee=0,qt=null,Ug(t);break}t=function(){ee!==2&&ee!==9||le!==e||(ee=7),Un(e)},l.then(t,t);break e;case 3:ee=7;break e;case 4:ee=5;break e;case 7:X4(l)?(ee=0,qt=null,Ug(t)):(ee=0,qt=null,Fl(e,t,l,7));break;case 5:var s=null;switch(q.tag){case 26:s=q.memoizedState;case 5:case 27:var r=q;if(s?xw(s):r.stateNode.complete){ee=0,qt=null;var o=r.sibling;if(o!==null)q=o;else{var c=r.return;c!==null?(q=c,mo(c)):q=null}break t}}ee=0,qt=null,Fl(e,t,l,5);break;case 6:ee=0,qt=null,Fl(e,t,l,6);break;case 8:x2(),Se=6;break e;default:throw Error(S(462))}}Ov();break}catch(f){Dg(e,f)}while(!0);return In=va=null,B.H=i,B.A=a,P=n,q!==null?0:(le=null,Y=0,Ou(),Se)}function Ov(){for(;q!==null&&!tp();)Lg(q)}function Lg(e){var t=lg(e.alternate,e,li);e.memoizedProps=e.pendingProps,t===null?mo(e):q=t}function Ug(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=$m(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=$m(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Bd(t);default:rg(n,t),t=q=k4(t,li),t=lg(n,t,li)}e.memoizedProps=e.pendingProps,t===null?mo(e):q=t}function Fl(e,t,n,i){In=va=null,Bd(t),Ol=null,Qs=0;var a=t.return;try{if(bv(e,a,t,n,Y)){Se=1,eo(e,nn(n,e.current)),q=null;return}}catch(l){if(a!==null)throw q=a,l;Se=1,eo(e,nn(n,e.current)),q=null;return}t.flags&32768?(X||i===1?e=!0:Gl||Y&536870912?e=!1:(ki=e=!0,(i===2||i===9||i===3||i===6)&&(i=Ht.current,i!==null&&i.tag===13&&(i.flags|=16384))),Bg(t,e)):mo(t)}function mo(e){var t=e;do{if(t.flags&32768){Bg(t,ki);return}e=t.return;var n=Ev(t.alternate,t,li);if(n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);Se===0&&(Se=5)}function Bg(e,t){do{var n=_v(e.alternate,e);if(n!==null){n.flags&=32767,q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){q=e;return}q=e=n}while(e!==null);Se=6,q=null}function Rg(e,t,n,i,a,l,s,r,o){e.cancelPendingCommit=null;do go();while(Fe!==0);if(P&6)throw Error(S(327));if(t!==null){if(t===e.current)throw Error(S(177));if(l=t.lanes|t.childLanes,l|=cd,fp(e,n,l,s,r,o),e===le&&(q=le=null,Y=0),Vl=t,Bi=e,si=n,p2=l,v2=a,Ng=i,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Uv(wu,function(){return Fg(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,t.subtreeFlags&13878||i){i=B.T,B.T=null,a=W.p,W.p=2,s=P,P|=4;try{Tv(e,t,n)}finally{P=s,W.p=a,B.T=i}}Fe=1,Gg(),Hg(),Vg()}}function Gg(){if(Fe===1){Fe=0;var e=Bi,t=Vl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=B.T,B.T=null;var i=W.p;W.p=2;var a=P;P|=4;try{vg(t,e);var l=k2,s=T4(e.containerInfo),r=l.focusedElem,o=l.selectionRange;if(s!==r&&r&&r.ownerDocument&&_4(r.ownerDocument.documentElement,r)){if(o!==null&&ld(r)){var c=o.start,f=o.end;if(f===void 0&&(f=c),"selectionStart"in r)r.selectionStart=c,r.selectionEnd=Math.min(f,r.value.length);else{var h=r.ownerDocument||document,d=h&&h.defaultView||window;if(d.getSelection){var m=d.getSelection(),v=r.textContent.length,x=Math.min(o.start,v),E=o.end===void 0?x:Math.min(o.end,v);!m.extend&&x>E&&(s=E,E=x,x=s);var g=E4(r,x),w=E4(r,E);if(g&&w&&(m.rangeCount!==1||m.anchorNode!==g.node||m.anchorOffset!==g.offset||m.focusNode!==w.node||m.focusOffset!==w.offset)){var p=h.createRange();p.setStart(g.node,g.offset),m.removeAllRanges(),x>E?(m.addRange(p),m.extend(w.node,w.offset)):(p.setEnd(w.node,w.offset),m.addRange(p))}}}}for(h=[],m=r;m=m.parentNode;)m.nodeType===1&&h.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<h.length;r++){var b=h[r];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}No=!!z2,k2=z2=null}finally{P=a,W.p=i,B.T=n}}e.current=t,Fe=2}}function Hg(){if(Fe===2){Fe=0;var e=Bi,t=Vl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=B.T,B.T=null;var i=W.p;W.p=2;var a=P;P|=4;try{mg(e,t.alternate,t)}finally{P=a,W.p=i,B.T=n}}Fe=3}}function Vg(){if(Fe===4||Fe===3){Fe=0,np();var e=Bi,t=Vl,n=si,i=Ng;t.subtreeFlags&10256||t.flags&10256?Fe=5:(Fe=0,Vl=Bi=null,qg(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Ui=null),Hf(n),t=t.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(js,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=B.T,a=W.p,W.p=2,B.T=null;try{for(var l=e.onRecoverableError,s=0;s<i.length;s++){var r=i[s];l(r.value,{componentStack:r.stack})}}finally{B.T=t,W.p=a}}si&3&&go(),Un(e),a=e.pendingLanes,n&261930&&a&42?e===b2?or++:(or=0,b2=e):or=0,cr(0)}}function qg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ys(t)))}function go(){return Gg(),Hg(),Vg(),Fg()}function Fg(){if(Fe!==5)return!1;var e=Bi,t=p2;p2=0;var n=Hf(si),i=B.T,a=W.p;try{W.p=32>n?32:n,B.T=null,n=v2,v2=null;var l=Bi,s=si;if(Fe=0,Vl=Bi=null,si=0,P&6)throw Error(S(331));var r=P;if(P|=4,_g(l.current),xg(l,l.current,s,n),P=r,cr(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(js,l)}catch{}return!0}finally{W.p=a,B.T=i,qg(e,t)}}function Yg(e,t,n){t=nn(n,t),t=Pd(e.stateNode,t,2),e=Ci(e,t,2),e!==null&&(Cs(e,2),Un(e))}function te(e,t,n){if(e.tag===3)Yg(e,e,n);else for(;t!==null;){if(t.tag===3){Yg(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ui===null||!Ui.has(i))){e=nn(n,e),n=Xm(2),i=Ci(t,n,2),i!==null&&(Qm(n,i,t,e),Cs(i,2),Un(i));break}}t=t.return}}function E2(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new jv;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(n)||(g2=!0,a.add(n),e=zv.bind(null,e,t,n),t.then(e,e))}function zv(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,le===e&&(Y&n)===n&&(Se===4||Se===3&&(Y&62914560)===Y&&300>Lt()-uo?!(P&2)&&ql(e,0):w2|=n,Hl===Y&&(Hl=0)),Un(e)}function Xg(e,t){t===0&&(t=G3()),e=wa(e,t),e!==null&&(Cs(e,t),Un(e))}function kv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xg(e,n)}function Lv(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(S(314))}i!==null&&i.delete(t),Xg(e,n)}function Uv(e,t){return Uf(e,t)}var wo=null,Yl=null,_2=!1,yo=!1,T2=!1,Gi=0;function Un(e){e!==Yl&&e.next===null&&(Yl===null?wo=Yl=e:Yl=Yl.next=e),yo=!0,_2||(_2=!0,Rv())}function cr(e,t){if(!T2&&yo){T2=!0;do for(var n=!1,i=wo;i!==null;){if(e!==0){var a=i.pendingLanes;if(a===0)var l=0;else{var s=i.suspendedLanes,r=i.pingedLanes;l=(1<<31-Bt(42|e)+1)-1,l&=a&~(s&~r),l=l&201326741?l&201326741|1:l?l|2:0}l!==0&&(n=!0,Ig(i,l))}else l=Y,l=bu(i,i===le?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),!(l&3)||Ms(i,l)||(n=!0,Ig(i,l));i=i.next}while(n);T2=!1}}function Bv(){Qg()}function Qg(){yo=_2=!1;var e=0;Gi!==0&&Kv()&&(e=Gi);for(var t=Lt(),n=null,i=wo;i!==null;){var a=i.next,l=Zg(i,t);l===0?(i.next=null,n===null?wo=a:n.next=a,a===null&&(Yl=n)):(n=i,(e!==0||l&3)&&(yo=!0)),i=a}Fe!==0&&Fe!==5||cr(e),Gi!==0&&(Gi=0)}function Zg(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,l=e.pendingLanes&-62914561;0<l;){var s=31-Bt(l),r=1<<s,o=a[s];o===-1?(!(r&n)||r&i)&&(a[s]=cp(r,t)):o<=t&&(e.expiredLanes|=r),l&=~r}if(t=le,n=Y,n=bu(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,n===0||e===t&&(ee===2||ee===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Bf(i),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ms(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&Bf(i),Hf(n)){case 2:case 8:n=B3;break;case 32:n=wu;break;case 268435456:n=R3;break;default:n=wu}return i=Kg.bind(null,e),n=Uf(n,i),e.callbackPriority=t,e.callbackNode=n,t}return i!==null&&i!==null&&Bf(i),e.callbackPriority=2,e.callbackNode=null,2}function Kg(e,t){if(Fe!==0&&Fe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(go()&&e.callbackNode!==n)return null;var i=Y;return i=bu(e,e===le?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Mg(e,i,t),Zg(e,Lt()),e.callbackNode!=null&&e.callbackNode===n?Kg.bind(null,e):null)}function Ig(e,t){if(go())return null;Mg(e,t,!0)}function Rv(){Jv(function(){P&6?Uf(U3,Bv):Qg()})}function A2(){if(Gi===0){var e=Ml;e===0&&(e=yu,yu<<=1,!(yu&261888)&&(yu=256)),Gi=e}return Gi}function Jg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:_u(""+e)}function Wg(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Gv(e,t,n,i,a){if(t==="submit"&&n&&n.stateNode===a){var l=Jg((a[mt]||null).action),s=i.submitter;s&&(t=(t=s[mt]||null)?Jg(t.formAction):s.getAttribute("formAction"),t!==null&&(l=t,s=null));var r=new ju("action","action",null,i,a);e.push({event:r,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Gi!==0){var o=s?Wg(a,s):new FormData(a);Qd(n,{pending:!0,data:o,method:a.method,action:l},null,o)}}else typeof l=="function"&&(r.preventDefault(),o=s?Wg(a,s):new FormData(a),Qd(n,{pending:!0,data:o,method:a.method,action:l},l,o))},currentTarget:a}]})}}for(var N2=0;N2<od.length;N2++){var j2=od[N2],Hv=j2.toLowerCase(),Vv=j2[0].toUpperCase()+j2.slice(1);yn(Hv,"on"+Vv)}yn(j4,"onAnimationEnd"),yn(M4,"onAnimationIteration"),yn(C4,"onAnimationStart"),yn("dblclick","onDoubleClick"),yn("focusin","onFocus"),yn("focusout","onBlur"),yn(iv,"onTransitionRun"),yn(av,"onTransitionStart"),yn(lv,"onTransitionCancel"),yn(D4,"onTransitionEnd"),gl("onMouseEnter",["mouseout","mouseover"]),gl("onMouseLeave",["mouseout","mouseover"]),gl("onPointerEnter",["pointerout","pointerover"]),gl("onPointerLeave",["pointerout","pointerover"]),da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),da("onBeforeInput",["compositionend","keypress","textInput","paste"]),da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),qv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fr));function Pg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],a=i.event;i=i.listeners;e:{var l=void 0;if(t)for(var s=i.length-1;0<=s;s--){var r=i[s],o=r.instance,c=r.currentTarget;if(r=r.listener,o!==l&&a.isPropagationStopped())break e;l=r,a.currentTarget=c;try{l(a)}catch(f){Du(f)}a.currentTarget=null,l=o}else for(s=0;s<i.length;s++){if(r=i[s],o=r.instance,c=r.currentTarget,r=r.listener,o!==l&&a.isPropagationStopped())break e;l=r,a.currentTarget=c;try{l(a)}catch(f){Du(f)}a.currentTarget=null,l=o}}}}function F(e,t){var n=t[Vf];n===void 0&&(n=t[Vf]=new Set);var i=e+"__bubble";n.has(i)||($g(t,e,2,!1),n.add(i))}function M2(e,t,n){var i=0;t&&(i|=4),$g(n,e,i,t)}var po="_reactListening"+Math.random().toString(36).slice(2);function C2(e){if(!e[po]){e[po]=!0,Q3.forEach(function(n){n!=="selectionchange"&&(qv.has(n)||M2(n,!1,e),M2(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[po]||(t[po]=!0,M2("selectionchange",!1,t))}}function $g(e,t,n,i){switch(jw(t)){case 2:var a=w8;break;case 8:a=y8;break;default:a=X2}n=a.bind(null,t,n,e),a=void 0,!Jf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function D2(e,t,n,i,a){var l=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var s=i.tag;if(s===3||s===4){var r=i.stateNode.containerInfo;if(r===a)break;if(s===4)for(s=i.return;s!==null;){var o=s.tag;if((o===3||o===4)&&s.stateNode.containerInfo===a)return;s=s.return}for(;r!==null;){if(s=dl(r),s===null)return;if(o=s.tag,o===5||o===6||o===26||o===27){i=l=s;continue e}r=r.parentNode}}i=i.return}a4(function(){var c=l,f=Kf(n),h=[];e:{var d=O4.get(e);if(d!==void 0){var m=ju,v=e;switch(e){case"keypress":if(Au(n)===0)break e;case"keydown":case"keyup":m=Lp;break;case"focusin":v="focus",m=ed;break;case"focusout":v="blur",m=ed;break;case"beforeblur":case"afterblur":m=ed;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=r4;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Ep;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Rp;break;case j4:case M4:case C4:m=Ap;break;case D4:m=Hp;break;case"scroll":case"scrollend":m=xp;break;case"wheel":m=qp;break;case"copy":case"cut":case"paste":m=jp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=o4;break;case"toggle":case"beforetoggle":m=Yp}var x=(t&4)!==0,E=!x&&(e==="scroll"||e==="scrollend"),g=x?d!==null?d+"Capture":null:d;x=[];for(var w=c,p;w!==null;){var b=w;if(p=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||p===null||g===null||(b=zs(w,g),b!=null&&x.push(dr(w,b,p))),E)break;w=w.return}0<x.length&&(d=new m(d,v,null,n,f),h.push({event:d,listeners:x}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",d&&n!==Zf&&(v=n.relatedTarget||n.fromElement)&&(dl(v)||v[fl]))break e;if((m||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=c,v=v?dl(v):null,v!==null&&(E=Es(v),x=v.tag,v!==E||x!==5&&x!==27&&x!==6)&&(v=null)):(m=null,v=c),m!==v)){if(x=r4,b="onMouseLeave",g="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(x=o4,b="onPointerLeave",g="onPointerEnter",w="pointer"),E=m==null?d:Os(m),p=v==null?d:Os(v),d=new x(b,w+"leave",m,n,f),d.target=E,d.relatedTarget=p,b=null,dl(f)===c&&(x=new x(g,w+"enter",v,n,f),x.target=p,x.relatedTarget=E,b=x),E=b,m&&v)t:{for(x=Fv,g=m,w=v,p=0,b=g;b;b=x(b))p++;b=0;for(var A=w;A;A=x(A))b++;for(;0<p-b;)g=x(g),p--;for(;0<b-p;)w=x(w),b--;for(;p--;){if(g===w||w!==null&&g===w.alternate){x=g;break t}g=x(g),w=x(w)}x=null}else x=null;m!==null&&ew(h,d,m,x,!1),v!==null&&E!==null&&ew(h,E,v,x,!0)}}e:{if(d=c?Os(c):window,m=d.nodeName&&d.nodeName.toLowerCase(),m==="select"||m==="input"&&d.type==="file")var N=y4;else if(g4(d))if(p4)N=ev;else{N=Pp;var _=Wp}else m=d.nodeName,!m||m.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&Qf(c.elementType)&&(N=y4):N=$p;if(N&&(N=N(e,c))){w4(h,N,n,f);break e}_&&_(e,d,c),e==="focusout"&&c&&d.type==="number"&&c.memoizedProps.value!=null&&Xf(d,"number",d.value)}switch(_=c?Os(c):window,e){case"focusin":(g4(_)||_.contentEditable==="true")&&(xl=_,sd=c,Vs=null);break;case"focusout":Vs=sd=xl=null;break;case"mousedown":rd=!0;break;case"contextmenu":case"mouseup":case"dragend":rd=!1,A4(h,n,f);break;case"selectionchange":if(nv)break;case"keydown":case"keyup":A4(h,n,f)}var M;if(nd)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else bl?h4(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(c4&&n.locale!=="ko"&&(bl||T!=="onCompositionStart"?T==="onCompositionEnd"&&bl&&(M=l4()):(Ei=f,Wf="value"in Ei?Ei.value:Ei.textContent,bl=!0)),_=vo(c,T),0<_.length&&(T=new u4(T,e,null,n,f),h.push({event:T,listeners:_}),M?T.data=M:(M=m4(n),M!==null&&(T.data=M)))),(M=Qp?Zp(e,n):Kp(e,n))&&(T=vo(c,"onBeforeInput"),0<T.length&&(_=new u4("onBeforeInput","beforeinput",null,n,f),h.push({event:_,listeners:T}),_.data=M)),Gv(h,e,c,n,f)}Pg(h,t)})}function dr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vo(e,t){for(var n=t+"Capture",i=[];e!==null;){var a=e,l=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||l===null||(a=zs(e,n),a!=null&&i.unshift(dr(e,a,l)),a=zs(e,t),a!=null&&i.push(dr(e,a,l))),e.tag===3)return i;e=e.return}return[]}function Fv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ew(e,t,n,i,a){for(var l=t._reactName,s=[];n!==null&&n!==i;){var r=n,o=r.alternate,c=r.stateNode;if(r=r.tag,o!==null&&o===i)break;r!==5&&r!==26&&r!==27||c===null||(o=c,a?(c=zs(n,l),c!=null&&s.unshift(dr(n,c,o))):a||(c=zs(n,l),c!=null&&s.push(dr(n,c,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Yv=/\r\n?/g,Xv=/\u0000|\uFFFD/g;function tw(e){return(typeof e=="string"?e:""+e).replace(Yv,`
106
+ `).replace(Xv,"")}function nw(e,t){return t=tw(t),tw(e)===t}function ae(e,t,n,i,a,l){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||yl(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&yl(e,""+i);break;case"className":Su(e,"class",i);break;case"tabIndex":Su(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Su(e,n,i);break;case"style":n4(e,i,l);break;case"data":if(t!=="object"){Su(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=_u(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof l=="function"&&(n==="formAction"?(t!=="input"&&ae(e,t,"name",a.name,a,null),ae(e,t,"formEncType",a.formEncType,a,null),ae(e,t,"formMethod",a.formMethod,a,null),ae(e,t,"formTarget",a.formTarget,a,null)):(ae(e,t,"encType",a.encType,a,null),ae(e,t,"method",a.method,a,null),ae(e,t,"target",a.target,a,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=_u(""+i),e.setAttribute(n,i);break;case"onClick":i!=null&&(e.onclick=Xn);break;case"onScroll":i!=null&&F("scroll",e);break;case"onScrollEnd":i!=null&&F("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(S(61));if(n=i.__html,n!=null){if(a.children!=null)throw Error(S(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}n=_u(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":i===!0?e.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":F("beforetoggle",e),F("toggle",e),xu(e,"popover",i);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":xu(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=vp.get(n)||n,xu(e,n,i))}}function O2(e,t,n,i,a,l){switch(n){case"style":n4(e,i,l);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(S(61));if(n=i.__html,n!=null){if(a.children!=null)throw Error(S(60));e.innerHTML=n}}break;case"children":typeof i=="string"?yl(e,i):(typeof i=="number"||typeof i=="bigint")&&yl(e,""+i);break;case"onScroll":i!=null&&F("scroll",e);break;case"onScrollEnd":i!=null&&F("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Z3.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),l=e[mt]||null,l=l!=null?l[n]:null,typeof l=="function"&&e.removeEventListener(t,l,a),typeof i=="function")){typeof l!="function"&&l!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,a);break e}n in e?e[n]=i:i===!0?e.setAttribute(n,""):xu(e,n,i)}}}function nt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":F("error",e),F("load",e);var i=!1,a=!1,l;for(l in n)if(n.hasOwnProperty(l)){var s=n[l];if(s!=null)switch(l){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(S(137,t));default:ae(e,t,l,s,n,null)}}a&&ae(e,t,"srcSet",n.srcSet,n,null),i&&ae(e,t,"src",n.src,n,null);return;case"input":F("invalid",e);var r=l=s=a=null,o=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var f=n[i];if(f!=null)switch(i){case"name":a=f;break;case"type":s=f;break;case"checked":o=f;break;case"defaultChecked":c=f;break;case"value":l=f;break;case"defaultValue":r=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(S(137,t));break;default:ae(e,t,i,f,n,null)}}P3(e,l,r,o,c,s,a,!1);return;case"select":F("invalid",e),i=s=l=null;for(a in n)if(n.hasOwnProperty(a)&&(r=n[a],r!=null))switch(a){case"value":l=r;break;case"defaultValue":s=r;break;case"multiple":i=r;default:ae(e,t,a,r,n,null)}t=l,n=s,e.multiple=!!i,t!=null?wl(e,!!i,t,!1):n!=null&&wl(e,!!i,n,!0);return;case"textarea":F("invalid",e),l=a=i=null;for(s in n)if(n.hasOwnProperty(s)&&(r=n[s],r!=null))switch(s){case"value":i=r;break;case"defaultValue":a=r;break;case"children":l=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(S(91));break;default:ae(e,t,s,r,n,null)}e4(e,i,a,l);return;case"option":for(o in n)if(n.hasOwnProperty(o)&&(i=n[o],i!=null))switch(o){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:ae(e,t,o,i,n,null)}return;case"dialog":F("beforetoggle",e),F("toggle",e),F("cancel",e),F("close",e);break;case"iframe":case"object":F("load",e);break;case"video":case"audio":for(i=0;i<fr.length;i++)F(fr[i],e);break;case"image":F("error",e),F("load",e);break;case"details":F("toggle",e);break;case"embed":case"source":case"link":F("error",e),F("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(i=n[c],i!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(S(137,t));default:ae(e,t,c,i,n,null)}return;default:if(Qf(t)){for(f in n)n.hasOwnProperty(f)&&(i=n[f],i!==void 0&&O2(e,t,f,i,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(i=n[r],i!=null&&ae(e,t,r,i,n,null))}function Qv(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,l=null,s=null,r=null,o=null,c=null,f=null;for(m in n){var h=n[m];if(n.hasOwnProperty(m)&&h!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":o=h;default:i.hasOwnProperty(m)||ae(e,t,m,null,i,h)}}for(var d in i){var m=i[d];if(h=n[d],i.hasOwnProperty(d)&&(m!=null||h!=null))switch(d){case"type":l=m;break;case"name":a=m;break;case"checked":c=m;break;case"defaultChecked":f=m;break;case"value":s=m;break;case"defaultValue":r=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(S(137,t));break;default:m!==h&&ae(e,t,d,m,i,h)}}Yf(e,s,r,o,c,f,l,a);return;case"select":m=s=r=d=null;for(l in n)if(o=n[l],n.hasOwnProperty(l)&&o!=null)switch(l){case"value":break;case"multiple":m=o;default:i.hasOwnProperty(l)||ae(e,t,l,null,i,o)}for(a in i)if(l=i[a],o=n[a],i.hasOwnProperty(a)&&(l!=null||o!=null))switch(a){case"value":d=l;break;case"defaultValue":r=l;break;case"multiple":s=l;default:l!==o&&ae(e,t,a,l,i,o)}t=r,n=s,i=m,d!=null?wl(e,!!n,d,!1):!!i!=!!n&&(t!=null?wl(e,!!n,t,!0):wl(e,!!n,n?[]:"",!1));return;case"textarea":m=d=null;for(r in n)if(a=n[r],n.hasOwnProperty(r)&&a!=null&&!i.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:ae(e,t,r,null,i,a)}for(s in i)if(a=i[s],l=n[s],i.hasOwnProperty(s)&&(a!=null||l!=null))switch(s){case"value":d=a;break;case"defaultValue":m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(S(91));break;default:a!==l&&ae(e,t,s,a,i,l)}$3(e,d,m);return;case"option":for(var v in n)if(d=n[v],n.hasOwnProperty(v)&&d!=null&&!i.hasOwnProperty(v))switch(v){case"selected":e.selected=!1;break;default:ae(e,t,v,null,i,d)}for(o in i)if(d=i[o],m=n[o],i.hasOwnProperty(o)&&d!==m&&(d!=null||m!=null))switch(o){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:ae(e,t,o,d,i,m)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in n)d=n[x],n.hasOwnProperty(x)&&d!=null&&!i.hasOwnProperty(x)&&ae(e,t,x,null,i,d);for(c in i)if(d=i[c],m=n[c],i.hasOwnProperty(c)&&d!==m&&(d!=null||m!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(S(137,t));break;default:ae(e,t,c,d,i,m)}return;default:if(Qf(t)){for(var E in n)d=n[E],n.hasOwnProperty(E)&&d!==void 0&&!i.hasOwnProperty(E)&&O2(e,t,E,void 0,i,d);for(f in i)d=i[f],m=n[f],!i.hasOwnProperty(f)||d===m||d===void 0&&m===void 0||O2(e,t,f,d,i,m);return}}for(var g in n)d=n[g],n.hasOwnProperty(g)&&d!=null&&!i.hasOwnProperty(g)&&ae(e,t,g,null,i,d);for(h in i)d=i[h],m=n[h],!i.hasOwnProperty(h)||d===m||d==null&&m==null||ae(e,t,h,d,i,m)}function iw(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var a=n[i],l=a.transferSize,s=a.initiatorType,r=a.duration;if(l&&r&&iw(s)){for(s=0,r=a.responseEnd,i+=1;i<n.length;i++){var o=n[i],c=o.startTime;if(c>r)break;var f=o.transferSize,h=o.initiatorType;f&&iw(h)&&(o=o.responseEnd,s+=f*(o<r?1:(r-c)/(o-c)))}if(--i,t+=8*(l+s)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var z2=null,k2=null;function bo(e){return e.nodeType===9?e:e.ownerDocument}function aw(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function lw(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function L2(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var U2=null;function Kv(){var e=window.event;return e&&e.type==="popstate"?e===U2?!1:(U2=e,!0):(U2=null,!1)}var sw=typeof setTimeout=="function"?setTimeout:void 0,Iv=typeof clearTimeout=="function"?clearTimeout:void 0,rw=typeof Promise=="function"?Promise:void 0,Jv=typeof queueMicrotask=="function"?queueMicrotask:typeof rw<"u"?function(e){return rw.resolve(null).then(e).catch(Wv)}:sw;function Wv(e){setTimeout(function(){throw e})}function Hi(e){return e==="head"}function uw(e,t){var n=t,i=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(i===0){e.removeChild(a),Kl(t);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")hr(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,hr(n);for(var l=n.firstChild;l;){var s=l.nextSibling,r=l.nodeName;l[Ds]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&l.rel.toLowerCase()==="stylesheet"||n.removeChild(l),l=s}}else n==="body"&&hr(e.ownerDocument.body);n=a}while(n);Kl(t)}function ow(e,t){var n=e;e=0;do{var i=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=i}while(n)}function B2(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":B2(n),qf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Pv(e,t,n,i){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Ds])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(l=e.getAttribute("rel"),l==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(l!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(l=e.getAttribute("src"),(l!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&l&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var l=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===l)return e}else return e;if(e=un(e.nextSibling),e===null)break}return null}function $v(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=un(e.nextSibling),e===null))return null;return e}function cw(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=un(e.nextSibling),e===null))return null;return e}function R2(e){return e.data==="$?"||e.data==="$~"}function G2(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function e8(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var i=function(){t(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function un(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var H2=null;function fw(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return un(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function dw(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function hw(e,t,n){switch(t=bo(n),e){case"html":if(e=t.documentElement,!e)throw Error(S(452));return e;case"head":if(e=t.head,!e)throw Error(S(453));return e;case"body":if(e=t.body,!e)throw Error(S(454));return e;default:throw Error(S(451))}}function hr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qf(e)}var on=new Map,mw=new Set;function xo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ri=W.d;W.d={f:t8,r:n8,D:i8,C:a8,L:l8,m:s8,X:u8,S:r8,M:o8};function t8(){var e=ri.f(),t=fo();return e||t}function n8(e){var t=hl(e);t!==null&&t.tag===5&&t.type==="form"?Dm(t):ri.r(e)}var Xl=typeof document>"u"?null:document;function gw(e,t,n){var i=Xl;if(i&&typeof t=="string"&&t){var a=en(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),mw.has(a)||(mw.add(a),e={rel:e,crossOrigin:n,href:t},i.querySelector(a)===null&&(t=i.createElement("link"),nt(t,"link",e),Ie(t),i.head.appendChild(t)))}}function i8(e){ri.D(e),gw("dns-prefetch",e,null)}function a8(e,t){ri.C(e,t),gw("preconnect",e,t)}function l8(e,t,n){ri.L(e,t,n);var i=Xl;if(i&&e&&t){var a='link[rel="preload"][as="'+en(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+en(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+en(n.imageSizes)+'"]')):a+='[href="'+en(e)+'"]';var l=a;switch(t){case"style":l=Ql(e);break;case"script":l=Zl(e)}on.has(l)||(e=oe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),on.set(l,e),i.querySelector(a)!==null||t==="style"&&i.querySelector(mr(l))||t==="script"&&i.querySelector(gr(l))||(t=i.createElement("link"),nt(t,"link",e),Ie(t),i.head.appendChild(t)))}}function s8(e,t){ri.m(e,t);var n=Xl;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+en(i)+'"][href="'+en(e)+'"]',l=a;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":l=Zl(e)}if(!on.has(l)&&(e=oe({rel:"modulepreload",href:e},t),on.set(l,e),n.querySelector(a)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(gr(l)))return}i=n.createElement("link"),nt(i,"link",e),Ie(i),n.head.appendChild(i)}}}function r8(e,t,n){ri.S(e,t,n);var i=Xl;if(i&&e){var a=ml(i).hoistableStyles,l=Ql(e);t=t||"default";var s=a.get(l);if(!s){var r={loading:0,preload:null};if(s=i.querySelector(mr(l)))r.loading=5;else{e=oe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=on.get(l))&&V2(e,n);var o=s=i.createElement("link");Ie(o),nt(o,"link",e),o._p=new Promise(function(c,f){o.onload=c,o.onerror=f}),o.addEventListener("load",function(){r.loading|=1}),o.addEventListener("error",function(){r.loading|=2}),r.loading|=4,So(s,t,i)}s={type:"stylesheet",instance:s,count:1,state:r},a.set(l,s)}}}function u8(e,t){ri.X(e,t);var n=Xl;if(n&&e){var i=ml(n).hoistableScripts,a=Zl(e),l=i.get(a);l||(l=n.querySelector(gr(a)),l||(e=oe({src:e,async:!0},t),(t=on.get(a))&&q2(e,t),l=n.createElement("script"),Ie(l),nt(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},i.set(a,l))}}function o8(e,t){ri.M(e,t);var n=Xl;if(n&&e){var i=ml(n).hoistableScripts,a=Zl(e),l=i.get(a);l||(l=n.querySelector(gr(a)),l||(e=oe({src:e,async:!0,type:"module"},t),(t=on.get(a))&&q2(e,t),l=n.createElement("script"),Ie(l),nt(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},i.set(a,l))}}function ww(e,t,n,i){var a=(a=bi.current)?xo(a):null;if(!a)throw Error(S(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ql(n.href),n=ml(a).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ql(n.href);var l=ml(a).hoistableStyles,s=l.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},l.set(e,s),(l=a.querySelector(mr(e)))&&!l._p&&(s.instance=l,s.state.loading=5),on.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},on.set(e,n),l||c8(a,e,n,s.state))),t&&i===null)throw Error(S(528,""));return s}if(t&&i!==null)throw Error(S(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zl(n),n=ml(a).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(S(444,e))}}function Ql(e){return'href="'+en(e)+'"'}function mr(e){return'link[rel="stylesheet"]['+e+"]"}function yw(e){return oe({},e,{"data-precedence":e.precedence,precedence:null})}function c8(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),nt(t,"link",n),Ie(t),e.head.appendChild(t))}function Zl(e){return'[src="'+en(e)+'"]'}function gr(e){return"script[async]"+e}function pw(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+en(n.href)+'"]');if(i)return t.instance=i,Ie(i),i;var a=oe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ie(i),nt(i,"style",a),So(i,n.precedence,e),t.instance=i;case"stylesheet":a=Ql(n.href);var l=e.querySelector(mr(a));if(l)return t.state.loading|=4,t.instance=l,Ie(l),l;i=yw(n),(a=on.get(a))&&V2(i,a),l=(e.ownerDocument||e).createElement("link"),Ie(l);var s=l;return s._p=new Promise(function(r,o){s.onload=r,s.onerror=o}),nt(l,"link",i),t.state.loading|=4,So(l,n.precedence,e),t.instance=l;case"script":return l=Zl(n.src),(a=e.querySelector(gr(l)))?(t.instance=a,Ie(a),a):(i=n,(a=on.get(l))&&(i=oe({},n),q2(i,a)),e=e.ownerDocument||e,a=e.createElement("script"),Ie(a),nt(a,"link",i),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(S(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(i=t.instance,t.state.loading|=4,So(i,n.precedence,e));return t.instance}function So(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=i.length?i[i.length-1]:null,l=a,s=0;s<i.length;s++){var r=i[s];if(r.dataset.precedence===t)l=r;else if(l!==a)break}l?l.parentNode.insertBefore(e,l.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function V2(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function q2(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Eo=null;function vw(e,t,n){if(Eo===null){var i=new Map,a=Eo=new Map;a.set(n,i)}else a=Eo,i=a.get(n),i||(i=new Map,a.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var l=n[a];if(!(l[Ds]||l[Pe]||e==="link"&&l.getAttribute("rel")==="stylesheet")&&l.namespaceURI!=="http://www.w3.org/2000/svg"){var s=l.getAttribute(t)||"";s=e+s;var r=i.get(s);r?r.push(l):i.set(s,[l])}}return i}function bw(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function f8(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function xw(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function d8(e,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=Ql(i.href),l=t.querySelector(mr(a));if(l){t=l._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_o.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=l,Ie(l);return}l=t.ownerDocument||t,i=yw(i),(a=on.get(a))&&V2(i,a),l=l.createElement("link"),Ie(l);var s=l;s._p=new Promise(function(r,o){s.onload=r,s.onerror=o}),nt(l,"link",i),n.instance=l}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=_o.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var F2=0;function h8(e,t){return e.stylesheets&&e.count===0&&Ao(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var i=setTimeout(function(){if(e.stylesheets&&Ao(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4+t);0<e.imgBytes&&F2===0&&(F2=62500*Zv());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ao(e,e.stylesheets),e.unsuspend)){var l=e.unsuspend;e.unsuspend=null,l()}},(e.imgBytes>F2?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(a)}}:null}function _o(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ao(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var To=null;function Ao(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,To=new Map,t.forEach(m8,e),To=null,_o.call(e))}function m8(e,t){if(!(t.state.loading&4)){var n=To.get(e);if(n)var i=n.get(null);else{n=new Map,To.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),l=0;l<a.length;l++){var s=a[l];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),i=s)}i&&n.set(null,i)}a=t.instance,s=a.getAttribute("data-precedence"),l=n.get(s)||i,l===i&&n.set(null,a),n.set(s,a),this.count++,i=_o.bind(this),a.addEventListener("load",i),a.addEventListener("error",i),l?l.parentNode.insertBefore(a,l.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var wr={$$typeof:Fn,Provider:null,Consumer:null,_currentValue:oa,_currentValue2:oa,_threadCount:0};function g8(e,t,n,i,a,l,s,r,o){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Rf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rf(0),this.hiddenUpdates=Rf(null),this.identifierPrefix=i,this.onUncaughtError=a,this.onCaughtError=l,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function Sw(e,t,n,i,a,l,s,r,o,c,f,h){return e=new g8(e,t,n,s,o,c,f,h,r),t=1,l===!0&&(t|=24),l=Gt(3,null,null,t),e.current=l,l.stateNode=e,t=Sd(),t.refCount++,e.pooledCache=t,t.refCount++,l.memoizedState={element:i,isDehydrated:n,cache:t},Ad(l),e}function Ew(e){return e?(e=_l,e):_l}function _w(e,t,n,i,a,l){a=Ew(a),i.context===null?i.context=a:i.pendingContext=a,i=Mi(t),i.payload={element:n},l=l===void 0?null:l,l!==null&&(i.callback=l),n=Ci(e,i,t),n!==null&&(bt(n,e,t),Ks(n,e,t))}function Tw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Y2(e,t){Tw(e,t),(e=e.alternate)&&Tw(e,t)}function Aw(e){if(e.tag===13||e.tag===31){var t=wa(e,67108864);t!==null&&bt(t,e,67108864),Y2(e,67108864)}}function Nw(e){if(e.tag===13||e.tag===31){var t=Yt();t=Gf(t);var n=wa(e,t);n!==null&&bt(n,e,t),Y2(e,t)}}var No=!0;function w8(e,t,n,i){var a=B.T;B.T=null;var l=W.p;try{W.p=2,X2(e,t,n,i)}finally{W.p=l,B.T=a}}function y8(e,t,n,i){var a=B.T;B.T=null;var l=W.p;try{W.p=8,X2(e,t,n,i)}finally{W.p=l,B.T=a}}function X2(e,t,n,i){if(No){var a=Q2(i);if(a===null)D2(e,t,i,jo,n),Mw(e,i);else if(v8(a,e,t,n,i))i.stopPropagation();else if(Mw(e,i),t&4&&-1<p8.indexOf(e)){for(;a!==null;){var l=hl(a);if(l!==null)switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var s=fa(l.pendingLanes);if(s!==0){var r=l;for(r.pendingLanes|=2,r.entangledLanes|=2;s;){var o=1<<31-Bt(s);r.entanglements[1]|=o,s&=~o}Un(l),!(P&6)&&(oo=Lt()+500,cr(0))}}break;case 31:case 13:r=wa(l,2),r!==null&&bt(r,l,2),fo(),Y2(l,2)}if(l=Q2(i),l===null&&D2(e,t,i,jo,n),l===a)break;a=l}a!==null&&i.stopPropagation()}else D2(e,t,i,null,n)}}function Q2(e){return e=Kf(e),Z2(e)}var jo=null;function Z2(e){if(jo=null,e=dl(e),e!==null){var t=Es(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=N3(t),e!==null)return e;e=null}else if(n===31){if(e=j3(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return jo=e,null}function jw(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ip()){case U3:return 2;case B3:return 8;case wu:case ap:return 32;case R3:return 268435456;default:return 32}default:return 32}}var K2=!1,Vi=null,qi=null,Fi=null,yr=new Map,pr=new Map,Yi=[],p8="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Mw(e,t){switch(e){case"focusin":case"focusout":Vi=null;break;case"dragenter":case"dragleave":qi=null;break;case"mouseover":case"mouseout":Fi=null;break;case"pointerover":case"pointerout":yr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pr.delete(t.pointerId)}}function vr(e,t,n,i,a,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:l,targetContainers:[a]},t!==null&&(t=hl(t),t!==null&&Aw(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function v8(e,t,n,i,a){switch(t){case"focusin":return Vi=vr(Vi,e,t,n,i,a),!0;case"dragenter":return qi=vr(qi,e,t,n,i,a),!0;case"mouseover":return Fi=vr(Fi,e,t,n,i,a),!0;case"pointerover":var l=a.pointerId;return yr.set(l,vr(yr.get(l)||null,e,t,n,i,a)),!0;case"gotpointercapture":return l=a.pointerId,pr.set(l,vr(pr.get(l)||null,e,t,n,i,a)),!0}return!1}function Cw(e){var t=dl(e.target);if(t!==null){var n=Es(t);if(n!==null){if(t=n.tag,t===13){if(t=N3(n),t!==null){e.blockedOn=t,Y3(e.priority,function(){Nw(n)});return}}else if(t===31){if(t=j3(n),t!==null){e.blockedOn=t,Y3(e.priority,function(){Nw(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Q2(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);Zf=i,n.target.dispatchEvent(i),Zf=null}else return t=hl(n),t!==null&&Aw(t),e.blockedOn=n,!1;t.shift()}return!0}function Dw(e,t,n){Mo(e)&&n.delete(t)}function b8(){K2=!1,Vi!==null&&Mo(Vi)&&(Vi=null),qi!==null&&Mo(qi)&&(qi=null),Fi!==null&&Mo(Fi)&&(Fi=null),yr.forEach(Dw),pr.forEach(Dw)}function Co(e,t){e.blockedOn===t&&(e.blockedOn=null,K2||(K2=!0,qe.unstable_scheduleCallback(qe.unstable_NormalPriority,b8)))}var Do=null;function Ow(e){Do!==e&&(Do=e,qe.unstable_scheduleCallback(qe.unstable_NormalPriority,function(){Do===e&&(Do=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],a=e[t+2];if(typeof i!="function"){if(Z2(i||n)===null)continue;break}var l=hl(n);l!==null&&(e.splice(t,3),t-=3,Qd(l,{pending:!0,data:a,method:n.method,action:i},i,a))}}))}function Kl(e){function t(o){return Co(o,e)}Vi!==null&&Co(Vi,e),qi!==null&&Co(qi,e),Fi!==null&&Co(Fi,e),yr.forEach(t),pr.forEach(t);for(var n=0;n<Yi.length;n++){var i=Yi[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Yi.length&&(n=Yi[0],n.blockedOn===null);)Cw(n),n.blockedOn===null&&Yi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var a=n[i],l=n[i+1],s=a[mt]||null;if(typeof l=="function")s||Ow(n);else if(s){var r=null;if(l&&l.hasAttribute("formAction")){if(a=l,s=l[mt]||null)r=s.formAction;else if(Z2(a)!==null)continue}else r=s.action;typeof r=="function"?n[i+1]=r:(n.splice(i,3),i-=3),Ow(n)}}}function zw(){function e(l){l.canIntercept&&l.info==="react-transition"&&l.intercept({handler:function(){return new Promise(function(s){return a=s})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),i||setTimeout(n,20)}function n(){if(!i&&!navigation.transition){var l=navigation.currentEntry;l&&l.url!=null&&navigation.navigate(l.url,{state:l.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function I2(e){this._internalRoot=e}Oo.prototype.render=I2.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));var n=t.current,i=Yt();_w(n,i,e,t,null,null)},Oo.prototype.unmount=I2.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_w(e.current,2,null,e,null,null),fo(),t[fl]=null}};function Oo(e){this._internalRoot=e}Oo.prototype.unstable_scheduleHydration=function(e){if(e){var t=F3();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yi.length&&t!==0&&t<Yi[n].priority;n++);Yi.splice(n,0,e),n===0&&Cw(e)}};var kw=T3.version;if(kw!=="19.2.0")throw Error(S(527,kw,"19.2.0"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(S(188)):(e=Object.keys(e).join(","),Error(S(268,e)));return e=Jy(t),e=e!==null?C3(e):null,e=e===null?null:e.stateNode,e};var x8={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zo.isDisabled&&zo.supportsFiber)try{js=zo.inject(x8),Ut=zo}catch{}}fu.createRoot=function(e,t){if(!A3(e))throw Error(S(299));var n=!1,i="",a=Vm,l=qm,s=Fm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(l=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Sw(e,1,!1,null,null,n,i,null,a,l,s,zw),e[fl]=t.current,C2(e),new I2(t)},fu.hydrateRoot=function(e,t,n){if(!A3(e))throw Error(S(299));var i=!1,a="",l=Vm,s=qm,r=Fm,o=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(l=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(o=n.formState)),t=Sw(e,1,!0,t,n??null,i,a,o,l,s,r,zw),t.context=Ew(null),n=t.current,i=Yt(),i=Gf(i),a=Mi(i),a.callback=null,Ci(n,a,i),n=i,t.current.lanes=n,Cs(t,n),Un(t),e[fl]=t.current,C2(e),new Oo(t)},fu.version="19.2.0";function Lw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Lw)}catch(e){console.error(e)}}Lw(),S3.exports=fu;var S8=S3.exports;const E8=e=>u.jsx("span",{className:"iw-text-2xl",children:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...e,children:[u.jsx("path",{d:"M0 0C9.01627 8.39148 22.9837 8.39148 32 0C23.6085 9.01627 23.6085 22.9837 32 32C22.9837 23.6085 9.01627 23.6085 0 32C8.39148 22.9837 8.39148 9.01627 0 0Z",fill:"url(#paint0_linear_6039_13039)"}),u.jsx("defs",{children:u.jsxs("linearGradient",{id:"paint0_linear_6039_13039",x1:"16",y1:"-3.5",x2:"41.5",y2:"29",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{offset:"0.210966",stopColor:"#1E06CB"}),u.jsx("stop",{offset:"0.740385",stopColor:"#DB38EF"})]})})]})}),_8=()=>u.jsx(Zo,{config:{api:{baseUrl:"http://localhost:8000/api",authToken:""},interview:{proctoring:{enabled:!1,gazeAnalysisEnabled:!1,showControls:!1,showEngagementBar:!1,showLandmarks:!1}}},children:u.jsx("div",{className:"interview-widget-container",children:u.jsx(Uo,{title:"Frontend Developer",brandName:"Previa",interviewId:"ea3cb06a-c168-4ad3-8084-4165a79473d3",className:"iw-rounded-none iw-shadow-none",onInterviewEnd:()=>{console.log("🎉🎉 Interview ended 🎉🎉"),window.location.reload(),sessionStorage.clear()},onInterviewDisqualify:()=>{console.log("❌ Interview disqualified ❌")}})})}),T8=document.getElementById("root");S8.createRoot(T8).render(u.jsx(_8,{}));const A8=(e,t,n)=>Math.max(t,Math.min(n,e)),Uw=e=>{const t=Math.max(0,Math.floor(e)),n=Math.floor(t/60).toString().padStart(2,"0"),i=(t%60).toString().padStart(2,"0");return`${n}:${i}`},ko=({total:e,remaining:t,size:n=64,strokeWidth:i=6,className:a="",showLabel:l=!0})=>{const s=Math.max(1,e||1),r=A8(t/s,0,1),{radius:o,circumference:c,dashOffset:f,center:h}=y.useMemo(()=>{const v=(n-i)/2,x=2*Math.PI*v,E=x*(1-r),g=Math.round(i)%2===1,w=n/2+(g?.5:0);return{radius:v,circumference:x,dashOffset:E,center:w}},[n,i,r]),d=y.useMemo(()=>r<=.25?"iw-stroke-red-500":r<=.5?"iw-stroke-yellow-500":"iw-stroke-green-500",[r]),m=r<=.25?"iw-animate-pulse":"";return u.jsxs("div",{className:`iw-relative iw-inline-flex iw-items-center iw-justify-center iw-rounded-full iw-bg-white ${a}`,style:{width:n,height:n},"aria-label":`Time remaining ${Uw(t)}`,role:"timer","aria-live":"polite",children:[u.jsx("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,preserveAspectRatio:"xMidYMid meet",children:u.jsxs("g",{transform:`rotate(-90 ${h} ${h})`,children:[u.jsx("circle",{cx:h,cy:h,r:o,className:"iw-stroke-gray-200",strokeWidth:i,fill:"none",shapeRendering:"geometricPrecision",vectorEffect:"non-scaling-stroke"}),u.jsx("circle",{cx:h,cy:h,r:o,className:`${d} ${m}`,strokeWidth:i,strokeLinecap:"round",fill:"none",strokeDasharray:c,strokeDashoffset:f,shapeRendering:"geometricPrecision",vectorEffect:"non-scaling-stroke",style:{transition:"stroke-dashoffset 0.3s ease, stroke 0.2s ease"}})]})}),l?u.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0",children:u.jsx("span",{className:`iw-text-[11px] iw-font-semibold iw-tabular-nums ${r<=.25?"iw-text-red-600":r<=.5?"iw-text-yellow-600":"iw-text-green-600"}`,children:Uw(t)})}):u.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0",children:u.jsx(w6,{})})]})},N8=({timerState:e,answeringTime:t})=>{const n=(e==null?void 0:e.currentPhaseTimeRemaining)||0,i=t||p3.answeringDuration;return u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[u.jsx(ko,{total:i,remaining:n,size:50,strokeWidth:4,showLabel:!1,className:"iw-shadow-sm iw-border iw-border-gray-100"}),u.jsxs("div",{className:"iw-flex iw-flex-col",children:[u.jsx("span",{className:"iw-text-[#5C6686]",children:"Time left to answer"}),u.jsxs("span",{className:"iw-text-xl iw-font-bold iw-text-[#062260]",children:[Io(n)," mins"]})]})]})},j8=({question:e,isLoading:t=!1,phase:n,brandName:i,timerState:a,answeringTime:l})=>u.jsx("div",{className:"iw-rounded-xl iw-mb-4 message-animation iw-text-gray-800 iw-py-1",children:u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-4",children:[u.jsx("div",{className:`iw-flex iw-flex-col iw-items-center iw-justify-center iw-relative iw-h-16 iw-w-16 iw-shrink-0 iw-shadow iw-rounded-full iw-border-[#E8EEFE] iw-border-4 ${n===K.READING_QUESTION?"iw-animate-speaking":""}`,children:u.jsx("div",{className:"iw-bg-transparent iw-flex iw-items-center iw-justify-center iw-rounded-full iw-size-full",style:{backgroundImage:"linear-gradient(#B5D0FD, #FFFFFF)"},children:u.jsx(E8,{className:"iw-size-8"})})}),u.jsx(M8,{phase:n,question:e,isLoading:t,brandName:i,timerState:a,answeringTime:l})]})}),M8=({phase:e,question:t,isLoading:n,brandName:i,timerState:a,answeringTime:l})=>{const s=i||"We",r=i?"is":"are";if(n||e===K.FETCHING_QUESTION||e===K.IDLE)return u.jsxs("div",{className:"iw-animate-pulse iw-w-full iw-space-y-3 iw-mr-10",children:[u.jsx("div",{className:"iw-h-5 iw-bg-gray-200 iw-rounded iw-w-full"}),u.jsx("div",{className:"iw-h-5 iw-bg-gray-200 iw-rounded iw-w-3/4"})]});const o=()=>u.jsxs("span",{className:"iw-animate-dot-wave iw-ml-1",children:[u.jsx("span",{children:"."}),u.jsx("span",{children:"."}),u.jsx("span",{children:"."})]});switch(e){case K.ANSWERING:return u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between iw-w-full",children:[u.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:["Listening",u.jsx(o,{})]}),u.jsx(N8,{timerState:a,answeringTime:l})]});case K.TRANSCRIBING:return u.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:[s," ",r," analyzing your answer",u.jsx(o,{})]});case(K.EDITING||K.SUBMITTING):return u.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:[s," ",r," waiting for your answer..."]});default:return u.jsx("p",{className:"iw-text-lg iw-leading-7",children:t==null?void 0:t.question})}},C8=({label:e,error:t,fullWidth:n=!1,className:i="",id:a,...l})=>{const s=a||`textarea-${Math.random().toString(36).substring(2,9)}`,r="iw-block iw-rounded-md iw-border iw-border-gray-300 iw-shadow-sm iw-px-4 iw-py-2 iw-text-sm iw-transition-all",o=t?"iw-border-red-500 iw-focus:border-red-500 iw-focus:ring-red-500":"",c=n?"iw-w-full":"",f=i.includes("iw-h-full")||n?"iw-h-full":"";return u.jsxs("div",{className:`iw-h-full iw-flex iw-flex-col ${n?"iw-w-full":""}`,children:[e&&u.jsx("label",{htmlFor:s,className:"iw-block iw-text-sm iw-font-medium iw-text-gray-700 iw-mb-1",children:e}),u.jsx("textarea",{id:s,className:`${r} ${o} ${c} ${f} ${i}`,"aria-invalid":t?"true":"false",...l}),t&&u.jsx("p",{className:"iw-mt-1 iw-text-sm iw-text-red-600",children:t})]})},D8=({answerText:e,onAnswerChange:t,timerState:n,editingTime:i})=>u.jsxs("div",{className:"iw-w-full iw-bg-white iw-rounded-xl iw-border iw-border-[#84bbf5] iw-overflow-hidden iw-rounded-tr-none",children:[u.jsx("div",{className:"iw-p-2 iw-pb-0",children:u.jsx(C8,{value:e,onChange:t,placeholder:"Type your answer here...",className:"iw-w-full iw-h-64 iw-resize-none iw-bg-transparent iw-border-none iw-text-[#062260] iw-text-base iw-leading-relaxed focus-visible:iw-outline-0 iw-p-0",disabled:n.phase===K.SUBMITTING})}),u.jsxs("div",{className:"iw-bg-[#F1F5FE] iw-px-2 iw-py-2 iw-flex iw-items-center iw-justify-between iw-border-t iw-border-[#E8EEFE]",children:[u.jsx("span",{className:"iw-text-[#062260] iw-text-sm iw-font-medium iw-line-clamp-1",children:"Time left to edit answer"}),u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[u.jsx(ko,{total:i,remaining:n.currentPhaseTimeRemaining,size:32,strokeWidth:3,showLabel:!1}),u.jsx("span",{className:"iw-text-[#062260] iw-text-sm iw-font-bold",children:`${Io(n.currentPhaseTimeRemaining)} mins`})]})]})]}),Bw=({children:e})=>u.jsx("div",{className:"iw-flex iw-flex-col iw-items-start iw-mt-3 iw-gap-1",children:e}),O8=({children:e})=>u.jsx("div",{className:"iw-flex iw-flex-col iw-items-end iw-mt-3 iw-gap-1",children:e}),z8=({questionNumber:e})=>u.jsxs("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#E6F3FF",border:"1px solid #BDE0FD"},children:[" Q",e]}),Rw=({label:e})=>u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2 iw-text-sm iw-text-gray-500 iw-bg-[#F1F5FE] iw-px-4 iw-py-1.5 iw-rounded-full iw-my-2 iw-font-semibold",children:[e&&u.jsx("span",{className:"iw-font-medium",children:e}),u.jsxs("span",{className:"iw-animate-dot-wave iw-text-2xl",children:[u.jsx("span",{children:"."}),u.jsx("span",{children:"."}),u.jsx("span",{children:"."})]})]}),k8=({phase:e,questionNumber:t})=>{switch(e){case K.FETCHING_QUESTION:return u.jsxs(Bw,{children:[u.jsx(z8,{questionNumber:t+1}),u.jsx(Rw,{})]});case K.ANSWERING:return u.jsx(O8,{children:u.jsx(Rw,{label:"You"})});case K.TRANSCRIBING:return u.jsx(Bw,{children:u.jsxs("div",{className:"iw-flex iw-items-center iw-px-1 iw-py-1.5 iw-rounded-lg iw-mb-2 iw-text-sm iw-bg-[#F2E8FE]",children:[u.jsx("img",{src:"../../../../src/assets/transcribing.gif",alt:"Transcribing",className:"iw-h-8 iw-w-12"}),u.jsx("span",{className:"iw-text-sm iw-text-[#062260]",children:"Analyzing answer…"})]})});default:return null}},L8=({item:e,index:t,isCurrentQuestion:n=!1,isEditable:i=!1,answerText:a="",onAnswerChange:l,timerState:s,editingTime:r})=>{const o=i&&s&&r!==void 0,c=o||e.answer;return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-start",children:[u.jsxs("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#E6F3FF",border:"1px solid #BDE0FD"},children:["Q",t+1]}),u.jsx("div",{className:"iw-w-full iw-p-4 iw-rounded-xl iw-text-[#062260] iw-text-base iw-leading-relaxed iw-rounded-tl-none",style:{backgroundColor:"#F1F5FE",border:n?"2px solid #84bbf5":"1px solid transparent"},children:e.question})]}),c&&u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-end iw-mt-4",children:[u.jsx("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#F2E8FE",border:"1px solid #E9D5FF"},children:"You"}),o?u.jsx(D8,{answerText:a||"",onAnswerChange:l,timerState:s,editingTime:r}):u.jsx("div",{className:"iw-w-full iw-p-4 iw-rounded-xl iw-text-[#062260] iw-text-base iw-leading-relaxed iw-rounded-tr-none",style:{backgroundColor:"#F7F1FE"},children:e.answer})]}),n&&u.jsx(k8,{phase:s==null?void 0:s.phase,questionNumber:t+1})]})},U8=()=>u.jsx("div",{className:"iw-space-y-6 iw-animate-pulse",children:[1,2,3].map(e=>u.jsxs("div",{className:`iw-flex iw-flex-col ${e%2===0?"iw-items-end":"iw-items-start"} iw-gap-2`,children:[u.jsx("div",{className:"iw-h-8 iw-w-16 iw-bg-gray-200 iw-rounded-full"}),u.jsx("div",{className:"iw-h-24 iw-w-full iw-bg-gray-100 iw-rounded-xl"})]},e))}),B8=({transcript:e,isLoading:t,className:n="",bottomRef:i,isEditing:a,answerText:l,onAnswerChange:s,timerState:r,editingTime:o})=>u.jsxs("div",{className:`iw-h-full iw-flex iw-flex-col iw-bg-white iw-scroll-smooth iw-p-6 iw-pr-2 iw-min-w-32 iw-border iw-rounded-tr-2xl iw-rounded-br-2xl iw-border-[#E8EEFE] ${n}`,children:[u.jsxs("div",{className:"iw-mb-6",children:[u.jsx("h2",{className:"iw-text-lg iw-font-semibold iw-mb-4",style:{color:"#062260"},children:"Interview transcript"}),u.jsx("div",{className:"iw-h-px iw-w-full iw-border-t iw-border-dashed iw-border-gray-300"})]}),u.jsxs("div",{className:"iw-flex-1 iw-overflow-y-auto iw-pr-2 iw-space-y-6 iw-scrollbar-thin iw-max-w-xl iw-pb-5",children:[t?u.jsx(U8,{}):e==null?void 0:e.map((c,f)=>u.jsx(L8,{item:c,index:f,isCurrentQuestion:f===(e==null?void 0:e.length)-1,isEditable:!!(f===(e==null?void 0:e.length)-1&&a),answerText:l||"",onAnswerChange:s||(()=>{}),timerState:r,editingTime:o},c.qna_id)),u.jsx("div",{ref:i})]})]}),R8=({interviewId:e,className:t="",currentQuestion:n,lastSubmittedAnswer:i,isEditing:a,answerText:l,onAnswerChange:s,timerState:r,editingTime:o})=>{const c=b3(),[f,h]=y.useState([]),[d,m]=y.useState(!0),v=y.useRef(null);return y.useEffect(()=>{var x;(x=v.current)==null||x.scrollIntoView({behavior:"smooth"})},[f,l,r==null?void 0:r.phase]),y.useEffect(()=>{(async()=>{var E;try{const g=await c.getInterviewTranscription(e);h(((E=g==null?void 0:g.data)==null?void 0:E.question_answers)||[])}catch(g){console.error("Failed to fetch transcript:",g)}finally{m(!1)}})()},[e,c]),y.useEffect(()=>{n&&h(x=>{if(x.some(w=>w.qna_id===n.qna_id))return x;const g={qna_id:n.qna_id,question:n.question,answer:null,question_generated_at:new Date().toISOString(),answer_submitted_at:null};return[...x,g]})},[n]),y.useEffect(()=>{i!=null&&i.answer?h(x=>x.map(E=>E.qna_id===i.qnaId?{...E,answer:i.answer,answer_submitted_at:new Date().toISOString()}:E)):l&&h(x=>x.map(E=>E.qna_id===(i==null?void 0:i.qnaId)?{...E,answer:l,answer_submitted_at:new Date().toISOString()}:E))},[i,l]),u.jsx(B8,{transcript:f,isLoading:d||(f==null?void 0:f.length)===0,className:t,bottomRef:v,isEditing:a,answerText:l,onAnswerChange:s,timerState:r,editingTime:o})},G8=({onClick:e,text:t="Submit response"})=>(y.useEffect(()=>{if(typeof window>"u")return;const n=i=>{const a=i.metaKey||i.ctrlKey,l=i.key===" ",s=i.target;s.tagName==="INPUT"||s.isContentEditable||a&&l&&(i.preventDefault(),e())};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e]),u.jsx("div",{className:"iw-fixed iw-bottom-10 iw-left-1/4 iw-transform iw--translate-x-1/2 iw-z-50",children:u.jsxs("button",{onClick:e,className:"iw-flex iw-items-center iw-gap-3 iw-bg-[#4C6CFF] hover:iw-bg-[#4c6dffd5] iw-text-white iw-px-5 iw-py-3 iw-rounded-lg iw-shadow-lg iw-transition-all iw-duration-200 iw-group",children:[u.jsx("span",{className:"iw-font-semibold iw-text-sm",children:t}),u.jsx("span",{className:"iw-bg-white/90 iw-text-[#062260] iw-px-2 iw-py-1 iw-rounded iw-text-xs iw-font-mono iw-font-bold group-hover:iw-bg-white iw-transition-colors",children:"Press Ctrl / ⌘ + Space"})]})})),Gw=({brandName:e,currentQuestion:t,state:n,phase:i,className:a="",interviewId:l="",interview_duration:s=Tr,videoFeedRef:r,lastSubmittedAnswer:o,onNextPhase:c,answerText:f,onAnswerChange:h,editingTime:d,answeringTime:m})=>u.jsxs("div",{className:`iw-px-4 iw-py-3 ${a} iw-h-[calc(100vh_-_120px)] iw-max-h-[calc(100vh_-_120px)] iw-flex iw-gap-0 iw-relative`,children:[u.jsxs("div",{className:"iw-flex iw-flex-col iw-flex-1 iw-p-5 iw-bg-white/50 iw-border iw-border-[#E8EEFE] iw-rounded-s-3xl iw-overflow-hidden",children:[u.jsx("div",{className:"iw-flex iw-items-start iw-justify-between iw-gap-3 iw-mb-4",children:u.jsx("div",{className:"iw-flex-1",children:u.jsx(j8,{question:t,isLoading:i===K.FETCHING_QUESTION||i===K.IDLE,phase:i,brandName:e,timerState:n,answeringTime:m})})}),u.jsx("div",{className:"iw-flex-1 iw-min-h-0 iw-rounded-[16px] iw-overflow-hidden iw-relative",children:u.jsx(w3,{ref:r,interviewId:l,interview_duration:s,isAnswering:i===K.ANSWERING})})]}),u.jsx("div",{className:"iw-interview-transcription iw-w-1/4 iw-min-w-32 iw-h-full",children:u.jsx(R8,{interviewId:l,currentQuestion:t,lastSubmittedAnswer:o,isEditing:i===K.EDITING,answerText:f,onAnswerChange:h,timerState:n,editingTime:d})}),c&&(i===K.ANSWERING||i===K.EDITING)&&u.jsx(G8,{onClick:c,text:i===K.ANSWERING?"Submit Response":"Submit Final Response"})]}),H8=({confirmExitInterview:e,isOpen:t,onClose:n})=>u.jsx(Sf,{isOpen:t,onClose:n,title:"Exit Interview",closeOnOverlayClick:!1,children:u.jsxs("div",{className:"iw-space-y-5",children:[u.jsxs("div",{className:"iw-flex iw-items-start iw-gap-3 iw-rounded-xl iw-p-2",children:[u.jsx("div",{className:"iw-flex iw-h-10 iw-w-10 iw-flex-none iw-items-center iw-justify-center iw-rounded-full iw-bg-rose-100 iw-text-rose-600",children:"!"}),u.jsxs("div",{className:"iw-space-y-2",children:[u.jsx("p",{className:"iw-text-sm iw-font-semibold iw-text-rose-600",children:"Leaving now will end your interview !"}),u.jsx("p",{className:"iw-text-sm iw-text-slate-500",children:"Are you sure you want to exit? All progress will be lost and you will not be able to resume."})]})]}),u.jsxs("div",{className:"iw-flex iw-flex-col-reverse iw-gap-2 sm:iw-flex-row sm:iw-items-center sm:iw-justify-end iw-pb-1",children:[u.jsx("button",{className:"iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-border iw-border-slate-200 iw-bg-white iw-px-4 iw-py-2 iw-text-sm iw-font-medium iw-text-slate-600 iw-shadow-sm iw-transition hover:iw-bg-slate-50",onClick:n,children:"Stay in interview"}),u.jsx("button",{className:"iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-px-4 iw-py-2 iw-text-sm iw-font-semibold iw-text-white iw-transition hover:iw-brightness-110",style:{background:"linear-gradient(to right, rgba(244, 63, 94, 0.8), rgba(225, 29, 72, 0.8))",boxShadow:"0 12px 30px -16px rgba(244, 63, 94, 0.65)"},onClick:e,children:"Confirm exit"})]})]})}),Hw=({title:e,brandName:t,brandLogo:n,onExit:i,totalDuration:a=30,elapsedTime:l=0})=>{const{baseColor:s}=$l(),[r,o]=y.useState(!1),c=Math.min(l/(a*60)*100,100),f=()=>u.jsxs("div",{className:"iw-px-4 iw-pb-2 iw-flex iw-items-center iw-gap-3",children:[u.jsx("div",{className:"iw-flex-1 iw-h-4 iw-bg-[#F2F4F7] iw-rounded-full iw-overflow-hidden iw-border iw-border-blue-100 iw-relative",children:u.jsx("div",{className:"iw-h-full iw-bg-[#0EB00E] iw-rounded-full iw-transition-all iw-duration-1000 iw-ease-linear",style:{width:`${c}%`}})}),u.jsxs("div",{className:"iw-text-sm iw-font-medium iw-whitespace-nowrap",children:[u.jsx("span",{className:"iw-text-[#062260]",children:Io(l)}),u.jsxs("span",{className:"iw-text-[#667085]",children:["/",a," Min"]})]})]});return u.jsxs("header",{className:"iw-w-full iw-text-gray-900 iw-shadow-sm",children:[u.jsxs("div",{className:"iw-mx-auto iw-flex iw-items-center iw-justify-between iw-p-4 iw-pt-1 iw-mb-2 iw-border-b iw-border-[#B3B9CB] iw-border-dashed",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-space-x-2",children:[n||u.jsx("div",{className:"iw-h-7 iw-w-7 iw-rounded-md iw-flex iw-items-center iw-justify-center iw-text-white iw-font-semibold",style:{backgroundColor:s},children:l1(t)}),u.jsx("p",{className:"iw-text-xl iw-font-semibold",children:t})]}),u.jsx("h1",{className:"iw-text-2xl iw-font-semibold iw-text-gradient-silver",children:e}),u.jsx("button",{className:"iw-text-sm iw-text-[#E94315] iw-min-w-10 iw-rounded-md hover:iw-bg-orange-100 iw-p-2",onClick:()=>o(!0),children:u.jsxs("span",{className:"iw-flex iw-items-center iw-gap-1 iw-text-[18px] iw-font-semibold iw-whitespace-nowrap",children:[u.jsx(r1,{className:"iw-text-[#E94315] iw-size-5"}),"Leave interview"]})})]}),u.jsx(f,{}),u.jsx("div",{className:"iw-h-px iw-bg-gray-200"}),u.jsx(H8,{isOpen:r,confirmExitInterview:()=>{i(),o(!1)},onClose:()=>o(!1)})]})},V8=({className:e="",width:t,height:n=56,barWidth:i=3,gap:a=2,fftSize:l=1024,smoothingTimeConstant:s=.8,mediaStream:r,startOnMount:o=!0})=>{const{baseColor:c}=$l(),f=y.useRef(null),h=y.useRef(null),d=y.useRef(null),m=y.useRef(null),v=y.useRef(null),x=y.useRef(null),E=y.useRef(!1),[g,w]=y.useState(null);y.useEffect(()=>{if(t||!h.current)return;const b=h.current,A=()=>{const _=f.current;if(!_)return;const M=b.clientWidth,T=n;_.width=Math.max(1,Math.floor(M*window.devicePixelRatio||1)),_.height=Math.max(1,Math.floor(T*window.devicePixelRatio||1))},N=new ResizeObserver(A);return N.observe(b),A(),()=>N.disconnect()},[t,n]),y.useEffect(()=>{if(!t)return;const b=f.current;b&&(b.width=Math.max(1,Math.floor(t*(window.devicePixelRatio||1))),b.height=Math.max(1,Math.floor(n*(window.devicePixelRatio||1))))},[t,n]),y.useEffect(()=>{let b=!1;return(async()=>{try{const N=new(window.AudioContext||window.webkitAudioContext);d.current=N;let _=r;if(!_){if(!o)return;_=await navigator.mediaDevices.getUserMedia({audio:!0,video:!1}),E.current=!0}if(b)return;const M=N.createAnalyser();M.fftSize=l,M.smoothingTimeConstant=s,m.current=M;const T=N.createMediaStreamSource(_);v.current=T,T.connect(M),p()}catch(N){w((N==null?void 0:N.message)||"Failed to initialize microphone")}})(),()=>{var N,_,M,T;b=!0,x.current&&cancelAnimationFrame(x.current);try{(N=v.current)==null||N.disconnect()}catch{}try{(_=m.current)==null||_.disconnect()}catch{}E.current&&((T=((M=v.current)==null?void 0:M.mediaStream)||void 0)==null||T.getTracks().forEach(D=>D.stop())),d.current&&d.current.state!=="closed"&&d.current.close()}},[r,l,s,o]);const p=()=>{const b=f.current,A=m.current;if(!b||!A)return;const N=b.getContext("2d");if(!N)return;const _=window.devicePixelRatio||1,M=b.width,T=b.height,D=A.frequencyBinCount,Ee=new Uint8Array(D),Re=()=>{x.current=requestAnimationFrame(Re),A.getByteTimeDomainData(Ee),N.clearRect(0,0,M,T),N.fillStyle="rgba(0,0,0,0)",N.fillRect(0,0,M,T);const rt=Math.max(1,Math.floor(i*_)),cn=Math.max(1,Math.floor(a*_)),xt=rt+cn,j=Math.max(8,Math.floor((M+cn)/xt)),G=Math.floor(Ee.length/j);for(let R=0;R<j;R++){const $=Math.min(Ee.length-1,R*G),se=Ee[$]/128-1,ut=Math.abs(se),bn=Math.pow(ut,.6),fn=Math.max(T*.06,bn*(T*.9)),Xt=R*xt,ot=(T-fn)/2,ct=140-Math.min(140,140*ut),dn=85,Ce=48+Math.floor(12*(1-ut));N.fillStyle=`${c}`,N.shadowColor=`hsla(${ct}, ${dn}%, ${Ce}%, ${.25*ut})`,N.shadowBlur=8*ut;const Xi=Math.min(rt/2,fn/2);q8(N,Xt,ot,rt,fn,Xi),N.fill()}};Re()};return u.jsxs("div",{ref:h,className:`iw-relative iw-w-full iw-overflow-hidden iw-rounded-md iw-bg-gray-50 ${e}`,style:{height:n},children:[u.jsx("canvas",{ref:f,className:"iw-w-full iw-h-full"}),g&&u.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center",children:u.jsx("span",{className:"iw-text-xs iw-text-red-600 iw-bg-red-50 iw-border iw-border-red-200 iw-px-2 iw-py-1 iw-rounded",children:g})})]})};function q8(e,t,n,i,a,l){const s=Math.min(l,i/2,a/2);e.beginPath(),e.moveTo(t+s,n),e.lineTo(t+i-s,n),e.quadraticCurveTo(t+i,n,t+i,n+s),e.lineTo(t+i,n+a-s),e.quadraticCurveTo(t+i,n+a,t+i-s,n+a),e.lineTo(t+s,n+a),e.quadraticCurveTo(t,n+a,t,n+a-s),e.lineTo(t,n+s),e.quadraticCurveTo(t,n,t+s,n),e.closePath()}const F8=({state:e,answeringTime:t,nextPhase:n,sttError:i})=>u.jsxs("div",{className:"iw-flex iw-flex-col iw-justify-between iw-h-full ",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between",children:[u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"You may start speaking now. We're listening...."}),u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-2",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-1",children:[u.jsx(s1,{className:"iw-size-4 iw-text-orange-600"}),u.jsx("p",{className:"iw-text-gray-700 iw-text-sm",children:"Time to talk: "})]}),u.jsx(ko,{total:t,remaining:e.currentPhaseTimeRemaining,size:50,strokeWidth:4})]})]}),u.jsx("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:"Done talking? Click the button to review your answer."})]}),u.jsxs("div",{children:[u.jsx(V8,{}),i&&u.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Recording error: ",i.message]})]}),u.jsx("div",{className:"iw-w-full iw-grid iw-grid-cols-1",children:u.jsx(Ss,{onClick:()=>{n()},children:"Transcribe My Answer"})})]});function Y8(){const[e,t]=y.useState(!0),n=y.useMemo(()=>[0,1,2].map(i=>({id:i})),[]);return y.useEffect(()=>{const i=setInterval(()=>{t(a=>!a)},1500);return()=>clearInterval(i)},[]),u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-h-full",children:[u.jsx("div",{className:"iw-relative iw-w-80 iw-h-48 ","aria-hidden":!0,children:n.map((i,a)=>{const l=a*50,s=e?l:l+12,r=e?1:.08,o=a*140;return u.jsx("div",{role:"presentation",className:"iw-absolute iw-w-full iw-rounded-lg iw-p-4 iw-shadow-md iw-bg-gradient-to-b iw-from-gray-50 iw-to-gray-100 iw-overflow-hidden",style:{top:0,transform:`translateY(${s}px)`,opacity:r,transition:`transform 600ms cubic-bezier(.2,.9,.3,1) ${o}ms, opacity 400ms ease ${o}ms`},children:u.jsxs("div",{className:"iw-flex iw-gap-3 iw-items-center",children:[u.jsx("div",{className:"iw-w-10 iw-h-10 iw-bg-gray-300 iw-rounded iw-flex-shrink-0"}),u.jsxs("div",{className:"iw-flex-1 iw-space-y-2",children:[u.jsx("div",{className:"iw-h-2 iw-bg-gray-300 iw-rounded iw-w-24"}),u.jsx("div",{className:"iw-h-2 iw-bg-gray-300 iw-rounded iw-w-32"})]})]})},i.id)})}),u.jsx("div",{className:"iw-text-center",children:u.jsx("p",{className:"iw-text-gray-500 iw-font-medium",children:"Preparing your question..."})})]})}const X8=({size:e="192px",className:t,colors:n,animationDuration:i=20})=>{const l={...{bg:"oklch(95% 0.02 264.695)",c1:"oklch(75% 0.15 350)",c2:"oklch(80% 0.12 200)",c3:"oklch(78% 0.14 280)"},...n},s=parseInt(e.replace("px",""),10),r=s<50?Math.max(s*.008,1):Math.max(s*.015,4),o=s<50?Math.max(s*.004,1.2):Math.max(s*.008,1.5),c=s<50?Math.max(s*.004,.05):Math.max(s*.008,.1),f=s<50?Math.max(s*.004,.5):Math.max(s*.008,2),h=s<30?"0%":s<50?"5%":s<100?"15%":"25%",d=s<30?1.1:s<50?Math.max(o*1.2,1.3):o;return u.jsx("div",{className:`siri-orb ${t}`,style:{width:e,height:e,"--bg":l.bg,"--c1":l.c1,"--c2":l.c2,"--c3":l.c3,"--animation-duration":`${i}s`,"--blur-amount":`${r}px`,"--contrast-amount":d,"--dot-size":`${c}px`,"--shadow-spread":`${f}px`,"--mask-radius":h},children:u.jsx("style",{children:`
107
107
  @property --angle {
108
108
  syntax: "<angle>";
109
109
  inherits: false;
@@ -208,4 +208,4 @@ Error generating stack: `+n.message+`
208
208
  animation: none;
209
209
  }
210
210
  }
211
- `})})};function g7({ttsError:e}){return u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-w-full iw-h-full",children:[u.jsx(w7,{size:"80px"}),e&&u.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Audio playback failed: ",e.message]}),u.jsx("p",{className:"iw-text- iw-text-gray-700",children:"Your AI interviewer is speaking..."})]})}const p7=({state:e,thinkingTime:t,nextPhase:n})=>u.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-6 iw-items-center iw-justify-center iw-text-center iw-h-full ",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"Get Ready to Answer"}),u.jsx("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:"After 30-seconds thinking time, recording will start automatically, or you can begin recording early by clicking the button below."})]}),u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-2",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-1",children:[u.jsx(lh,{className:"iw-size-4 iw-text-orange-600"}),u.jsx("p",{className:"iw-text-gray-700 iw-text-sm",children:"Time to think: "})]}),u.jsx(Cu,{total:t,remaining:e.currentPhaseTimeRemaining,size:50,strokeWidth:4})]}),u.jsx("div",{className:"iw-w-full iw-grid iw-grid-cols-1",children:u.jsx(us,{onClick:()=>{n()},children:"Start Answering"})})]}),y7=({sttError:e,editingDuration:t})=>u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full",children:[u.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 60 60",fill:"none",children:[u.jsx("rect",{width:60,height:60,rx:30,fill:"url(#prefix__paint0_linear_1460_12482)"}),u.jsx("path",{d:"M28.127 14c.276 7.685 6.442 13.851 14.127 14.127-7.684.276-13.85 6.442-14.127 14.127-.275-7.685-6.442-13.851-14.126-14.127 7.684-.276 13.85-6.442 14.126-14.127zM38.937 31.873A7.331 7.331 0 0046 38.937 7.331 7.331 0 0038.937 46a7.331 7.331 0 00-7.064-7.063 7.331 7.331 0 007.064-7.064z",fill:"#fff"}),u.jsx("defs",{children:u.jsxs("linearGradient",{id:"prefix__paint0_linear_1460_12482",x1:30,y1:-6.563,x2:77.813,y2:54.375,gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{offset:.211,stopColor:"#5C92FA"}),u.jsx("stop",{offset:1,stopColor:"#A75FFD"})]})})]}),u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1 iw-mt-3",children:"Just a moment... We're analyzing your response"}),u.jsxs("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:["After transcription, you'll have ",t||30," sec to review your answer."]}),e&&u.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Transcription error: ",e.message,e.recoverable&&" (attempting to continue)"]})]}),Du=5;function v7({isOpen:e,onClose:t,warningCount:n,violationType:i,onDisqualify:a}){const[l,s]=p.useState(10),r=p.useRef(t);if(p.useEffect(()=>{r.current=t},[t]),p.useEffect(()=>{if(!e)return;const f=setInterval(()=>{s(w=>w<=1?(r.current(),10):w-1)},1e3);return()=>clearInterval(f)},[e]),p.useEffect(()=>{e&&s(10)},[e]),p.useEffect(()=>(e?(document.body.style.overflow="hidden",document.body.classList.add("interview-widget-container")):(document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")),()=>{document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")}),[e]),!e)return null;const c=(()=>{switch(i){case"tab_switch":return{title:"Tab Switch Detected",description:"You attempted to switch to another tab or reload application.",icon:u.jsx(rh,{className:"iw-h-5 iw-w-5"})};case"fullscreen_exit":return{title:"Full Screen Exit Detected",description:"You attempted to exit full screen mode.",icon:u.jsx(i5,{className:"iw-h-5 iw-w-5"})};case"focus_loss":return{title:"Focus Loss Detected",description:"You lost focus from the interview window.",icon:u.jsx($g,{className:"iw-h-5 iw-w-5"})};case"blocked_shortcut":return{title:"Keyboard Shortcut Blocked",description:"You attempted to use a blocked keyboard shortcut.",icon:u.jsx(Qu,{className:"iw-h-5 iw-w-5"})};case"right_click_attempt":return{title:"Right Click Attempted",description:"You attempted to use the right click.",icon:u.jsx(a5,{className:"iw-h-5 iw-w-5"})};case"alt_tab_attempt":return{title:"Alt + Tab Attempted",description:"You attempted to use the Alt + Tab shortcut.",icon:u.jsx(Qu,{className:"iw-h-5 iw-w-5"})};case"blocked_function_key":return{title:"Function Key Blocked",description:"You attempted to use a blocked function key.",icon:u.jsx(Qu,{className:"iw-h-5 iw-w-5"})};default:return{title:"Violation Detected",description:"You attempted to perform an action that is not allowed.",icon:u.jsx(Xl,{className:"iw-h-5 iw-w-5"})}}})(),d=Du-n,h=()=>{n+1>Du?a():t()};return u.jsx("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-black/60 iw-p-4 iw-backdrop-blur-sm",children:u.jsxs("div",{className:"iw-w-full iw-max-w-md iw-rounded-2xl iw-border iw-border-gray-100 iw-bg-white iw-shadow-xl",children:[u.jsxs("div",{className:"iw-p-6 iw-pb-0",children:[u.jsxs("div",{className:"iw-mb-6 iw-flex iw-items-start iw-gap-4",children:[u.jsx("div",{className:"iw-flex iw-h-12 iw-w-12 iw-flex-shrink-0 iw-items-center iw-justify-center iw-rounded-2xl iw-bg-red-50",children:u.jsx(Xl,{className:"iw-h-6 iw-w-6 iw-text-red-500"})}),u.jsxs("div",{className:"iw-flex-1",children:[u.jsx("h2",{className:"iw-mb-1 iw-text-xl iw-font-semibold iw-text-gray-900",children:"Security Violation"}),u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[u.jsx("span",{className:"iw-text-sm iw-text-gray-500",children:"Warning"}),u.jsx("div",{className:"iw-flex iw-gap-1",children:Array.from({length:Du}).map((f,w)=>u.jsx("div",{className:`iw-h-2 iw-w-2 iw-rounded-full ${w<=n-1?"iw-bg-red-500":"iw-bg-gray-200"}`},w))}),u.jsxs("span",{className:"iw-text-sm iw-text-gray-500",children:["(",n,"/",Du,")"]})]})]})]}),u.jsx("div",{className:"iw-mb-5 iw-rounded-2xl iw-border iw-border-red-100 iw-p-5",style:{background:"linear-gradient(to right, rgb(254, 242, 242), rgb(254, 245, 235))",borderColor:"rgb(254, 226, 226)"},children:u.jsxs("div",{className:"iw-flex iw-items-start iw-gap-4",children:[u.jsx("div",{className:"iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-xl iw-bg-white iw-shadow-sm",children:c.icon}),u.jsxs("div",{className:"iw-flex-1",children:[u.jsx("h3",{className:"iw-mb-2 iw-font-semibold iw-text-gray-900",children:c.title}),u.jsx("p",{className:"iw-text-sm iw-leading-relaxed iw-text-gray-700",children:c.description}),u.jsxs("div",{className:"iw-mt-3 iw-flex iw-items-center iw-gap-2 iw-text-xs iw-text-red-600",children:[u.jsx(l5,{className:"iw-h-3 iw-w-3"}),u.jsx("span",{children:"This action is monitored for interview integrity"})]})]})]})}),u.jsxs("div",{className:"iw-mb-5 iw-grid iw-grid-cols-2 iw-gap-3",children:[u.jsx("div",{className:"iw-rounded-xl iw-border iw-border-amber-200 iw-bg-amber-50 iw-p-4",children:u.jsxs("div",{className:"iw-text-center",children:[u.jsx("div",{className:"iw-mb-1 iw-text-2xl iw-font-bold iw-text-amber-600",children:d}),u.jsx("div",{className:"iw-text-xs iw-font-medium iw-text-amber-700",children:"Warnings Left"})]})}),u.jsx("div",{className:"iw-border-primary-100 iw-bg-primary-50 iw-rounded-xl iw-border iw-p-4",children:u.jsxs("div",{className:"iw-text-center",children:[u.jsxs("div",{className:"iw-mb-1 iw-flex iw-items-center iw-justify-center iw-gap-1.5",children:[u.jsx(Pg,{className:"iw-text-primary-600 iw-h-4 iw-w-4"}),u.jsx("span",{className:"iw-text-primary-600 iw-text-2xl iw-font-bold",children:l})]}),u.jsx("div",{className:"iw-text-primary-700 iw-text-xs iw-font-medium",children:"Auto Close"})]})})]}),d===1&&u.jsx("div",{className:"iw-mb-5 iw-rounded-2xl iw-p-4 iw-text-white",style:{background:"linear-gradient(to right, rgba(220, 38, 38, 0.9), rgba(239, 68, 68, 0.9))"},children:u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[u.jsx("div",{className:"iw-flex iw-h-8 iw-w-8 iw-items-center iw-justify-center iw-rounded-full iw-bg-white/20",children:u.jsx(Xl,{className:"iw-h-4 iw-w-4"})}),u.jsxs("div",{children:[u.jsx("div",{className:"iw-text-sm iw-font-semibold",children:"Final Warning"}),u.jsx("div",{className:"iw-text-xs iw-text-red-100",children:"Next violation will disqualify you from this interview"})]})]})})]}),u.jsxs("div",{className:"iw-p-6 iw-pt-0",children:[u.jsx(us,{onClick:h,className:"iw-h-12 iw-w-full iw-rounded-xl iw-bg-gray-800 iw-text-sm iw-font-medium iw-text-white iw-hover:bg-gray-800",children:"I Understand - Continue Interview"}),u.jsx("p",{className:"iw-text-gray-500 iw-mt-3 iw-text-center iw-text-xs",children:"Please maintain focus and avoid switching tabs, exiting fullscreen, using shortcuts or right-clicking."})]})]})})}const b7=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z"}),u.jsx("circle",{cx:"12",cy:"12",r:"10"})]}),x7=({showHardReloadWarning:e,onContinue:t})=>{const n=()=>{t()};return u.jsxs(Mf,{isOpen:e,onClose:n,closeOnOverlayClick:!1,closeOnEscape:!1,showCloseButton:!1,className:"iw-max-w-lg iw-px-2 iw-rounded-xl",children:[u.jsx("div",{className:"iw-absolute iw-inset-x-0 iw-top-0 iw-h-1 iw-bg-gradient-to-r iw-from-red-500 iw-to-red-600"}),u.jsx("div",{className:"iw-space-y-1 iw-pb-2 iw-pt-3",children:u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[u.jsx(Xl,{className:"iw-w-5 iw-h-5 iw-text-red-500"}),u.jsx("h3",{className:"iw-text-xl iw-font-semibold iw-text-red-500",children:"Full Screen Exit Detected"})]})}),u.jsx("div",{className:"iw-pt-4 iw-pb-6",children:u.jsx("p",{className:"iw-text-center iw-text-sm iw-leading-relaxed iw-text-gray-500/90",children:"Exiting full screen mode or reloading this page during the session is strictly prohibited. Any attempt to do so will be recorded and may lead to penalties."})}),u.jsx("div",{className:"iw-pt-2 iw-pb-4",children:u.jsxs("button",{onClick:n,className:"iw-w-full iw-flex iw-items-center iw-justify-center iw-gap-2 iw-px-4 iw-py-3 iw-bg-gray-100 iw-text-gray-600 iw-rounded-md iw-font-medium iw-transition-colors hover:iw-bg-gray-200 focus:iw-outline-none focus:iw-ring-2 focus:iw-ring-gray-400 focus:iw-ring-offset-2",children:[u.jsx(b7,{className:"iw-size-4"}),"Continue Session"]})})]})},E7=p.forwardRef(({children:e,onDisqualify:t},n)=>{const[i,a]=p.useState(!1),[l,s]=p.useState(!1),[r,o]=p.useState(!1),[c,d]=p.useState("fullscreen_exit"),{logViolation:h,violationCount:f}=g6({maxViolations:5,onViolation:m=>{l||(a(!0),d(m.type))}}),{enterFullScreen:w,isFullScreen:v,exitFullScreen:x}=u6({onFullScreenChange(m){!m&&!l&&!r&&(a(!0),h({type:"fullscreen_exit",severity:"high",details:{action:"fullscreen_exit",reason:"Attempted to exit full screen mode"}})),m&&o(!1)}});p.useEffect(()=>{w()},[]),p.useImperativeHandle(n,()=>({exitFullScreenIntentionally:async()=>{o(!0),a(!1),s(!1);try{document.fullscreenElement&&await document.exitFullscreen()}catch(m){console.error("Failed to exit fullscreen:",m)}}}),[]),d6(h),c6(h),h6(),p6();const _=()=>{s(!0),x(),a(!1),t==null||t()};return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"iw-relative iw-h-full iw-w-full",children:e}),u.jsx(v7,{warningCount:f,isOpen:i,violationType:c,onClose:()=>{a(!1),w()},onDisqualify:_}),!i&&f>0&&!l&&!r&&u.jsx(x7,{showHardReloadWarning:!v,logViolation:h,onContinue:w})]})}),S7=({interviewTitle:e,brandName:t="Novara",brandLogo:n,interviewId:i,onComplete:a,onDisqualify:l,className:s="",videoFeedRef:r})=>{var Lu;const o=b3(),{baseUrl:c,authToken:d}=ih(),{timers:h,stt:f,proctoring:w}=Yu(),v=p.useRef(null),[x,_]=p.useState(null),[m,g]=p.useState(""),[y,b]=p.useState(null),[S,A]=p.useState(gr),[T,N]=p.useState(!0),M=p.useRef(""),D=p.useRef(null);p.useEffect(()=>{(async()=>{try{const Ae=await o.getInterviewConfig(i);Ae!=null&&Ae.data&&(Ae.data.duration_in_minutes&&A(Ae.data.duration_in_minutes),typeof Ae.data.allow_answer_editing=="boolean"&&N(Ae.data.allow_answer_editing))}catch(Ae){console.error("Failed to fetch interview config:",Ae)}})()},[i]);const ge={thinkingTime:(h==null?void 0:h.thinkingDuration)||0,answeringTime:(h==null?void 0:h.answeringDuration)||120,editingTime:T?(h==null?void 0:h.editingDuration)||30:0},{thinkingTime:et,answeringTime:pt,editingTime:yt}=ge;p.useEffect(()=>{M.current=m},[m]);const vt=p.useRef(!1),{speak:j,stop:B,error:R}=w6({onEnd:()=>{vt.current=!1,Ce()},onError:()=>{vt.current||(vt.current=!0,Ce())}}),J=p.useRef(!1),ae=p.useRef(!1),{startRecording:st,stopRecording:gn,transcribe:sn,cancelRecording:Rt,error:rt}=f6({config:{baseUrl:c,provider:f==null?void 0:f.provider,model:f==null?void 0:f.model,language:f==null?void 0:f.language,authToken:d,qnaId:((Lu=D.current)==null?void 0:Lu.qna_id)||"",interviewId:i},onStart:()=>{J.current=!1,ae.current=!1},onStop:()=>{},onTranscriptionComplete:H=>{g(H.transcript),ae.current||(ae.current=!0,Ce())},onError:H=>{console.error("STT Error:",H),J.current||(J.current=!0,Ce())}}),{state:ot,startQuestion:rn,nextPhase:Ce,completeInterview:Xi}=r6({config:{answeringDuration:pt,editingDuration:yt},callbacks:{onPhaseChange:H=>{switch(H){case K.FETCHING_QUESTION:Vl();break;case K.READING_QUESTION:dr();break;case K.ANSWERING:I2();break;case K.TRANSCRIBING:Ou();break;case K.SUBMITTING:fr();break}},onInterviewEnd:()=>{a==null||a()}}});p.useEffect(()=>{rn()},[]);const{execute:Vl}=o6(async()=>{const H=await o.generateQuestion({interviewId:i});return D.current=H.data,H},{onSuccess:async H=>{H&&H.data&&(g(""),_(H.data),Ce())},onError:H=>{console.error("Failed to fetch questions:",H)}}),fr=p.useCallback(async()=>{var H;try{const Ae=M.current,Na=((H=D.current)==null?void 0:H.qna_id)||"";await o.submitAnswer({interviewId:i,qnaId:Na,answer:Ae}),b({qnaId:Na,answer:Ae})}catch(Ae){console.error("Failed to submit answer:",Ae)}rn()},[o,i,rn]),dr=p.useCallback(async()=>{var H;if((H=D.current)!=null&&H.question)if(D.current.question_audio_data_base64)try{vt.current=!1,await j(D.current.question_audio_data_base64),D.current.is_interview_done&&Xi()}catch(Ae){console.error("Failed to speak question:",Ae),Ce()}else console.warn("No audio data available for question"),await Qg(2e3),Ce();else Ce()},[j,Ce,Xi]),I2=p.useCallback(async()=>{try{await st(pt)}catch(H){console.error("Failed to start recording:",H),Ce()}},[st,Ce]),Ou=p.useCallback(async()=>{try{const H=await gn();await sn(H)}catch(H){console.error("STT processing failed:",H),!J.current&&!ae.current&&(J.current=!0,Ce())}},[gn,sn,Ce]),Aa=p.useCallback(async H=>{var Ae,Na;B(),Rt(),r&&"current"in r&&((Ae=r.current)==null||Ae.stopCamera()),await((Na=v.current)==null?void 0:Na.exitFullScreenIntentionally());try{await o.exitInterview(i)}catch(Uu){console.error("API call failed:",Uu)}finally{H==null||H(),Xi(),sessionStorage.removeItem(Hu)}},[i,B,o]),hr=()=>{const{phase:H}=ot;switch(H){case K.IDLE:return u.jsxs("div",{className:"iw-text-center iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-2 iw-h-full",children:[u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"Ready to start the Interview?"}),u.jsx("p",{className:"iw-max-w-xl iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:`You will be asked a series of behavioral and technical questions. For each one you'll get a short thinking period, then a timed recording window. We'll transcribe your response so you can review and edit it before submitting. Click "Start Interview" when you're ready.`}),u.jsx(us,{onClick:rn,className:"iw-mt-2 iw-w-40",children:"Start Interview"})]});case K.FETCHING_QUESTION:return u.jsx(m7,{});case K.READING_QUESTION:return u.jsx(g7,{ttsError:R});case K.THINKING:return u.jsx(p7,{state:ot,thinkingTime:et,nextPhase:Ce});case K.ANSWERING:return u.jsx(h7,{state:ot,answeringTime:pt,nextPhase:Ce,sttError:rt});case K.TRANSCRIBING:return u.jsx(y7,{sttError:rt,editingDuration:yt});case K.EDITING:case K.SUBMITTING:return null;case K.COMPLETED:return null;default:return null}};return u.jsx(u.Fragment,{children:w!=null&&w.enabled?u.jsxs(E7,{ref:v,onDisqualify:()=>Aa(l),children:[u.jsx(_g,{title:e,brandName:t,brandLogo:n,totalDuration:S,elapsedTime:ot.totalTimeElapsed,onExit:()=>Aa()}),u.jsx(Sg,{brandName:t,currentQuestion:x,state:ot,phase:ot.phase,className:s,interviewId:i,interview_duration:S,videoFeedRef:r,lastSubmittedAnswer:y,onNextPhase:Ce,answerText:m,onAnswerChange:H=>g(H.target.value),editingTime:yt,answeringTime:pt,children:hr()})]}):u.jsxs(u.Fragment,{children:[u.jsx(_g,{title:e,brandName:t,brandLogo:n,totalDuration:S,elapsedTime:ot.totalTimeElapsed,onExit:()=>Aa()}),u.jsx(Sg,{brandName:t,currentQuestion:x,state:ot,phase:ot.phase,className:s,interviewId:i,interview_duration:S,videoFeedRef:r,lastSubmittedAnswer:y,onNextPhase:Ce,answerText:m,onAnswerChange:H=>g(H.target.value),editingTime:yt,answeringTime:pt,children:hr()})]})})},ku=({title:e,brandName:t,brandLogo:n,interviewId:i,onInterviewEnd:a,onInterviewDisqualify:l,className:s=""})=>{const[r,o]=p.useState(!1),[c,d]=p.useState(!0),[h,f]=p.useState(!1),{proctoring:w}=Yu(),v=p.useRef(null),x=p.useRef(null),_=(w==null?void 0:w.gazeAnalysisEnabled)===!0,m=()=>{o(!0),d(!1)};return p.useEffect(()=>{if(r&&h&&x.current&&_)try{x.current.setReference()}finally{f(!1)}},[r,h,_]),r?u.jsx("div",{className:"interview-widget-container",children:u.jsx("div",{ref:v,className:`iw-flex iw-flex-col iw-rounded-xl iw-shadow-lg iw-overflow-hidden iw-h-[calc(100vh-1rem)] ${s}`,children:u.jsx("div",{className:"iw-h-[calc(100vh-1rem)] iw-flex iw-flex-col iw-justify-between gap-1",children:u.jsx(S7,{interviewTitle:e??"Interview",brandName:t??"Novara",brandLogo:n,interviewId:i,className:s,onComplete:a??(()=>{}),onDisqualify:l,videoFeedRef:x})})})}):u.jsxs("div",{className:"interview-widget-container",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-space-x-2 iw-mx-auto iw-p-2 iw-max-w-[1800px]",children:[n||u.jsx("div",{className:"iw-h-7 iw-w-7 iw-rounded-md iw-flex iw-items-center iw-justify-center iw-text-white iw-font-semibold",children:ah(t)}),u.jsx("p",{className:"iw-text-xl iw-font-semibold",children:t})]}),u.jsx(l6,{isOpen:c,gazeEnabled:_,onStart:m,onRequestCalibration:()=>f(!0),videoFeedRef:x,interviewId:i})]})};typeof window<"u"&&(window.InterviewWidget={InterviewWidget:ku,InterviewWidgetProvider:qu}),We.InterviewWidget=ku,We.InterviewWidgetProvider=qu,We.default=ku,Object.defineProperties(We,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
211
+ `})})};function Q8({ttsError:e}){return u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-w-full iw-h-full",children:[u.jsx(X8,{size:"80px"}),e&&u.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Audio playback failed: ",e.message]}),u.jsx("p",{className:"iw-text- iw-text-gray-700",children:"Your AI interviewer is speaking..."})]})}const Z8=({state:e,thinkingTime:t,nextPhase:n})=>u.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-6 iw-items-center iw-justify-center iw-text-center iw-h-full ",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"Get Ready to Answer"}),u.jsx("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:"After 30-seconds thinking time, recording will start automatically, or you can begin recording early by clicking the button below."})]}),u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-2",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-1",children:[u.jsx(s1,{className:"iw-size-4 iw-text-orange-600"}),u.jsx("p",{className:"iw-text-gray-700 iw-text-sm",children:"Time to think: "})]}),u.jsx(ko,{total:t,remaining:e.currentPhaseTimeRemaining,size:50,strokeWidth:4})]}),u.jsx("div",{className:"iw-w-full iw-grid iw-grid-cols-1",children:u.jsx(Ss,{onClick:()=>{n()},children:"Start Answering"})})]}),K8=({sttError:e,editingDuration:t})=>u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full",children:[u.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 60 60",fill:"none",children:[u.jsx("rect",{width:60,height:60,rx:30,fill:"url(#prefix__paint0_linear_1460_12482)"}),u.jsx("path",{d:"M28.127 14c.276 7.685 6.442 13.851 14.127 14.127-7.684.276-13.85 6.442-14.127 14.127-.275-7.685-6.442-13.851-14.126-14.127 7.684-.276 13.85-6.442 14.126-14.127zM38.937 31.873A7.331 7.331 0 0046 38.937 7.331 7.331 0 0038.937 46a7.331 7.331 0 00-7.064-7.063 7.331 7.331 0 007.064-7.064z",fill:"#fff"}),u.jsx("defs",{children:u.jsxs("linearGradient",{id:"prefix__paint0_linear_1460_12482",x1:30,y1:-6.563,x2:77.813,y2:54.375,gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{offset:.211,stopColor:"#5C92FA"}),u.jsx("stop",{offset:1,stopColor:"#A75FFD"})]})})]}),u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1 iw-mt-3",children:"Just a moment... We're analyzing your response"}),u.jsxs("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:["After transcription, you'll have ",t||30," sec to review your answer."]}),e&&u.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Transcription error: ",e.message,e.recoverable&&" (attempting to continue)"]})]}),Lo=5;function I8({isOpen:e,onClose:t,warningCount:n,violationType:i,onDisqualify:a}){const[l,s]=y.useState(10),r=y.useRef(t);if(y.useEffect(()=>{r.current=t},[t]),y.useEffect(()=>{if(!e)return;const d=setInterval(()=>{s(m=>m<=1?(r.current(),10):m-1)},1e3);return()=>clearInterval(d)},[e]),y.useEffect(()=>{e&&s(10)},[e]),y.useEffect(()=>(e?(document.body.style.overflow="hidden",document.body.classList.add("interview-widget-container")):(document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")),()=>{document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")}),[e]),!e)return null;const c=(()=>{switch(i){case"tab_switch":return{title:"Tab Switch Detected",description:"You attempted to switch to another tab or reload application.",icon:u.jsx(u1,{className:"iw-h-5 iw-w-5"})};case"fullscreen_exit":return{title:"Full Screen Exit Detected",description:"You attempted to exit full screen mode.",icon:u.jsx(v6,{className:"iw-h-5 iw-w-5"})};case"focus_loss":return{title:"Focus Loss Detected",description:"You lost focus from the interview window.",icon:u.jsx(g6,{className:"iw-h-5 iw-w-5"})};case"blocked_shortcut":return{title:"Keyboard Shortcut Blocked",description:"You attempted to use a blocked keyboard shortcut.",icon:u.jsx(Jo,{className:"iw-h-5 iw-w-5"})};case"right_click_attempt":return{title:"Right Click Attempted",description:"You attempted to use the right click.",icon:u.jsx(b6,{className:"iw-h-5 iw-w-5"})};case"alt_tab_attempt":return{title:"Alt + Tab Attempted",description:"You attempted to use the Alt + Tab shortcut.",icon:u.jsx(Jo,{className:"iw-h-5 iw-w-5"})};case"blocked_function_key":return{title:"Function Key Blocked",description:"You attempted to use a blocked function key.",icon:u.jsx(Jo,{className:"iw-h-5 iw-w-5"})};default:return{title:"Violation Detected",description:"You attempted to perform an action that is not allowed.",icon:u.jsx(es,{className:"iw-h-5 iw-w-5"})}}})(),f=Lo-n,h=()=>{n+1>Lo?a():t()};return u.jsx("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-black/60 iw-p-4 iw-backdrop-blur-sm",children:u.jsxs("div",{className:"iw-w-full iw-max-w-md iw-rounded-2xl iw-border iw-border-gray-100 iw-bg-white iw-shadow-xl",children:[u.jsxs("div",{className:"iw-p-6 iw-pb-0",children:[u.jsxs("div",{className:"iw-mb-6 iw-flex iw-items-start iw-gap-4",children:[u.jsx("div",{className:"iw-flex iw-h-12 iw-w-12 iw-flex-shrink-0 iw-items-center iw-justify-center iw-rounded-2xl iw-bg-red-50",children:u.jsx(es,{className:"iw-h-6 iw-w-6 iw-text-red-500"})}),u.jsxs("div",{className:"iw-flex-1",children:[u.jsx("h2",{className:"iw-mb-1 iw-text-xl iw-font-semibold iw-text-gray-900",children:"Security Violation"}),u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[u.jsx("span",{className:"iw-text-sm iw-text-gray-500",children:"Warning"}),u.jsx("div",{className:"iw-flex iw-gap-1",children:Array.from({length:Lo}).map((d,m)=>u.jsx("div",{className:`iw-h-2 iw-w-2 iw-rounded-full ${m<=n-1?"iw-bg-red-500":"iw-bg-gray-200"}`},m))}),u.jsxs("span",{className:"iw-text-sm iw-text-gray-500",children:["(",n,"/",Lo,")"]})]})]})]}),u.jsx("div",{className:"iw-mb-5 iw-rounded-2xl iw-border iw-border-red-100 iw-p-5",style:{background:"linear-gradient(to right, rgb(254, 242, 242), rgb(254, 245, 235))",borderColor:"rgb(254, 226, 226)"},children:u.jsxs("div",{className:"iw-flex iw-items-start iw-gap-4",children:[u.jsx("div",{className:"iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-xl iw-bg-white iw-shadow-sm",children:c.icon}),u.jsxs("div",{className:"iw-flex-1",children:[u.jsx("h3",{className:"iw-mb-2 iw-font-semibold iw-text-gray-900",children:c.title}),u.jsx("p",{className:"iw-text-sm iw-leading-relaxed iw-text-gray-700",children:c.description}),u.jsxs("div",{className:"iw-mt-3 iw-flex iw-items-center iw-gap-2 iw-text-xs iw-text-red-600",children:[u.jsx(x6,{className:"iw-h-3 iw-w-3"}),u.jsx("span",{children:"This action is monitored for interview integrity"})]})]})]})}),u.jsxs("div",{className:"iw-mb-5 iw-grid iw-grid-cols-2 iw-gap-3",children:[u.jsx("div",{className:"iw-rounded-xl iw-border iw-border-amber-200 iw-bg-amber-50 iw-p-4",children:u.jsxs("div",{className:"iw-text-center",children:[u.jsx("div",{className:"iw-mb-1 iw-text-2xl iw-font-bold iw-text-amber-600",children:f}),u.jsx("div",{className:"iw-text-xs iw-font-medium iw-text-amber-700",children:"Warnings Left"})]})}),u.jsx("div",{className:"iw-border-primary-100 iw-bg-primary-50 iw-rounded-xl iw-border iw-p-4",children:u.jsxs("div",{className:"iw-text-center",children:[u.jsxs("div",{className:"iw-mb-1 iw-flex iw-items-center iw-justify-center iw-gap-1.5",children:[u.jsx(m6,{className:"iw-text-primary-600 iw-h-4 iw-w-4"}),u.jsx("span",{className:"iw-text-primary-600 iw-text-2xl iw-font-bold",children:l})]}),u.jsx("div",{className:"iw-text-primary-700 iw-text-xs iw-font-medium",children:"Auto Close"})]})})]}),f===1&&u.jsx("div",{className:"iw-mb-5 iw-rounded-2xl iw-p-4 iw-text-white",style:{background:"linear-gradient(to right, rgba(220, 38, 38, 0.9), rgba(239, 68, 68, 0.9))"},children:u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[u.jsx("div",{className:"iw-flex iw-h-8 iw-w-8 iw-items-center iw-justify-center iw-rounded-full iw-bg-white/20",children:u.jsx(es,{className:"iw-h-4 iw-w-4"})}),u.jsxs("div",{children:[u.jsx("div",{className:"iw-text-sm iw-font-semibold",children:"Final Warning"}),u.jsx("div",{className:"iw-text-xs iw-text-red-100",children:"Next violation will disqualify you from this interview"})]})]})})]}),u.jsxs("div",{className:"iw-p-6 iw-pt-0",children:[u.jsx(Ss,{onClick:h,className:"iw-h-12 iw-w-full iw-rounded-xl iw-bg-gray-800 iw-text-sm iw-font-medium iw-text-white iw-hover:bg-gray-800",children:"I Understand - Continue Interview"}),u.jsx("p",{className:"iw-text-gray-500 iw-mt-3 iw-text-center iw-text-xs",children:"Please maintain focus and avoid switching tabs, exiting fullscreen, using shortcuts or right-clicking."})]})]})})}const J8=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z"}),u.jsx("circle",{cx:"12",cy:"12",r:"10"})]}),W8=({showHardReloadWarning:e,onContinue:t})=>{const n=()=>{t()};return u.jsxs(Sf,{isOpen:e,onClose:n,closeOnOverlayClick:!1,closeOnEscape:!1,showCloseButton:!1,className:"iw-max-w-lg iw-px-2 iw-rounded-xl",children:[u.jsx("div",{className:"iw-absolute iw-inset-x-0 iw-top-0 iw-h-1 iw-bg-gradient-to-r iw-from-red-500 iw-to-red-600"}),u.jsx("div",{className:"iw-space-y-1 iw-pb-2 iw-pt-3",children:u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[u.jsx(es,{className:"iw-w-5 iw-h-5 iw-text-red-500"}),u.jsx("h3",{className:"iw-text-xl iw-font-semibold iw-text-red-500",children:"Full Screen Exit Detected"})]})}),u.jsx("div",{className:"iw-pt-4 iw-pb-6",children:u.jsx("p",{className:"iw-text-center iw-text-sm iw-leading-relaxed iw-text-gray-500/90",children:"Exiting full screen mode or reloading this page during the session is strictly prohibited. Any attempt to do so will be recorded and may lead to penalties."})}),u.jsx("div",{className:"iw-pt-2 iw-pb-4",children:u.jsxs("button",{onClick:n,className:"iw-w-full iw-flex iw-items-center iw-justify-center iw-gap-2 iw-px-4 iw-py-3 iw-bg-gray-100 iw-text-gray-600 iw-rounded-md iw-font-medium iw-transition-colors hover:iw-bg-gray-200 focus:iw-outline-none focus:iw-ring-2 focus:iw-ring-gray-400 focus:iw-ring-offset-2",children:[u.jsx(J8,{className:"iw-size-4"}),"Continue Session"]})})]})},P8=y.forwardRef(({children:e,onDisqualify:t},n)=>{const[i,a]=y.useState(!1),[l,s]=y.useState(!1),[r,o]=y.useState(!1),[c,f]=y.useState("fullscreen_exit"),{logViolation:h,violationCount:d}=Qy({maxViolations:5,onViolation:g=>{l||(a(!0),f(g.type))}}),{enterFullScreen:m,isFullScreen:v,exitFullScreen:x}=Gy({onFullScreenChange(g){!g&&!l&&!r&&(a(!0),h({type:"fullscreen_exit",severity:"high",details:{action:"fullscreen_exit",reason:"Attempted to exit full screen mode"}})),g&&o(!1)}});y.useEffect(()=>{m()},[]),y.useImperativeHandle(n,()=>({exitFullScreenIntentionally:async()=>{o(!0),a(!1),s(!1);try{document.fullscreenElement&&await document.exitFullscreen()}catch(g){console.error("Failed to exit fullscreen:",g)}}}),[]),qy(h),Hy(h),Fy(),Zy();const E=()=>{s(!0),x(),a(!1),t==null||t()};return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"iw-relative iw-h-full iw-w-full",children:e}),u.jsx(I8,{warningCount:d,isOpen:i,violationType:c,onClose:()=>{a(!1),m()},onDisqualify:E}),!i&&d>0&&!l&&!r&&u.jsx(W8,{showHardReloadWarning:!v,logViolation:h,onContinue:m})]})}),$8=({interviewTitle:e,brandName:t="Novara",brandLogo:n,interviewId:i,onComplete:a,onDisqualify:l,className:s="",videoFeedRef:r})=>{var Ro;const o=b3(),{baseUrl:c,authToken:f}=a1(),{timers:h,stt:d,proctoring:m}=Ko(),v=y.useRef(null),[x,E]=y.useState(null),[g,w]=y.useState(""),[p,b]=y.useState(null),[A,N]=y.useState(Tr),[_,M]=y.useState(!0),T=y.useRef(""),D=y.useRef(null);y.useEffect(()=>{(async()=>{try{const _e=await o.getInterviewConfig(i);_e!=null&&_e.data&&(_e.data.duration_in_minutes&&N(_e.data.duration_in_minutes),typeof _e.data.allow_answer_editing=="boolean"&&M(_e.data.allow_answer_editing))}catch(_e){console.error("Failed to fetch interview config:",_e)}})()},[i]);const Ee={thinkingTime:(h==null?void 0:h.thinkingDuration)||0,answeringTime:(h==null?void 0:h.answeringDuration)||120,editingTime:_?(h==null?void 0:h.editingDuration)||30:0},{thinkingTime:Re,answeringTime:rt,editingTime:cn}=Ee;y.useEffect(()=>{T.current=g},[g]);const xt=y.useRef(!1),{speak:j,stop:G,error:R}=Xy({onEnd:()=>{xt.current=!1,Ce()},onError:()=>{xt.current||(xt.current=!0,Ce())}}),$=y.useRef(!1),se=y.useRef(!1),{startRecording:ut,stopRecording:bn,transcribe:fn,cancelRecording:Xt,error:ot}=Vy({config:{baseUrl:c,provider:d==null?void 0:d.provider,model:d==null?void 0:d.model,language:d==null?void 0:d.language,authToken:f,qnaId:((Ro=D.current)==null?void 0:Ro.qna_id)||"",interviewId:i},onStart:()=>{$.current=!1,se.current=!1},onStop:()=>{},onTranscriptionComplete:V=>{w(V.transcript),se.current||(se.current=!0,Ce())},onError:V=>{console.error("STT Error:",V),$.current||($.current=!0,Ce())}}),{state:ct,startQuestion:dn,nextPhase:Ce,completeInterview:Xi}=By({config:{answeringDuration:rt,editingDuration:cn},callbacks:{onPhaseChange:V=>{switch(V){case K.FETCHING_QUESTION:Il();break;case K.READING_QUESTION:xr();break;case K.ANSWERING:J2();break;case K.TRANSCRIBING:Bo();break;case K.SUBMITTING:br();break}},onInterviewEnd:()=>{a==null||a()}}});y.useEffect(()=>{dn()},[]);const{execute:Il}=Ry(async()=>{const V=await o.generateQuestion({interviewId:i});return D.current=V.data,V},{onSuccess:async V=>{V&&V.data&&(w(""),E(V.data),Ce())},onError:V=>{console.error("Failed to fetch questions:",V)}}),br=y.useCallback(async()=>{var V;try{const _e=T.current,Ca=((V=D.current)==null?void 0:V.qna_id)||"";await o.submitAnswer({interviewId:i,qnaId:Ca,answer:_e}),b({qnaId:Ca,answer:_e})}catch(_e){console.error("Failed to submit answer:",_e)}dn()},[o,i,dn]),xr=y.useCallback(async()=>{var V;if((V=D.current)!=null&&V.question)if(D.current.question_audio_data_base64)try{xt.current=!1,await j(D.current.question_audio_data_base64),D.current.is_interview_done&&Xi()}catch(_e){console.error("Failed to speak question:",_e),Ce()}else console.warn("No audio data available for question"),await u6(2e3),Ce();else Ce()},[j,Ce,Xi]),J2=y.useCallback(async()=>{try{await ut(rt)}catch(V){console.error("Failed to start recording:",V),Ce()}},[ut,Ce]),Bo=y.useCallback(async()=>{try{const V=await bn();await fn(V)}catch(V){console.error("STT processing failed:",V),!$.current&&!se.current&&($.current=!0,Ce())}},[bn,fn,Ce]),Ma=y.useCallback(async V=>{var _e,Ca;G(),Xt(),r&&"current"in r&&((_e=r.current)==null||_e.stopCamera()),await((Ca=v.current)==null?void 0:Ca.exitFullScreenIntentionally());try{await o.exitInterview(i)}catch(Go){console.error("API call failed:",Go)}finally{V==null||V(),Xi(),sessionStorage.removeItem(Yo)}},[i,G,o]),Sr=()=>{const{phase:V}=ct;switch(V){case K.IDLE:return u.jsxs("div",{className:"iw-text-center iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-2 iw-h-full",children:[u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"Ready to start the Interview?"}),u.jsx("p",{className:"iw-max-w-xl iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:`You will be asked a series of behavioral and technical questions. For each one you'll get a short thinking period, then a timed recording window. We'll transcribe your response so you can review and edit it before submitting. Click "Start Interview" when you're ready.`}),u.jsx(Ss,{onClick:dn,className:"iw-mt-2 iw-w-40",children:"Start Interview"})]});case K.FETCHING_QUESTION:return u.jsx(Y8,{});case K.READING_QUESTION:return u.jsx(Q8,{ttsError:R});case K.THINKING:return u.jsx(Z8,{state:ct,thinkingTime:Re,nextPhase:Ce});case K.ANSWERING:return u.jsx(F8,{state:ct,answeringTime:rt,nextPhase:Ce,sttError:ot});case K.TRANSCRIBING:return u.jsx(K8,{sttError:ot,editingDuration:cn});case K.EDITING:case K.SUBMITTING:return null;case K.COMPLETED:return null;default:return null}};return u.jsx(u.Fragment,{children:m!=null&&m.enabled?u.jsxs(P8,{ref:v,onDisqualify:()=>Ma(l),children:[u.jsx(Hw,{title:e,brandName:t,brandLogo:n,totalDuration:A,elapsedTime:ct.totalTimeElapsed,onExit:()=>Ma()}),u.jsx(Gw,{brandName:t,currentQuestion:x,state:ct,phase:ct.phase,className:s,interviewId:i,interview_duration:A,videoFeedRef:r,lastSubmittedAnswer:p,onNextPhase:Ce,answerText:g,onAnswerChange:V=>w(V.target.value),editingTime:cn,answeringTime:rt,children:Sr()})]}):u.jsxs(u.Fragment,{children:[u.jsx(Hw,{title:e,brandName:t,brandLogo:n,totalDuration:A,elapsedTime:ct.totalTimeElapsed,onExit:()=>Ma()}),u.jsx(Gw,{brandName:t,currentQuestion:x,state:ct,phase:ct.phase,className:s,interviewId:i,interview_duration:A,videoFeedRef:r,lastSubmittedAnswer:p,onNextPhase:Ce,answerText:g,onAnswerChange:V=>w(V.target.value),editingTime:cn,answeringTime:rt,children:Sr()})]})})},Uo=({title:e,brandName:t,brandLogo:n,interviewId:i,onInterviewEnd:a,onInterviewDisqualify:l,className:s=""})=>{const{baseColor:r}=$l(),[o,c]=y.useState(!1),[f,h]=y.useState(!0),[d,m]=y.useState(!1),{proctoring:v}=Ko(),x=y.useRef(null),E=y.useRef(null),g=(v==null?void 0:v.gazeAnalysisEnabled)===!0,w=()=>{c(!0),h(!1)};return y.useEffect(()=>{if(o&&d&&E.current&&g)try{E.current.setReference()}finally{m(!1)}},[o,d,g]),o?u.jsx("div",{className:"interview-widget-container",children:u.jsx("div",{ref:x,className:`iw-flex iw-flex-col iw-rounded-xl iw-shadow-lg iw-overflow-hidden iw-h-[calc(100vh-1rem)] ${s}`,children:u.jsx("div",{className:"iw-h-[calc(100vh-1rem)] iw-flex iw-flex-col iw-justify-between gap-1",children:u.jsx($8,{interviewTitle:e??"Interview",brandName:t??"Novara",brandLogo:n,interviewId:i,className:s,onComplete:a??(()=>{}),onDisqualify:l,videoFeedRef:E})})})}):u.jsxs("div",{className:"interview-widget-container",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-space-x-2 iw-mx-auto iw-p-2 iw-max-w-[1800px]",children:[n||u.jsx("div",{className:"iw-h-7 iw-w-7 iw-rounded-md iw-flex iw-items-center iw-justify-center iw-text-white iw-font-semibold",style:{backgroundColor:r},children:l1(t)}),u.jsx("p",{className:"iw-text-xl iw-font-semibold",children:t})]}),u.jsx(Ly,{isOpen:f,gazeEnabled:g,onStart:w,onRequestCalibration:()=>m(!0),videoFeedRef:E,interviewId:i})]})};typeof window<"u"&&(window.InterviewWidget={InterviewWidget:Uo,InterviewWidgetProvider:Zo}),it.InterviewWidget=Uo,it.InterviewWidgetProvider=Zo,it.default=Uo,Object.defineProperties(it,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});