@glydeunity/voice-sdk 1.4.1 → 1.4.3

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(c,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react"),require("react/jsx-runtime"),require("react-dom/client")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom/client"],l):(c=typeof globalThis<"u"?globalThis:c||self,l(c.GlydeChat={},c.React,c.jsxRuntime,c.ReactDOM))})(this,(function(c,l,t,V){"use strict";const oe=`
1
+ (function(ut,Da){typeof exports=="object"&&typeof module<"u"?Da(exports):typeof define=="function"&&define.amd?define(["exports"],Da):(ut=typeof globalThis<"u"?globalThis:ut||self,Da(ut.GlydeChat={}))})(this,(function(ut){"use strict";const Da=`
2
2
  class AudioCaptureProcessor extends AudioWorkletProcessor {
3
3
  constructor() {
4
4
  super();
@@ -33,7 +33,7 @@ class AudioCaptureProcessor extends AudioWorkletProcessor {
33
33
  }
34
34
 
35
35
  registerProcessor('audio-capture-processor', AudioCaptureProcessor);
36
- `,ie=`
36
+ `,ey=`
37
37
  class AudioPlaybackProcessor extends AudioWorkletProcessor {
38
38
  constructor() {
39
39
  super();
@@ -130,43 +130,43 @@ class AudioPlaybackProcessor extends AudioWorkletProcessor {
130
130
  }
131
131
 
132
132
  registerProcessor('audio-playback-processor', AudioPlaybackProcessor);
133
- `;class D{config;unityUrl;active=!1;serverConfig=null;ws=null;audioContext=null;mediaStream=null;captureWorkletNode=null;playbackWorkletNode=null;isMuted=!1;outputSampleRate=24e3;inputSampleRate=48e3;isAgentSpeaking=!1;agentAudioDoneReceived=!1;conversationHistory=[];sessionContext={};constructor(e){this.config=e,this.unityUrl=e.unityBaseUrl||"https://api.glydeunity.com",e.conversationHistory&&(this.conversationHistory=e.conversationHistory),!e.publishableKey&&!e.apiKey&&!e.authToken&&console.warn("[GlydeVoice] No authentication method provided. One of publishableKey, apiKey, or authToken is required.")}getAuthHeaders(){const e={"Content-Type":"application/json"};return this.config.publishableKey&&(e["x-publishable-key"]=this.config.publishableKey),this.config.apiKey&&(e["x-api-key"]=this.config.apiKey),this.config.authToken&&(e.Authorization=`Bearer ${this.config.authToken}`),e}async fetchConfig(){const e=`${this.unityUrl}/api/unity/voice/config/${this.config.contextType}`,r=this.config.contextId?`${e}/${this.config.contextId}`:e,i=await fetch(r,{method:"GET",headers:this.getAuthHeaders()});if(!i.ok){const n=await i.json();throw new Error(n.error?.message||n.message||"Failed to fetch voice config")}const{data:s}=await i.json();return s}async start(){if(!this.active){this.active=!0;try{this.config.systemPrompt||(this.serverConfig=await this.fetchConfig(),console.log("[GlydeVoice] Fetched config:",this.serverConfig));const e={context_id:this.config.contextId,domain:typeof window<"u"?window.location.hostname:"localhost"};this.config.systemPrompt&&(e.system_prompt=this.config.systemPrompt),this.config.deepgramConfig&&(e.deepgram_config=this.config.deepgramConfig);const r=await fetch(`${this.unityUrl}/api/unity/voice/auth`,{method:"POST",headers:this.getAuthHeaders(),body:JSON.stringify(e)});if(!r.ok){const a=await r.json();throw new Error(a.error?.message||a.message||"Failed to authenticate voice session")}const{data:i}=await r.json(),{token:s,agent_config:n,deepgram_config:h}=i;this.setSessionContext({clientUuid:n?.client_uuid,contextId:this.config.contextId,contextType:this.config.contextType,currentJobUuid:n?.job_uuid});let f=this.config.systemPrompt||n.instructions||this.serverConfig?.system_prompt||"You are a helpful AI assistant.";this.conversationHistory&&this.conversationHistory.length>0&&(f=`Previous conversation context:
134
- ${this.conversationHistory.map(g=>`${g.role==="agent"?"Assistant":"User"}: ${g.content}`).join(`
133
+ `;class _f{config;unityUrl;active=!1;serverConfig=null;ws=null;audioContext=null;mediaStream=null;captureWorkletNode=null;playbackWorkletNode=null;isMuted=!1;outputSampleRate=24e3;inputSampleRate=48e3;isAgentSpeaking=!1;agentAudioDoneReceived=!1;conversationHistory=[];sessionContext={};constructor(f){this.config=f,this.unityUrl=f.unityBaseUrl||"https://api.glydeunity.com",f.conversationHistory&&(this.conversationHistory=f.conversationHistory),!f.publishableKey&&!f.apiKey&&!f.authToken&&console.warn("[GlydeVoice] No authentication method provided. One of publishableKey, apiKey, or authToken is required.")}getAuthHeaders(){const f={"Content-Type":"application/json"};return this.config.publishableKey&&(f["x-publishable-key"]=this.config.publishableKey),this.config.apiKey&&(f["x-api-key"]=this.config.apiKey),this.config.authToken&&(f.Authorization=`Bearer ${this.config.authToken}`),f}async fetchConfig(){const f=`${this.unityUrl}/api/unity/voice/config/${this.config.contextType}`,g=this.config.contextId?`${f}/${this.config.contextId}`:f,o=await fetch(g,{method:"GET",headers:this.getAuthHeaders()});if(!o.ok){const D=await o.json();throw new Error(D.error?.message||D.message||"Failed to fetch voice config")}const{data:C}=await o.json();return C}async start(){if(!this.active){this.active=!0;try{this.config.systemPrompt||(this.serverConfig=await this.fetchConfig(),console.log("[GlydeVoice] Fetched config:",this.serverConfig));const f={context_id:this.config.contextId,domain:typeof window<"u"?window.location.hostname:"localhost"};this.config.systemPrompt&&(f.system_prompt=this.config.systemPrompt),this.config.deepgramConfig&&(f.deepgram_config=this.config.deepgramConfig);const g=await fetch(`${this.unityUrl}/api/unity/voice/auth`,{method:"POST",headers:this.getAuthHeaders(),body:JSON.stringify(f)});if(!g.ok){const _=await g.json();throw new Error(_.error?.message||_.message||"Failed to authenticate voice session")}const{data:o}=await g.json(),{token:C,agent_config:D,deepgram_config:Y}=o;this.setSessionContext({clientUuid:D?.client_uuid,contextId:this.config.contextId,contextType:this.config.contextType,currentJobUuid:D?.job_uuid});let w=this.config.systemPrompt||D.instructions||this.serverConfig?.system_prompt||"You are a helpful AI assistant.";this.conversationHistory&&this.conversationHistory.length>0&&(w=`Previous conversation context:
134
+ ${this.conversationHistory.map(B=>`${B.role==="agent"?"Assistant":"User"}: ${B.content}`).join(`
135
135
  `)}
136
136
 
137
137
  IMPORTANT: This is a continuation of a previous conversation. When the user starts speaking, you must first greet them warmly and acknowledge that you're continuing the conversation. Say something like "Welcome back! I'm glad you're continuing our conversation. How can I help you today?" or similar, then continue naturally based on the previous context.
138
138
 
139
- ${f}`),await this.initializeAudio();let p="wss://agent.deepgram.com/v1/agent/converse";const u=this.config.deepgramConfig||h||this.serverConfig?.deepgram_config;if(u?.tags&&u.tags.length>0){const a=new URLSearchParams;u.tags.forEach(g=>a.append("tag",g)),p+=`?${a.toString()}`}this.ws=new WebSocket(p,["bearer",s]),this.ws.onopen=()=>{const a=u||{think:{provider:{type:"open_ai",model:"gpt-4.1-nano"}},speak:{provider:{type:"deepgram",model:"aura-2-thalia-en"}},listen:{provider:{type:"deepgram",version:"v2",model:"flux-general-en"}}},g={type:"Settings",audio:{input:{encoding:"linear16",sample_rate:this.inputSampleRate},output:{encoding:"linear16",sample_rate:this.outputSampleRate,container:"none"}},agent:{language:"en",speak:a.speak||{provider:{type:"deepgram",model:"aura-2-thalia-en"}},listen:a.listen||{provider:{type:"deepgram",version:"v2",model:"flux-general-en"}},think:{provider:a.think?.provider||{type:"open_ai",model:"gpt-4.1-nano"},...a.think?.functions&&{functions:a.think.functions}},...!this.conversationHistory||this.conversationHistory.length===0?{greeting:"Hi! I'm excited you chose to speak with me. Are you ready to start?"}:{}}};a.tags&&a.tags.length>0&&(g.tags=a.tags),this.ws.send(JSON.stringify(g)),this.emit({type:"open",payload:{config:n,serverConfig:this.serverConfig}})};const m=f;this.ws.onmessage=a=>{if(typeof a.data=="string"){try{const g=JSON.parse(a.data);if(g.type==="SettingsApplied"){const b={type:"UpdatePrompt",prompt:m};this.ws.send(JSON.stringify(b)),setTimeout(()=>{this.mediaStream||this.startMicrophone().catch(k=>{console.error("[GlydeVoice] Failed to start microphone:",k)})},500)}g.type==="PromptUpdated"&&(this.mediaStream||this.startMicrophone().catch(b=>{console.error("[GlydeVoice] Failed to start microphone:",b)}))}catch{}this.handleTextMessage(a.data)}else a.data instanceof Blob?this.handleAudioData(a.data):a.data instanceof ArrayBuffer&&this.handleAudioBuffer(a.data)},this.ws.onerror=a=>{console.error("[GlydeVoice] WebSocket error:",a),this.emit({type:"error",payload:a})},this.ws.onclose=()=>{this.cleanup(),this.emit({type:"close"})},this.renderUI()}catch(e){throw console.error("[GlydeVoice] Error starting session:",e),this.active=!1,this.emit({type:"error",payload:e}),e}}}createWorkletBlobUrl(e){const r=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(r)}async initializeAudio(){this.audioContext=new AudioContext({sampleRate:this.inputSampleRate});const e=this.createWorkletBlobUrl(oe),r=this.createWorkletBlobUrl(ie);try{await Promise.all([this.audioContext.audioWorklet.addModule(e),this.audioContext.audioWorklet.addModule(r)])}finally{URL.revokeObjectURL(e),URL.revokeObjectURL(r)}this.playbackWorkletNode=new AudioWorkletNode(this.audioContext,"audio-playback-processor"),this.playbackWorkletNode.connect(this.audioContext.destination),this.playbackWorkletNode.port.onmessage=i=>{const{type:s}=i.data;(s==="cleared"||s==="bufferEmpty")&&(this.isAgentSpeaking=!1,this.agentAudioDoneReceived=!1,this.emit({type:"agent_speaking",payload:!1}))}}handleTextMessage(e){try{const r=JSON.parse(e);switch(r.type){case"Welcome":this.emit({type:"ready"});break;case"SettingsApplied":break;case"PromptUpdated":break;case"UserStartedSpeaking":this.emit({type:"user_speaking",payload:!0}),this.clearPlaybackBuffer(),this.isAgentSpeaking=!1,this.agentAudioDoneReceived=!1;break;case"UserStoppedSpeaking":this.emit({type:"user_speaking",payload:!1});break;case"ConversationText":if(r.content&&r.content.trim()){const i=r.role==="assistant"?"agent":"user";this.config.onTranscript&&this.config.onTranscript(r.content,i),this.emit({type:"transcript",payload:{text:r.content,role:i}}),this.saveTranscript(r.content,r.role)}break;case"AgentStartedSpeaking":this.isAgentSpeaking=!0,this.agentAudioDoneReceived=!1,this.emit({type:"agent_speaking",payload:!0});break;case"AgentAudioDone":this.agentAudioDoneReceived=!0;break;case"Error":console.error("[GlydeVoice] Agent error:",r),this.emit({type:"error",payload:r});break;case"FunctionCallRequest":this.handleFunctionCallRequest(r);break}}catch(r){console.error("[GlydeVoice] Failed to parse message:",r)}}async handleAudioData(e){const r=await e.arrayBuffer();this.handleAudioBuffer(r)}handleAudioBuffer(e){if(!this.playbackWorkletNode||!this.audioContext)return;this.audioContext.state==="suspended"&&this.audioContext.resume();const r=e.byteLength;if(r===0)return;const i=r-r%2;if(i===0)return;const s=i===r?e:e.slice(0,i),n=new Int16Array(s),h=new Float32Array(n.length);for(let u=0;u<n.length;u++)h[u]=n[u]/32768;const f=this.resample24kTo48k(h);!this.isAgentSpeaking&&!this.agentAudioDoneReceived&&(this.isAgentSpeaking=!0,this.emit({type:"agent_speaking",payload:!0}));const p=new Float32Array(f);this.playbackWorkletNode.port.postMessage({type:"audio",data:p},[p.buffer])}resample24kTo48k(e){const r=e.length*2,i=new Float32Array(r);for(let n=0;n<e.length-1;n++){const h=e[n],f=e[n+1];i[n*2]=h,i[n*2+1]=(h+f)/2}const s=e.length-1;return i[s*2]=e[s],i[s*2+1]=e[s],i}clearPlaybackBuffer(){this.playbackWorkletNode&&this.playbackWorkletNode.port.postMessage({type:"clear"})}async startMicrophone(){if(!this.audioContext)throw new Error("Audio context not initialized");try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:this.inputSampleRate,echoCancellation:!0,noiseSuppression:!0}});const e=this.audioContext.createMediaStreamSource(this.mediaStream);this.captureWorkletNode=new AudioWorkletNode(this.audioContext,"audio-capture-processor"),this.captureWorkletNode.port.onmessage=r=>{!this.active||!this.ws||this.ws.readyState!==WebSocket.OPEN||this.isMuted||this.ws.send(r.data)},e.connect(this.captureWorkletNode),this.emit({type:"microphone_ready"})}catch(e){throw console.error("[GlydeVoice] Microphone error:",e),e}}async saveTranscript(e,r){if(!(!this.config.contextId||!e))try{await fetch(`${this.unityUrl}/api/unity/voice/transcript`,{method:"POST",headers:this.getAuthHeaders(),body:JSON.stringify({context_id:this.config.contextId,content:e,role:r==="assistant"?"assistant":"user"})})}catch{}}setMuted(e){this.isMuted=e}getMuted(){return this.isMuted}isActive(){return this.active}getServerConfig(){return this.serverConfig}stop(){this.active=!1,this.cleanup()}cleanup(){this.captureWorkletNode&&(this.captureWorkletNode.disconnect(),this.captureWorkletNode.port.close(),this.captureWorkletNode=null),this.playbackWorkletNode&&(this.playbackWorkletNode.disconnect(),this.playbackWorkletNode.port.close(),this.playbackWorkletNode=null),this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null),this.audioContext&&(this.audioContext.close(),this.audioContext=null),this.ws&&(this.ws.readyState===WebSocket.OPEN&&this.ws.close(),this.ws=null)}emit(e){this.config.onEvent&&this.config.onEvent(e)}renderUI(){if(!this.config.container)return;const e=typeof this.config.container=="string"?document.querySelector(this.config.container):this.config.container;e&&(e.innerHTML=`
139
+ ${w}`),await this.initializeAudio();let O="wss://agent.deepgram.com/v1/agent/converse";const x=this.config.deepgramConfig||Y||this.serverConfig?.deepgram_config;if(x?.tags&&x.tags.length>0){const _=new URLSearchParams;x.tags.forEach(B=>_.append("tag",B)),O+=`?${_.toString()}`}this.ws=new WebSocket(O,["bearer",C]),this.ws.onopen=()=>{const _=x||{think:{provider:{type:"open_ai",model:"gpt-4.1-nano"}},speak:{provider:{type:"deepgram",model:"aura-2-thalia-en"}},listen:{provider:{type:"deepgram",version:"v2",model:"flux-general-en"}}},B={type:"Settings",audio:{input:{encoding:"linear16",sample_rate:this.inputSampleRate},output:{encoding:"linear16",sample_rate:this.outputSampleRate,container:"none"}},agent:{language:"en",speak:_.speak||{provider:{type:"deepgram",model:"aura-2-thalia-en"}},listen:_.listen||{provider:{type:"deepgram",version:"v2",model:"flux-general-en"}},think:{provider:_.think?.provider||{type:"open_ai",model:"gpt-4.1-nano"},..._.think?.functions&&{functions:_.think.functions}},...!this.conversationHistory||this.conversationHistory.length===0?{greeting:"Hi! I'm excited you chose to speak with me. Are you ready to start?"}:{}}};_.tags&&_.tags.length>0&&(B.tags=_.tags),this.ws.send(JSON.stringify(B)),this.emit({type:"open",payload:{config:D,serverConfig:this.serverConfig}})};const G=w;this.ws.onmessage=_=>{if(typeof _.data=="string"){try{const B=JSON.parse(_.data);if(B.type==="SettingsApplied"){const F={type:"UpdatePrompt",prompt:G};this.ws.send(JSON.stringify(F)),setTimeout(()=>{this.mediaStream||this.startMicrophone().catch(it=>{console.error("[GlydeVoice] Failed to start microphone:",it)})},500)}B.type==="PromptUpdated"&&(this.mediaStream||this.startMicrophone().catch(F=>{console.error("[GlydeVoice] Failed to start microphone:",F)}))}catch{}this.handleTextMessage(_.data)}else _.data instanceof Blob?this.handleAudioData(_.data):_.data instanceof ArrayBuffer&&this.handleAudioBuffer(_.data)},this.ws.onerror=_=>{console.error("[GlydeVoice] WebSocket error:",_),this.emit({type:"error",payload:_})},this.ws.onclose=()=>{this.cleanup(),this.emit({type:"close"})},this.renderUI()}catch(f){throw console.error("[GlydeVoice] Error starting session:",f),this.active=!1,this.emit({type:"error",payload:f}),f}}}createWorkletBlobUrl(f){const g=new Blob([f],{type:"application/javascript"});return URL.createObjectURL(g)}async initializeAudio(){this.audioContext=new AudioContext({sampleRate:this.inputSampleRate});const f=this.createWorkletBlobUrl(Da),g=this.createWorkletBlobUrl(ey);try{await Promise.all([this.audioContext.audioWorklet.addModule(f),this.audioContext.audioWorklet.addModule(g)])}finally{URL.revokeObjectURL(f),URL.revokeObjectURL(g)}this.playbackWorkletNode=new AudioWorkletNode(this.audioContext,"audio-playback-processor"),this.playbackWorkletNode.connect(this.audioContext.destination),this.playbackWorkletNode.port.onmessage=o=>{const{type:C}=o.data;(C==="cleared"||C==="bufferEmpty")&&(this.isAgentSpeaking=!1,this.agentAudioDoneReceived=!1,this.emit({type:"agent_speaking",payload:!1}))}}handleTextMessage(f){try{const g=JSON.parse(f);switch(g.type){case"Welcome":this.emit({type:"ready"});break;case"SettingsApplied":break;case"PromptUpdated":break;case"UserStartedSpeaking":this.emit({type:"user_speaking",payload:!0}),this.clearPlaybackBuffer(),this.isAgentSpeaking=!1,this.agentAudioDoneReceived=!1;break;case"UserStoppedSpeaking":this.emit({type:"user_speaking",payload:!1});break;case"ConversationText":if(g.content&&g.content.trim()){const o=g.role==="assistant"?"agent":"user";this.config.onTranscript&&this.config.onTranscript(g.content,o),this.emit({type:"transcript",payload:{text:g.content,role:o}}),this.saveTranscript(g.content,g.role)}break;case"AgentStartedSpeaking":this.isAgentSpeaking=!0,this.agentAudioDoneReceived=!1,this.emit({type:"agent_speaking",payload:!0});break;case"AgentAudioDone":this.agentAudioDoneReceived=!0;break;case"Error":console.error("[GlydeVoice] Agent error:",g),this.emit({type:"error",payload:g});break;case"FunctionCallRequest":this.handleFunctionCallRequest(g);break}}catch(g){console.error("[GlydeVoice] Failed to parse message:",g)}}async handleAudioData(f){const g=await f.arrayBuffer();this.handleAudioBuffer(g)}handleAudioBuffer(f){if(!this.playbackWorkletNode||!this.audioContext)return;this.audioContext.state==="suspended"&&this.audioContext.resume();const g=f.byteLength;if(g===0)return;const o=g-g%2;if(o===0)return;const C=o===g?f:f.slice(0,o),D=new Int16Array(C),Y=new Float32Array(D.length);for(let x=0;x<D.length;x++)Y[x]=D[x]/32768;const w=this.resample24kTo48k(Y);!this.isAgentSpeaking&&!this.agentAudioDoneReceived&&(this.isAgentSpeaking=!0,this.emit({type:"agent_speaking",payload:!0}));const O=new Float32Array(w);this.playbackWorkletNode.port.postMessage({type:"audio",data:O},[O.buffer])}resample24kTo48k(f){const g=f.length*2,o=new Float32Array(g);for(let D=0;D<f.length-1;D++){const Y=f[D],w=f[D+1];o[D*2]=Y,o[D*2+1]=(Y+w)/2}const C=f.length-1;return o[C*2]=f[C],o[C*2+1]=f[C],o}clearPlaybackBuffer(){this.playbackWorkletNode&&this.playbackWorkletNode.port.postMessage({type:"clear"})}async startMicrophone(){if(!this.audioContext)throw new Error("Audio context not initialized");try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:this.inputSampleRate,echoCancellation:!0,noiseSuppression:!0}});const f=this.audioContext.createMediaStreamSource(this.mediaStream);this.captureWorkletNode=new AudioWorkletNode(this.audioContext,"audio-capture-processor"),this.captureWorkletNode.port.onmessage=g=>{!this.active||!this.ws||this.ws.readyState!==WebSocket.OPEN||this.isMuted||this.ws.send(g.data)},f.connect(this.captureWorkletNode),this.emit({type:"microphone_ready"})}catch(f){throw console.error("[GlydeVoice] Microphone error:",f),f}}async saveTranscript(f,g){if(!(!this.config.contextId||!f))try{await fetch(`${this.unityUrl}/api/unity/voice/transcript`,{method:"POST",headers:this.getAuthHeaders(),body:JSON.stringify({context_id:this.config.contextId,content:f,role:g==="assistant"?"assistant":"user"})})}catch{}}setMuted(f){this.isMuted=f}getMuted(){return this.isMuted}isActive(){return this.active}getServerConfig(){return this.serverConfig}stop(){this.active=!1,this.cleanup()}cleanup(){this.captureWorkletNode&&(this.captureWorkletNode.disconnect(),this.captureWorkletNode.port.close(),this.captureWorkletNode=null),this.playbackWorkletNode&&(this.playbackWorkletNode.disconnect(),this.playbackWorkletNode.port.close(),this.playbackWorkletNode=null),this.mediaStream&&(this.mediaStream.getTracks().forEach(f=>f.stop()),this.mediaStream=null),this.audioContext&&(this.audioContext.close(),this.audioContext=null),this.ws&&(this.ws.readyState===WebSocket.OPEN&&this.ws.close(),this.ws=null)}emit(f){this.config.onEvent&&this.config.onEvent(f)}renderUI(){if(!this.config.container)return;const f=typeof this.config.container=="string"?document.querySelector(this.config.container):this.config.container;f&&(f.innerHTML=`
140
140
  <div style="padding: 20px; border: 1px solid #ccc; border-radius: 8px; background: #fff;">
141
141
  <h3>Glyde Voice Agent</h3>
142
142
  <p>Status: Active</p>
143
143
  <p>Context: ${this.config.contextType}</p>
144
144
  <button onclick="this.closest('div').remove()">Close</button>
145
145
  </div>
146
- `)}async handleFunctionCallRequest(e){for(const r of e.functions){console.log("[GlydeVoice] Function call request:",r.name,r.arguments);let i={};try{i=r.arguments?JSON.parse(r.arguments):{}}catch(h){console.warn("[GlydeVoice] Failed to parse function arguments:",h)}let s;try{r.name==="end_conversation"?s=await this.handleEndConversation(i):s=await this.executeVoiceFunction(r.name,r.id,i)}catch(h){console.error("[GlydeVoice] Function call error:",h),s=JSON.stringify({error:"Function execution failed",details:h instanceof Error?h.message:String(h)})}const n={type:"FunctionCallResponse",id:r.id,name:r.name,content:s};this.ws&&this.ws.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(n)),console.log("[GlydeVoice] Function response sent:",r.name)):console.error("[GlydeVoice] Cannot send function response - WebSocket not open")}}async executeVoiceFunction(e,r,i){console.log("[GlydeVoice] Executing voice function via Unity API:",e);try{const s=await fetch(`${this.unityUrl}/api/unity/voice/function`,{method:"POST",headers:this.getAuthHeaders(),body:JSON.stringify({function_name:e,function_call_id:r,input:i,context:{context_id:this.sessionContext.contextId,context_type:this.sessionContext.contextType,current_job_uuid:this.sessionContext.currentJobUuid}})});if(!s.ok){const h=await s.json().catch(()=>({}));throw new Error(h.error?.message||`Function call failed: ${s.status}`)}const n=await s.json();if(n.success&&n.data?.output)return typeof n.data.output=="string"?n.data.output:JSON.stringify(n.data.output);throw new Error("Invalid response from voice function endpoint")}catch(s){return console.error("[GlydeVoice] Voice function error:",s),JSON.stringify({success:!1,error:s instanceof Error?s.message:"Function execution failed",fallback_message:"I apologize, but I'm having trouble with that request right now. Is there something else I can help you with?"})}}async handleEndConversation(e){const r=e.item||"user request";return console.log(`[GlydeVoice] End conversation triggered by: ${r}`),setTimeout(()=>{this.stop()},2e3),JSON.stringify({success:!0,message:"Conversation ending. Say goodbye to the user.",trigger_phrase:r})}setSessionContext(e){this.sessionContext={...this.sessionContext,...e},console.log("[GlydeVoice] Session context updated:",{hasContextId:!!e.contextId,contextType:e.contextType,hasJobUuid:!!e.currentJobUuid})}}class G{config;unityUrl;history=[];isTyping=!1;initialized=!1;constructor(e){this.config=e,this.unityUrl=e.unityBaseUrl||"https://api.glydeunity.com",!e.publishableKey&&!e.apiKey&&!e.authToken&&console.warn("[GlydeText] No authentication method provided. One of publishableKey, apiKey, or authToken is required.")}getAuthHeaders(){const e={"Content-Type":"application/json"};return this.config.publishableKey&&(e["x-publishable-key"]=this.config.publishableKey),this.config.apiKey&&(e["x-api-key"]=this.config.apiKey),this.config.authToken&&(e.Authorization=`Bearer ${this.config.authToken}`),e}emit(e){this.config.onEvent&&this.config.onEvent(e)}setTyping(e){this.isTyping=e,this.config.onTyping&&this.config.onTyping(e)}async initialize(){if(!this.config.contextId)throw new Error("contextId is required for text chat initialization");this.setTyping(!0);try{const e=await fetch(`${this.unityUrl}/api/unity/screening/start`,{method:"POST",headers:this.getAuthHeaders(),body:JSON.stringify({application_uuid:this.config.contextId})});if(!e.ok){const i=await e.json().catch(()=>({}));throw new Error(i.error?.message||i.message||"Failed to initialize chat")}const r=await e.json();return r.messages&&(this.history=r.messages),this.initialized=!0,this.emit({type:"ready"}),this.emit({type:"history_loaded",payload:this.history}),this.history}catch(e){throw console.error("[GlydeText] Initialization error:",e),this.emit({type:"error",payload:e}),e}finally{this.setTyping(!1)}}async sendMessage(e){if(!this.config.contextId)throw new Error("contextId is required for sending messages");if(!e.trim())throw new Error("Message cannot be empty");this.initialized||await this.initialize();const r={role:"user",content:e.trim(),created:new Date().toISOString()};this.history.push(r),this.config.onMessage&&this.config.onMessage(r),this.emit({type:"message",payload:r}),this.setTyping(!0);try{const i=await fetch(`${this.unityUrl}/api/unity/screening/chat`,{method:"POST",headers:this.getAuthHeaders(),body:JSON.stringify({application_uuid:this.config.contextId,message:e.trim()})});if(!i.ok){const f=await i.json().catch(()=>({}));throw new Error(f.error?.message||f.message||"Failed to send message")}const s=await i.json();s.history?.messages&&(this.history=s.history.messages);const n=[...this.history].reverse().find(f=>f.role==="assistant");return n?(this.config.onMessage&&this.config.onMessage(n),this.emit({type:"message",payload:n}),n):{role:"assistant",content:s.response||"I received your message.",created:new Date().toISOString()}}catch(i){throw console.error("[GlydeText] Send message error:",i),this.emit({type:"error",payload:i}),i}finally{this.setTyping(!1)}}getHistory(){return[...this.history]}clearHistory(){this.history=[],this.initialized=!1}getIsTyping(){return this.isTyping}getIsInitialized(){return this.initialized}}function H(o){const[e,r]=l.useState("idle"),[i,s]=l.useState([]),[n,h]=l.useState(!1),[f,p]=l.useState(!1),[u,m]=l.useState(!1),[a,g]=l.useState(null),b=l.useRef(null),k=l.useCallback(d=>{switch(d.type){case"ready":r("active");break;case"close":r("idle"),h(!1),p(!1);break;case"error":r("error"),g(typeof d.payload=="object"&&d.payload!==null&&"message"in d.payload?String(d.payload.message):"Connection error");break;case"user_speaking":h(!!d.payload);break;case"agent_speaking":p(!!d.payload);break}},[]),v=l.useCallback((d,M)=>{s(E=>[...E,{role:M,content:d,timestamp:new Date}])},[]),y=l.useCallback(async()=>{r("connecting"),g(null);try{const d=new D({...o,onEvent:k,onTranscript:v});b.current=d,await d.start()}catch(d){console.error("[useVoiceAgent] Failed to start:",d),r("error"),g(d instanceof Error?d.message:"Failed to connect")}},[o,k,v]),w=l.useCallback(()=>{b.current?.stop(),b.current=null,r("idle"),h(!1),p(!1)},[]),C=l.useCallback(()=>{const d=!u;m(d),b.current?.setMuted(d)},[u]),I=l.useCallback(d=>{m(d),b.current?.setMuted(d)},[]),T=l.useCallback(()=>{s([])},[]);return l.useEffect(()=>()=>{b.current?.stop()},[]),l.useEffect(()=>{o.autoStart&&e==="idle"&&y()},[o.autoStart,e,y]),{status:e,transcripts:i,isUserSpeaking:n,isAgentSpeaking:f,isMuted:u,errorMessage:a,start:y,stop:w,toggleMute:C,setMuted:I,clearTranscripts:T,voiceAgent:b.current}}function F(o){const[e,r]=l.useState("idle"),[i,s]=l.useState([]),[n,h]=l.useState(!1),[f,p]=l.useState(null),u=l.useRef(null),m=l.useRef(!1),a=l.useCallback(()=>(u.current||(u.current=new G({...o,onTyping:h})),u.current),[o]),g=l.useCallback(async()=>{if(!m.current){r("loading"),p(null);try{const y=await a().initialize();s(y),r("ready"),m.current=!0}catch(v){console.error("[useTextChat] Initialization error:",v),r("error"),p(v instanceof Error?v.message:"Failed to initialize chat")}}},[a]),b=l.useCallback(async v=>{if(v.trim()){p(null);try{const y=a(),w={role:"user",content:v.trim(),created:new Date().toISOString()};s(I=>[...I,w]),await y.sendMessage(v);const C=y.getHistory();s(C),e!=="ready"&&(r("ready"),m.current=!0)}catch(y){console.error("[useTextChat] Send message error:",y),p(y instanceof Error?y.message:"Failed to send message")}}},[a,e]),k=l.useCallback(()=>{u.current?.clearHistory(),s([]),m.current=!1,r("idle")},[]);return l.useEffect(()=>{o.autoInit&&!m.current&&o.contextId&&g()},[o.autoInit,o.contextId,g]),l.useEffect(()=>()=>{u.current=null},[]),{status:e,messages:i,isLoading:n,errorMessage:f,initialize:g,sendMessage:b,clearHistory:k,textChat:u.current}}const W=({size:o=24,color:e="currentColor",className:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:[t.jsx("path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}),t.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),t.jsx("line",{x1:"12",x2:"12",y1:"19",y2:"22"})]}),se=({size:o=24,color:e="currentColor",className:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:[t.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"}),t.jsx("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),t.jsx("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),t.jsx("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),t.jsx("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),t.jsx("line",{x1:"12",x2:"12",y1:"19",y2:"22"})]}),ne=({size:o=24,color:e="currentColor",className:r})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:t.jsx("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"})}),K=({size:o=24,color:e="currentColor",className:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:[t.jsx("path",{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"}),t.jsx("line",{x1:"22",x2:"2",y1:"2",y2:"22"})]}),j=({size:o=24,color:e="currentColor",className:r})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:t.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),J=({size:o=24,color:e="currentColor",className:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:[t.jsx("line",{x1:"22",x2:"11",y1:"2",y2:"13"}),t.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]}),q=({size:o=24,color:e="currentColor",className:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:[t.jsx("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}),t.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),Y=({size:o=24,color:e="currentColor",className:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:[t.jsx("path",{d:"M12 8V4H8"}),t.jsx("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),t.jsx("path",{d:"M2 14h2"}),t.jsx("path",{d:"M20 14h2"}),t.jsx("path",{d:"M15 13v2"}),t.jsx("path",{d:"M9 13v2"})]}),X=({size:o=24,color:e="currentColor",className:r})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:t.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})}),Z=({size:o=24,color:e="currentColor",className:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:[t.jsx("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"}),t.jsx("line",{x1:"22",x2:"16",y1:"9",y2:"15"}),t.jsx("line",{x1:"16",x2:"22",y1:"9",y2:"15"})]}),Q=({size:o=24,color:e="currentColor",className:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:[t.jsx("line",{x1:"18",x2:"6",y1:"6",y2:"18"}),t.jsx("line",{x1:"6",x2:"18",y1:"6",y2:"18"})]}),R=({size:o=24,color:e="currentColor",className:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,children:[t.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),t.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),t.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),t.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}),ae=({size:o=24,color:e="currentColor",className:r})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,style:{animation:"spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),ee={light:{primary:"#c026d3",primaryHover:"#a21caf",primaryLight:"#fdf4ff",primaryText:"#ffffff",secondary:"#0284c7",secondaryHover:"#0369a1",secondaryLight:"#f0f9ff",secondaryText:"#ffffff",success:"#059669",successLight:"#dcfce7",successText:"#166534",error:"#ef4444",errorHover:"#dc2626",errorLight:"#fef2f2",errorText:"#b91c1c",background:"#ffffff",surface:"#f9fafb",border:"#e5e7eb",borderLight:"#f3f4f6",text:"#1f2937",textSecondary:"#6b7280",textMuted:"#9ca3af"},dark:{primary:"#d946ef",primaryHover:"#c026d3",primaryLight:"#3b0764",primaryText:"#ffffff",secondary:"#38bdf8",secondaryHover:"#0ea5e9",secondaryLight:"#0c4a6e",secondaryText:"#ffffff",success:"#34d399",successLight:"#064e3b",successText:"#a7f3d0",error:"#f87171",errorHover:"#ef4444",errorLight:"#450a0a",errorText:"#fecaca",background:"#111827",surface:"#1f2937",border:"#374151",borderLight:"#4b5563",text:"#f9fafb",textSecondary:"#d1d5db",textMuted:"#9ca3af"}};function U(o){const e=ee[o];return`
147
- --glyde-primary: ${e.primary};
148
- --glyde-primary-hover: ${e.primaryHover};
149
- --glyde-primary-light: ${e.primaryLight};
150
- --glyde-primary-text: ${e.primaryText};
151
- --glyde-secondary: ${e.secondary};
152
- --glyde-secondary-hover: ${e.secondaryHover};
153
- --glyde-secondary-light: ${e.secondaryLight};
154
- --glyde-secondary-text: ${e.secondaryText};
155
- --glyde-success: ${e.success};
156
- --glyde-success-light: ${e.successLight};
157
- --glyde-success-text: ${e.successText};
158
- --glyde-error: ${e.error};
159
- --glyde-error-hover: ${e.errorHover};
160
- --glyde-error-light: ${e.errorLight};
161
- --glyde-error-text: ${e.errorText};
162
- --glyde-background: ${e.background};
163
- --glyde-surface: ${e.surface};
164
- --glyde-border: ${e.border};
165
- --glyde-border-light: ${e.borderLight};
166
- --glyde-text: ${e.text};
167
- --glyde-text-secondary: ${e.textSecondary};
168
- --glyde-text-muted: ${e.textMuted};
169
- `}const N=`
146
+ `)}async handleFunctionCallRequest(f){for(const g of f.functions){console.log("[GlydeVoice] Function call request:",g.name,g.arguments);let o={};try{o=g.arguments?JSON.parse(g.arguments):{}}catch(Y){console.warn("[GlydeVoice] Failed to parse function arguments:",Y)}let C;try{g.name==="end_conversation"?C=await this.handleEndConversation(o):C=await this.executeVoiceFunction(g.name,g.id,o)}catch(Y){console.error("[GlydeVoice] Function call error:",Y),C=JSON.stringify({error:"Function execution failed",details:Y instanceof Error?Y.message:String(Y)})}const D={type:"FunctionCallResponse",id:g.id,name:g.name,content:C};this.ws&&this.ws.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(D)),console.log("[GlydeVoice] Function response sent:",g.name)):console.error("[GlydeVoice] Cannot send function response - WebSocket not open")}}async executeVoiceFunction(f,g,o){console.log("[GlydeVoice] Executing voice function via Unity API:",f);try{const C=await fetch(`${this.unityUrl}/api/unity/voice/function`,{method:"POST",headers:this.getAuthHeaders(),body:JSON.stringify({function_name:f,function_call_id:g,input:o,context:{context_id:this.sessionContext.contextId,context_type:this.sessionContext.contextType,current_job_uuid:this.sessionContext.currentJobUuid}})});if(!C.ok){const Y=await C.json().catch(()=>({}));throw new Error(Y.error?.message||`Function call failed: ${C.status}`)}const D=await C.json();if(D.success&&D.data?.output)return typeof D.data.output=="string"?D.data.output:JSON.stringify(D.data.output);throw new Error("Invalid response from voice function endpoint")}catch(C){return console.error("[GlydeVoice] Voice function error:",C),JSON.stringify({success:!1,error:C instanceof Error?C.message:"Function execution failed",fallback_message:"I apologize, but I'm having trouble with that request right now. Is there something else I can help you with?"})}}async handleEndConversation(f){const g=f.item||"user request";return console.log(`[GlydeVoice] End conversation triggered by: ${g}`),setTimeout(()=>{this.stop()},2e3),JSON.stringify({success:!0,message:"Conversation ending. Say goodbye to the user.",trigger_phrase:g})}setSessionContext(f){this.sessionContext={...this.sessionContext,...f},console.log("[GlydeVoice] Session context updated:",{hasContextId:!!f.contextId,contextType:f.contextType,hasJobUuid:!!f.currentJobUuid})}}class Of{config;unityUrl;history=[];isTyping=!1;initialized=!1;constructor(f){this.config=f,this.unityUrl=f.unityBaseUrl||"https://api.glydeunity.com",!f.publishableKey&&!f.apiKey&&!f.authToken&&console.warn("[GlydeText] No authentication method provided. One of publishableKey, apiKey, or authToken is required.")}getAuthHeaders(){const f={"Content-Type":"application/json"};return this.config.publishableKey&&(f["x-publishable-key"]=this.config.publishableKey),this.config.apiKey&&(f["x-api-key"]=this.config.apiKey),this.config.authToken&&(f.Authorization=`Bearer ${this.config.authToken}`),f}emit(f){this.config.onEvent&&this.config.onEvent(f)}setTyping(f){this.isTyping=f,this.config.onTyping&&this.config.onTyping(f)}async initialize(){if(!this.config.contextId)throw new Error("contextId is required for text chat initialization");this.setTyping(!0);try{const f=await fetch(`${this.unityUrl}/api/unity/screening/start`,{method:"POST",headers:this.getAuthHeaders(),body:JSON.stringify({application_uuid:this.config.contextId})});if(!f.ok){const o=await f.json().catch(()=>({}));throw new Error(o.error?.message||o.message||"Failed to initialize chat")}const g=await f.json();return g.messages&&(this.history=g.messages),this.initialized=!0,this.emit({type:"ready"}),this.emit({type:"history_loaded",payload:this.history}),this.history}catch(f){throw console.error("[GlydeText] Initialization error:",f),this.emit({type:"error",payload:f}),f}finally{this.setTyping(!1)}}async sendMessage(f){if(!this.config.contextId)throw new Error("contextId is required for sending messages");if(!f.trim())throw new Error("Message cannot be empty");this.initialized||await this.initialize();const g={role:"user",content:f.trim(),created:new Date().toISOString()};this.history.push(g),this.config.onMessage&&this.config.onMessage(g),this.emit({type:"message",payload:g}),this.setTyping(!0);try{const o=await fetch(`${this.unityUrl}/api/unity/screening/chat`,{method:"POST",headers:this.getAuthHeaders(),body:JSON.stringify({application_uuid:this.config.contextId,message:f.trim()})});if(!o.ok){const w=await o.json().catch(()=>({}));throw new Error(w.error?.message||w.message||"Failed to send message")}const C=await o.json();C.history?.messages&&(this.history=C.history.messages);const D=[...this.history].reverse().find(w=>w.role==="assistant");return D?(this.config.onMessage&&this.config.onMessage(D),this.emit({type:"message",payload:D}),D):{role:"assistant",content:C.response||"I received your message.",created:new Date().toISOString()}}catch(o){throw console.error("[GlydeText] Send message error:",o),this.emit({type:"error",payload:o}),o}finally{this.setTyping(!1)}}getHistory(){return[...this.history]}clearHistory(){this.history=[],this.initialized=!1}getIsTyping(){return this.isTyping}getIsInitialized(){return this.initialized}}function ly(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}var $u={exports:{}},V={};var Cf;function ay(){if(Cf)return V;Cf=1;var h=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),B=Symbol.iterator;function F(d){return d===null||typeof d!="object"?null:(d=B&&d[B]||d["@@iterator"],typeof d=="function"?d:null)}var it={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I=Object.assign,$={};function rt(d,M,j){this.props=d,this.context=M,this.refs=$,this.updater=j||it}rt.prototype.isReactComponent={},rt.prototype.setState=function(d,M){if(typeof d!="object"&&typeof d!="function"&&d!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,d,M,"setState")},rt.prototype.forceUpdate=function(d){this.updater.enqueueForceUpdate(this,d,"forceUpdate")};function Rt(){}Rt.prototype=rt.prototype;function bt(d,M,j){this.props=d,this.context=M,this.refs=$,this.updater=j||it}var Ct=bt.prototype=new Rt;Ct.constructor=bt,I(Ct,rt.prototype),Ct.isPureReactComponent=!0;var L=Array.isArray;function Mt(){}var Z={H:null,A:null,T:null,S:null},ht=Object.prototype.hasOwnProperty;function Wt(d,M,j){var H=j.ref;return{$$typeof:h,type:d,key:M,ref:H!==void 0?H:null,props:j}}function Zl(d,M){return Wt(d.type,M,d.props)}function Oe(d){return typeof d=="object"&&d!==null&&d.$$typeof===h}function $t(d){var M={"=":"=0",":":"=2"};return"$"+d.replace(/[=:]/g,function(j){return M[j]})}var El=/\/+/g;function He(d,M){return typeof d=="object"&&d!==null&&d.key!=null?$t(""+d.key):M.toString(36)}function ze(d){switch(d.status){case"fulfilled":return d.value;case"rejected":throw d.reason;default:switch(typeof d.status=="string"?d.then(Mt,Mt):(d.status="pending",d.then(function(M){d.status==="pending"&&(d.status="fulfilled",d.value=M)},function(M){d.status==="pending"&&(d.status="rejected",d.reason=M)})),d.status){case"fulfilled":return d.value;case"rejected":throw d.reason}}throw d}function A(d,M,j,H,J){var P=typeof d;(P==="undefined"||P==="boolean")&&(d=null);var ot=!1;if(d===null)ot=!0;else switch(P){case"bigint":case"string":case"number":ot=!0;break;case"object":switch(d.$$typeof){case h:case f:ot=!0;break;case G:return ot=d._init,A(ot(d._payload),M,j,H,J)}}if(ot)return J=J(d),ot=H===""?"."+He(d,0):H,L(J)?(j="",ot!=null&&(j=ot.replace(El,"$&/")+"/"),A(J,M,j,"",function(Ba){return Ba})):J!=null&&(Oe(J)&&(J=Zl(J,j+(J.key==null||d&&d.key===J.key?"":(""+J.key).replace(El,"$&/")+"/")+ot)),M.push(J)),1;ot=0;var Jt=H===""?".":H+":";if(L(d))for(var Dt=0;Dt<d.length;Dt++)H=d[Dt],P=Jt+He(H,Dt),ot+=A(H,M,j,P,J);else if(Dt=F(d),typeof Dt=="function")for(d=Dt.call(d),Dt=0;!(H=d.next()).done;)H=H.value,P=Jt+He(H,Dt++),ot+=A(H,M,j,P,J);else if(P==="object"){if(typeof d.then=="function")return A(ze(d),M,j,H,J);throw M=String(d),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}return ot}function U(d,M,j){if(d==null)return d;var H=[],J=0;return A(d,H,"","",function(P){return M.call(j,P,J++)}),H}function Q(d){if(d._status===-1){var M=d._result;M=M(),M.then(function(j){(d._status===0||d._status===-1)&&(d._status=1,d._result=j)},function(j){(d._status===0||d._status===-1)&&(d._status=2,d._result=j)}),d._status===-1&&(d._status=0,d._result=M)}if(d._status===1)return d._result.default;throw d._result}var gt=typeof reportError=="function"?reportError:function(d){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof d=="object"&&d!==null&&typeof d.message=="string"?String(d.message):String(d),error:d});if(!window.dispatchEvent(M))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",d);return}console.error(d)},St={map:U,forEach:function(d,M,j){U(d,function(){M.apply(this,arguments)},j)},count:function(d){var M=0;return U(d,function(){M++}),M},toArray:function(d){return U(d,function(M){return M})||[]},only:function(d){if(!Oe(d))throw Error("React.Children.only expected to receive a single React element child.");return d}};return V.Activity=_,V.Children=St,V.Component=rt,V.Fragment=g,V.Profiler=C,V.PureComponent=bt,V.StrictMode=o,V.Suspense=O,V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,V.__COMPILER_RUNTIME={__proto__:null,c:function(d){return Z.H.useMemoCache(d)}},V.cache=function(d){return function(){return d.apply(null,arguments)}},V.cacheSignal=function(){return null},V.cloneElement=function(d,M,j){if(d==null)throw Error("The argument must be a React element, but you passed "+d+".");var H=I({},d.props),J=d.key;if(M!=null)for(P in M.key!==void 0&&(J=""+M.key),M)!ht.call(M,P)||P==="key"||P==="__self"||P==="__source"||P==="ref"&&M.ref===void 0||(H[P]=M[P]);var P=arguments.length-2;if(P===1)H.children=j;else if(1<P){for(var ot=Array(P),Jt=0;Jt<P;Jt++)ot[Jt]=arguments[Jt+2];H.children=ot}return Wt(d.type,J,H)},V.createContext=function(d){return d={$$typeof:Y,_currentValue:d,_currentValue2:d,_threadCount:0,Provider:null,Consumer:null},d.Provider=d,d.Consumer={$$typeof:D,_context:d},d},V.createElement=function(d,M,j){var H,J={},P=null;if(M!=null)for(H in M.key!==void 0&&(P=""+M.key),M)ht.call(M,H)&&H!=="key"&&H!=="__self"&&H!=="__source"&&(J[H]=M[H]);var ot=arguments.length-2;if(ot===1)J.children=j;else if(1<ot){for(var Jt=Array(ot),Dt=0;Dt<ot;Dt++)Jt[Dt]=arguments[Dt+2];J.children=Jt}if(d&&d.defaultProps)for(H in ot=d.defaultProps,ot)J[H]===void 0&&(J[H]=ot[H]);return Wt(d,P,J)},V.createRef=function(){return{current:null}},V.forwardRef=function(d){return{$$typeof:w,render:d}},V.isValidElement=Oe,V.lazy=function(d){return{$$typeof:G,_payload:{_status:-1,_result:d},_init:Q}},V.memo=function(d,M){return{$$typeof:x,type:d,compare:M===void 0?null:M}},V.startTransition=function(d){var M=Z.T,j={};Z.T=j;try{var H=d(),J=Z.S;J!==null&&J(j,H),typeof H=="object"&&H!==null&&typeof H.then=="function"&&H.then(Mt,gt)}catch(P){gt(P)}finally{M!==null&&j.types!==null&&(M.types=j.types),Z.T=M}},V.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},V.use=function(d){return Z.H.use(d)},V.useActionState=function(d,M,j){return Z.H.useActionState(d,M,j)},V.useCallback=function(d,M){return Z.H.useCallback(d,M)},V.useContext=function(d){return Z.H.useContext(d)},V.useDebugValue=function(){},V.useDeferredValue=function(d,M){return Z.H.useDeferredValue(d,M)},V.useEffect=function(d,M){return Z.H.useEffect(d,M)},V.useEffectEvent=function(d){return Z.H.useEffectEvent(d)},V.useId=function(){return Z.H.useId()},V.useImperativeHandle=function(d,M,j){return Z.H.useImperativeHandle(d,M,j)},V.useInsertionEffect=function(d,M){return Z.H.useInsertionEffect(d,M)},V.useLayoutEffect=function(d,M){return Z.H.useLayoutEffect(d,M)},V.useMemo=function(d,M){return Z.H.useMemo(d,M)},V.useOptimistic=function(d,M){return Z.H.useOptimistic(d,M)},V.useReducer=function(d,M,j){return Z.H.useReducer(d,M,j)},V.useRef=function(d){return Z.H.useRef(d)},V.useState=function(d){return Z.H.useState(d)},V.useSyncExternalStore=function(d,M,j){return Z.H.useSyncExternalStore(d,M,j)},V.useTransition=function(){return Z.H.useTransition()},V.version="19.2.4",V}var Df;function Fu(){return Df||(Df=1,$u.exports=ay()),$u.exports}var K=Fu();const Dn=ly(K);function Uf(h){const[f,g]=K.useState("idle"),[o,C]=K.useState([]),[D,Y]=K.useState(!1),[w,O]=K.useState(!1),[x,G]=K.useState(!1),[_,B]=K.useState(null),F=K.useRef(null),it=K.useCallback(L=>{switch(L.type){case"ready":g("active");break;case"close":g("idle"),Y(!1),O(!1);break;case"error":g("error"),B(typeof L.payload=="object"&&L.payload!==null&&"message"in L.payload?String(L.payload.message):"Connection error");break;case"user_speaking":Y(!!L.payload);break;case"agent_speaking":O(!!L.payload);break}},[]),I=K.useCallback((L,Mt)=>{C(Z=>[...Z,{role:Mt,content:L,timestamp:new Date}])},[]),$=K.useCallback(async()=>{g("connecting"),B(null);try{const L=new _f({...h,onEvent:it,onTranscript:I});F.current=L,await L.start()}catch(L){console.error("[useVoiceAgent] Failed to start:",L),g("error"),B(L instanceof Error?L.message:"Failed to connect")}},[h,it,I]),rt=K.useCallback(()=>{F.current?.stop(),F.current=null,g("idle"),Y(!1),O(!1)},[]),Rt=K.useCallback(()=>{const L=!x;G(L),F.current?.setMuted(L)},[x]),bt=K.useCallback(L=>{G(L),F.current?.setMuted(L)},[]),Ct=K.useCallback(()=>{C([])},[]);return K.useEffect(()=>()=>{F.current?.stop()},[]),K.useEffect(()=>{h.autoStart&&f==="idle"&&$()},[h.autoStart,f,$]),{status:f,transcripts:o,isUserSpeaking:D,isAgentSpeaking:w,isMuted:x,errorMessage:_,start:$,stop:rt,toggleMute:Rt,setMuted:bt,clearTranscripts:Ct,voiceAgent:F.current}}function jf(h){const[f,g]=K.useState("idle"),[o,C]=K.useState([]),[D,Y]=K.useState(!1),[w,O]=K.useState(null),x=K.useRef(null),G=K.useRef(!1),_=K.useCallback(()=>(x.current||(x.current=new Of({...h,onTyping:Y})),x.current),[h]),B=K.useCallback(async()=>{if(!G.current){g("loading"),O(null);try{const $=await _().initialize();C($),g("ready"),G.current=!0}catch(I){console.error("[useTextChat] Initialization error:",I),g("error"),O(I instanceof Error?I.message:"Failed to initialize chat")}}},[_]),F=K.useCallback(async I=>{if(I.trim()){O(null);try{const $=_(),rt={role:"user",content:I.trim(),created:new Date().toISOString()};C(bt=>[...bt,rt]),await $.sendMessage(I);const Rt=$.getHistory();C(Rt),f!=="ready"&&(g("ready"),G.current=!0)}catch($){console.error("[useTextChat] Send message error:",$),O($ instanceof Error?$.message:"Failed to send message")}}},[_,f]),it=K.useCallback(()=>{x.current?.clearHistory(),C([]),G.current=!1,g("idle")},[]);return K.useEffect(()=>{h.autoInit&&!G.current&&h.contextId&&B()},[h.autoInit,h.contextId,B]),K.useEffect(()=>()=>{x.current=null},[]),{status:f,messages:o,isLoading:D,errorMessage:w,initialize:B,sendMessage:F,clearHistory:it,textChat:x.current}}var Iu={exports:{}},Ua={};var Rf;function ny(){if(Rf)return Ua;Rf=1;var h=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function g(o,C,D){var Y=null;if(D!==void 0&&(Y=""+D),C.key!==void 0&&(Y=""+C.key),"key"in C){D={};for(var w in C)w!=="key"&&(D[w]=C[w])}else D=C;return C=D.ref,{$$typeof:h,type:o,key:Y,ref:C!==void 0?C:null,props:D}}return Ua.Fragment=f,Ua.jsx=g,Ua.jsxs=g,Ua}var Hf;function uy(){return Hf||(Hf=1,Iu.exports=ny()),Iu.exports}var b=uy();const ja=({size:h=24,color:f="currentColor",className:g})=>b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:[b.jsx("path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}),b.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),b.jsx("line",{x1:"12",x2:"12",y1:"19",y2:"22"})]}),iy=({size:h=24,color:f="currentColor",className:g})=>b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:[b.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"}),b.jsx("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),b.jsx("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),b.jsx("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),b.jsx("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),b.jsx("line",{x1:"12",x2:"12",y1:"19",y2:"22"})]}),cy=({size:h=24,color:f="currentColor",className:g})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:b.jsx("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"})}),Nf=({size:h=24,color:f="currentColor",className:g})=>b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:[b.jsx("path",{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"}),b.jsx("line",{x1:"22",x2:"2",y1:"2",y2:"22"})]}),Pu=({size:h=24,color:f="currentColor",className:g})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:b.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),Bf=({size:h=24,color:f="currentColor",className:g})=>b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:[b.jsx("line",{x1:"22",x2:"11",y1:"2",y2:"13"}),b.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]}),qf=({size:h=24,color:f="currentColor",className:g})=>b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:[b.jsx("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}),b.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),Yf=({size:h=24,color:f="currentColor",className:g})=>b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:[b.jsx("path",{d:"M12 8V4H8"}),b.jsx("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),b.jsx("path",{d:"M2 14h2"}),b.jsx("path",{d:"M20 14h2"}),b.jsx("path",{d:"M15 13v2"}),b.jsx("path",{d:"M9 13v2"})]}),Gf=({size:h=24,color:f="currentColor",className:g})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:b.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})}),Xf=({size:h=24,color:f="currentColor",className:g})=>b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:[b.jsx("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"}),b.jsx("line",{x1:"22",x2:"16",y1:"9",y2:"15"}),b.jsx("line",{x1:"16",x2:"22",y1:"9",y2:"15"})]}),Lf=({size:h=24,color:f="currentColor",className:g})=>b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:[b.jsx("line",{x1:"18",x2:"6",y1:"6",y2:"18"}),b.jsx("line",{x1:"6",x2:"18",y1:"6",y2:"18"})]}),Qf=({size:h=24,color:f="currentColor",className:g})=>b.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,children:[b.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),b.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),b.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),b.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}),fy=({size:h=24,color:f="currentColor",className:g})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:g,style:{animation:"spin 1s linear infinite"},children:b.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),Vf={light:{primary:"#c026d3",primaryHover:"#a21caf",primaryLight:"#fdf4ff",primaryText:"#ffffff",secondary:"#0284c7",secondaryHover:"#0369a1",secondaryLight:"#f0f9ff",secondaryText:"#ffffff",success:"#059669",successLight:"#dcfce7",successText:"#166534",error:"#ef4444",errorHover:"#dc2626",errorLight:"#fef2f2",errorText:"#b91c1c",background:"#ffffff",surface:"#f9fafb",border:"#e5e7eb",borderLight:"#f3f4f6",text:"#1f2937",textSecondary:"#6b7280",textMuted:"#9ca3af"},dark:{primary:"#d946ef",primaryHover:"#c026d3",primaryLight:"#3b0764",primaryText:"#ffffff",secondary:"#38bdf8",secondaryHover:"#0ea5e9",secondaryLight:"#0c4a6e",secondaryText:"#ffffff",success:"#34d399",successLight:"#064e3b",successText:"#a7f3d0",error:"#f87171",errorHover:"#ef4444",errorLight:"#450a0a",errorText:"#fecaca",background:"#111827",surface:"#1f2937",border:"#374151",borderLight:"#4b5563",text:"#f9fafb",textSecondary:"#d1d5db",textMuted:"#9ca3af"}};function ti(h){const f=Vf[h];return`
147
+ --glyde-primary: ${f.primary};
148
+ --glyde-primary-hover: ${f.primaryHover};
149
+ --glyde-primary-light: ${f.primaryLight};
150
+ --glyde-primary-text: ${f.primaryText};
151
+ --glyde-secondary: ${f.secondary};
152
+ --glyde-secondary-hover: ${f.secondaryHover};
153
+ --glyde-secondary-light: ${f.secondaryLight};
154
+ --glyde-secondary-text: ${f.secondaryText};
155
+ --glyde-success: ${f.success};
156
+ --glyde-success-light: ${f.successLight};
157
+ --glyde-success-text: ${f.successText};
158
+ --glyde-error: ${f.error};
159
+ --glyde-error-hover: ${f.errorHover};
160
+ --glyde-error-light: ${f.errorLight};
161
+ --glyde-error-text: ${f.errorText};
162
+ --glyde-background: ${f.background};
163
+ --glyde-surface: ${f.surface};
164
+ --glyde-border: ${f.border};
165
+ --glyde-border-light: ${f.borderLight};
166
+ --glyde-text: ${f.text};
167
+ --glyde-text-secondary: ${f.textSecondary};
168
+ --glyde-text-muted: ${f.textMuted};
169
+ `}const ei=`
170
170
  @keyframes glyde-pulse {
171
171
  0%, 100% { opacity: 1; transform: scale(1); }
172
172
  50% { opacity: 0.5; transform: scale(1.2); }
@@ -223,19 +223,19 @@ ${f}`),await this.initializeAudio();let p="wss://agent.deepgram.com/v1/agent/con
223
223
  .glyde-slide-up {
224
224
  animation: glyde-slide-up 0.3s ease-out;
225
225
  }
226
- `,x={floatingButton:{position:"fixed",width:"60px",height:"60px",borderRadius:"50%",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",transition:"transform 0.2s, box-shadow 0.2s",zIndex:9999},widgetPanel:{position:"fixed",width:"380px",height:"600px",borderRadius:"16px",boxShadow:"0 10px 40px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",overflow:"hidden",zIndex:9998},card:{background:"var(--glyde-background)",borderRadius:"12px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",overflow:"hidden"},header:{padding:"16px 20px",borderBottom:"1px solid var(--glyde-border)",display:"flex",justifyContent:"space-between",alignItems:"center"},modeSelector:{display:"flex",gap:"8px",padding:"4px",background:"var(--glyde-surface)",borderRadius:"8px"},modeSelectorButton:{padding:"8px 16px",border:"none",borderRadius:"6px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,transition:"all 0.2s"},transcriptArea:{flex:1,overflowY:"auto",padding:"16px",background:"var(--glyde-surface)"},messageBubble:{maxWidth:"80%",padding:"10px 14px",borderRadius:"12px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},messageBubbleUser:{background:"var(--glyde-primary)",color:"var(--glyde-primary-text)",borderTopRightRadius:"4px"},messageBubbleAgent:{background:"var(--glyde-background)",color:"var(--glyde-text)",borderTopLeftRadius:"4px"},controlsArea:{padding:"16px",borderTop:"1px solid var(--glyde-border)",background:"var(--glyde-background)"},speakingIndicator:{display:"flex",alignItems:"center",gap:"6px",fontSize:"13px"},speakingDot:{width:"8px",height:"8px",borderRadius:"50%",transition:"background-color 0.2s"},primaryButton:{padding:"12px 24px",background:"var(--glyde-primary)",color:"var(--glyde-primary-text)",border:"none",borderRadius:"8px",fontSize:"15px",fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"background-color 0.2s, transform 0.1s"},secondaryButton:{padding:"10px 20px",background:"var(--glyde-surface)",color:"var(--glyde-text)",border:"1px solid var(--glyde-border)",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",transition:"background-color 0.2s"},dangerButton:{padding:"12px 24px",background:"var(--glyde-error)",color:"white",border:"none",borderRadius:"24px",fontSize:"15px",fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:"8px",transition:"background-color 0.2s"},iconButton:{width:"44px",height:"44px",padding:"0",border:"none",borderRadius:"50%",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s"},inputField:{flex:1,padding:"12px 16px",borderRadius:"8px",border:"1px solid var(--glyde-border)",background:"var(--glyde-background)",color:"var(--glyde-text)",fontSize:"14px",outline:"none",transition:"border-color 0.2s"},statusBadge:{padding:"4px 10px",borderRadius:"20px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"4px"},statusBadgeLive:{background:"var(--glyde-success-light)",color:"var(--glyde-success-text)"},statusBadgeConnecting:{background:"var(--glyde-primary-light)",color:"var(--glyde-primary)"}};function te(o,e=20){return{"bottom-right":{button:{bottom:e,right:e},panel:{bottom:e+70,right:e}},"bottom-left":{button:{bottom:e,left:e},panel:{bottom:e+70,left:e}},"top-right":{button:{top:e,right:e},panel:{top:e+70,right:e}},"top-left":{button:{top:e,left:e},panel:{top:e+70,left:e}}}[o]}function L(o="light"){const e="glyde-widget-styles";if(document.getElementById(e))return;const r=document.createElement("style");r.id=e,r.textContent=`
226
+ `,Et={floatingButton:{position:"fixed",width:"60px",height:"60px",borderRadius:"50%",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",transition:"transform 0.2s, box-shadow 0.2s",zIndex:9999},widgetPanel:{position:"fixed",width:"380px",height:"600px",borderRadius:"16px",boxShadow:"0 10px 40px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",overflow:"hidden",zIndex:9998},card:{background:"var(--glyde-background)",borderRadius:"12px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",overflow:"hidden"},header:{padding:"16px 20px",borderBottom:"1px solid var(--glyde-border)",display:"flex",justifyContent:"space-between",alignItems:"center"},modeSelector:{display:"flex",gap:"8px",padding:"4px",background:"var(--glyde-surface)",borderRadius:"8px"},modeSelectorButton:{padding:"8px 16px",border:"none",borderRadius:"6px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,transition:"all 0.2s"},transcriptArea:{flex:1,overflowY:"auto",padding:"16px",background:"var(--glyde-surface)"},messageBubble:{maxWidth:"80%",padding:"10px 14px",borderRadius:"12px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},messageBubbleUser:{background:"var(--glyde-primary)",color:"var(--glyde-primary-text)",borderTopRightRadius:"4px"},messageBubbleAgent:{background:"var(--glyde-background)",color:"var(--glyde-text)",borderTopLeftRadius:"4px"},controlsArea:{padding:"16px",borderTop:"1px solid var(--glyde-border)",background:"var(--glyde-background)"},speakingIndicator:{display:"flex",alignItems:"center",gap:"6px",fontSize:"13px"},speakingDot:{width:"8px",height:"8px",borderRadius:"50%",transition:"background-color 0.2s"},primaryButton:{padding:"12px 24px",background:"var(--glyde-primary)",color:"var(--glyde-primary-text)",border:"none",borderRadius:"8px",fontSize:"15px",fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"background-color 0.2s, transform 0.1s"},secondaryButton:{padding:"10px 20px",background:"var(--glyde-surface)",color:"var(--glyde-text)",border:"1px solid var(--glyde-border)",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",transition:"background-color 0.2s"},dangerButton:{padding:"12px 24px",background:"var(--glyde-error)",color:"white",border:"none",borderRadius:"24px",fontSize:"15px",fontWeight:600,cursor:"pointer",display:"flex",alignItems:"center",gap:"8px",transition:"background-color 0.2s"},iconButton:{width:"44px",height:"44px",padding:"0",border:"none",borderRadius:"50%",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s"},inputField:{flex:1,padding:"12px 16px",borderRadius:"8px",border:"1px solid var(--glyde-border)",background:"var(--glyde-background)",color:"var(--glyde-text)",fontSize:"14px",outline:"none",transition:"border-color 0.2s"},statusBadge:{padding:"4px 10px",borderRadius:"20px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"4px"},statusBadgeLive:{background:"var(--glyde-success-light)",color:"var(--glyde-success-text)"},statusBadgeConnecting:{background:"var(--glyde-primary-light)",color:"var(--glyde-primary)"}};function wf(h,f=20){return{"bottom-right":{button:{bottom:f,right:f},panel:{bottom:f+70,right:f}},"bottom-left":{button:{bottom:f,left:f},panel:{bottom:f+70,left:f}},"top-right":{button:{top:f,right:f},panel:{top:f+70,right:f}},"top-left":{button:{top:f,left:f},panel:{top:f+70,left:f}}}[h]}function Ra(h="light"){const f="glyde-widget-styles";if(document.getElementById(f))return;const g=document.createElement("style");g.id=f,g.textContent=`
227
227
  :root {
228
- ${U(o)}
228
+ ${ti(h)}
229
229
  }
230
230
 
231
- ${N}
232
- `,document.head.appendChild(r)}function le(o){const r=document.getElementById("glyde-widget-styles");r?r.textContent=`
231
+ ${ei}
232
+ `,document.head.appendChild(g)}function sy(h){const g=document.getElementById("glyde-widget-styles");g?g.textContent=`
233
233
  :root {
234
- ${U(o)}
234
+ ${ti(h)}
235
235
  }
236
236
 
237
- ${N}
238
- `:L(o)}const O=({contextId:o,publishableKey:e,apiKey:r,authToken:i,unityApiUrl:s="https://api.glydeunity.com",contextType:n="screening",height:h="600px",onTranscript:f,onCallEnd:p,onError:u})=>{const m=l.useRef(null),{status:a,transcripts:g,isUserSpeaking:b,isAgentSpeaking:k,isMuted:v,errorMessage:y,start:w,stop:C,toggleMute:I,clearTranscripts:T}=H({publishableKey:e,apiKey:r,authToken:i,contextType:n,contextId:o,unityBaseUrl:s});l.useEffect(()=>{m.current?.scrollIntoView({behavior:"smooth"})},[g]),l.useEffect(()=>{if(f&&g.length>0){const S=g[g.length-1];f(S.content,S.role)}},[g,f]),l.useEffect(()=>{a==="error"&&y&&u&&u(new Error(y))},[a,y,u]);const d=()=>{switch(n){case"screening":return"Screening Interview";case"recruiter":return"Recruiter Copilot";case"custom":return"Custom Agent";case"phone":return"Phone Agent";default:return"Voice Interview"}},M=async()=>{T(),await w()},E=()=>{C(),p?.()};return t.jsxs("div",{style:{background:"var(--glyde-background, white)",borderRadius:"12px",boxShadow:"0 4px 6px rgba(0,0,0,0.1)",height:typeof h=="number"?`${h}px`:h,display:"flex",flexDirection:"column",overflow:"hidden"},children:[t.jsxs("div",{style:{padding:"16px 20px",borderBottom:"1px solid var(--glyde-border, #e5e7eb)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t.jsxs("div",{children:[t.jsx("h2",{style:{margin:0,fontSize:"1.1rem",fontWeight:600,color:"var(--glyde-text, #1f2937)"},children:d()}),t.jsx("small",{style:{color:"var(--glyde-text-secondary, #6b7280)",fontSize:"0.8rem"},children:i?"JWT Auth":e?"Publishable Key":"API Key"})]}),a==="active"&&t.jsxs("div",{style:{...x.statusBadge,...x.statusBadgeLive},children:[t.jsx(X,{size:14})," Live"]})]}),t.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:a==="idle"||a==="error"?t.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"40px"},children:[t.jsx("div",{style:{width:"100px",height:"100px",borderRadius:"50%",background:"var(--glyde-primary-light, #fdf4ff)",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"24px"},children:t.jsx(W,{size:48,color:"var(--glyde-primary, #c026d3)"})}),t.jsxs("h3",{style:{marginBottom:"8px",color:"var(--glyde-text, #1f2937)"},children:["Ready for ",d(),"?"]}),t.jsx("p",{style:{color:"var(--glyde-text-secondary, #666)",marginBottom:"24px",textAlign:"center",maxWidth:"280px"},children:n==="screening"?"The AI recruiter will speak with you. Make sure your microphone is ready.":n==="recruiter"?"The AI copilot will assist you with recruiting tasks.":"The AI agent will speak with you. Make sure your microphone is ready."}),t.jsxs("button",{onClick:M,style:{...x.primaryButton,padding:"14px 36px",borderRadius:"30px",boxShadow:"0 4px 12px rgba(192, 38, 211, 0.3)"},children:["Start ",n==="screening"?"Interview":"Call"]}),y&&t.jsx("p",{style:{color:"var(--glyde-error, #ef4444)",marginTop:"16px",fontSize:"0.9rem"},children:y})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"16px",background:"var(--glyde-surface, #f9fafb)"},children:[a==="connecting"&&t.jsxs("div",{style:{textAlign:"center",color:"var(--glyde-text-secondary, #6b7280)",padding:"40px"},children:[t.jsx("div",{className:"glyde-spinner",style:{margin:"0 auto 12px"}}),"Connecting to AI Agent..."]}),g.length===0&&a==="active"&&t.jsxs("div",{style:{textAlign:"center",color:"var(--glyde-text-muted, #9ca3af)",padding:"40px"},children:[t.jsx(j,{size:32,color:"var(--glyde-text-muted, #9ca3af)"}),t.jsx("p",{style:{marginTop:"8px"},children:"Start speaking - the AI will respond"})]}),g.map((S,$)=>t.jsx(de,{transcript:S,contextType:n},$)),t.jsx("div",{ref:m})]}),t.jsxs("div",{style:{padding:"16px",borderTop:"1px solid var(--glyde-border, #e5e7eb)",background:"var(--glyde-background, white)"},children:[t.jsx(ce,{isUserSpeaking:b,isAgentSpeaking:k}),t.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:"12px",marginTop:"16px"},children:[t.jsx("button",{onClick:I,style:{...x.iconButton,background:v?"var(--glyde-error-light, #fecaca)":"var(--glyde-secondary-light, #e0f2fe)"},title:v?"Unmute":"Mute",children:v?t.jsx(Z,{size:20,color:"var(--glyde-error, #dc2626)"}):t.jsx(W,{size:20,color:"var(--glyde-secondary, #0ea5e9)"})}),t.jsxs("button",{onClick:E,style:x.dangerButton,children:[t.jsx(K,{size:18,color:"white"})," End Call"]})]})]})]})}),t.jsx("style",{children:`
237
+ ${ei}
238
+ `:Ra(h)}const li=({contextId:h,publishableKey:f,apiKey:g,authToken:o,unityApiUrl:C="https://api.glydeunity.com",contextType:D="screening",height:Y="600px",onTranscript:w,onCallEnd:O,onError:x})=>{const G=K.useRef(null),{status:_,transcripts:B,isUserSpeaking:F,isAgentSpeaking:it,isMuted:I,errorMessage:$,start:rt,stop:Rt,toggleMute:bt,clearTranscripts:Ct}=Uf({publishableKey:f,apiKey:g,authToken:o,contextType:D,contextId:h,unityBaseUrl:C});K.useEffect(()=>{G.current?.scrollIntoView({behavior:"smooth"})},[B]),K.useEffect(()=>{if(w&&B.length>0){const ht=B[B.length-1];w(ht.content,ht.role)}},[B,w]),K.useEffect(()=>{_==="error"&&$&&x&&x(new Error($))},[_,$,x]);const L=()=>{switch(D){case"screening":return"Screening Interview";case"recruiter":return"Recruiter Copilot";case"custom":return"Custom Agent";case"phone":return"Phone Agent";default:return"Voice Interview"}},Mt=async()=>{Ct(),await rt()},Z=()=>{Rt(),O?.()};return b.jsxs("div",{style:{background:"var(--glyde-background, white)",borderRadius:"12px",boxShadow:"0 4px 6px rgba(0,0,0,0.1)",height:typeof Y=="number"?`${Y}px`:Y,display:"flex",flexDirection:"column",overflow:"hidden"},children:[b.jsxs("div",{style:{padding:"16px 20px",borderBottom:"1px solid var(--glyde-border, #e5e7eb)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[b.jsxs("div",{children:[b.jsx("h2",{style:{margin:0,fontSize:"1.1rem",fontWeight:600,color:"var(--glyde-text, #1f2937)"},children:L()}),b.jsx("small",{style:{color:"var(--glyde-text-secondary, #6b7280)",fontSize:"0.8rem"},children:o?"JWT Auth":f?"Publishable Key":"API Key"})]}),_==="active"&&b.jsxs("div",{style:{...Et.statusBadge,...Et.statusBadgeLive},children:[b.jsx(Gf,{size:14})," Live"]})]}),b.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:_==="idle"||_==="error"?b.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"40px"},children:[b.jsx("div",{style:{width:"100px",height:"100px",borderRadius:"50%",background:"var(--glyde-primary-light, #fdf4ff)",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"24px"},children:b.jsx(ja,{size:48,color:"var(--glyde-primary, #c026d3)"})}),b.jsxs("h3",{style:{marginBottom:"8px",color:"var(--glyde-text, #1f2937)"},children:["Ready for ",L(),"?"]}),b.jsx("p",{style:{color:"var(--glyde-text-secondary, #666)",marginBottom:"24px",textAlign:"center",maxWidth:"280px"},children:D==="screening"?"The AI recruiter will speak with you. Make sure your microphone is ready.":D==="recruiter"?"The AI copilot will assist you with recruiting tasks.":"The AI agent will speak with you. Make sure your microphone is ready."}),b.jsxs("button",{onClick:Mt,style:{...Et.primaryButton,padding:"14px 36px",borderRadius:"30px",boxShadow:"0 4px 12px rgba(192, 38, 211, 0.3)"},children:["Start ",D==="screening"?"Interview":"Call"]}),$&&b.jsx("p",{style:{color:"var(--glyde-error, #ef4444)",marginTop:"16px",fontSize:"0.9rem"},children:$})]}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"16px",background:"var(--glyde-surface, #f9fafb)"},children:[_==="connecting"&&b.jsxs("div",{style:{textAlign:"center",color:"var(--glyde-text-secondary, #6b7280)",padding:"40px"},children:[b.jsx("div",{className:"glyde-spinner",style:{margin:"0 auto 12px"}}),"Connecting to AI Agent..."]}),B.length===0&&_==="active"&&b.jsxs("div",{style:{textAlign:"center",color:"var(--glyde-text-muted, #9ca3af)",padding:"40px"},children:[b.jsx(Pu,{size:32,color:"var(--glyde-text-muted, #9ca3af)"}),b.jsx("p",{style:{marginTop:"8px"},children:"Start speaking - the AI will respond"})]}),B.map((ht,Wt)=>b.jsx(oy,{transcript:ht,contextType:D},Wt)),b.jsx("div",{ref:G})]}),b.jsxs("div",{style:{padding:"16px",borderTop:"1px solid var(--glyde-border, #e5e7eb)",background:"var(--glyde-background, white)"},children:[b.jsx(ry,{isUserSpeaking:F,isAgentSpeaking:it}),b.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:"12px",marginTop:"16px"},children:[b.jsx("button",{onClick:bt,style:{...Et.iconButton,background:I?"var(--glyde-error-light, #fecaca)":"var(--glyde-secondary-light, #e0f2fe)"},title:I?"Unmute":"Mute",children:I?b.jsx(Xf,{size:20,color:"var(--glyde-error, #dc2626)"}):b.jsx(ja,{size:20,color:"var(--glyde-secondary, #0ea5e9)"})}),b.jsxs("button",{onClick:Z,style:Et.dangerButton,children:[b.jsx(Nf,{size:18,color:"white"})," End Call"]})]})]})]})}),b.jsx("style",{children:`
239
239
  @keyframes glyde-pulse {
240
240
  0%, 100% { opacity: 1; transform: scale(1); }
241
241
  50% { opacity: 0.5; transform: scale(1.2); }
@@ -251,7 +251,7 @@ ${f}`),await this.initializeAudio();let p="wss://agent.deepgram.com/v1/agent/con
251
251
  @keyframes spin {
252
252
  to { transform: rotate(360deg); }
253
253
  }
254
- `})]})},de=({transcript:o,contextType:e})=>{const r=o.role==="user";return t.jsx("div",{style:{marginBottom:"12px",display:"flex",justifyContent:r?"flex-end":"flex-start"},children:t.jsxs("div",{style:{...x.messageBubble,...r?x.messageBubbleUser:x.messageBubbleAgent},children:[t.jsx("div",{style:{fontSize:"0.75rem",opacity:.7,marginBottom:"4px"},children:r?"You":e==="recruiter"?"AI Copilot":"AI Recruiter"}),o.content]})})},ce=({isUserSpeaking:o,isAgentSpeaking:e})=>t.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:"20px"},children:[t.jsxs("div",{style:{...x.speakingIndicator,color:o?"var(--glyde-primary, #c026d3)":"var(--glyde-text-muted, #9ca3af)"},children:[t.jsx("div",{style:{...x.speakingDot,background:o?"var(--glyde-primary, #c026d3)":"var(--glyde-border, #d1d5db)",animation:o?"glyde-pulse 1s infinite":"none"}}),"You"]}),t.jsxs("div",{style:{...x.speakingIndicator,color:e?"var(--glyde-success, #059669)":"var(--glyde-text-muted, #9ca3af)"},children:[t.jsx("div",{style:{...x.speakingDot,background:e?"var(--glyde-success, #059669)":"var(--glyde-border, #d1d5db)",animation:e?"glyde-pulse 1s infinite":"none"}}),"AI Agent"]})]}),_=({contextId:o,publishableKey:e,apiKey:r,authToken:i,unityApiUrl:s="https://api.glydeunity.com",height:n="600px",title:h="AI Chat",placeholder:f="Type your message...",autoInit:p=!0,onMessage:u,onError:m})=>{const[a,g]=l.useState(""),b=l.useRef(null),{status:k,messages:v,isLoading:y,errorMessage:w,sendMessage:C}=F({publishableKey:e,apiKey:r,authToken:i,contextId:o,unityBaseUrl:s,autoInit:p});l.useEffect(()=>{b.current?.scrollIntoView({behavior:"smooth"})},[v]),l.useEffect(()=>{k==="error"&&w&&m&&m(new Error(w))},[k,w,m]);const I=async()=>{if(!a.trim()||y)return;const d=a.trim();g(""),await C(d),u&&u({role:"user",content:d})},T=d=>{d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),I())};return t.jsxs("div",{style:{background:"var(--glyde-background, white)",borderRadius:"12px",boxShadow:"0 4px 6px rgba(0,0,0,0.1)",height:typeof n=="number"?`${n}px`:n,display:"flex",flexDirection:"column",overflow:"hidden"},children:[t.jsx("div",{style:{padding:"16px 20px",borderBottom:"1px solid var(--glyde-border, #eee)",background:"var(--glyde-secondary, #0284c7)",color:"white",borderTopLeftRadius:"12px",borderTopRightRadius:"12px"},children:t.jsx("h2",{style:{margin:0,fontSize:"1.1rem",fontWeight:600},children:h})}),t.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"20px",display:"flex",flexDirection:"column",gap:"15px",background:"var(--glyde-background, white)"},children:[k==="loading"&&v.length===0&&t.jsxs("div",{style:{textAlign:"center",color:"var(--glyde-text-muted, #94a3b8)",padding:"20px"},children:[t.jsx("div",{className:"glyde-spinner",style:{margin:"0 auto 12px"}}),"Loading conversation..."]}),v.map((d,M)=>t.jsx(he,{message:d},M)),y&&t.jsx("div",{style:{color:"var(--glyde-text-muted, #94a3b8)",fontSize:"0.9rem",marginLeft:"42px"},children:t.jsx(pe,{})}),t.jsx("div",{ref:b})]}),t.jsxs("div",{style:{padding:"16px 20px",borderTop:"1px solid var(--glyde-border, #eee)"},children:[w&&t.jsx("p",{style:{color:"var(--glyde-error, #ef4444)",fontSize:"0.85rem",marginBottom:"10px"},children:w}),t.jsxs("div",{style:{display:"flex",gap:"10px"},children:[t.jsx("input",{type:"text",value:a,onChange:d=>g(d.target.value),onKeyDown:T,placeholder:f,style:{...x.inputField,flex:1},disabled:y}),t.jsx("button",{onClick:I,disabled:y||!a.trim(),style:{...x.iconButton,background:"var(--glyde-secondary, #0284c7)",width:"48px",height:"48px",opacity:y||!a.trim()?.5:1,cursor:y||!a.trim()?"not-allowed":"pointer"},children:t.jsx(J,{size:20,color:"white"})})]})]}),t.jsx("style",{children:`
254
+ `})]})},oy=({transcript:h,contextType:f})=>{const g=h.role==="user";return b.jsx("div",{style:{marginBottom:"12px",display:"flex",justifyContent:g?"flex-end":"flex-start"},children:b.jsxs("div",{style:{...Et.messageBubble,...g?Et.messageBubbleUser:Et.messageBubbleAgent},children:[b.jsx("div",{style:{fontSize:"0.75rem",opacity:.7,marginBottom:"4px"},children:g?"You":f==="recruiter"?"AI Copilot":"AI Recruiter"}),h.content]})})},ry=({isUserSpeaking:h,isAgentSpeaking:f})=>b.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:"20px"},children:[b.jsxs("div",{style:{...Et.speakingIndicator,color:h?"var(--glyde-primary, #c026d3)":"var(--glyde-text-muted, #9ca3af)"},children:[b.jsx("div",{style:{...Et.speakingDot,background:h?"var(--glyde-primary, #c026d3)":"var(--glyde-border, #d1d5db)",animation:h?"glyde-pulse 1s infinite":"none"}}),"You"]}),b.jsxs("div",{style:{...Et.speakingIndicator,color:f?"var(--glyde-success, #059669)":"var(--glyde-text-muted, #9ca3af)"},children:[b.jsx("div",{style:{...Et.speakingDot,background:f?"var(--glyde-success, #059669)":"var(--glyde-border, #d1d5db)",animation:f?"glyde-pulse 1s infinite":"none"}}),"AI Agent"]})]}),ai=({contextId:h,publishableKey:f,apiKey:g,authToken:o,unityApiUrl:C="https://api.glydeunity.com",height:D="600px",title:Y="AI Chat",placeholder:w="Type your message...",autoInit:O=!0,onMessage:x,onError:G})=>{const[_,B]=K.useState(""),F=K.useRef(null),{status:it,messages:I,isLoading:$,errorMessage:rt,sendMessage:Rt}=jf({publishableKey:f,apiKey:g,authToken:o,contextId:h,unityBaseUrl:C,autoInit:O});K.useEffect(()=>{F.current?.scrollIntoView({behavior:"smooth"})},[I]),K.useEffect(()=>{it==="error"&&rt&&G&&G(new Error(rt))},[it,rt,G]);const bt=async()=>{if(!_.trim()||$)return;const L=_.trim();B(""),await Rt(L),x&&x({role:"user",content:L})},Ct=L=>{L.key==="Enter"&&!L.shiftKey&&(L.preventDefault(),bt())};return b.jsxs("div",{style:{background:"var(--glyde-background, white)",borderRadius:"12px",boxShadow:"0 4px 6px rgba(0,0,0,0.1)",height:typeof D=="number"?`${D}px`:D,display:"flex",flexDirection:"column",overflow:"hidden"},children:[b.jsx("div",{style:{padding:"16px 20px",borderBottom:"1px solid var(--glyde-border, #eee)",background:"var(--glyde-secondary, #0284c7)",color:"white",borderTopLeftRadius:"12px",borderTopRightRadius:"12px"},children:b.jsx("h2",{style:{margin:0,fontSize:"1.1rem",fontWeight:600},children:Y})}),b.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"20px",display:"flex",flexDirection:"column",gap:"15px",background:"var(--glyde-background, white)"},children:[it==="loading"&&I.length===0&&b.jsxs("div",{style:{textAlign:"center",color:"var(--glyde-text-muted, #94a3b8)",padding:"20px"},children:[b.jsx("div",{className:"glyde-spinner",style:{margin:"0 auto 12px"}}),"Loading conversation..."]}),I.map((L,Mt)=>b.jsx(dy,{message:L},Mt)),$&&b.jsx("div",{style:{color:"var(--glyde-text-muted, #94a3b8)",fontSize:"0.9rem",marginLeft:"42px"},children:b.jsx(yy,{})}),b.jsx("div",{ref:F})]}),b.jsxs("div",{style:{padding:"16px 20px",borderTop:"1px solid var(--glyde-border, #eee)"},children:[rt&&b.jsx("p",{style:{color:"var(--glyde-error, #ef4444)",fontSize:"0.85rem",marginBottom:"10px"},children:rt}),b.jsxs("div",{style:{display:"flex",gap:"10px"},children:[b.jsx("input",{type:"text",value:_,onChange:L=>B(L.target.value),onKeyDown:Ct,placeholder:w,style:{...Et.inputField,flex:1},disabled:$}),b.jsx("button",{onClick:bt,disabled:$||!_.trim(),style:{...Et.iconButton,background:"var(--glyde-secondary, #0284c7)",width:"48px",height:"48px",opacity:$||!_.trim()?.5:1,cursor:$||!_.trim()?"not-allowed":"pointer"},children:b.jsx(Bf,{size:20,color:"white"})})]})]}),b.jsx("style",{children:`
255
255
  .glyde-spinner {
256
256
  width: 24px;
257
257
  height: 24px;
@@ -267,5 +267,13 @@ ${f}`),await this.initializeAudio();let p="wss://agent.deepgram.com/v1/agent/con
267
267
  0%, 60%, 100% { opacity: 0.3; }
268
268
  30% { opacity: 1; }
269
269
  }
270
- `})]})},he=({message:o})=>{const e=o.role==="user";return t.jsxs("div",{style:{display:"flex",gap:"10px",flexDirection:e?"row-reverse":"row",alignItems:"flex-start"},children:[t.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"50%",background:e?"var(--glyde-primary-light, #e0e7ff)":"var(--glyde-secondary-light, #f0f9ff)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e?t.jsx(q,{size:18,color:"var(--glyde-primary, #4338ca)"}):t.jsx(Y,{size:18,color:"var(--glyde-secondary, #0284c7)"})}),t.jsx("div",{style:{padding:"12px 16px",borderRadius:"12px",background:e?"var(--glyde-primary, #4338ca)":"var(--glyde-surface, #f1f5f9)",color:e?"white":"var(--glyde-text, #1e293b)",maxWidth:"70%",borderTopRightRadius:e?"4px":"12px",borderTopLeftRadius:e?"12px":"4px",lineHeight:1.5},children:o.content})]})},pe=()=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[t.jsx("span",{children:"Typing"}),t.jsx("span",{style:{display:"flex",gap:"2px"},children:[0,1,2].map(o=>t.jsx("span",{style:{width:"4px",height:"4px",borderRadius:"50%",background:"var(--glyde-text-muted, #94a3b8)",animation:"typing-dot 1.4s infinite",animationDelay:`${o*.2}s`}},o))})]}),z=({publishableKey:o,apiKey:e,authToken:r,contextId:i,unityBaseUrl:s="https://api.glydeunity.com",contextType:n="screening",defaultMode:h="voice",position:f="bottom-right",theme:p="light",allowModeSwitch:u=!0,container:m,onReady:a,onModeChange:g,onTranscript:b,onError:k,initialExpanded:v=!1})=>{const[y,w]=l.useState(v),[C,I]=l.useState(h);l.useEffect(()=>{const S=p==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":p;L(S)},[p]),l.useEffect(()=>{a?.()},[a]);const T=te(f),d=S=>{I(S),g?.(S)},M=(S,$)=>{b?.(S,$)},E=S=>{k?.(S)};return m?t.jsx(ge,{publishableKey:o,apiKey:e,authToken:r,contextId:i,unityBaseUrl:s,contextType:n,mode:C,allowModeSwitch:u,onModeChange:d,onTranscript:M,onError:E}):t.jsxs("div",{className:"glyde-widget-root",children:[!y&&t.jsx("button",{onClick:()=>w(!0),style:{...x.floatingButton,...T.button,background:"linear-gradient(135deg, var(--glyde-primary, #c026d3) 0%, var(--glyde-secondary, #7c3aed) 100%)"},"aria-label":"Open chat",children:t.jsx(W,{size:28,color:"white"})}),y&&t.jsxs("div",{style:{...x.widgetPanel,...T.panel,background:"var(--glyde-background, white)"},className:"glyde-slide-up",children:[t.jsxs("div",{style:{...x.header,background:"linear-gradient(135deg, var(--glyde-primary, #c026d3) 0%, var(--glyde-secondary, #7c3aed) 100%)",color:"white",borderTopLeftRadius:"16px",borderTopRightRadius:"16px"},children:[t.jsxs("div",{children:[t.jsx("h3",{style:{margin:0,fontSize:"1rem",fontWeight:600},children:"GLYDE Assistant"}),t.jsx("small",{style:{opacity:.8,fontSize:"0.75rem"},children:n==="screening"?"Candidate Screening":"AI Assistant"})]}),t.jsxs("div",{style:{display:"flex",gap:"8px"},children:[t.jsx("button",{onClick:()=>w(!1),style:{...x.iconButton,background:"rgba(255,255,255,0.2)",width:"32px",height:"32px"},"aria-label":"Minimize",children:t.jsx(R,{size:16,color:"white"})}),t.jsx("button",{onClick:()=>w(!1),style:{...x.iconButton,background:"rgba(255,255,255,0.2)",width:"32px",height:"32px"},"aria-label":"Close",children:t.jsx(Q,{size:16,color:"white"})})]})]}),u&&t.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--glyde-border, #e5e7eb)"},children:t.jsx(re,{mode:C,onModeChange:d})}),t.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:C==="voice"?t.jsx(O,{publishableKey:o,apiKey:e,authToken:r,contextId:i||"",unityApiUrl:s,contextType:n,height:"100%",onTranscript:M,onError:E}):t.jsx(_,{publishableKey:o,apiKey:e,authToken:r,contextId:i||"",unityApiUrl:s,height:"100%",title:"Text Chat",onError:E})})]})]})},re=({mode:o,onModeChange:e})=>t.jsxs("div",{style:x.modeSelector,children:[t.jsxs("button",{onClick:()=>e("voice"),style:{...x.modeSelectorButton,background:o==="voice"?"var(--glyde-primary, #c026d3)":"transparent",color:o==="voice"?"white":"var(--glyde-text, #1f2937)"},children:[t.jsx(W,{size:16})," Voice"]}),t.jsxs("button",{onClick:()=>e("text"),style:{...x.modeSelectorButton,background:o==="text"?"var(--glyde-secondary, #0284c7)":"transparent",color:o==="text"?"white":"var(--glyde-text, #1f2937)"},children:[t.jsx(j,{size:16})," Text"]})]}),ge=({publishableKey:o,apiKey:e,authToken:r,contextId:i,unityBaseUrl:s,contextType:n,mode:h,allowModeSwitch:f,onModeChange:p,onTranscript:u,onError:m})=>{const[a,g]=l.useState(h),b=k=>{g(k),p(k)};return t.jsxs("div",{className:"glyde-widget-root",style:{height:"100%",display:"flex",flexDirection:"column"},children:[f&&t.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--glyde-border, #e5e7eb)",background:"var(--glyde-background, white)"},children:t.jsx(re,{mode:a,onModeChange:b})}),t.jsx("div",{style:{flex:1,overflow:"hidden"},children:a==="voice"?t.jsx(O,{publishableKey:o,apiKey:e,authToken:r,contextId:i||"",unityApiUrl:s,contextType:n,height:"100%",onTranscript:u,onError:m}):t.jsx(_,{publishableKey:o,apiKey:e,authToken:r,contextId:i||"",unityApiUrl:s,height:"100%",title:"Text Chat",onError:m})})]})};let A=null,B=null;const P={init(o){if(!o.publishableKey&&!o.apiKey&&!o.authToken)return console.error("[GlydeChat] Authentication required: provide publishableKey, apiKey, or authToken"),null;const e=o.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":o.theme||"light";L(e),A&&B&&(A.unmount(),B.remove(),A=null,B=null);const r=document.createElement("div");r.id="glyde-chat-widget",r.className="glyde-widget-root",document.body.appendChild(r),B=r;const i=V.createRoot(r);return A=i,i.render(l.createElement(z,{...o,initialExpanded:!1})),console.log("[GlydeChat] Widget initialized"),{destroy(){A&&B&&(A.unmount(),B.remove(),A=null,B=null,console.log("[GlydeChat] Widget destroyed"))},update(s){A&&A.render(l.createElement(z,{...o,...s}))}}},render(o,e){const r=typeof o=="string"?document.querySelector(o):o;if(!r)return console.error("[GlydeChat] Container not found:",o),null;const i=e.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e.theme||"light";L(i);const s=V.createRoot(r);return s.render(l.createElement(z,{...e,container:r})),{destroy(){s.unmount()},update(n){s.render(l.createElement(z,{...e,...n,container:r}))}}},isReady(){return!0},get version(){return"__SDK_VERSION__"}};function ue(){const o=document.querySelectorAll('script[src*="glyde-chat"]'),e=o[o.length-1];if(!e){console.log("[GlydeChat] No script tag found for auto-init");return}const r=e.getAttribute("data-auto-init");if(r==="false"){console.log('[GlydeChat] Auto-init disabled via data-auto-init="false"');return}const i=e.getAttribute("data-publishable-key")||void 0,s=e.getAttribute("data-api-key")||void 0,n=e.getAttribute("data-auth-token")||void 0,h=i||s||n;if(!h&&!(r==="true")){console.log("[GlydeChat] Auto-init skipped: no authentication data attributes found. Call GlydeChat.init() manually.");return}if(!h){console.warn("[GlydeChat] Auto-init skipped: no authentication provided (publishableKey, apiKey, or authToken required)");return}const p={publishableKey:i,apiKey:s,authToken:n,contextId:e.getAttribute("data-context-id")||void 0,unityBaseUrl:e.getAttribute("data-unity-url")||"https://api.glydeunity.com",contextType:e.getAttribute("data-context-type")||"screening",defaultMode:e.getAttribute("data-default-mode")||"voice",position:e.getAttribute("data-position")||"bottom-right",theme:e.getAttribute("data-theme")||"light",allowModeSwitch:e.getAttribute("data-allow-mode-switch")!=="false"};console.log("[GlydeChat] Auto-initializing with config:",{hasPublishableKey:!!p.publishableKey,hasApiKey:!!p.apiKey,hasAuthToken:!!p.authToken,contextId:p.contextId,defaultMode:p.defaultMode,position:p.position,theme:p.theme}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>P.init(p)):P.init(p)}typeof window<"u"&&(window.GlydeChat=P,ue()),c.ActivityIcon=X,c.BotIcon=Y,c.ChatWidget=z,c.GlydeChat=P,c.GlydeText=G,c.GlydeVoice=D,c.LoaderIcon=ae,c.MessageIcon=j,c.MicIcon=W,c.MicOffIcon=se,c.MinimizeIcon=R,c.PhoneIcon=ne,c.PhoneOffIcon=K,c.SendIcon=J,c.TextChat=_,c.UserIcon=q,c.VoiceChat=O,c.VolumeXIcon=Z,c.XIcon=Q,c.componentStyles=x,c.getPositionStyles=te,c.getThemeCSSVariables=U,c.globalStyles=N,c.injectGlobalStyles=L,c.themeColors=ee,c.updateTheme=le,c.useTextChat=F,c.useVoiceAgent=H,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})}));
270
+ `})]})},dy=({message:h})=>{const f=h.role==="user";return b.jsxs("div",{style:{display:"flex",gap:"10px",flexDirection:f?"row-reverse":"row",alignItems:"flex-start"},children:[b.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"50%",background:f?"var(--glyde-primary-light, #e0e7ff)":"var(--glyde-secondary-light, #f0f9ff)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:f?b.jsx(qf,{size:18,color:"var(--glyde-primary, #4338ca)"}):b.jsx(Yf,{size:18,color:"var(--glyde-secondary, #0284c7)"})}),b.jsx("div",{style:{padding:"12px 16px",borderRadius:"12px",background:f?"var(--glyde-primary, #4338ca)":"var(--glyde-surface, #f1f5f9)",color:f?"white":"var(--glyde-text, #1e293b)",maxWidth:"70%",borderTopRightRadius:f?"4px":"12px",borderTopLeftRadius:f?"12px":"4px",lineHeight:1.5},children:h.content})]})},yy=()=>b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[b.jsx("span",{children:"Typing"}),b.jsx("span",{style:{display:"flex",gap:"2px"},children:[0,1,2].map(h=>b.jsx("span",{style:{width:"4px",height:"4px",borderRadius:"50%",background:"var(--glyde-text-muted, #94a3b8)",animation:"typing-dot 1.4s infinite",animationDelay:`${h*.2}s`}},h))})]}),Ha=({publishableKey:h,apiKey:f,authToken:g,contextId:o,unityBaseUrl:C="https://api.glydeunity.com",contextType:D="screening",defaultMode:Y="voice",position:w="bottom-right",theme:O="light",allowModeSwitch:x=!0,container:G,onReady:_,onModeChange:B,onTranscript:F,onError:it,initialExpanded:I=!1})=>{const[$,rt]=K.useState(I),[Rt,bt]=K.useState(Y);K.useEffect(()=>{const ht=O==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":O;Ra(ht)},[O]),K.useEffect(()=>{_?.()},[_]);const Ct=wf(w),L=ht=>{bt(ht),B?.(ht)},Mt=(ht,Wt)=>{F?.(ht,Wt)},Z=ht=>{it?.(ht)};return G?b.jsx(hy,{publishableKey:h,apiKey:f,authToken:g,contextId:o,unityBaseUrl:C,contextType:D,mode:Rt,allowModeSwitch:x,onModeChange:L,onTranscript:Mt,onError:Z}):b.jsxs("div",{className:"glyde-widget-root",children:[!$&&b.jsx("button",{onClick:()=>rt(!0),style:{...Et.floatingButton,...Ct.button,background:"linear-gradient(135deg, var(--glyde-primary, #c026d3) 0%, var(--glyde-secondary, #7c3aed) 100%)"},"aria-label":"Open chat",children:b.jsx(ja,{size:28,color:"white"})}),$&&b.jsxs("div",{style:{...Et.widgetPanel,...Ct.panel,background:"var(--glyde-background, white)"},className:"glyde-slide-up",children:[b.jsxs("div",{style:{...Et.header,background:"linear-gradient(135deg, var(--glyde-primary, #c026d3) 0%, var(--glyde-secondary, #7c3aed) 100%)",color:"white",borderTopLeftRadius:"16px",borderTopRightRadius:"16px"},children:[b.jsxs("div",{children:[b.jsx("h3",{style:{margin:0,fontSize:"1rem",fontWeight:600},children:"GLYDE Assistant"}),b.jsx("small",{style:{opacity:.8,fontSize:"0.75rem"},children:D==="screening"?"Candidate Screening":"AI Assistant"})]}),b.jsxs("div",{style:{display:"flex",gap:"8px"},children:[b.jsx("button",{onClick:()=>rt(!1),style:{...Et.iconButton,background:"rgba(255,255,255,0.2)",width:"32px",height:"32px"},"aria-label":"Minimize",children:b.jsx(Qf,{size:16,color:"white"})}),b.jsx("button",{onClick:()=>rt(!1),style:{...Et.iconButton,background:"rgba(255,255,255,0.2)",width:"32px",height:"32px"},"aria-label":"Close",children:b.jsx(Lf,{size:16,color:"white"})})]})]}),x&&b.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--glyde-border, #e5e7eb)"},children:b.jsx(Zf,{mode:Rt,onModeChange:L})}),b.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:Rt==="voice"?b.jsx(li,{publishableKey:h,apiKey:f,authToken:g,contextId:o||"",unityApiUrl:C,contextType:D,height:"100%",onTranscript:Mt,onError:Z}):b.jsx(ai,{publishableKey:h,apiKey:f,authToken:g,contextId:o||"",unityApiUrl:C,height:"100%",title:"Text Chat",onError:Z})})]})]})},Zf=({mode:h,onModeChange:f})=>b.jsxs("div",{style:Et.modeSelector,children:[b.jsxs("button",{onClick:()=>f("voice"),style:{...Et.modeSelectorButton,background:h==="voice"?"var(--glyde-primary, #c026d3)":"transparent",color:h==="voice"?"white":"var(--glyde-text, #1f2937)"},children:[b.jsx(ja,{size:16})," Voice"]}),b.jsxs("button",{onClick:()=>f("text"),style:{...Et.modeSelectorButton,background:h==="text"?"var(--glyde-secondary, #0284c7)":"transparent",color:h==="text"?"white":"var(--glyde-text, #1f2937)"},children:[b.jsx(Pu,{size:16})," Text"]})]}),hy=({publishableKey:h,apiKey:f,authToken:g,contextId:o,unityBaseUrl:C,contextType:D,mode:Y,allowModeSwitch:w,onModeChange:O,onTranscript:x,onError:G})=>{const[_,B]=K.useState(Y),F=it=>{B(it),O(it)};return b.jsxs("div",{className:"glyde-widget-root",style:{height:"100%",display:"flex",flexDirection:"column"},children:[w&&b.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--glyde-border, #e5e7eb)",background:"var(--glyde-background, white)"},children:b.jsx(Zf,{mode:_,onModeChange:F})}),b.jsx("div",{style:{flex:1,overflow:"hidden"},children:_==="voice"?b.jsx(li,{publishableKey:h,apiKey:f,authToken:g,contextId:o||"",unityApiUrl:C,contextType:D,height:"100%",onTranscript:x,onError:G}):b.jsx(ai,{publishableKey:h,apiKey:f,authToken:g,contextId:o||"",unityApiUrl:C,height:"100%",title:"Text Chat",onError:G})})]})};var ni={exports:{}},Na={},ui={exports:{}},ii={};var Kf;function gy(){return Kf||(Kf=1,(function(h){function f(A,U){var Q=A.length;A.push(U);t:for(;0<Q;){var gt=Q-1>>>1,St=A[gt];if(0<C(St,U))A[gt]=U,A[Q]=St,Q=gt;else break t}}function g(A){return A.length===0?null:A[0]}function o(A){if(A.length===0)return null;var U=A[0],Q=A.pop();if(Q!==U){A[0]=Q;t:for(var gt=0,St=A.length,d=St>>>1;gt<d;){var M=2*(gt+1)-1,j=A[M],H=M+1,J=A[H];if(0>C(j,Q))H<St&&0>C(J,j)?(A[gt]=J,A[H]=Q,gt=H):(A[gt]=j,A[M]=Q,gt=M);else if(H<St&&0>C(J,Q))A[gt]=J,A[H]=Q,gt=H;else break t}}return U}function C(A,U){var Q=A.sortIndex-U.sortIndex;return Q!==0?Q:A.id-U.id}if(h.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var D=performance;h.unstable_now=function(){return D.now()}}else{var Y=Date,w=Y.now();h.unstable_now=function(){return Y.now()-w}}var O=[],x=[],G=1,_=null,B=3,F=!1,it=!1,I=!1,$=!1,rt=typeof setTimeout=="function"?setTimeout:null,Rt=typeof clearTimeout=="function"?clearTimeout:null,bt=typeof setImmediate<"u"?setImmediate:null;function Ct(A){for(var U=g(x);U!==null;){if(U.callback===null)o(x);else if(U.startTime<=A)o(x),U.sortIndex=U.expirationTime,f(O,U);else break;U=g(x)}}function L(A){if(I=!1,Ct(A),!it)if(g(O)!==null)it=!0,Mt||(Mt=!0,$t());else{var U=g(x);U!==null&&ze(L,U.startTime-A)}}var Mt=!1,Z=-1,ht=5,Wt=-1;function Zl(){return $?!0:!(h.unstable_now()-Wt<ht)}function Oe(){if($=!1,Mt){var A=h.unstable_now();Wt=A;var U=!0;try{t:{it=!1,I&&(I=!1,Rt(Z),Z=-1),F=!0;var Q=B;try{e:{for(Ct(A),_=g(O);_!==null&&!(_.expirationTime>A&&Zl());){var gt=_.callback;if(typeof gt=="function"){_.callback=null,B=_.priorityLevel;var St=gt(_.expirationTime<=A);if(A=h.unstable_now(),typeof St=="function"){_.callback=St,Ct(A),U=!0;break e}_===g(O)&&o(O),Ct(A)}else o(O);_=g(O)}if(_!==null)U=!0;else{var d=g(x);d!==null&&ze(L,d.startTime-A),U=!1}}break t}finally{_=null,B=Q,F=!1}U=void 0}}finally{U?$t():Mt=!1}}}var $t;if(typeof bt=="function")$t=function(){bt(Oe)};else if(typeof MessageChannel<"u"){var El=new MessageChannel,He=El.port2;El.port1.onmessage=Oe,$t=function(){He.postMessage(null)}}else $t=function(){rt(Oe,0)};function ze(A,U){Z=rt(function(){A(h.unstable_now())},U)}h.unstable_IdlePriority=5,h.unstable_ImmediatePriority=1,h.unstable_LowPriority=4,h.unstable_NormalPriority=3,h.unstable_Profiling=null,h.unstable_UserBlockingPriority=2,h.unstable_cancelCallback=function(A){A.callback=null},h.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ht=0<A?Math.floor(1e3/A):5},h.unstable_getCurrentPriorityLevel=function(){return B},h.unstable_next=function(A){switch(B){case 1:case 2:case 3:var U=3;break;default:U=B}var Q=B;B=U;try{return A()}finally{B=Q}},h.unstable_requestPaint=function(){$=!0},h.unstable_runWithPriority=function(A,U){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var Q=B;B=A;try{return U()}finally{B=Q}},h.unstable_scheduleCallback=function(A,U,Q){var gt=h.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?gt+Q:gt):Q=gt,A){case 1:var St=-1;break;case 2:St=250;break;case 5:St=1073741823;break;case 4:St=1e4;break;default:St=5e3}return St=Q+St,A={id:G++,callback:U,priorityLevel:A,startTime:Q,expirationTime:St,sortIndex:-1},Q>gt?(A.sortIndex=Q,f(x,A),g(O)===null&&A===g(x)&&(I?(Rt(Z),Z=-1):I=!0,ze(L,Q-gt))):(A.sortIndex=St,f(O,A),it||F||(it=!0,Mt||(Mt=!0,$t()))),A},h.unstable_shouldYield=Zl,h.unstable_wrapCallback=function(A){var U=B;return function(){var Q=B;B=U;try{return A.apply(this,arguments)}finally{B=Q}}}})(ii)),ii}var Jf;function my(){return Jf||(Jf=1,ui.exports=gy()),ui.exports}var ci={exports:{}},Kt={};var kf;function vy(){if(kf)return Kt;kf=1;var h=Fu();function f(O){var x="https://react.dev/errors/"+O;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var G=2;G<arguments.length;G++)x+="&args[]="+encodeURIComponent(arguments[G])}return"Minified React error #"+O+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function g(){}var o={d:{f:g,r:function(){throw Error(f(522))},D:g,C:g,L:g,m:g,X:g,S:g,M:g},p:0,findDOMNode:null},C=Symbol.for("react.portal");function D(O,x,G){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:C,key:_==null?null:""+_,children:O,containerInfo:x,implementation:G}}var Y=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function w(O,x){if(O==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Kt.createPortal=function(O,x){var G=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(f(299));return D(O,x,null,G)},Kt.flushSync=function(O){var x=Y.T,G=o.p;try{if(Y.T=null,o.p=2,O)return O()}finally{Y.T=x,o.p=G,o.d.f()}},Kt.preconnect=function(O,x){typeof O=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(O,x))},Kt.prefetchDNS=function(O){typeof O=="string"&&o.d.D(O)},Kt.preinit=function(O,x){if(typeof O=="string"&&x&&typeof x.as=="string"){var G=x.as,_=w(G,x.crossOrigin),B=typeof x.integrity=="string"?x.integrity:void 0,F=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;G==="style"?o.d.S(O,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:_,integrity:B,fetchPriority:F}):G==="script"&&o.d.X(O,{crossOrigin:_,integrity:B,fetchPriority:F,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Kt.preinitModule=function(O,x){if(typeof O=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var G=w(x.as,x.crossOrigin);o.d.M(O,{crossOrigin:G,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(O)},Kt.preload=function(O,x){if(typeof O=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var G=x.as,_=w(G,x.crossOrigin);o.d.L(O,G,{crossOrigin:_,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},Kt.preloadModule=function(O,x){if(typeof O=="string")if(x){var G=w(x.as,x.crossOrigin);o.d.m(O,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:G,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(O)},Kt.requestFormReset=function(O){o.d.r(O)},Kt.unstable_batchedUpdates=function(O,x){return O(x)},Kt.useFormState=function(O,x,G){return Y.H.useFormState(O,x,G)},Kt.useFormStatus=function(){return Y.H.useHostTransitionStatus()},Kt.version="19.2.4",Kt}var Wf;function py(){if(Wf)return ci.exports;Wf=1;function h(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(h)}catch(f){console.error(f)}}return h(),ci.exports=vy(),ci.exports}var $f;function by(){if($f)return Na;$f=1;var h=my(),f=Fu(),g=py();function o(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function C(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function D(t){var e=t,l=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(l=e.return),t=e.return;while(t)}return e.tag===3?l:null}function Y(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function w(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function O(t){if(D(t)!==t)throw Error(o(188))}function x(t){var e=t.alternate;if(!e){if(e=D(t),e===null)throw Error(o(188));return e!==t?null:t}for(var l=t,a=e;;){var n=l.return;if(n===null)break;var u=n.alternate;if(u===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===l)return O(n),t;if(u===a)return O(n),e;u=u.sibling}throw Error(o(188))}if(l.return!==a.return)l=n,a=u;else{for(var i=!1,c=n.child;c;){if(c===l){i=!0,l=n,a=u;break}if(c===a){i=!0,a=n,l=u;break}c=c.sibling}if(!i){for(c=u.child;c;){if(c===l){i=!0,l=u,a=n;break}if(c===a){i=!0,a=u,l=n;break}c=c.sibling}if(!i)throw Error(o(189))}}if(l.alternate!==a)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?t:e}function G(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=G(t),e!==null)return e;t=t.sibling}return null}var _=Object.assign,B=Symbol.for("react.element"),F=Symbol.for("react.transitional.element"),it=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),rt=Symbol.for("react.profiler"),Rt=Symbol.for("react.consumer"),bt=Symbol.for("react.context"),Ct=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),Mt=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),ht=Symbol.for("react.lazy"),Wt=Symbol.for("react.activity"),Zl=Symbol.for("react.memo_cache_sentinel"),Oe=Symbol.iterator;function $t(t){return t===null||typeof t!="object"?null:(t=Oe&&t[Oe]||t["@@iterator"],typeof t=="function"?t:null)}var El=Symbol.for("react.client.reference");function He(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===El?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case I:return"Fragment";case rt:return"Profiler";case $:return"StrictMode";case L:return"Suspense";case Mt:return"SuspenseList";case Wt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case it:return"Portal";case bt:return t.displayName||"Context";case Rt:return(t._context.displayName||"Context")+".Consumer";case Ct:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Z:return e=t.displayName||null,e!==null?e:He(t.type)||"Memo";case ht:e=t._payload,t=t._init;try{return He(t(e))}catch{}}return null}var ze=Array.isArray,A=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=g.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},gt=[],St=-1;function d(t){return{current:t}}function M(t){0>St||(t.current=gt[St],gt[St]=null,St--)}function j(t,e){St++,gt[St]=t.current,t.current=e}var H=d(null),J=d(null),P=d(null),ot=d(null);function Jt(t,e){switch(j(P,e),j(J,t),j(H,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?zd(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=zd(e),t=Ed(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}M(H),j(H,t)}function Dt(){M(H),M(J),M(P)}function Ba(t){t.memoizedState!==null&&j(ot,t);var e=H.current,l=Ed(e,t.type);e!==l&&(j(J,t),j(H,l))}function jn(t){J.current===t&&(M(H),M(J)),ot.current===t&&(M(ot),Mn._currentValue=Q)}var fi,Pf;function Ml(t){if(fi===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);fi=e&&e[1]||"",Pf=-1<l.stack.indexOf(`
271
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
272
+ `+fi+t+Pf}var si=!1;function oi(t,e){if(!t||si)return"";si=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(e){var E=function(){throw Error()};if(Object.defineProperty(E.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(E,[])}catch(S){var p=S}Reflect.construct(t,[],E)}else{try{E.call()}catch(S){p=S}t.call(E.prototype)}}else{try{throw Error()}catch(S){p=S}(E=t())&&typeof E.catch=="function"&&E.catch(function(){})}}catch(S){if(S&&p&&typeof S.stack=="string")return[S.stack,p.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),i=u[0],c=u[1];if(i&&c){var s=i.split(`
273
+ `),v=c.split(`
274
+ `);for(n=a=0;a<s.length&&!s[a].includes("DetermineComponentFrameRoot");)a++;for(;n<v.length&&!v[n].includes("DetermineComponentFrameRoot");)n++;if(a===s.length||n===v.length)for(a=s.length-1,n=v.length-1;1<=a&&0<=n&&s[a]!==v[n];)n--;for(;1<=a&&0<=n;a--,n--)if(s[a]!==v[n]){if(a!==1||n!==1)do if(a--,n--,0>n||s[a]!==v[n]){var T=`
275
+ `+s[a].replace(" at new "," at ");return t.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",t.displayName)),T}while(1<=a&&0<=n);break}}}finally{si=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Ml(l):""}function Ty(t,e){switch(t.tag){case 26:case 27:case 5:return Ml(t.type);case 16:return Ml("Lazy");case 13:return t.child!==e&&e!==null?Ml("Suspense Fallback"):Ml("Suspense");case 19:return Ml("SuspenseList");case 0:case 15:return oi(t.type,!1);case 11:return oi(t.type.render,!1);case 1:return oi(t.type,!0);case 31:return Ml("Activity");default:return""}}function ts(t){try{var e="",l=null;do e+=Ty(t,l),l=t,t=t.return;while(t);return e}catch(a){return`
276
+ Error generating stack: `+a.message+`
277
+ `+a.stack}}var ri=Object.prototype.hasOwnProperty,di=h.unstable_scheduleCallback,yi=h.unstable_cancelCallback,Ay=h.unstable_shouldYield,zy=h.unstable_requestPaint,ne=h.unstable_now,Ey=h.unstable_getCurrentPriorityLevel,es=h.unstable_ImmediatePriority,ls=h.unstable_UserBlockingPriority,Rn=h.unstable_NormalPriority,My=h.unstable_LowPriority,as=h.unstable_IdlePriority,_y=h.log,Oy=h.unstable_setDisableYieldValue,qa=null,ue=null;function Pe(t){if(typeof _y=="function"&&Oy(t),ue&&typeof ue.setStrictMode=="function")try{ue.setStrictMode(qa,t)}catch{}}var ie=Math.clz32?Math.clz32:Uy,Cy=Math.log,Dy=Math.LN2;function Uy(t){return t>>>=0,t===0?32:31-(Cy(t)/Dy|0)|0}var Hn=256,Nn=262144,Bn=4194304;function _l(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function qn(t,e,l){var a=t.pendingLanes;if(a===0)return 0;var n=0,u=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var c=a&134217727;return c!==0?(a=c&~u,a!==0?n=_l(a):(i&=c,i!==0?n=_l(i):l||(l=c&~t,l!==0&&(n=_l(l))))):(c=a&~u,c!==0?n=_l(c):i!==0?n=_l(i):l||(l=a&~t,l!==0&&(n=_l(l)))),n===0?0:e!==0&&e!==n&&(e&u)===0&&(u=n&-n,l=e&-e,u>=l||u===32&&(l&4194048)!==0)?e:n}function Ya(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function jy(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 ns(){var t=Bn;return Bn<<=1,(Bn&62914560)===0&&(Bn=4194304),t}function hi(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Ga(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ry(t,e,l,a,n,u){var i=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var c=t.entanglements,s=t.expirationTimes,v=t.hiddenUpdates;for(l=i&~l;0<l;){var T=31-ie(l),E=1<<T;c[T]=0,s[T]=-1;var p=v[T];if(p!==null)for(v[T]=null,T=0;T<p.length;T++){var S=p[T];S!==null&&(S.lane&=-536870913)}l&=~E}a!==0&&us(t,a,0),u!==0&&n===0&&t.tag!==0&&(t.suspendedLanes|=u&~(i&~e))}function us(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var a=31-ie(e);t.entangledLanes|=e,t.entanglements[a]=t.entanglements[a]|1073741824|l&261930}function is(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var a=31-ie(l),n=1<<a;n&e|t[a]&e&&(t[a]|=e),l&=~n}}function cs(t,e){var l=e&-e;return l=(l&42)!==0?1:gi(l),(l&(t.suspendedLanes|e))!==0?0:l}function gi(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function mi(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function fs(){var t=U.p;return t!==0?t:(t=window.event,t===void 0?32:kd(t.type))}function ss(t,e){var l=U.p;try{return U.p=t,e()}finally{U.p=l}}var tl=Math.random().toString(36).slice(2),Lt="__reactFiber$"+tl,Ft="__reactProps$"+tl,Kl="__reactContainer$"+tl,vi="__reactEvents$"+tl,Hy="__reactListeners$"+tl,Ny="__reactHandles$"+tl,os="__reactResources$"+tl,Xa="__reactMarker$"+tl;function pi(t){delete t[Lt],delete t[Ft],delete t[vi],delete t[Hy],delete t[Ny]}function Jl(t){var e=t[Lt];if(e)return e;for(var l=t.parentNode;l;){if(e=l[Kl]||l[Lt]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=jd(t);t!==null;){if(l=t[Lt])return l;t=jd(t)}return e}t=l,l=t.parentNode}return null}function kl(t){if(t=t[Lt]||t[Kl]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function La(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(o(33))}function Wl(t){var e=t[os];return e||(e=t[os]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Gt(t){t[Xa]=!0}var rs=new Set,ds={};function Ol(t,e){$l(t,e),$l(t+"Capture",e)}function $l(t,e){for(ds[t]=e,t=0;t<e.length;t++)rs.add(e[t])}var By=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]*$"),ys={},hs={};function qy(t){return ri.call(hs,t)?!0:ri.call(ys,t)?!1:By.test(t)?hs[t]=!0:(ys[t]=!0,!1)}function Yn(t,e,l){if(qy(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var a=e.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+l)}}function Gn(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+l)}}function Ne(t,e,l,a){if(a===null)t.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,""+a)}}function he(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function gs(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Yy(t,e,l){var a=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,u=a.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.call(this)},set:function(i){l=""+i,u.call(this,i)}}),Object.defineProperty(t,e,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(i){l=""+i},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function bi(t){if(!t._valueTracker){var e=gs(t)?"checked":"value";t._valueTracker=Yy(t,e,""+t[e])}}function ms(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),a="";return t&&(a=gs(t)?t.checked?"true":"false":t.value),t=a,t!==l?(e.setValue(t),!0):!1}function Xn(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Gy=/[\n"\\]/g;function ge(t){return t.replace(Gy,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Si(t,e,l,a,n,u,i,c){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),e!=null?i==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+he(e)):t.value!==""+he(e)&&(t.value=""+he(e)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),e!=null?xi(t,i,he(e)):l!=null?xi(t,i,he(l)):a!=null&&t.removeAttribute("value"),n==null&&u!=null&&(t.defaultChecked=!!u),n!=null&&(t.checked=n&&typeof n!="function"&&typeof n!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?t.name=""+he(c):t.removeAttribute("name")}function vs(t,e,l,a,n,u,i,c){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){bi(t);return}l=l!=null?""+he(l):"",e=e!=null?""+he(e):l,c||e===t.value||(t.value=e),t.defaultValue=e}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=c?t.checked:!!a,t.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),bi(t)}function xi(t,e,l){e==="number"&&Xn(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Fl(t,e,l,a){if(t=t.options,e){e={};for(var n=0;n<l.length;n++)e["$"+l[n]]=!0;for(l=0;l<t.length;l++)n=e.hasOwnProperty("$"+t[l].value),t[l].selected!==n&&(t[l].selected=n),n&&a&&(t[l].defaultSelected=!0)}else{for(l=""+he(l),e=null,n=0;n<t.length;n++){if(t[n].value===l){t[n].selected=!0,a&&(t[n].defaultSelected=!0);return}e!==null||t[n].disabled||(e=t[n])}e!==null&&(e.selected=!0)}}function ps(t,e,l){if(e!=null&&(e=""+he(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+he(l):""}function bs(t,e,l,a){if(e==null){if(a!=null){if(l!=null)throw Error(o(92));if(ze(a)){if(1<a.length)throw Error(o(93));a=a[0]}l=a}l==null&&(l=""),e=l}l=he(e),t.defaultValue=l,a=t.textContent,a===l&&a!==""&&a!==null&&(t.value=a),bi(t)}function Il(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var Xy=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 Ss(t,e,l){var a=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":a?t.setProperty(e,l):typeof l!="number"||l===0||Xy.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function xs(t,e,l){if(e!=null&&typeof e!="object")throw Error(o(62));if(t=t.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||e!=null&&e.hasOwnProperty(a)||(a.indexOf("--")===0?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="");for(var n in e)a=e[n],e.hasOwnProperty(n)&&l[n]!==a&&Ss(t,n,a)}else for(var u in e)e.hasOwnProperty(u)&&Ss(t,u,e[u])}function Ti(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Ly=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"]]),Qy=/^[\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 Ln(t){return Qy.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Be(){}var Ai=null;function zi(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Pl=null,ta=null;function Ts(t){var e=kl(t);if(e&&(t=e.stateNode)){var l=t[Ft]||null;t:switch(t=e.stateNode,e.type){case"input":if(Si(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+ge(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var a=l[e];if(a!==t&&a.form===t.form){var n=a[Ft]||null;if(!n)throw Error(o(90));Si(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(e=0;e<l.length;e++)a=l[e],a.form===t.form&&ms(a)}break t;case"textarea":ps(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&Fl(t,!!l.multiple,e,!1)}}}var Ei=!1;function As(t,e,l){if(Ei)return t(e,l);Ei=!0;try{var a=t(e);return a}finally{if(Ei=!1,(Pl!==null||ta!==null)&&(Ou(),Pl&&(e=Pl,t=ta,ta=Pl=null,Ts(e),t)))for(e=0;e<t.length;e++)Ts(t[e])}}function Qa(t,e){var l=t.stateNode;if(l===null)return null;var a=l[Ft]||null;if(a===null)return null;l=a[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(t=t.type,a=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!a;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(o(231,e,typeof l));return l}var qe=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mi=!1;if(qe)try{var Va={};Object.defineProperty(Va,"passive",{get:function(){Mi=!0}}),window.addEventListener("test",Va,Va),window.removeEventListener("test",Va,Va)}catch{Mi=!1}var el=null,_i=null,Qn=null;function zs(){if(Qn)return Qn;var t,e=_i,l=e.length,a,n="value"in el?el.value:el.textContent,u=n.length;for(t=0;t<l&&e[t]===n[t];t++);var i=l-t;for(a=1;a<=i&&e[l-a]===n[u-a];a++);return Qn=n.slice(t,1<a?1-a:void 0)}function Vn(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function wn(){return!0}function Es(){return!1}function It(t){function e(l,a,n,u,i){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=u,this.target=i,this.currentTarget=null;for(var c in t)t.hasOwnProperty(c)&&(l=t[c],this[c]=l?l(u):u[c]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?wn:Es,this.isPropagationStopped=Es,this}return _(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=wn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=wn)},persist:function(){},isPersistent:wn}),e}var Cl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zn=It(Cl),wa=_({},Cl,{view:0,detail:0}),Vy=It(wa),Oi,Ci,Za,Kn=_({},wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ui,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Za&&(Za&&t.type==="mousemove"?(Oi=t.screenX-Za.screenX,Ci=t.screenY-Za.screenY):Ci=Oi=0,Za=t),Oi)},movementY:function(t){return"movementY"in t?t.movementY:Ci}}),Ms=It(Kn),wy=_({},Kn,{dataTransfer:0}),Zy=It(wy),Ky=_({},wa,{relatedTarget:0}),Di=It(Ky),Jy=_({},Cl,{animationName:0,elapsedTime:0,pseudoElement:0}),ky=It(Jy),Wy=_({},Cl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),$y=It(Wy),Fy=_({},Cl,{data:0}),_s=It(Fy),Iy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Py={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"},th={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eh(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=th[t])?!!e[t]:!1}function Ui(){return eh}var lh=_({},wa,{key:function(t){if(t.key){var e=Iy[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Vn(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Py[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ui,charCode:function(t){return t.type==="keypress"?Vn(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Vn(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),ah=It(lh),nh=_({},Kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Os=It(nh),uh=_({},wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ui}),ih=It(uh),ch=_({},Cl,{propertyName:0,elapsedTime:0,pseudoElement:0}),fh=It(ch),sh=_({},Kn,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),oh=It(sh),rh=_({},Cl,{newState:0,oldState:0}),dh=It(rh),yh=[9,13,27,32],ji=qe&&"CompositionEvent"in window,Ka=null;qe&&"documentMode"in document&&(Ka=document.documentMode);var hh=qe&&"TextEvent"in window&&!Ka,Cs=qe&&(!ji||Ka&&8<Ka&&11>=Ka),Ds=" ",Us=!1;function js(t,e){switch(t){case"keyup":return yh.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rs(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ea=!1;function gh(t,e){switch(t){case"compositionend":return Rs(e);case"keypress":return e.which!==32?null:(Us=!0,Ds);case"textInput":return t=e.data,t===Ds&&Us?null:t;default:return null}}function mh(t,e){if(ea)return t==="compositionend"||!ji&&js(t,e)?(t=zs(),Qn=_i=el=null,ea=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Cs&&e.locale!=="ko"?null:e.data;default:return null}}var vh={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 Hs(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!vh[t.type]:e==="textarea"}function Ns(t,e,l,a){Pl?ta?ta.push(a):ta=[a]:Pl=a,e=Nu(e,"onChange"),0<e.length&&(l=new Zn("onChange","change",null,l,a),t.push({event:l,listeners:e}))}var Ja=null,ka=null;function ph(t){pd(t,0)}function Jn(t){var e=La(t);if(ms(e))return t}function Bs(t,e){if(t==="change")return e}var qs=!1;if(qe){var Ri;if(qe){var Hi="oninput"in document;if(!Hi){var Ys=document.createElement("div");Ys.setAttribute("oninput","return;"),Hi=typeof Ys.oninput=="function"}Ri=Hi}else Ri=!1;qs=Ri&&(!document.documentMode||9<document.documentMode)}function Gs(){Ja&&(Ja.detachEvent("onpropertychange",Xs),ka=Ja=null)}function Xs(t){if(t.propertyName==="value"&&Jn(ka)){var e=[];Ns(e,ka,t,zi(t)),As(ph,e)}}function bh(t,e,l){t==="focusin"?(Gs(),Ja=e,ka=l,Ja.attachEvent("onpropertychange",Xs)):t==="focusout"&&Gs()}function Sh(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Jn(ka)}function xh(t,e){if(t==="click")return Jn(e)}function Th(t,e){if(t==="input"||t==="change")return Jn(e)}function Ah(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ce=typeof Object.is=="function"?Object.is:Ah;function Wa(t,e){if(ce(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),a=Object.keys(e);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!ri.call(e,n)||!ce(t[n],e[n]))return!1}return!0}function Ls(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Qs(t,e){var l=Ls(t);t=0;for(var a;l;){if(l.nodeType===3){if(a=t+l.textContent.length,t<=e&&a>=e)return{node:l,offset:e-t};t=a}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Ls(l)}}function Vs(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Vs(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function ws(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Xn(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Xn(t.document)}return e}function Ni(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var zh=qe&&"documentMode"in document&&11>=document.documentMode,la=null,Bi=null,$a=null,qi=!1;function Zs(t,e,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;qi||la==null||la!==Xn(a)||(a=la,"selectionStart"in a&&Ni(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),$a&&Wa($a,a)||($a=a,a=Nu(Bi,"onSelect"),0<a.length&&(e=new Zn("onSelect","select",null,e,l),t.push({event:e,listeners:a}),e.target=la)))}function Dl(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var aa={animationend:Dl("Animation","AnimationEnd"),animationiteration:Dl("Animation","AnimationIteration"),animationstart:Dl("Animation","AnimationStart"),transitionrun:Dl("Transition","TransitionRun"),transitionstart:Dl("Transition","TransitionStart"),transitioncancel:Dl("Transition","TransitionCancel"),transitionend:Dl("Transition","TransitionEnd")},Yi={},Ks={};qe&&(Ks=document.createElement("div").style,"AnimationEvent"in window||(delete aa.animationend.animation,delete aa.animationiteration.animation,delete aa.animationstart.animation),"TransitionEvent"in window||delete aa.transitionend.transition);function Ul(t){if(Yi[t])return Yi[t];if(!aa[t])return t;var e=aa[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in Ks)return Yi[t]=e[l];return t}var Js=Ul("animationend"),ks=Ul("animationiteration"),Ws=Ul("animationstart"),Eh=Ul("transitionrun"),Mh=Ul("transitionstart"),_h=Ul("transitioncancel"),$s=Ul("transitionend"),Fs=new Map,Gi="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(" ");Gi.push("scrollEnd");function Ee(t,e){Fs.set(t,e),Ol(e,[t])}var kn=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},me=[],na=0,Xi=0;function Wn(){for(var t=na,e=Xi=na=0;e<t;){var l=me[e];me[e++]=null;var a=me[e];me[e++]=null;var n=me[e];me[e++]=null;var u=me[e];if(me[e++]=null,a!==null&&n!==null){var i=a.pending;i===null?n.next=n:(n.next=i.next,i.next=n),a.pending=n}u!==0&&Is(l,n,u)}}function $n(t,e,l,a){me[na++]=t,me[na++]=e,me[na++]=l,me[na++]=a,Xi|=a,t.lanes|=a,t=t.alternate,t!==null&&(t.lanes|=a)}function Li(t,e,l,a){return $n(t,e,l,a),Fn(t)}function jl(t,e){return $n(t,null,null,e),Fn(t)}function Is(t,e,l){t.lanes|=l;var a=t.alternate;a!==null&&(a.lanes|=l);for(var n=!1,u=t.return;u!==null;)u.childLanes|=l,a=u.alternate,a!==null&&(a.childLanes|=l),u.tag===22&&(t=u.stateNode,t===null||t._visibility&1||(n=!0)),t=u,u=u.return;return t.tag===3?(u=t.stateNode,n&&e!==null&&(n=31-ie(l),t=u.hiddenUpdates,a=t[n],a===null?t[n]=[e]:a.push(e),e.lane=l|536870912),u):null}function Fn(t){if(50<bn)throw bn=0,$c=null,Error(o(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var ua={};function Oh(t,e,l,a){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fe(t,e,l,a){return new Oh(t,e,l,a)}function Qi(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ye(t,e){var l=t.alternate;return l===null?(l=fe(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Ps(t,e){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function In(t,e,l,a,n,u){var i=0;if(a=t,typeof t=="function")Qi(t)&&(i=1);else if(typeof t=="string")i=R0(t,l,H.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case Wt:return t=fe(31,l,e,n),t.elementType=Wt,t.lanes=u,t;case I:return Rl(l.children,n,u,e);case $:i=8,n|=24;break;case rt:return t=fe(12,l,e,n|2),t.elementType=rt,t.lanes=u,t;case L:return t=fe(13,l,e,n),t.elementType=L,t.lanes=u,t;case Mt:return t=fe(19,l,e,n),t.elementType=Mt,t.lanes=u,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case bt:i=10;break t;case Rt:i=9;break t;case Ct:i=11;break t;case Z:i=14;break t;case ht:i=16,a=null;break t}i=29,l=Error(o(130,t===null?"null":typeof t,"")),a=null}return e=fe(i,l,e,n),e.elementType=t,e.type=a,e.lanes=u,e}function Rl(t,e,l,a){return t=fe(7,t,a,e),t.lanes=l,t}function Vi(t,e,l){return t=fe(6,t,null,e),t.lanes=l,t}function to(t){var e=fe(18,null,null,0);return e.stateNode=t,e}function wi(t,e,l){return e=fe(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var eo=new WeakMap;function ve(t,e){if(typeof t=="object"&&t!==null){var l=eo.get(t);return l!==void 0?l:(e={value:t,source:e,stack:ts(e)},eo.set(t,e),e)}return{value:t,source:e,stack:ts(e)}}var ia=[],ca=0,Pn=null,Fa=0,pe=[],be=0,ll=null,Ce=1,De="";function Ge(t,e){ia[ca++]=Fa,ia[ca++]=Pn,Pn=t,Fa=e}function lo(t,e,l){pe[be++]=Ce,pe[be++]=De,pe[be++]=ll,ll=t;var a=Ce;t=De;var n=32-ie(a)-1;a&=~(1<<n),l+=1;var u=32-ie(e)+n;if(30<u){var i=n-n%5;u=(a&(1<<i)-1).toString(32),a>>=i,n-=i,Ce=1<<32-ie(e)+n|l<<n|a,De=u+t}else Ce=1<<u|l<<n|a,De=t}function Zi(t){t.return!==null&&(Ge(t,1),lo(t,1,0))}function Ki(t){for(;t===Pn;)Pn=ia[--ca],ia[ca]=null,Fa=ia[--ca],ia[ca]=null;for(;t===ll;)ll=pe[--be],pe[be]=null,De=pe[--be],pe[be]=null,Ce=pe[--be],pe[be]=null}function ao(t,e){pe[be++]=Ce,pe[be++]=De,pe[be++]=ll,Ce=e.id,De=e.overflow,ll=t}var Qt=null,Tt=null,nt=!1,al=null,Se=!1,Ji=Error(o(519));function nl(t){var e=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ia(ve(e,t)),Ji}function no(t){var e=t.stateNode,l=t.type,a=t.memoizedProps;switch(e[Lt]=t,e[Ft]=a,l){case"dialog":et("cancel",e),et("close",e);break;case"iframe":case"object":case"embed":et("load",e);break;case"video":case"audio":for(l=0;l<xn.length;l++)et(xn[l],e);break;case"source":et("error",e);break;case"img":case"image":case"link":et("error",e),et("load",e);break;case"details":et("toggle",e);break;case"input":et("invalid",e),vs(e,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":et("invalid",e);break;case"textarea":et("invalid",e),bs(e,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||a.suppressHydrationWarning===!0||Td(e.textContent,l)?(a.popover!=null&&(et("beforetoggle",e),et("toggle",e)),a.onScroll!=null&&et("scroll",e),a.onScrollEnd!=null&&et("scrollend",e),a.onClick!=null&&(e.onclick=Be),e=!0):e=!1,e||nl(t,!0)}function uo(t){for(Qt=t.return;Qt;)switch(Qt.tag){case 5:case 31:case 13:Se=!1;return;case 27:case 3:Se=!0;return;default:Qt=Qt.return}}function fa(t){if(t!==Qt)return!1;if(!nt)return uo(t),nt=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||df(t.type,t.memoizedProps)),l=!l),l&&Tt&&nl(t),uo(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));Tt=Ud(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));Tt=Ud(t)}else e===27?(e=Tt,pl(t.type)?(t=vf,vf=null,Tt=t):Tt=e):Tt=Qt?Te(t.stateNode.nextSibling):null;return!0}function Hl(){Tt=Qt=null,nt=!1}function ki(){var t=al;return t!==null&&(le===null?le=t:le.push.apply(le,t),al=null),t}function Ia(t){al===null?al=[t]:al.push(t)}var Wi=d(null),Nl=null,Xe=null;function ul(t,e,l){j(Wi,e._currentValue),e._currentValue=l}function Le(t){t._currentValue=Wi.current,M(Wi)}function $i(t,e,l){for(;t!==null;){var a=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,a!==null&&(a.childLanes|=e)):a!==null&&(a.childLanes&e)!==e&&(a.childLanes|=e),t===l)break;t=t.return}}function Fi(t,e,l,a){var n=t.child;for(n!==null&&(n.return=t);n!==null;){var u=n.dependencies;if(u!==null){var i=n.child;u=u.firstContext;t:for(;u!==null;){var c=u;u=n;for(var s=0;s<e.length;s++)if(c.context===e[s]){u.lanes|=l,c=u.alternate,c!==null&&(c.lanes|=l),$i(u.return,l,t),a||(i=null);break t}u=c.next}}else if(n.tag===18){if(i=n.return,i===null)throw Error(o(341));i.lanes|=l,u=i.alternate,u!==null&&(u.lanes|=l),$i(i,l,t),i=null}else i=n.child;if(i!==null)i.return=n;else for(i=n;i!==null;){if(i===t){i=null;break}if(n=i.sibling,n!==null){n.return=i.return,i=n;break}i=i.return}n=i}}function sa(t,e,l,a){t=null;for(var n=e,u=!1;n!==null;){if(!u){if((n.flags&524288)!==0)u=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var i=n.alternate;if(i===null)throw Error(o(387));if(i=i.memoizedProps,i!==null){var c=n.type;ce(n.pendingProps.value,i.value)||(t!==null?t.push(c):t=[c])}}else if(n===ot.current){if(i=n.alternate,i===null)throw Error(o(387));i.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(t!==null?t.push(Mn):t=[Mn])}n=n.return}t!==null&&Fi(e,t,l,a),e.flags|=262144}function tu(t){for(t=t.firstContext;t!==null;){if(!ce(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Bl(t){Nl=t,Xe=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Vt(t){return io(Nl,t)}function eu(t,e){return Nl===null&&Bl(t),io(t,e)}function io(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},Xe===null){if(t===null)throw Error(o(308));Xe=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Xe=Xe.next=e;return l}var Ch=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,a){t.push(a)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},Dh=h.unstable_scheduleCallback,Uh=h.unstable_NormalPriority,Ht={$$typeof:bt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ii(){return{controller:new Ch,data:new Map,refCount:0}}function Pa(t){t.refCount--,t.refCount===0&&Dh(Uh,function(){t.controller.abort()})}var tn=null,Pi=0,oa=0,ra=null;function jh(t,e){if(tn===null){var l=tn=[];Pi=0,oa=lf(),ra={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Pi++,e.then(co,co),e}function co(){if(--Pi===0&&tn!==null){ra!==null&&(ra.status="fulfilled");var t=tn;tn=null,oa=0,ra=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Rh(t,e){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return t.then(function(){a.status="fulfilled",a.value=e;for(var n=0;n<l.length;n++)(0,l[n])(e)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var fo=A.S;A.S=function(t,e){Kr=ne(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&jh(t,e),fo!==null&&fo(t,e)};var ql=d(null);function tc(){var t=ql.current;return t!==null?t:xt.pooledCache}function lu(t,e){e===null?j(ql,ql.current):j(ql,e.pool)}function so(){var t=tc();return t===null?null:{parent:Ht._currentValue,pool:t}}var da=Error(o(460)),ec=Error(o(474)),au=Error(o(542)),nu={then:function(){}};function oo(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ro(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(Be,Be),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ho(t),t;default:if(typeof e.status=="string")e.then(Be,Be);else{if(t=xt,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=e,t.status="pending",t.then(function(a){if(e.status==="pending"){var n=e;n.status="fulfilled",n.value=a}},function(a){if(e.status==="pending"){var n=e;n.status="rejected",n.reason=a}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ho(t),t}throw Gl=e,da}}function Yl(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Gl=l,da):l}}var Gl=null;function yo(){if(Gl===null)throw Error(o(459));var t=Gl;return Gl=null,t}function ho(t){if(t===da||t===au)throw Error(o(483))}var ya=null,en=0;function uu(t){var e=en;return en+=1,ya===null&&(ya=[]),ro(ya,t,e)}function ln(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function iu(t,e){throw e.$$typeof===B?Error(o(525)):(t=Object.prototype.toString.call(e),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function go(t){function e(y,r){if(t){var m=y.deletions;m===null?(y.deletions=[r],y.flags|=16):m.push(r)}}function l(y,r){if(!t)return null;for(;r!==null;)e(y,r),r=r.sibling;return null}function a(y){for(var r=new Map;y!==null;)y.key!==null?r.set(y.key,y):r.set(y.index,y),y=y.sibling;return r}function n(y,r){return y=Ye(y,r),y.index=0,y.sibling=null,y}function u(y,r,m){return y.index=m,t?(m=y.alternate,m!==null?(m=m.index,m<r?(y.flags|=67108866,r):m):(y.flags|=67108866,r)):(y.flags|=1048576,r)}function i(y){return t&&y.alternate===null&&(y.flags|=67108866),y}function c(y,r,m,z){return r===null||r.tag!==6?(r=Vi(m,y.mode,z),r.return=y,r):(r=n(r,m),r.return=y,r)}function s(y,r,m,z){var q=m.type;return q===I?T(y,r,m.props.children,z,m.key):r!==null&&(r.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===ht&&Yl(q)===r.type)?(r=n(r,m.props),ln(r,m),r.return=y,r):(r=In(m.type,m.key,m.props,null,y.mode,z),ln(r,m),r.return=y,r)}function v(y,r,m,z){return r===null||r.tag!==4||r.stateNode.containerInfo!==m.containerInfo||r.stateNode.implementation!==m.implementation?(r=wi(m,y.mode,z),r.return=y,r):(r=n(r,m.children||[]),r.return=y,r)}function T(y,r,m,z,q){return r===null||r.tag!==7?(r=Rl(m,y.mode,z,q),r.return=y,r):(r=n(r,m),r.return=y,r)}function E(y,r,m){if(typeof r=="string"&&r!==""||typeof r=="number"||typeof r=="bigint")return r=Vi(""+r,y.mode,m),r.return=y,r;if(typeof r=="object"&&r!==null){switch(r.$$typeof){case F:return m=In(r.type,r.key,r.props,null,y.mode,m),ln(m,r),m.return=y,m;case it:return r=wi(r,y.mode,m),r.return=y,r;case ht:return r=Yl(r),E(y,r,m)}if(ze(r)||$t(r))return r=Rl(r,y.mode,m,null),r.return=y,r;if(typeof r.then=="function")return E(y,uu(r),m);if(r.$$typeof===bt)return E(y,eu(y,r),m);iu(y,r)}return null}function p(y,r,m,z){var q=r!==null?r.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return q!==null?null:c(y,r,""+m,z);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case F:return m.key===q?s(y,r,m,z):null;case it:return m.key===q?v(y,r,m,z):null;case ht:return m=Yl(m),p(y,r,m,z)}if(ze(m)||$t(m))return q!==null?null:T(y,r,m,z,null);if(typeof m.then=="function")return p(y,r,uu(m),z);if(m.$$typeof===bt)return p(y,r,eu(y,m),z);iu(y,m)}return null}function S(y,r,m,z,q){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return y=y.get(m)||null,c(r,y,""+z,q);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case F:return y=y.get(z.key===null?m:z.key)||null,s(r,y,z,q);case it:return y=y.get(z.key===null?m:z.key)||null,v(r,y,z,q);case ht:return z=Yl(z),S(y,r,m,z,q)}if(ze(z)||$t(z))return y=y.get(m)||null,T(r,y,z,q,null);if(typeof z.then=="function")return S(y,r,m,uu(z),q);if(z.$$typeof===bt)return S(y,r,m,eu(r,z),q);iu(r,z)}return null}function R(y,r,m,z){for(var q=null,ct=null,N=r,W=r=0,at=null;N!==null&&W<m.length;W++){N.index>W?(at=N,N=null):at=N.sibling;var ft=p(y,N,m[W],z);if(ft===null){N===null&&(N=at);break}t&&N&&ft.alternate===null&&e(y,N),r=u(ft,r,W),ct===null?q=ft:ct.sibling=ft,ct=ft,N=at}if(W===m.length)return l(y,N),nt&&Ge(y,W),q;if(N===null){for(;W<m.length;W++)N=E(y,m[W],z),N!==null&&(r=u(N,r,W),ct===null?q=N:ct.sibling=N,ct=N);return nt&&Ge(y,W),q}for(N=a(N);W<m.length;W++)at=S(N,y,W,m[W],z),at!==null&&(t&&at.alternate!==null&&N.delete(at.key===null?W:at.key),r=u(at,r,W),ct===null?q=at:ct.sibling=at,ct=at);return t&&N.forEach(function(Al){return e(y,Al)}),nt&&Ge(y,W),q}function X(y,r,m,z){if(m==null)throw Error(o(151));for(var q=null,ct=null,N=r,W=r=0,at=null,ft=m.next();N!==null&&!ft.done;W++,ft=m.next()){N.index>W?(at=N,N=null):at=N.sibling;var Al=p(y,N,ft.value,z);if(Al===null){N===null&&(N=at);break}t&&N&&Al.alternate===null&&e(y,N),r=u(Al,r,W),ct===null?q=Al:ct.sibling=Al,ct=Al,N=at}if(ft.done)return l(y,N),nt&&Ge(y,W),q;if(N===null){for(;!ft.done;W++,ft=m.next())ft=E(y,ft.value,z),ft!==null&&(r=u(ft,r,W),ct===null?q=ft:ct.sibling=ft,ct=ft);return nt&&Ge(y,W),q}for(N=a(N);!ft.done;W++,ft=m.next())ft=S(N,y,W,ft.value,z),ft!==null&&(t&&ft.alternate!==null&&N.delete(ft.key===null?W:ft.key),r=u(ft,r,W),ct===null?q=ft:ct.sibling=ft,ct=ft);return t&&N.forEach(function(w0){return e(y,w0)}),nt&&Ge(y,W),q}function pt(y,r,m,z){if(typeof m=="object"&&m!==null&&m.type===I&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case F:t:{for(var q=m.key;r!==null;){if(r.key===q){if(q=m.type,q===I){if(r.tag===7){l(y,r.sibling),z=n(r,m.props.children),z.return=y,y=z;break t}}else if(r.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===ht&&Yl(q)===r.type){l(y,r.sibling),z=n(r,m.props),ln(z,m),z.return=y,y=z;break t}l(y,r);break}else e(y,r);r=r.sibling}m.type===I?(z=Rl(m.props.children,y.mode,z,m.key),z.return=y,y=z):(z=In(m.type,m.key,m.props,null,y.mode,z),ln(z,m),z.return=y,y=z)}return i(y);case it:t:{for(q=m.key;r!==null;){if(r.key===q)if(r.tag===4&&r.stateNode.containerInfo===m.containerInfo&&r.stateNode.implementation===m.implementation){l(y,r.sibling),z=n(r,m.children||[]),z.return=y,y=z;break t}else{l(y,r);break}else e(y,r);r=r.sibling}z=wi(m,y.mode,z),z.return=y,y=z}return i(y);case ht:return m=Yl(m),pt(y,r,m,z)}if(ze(m))return R(y,r,m,z);if($t(m)){if(q=$t(m),typeof q!="function")throw Error(o(150));return m=q.call(m),X(y,r,m,z)}if(typeof m.then=="function")return pt(y,r,uu(m),z);if(m.$$typeof===bt)return pt(y,r,eu(y,m),z);iu(y,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,r!==null&&r.tag===6?(l(y,r.sibling),z=n(r,m),z.return=y,y=z):(l(y,r),z=Vi(m,y.mode,z),z.return=y,y=z),i(y)):l(y,r)}return function(y,r,m,z){try{en=0;var q=pt(y,r,m,z);return ya=null,q}catch(N){if(N===da||N===au)throw N;var ct=fe(29,N,null,y.mode);return ct.lanes=z,ct.return=y,ct}}}var Xl=go(!0),mo=go(!1),il=!1;function lc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ac(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function cl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function fl(t,e,l){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(st&2)!==0){var n=a.pending;return n===null?e.next=e:(e.next=n.next,n.next=e),a.pending=e,e=Fn(t),Is(t,null,l),e}return $n(t,a,e,l),Fn(t)}function an(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,is(t,l)}}function nc(t,e){var l=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var i={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,l=l.next}while(l!==null);u===null?n=u=e:u=u.next=e}else n=u=e;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var uc=!1;function nn(){if(uc){var t=ra;if(t!==null)throw t}}function un(t,e,l,a){uc=!1;var n=t.updateQueue;il=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,c=n.shared.pending;if(c!==null){n.shared.pending=null;var s=c,v=s.next;s.next=null,i===null?u=v:i.next=v,i=s;var T=t.alternate;T!==null&&(T=T.updateQueue,c=T.lastBaseUpdate,c!==i&&(c===null?T.firstBaseUpdate=v:c.next=v,T.lastBaseUpdate=s))}if(u!==null){var E=n.baseState;i=0,T=v=s=null,c=u;do{var p=c.lane&-536870913,S=p!==c.lane;if(S?(lt&p)===p:(a&p)===p){p!==0&&p===oa&&(uc=!0),T!==null&&(T=T.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});t:{var R=t,X=c;p=e;var pt=l;switch(X.tag){case 1:if(R=X.payload,typeof R=="function"){E=R.call(pt,E,p);break t}E=R;break t;case 3:R.flags=R.flags&-65537|128;case 0:if(R=X.payload,p=typeof R=="function"?R.call(pt,E,p):R,p==null)break t;E=_({},E,p);break t;case 2:il=!0}}p=c.callback,p!==null&&(t.flags|=64,S&&(t.flags|=8192),S=n.callbacks,S===null?n.callbacks=[p]:S.push(p))}else S={lane:p,tag:c.tag,payload:c.payload,callback:c.callback,next:null},T===null?(v=T=S,s=E):T=T.next=S,i|=p;if(c=c.next,c===null){if(c=n.shared.pending,c===null)break;S=c,c=S.next,S.next=null,n.lastBaseUpdate=S,n.shared.pending=null}}while(!0);T===null&&(s=E),n.baseState=s,n.firstBaseUpdate=v,n.lastBaseUpdate=T,u===null&&(n.shared.lanes=0),yl|=i,t.lanes=i,t.memoizedState=E}}function vo(t,e){if(typeof t!="function")throw Error(o(191,t));t.call(e)}function po(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)vo(l[t],e)}var ha=d(null),cu=d(0);function bo(t,e){t=$e,j(cu,t),j(ha,e),$e=t|e.baseLanes}function ic(){j(cu,$e),j(ha,ha.current)}function cc(){$e=cu.current,M(ha),M(cu)}var se=d(null),xe=null;function sl(t){var e=t.alternate;j(Ut,Ut.current&1),j(se,t),xe===null&&(e===null||ha.current!==null||e.memoizedState!==null)&&(xe=t)}function fc(t){j(Ut,Ut.current),j(se,t),xe===null&&(xe=t)}function So(t){t.tag===22?(j(Ut,Ut.current),j(se,t),xe===null&&(xe=t)):ol()}function ol(){j(Ut,Ut.current),j(se,se.current)}function oe(t){M(se),xe===t&&(xe=null),M(Ut)}var Ut=d(0);function fu(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||gf(l)||mf(l)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Qe=0,k=null,mt=null,Nt=null,su=!1,ga=!1,Ll=!1,ou=0,cn=0,ma=null,Hh=0;function _t(){throw Error(o(321))}function sc(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!ce(t[l],e[l]))return!1;return!0}function oc(t,e,l,a,n,u){return Qe=u,k=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,A.H=t===null||t.memoizedState===null?ar:Ec,Ll=!1,u=l(a,n),Ll=!1,ga&&(u=To(e,l,a,n)),xo(t),u}function xo(t){A.H=on;var e=mt!==null&&mt.next!==null;if(Qe=0,Nt=mt=k=null,su=!1,cn=0,ma=null,e)throw Error(o(300));t===null||Bt||(t=t.dependencies,t!==null&&tu(t)&&(Bt=!0))}function To(t,e,l,a){k=t;var n=0;do{if(ga&&(ma=null),cn=0,ga=!1,25<=n)throw Error(o(301));if(n+=1,Nt=mt=null,t.updateQueue!=null){var u=t.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}A.H=nr,u=e(l,a)}while(ga);return u}function Nh(){var t=A.H,e=t.useState()[0];return e=typeof e.then=="function"?fn(e):e,t=t.useState()[0],(mt!==null?mt.memoizedState:null)!==t&&(k.flags|=1024),e}function rc(){var t=ou!==0;return ou=0,t}function dc(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function yc(t){if(su){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}su=!1}Qe=0,Nt=mt=k=null,ga=!1,cn=ou=0,ma=null}function kt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?k.memoizedState=Nt=t:Nt=Nt.next=t,Nt}function jt(){if(mt===null){var t=k.alternate;t=t!==null?t.memoizedState:null}else t=mt.next;var e=Nt===null?k.memoizedState:Nt.next;if(e!==null)Nt=e,mt=t;else{if(t===null)throw k.alternate===null?Error(o(467)):Error(o(310));mt=t,t={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},Nt===null?k.memoizedState=Nt=t:Nt=Nt.next=t}return Nt}function ru(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fn(t){var e=cn;return cn+=1,ma===null&&(ma=[]),t=ro(ma,t,e),e=k,(Nt===null?e.memoizedState:Nt.next)===null&&(e=e.alternate,A.H=e===null||e.memoizedState===null?ar:Ec),t}function du(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return fn(t);if(t.$$typeof===bt)return Vt(t)}throw Error(o(438,String(t)))}function hc(t){var e=null,l=k.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var a=k.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(e={data:a.data.map(function(n){return n.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=ru(),k.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),a=0;a<t;a++)l[a]=Zl;return e.index++,l}function Ve(t,e){return typeof e=="function"?e(t):e}function yu(t){var e=jt();return gc(e,mt,t)}function gc(t,e,l){var a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=l;var n=t.baseQueue,u=a.pending;if(u!==null){if(n!==null){var i=n.next;n.next=u.next,u.next=i}e.baseQueue=n=u,a.pending=null}if(u=t.baseState,n===null)t.memoizedState=u;else{e=n.next;var c=i=null,s=null,v=e,T=!1;do{var E=v.lane&-536870913;if(E!==v.lane?(lt&E)===E:(Qe&E)===E){var p=v.revertLane;if(p===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:v.action,hasEagerState:v.hasEagerState,eagerState:v.eagerState,next:null}),E===oa&&(T=!0);else if((Qe&p)===p){v=v.next,p===oa&&(T=!0);continue}else E={lane:0,revertLane:v.revertLane,gesture:null,action:v.action,hasEagerState:v.hasEagerState,eagerState:v.eagerState,next:null},s===null?(c=s=E,i=u):s=s.next=E,k.lanes|=p,yl|=p;E=v.action,Ll&&l(u,E),u=v.hasEagerState?v.eagerState:l(u,E)}else p={lane:E,revertLane:v.revertLane,gesture:v.gesture,action:v.action,hasEagerState:v.hasEagerState,eagerState:v.eagerState,next:null},s===null?(c=s=p,i=u):s=s.next=p,k.lanes|=E,yl|=E;v=v.next}while(v!==null&&v!==e);if(s===null?i=u:s.next=c,!ce(u,t.memoizedState)&&(Bt=!0,T&&(l=ra,l!==null)))throw l;t.memoizedState=u,t.baseState=i,t.baseQueue=s,a.lastRenderedState=u}return n===null&&(a.lanes=0),[t.memoizedState,a.dispatch]}function mc(t){var e=jt(),l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=t;var a=l.dispatch,n=l.pending,u=e.memoizedState;if(n!==null){l.pending=null;var i=n=n.next;do u=t(u,i.action),i=i.next;while(i!==n);ce(u,e.memoizedState)||(Bt=!0),e.memoizedState=u,e.baseQueue===null&&(e.baseState=u),l.lastRenderedState=u}return[u,a]}function Ao(t,e,l){var a=k,n=jt(),u=nt;if(u){if(l===void 0)throw Error(o(407));l=l()}else l=e();var i=!ce((mt||n).memoizedState,l);if(i&&(n.memoizedState=l,Bt=!0),n=n.queue,bc(Mo.bind(null,a,n,t),[t]),n.getSnapshot!==e||i||Nt!==null&&Nt.memoizedState.tag&1){if(a.flags|=2048,va(9,{destroy:void 0},Eo.bind(null,a,n,l,e),null),xt===null)throw Error(o(349));u||(Qe&127)!==0||zo(a,e,l)}return l}function zo(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=k.updateQueue,e===null?(e=ru(),k.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function Eo(t,e,l,a){e.value=l,e.getSnapshot=a,_o(e)&&Oo(t)}function Mo(t,e,l){return l(function(){_o(e)&&Oo(t)})}function _o(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!ce(t,l)}catch{return!0}}function Oo(t){var e=jl(t,2);e!==null&&ae(e,t,2)}function vc(t){var e=kt();if(typeof t=="function"){var l=t;if(t=l(),Ll){Pe(!0);try{l()}finally{Pe(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ve,lastRenderedState:t},e}function Co(t,e,l,a){return t.baseState=l,gc(t,mt,typeof a=="function"?a:Ve)}function Bh(t,e,l,a,n){if(mu(t))throw Error(o(485));if(t=e.action,t!==null){var u={payload:n,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){u.listeners.push(i)}};A.T!==null?l(!0):u.isTransition=!1,a(u),l=e.pending,l===null?(u.next=e.pending=u,Do(e,u)):(u.next=l.next,e.pending=l.next=u)}}function Do(t,e){var l=e.action,a=e.payload,n=t.state;if(e.isTransition){var u=A.T,i={};A.T=i;try{var c=l(n,a),s=A.S;s!==null&&s(i,c),Uo(t,e,c)}catch(v){pc(t,e,v)}finally{u!==null&&i.types!==null&&(u.types=i.types),A.T=u}}else try{u=l(n,a),Uo(t,e,u)}catch(v){pc(t,e,v)}}function Uo(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){jo(t,e,a)},function(a){return pc(t,e,a)}):jo(t,e,l)}function jo(t,e,l){e.status="fulfilled",e.value=l,Ro(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,Do(t,l)))}function pc(t,e,l){var a=t.pending;if(t.pending=null,a!==null){a=a.next;do e.status="rejected",e.reason=l,Ro(e),e=e.next;while(e!==a)}t.action=null}function Ro(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Ho(t,e){return e}function No(t,e){if(nt){var l=xt.formState;if(l!==null){t:{var a=k;if(nt){if(Tt){e:{for(var n=Tt,u=Se;n.nodeType!==8;){if(!u){n=null;break e}if(n=Te(n.nextSibling),n===null){n=null;break e}}u=n.data,n=u==="F!"||u==="F"?n:null}if(n){Tt=Te(n.nextSibling),a=n.data==="F!";break t}}nl(a)}a=!1}a&&(e=l[0])}}return l=kt(),l.memoizedState=l.baseState=e,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:e},l.queue=a,l=tr.bind(null,k,a),a.dispatch=l,a=vc(!1),u=zc.bind(null,k,!1,a.queue),a=kt(),n={state:e,dispatch:null,action:t,pending:null},a.queue=n,l=Bh.bind(null,k,n,u,l),n.dispatch=l,a.memoizedState=t,[e,l,!1]}function Bo(t){var e=jt();return qo(e,mt,t)}function qo(t,e,l){if(e=gc(t,e,Ho)[0],t=yu(Ve)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var a=fn(e)}catch(i){throw i===da?au:i}else a=e;e=jt();var n=e.queue,u=n.dispatch;return l!==e.memoizedState&&(k.flags|=2048,va(9,{destroy:void 0},qh.bind(null,n,l),null)),[a,u,t]}function qh(t,e){t.action=e}function Yo(t){var e=jt(),l=mt;if(l!==null)return qo(e,l,t);jt(),e=e.memoizedState,l=jt();var a=l.queue.dispatch;return l.memoizedState=t,[e,a,!1]}function va(t,e,l,a){return t={tag:t,create:l,deps:a,inst:e,next:null},e=k.updateQueue,e===null&&(e=ru(),k.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(a=l.next,l.next=t,t.next=a,e.lastEffect=t),t}function Go(){return jt().memoizedState}function hu(t,e,l,a){var n=kt();k.flags|=t,n.memoizedState=va(1|e,{destroy:void 0},l,a===void 0?null:a)}function gu(t,e,l,a){var n=jt();a=a===void 0?null:a;var u=n.memoizedState.inst;mt!==null&&a!==null&&sc(a,mt.memoizedState.deps)?n.memoizedState=va(e,u,l,a):(k.flags|=t,n.memoizedState=va(1|e,u,l,a))}function Xo(t,e){hu(8390656,8,t,e)}function bc(t,e){gu(2048,8,t,e)}function Yh(t){k.flags|=4;var e=k.updateQueue;if(e===null)e=ru(),k.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function Lo(t){var e=jt().memoizedState;return Yh({ref:e,nextImpl:t}),function(){if((st&2)!==0)throw Error(o(440));return e.impl.apply(void 0,arguments)}}function Qo(t,e){return gu(4,2,t,e)}function Vo(t,e){return gu(4,4,t,e)}function wo(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Zo(t,e,l){l=l!=null?l.concat([t]):null,gu(4,4,wo.bind(null,e,t),l)}function Sc(){}function Ko(t,e){var l=jt();e=e===void 0?null:e;var a=l.memoizedState;return e!==null&&sc(e,a[1])?a[0]:(l.memoizedState=[t,e],t)}function Jo(t,e){var l=jt();e=e===void 0?null:e;var a=l.memoizedState;if(e!==null&&sc(e,a[1]))return a[0];if(a=t(),Ll){Pe(!0);try{t()}finally{Pe(!1)}}return l.memoizedState=[a,e],a}function xc(t,e,l){return l===void 0||(Qe&1073741824)!==0&&(lt&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=kr(),k.lanes|=t,yl|=t,l)}function ko(t,e,l,a){return ce(l,e)?l:ha.current!==null?(t=xc(t,l,a),ce(t,e)||(Bt=!0),t):(Qe&42)===0||(Qe&1073741824)!==0&&(lt&261930)===0?(Bt=!0,t.memoizedState=l):(t=kr(),k.lanes|=t,yl|=t,e)}function Wo(t,e,l,a,n){var u=U.p;U.p=u!==0&&8>u?u:8;var i=A.T,c={};A.T=c,zc(t,!1,e,l);try{var s=n(),v=A.S;if(v!==null&&v(c,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var T=Rh(s,a);sn(t,e,T,ye(t))}else sn(t,e,a,ye(t))}catch(E){sn(t,e,{then:function(){},status:"rejected",reason:E},ye())}finally{U.p=u,i!==null&&c.types!==null&&(i.types=c.types),A.T=i}}function Gh(){}function Tc(t,e,l,a){if(t.tag!==5)throw Error(o(476));var n=$o(t).queue;Wo(t,n,e,Q,l===null?Gh:function(){return Fo(t),l(a)})}function $o(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ve,lastRenderedState:Q},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ve,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Fo(t){var e=$o(t);e.next===null&&(e=t.alternate.memoizedState),sn(t,e.next.queue,{},ye())}function Ac(){return Vt(Mn)}function Io(){return jt().memoizedState}function Po(){return jt().memoizedState}function Xh(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=ye();t=cl(l);var a=fl(e,t,l);a!==null&&(ae(a,e,l),an(a,e,l)),e={cache:Ii()},t.payload=e;return}e=e.return}}function Lh(t,e,l){var a=ye();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},mu(t)?er(e,l):(l=Li(t,e,l,a),l!==null&&(ae(l,t,a),lr(l,e,a)))}function tr(t,e,l){var a=ye();sn(t,e,l,a)}function sn(t,e,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(mu(t))er(e,n);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var i=e.lastRenderedState,c=u(i,l);if(n.hasEagerState=!0,n.eagerState=c,ce(c,i))return $n(t,e,n,0),xt===null&&Wn(),!1}catch{}if(l=Li(t,e,n,a),l!==null)return ae(l,t,a),lr(l,e,a),!0}return!1}function zc(t,e,l,a){if(a={lane:2,revertLane:lf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},mu(t)){if(e)throw Error(o(479))}else e=Li(t,l,a,2),e!==null&&ae(e,t,2)}function mu(t){var e=t.alternate;return t===k||e!==null&&e===k}function er(t,e){ga=su=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function lr(t,e,l){if((l&4194048)!==0){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,is(t,l)}}var on={readContext:Vt,use:du,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useLayoutEffect:_t,useInsertionEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useSyncExternalStore:_t,useId:_t,useHostTransitionStatus:_t,useFormState:_t,useActionState:_t,useOptimistic:_t,useMemoCache:_t,useCacheRefresh:_t};on.useEffectEvent=_t;var ar={readContext:Vt,use:du,useCallback:function(t,e){return kt().memoizedState=[t,e===void 0?null:e],t},useContext:Vt,useEffect:Xo,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,hu(4194308,4,wo.bind(null,e,t),l)},useLayoutEffect:function(t,e){return hu(4194308,4,t,e)},useInsertionEffect:function(t,e){hu(4,2,t,e)},useMemo:function(t,e){var l=kt();e=e===void 0?null:e;var a=t();if(Ll){Pe(!0);try{t()}finally{Pe(!1)}}return l.memoizedState=[a,e],a},useReducer:function(t,e,l){var a=kt();if(l!==void 0){var n=l(e);if(Ll){Pe(!0);try{l(e)}finally{Pe(!1)}}}else n=e;return a.memoizedState=a.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=Lh.bind(null,k,t),[a.memoizedState,t]},useRef:function(t){var e=kt();return t={current:t},e.memoizedState=t},useState:function(t){t=vc(t);var e=t.queue,l=tr.bind(null,k,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:Sc,useDeferredValue:function(t,e){var l=kt();return xc(l,t,e)},useTransition:function(){var t=vc(!1);return t=Wo.bind(null,k,t.queue,!0,!1),kt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var a=k,n=kt();if(nt){if(l===void 0)throw Error(o(407));l=l()}else{if(l=e(),xt===null)throw Error(o(349));(lt&127)!==0||zo(a,e,l)}n.memoizedState=l;var u={value:l,getSnapshot:e};return n.queue=u,Xo(Mo.bind(null,a,u,t),[t]),a.flags|=2048,va(9,{destroy:void 0},Eo.bind(null,a,u,l,e),null),l},useId:function(){var t=kt(),e=xt.identifierPrefix;if(nt){var l=De,a=Ce;l=(a&~(1<<32-ie(a)-1)).toString(32)+l,e="_"+e+"R_"+l,l=ou++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=Hh++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Ac,useFormState:No,useActionState:No,useOptimistic:function(t){var e=kt();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=zc.bind(null,k,!0,l),l.dispatch=e,[t,e]},useMemoCache:hc,useCacheRefresh:function(){return kt().memoizedState=Xh.bind(null,k)},useEffectEvent:function(t){var e=kt(),l={impl:t};return e.memoizedState=l,function(){if((st&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},Ec={readContext:Vt,use:du,useCallback:Ko,useContext:Vt,useEffect:bc,useImperativeHandle:Zo,useInsertionEffect:Qo,useLayoutEffect:Vo,useMemo:Jo,useReducer:yu,useRef:Go,useState:function(){return yu(Ve)},useDebugValue:Sc,useDeferredValue:function(t,e){var l=jt();return ko(l,mt.memoizedState,t,e)},useTransition:function(){var t=yu(Ve)[0],e=jt().memoizedState;return[typeof t=="boolean"?t:fn(t),e]},useSyncExternalStore:Ao,useId:Io,useHostTransitionStatus:Ac,useFormState:Bo,useActionState:Bo,useOptimistic:function(t,e){var l=jt();return Co(l,mt,t,e)},useMemoCache:hc,useCacheRefresh:Po};Ec.useEffectEvent=Lo;var nr={readContext:Vt,use:du,useCallback:Ko,useContext:Vt,useEffect:bc,useImperativeHandle:Zo,useInsertionEffect:Qo,useLayoutEffect:Vo,useMemo:Jo,useReducer:mc,useRef:Go,useState:function(){return mc(Ve)},useDebugValue:Sc,useDeferredValue:function(t,e){var l=jt();return mt===null?xc(l,t,e):ko(l,mt.memoizedState,t,e)},useTransition:function(){var t=mc(Ve)[0],e=jt().memoizedState;return[typeof t=="boolean"?t:fn(t),e]},useSyncExternalStore:Ao,useId:Io,useHostTransitionStatus:Ac,useFormState:Yo,useActionState:Yo,useOptimistic:function(t,e){var l=jt();return mt!==null?Co(l,mt,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:hc,useCacheRefresh:Po};nr.useEffectEvent=Lo;function Mc(t,e,l,a){e=t.memoizedState,l=l(a,e),l=l==null?e:_({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var _c={enqueueSetState:function(t,e,l){t=t._reactInternals;var a=ye(),n=cl(a);n.payload=e,l!=null&&(n.callback=l),e=fl(t,n,a),e!==null&&(ae(e,t,a),an(e,t,a))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var a=ye(),n=cl(a);n.tag=1,n.payload=e,l!=null&&(n.callback=l),e=fl(t,n,a),e!==null&&(ae(e,t,a),an(e,t,a))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=ye(),a=cl(l);a.tag=2,e!=null&&(a.callback=e),e=fl(t,a,l),e!==null&&(ae(e,t,l),an(e,t,l))}};function ur(t,e,l,a,n,u,i){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(a,u,i):e.prototype&&e.prototype.isPureReactComponent?!Wa(l,a)||!Wa(n,u):!0}function ir(t,e,l,a){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,a),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,a),e.state!==t&&_c.enqueueReplaceState(e,e.state,null)}function Ql(t,e){var l=e;if("ref"in e){l={};for(var a in e)a!=="ref"&&(l[a]=e[a])}if(t=t.defaultProps){l===e&&(l=_({},l));for(var n in t)l[n]===void 0&&(l[n]=t[n])}return l}function cr(t){kn(t)}function fr(t){console.error(t)}function sr(t){kn(t)}function vu(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(a){setTimeout(function(){throw a})}}function or(t,e,l){try{var a=t.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Oc(t,e,l){return l=cl(l),l.tag=3,l.payload={element:null},l.callback=function(){vu(t,e)},l}function rr(t){return t=cl(t),t.tag=3,t}function dr(t,e,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var u=a.value;t.payload=function(){return n(u)},t.callback=function(){or(e,l,a)}}var i=l.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(t.callback=function(){or(e,l,a),typeof n!="function"&&(hl===null?hl=new Set([this]):hl.add(this));var c=a.stack;this.componentDidCatch(a.value,{componentStack:c!==null?c:""})})}function Qh(t,e,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(e=l.alternate,e!==null&&sa(e,l,n,!0),l=se.current,l!==null){switch(l.tag){case 31:case 13:return xe===null?Cu():l.alternate===null&&Ot===0&&(Ot=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===nu?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([a]):e.add(a),Pc(t,a,n)),!1;case 22:return l.flags|=65536,a===nu?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([a]):l.add(a)),Pc(t,a,n)),!1}throw Error(o(435,l.tag))}return Pc(t,a,n),Cu(),!1}if(nt)return e=se.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=n,a!==Ji&&(t=Error(o(422),{cause:a}),Ia(ve(t,l)))):(a!==Ji&&(e=Error(o(423),{cause:a}),Ia(ve(e,l))),t=t.current.alternate,t.flags|=65536,n&=-n,t.lanes|=n,a=ve(a,l),n=Oc(t.stateNode,a,n),nc(t,n),Ot!==4&&(Ot=2)),!1;var u=Error(o(520),{cause:a});if(u=ve(u,l),pn===null?pn=[u]:pn.push(u),Ot!==4&&(Ot=2),e===null)return!0;a=ve(a,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=n&-n,l.lanes|=t,t=Oc(l.stateNode,a,t),nc(l,t),!1;case 1:if(e=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(hl===null||!hl.has(u))))return l.flags|=65536,n&=-n,l.lanes|=n,n=rr(n),dr(n,t,l,a),nc(l,n),!1}l=l.return}while(l!==null);return!1}var Cc=Error(o(461)),Bt=!1;function wt(t,e,l,a){e.child=t===null?mo(e,null,l,a):Xl(e,t.child,l,a)}function yr(t,e,l,a,n){l=l.render;var u=e.ref;if("ref"in a){var i={};for(var c in a)c!=="ref"&&(i[c]=a[c])}else i=a;return Bl(e),a=oc(t,e,l,i,u,n),c=rc(),t!==null&&!Bt?(dc(t,e,n),we(t,e,n)):(nt&&c&&Zi(e),e.flags|=1,wt(t,e,a,n),e.child)}function hr(t,e,l,a,n){if(t===null){var u=l.type;return typeof u=="function"&&!Qi(u)&&u.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=u,gr(t,e,u,a,n)):(t=In(l.type,null,a,e,e.mode,n),t.ref=e.ref,t.return=e,e.child=t)}if(u=t.child,!qc(t,n)){var i=u.memoizedProps;if(l=l.compare,l=l!==null?l:Wa,l(i,a)&&t.ref===e.ref)return we(t,e,n)}return e.flags|=1,t=Ye(u,a),t.ref=e.ref,t.return=e,e.child=t}function gr(t,e,l,a,n){if(t!==null){var u=t.memoizedProps;if(Wa(u,a)&&t.ref===e.ref)if(Bt=!1,e.pendingProps=a=u,qc(t,n))(t.flags&131072)!==0&&(Bt=!0);else return e.lanes=t.lanes,we(t,e,n)}return Dc(t,e,l,a,n)}function mr(t,e,l,a){var n=a.children,u=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((e.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,t!==null){for(a=e.child=t.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~u}else a=0,e.child=null;return vr(t,e,u,l,a)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&lu(e,u!==null?u.cachePool:null),u!==null?bo(e,u):ic(),So(e);else return a=e.lanes=536870912,vr(t,e,u!==null?u.baseLanes|l:l,l,a)}else u!==null?(lu(e,u.cachePool),bo(e,u),ol(),e.memoizedState=null):(t!==null&&lu(e,null),ic(),ol());return wt(t,e,n,l),e.child}function rn(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function vr(t,e,l,a,n){var u=tc();return u=u===null?null:{parent:Ht._currentValue,pool:u},e.memoizedState={baseLanes:l,cachePool:u},t!==null&&lu(e,null),ic(),So(e),t!==null&&sa(t,e,a,!0),e.childLanes=n,null}function pu(t,e){return e=Su({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function pr(t,e,l){return Xl(e,t.child,null,l),t=pu(e,e.pendingProps),t.flags|=2,oe(e),e.memoizedState=null,t}function Vh(t,e,l){var a=e.pendingProps,n=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(nt){if(a.mode==="hidden")return t=pu(e,a),e.lanes=536870912,rn(null,t);if(fc(e),(t=Tt)?(t=Dd(t,Se),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ll!==null?{id:Ce,overflow:De}:null,retryLane:536870912,hydrationErrors:null},l=to(t),l.return=e,e.child=l,Qt=e,Tt=null)):t=null,t===null)throw nl(e);return e.lanes=536870912,null}return pu(e,a)}var u=t.memoizedState;if(u!==null){var i=u.dehydrated;if(fc(e),n)if(e.flags&256)e.flags&=-257,e=pr(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(o(558));else if(Bt||sa(t,e,l,!1),n=(l&t.childLanes)!==0,Bt||n){if(a=xt,a!==null&&(i=cs(a,l),i!==0&&i!==u.retryLane))throw u.retryLane=i,jl(t,i),ae(a,t,i),Cc;Cu(),e=pr(t,e,l)}else t=u.treeContext,Tt=Te(i.nextSibling),Qt=e,nt=!0,al=null,Se=!1,t!==null&&ao(e,t),e=pu(e,a),e.flags|=4096;return e}return t=Ye(t.child,{mode:a.mode,children:a.children}),t.ref=e.ref,e.child=t,t.return=e,t}function bu(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function Dc(t,e,l,a,n){return Bl(e),l=oc(t,e,l,a,void 0,n),a=rc(),t!==null&&!Bt?(dc(t,e,n),we(t,e,n)):(nt&&a&&Zi(e),e.flags|=1,wt(t,e,l,n),e.child)}function br(t,e,l,a,n,u){return Bl(e),e.updateQueue=null,l=To(e,a,l,n),xo(t),a=rc(),t!==null&&!Bt?(dc(t,e,u),we(t,e,u)):(nt&&a&&Zi(e),e.flags|=1,wt(t,e,l,u),e.child)}function Sr(t,e,l,a,n){if(Bl(e),e.stateNode===null){var u=ua,i=l.contextType;typeof i=="object"&&i!==null&&(u=Vt(i)),u=new l(a,u),e.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=_c,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=a,u.state=e.memoizedState,u.refs={},lc(e),i=l.contextType,u.context=typeof i=="object"&&i!==null?Vt(i):ua,u.state=e.memoizedState,i=l.getDerivedStateFromProps,typeof i=="function"&&(Mc(e,l,i,a),u.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(i=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),i!==u.state&&_c.enqueueReplaceState(u,u.state,null),un(e,a,u,n),nn(),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308),a=!0}else if(t===null){u=e.stateNode;var c=e.memoizedProps,s=Ql(l,c);u.props=s;var v=u.context,T=l.contextType;i=ua,typeof T=="object"&&T!==null&&(i=Vt(T));var E=l.getDerivedStateFromProps;T=typeof E=="function"||typeof u.getSnapshotBeforeUpdate=="function",c=e.pendingProps!==c,T||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(c||v!==i)&&ir(e,u,a,i),il=!1;var p=e.memoizedState;u.state=p,un(e,a,u,n),nn(),v=e.memoizedState,c||p!==v||il?(typeof E=="function"&&(Mc(e,l,E,a),v=e.memoizedState),(s=il||ur(e,l,s,a,p,v,i))?(T||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(e.flags|=4194308)):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=a,e.memoizedState=v),u.props=a,u.state=v,u.context=i,a=s):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),a=!1)}else{u=e.stateNode,ac(t,e),i=e.memoizedProps,T=Ql(l,i),u.props=T,E=e.pendingProps,p=u.context,v=l.contextType,s=ua,typeof v=="object"&&v!==null&&(s=Vt(v)),c=l.getDerivedStateFromProps,(v=typeof c=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==E||p!==s)&&ir(e,u,a,s),il=!1,p=e.memoizedState,u.state=p,un(e,a,u,n),nn();var S=e.memoizedState;i!==E||p!==S||il||t!==null&&t.dependencies!==null&&tu(t.dependencies)?(typeof c=="function"&&(Mc(e,l,c,a),S=e.memoizedState),(T=il||ur(e,l,T,a,p,S,s)||t!==null&&t.dependencies!==null&&tu(t.dependencies))?(v||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,S,s),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,S,s)),typeof u.componentDidUpdate=="function"&&(e.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof u.componentDidUpdate!="function"||i===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=a,e.memoizedState=S),u.props=a,u.state=S,u.context=s,a=T):(typeof u.componentDidUpdate!="function"||i===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),a=!1)}return u=a,bu(t,e),a=(e.flags&128)!==0,u||a?(u=e.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:u.render(),e.flags|=1,t!==null&&a?(e.child=Xl(e,t.child,null,n),e.child=Xl(e,null,l,n)):wt(t,e,l,n),e.memoizedState=u.state,t=e.child):t=we(t,e,n),t}function xr(t,e,l,a){return Hl(),e.flags|=256,wt(t,e,l,a),e.child}var Uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jc(t){return{baseLanes:t,cachePool:so()}}function Rc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=de),t}function Tr(t,e,l){var a=e.pendingProps,n=!1,u=(e.flags&128)!==0,i;if((i=u)||(i=t!==null&&t.memoizedState===null?!1:(Ut.current&2)!==0),i&&(n=!0,e.flags&=-129),i=(e.flags&32)!==0,e.flags&=-33,t===null){if(nt){if(n?sl(e):ol(),(t=Tt)?(t=Dd(t,Se),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ll!==null?{id:Ce,overflow:De}:null,retryLane:536870912,hydrationErrors:null},l=to(t),l.return=e,e.child=l,Qt=e,Tt=null)):t=null,t===null)throw nl(e);return mf(t)?e.lanes=32:e.lanes=536870912,null}var c=a.children;return a=a.fallback,n?(ol(),n=e.mode,c=Su({mode:"hidden",children:c},n),a=Rl(a,n,l,null),c.return=e,a.return=e,c.sibling=a,e.child=c,a=e.child,a.memoizedState=jc(l),a.childLanes=Rc(t,i,l),e.memoizedState=Uc,rn(null,a)):(sl(e),Hc(e,c))}var s=t.memoizedState;if(s!==null&&(c=s.dehydrated,c!==null)){if(u)e.flags&256?(sl(e),e.flags&=-257,e=Nc(t,e,l)):e.memoizedState!==null?(ol(),e.child=t.child,e.flags|=128,e=null):(ol(),c=a.fallback,n=e.mode,a=Su({mode:"visible",children:a.children},n),c=Rl(c,n,l,null),c.flags|=2,a.return=e,c.return=e,a.sibling=c,e.child=a,Xl(e,t.child,null,l),a=e.child,a.memoizedState=jc(l),a.childLanes=Rc(t,i,l),e.memoizedState=Uc,e=rn(null,a));else if(sl(e),mf(c)){if(i=c.nextSibling&&c.nextSibling.dataset,i)var v=i.dgst;i=v,a=Error(o(419)),a.stack="",a.digest=i,Ia({value:a,source:null,stack:null}),e=Nc(t,e,l)}else if(Bt||sa(t,e,l,!1),i=(l&t.childLanes)!==0,Bt||i){if(i=xt,i!==null&&(a=cs(i,l),a!==0&&a!==s.retryLane))throw s.retryLane=a,jl(t,a),ae(i,t,a),Cc;gf(c)||Cu(),e=Nc(t,e,l)}else gf(c)?(e.flags|=192,e.child=t.child,e=null):(t=s.treeContext,Tt=Te(c.nextSibling),Qt=e,nt=!0,al=null,Se=!1,t!==null&&ao(e,t),e=Hc(e,a.children),e.flags|=4096);return e}return n?(ol(),c=a.fallback,n=e.mode,s=t.child,v=s.sibling,a=Ye(s,{mode:"hidden",children:a.children}),a.subtreeFlags=s.subtreeFlags&65011712,v!==null?c=Ye(v,c):(c=Rl(c,n,l,null),c.flags|=2),c.return=e,a.return=e,a.sibling=c,e.child=a,rn(null,a),a=e.child,c=t.child.memoizedState,c===null?c=jc(l):(n=c.cachePool,n!==null?(s=Ht._currentValue,n=n.parent!==s?{parent:s,pool:s}:n):n=so(),c={baseLanes:c.baseLanes|l,cachePool:n}),a.memoizedState=c,a.childLanes=Rc(t,i,l),e.memoizedState=Uc,rn(t.child,a)):(sl(e),l=t.child,t=l.sibling,l=Ye(l,{mode:"visible",children:a.children}),l.return=e,l.sibling=null,t!==null&&(i=e.deletions,i===null?(e.deletions=[t],e.flags|=16):i.push(t)),e.child=l,e.memoizedState=null,l)}function Hc(t,e){return e=Su({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Su(t,e){return t=fe(22,t,null,e),t.lanes=0,t}function Nc(t,e,l){return Xl(e,t.child,null,l),t=Hc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Ar(t,e,l){t.lanes|=e;var a=t.alternate;a!==null&&(a.lanes|=e),$i(t.return,e,l)}function Bc(t,e,l,a,n,u){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:u}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=l,i.tailMode=n,i.treeForkCount=u)}function zr(t,e,l){var a=e.pendingProps,n=a.revealOrder,u=a.tail;a=a.children;var i=Ut.current,c=(i&2)!==0;if(c?(i=i&1|2,e.flags|=128):i&=1,j(Ut,i),wt(t,e,a,l),a=nt?Fa:0,!c&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ar(t,l,e);else if(t.tag===19)Ar(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(n){case"forwards":for(l=e.child,n=null;l!==null;)t=l.alternate,t!==null&&fu(t)===null&&(n=l),l=l.sibling;l=n,l===null?(n=e.child,e.child=null):(n=l.sibling,l.sibling=null),Bc(e,!1,n,l,u,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=e.child,e.child=null;n!==null;){if(t=n.alternate,t!==null&&fu(t)===null){e.child=n;break}t=n.sibling,n.sibling=l,l=n,n=t}Bc(e,!0,l,null,u,a);break;case"together":Bc(e,!1,null,null,void 0,a);break;default:e.memoizedState=null}return e.child}function we(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),yl|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(sa(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(o(153));if(e.child!==null){for(t=e.child,l=Ye(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=Ye(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function qc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&tu(t)))}function wh(t,e,l){switch(e.tag){case 3:Jt(e,e.stateNode.containerInfo),ul(e,Ht,t.memoizedState.cache),Hl();break;case 27:case 5:Ba(e);break;case 4:Jt(e,e.stateNode.containerInfo);break;case 10:ul(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,fc(e),null;break;case 13:var a=e.memoizedState;if(a!==null)return a.dehydrated!==null?(sl(e),e.flags|=128,null):(l&e.child.childLanes)!==0?Tr(t,e,l):(sl(e),t=we(t,e,l),t!==null?t.sibling:null);sl(e);break;case 19:var n=(t.flags&128)!==0;if(a=(l&e.childLanes)!==0,a||(sa(t,e,l,!1),a=(l&e.childLanes)!==0),n){if(a)return zr(t,e,l);e.flags|=128}if(n=e.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),j(Ut,Ut.current),a)break;return null;case 22:return e.lanes=0,mr(t,e,l,e.pendingProps);case 24:ul(e,Ht,t.memoizedState.cache)}return we(t,e,l)}function Er(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Bt=!0;else{if(!qc(t,l)&&(e.flags&128)===0)return Bt=!1,wh(t,e,l);Bt=(t.flags&131072)!==0}else Bt=!1,nt&&(e.flags&1048576)!==0&&lo(e,Fa,e.index);switch(e.lanes=0,e.tag){case 16:t:{var a=e.pendingProps;if(t=Yl(e.elementType),e.type=t,typeof t=="function")Qi(t)?(a=Ql(t,a),e.tag=1,e=Sr(null,e,t,a,l)):(e.tag=0,e=Dc(null,e,t,a,l));else{if(t!=null){var n=t.$$typeof;if(n===Ct){e.tag=11,e=yr(null,e,t,a,l);break t}else if(n===Z){e.tag=14,e=hr(null,e,t,a,l);break t}}throw e=He(t)||t,Error(o(306,e,""))}}return e;case 0:return Dc(t,e,e.type,e.pendingProps,l);case 1:return a=e.type,n=Ql(a,e.pendingProps),Sr(t,e,a,n,l);case 3:t:{if(Jt(e,e.stateNode.containerInfo),t===null)throw Error(o(387));a=e.pendingProps;var u=e.memoizedState;n=u.element,ac(t,e),un(e,a,null,l);var i=e.memoizedState;if(a=i.cache,ul(e,Ht,a),a!==u.cache&&Fi(e,[Ht],l,!0),nn(),a=i.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:i.cache},e.updateQueue.baseState=u,e.memoizedState=u,e.flags&256){e=xr(t,e,a,l);break t}else if(a!==n){n=ve(Error(o(424)),e),Ia(n),e=xr(t,e,a,l);break t}else for(t=e.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,Tt=Te(t.firstChild),Qt=e,nt=!0,al=null,Se=!0,l=mo(e,null,a,l),e.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Hl(),a===n){e=we(t,e,l);break t}wt(t,e,a,l)}e=e.child}return e;case 26:return bu(t,e),t===null?(l=Bd(e.type,null,e.pendingProps,null))?e.memoizedState=l:nt||(l=e.type,t=e.pendingProps,a=Bu(P.current).createElement(l),a[Lt]=e,a[Ft]=t,Zt(a,l,t),Gt(a),e.stateNode=a):e.memoizedState=Bd(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Ba(e),t===null&&nt&&(a=e.stateNode=Rd(e.type,e.pendingProps,P.current),Qt=e,Se=!0,n=Tt,pl(e.type)?(vf=n,Tt=Te(a.firstChild)):Tt=n),wt(t,e,e.pendingProps.children,l),bu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&nt&&((n=a=Tt)&&(a=S0(a,e.type,e.pendingProps,Se),a!==null?(e.stateNode=a,Qt=e,Tt=Te(a.firstChild),Se=!1,n=!0):n=!1),n||nl(e)),Ba(e),n=e.type,u=e.pendingProps,i=t!==null?t.memoizedProps:null,a=u.children,df(n,u)?a=null:i!==null&&df(n,i)&&(e.flags|=32),e.memoizedState!==null&&(n=oc(t,e,Nh,null,null,l),Mn._currentValue=n),bu(t,e),wt(t,e,a,l),e.child;case 6:return t===null&&nt&&((t=l=Tt)&&(l=x0(l,e.pendingProps,Se),l!==null?(e.stateNode=l,Qt=e,Tt=null,t=!0):t=!1),t||nl(e)),null;case 13:return Tr(t,e,l);case 4:return Jt(e,e.stateNode.containerInfo),a=e.pendingProps,t===null?e.child=Xl(e,null,a,l):wt(t,e,a,l),e.child;case 11:return yr(t,e,e.type,e.pendingProps,l);case 7:return wt(t,e,e.pendingProps,l),e.child;case 8:return wt(t,e,e.pendingProps.children,l),e.child;case 12:return wt(t,e,e.pendingProps.children,l),e.child;case 10:return a=e.pendingProps,ul(e,e.type,a.value),wt(t,e,a.children,l),e.child;case 9:return n=e.type._context,a=e.pendingProps.children,Bl(e),n=Vt(n),a=a(n),e.flags|=1,wt(t,e,a,l),e.child;case 14:return hr(t,e,e.type,e.pendingProps,l);case 15:return gr(t,e,e.type,e.pendingProps,l);case 19:return zr(t,e,l);case 31:return Vh(t,e,l);case 22:return mr(t,e,l,e.pendingProps);case 24:return Bl(e),a=Vt(Ht),t===null?(n=tc(),n===null&&(n=xt,u=Ii(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=l),n=u),e.memoizedState={parent:a,cache:n},lc(e),ul(e,Ht,n)):((t.lanes&l)!==0&&(ac(t,e),un(e,null,null,l),nn()),n=t.memoizedState,u=e.memoizedState,n.parent!==a?(n={parent:a,cache:a},e.memoizedState=n,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=n),ul(e,Ht,a)):(a=u.cache,ul(e,Ht,a),a!==n.cache&&Fi(e,[Ht],l,!0))),wt(t,e,e.pendingProps.children,l),e.child;case 29:throw e.pendingProps}throw Error(o(156,e.tag))}function Ze(t){t.flags|=4}function Yc(t,e,l,a,n){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(n&335544128)===n)if(t.stateNode.complete)t.flags|=8192;else if(Ir())t.flags|=8192;else throw Gl=nu,ec}else t.flags&=-16777217}function Mr(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Ld(e))if(Ir())t.flags|=8192;else throw Gl=nu,ec}function xu(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?ns():536870912,t.lanes|=e,xa|=e)}function dn(t,e){if(!nt)switch(t.tailMode){case"hidden":e=t.tail;for(var l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:a.sibling=null}}function At(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,a=0;if(e)for(var n=t.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=t,n=n.sibling;else for(n=t.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=t,n=n.sibling;return t.subtreeFlags|=a,t.childLanes=l,e}function Zh(t,e,l){var a=e.pendingProps;switch(Ki(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(e),null;case 1:return At(e),null;case 3:return l=e.stateNode,a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),Le(Ht),Dt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(fa(e)?Ze(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,ki())),At(e),null;case 26:var n=e.type,u=e.memoizedState;return t===null?(Ze(e),u!==null?(At(e),Mr(e,u)):(At(e),Yc(e,n,null,a,l))):u?u!==t.memoizedState?(Ze(e),At(e),Mr(e,u)):(At(e),e.flags&=-16777217):(t=t.memoizedProps,t!==a&&Ze(e),At(e),Yc(e,n,t,a,l)),null;case 27:if(jn(e),l=P.current,n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==a&&Ze(e);else{if(!a){if(e.stateNode===null)throw Error(o(166));return At(e),null}t=H.current,fa(e)?no(e):(t=Rd(n,a,l),e.stateNode=t,Ze(e))}return At(e),null;case 5:if(jn(e),n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==a&&Ze(e);else{if(!a){if(e.stateNode===null)throw Error(o(166));return At(e),null}if(u=H.current,fa(e))no(e);else{var i=Bu(P.current);switch(u){case 1:u=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:u=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":u=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":u=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":u=i.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[Lt]=e,u[Ft]=a;t:for(i=e.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}e.stateNode=u;t:switch(Zt(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&Ze(e)}}return At(e),Yc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&Ze(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(o(166));if(t=P.current,fa(e)){if(t=e.stateNode,l=e.memoizedProps,a=null,n=Qt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}t[Lt]=e,t=!!(t.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Td(t.nodeValue,l)),t||nl(e,!0)}else t=Bu(t).createTextNode(a),t[Lt]=e,e.stateNode=t}return At(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(a=fa(e),l!==null){if(t===null){if(!a)throw Error(o(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[Lt]=e}else Hl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;At(e),t=!1}else l=ki(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(oe(e),e):(oe(e),null);if((e.flags&128)!==0)throw Error(o(558))}return At(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=fa(e),a!==null&&a.dehydrated!==null){if(t===null){if(!n)throw Error(o(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));n[Lt]=e}else Hl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;At(e),n=!1}else n=ki(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),n=!0;if(!n)return e.flags&256?(oe(e),e):(oe(e),null)}return oe(e),(e.flags&128)!==0?(e.lanes=l,e):(l=a!==null,t=t!==null&&t.memoizedState!==null,l&&(a=e.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),xu(e,e.updateQueue),At(e),null);case 4:return Dt(),t===null&&cf(e.stateNode.containerInfo),At(e),null;case 10:return Le(e.type),At(e),null;case 19:if(M(Ut),a=e.memoizedState,a===null)return At(e),null;if(n=(e.flags&128)!==0,u=a.rendering,u===null)if(n)dn(a,!1);else{if(Ot!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=fu(t),u!==null){for(e.flags|=128,dn(a,!1),t=u.updateQueue,e.updateQueue=t,xu(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Ps(l,t),l=l.sibling;return j(Ut,Ut.current&1|2),nt&&Ge(e,a.treeForkCount),e.child}t=t.sibling}a.tail!==null&&ne()>Mu&&(e.flags|=128,n=!0,dn(a,!1),e.lanes=4194304)}else{if(!n)if(t=fu(u),t!==null){if(e.flags|=128,n=!0,t=t.updateQueue,e.updateQueue=t,xu(e,t),dn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!nt)return At(e),null}else 2*ne()-a.renderingStartTime>Mu&&l!==536870912&&(e.flags|=128,n=!0,dn(a,!1),e.lanes=4194304);a.isBackwards?(u.sibling=e.child,e.child=u):(t=a.last,t!==null?t.sibling=u:e.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ne(),t.sibling=null,l=Ut.current,j(Ut,n?l&1|2:l&1),nt&&Ge(e,a.treeForkCount),t):(At(e),null);case 22:case 23:return oe(e),cc(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(l&536870912)!==0&&(e.flags&128)===0&&(At(e),e.subtreeFlags&6&&(e.flags|=8192)):At(e),l=e.updateQueue,l!==null&&xu(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==l&&(e.flags|=2048),t!==null&&M(ql),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Le(Ht),At(e),null;case 25:return null;case 30:return null}throw Error(o(156,e.tag))}function Kh(t,e){switch(Ki(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Le(Ht),Dt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return jn(e),null;case 31:if(e.memoizedState!==null){if(oe(e),e.alternate===null)throw Error(o(340));Hl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(oe(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(o(340));Hl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return M(Ut),null;case 4:return Dt(),null;case 10:return Le(e.type),null;case 22:case 23:return oe(e),cc(),t!==null&&M(ql),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Le(Ht),null;case 25:return null;default:return null}}function _r(t,e){switch(Ki(e),e.tag){case 3:Le(Ht),Dt();break;case 26:case 27:case 5:jn(e);break;case 4:Dt();break;case 31:e.memoizedState!==null&&oe(e);break;case 13:oe(e);break;case 19:M(Ut);break;case 10:Le(e.type);break;case 22:case 23:oe(e),cc(),t!==null&&M(ql);break;case 24:Le(Ht)}}function yn(t,e){try{var l=e.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&t)===t){a=void 0;var u=l.create,i=l.inst;a=u(),i.destroy=a}l=l.next}while(l!==n)}}catch(c){yt(e,e.return,c)}}function rl(t,e,l){try{var a=e.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&t)===t){var i=a.inst,c=i.destroy;if(c!==void 0){i.destroy=void 0,n=e;var s=l,v=c;try{v()}catch(T){yt(n,s,T)}}}a=a.next}while(a!==u)}}catch(T){yt(e,e.return,T)}}function Or(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{po(e,l)}catch(a){yt(t,t.return,a)}}}function Cr(t,e,l){l.props=Ql(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(a){yt(t,e,a)}}function hn(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}typeof l=="function"?t.refCleanup=l(a):l.current=a}}catch(n){yt(t,e,n)}}function Ue(t,e){var l=t.ref,a=t.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){yt(t,e,n)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){yt(t,e,n)}else l.current=null}function Dr(t){var e=t.type,l=t.memoizedProps,a=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break t;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){yt(t,t.return,n)}}function Gc(t,e,l){try{var a=t.stateNode;h0(a,t.type,l,e),a[Ft]=e}catch(n){yt(t,t.return,n)}}function Ur(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&pl(t.type)||t.tag===4}function Xc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ur(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&pl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Lc(t,e,l){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=Be));else if(a!==4&&(a===27&&pl(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Lc(t,e,l),t=t.sibling;t!==null;)Lc(t,e,l),t=t.sibling}function Tu(t,e,l){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(a!==4&&(a===27&&pl(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Tu(t,e,l),t=t.sibling;t!==null;)Tu(t,e,l),t=t.sibling}function jr(t){var e=t.stateNode,l=t.memoizedProps;try{for(var a=t.type,n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Zt(e,a,l),e[Lt]=t,e[Ft]=l}catch(u){yt(t,t.return,u)}}var Ke=!1,qt=!1,Qc=!1,Rr=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function Jh(t,e){if(t=t.containerInfo,of=Vu,t=ws(t),Ni(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break t}var i=0,c=-1,s=-1,v=0,T=0,E=t,p=null;e:for(;;){for(var S;E!==l||n!==0&&E.nodeType!==3||(c=i+n),E!==u||a!==0&&E.nodeType!==3||(s=i+a),E.nodeType===3&&(i+=E.nodeValue.length),(S=E.firstChild)!==null;)p=E,E=S;for(;;){if(E===t)break e;if(p===l&&++v===n&&(c=i),p===u&&++T===a&&(s=i),(S=E.nextSibling)!==null)break;E=p,p=E.parentNode}E=S}l=c===-1||s===-1?null:{start:c,end:s}}else l=null}l=l||{start:0,end:0}}else l=null;for(rf={focusedElem:t,selectionRange:l},Vu=!1,Xt=e;Xt!==null;)if(e=Xt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Xt=t;else for(;Xt!==null;){switch(e=Xt,u=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)n=t[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&u!==null){t=void 0,l=e,n=u.memoizedProps,u=u.memoizedState,a=l.stateNode;try{var R=Ql(l.type,n);t=a.getSnapshotBeforeUpdate(R,u),a.__reactInternalSnapshotBeforeUpdate=t}catch(X){yt(l,l.return,X)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,l=t.nodeType,l===9)hf(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":hf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(o(163))}if(t=e.sibling,t!==null){t.return=e.return,Xt=t;break}Xt=e.return}}function Hr(t,e,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ke(t,l),a&4&&yn(5,l);break;case 1:if(ke(t,l),a&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(i){yt(l,l.return,i)}else{var n=Ql(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(n,e,t.__reactInternalSnapshotBeforeUpdate)}catch(i){yt(l,l.return,i)}}a&64&&Or(l),a&512&&hn(l,l.return);break;case 3:if(ke(t,l),a&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{po(t,e)}catch(i){yt(l,l.return,i)}}break;case 27:e===null&&a&4&&jr(l);case 26:case 5:ke(t,l),e===null&&a&4&&Dr(l),a&512&&hn(l,l.return);break;case 12:ke(t,l);break;case 31:ke(t,l),a&4&&qr(t,l);break;case 13:ke(t,l),a&4&&Yr(t,l),a&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=l0.bind(null,l),T0(t,l))));break;case 22:if(a=l.memoizedState!==null||Ke,!a){e=e!==null&&e.memoizedState!==null||qt,n=Ke;var u=qt;Ke=a,(qt=e)&&!u?We(t,l,(l.subtreeFlags&8772)!==0):ke(t,l),Ke=n,qt=u}break;case 30:break;default:ke(t,l)}}function Nr(t){var e=t.alternate;e!==null&&(t.alternate=null,Nr(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&pi(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var zt=null,Pt=!1;function Je(t,e,l){for(l=l.child;l!==null;)Br(t,e,l),l=l.sibling}function Br(t,e,l){if(ue&&typeof ue.onCommitFiberUnmount=="function")try{ue.onCommitFiberUnmount(qa,l)}catch{}switch(l.tag){case 26:qt||Ue(l,e),Je(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:qt||Ue(l,e);var a=zt,n=Pt;pl(l.type)&&(zt=l.stateNode,Pt=!1),Je(t,e,l),An(l.stateNode),zt=a,Pt=n;break;case 5:qt||Ue(l,e);case 6:if(a=zt,n=Pt,zt=null,Je(t,e,l),zt=a,Pt=n,zt!==null)if(Pt)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(l.stateNode)}catch(u){yt(l,e,u)}else try{zt.removeChild(l.stateNode)}catch(u){yt(l,e,u)}break;case 18:zt!==null&&(Pt?(t=zt,Od(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Ca(t)):Od(zt,l.stateNode));break;case 4:a=zt,n=Pt,zt=l.stateNode.containerInfo,Pt=!0,Je(t,e,l),zt=a,Pt=n;break;case 0:case 11:case 14:case 15:rl(2,l,e),qt||rl(4,l,e),Je(t,e,l);break;case 1:qt||(Ue(l,e),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Cr(l,e,a)),Je(t,e,l);break;case 21:Je(t,e,l);break;case 22:qt=(a=qt)||l.memoizedState!==null,Je(t,e,l),qt=a;break;default:Je(t,e,l)}}function qr(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ca(t)}catch(l){yt(e,e.return,l)}}}function Yr(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ca(t)}catch(l){yt(e,e.return,l)}}function kh(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Rr),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Rr),e;default:throw Error(o(435,t.tag))}}function Au(t,e){var l=kh(t);e.forEach(function(a){if(!l.has(a)){l.add(a);var n=a0.bind(null,t,a);a.then(n,n)}})}function te(t,e){var l=e.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],u=t,i=e,c=i;t:for(;c!==null;){switch(c.tag){case 27:if(pl(c.type)){zt=c.stateNode,Pt=!1;break t}break;case 5:zt=c.stateNode,Pt=!1;break t;case 3:case 4:zt=c.stateNode.containerInfo,Pt=!0;break t}c=c.return}if(zt===null)throw Error(o(160));Br(u,i,n),zt=null,Pt=!1,u=n.alternate,u!==null&&(u.return=null),n.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Gr(e,t),e=e.sibling}var Me=null;function Gr(t,e){var l=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:te(e,t),ee(t),a&4&&(rl(3,t,t.return),yn(3,t),rl(5,t,t.return));break;case 1:te(e,t),ee(t),a&512&&(qt||l===null||Ue(l,l.return)),a&64&&Ke&&(t=t.updateQueue,t!==null&&(a=t.callbacks,a!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=Me;if(te(e,t),ee(t),a&512&&(qt||l===null||Ue(l,l.return)),a&4){var u=l!==null?l.memoizedState:null;if(a=t.memoizedState,l===null)if(a===null)if(t.stateNode===null){t:{a=t.type,l=t.memoizedProps,n=n.ownerDocument||n;e:switch(a){case"title":u=n.getElementsByTagName("title")[0],(!u||u[Xa]||u[Lt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=n.createElement(a),n.head.insertBefore(u,n.querySelector("head > title"))),Zt(u,a,l),u[Lt]=t,Gt(u),a=u;break t;case"link":var i=Gd("link","href",n).get(a+(l.href||""));if(i){for(var c=0;c<i.length;c++)if(u=i[c],u.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&u.getAttribute("rel")===(l.rel==null?null:l.rel)&&u.getAttribute("title")===(l.title==null?null:l.title)&&u.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){i.splice(c,1);break e}}u=n.createElement(a),Zt(u,a,l),n.head.appendChild(u);break;case"meta":if(i=Gd("meta","content",n).get(a+(l.content||""))){for(c=0;c<i.length;c++)if(u=i[c],u.getAttribute("content")===(l.content==null?null:""+l.content)&&u.getAttribute("name")===(l.name==null?null:l.name)&&u.getAttribute("property")===(l.property==null?null:l.property)&&u.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&u.getAttribute("charset")===(l.charSet==null?null:l.charSet)){i.splice(c,1);break e}}u=n.createElement(a),Zt(u,a,l),n.head.appendChild(u);break;default:throw Error(o(468,a))}u[Lt]=t,Gt(u),a=u}t.stateNode=a}else Xd(n,t.type,t.stateNode);else t.stateNode=Yd(n,a,t.memoizedProps);else u!==a?(u===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):u.count--,a===null?Xd(n,t.type,t.stateNode):Yd(n,a,t.memoizedProps)):a===null&&t.stateNode!==null&&Gc(t,t.memoizedProps,l.memoizedProps)}break;case 27:te(e,t),ee(t),a&512&&(qt||l===null||Ue(l,l.return)),l!==null&&a&4&&Gc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(te(e,t),ee(t),a&512&&(qt||l===null||Ue(l,l.return)),t.flags&32){n=t.stateNode;try{Il(n,"")}catch(R){yt(t,t.return,R)}}a&4&&t.stateNode!=null&&(n=t.memoizedProps,Gc(t,n,l!==null?l.memoizedProps:n)),a&1024&&(Qc=!0);break;case 6:if(te(e,t),ee(t),a&4){if(t.stateNode===null)throw Error(o(162));a=t.memoizedProps,l=t.stateNode;try{l.nodeValue=a}catch(R){yt(t,t.return,R)}}break;case 3:if(Gu=null,n=Me,Me=qu(e.containerInfo),te(e,t),Me=n,ee(t),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Ca(e.containerInfo)}catch(R){yt(t,t.return,R)}Qc&&(Qc=!1,Xr(t));break;case 4:a=Me,Me=qu(t.stateNode.containerInfo),te(e,t),ee(t),Me=a;break;case 12:te(e,t),ee(t);break;case 31:te(e,t),ee(t),a&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,Au(t,a)));break;case 13:te(e,t),ee(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Eu=ne()),a&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,Au(t,a)));break;case 22:n=t.memoizedState!==null;var s=l!==null&&l.memoizedState!==null,v=Ke,T=qt;if(Ke=v||n,qt=T||s,te(e,t),qt=T,Ke=v,ee(t),a&8192)t:for(e=t.stateNode,e._visibility=n?e._visibility&-2:e._visibility|1,n&&(l===null||s||Ke||qt||Vl(t)),l=null,e=t;;){if(e.tag===5||e.tag===26){if(l===null){s=l=e;try{if(u=s.stateNode,n)i=u.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{c=s.stateNode;var E=s.memoizedProps.style,p=E!=null&&E.hasOwnProperty("display")?E.display:null;c.style.display=p==null||typeof p=="boolean"?"":(""+p).trim()}}catch(R){yt(s,s.return,R)}}}else if(e.tag===6){if(l===null){s=e;try{s.stateNode.nodeValue=n?"":s.memoizedProps}catch(R){yt(s,s.return,R)}}}else if(e.tag===18){if(l===null){s=e;try{var S=s.stateNode;n?Cd(S,!0):Cd(s.stateNode,!1)}catch(R){yt(s,s.return,R)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;l===e&&(l=null),e=e.return}l===e&&(l=null),e.sibling.return=e.return,e=e.sibling}a&4&&(a=t.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Au(t,l))));break;case 19:te(e,t),ee(t),a&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,Au(t,a)));break;case 30:break;case 21:break;default:te(e,t),ee(t)}}function ee(t){var e=t.flags;if(e&2){try{for(var l,a=t.return;a!==null;){if(Ur(a)){l=a;break}a=a.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var n=l.stateNode,u=Xc(t);Tu(t,u,n);break;case 5:var i=l.stateNode;l.flags&32&&(Il(i,""),l.flags&=-33);var c=Xc(t);Tu(t,c,i);break;case 3:case 4:var s=l.stateNode.containerInfo,v=Xc(t);Lc(t,v,s);break;default:throw Error(o(161))}}catch(T){yt(t,t.return,T)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Xr(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Xr(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function ke(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Hr(t,e.alternate,e),e=e.sibling}function Vl(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:rl(4,e,e.return),Vl(e);break;case 1:Ue(e,e.return);var l=e.stateNode;typeof l.componentWillUnmount=="function"&&Cr(e,e.return,l),Vl(e);break;case 27:An(e.stateNode);case 26:case 5:Ue(e,e.return),Vl(e);break;case 22:e.memoizedState===null&&Vl(e);break;case 30:Vl(e);break;default:Vl(e)}t=t.sibling}}function We(t,e,l){for(l=l&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var a=e.alternate,n=t,u=e,i=u.flags;switch(u.tag){case 0:case 11:case 15:We(n,u,l),yn(4,u);break;case 1:if(We(n,u,l),a=u,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(v){yt(a,a.return,v)}if(a=u,n=a.updateQueue,n!==null){var c=a.stateNode;try{var s=n.shared.hiddenCallbacks;if(s!==null)for(n.shared.hiddenCallbacks=null,n=0;n<s.length;n++)vo(s[n],c)}catch(v){yt(a,a.return,v)}}l&&i&64&&Or(u),hn(u,u.return);break;case 27:jr(u);case 26:case 5:We(n,u,l),l&&a===null&&i&4&&Dr(u),hn(u,u.return);break;case 12:We(n,u,l);break;case 31:We(n,u,l),l&&i&4&&qr(n,u);break;case 13:We(n,u,l),l&&i&4&&Yr(n,u);break;case 22:u.memoizedState===null&&We(n,u,l),hn(u,u.return);break;case 30:break;default:We(n,u,l)}e=e.sibling}}function Vc(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&Pa(l))}function wc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Pa(t))}function _e(t,e,l,a){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lr(t,e,l,a),e=e.sibling}function Lr(t,e,l,a){var n=e.flags;switch(e.tag){case 0:case 11:case 15:_e(t,e,l,a),n&2048&&yn(9,e);break;case 1:_e(t,e,l,a);break;case 3:_e(t,e,l,a),n&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Pa(t)));break;case 12:if(n&2048){_e(t,e,l,a),t=e.stateNode;try{var u=e.memoizedProps,i=u.id,c=u.onPostCommit;typeof c=="function"&&c(i,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(s){yt(e,e.return,s)}}else _e(t,e,l,a);break;case 31:_e(t,e,l,a);break;case 13:_e(t,e,l,a);break;case 23:break;case 22:u=e.stateNode,i=e.alternate,e.memoizedState!==null?u._visibility&2?_e(t,e,l,a):gn(t,e):u._visibility&2?_e(t,e,l,a):(u._visibility|=2,pa(t,e,l,a,(e.subtreeFlags&10256)!==0||!1)),n&2048&&Vc(i,e);break;case 24:_e(t,e,l,a),n&2048&&wc(e.alternate,e);break;default:_e(t,e,l,a)}}function pa(t,e,l,a,n){for(n=n&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var u=t,i=e,c=l,s=a,v=i.flags;switch(i.tag){case 0:case 11:case 15:pa(u,i,c,s,n),yn(8,i);break;case 23:break;case 22:var T=i.stateNode;i.memoizedState!==null?T._visibility&2?pa(u,i,c,s,n):gn(u,i):(T._visibility|=2,pa(u,i,c,s,n)),n&&v&2048&&Vc(i.alternate,i);break;case 24:pa(u,i,c,s,n),n&&v&2048&&wc(i.alternate,i);break;default:pa(u,i,c,s,n)}e=e.sibling}}function gn(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,a=e,n=a.flags;switch(a.tag){case 22:gn(l,a),n&2048&&Vc(a.alternate,a);break;case 24:gn(l,a),n&2048&&wc(a.alternate,a);break;default:gn(l,a)}e=e.sibling}}var mn=8192;function ba(t,e,l){if(t.subtreeFlags&mn)for(t=t.child;t!==null;)Qr(t,e,l),t=t.sibling}function Qr(t,e,l){switch(t.tag){case 26:ba(t,e,l),t.flags&mn&&t.memoizedState!==null&&H0(l,Me,t.memoizedState,t.memoizedProps);break;case 5:ba(t,e,l);break;case 3:case 4:var a=Me;Me=qu(t.stateNode.containerInfo),ba(t,e,l),Me=a;break;case 22:t.memoizedState===null&&(a=t.alternate,a!==null&&a.memoizedState!==null?(a=mn,mn=16777216,ba(t,e,l),mn=a):ba(t,e,l));break;default:ba(t,e,l)}}function Vr(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function vn(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var a=e[l];Xt=a,Zr(a,t)}Vr(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wr(t),t=t.sibling}function wr(t){switch(t.tag){case 0:case 11:case 15:vn(t),t.flags&2048&&rl(9,t,t.return);break;case 3:vn(t);break;case 12:vn(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,zu(t)):vn(t);break;default:vn(t)}}function zu(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var a=e[l];Xt=a,Zr(a,t)}Vr(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:rl(8,e,e.return),zu(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,zu(e));break;default:zu(e)}t=t.sibling}}function Zr(t,e){for(;Xt!==null;){var l=Xt;switch(l.tag){case 0:case 11:case 15:rl(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Pa(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Xt=a;else t:for(l=t;Xt!==null;){a=Xt;var n=a.sibling,u=a.return;if(Nr(a),a===l){Xt=null;break t}if(n!==null){n.return=u,Xt=n;break t}Xt=u}}}var Wh={getCacheForType:function(t){var e=Vt(Ht),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return Vt(Ht).controller.signal}},$h=typeof WeakMap=="function"?WeakMap:Map,st=0,xt=null,tt=null,lt=0,dt=0,re=null,dl=!1,Sa=!1,Zc=!1,$e=0,Ot=0,yl=0,wl=0,Kc=0,de=0,xa=0,pn=null,le=null,Jc=!1,Eu=0,Kr=0,Mu=1/0,_u=null,hl=null,Yt=0,gl=null,Ta=null,Fe=0,kc=0,Wc=null,Jr=null,bn=0,$c=null;function ye(){return(st&2)!==0&&lt!==0?lt&-lt:A.T!==null?lf():fs()}function kr(){if(de===0)if((lt&536870912)===0||nt){var t=Nn;Nn<<=1,(Nn&3932160)===0&&(Nn=262144),de=t}else de=536870912;return t=se.current,t!==null&&(t.flags|=32),de}function ae(t,e,l){(t===xt&&(dt===2||dt===9)||t.cancelPendingCommit!==null)&&(Aa(t,0),ml(t,lt,de,!1)),Ga(t,l),((st&2)===0||t!==xt)&&(t===xt&&((st&2)===0&&(wl|=l),Ot===4&&ml(t,lt,de,!1)),je(t))}function Wr(t,e,l){if((st&6)!==0)throw Error(o(327));var a=!l&&(e&127)===0&&(e&t.expiredLanes)===0||Ya(t,e),n=a?Ph(t,e):Ic(t,e,!0),u=a;do{if(n===0){Sa&&!a&&ml(t,e,0,!1);break}else{if(l=t.current.alternate,u&&!Fh(l)){n=Ic(t,e,!1),u=!1;continue}if(n===2){if(u=e,t.errorRecoveryDisabledLanes&u)var i=0;else i=t.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){e=i;t:{var c=t;n=pn;var s=c.current.memoizedState.isDehydrated;if(s&&(Aa(c,i).flags|=256),i=Ic(c,i,!1),i!==2){if(Zc&&!s){c.errorRecoveryDisabledLanes|=u,wl|=u,n=4;break t}u=le,le=n,u!==null&&(le===null?le=u:le.push.apply(le,u))}n=i}if(u=!1,n!==2)continue}}if(n===1){Aa(t,0),ml(t,e,0,!0);break}t:{switch(a=t,u=n,u){case 0:case 1:throw Error(o(345));case 4:if((e&4194048)!==e)break;case 6:ml(a,e,de,!dl);break t;case 2:le=null;break;case 3:case 5:break;default:throw Error(o(329))}if((e&62914560)===e&&(n=Eu+300-ne(),10<n)){if(ml(a,e,de,!dl),qn(a,0,!0)!==0)break t;Fe=e,a.timeoutHandle=Md($r.bind(null,a,l,le,_u,Jc,e,de,wl,xa,dl,u,"Throttled",-0,0),n);break t}$r(a,l,le,_u,Jc,e,de,wl,xa,dl,u,null,-0,0)}}break}while(!0);je(t)}function $r(t,e,l,a,n,u,i,c,s,v,T,E,p,S){if(t.timeoutHandle=-1,E=e.subtreeFlags,E&8192||(E&16785408)===16785408){E={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Be},Qr(e,u,E);var R=(u&62914560)===u?Eu-ne():(u&4194048)===u?Kr-ne():0;if(R=N0(E,R),R!==null){Fe=u,t.cancelPendingCommit=R(nd.bind(null,t,e,u,l,a,n,i,c,s,T,E,null,p,S)),ml(t,u,i,!v);return}}nd(t,e,u,l,a,n,i,c,s)}function Fh(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],u=n.getSnapshot;n=n.value;try{if(!ce(u(),n))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ml(t,e,l,a){e&=~Kc,e&=~wl,t.suspendedLanes|=e,t.pingedLanes&=~e,a&&(t.warmLanes|=e),a=t.expirationTimes;for(var n=e;0<n;){var u=31-ie(n),i=1<<u;a[u]=-1,n&=~i}l!==0&&us(t,l,e)}function Ou(){return(st&6)===0?(Sn(0),!1):!0}function Fc(){if(tt!==null){if(dt===0)var t=tt.return;else t=tt,Xe=Nl=null,yc(t),ya=null,en=0,t=tt;for(;t!==null;)_r(t.alternate,t),t=t.return;tt=null}}function Aa(t,e){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,v0(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),Fe=0,Fc(),xt=t,tt=l=Ye(t.current,null),lt=e,dt=0,re=null,dl=!1,Sa=Ya(t,e),Zc=!1,xa=de=Kc=wl=yl=Ot=0,le=pn=null,Jc=!1,(e&8)!==0&&(e|=e&32);var a=t.entangledLanes;if(a!==0)for(t=t.entanglements,a&=e;0<a;){var n=31-ie(a),u=1<<n;e|=t[n],a&=~u}return $e=e,Wn(),l}function Fr(t,e){k=null,A.H=on,e===da||e===au?(e=yo(),dt=3):e===ec?(e=yo(),dt=4):dt=e===Cc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,re=e,tt===null&&(Ot=1,vu(t,ve(e,t.current)))}function Ir(){var t=se.current;return t===null?!0:(lt&4194048)===lt?xe===null:(lt&62914560)===lt||(lt&536870912)!==0?t===xe:!1}function Pr(){var t=A.H;return A.H=on,t===null?on:t}function td(){var t=A.A;return A.A=Wh,t}function Cu(){Ot=4,dl||(lt&4194048)!==lt&&se.current!==null||(Sa=!0),(yl&134217727)===0&&(wl&134217727)===0||xt===null||ml(xt,lt,de,!1)}function Ic(t,e,l){var a=st;st|=2;var n=Pr(),u=td();(xt!==t||lt!==e)&&(_u=null,Aa(t,e)),e=!1;var i=Ot;t:do try{if(dt!==0&&tt!==null){var c=tt,s=re;switch(dt){case 8:Fc(),i=6;break t;case 3:case 2:case 9:case 6:se.current===null&&(e=!0);var v=dt;if(dt=0,re=null,za(t,c,s,v),l&&Sa){i=0;break t}break;default:v=dt,dt=0,re=null,za(t,c,s,v)}}Ih(),i=Ot;break}catch(T){Fr(t,T)}while(!0);return e&&t.shellSuspendCounter++,Xe=Nl=null,st=a,A.H=n,A.A=u,tt===null&&(xt=null,lt=0,Wn()),i}function Ih(){for(;tt!==null;)ed(tt)}function Ph(t,e){var l=st;st|=2;var a=Pr(),n=td();xt!==t||lt!==e?(_u=null,Mu=ne()+500,Aa(t,e)):Sa=Ya(t,e);t:do try{if(dt!==0&&tt!==null){e=tt;var u=re;e:switch(dt){case 1:dt=0,re=null,za(t,e,u,1);break;case 2:case 9:if(oo(u)){dt=0,re=null,ld(e);break}e=function(){dt!==2&&dt!==9||xt!==t||(dt=7),je(t)},u.then(e,e);break t;case 3:dt=7;break t;case 4:dt=5;break t;case 7:oo(u)?(dt=0,re=null,ld(e)):(dt=0,re=null,za(t,e,u,7));break;case 5:var i=null;switch(tt.tag){case 26:i=tt.memoizedState;case 5:case 27:var c=tt;if(i?Ld(i):c.stateNode.complete){dt=0,re=null;var s=c.sibling;if(s!==null)tt=s;else{var v=c.return;v!==null?(tt=v,Du(v)):tt=null}break e}}dt=0,re=null,za(t,e,u,5);break;case 6:dt=0,re=null,za(t,e,u,6);break;case 8:Fc(),Ot=6;break t;default:throw Error(o(462))}}t0();break}catch(T){Fr(t,T)}while(!0);return Xe=Nl=null,A.H=a,A.A=n,st=l,tt!==null?0:(xt=null,lt=0,Wn(),Ot)}function t0(){for(;tt!==null&&!Ay();)ed(tt)}function ed(t){var e=Er(t.alternate,t,$e);t.memoizedProps=t.pendingProps,e===null?Du(t):tt=e}function ld(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=br(l,e,e.pendingProps,e.type,void 0,lt);break;case 11:e=br(l,e,e.pendingProps,e.type.render,e.ref,lt);break;case 5:yc(e);default:_r(l,e),e=tt=Ps(e,$e),e=Er(l,e,$e)}t.memoizedProps=t.pendingProps,e===null?Du(t):tt=e}function za(t,e,l,a){Xe=Nl=null,yc(e),ya=null,en=0;var n=e.return;try{if(Qh(t,n,e,l,lt)){Ot=1,vu(t,ve(l,t.current)),tt=null;return}}catch(u){if(n!==null)throw tt=n,u;Ot=1,vu(t,ve(l,t.current)),tt=null;return}e.flags&32768?(nt||a===1?t=!0:Sa||(lt&536870912)!==0?t=!1:(dl=t=!0,(a===2||a===9||a===3||a===6)&&(a=se.current,a!==null&&a.tag===13&&(a.flags|=16384))),ad(e,t)):Du(e)}function Du(t){var e=t;do{if((e.flags&32768)!==0){ad(e,dl);return}t=e.return;var l=Zh(e.alternate,e,$e);if(l!==null){tt=l;return}if(e=e.sibling,e!==null){tt=e;return}tt=e=t}while(e!==null);Ot===0&&(Ot=5)}function ad(t,e){do{var l=Kh(t.alternate,t);if(l!==null){l.flags&=32767,tt=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){tt=t;return}tt=t=l}while(t!==null);Ot=6,tt=null}function nd(t,e,l,a,n,u,i,c,s){t.cancelPendingCommit=null;do Uu();while(Yt!==0);if((st&6)!==0)throw Error(o(327));if(e!==null){if(e===t.current)throw Error(o(177));if(u=e.lanes|e.childLanes,u|=Xi,Ry(t,l,u,i,c,s),t===xt&&(tt=xt=null,lt=0),Ta=e,gl=t,Fe=l,kc=u,Wc=n,Jr=a,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,n0(Rn,function(){return sd(),null})):(t.callbackNode=null,t.callbackPriority=0),a=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||a){a=A.T,A.T=null,n=U.p,U.p=2,i=st,st|=4;try{Jh(t,e,l)}finally{st=i,U.p=n,A.T=a}}Yt=1,ud(),id(),cd()}}function ud(){if(Yt===1){Yt=0;var t=gl,e=Ta,l=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||l){l=A.T,A.T=null;var a=U.p;U.p=2;var n=st;st|=4;try{Gr(e,t);var u=rf,i=ws(t.containerInfo),c=u.focusedElem,s=u.selectionRange;if(i!==c&&c&&c.ownerDocument&&Vs(c.ownerDocument.documentElement,c)){if(s!==null&&Ni(c)){var v=s.start,T=s.end;if(T===void 0&&(T=v),"selectionStart"in c)c.selectionStart=v,c.selectionEnd=Math.min(T,c.value.length);else{var E=c.ownerDocument||document,p=E&&E.defaultView||window;if(p.getSelection){var S=p.getSelection(),R=c.textContent.length,X=Math.min(s.start,R),pt=s.end===void 0?X:Math.min(s.end,R);!S.extend&&X>pt&&(i=pt,pt=X,X=i);var y=Qs(c,X),r=Qs(c,pt);if(y&&r&&(S.rangeCount!==1||S.anchorNode!==y.node||S.anchorOffset!==y.offset||S.focusNode!==r.node||S.focusOffset!==r.offset)){var m=E.createRange();m.setStart(y.node,y.offset),S.removeAllRanges(),X>pt?(S.addRange(m),S.extend(r.node,r.offset)):(m.setEnd(r.node,r.offset),S.addRange(m))}}}}for(E=[],S=c;S=S.parentNode;)S.nodeType===1&&E.push({element:S,left:S.scrollLeft,top:S.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<E.length;c++){var z=E[c];z.element.scrollLeft=z.left,z.element.scrollTop=z.top}}Vu=!!of,rf=of=null}finally{st=n,U.p=a,A.T=l}}t.current=e,Yt=2}}function id(){if(Yt===2){Yt=0;var t=gl,e=Ta,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=A.T,A.T=null;var a=U.p;U.p=2;var n=st;st|=4;try{Hr(t,e.alternate,e)}finally{st=n,U.p=a,A.T=l}}Yt=3}}function cd(){if(Yt===4||Yt===3){Yt=0,zy();var t=gl,e=Ta,l=Fe,a=Jr;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Yt=5:(Yt=0,Ta=gl=null,fd(t,t.pendingLanes));var n=t.pendingLanes;if(n===0&&(hl=null),mi(l),e=e.stateNode,ue&&typeof ue.onCommitFiberRoot=="function")try{ue.onCommitFiberRoot(qa,e,void 0,(e.current.flags&128)===128)}catch{}if(a!==null){e=A.T,n=U.p,U.p=2,A.T=null;try{for(var u=t.onRecoverableError,i=0;i<a.length;i++){var c=a[i];u(c.value,{componentStack:c.stack})}}finally{A.T=e,U.p=n}}(Fe&3)!==0&&Uu(),je(t),n=t.pendingLanes,(l&261930)!==0&&(n&42)!==0?t===$c?bn++:(bn=0,$c=t):bn=0,Sn(0)}}function fd(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Pa(e)))}function Uu(){return ud(),id(),cd(),sd()}function sd(){if(Yt!==5)return!1;var t=gl,e=kc;kc=0;var l=mi(Fe),a=A.T,n=U.p;try{U.p=32>l?32:l,A.T=null,l=Wc,Wc=null;var u=gl,i=Fe;if(Yt=0,Ta=gl=null,Fe=0,(st&6)!==0)throw Error(o(331));var c=st;if(st|=4,wr(u.current),Lr(u,u.current,i,l),st=c,Sn(0,!1),ue&&typeof ue.onPostCommitFiberRoot=="function")try{ue.onPostCommitFiberRoot(qa,u)}catch{}return!0}finally{U.p=n,A.T=a,fd(t,e)}}function od(t,e,l){e=ve(l,e),e=Oc(t.stateNode,e,2),t=fl(t,e,2),t!==null&&(Ga(t,2),je(t))}function yt(t,e,l){if(t.tag===3)od(t,t,l);else for(;e!==null;){if(e.tag===3){od(e,t,l);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(hl===null||!hl.has(a))){t=ve(l,t),l=rr(2),a=fl(e,l,2),a!==null&&(dr(l,a,e,t),Ga(a,2),je(a));break}}e=e.return}}function Pc(t,e,l){var a=t.pingCache;if(a===null){a=t.pingCache=new $h;var n=new Set;a.set(e,n)}else n=a.get(e),n===void 0&&(n=new Set,a.set(e,n));n.has(l)||(Zc=!0,n.add(l),t=e0.bind(null,t,e,l),e.then(t,t))}function e0(t,e,l){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,xt===t&&(lt&l)===l&&(Ot===4||Ot===3&&(lt&62914560)===lt&&300>ne()-Eu?(st&2)===0&&Aa(t,0):Kc|=l,xa===lt&&(xa=0)),je(t)}function rd(t,e){e===0&&(e=ns()),t=jl(t,e),t!==null&&(Ga(t,e),je(t))}function l0(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),rd(t,l)}function a0(t,e){var l=0;switch(t.tag){case 31:case 13:var a=t.stateNode,n=t.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(e),rd(t,l)}function n0(t,e){return di(t,e)}var ju=null,Ea=null,tf=!1,Ru=!1,ef=!1,vl=0;function je(t){t!==Ea&&t.next===null&&(Ea===null?ju=Ea=t:Ea=Ea.next=t),Ru=!0,tf||(tf=!0,i0())}function Sn(t,e){if(!ef&&Ru){ef=!0;do for(var l=!1,a=ju;a!==null;){if(t!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,c=a.pingedLanes;u=(1<<31-ie(42|t)+1)-1,u&=n&~(i&~c),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,gd(a,u))}else u=lt,u=qn(a,a===xt?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Ya(a,u)||(l=!0,gd(a,u));a=a.next}while(l);ef=!1}}function u0(){dd()}function dd(){Ru=tf=!1;var t=0;vl!==0&&m0()&&(t=vl);for(var e=ne(),l=null,a=ju;a!==null;){var n=a.next,u=yd(a,e);u===0?(a.next=null,l===null?ju=n:l.next=n,n===null&&(Ea=l)):(l=a,(t!==0||(u&3)!==0)&&(Ru=!0)),a=n}Yt!==0&&Yt!==5||Sn(t),vl!==0&&(vl=0)}function yd(t,e){for(var l=t.suspendedLanes,a=t.pingedLanes,n=t.expirationTimes,u=t.pendingLanes&-62914561;0<u;){var i=31-ie(u),c=1<<i,s=n[i];s===-1?((c&l)===0||(c&a)!==0)&&(n[i]=jy(c,e)):s<=e&&(t.expiredLanes|=c),u&=~c}if(e=xt,l=lt,l=qn(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),a=t.callbackNode,l===0||t===e&&(dt===2||dt===9)||t.cancelPendingCommit!==null)return a!==null&&a!==null&&yi(a),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Ya(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(a!==null&&yi(a),mi(l)){case 2:case 8:l=ls;break;case 32:l=Rn;break;case 268435456:l=as;break;default:l=Rn}return a=hd.bind(null,t),l=di(l,a),t.callbackPriority=e,t.callbackNode=l,e}return a!==null&&a!==null&&yi(a),t.callbackPriority=2,t.callbackNode=null,2}function hd(t,e){if(Yt!==0&&Yt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Uu()&&t.callbackNode!==l)return null;var a=lt;return a=qn(t,t===xt?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),a===0?null:(Wr(t,a,e),yd(t,ne()),t.callbackNode!=null&&t.callbackNode===l?hd.bind(null,t):null)}function gd(t,e){if(Uu())return null;Wr(t,e,!0)}function i0(){p0(function(){(st&6)!==0?di(es,u0):dd()})}function lf(){if(vl===0){var t=oa;t===0&&(t=Hn,Hn<<=1,(Hn&261888)===0&&(Hn=256)),vl=t}return vl}function md(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ln(""+t)}function vd(t,e){var l=e.ownerDocument.createElement("input");return l.name=e.name,l.value=e.value,t.id&&l.setAttribute("form",t.id),e.parentNode.insertBefore(l,e),t=new FormData(t),l.parentNode.removeChild(l),t}function c0(t,e,l,a,n){if(e==="submit"&&l&&l.stateNode===n){var u=md((n[Ft]||null).action),i=a.submitter;i&&(e=(e=i[Ft]||null)?md(e.formAction):i.getAttribute("formAction"),e!==null&&(u=e,i=null));var c=new Zn("action","action",null,a,n);t.push({event:c,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(vl!==0){var s=i?vd(n,i):new FormData(n);Tc(l,{pending:!0,data:s,method:n.method,action:u},null,s)}}else typeof u=="function"&&(c.preventDefault(),s=i?vd(n,i):new FormData(n),Tc(l,{pending:!0,data:s,method:n.method,action:u},u,s))},currentTarget:n}]})}}for(var af=0;af<Gi.length;af++){var nf=Gi[af],f0=nf.toLowerCase(),s0=nf[0].toUpperCase()+nf.slice(1);Ee(f0,"on"+s0)}Ee(Js,"onAnimationEnd"),Ee(ks,"onAnimationIteration"),Ee(Ws,"onAnimationStart"),Ee("dblclick","onDoubleClick"),Ee("focusin","onFocus"),Ee("focusout","onBlur"),Ee(Eh,"onTransitionRun"),Ee(Mh,"onTransitionStart"),Ee(_h,"onTransitionCancel"),Ee($s,"onTransitionEnd"),$l("onMouseEnter",["mouseout","mouseover"]),$l("onMouseLeave",["mouseout","mouseover"]),$l("onPointerEnter",["pointerout","pointerover"]),$l("onPointerLeave",["pointerout","pointerover"]),Ol("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ol("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ol("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ol("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ol("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ol("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xn="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(" "),o0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xn));function pd(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var a=t[l],n=a.event;a=a.listeners;t:{var u=void 0;if(e)for(var i=a.length-1;0<=i;i--){var c=a[i],s=c.instance,v=c.currentTarget;if(c=c.listener,s!==u&&n.isPropagationStopped())break t;u=c,n.currentTarget=v;try{u(n)}catch(T){kn(T)}n.currentTarget=null,u=s}else for(i=0;i<a.length;i++){if(c=a[i],s=c.instance,v=c.currentTarget,c=c.listener,s!==u&&n.isPropagationStopped())break t;u=c,n.currentTarget=v;try{u(n)}catch(T){kn(T)}n.currentTarget=null,u=s}}}}function et(t,e){var l=e[vi];l===void 0&&(l=e[vi]=new Set);var a=t+"__bubble";l.has(a)||(bd(e,t,2,!1),l.add(a))}function uf(t,e,l){var a=0;e&&(a|=4),bd(l,t,a,e)}var Hu="_reactListening"+Math.random().toString(36).slice(2);function cf(t){if(!t[Hu]){t[Hu]=!0,rs.forEach(function(l){l!=="selectionchange"&&(o0.has(l)||uf(l,!1,t),uf(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Hu]||(e[Hu]=!0,uf("selectionchange",!1,e))}}function bd(t,e,l,a){switch(kd(e)){case 2:var n=Y0;break;case 8:n=G0;break;default:n=Tf}l=n.bind(null,e,l,t),n=void 0,!Mi||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(n=!0),a?n!==void 0?t.addEventListener(e,l,{capture:!0,passive:n}):t.addEventListener(e,l,!0):n!==void 0?t.addEventListener(e,l,{passive:n}):t.addEventListener(e,l,!1)}function ff(t,e,l,a,n){var u=a;if((e&1)===0&&(e&2)===0&&a!==null)t:for(;;){if(a===null)return;var i=a.tag;if(i===3||i===4){var c=a.stateNode.containerInfo;if(c===n)break;if(i===4)for(i=a.return;i!==null;){var s=i.tag;if((s===3||s===4)&&i.stateNode.containerInfo===n)return;i=i.return}for(;c!==null;){if(i=Jl(c),i===null)return;if(s=i.tag,s===5||s===6||s===26||s===27){a=u=i;continue t}c=c.parentNode}}a=a.return}As(function(){var v=u,T=zi(l),E=[];t:{var p=Fs.get(t);if(p!==void 0){var S=Zn,R=t;switch(t){case"keypress":if(Vn(l)===0)break t;case"keydown":case"keyup":S=ah;break;case"focusin":R="focus",S=Di;break;case"focusout":R="blur",S=Di;break;case"beforeblur":case"afterblur":S=Di;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=Ms;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=Zy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=ih;break;case Js:case ks:case Ws:S=ky;break;case $s:S=fh;break;case"scroll":case"scrollend":S=Vy;break;case"wheel":S=oh;break;case"copy":case"cut":case"paste":S=$y;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=Os;break;case"toggle":case"beforetoggle":S=dh}var X=(e&4)!==0,pt=!X&&(t==="scroll"||t==="scrollend"),y=X?p!==null?p+"Capture":null:p;X=[];for(var r=v,m;r!==null;){var z=r;if(m=z.stateNode,z=z.tag,z!==5&&z!==26&&z!==27||m===null||y===null||(z=Qa(r,y),z!=null&&X.push(Tn(r,z,m))),pt)break;r=r.return}0<X.length&&(p=new S(p,R,null,l,T),E.push({event:p,listeners:X}))}}if((e&7)===0){t:{if(p=t==="mouseover"||t==="pointerover",S=t==="mouseout"||t==="pointerout",p&&l!==Ai&&(R=l.relatedTarget||l.fromElement)&&(Jl(R)||R[Kl]))break t;if((S||p)&&(p=T.window===T?T:(p=T.ownerDocument)?p.defaultView||p.parentWindow:window,S?(R=l.relatedTarget||l.toElement,S=v,R=R?Jl(R):null,R!==null&&(pt=D(R),X=R.tag,R!==pt||X!==5&&X!==27&&X!==6)&&(R=null)):(S=null,R=v),S!==R)){if(X=Ms,z="onMouseLeave",y="onMouseEnter",r="mouse",(t==="pointerout"||t==="pointerover")&&(X=Os,z="onPointerLeave",y="onPointerEnter",r="pointer"),pt=S==null?p:La(S),m=R==null?p:La(R),p=new X(z,r+"leave",S,l,T),p.target=pt,p.relatedTarget=m,z=null,Jl(T)===v&&(X=new X(y,r+"enter",R,l,T),X.target=m,X.relatedTarget=pt,z=X),pt=z,S&&R)e:{for(X=r0,y=S,r=R,m=0,z=y;z;z=X(z))m++;z=0;for(var q=r;q;q=X(q))z++;for(;0<m-z;)y=X(y),m--;for(;0<z-m;)r=X(r),z--;for(;m--;){if(y===r||r!==null&&y===r.alternate){X=y;break e}y=X(y),r=X(r)}X=null}else X=null;S!==null&&Sd(E,p,S,X,!1),R!==null&&pt!==null&&Sd(E,pt,R,X,!0)}}t:{if(p=v?La(v):window,S=p.nodeName&&p.nodeName.toLowerCase(),S==="select"||S==="input"&&p.type==="file")var ct=Bs;else if(Hs(p))if(qs)ct=Th;else{ct=Sh;var N=bh}else S=p.nodeName,!S||S.toLowerCase()!=="input"||p.type!=="checkbox"&&p.type!=="radio"?v&&Ti(v.elementType)&&(ct=Bs):ct=xh;if(ct&&(ct=ct(t,v))){Ns(E,ct,l,T);break t}N&&N(t,p,v),t==="focusout"&&v&&p.type==="number"&&v.memoizedProps.value!=null&&xi(p,"number",p.value)}switch(N=v?La(v):window,t){case"focusin":(Hs(N)||N.contentEditable==="true")&&(la=N,Bi=v,$a=null);break;case"focusout":$a=Bi=la=null;break;case"mousedown":qi=!0;break;case"contextmenu":case"mouseup":case"dragend":qi=!1,Zs(E,l,T);break;case"selectionchange":if(zh)break;case"keydown":case"keyup":Zs(E,l,T)}var W;if(ji)t:{switch(t){case"compositionstart":var at="onCompositionStart";break t;case"compositionend":at="onCompositionEnd";break t;case"compositionupdate":at="onCompositionUpdate";break t}at=void 0}else ea?js(t,l)&&(at="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(at="onCompositionStart");at&&(Cs&&l.locale!=="ko"&&(ea||at!=="onCompositionStart"?at==="onCompositionEnd"&&ea&&(W=zs()):(el=T,_i="value"in el?el.value:el.textContent,ea=!0)),N=Nu(v,at),0<N.length&&(at=new _s(at,t,null,l,T),E.push({event:at,listeners:N}),W?at.data=W:(W=Rs(l),W!==null&&(at.data=W)))),(W=hh?gh(t,l):mh(t,l))&&(at=Nu(v,"onBeforeInput"),0<at.length&&(N=new _s("onBeforeInput","beforeinput",null,l,T),E.push({event:N,listeners:at}),N.data=W)),c0(E,t,v,l,T)}pd(E,e)})}function Tn(t,e,l){return{instance:t,listener:e,currentTarget:l}}function Nu(t,e){for(var l=e+"Capture",a=[];t!==null;){var n=t,u=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||u===null||(n=Qa(t,l),n!=null&&a.unshift(Tn(t,n,u)),n=Qa(t,e),n!=null&&a.push(Tn(t,n,u))),t.tag===3)return a;t=t.return}return[]}function r0(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Sd(t,e,l,a,n){for(var u=e._reactName,i=[];l!==null&&l!==a;){var c=l,s=c.alternate,v=c.stateNode;if(c=c.tag,s!==null&&s===a)break;c!==5&&c!==26&&c!==27||v===null||(s=v,n?(v=Qa(l,u),v!=null&&i.unshift(Tn(l,v,s))):n||(v=Qa(l,u),v!=null&&i.push(Tn(l,v,s)))),l=l.return}i.length!==0&&t.push({event:e,listeners:i})}var d0=/\r\n?/g,y0=/\u0000|\uFFFD/g;function xd(t){return(typeof t=="string"?t:""+t).replace(d0,`
278
+ `).replace(y0,"")}function Td(t,e){return e=xd(e),xd(t)===e}function vt(t,e,l,a,n,u){switch(l){case"children":typeof a=="string"?e==="body"||e==="textarea"&&a===""||Il(t,a):(typeof a=="number"||typeof a=="bigint")&&e!=="body"&&Il(t,""+a);break;case"className":Gn(t,"class",a);break;case"tabIndex":Gn(t,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Gn(t,l,a);break;case"style":xs(t,a,u);break;case"data":if(e!=="object"){Gn(t,"data",a);break}case"src":case"href":if(a===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(l);break}a=Ln(""+a),t.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){t.setAttribute(l,"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 u=="function"&&(l==="formAction"?(e!=="input"&&vt(t,e,"name",n.name,n,null),vt(t,e,"formEncType",n.formEncType,n,null),vt(t,e,"formMethod",n.formMethod,n,null),vt(t,e,"formTarget",n.formTarget,n,null)):(vt(t,e,"encType",n.encType,n,null),vt(t,e,"method",n.method,n,null),vt(t,e,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(l);break}a=Ln(""+a),t.setAttribute(l,a);break;case"onClick":a!=null&&(t.onclick=Be);break;case"onScroll":a!=null&&et("scroll",t);break;case"onScrollEnd":a!=null&&et("scrollend",t);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));t.innerHTML=l}}break;case"multiple":t.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":t.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){t.removeAttribute("xlink:href");break}l=Ln(""+a),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(l,""+a):t.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":a===!0?t.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(l,a):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?t.setAttribute(l,a):t.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?t.removeAttribute(l):t.setAttribute(l,a);break;case"popover":et("beforetoggle",t),et("toggle",t),Yn(t,"popover",a);break;case"xlinkActuate":Ne(t,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Ne(t,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Ne(t,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Ne(t,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Ne(t,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Ne(t,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Ne(t,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Ne(t,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Ne(t,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Yn(t,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Ly.get(l)||l,Yn(t,l,a))}}function sf(t,e,l,a,n,u){switch(l){case"style":xs(t,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));t.innerHTML=l}}break;case"children":typeof a=="string"?Il(t,a):(typeof a=="number"||typeof a=="bigint")&&Il(t,""+a);break;case"onScroll":a!=null&&et("scroll",t);break;case"onScrollEnd":a!=null&&et("scrollend",t);break;case"onClick":a!=null&&(t.onclick=Be);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ds.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),e=l.slice(2,n?l.length-7:void 0),u=t[Ft]||null,u=u!=null?u[l]:null,typeof u=="function"&&t.removeEventListener(e,u,n),typeof a=="function")){typeof u!="function"&&u!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(e,a,n);break t}l in t?t[l]=a:a===!0?t.setAttribute(l,""):Yn(t,l,a)}}}function Zt(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":et("error",t),et("load",t);var a=!1,n=!1,u;for(u in l)if(l.hasOwnProperty(u)){var i=l[u];if(i!=null)switch(u){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:vt(t,e,u,i,l,null)}}n&&vt(t,e,"srcSet",l.srcSet,l,null),a&&vt(t,e,"src",l.src,l,null);return;case"input":et("invalid",t);var c=u=i=n=null,s=null,v=null;for(a in l)if(l.hasOwnProperty(a)){var T=l[a];if(T!=null)switch(a){case"name":n=T;break;case"type":i=T;break;case"checked":s=T;break;case"defaultChecked":v=T;break;case"value":u=T;break;case"defaultValue":c=T;break;case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(137,e));break;default:vt(t,e,a,T,l,null)}}vs(t,u,c,s,v,i,n,!1);return;case"select":et("invalid",t),a=i=u=null;for(n in l)if(l.hasOwnProperty(n)&&(c=l[n],c!=null))switch(n){case"value":u=c;break;case"defaultValue":i=c;break;case"multiple":a=c;default:vt(t,e,n,c,l,null)}e=u,l=i,t.multiple=!!a,e!=null?Fl(t,!!a,e,!1):l!=null&&Fl(t,!!a,l,!0);return;case"textarea":et("invalid",t),u=n=a=null;for(i in l)if(l.hasOwnProperty(i)&&(c=l[i],c!=null))switch(i){case"value":a=c;break;case"defaultValue":n=c;break;case"children":u=c;break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:vt(t,e,i,c,l,null)}bs(t,a,n,u);return;case"option":for(s in l)l.hasOwnProperty(s)&&(a=l[s],a!=null)&&(s==="selected"?t.selected=a&&typeof a!="function"&&typeof a!="symbol":vt(t,e,s,a,l,null));return;case"dialog":et("beforetoggle",t),et("toggle",t),et("cancel",t),et("close",t);break;case"iframe":case"object":et("load",t);break;case"video":case"audio":for(a=0;a<xn.length;a++)et(xn[a],t);break;case"image":et("error",t),et("load",t);break;case"details":et("toggle",t);break;case"embed":case"source":case"link":et("error",t),et("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(v in l)if(l.hasOwnProperty(v)&&(a=l[v],a!=null))switch(v){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:vt(t,e,v,a,l,null)}return;default:if(Ti(e)){for(T in l)l.hasOwnProperty(T)&&(a=l[T],a!==void 0&&sf(t,e,T,a,l,void 0));return}}for(c in l)l.hasOwnProperty(c)&&(a=l[c],a!=null&&vt(t,e,c,a,l,null))}function h0(t,e,l,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,u=null,i=null,c=null,s=null,v=null,T=null;for(S in l){var E=l[S];if(l.hasOwnProperty(S)&&E!=null)switch(S){case"checked":break;case"value":break;case"defaultValue":s=E;default:a.hasOwnProperty(S)||vt(t,e,S,null,a,E)}}for(var p in a){var S=a[p];if(E=l[p],a.hasOwnProperty(p)&&(S!=null||E!=null))switch(p){case"type":u=S;break;case"name":n=S;break;case"checked":v=S;break;case"defaultChecked":T=S;break;case"value":i=S;break;case"defaultValue":c=S;break;case"children":case"dangerouslySetInnerHTML":if(S!=null)throw Error(o(137,e));break;default:S!==E&&vt(t,e,p,S,a,E)}}Si(t,i,c,s,v,T,u,n);return;case"select":S=i=c=p=null;for(u in l)if(s=l[u],l.hasOwnProperty(u)&&s!=null)switch(u){case"value":break;case"multiple":S=s;default:a.hasOwnProperty(u)||vt(t,e,u,null,a,s)}for(n in a)if(u=a[n],s=l[n],a.hasOwnProperty(n)&&(u!=null||s!=null))switch(n){case"value":p=u;break;case"defaultValue":c=u;break;case"multiple":i=u;default:u!==s&&vt(t,e,n,u,a,s)}e=c,l=i,a=S,p!=null?Fl(t,!!l,p,!1):!!a!=!!l&&(e!=null?Fl(t,!!l,e,!0):Fl(t,!!l,l?[]:"",!1));return;case"textarea":S=p=null;for(c in l)if(n=l[c],l.hasOwnProperty(c)&&n!=null&&!a.hasOwnProperty(c))switch(c){case"value":break;case"children":break;default:vt(t,e,c,null,a,n)}for(i in a)if(n=a[i],u=l[i],a.hasOwnProperty(i)&&(n!=null||u!=null))switch(i){case"value":p=n;break;case"defaultValue":S=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(o(91));break;default:n!==u&&vt(t,e,i,n,a,u)}ps(t,p,S);return;case"option":for(var R in l)p=l[R],l.hasOwnProperty(R)&&p!=null&&!a.hasOwnProperty(R)&&(R==="selected"?t.selected=!1:vt(t,e,R,null,a,p));for(s in a)p=a[s],S=l[s],a.hasOwnProperty(s)&&p!==S&&(p!=null||S!=null)&&(s==="selected"?t.selected=p&&typeof p!="function"&&typeof p!="symbol":vt(t,e,s,p,a,S));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 l)p=l[X],l.hasOwnProperty(X)&&p!=null&&!a.hasOwnProperty(X)&&vt(t,e,X,null,a,p);for(v in a)if(p=a[v],S=l[v],a.hasOwnProperty(v)&&p!==S&&(p!=null||S!=null))switch(v){case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(137,e));break;default:vt(t,e,v,p,a,S)}return;default:if(Ti(e)){for(var pt in l)p=l[pt],l.hasOwnProperty(pt)&&p!==void 0&&!a.hasOwnProperty(pt)&&sf(t,e,pt,void 0,a,p);for(T in a)p=a[T],S=l[T],!a.hasOwnProperty(T)||p===S||p===void 0&&S===void 0||sf(t,e,T,p,a,S);return}}for(var y in l)p=l[y],l.hasOwnProperty(y)&&p!=null&&!a.hasOwnProperty(y)&&vt(t,e,y,null,a,p);for(E in a)p=a[E],S=l[E],!a.hasOwnProperty(E)||p===S||p==null&&S==null||vt(t,e,E,p,a,S)}function Ad(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function g0(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],u=n.transferSize,i=n.initiatorType,c=n.duration;if(u&&c&&Ad(i)){for(i=0,c=n.responseEnd,a+=1;a<l.length;a++){var s=l[a],v=s.startTime;if(v>c)break;var T=s.transferSize,E=s.initiatorType;T&&Ad(E)&&(s=s.responseEnd,i+=T*(s<c?1:(c-v)/(s-v)))}if(--a,e+=8*(u+i)/(n.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var of=null,rf=null;function Bu(t){return t.nodeType===9?t:t.ownerDocument}function zd(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ed(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function df(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var yf=null;function m0(){var t=window.event;return t&&t.type==="popstate"?t===yf?!1:(yf=t,!0):(yf=null,!1)}var Md=typeof setTimeout=="function"?setTimeout:void 0,v0=typeof clearTimeout=="function"?clearTimeout:void 0,_d=typeof Promise=="function"?Promise:void 0,p0=typeof queueMicrotask=="function"?queueMicrotask:typeof _d<"u"?function(t){return _d.resolve(null).then(t).catch(b0)}:Md;function b0(t){setTimeout(function(){throw t})}function pl(t){return t==="head"}function Od(t,e){var l=e,a=0;do{var n=l.nextSibling;if(t.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){t.removeChild(n),Ca(e);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")An(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,An(l);for(var u=l.firstChild;u;){var i=u.nextSibling,c=u.nodeName;u[Xa]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=i}}else l==="body"&&An(t.ownerDocument.body);l=n}while(l);Ca(e)}function Cd(t,e){var l=t;t=0;do{var a=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=a}while(l)}function hf(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":hf(l),pi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function S0(t,e,l,a){for(;t.nodeType===1;){var n=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!a&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(a){if(!t[Xa])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(u=t.getAttribute("rel"),u==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(u!==n.rel||t.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||t.getAttribute("title")!==(n.title==null?null:n.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(u=t.getAttribute("src"),(u!==(n.src==null?null:n.src)||t.getAttribute("type")!==(n.type==null?null:n.type)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var u=n.name==null?null:""+n.name;if(n.type==="hidden"&&t.getAttribute("name")===u)return t}else return t;if(t=Te(t.nextSibling),t===null)break}return null}function x0(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Te(t.nextSibling),t===null))return null;return t}function Dd(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Te(t.nextSibling),t===null))return null;return t}function gf(t){return t.data==="$?"||t.data==="$~"}function mf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function T0(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var a=function(){e(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),t._reactRetry=a}}function Te(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var vf=null;function Ud(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return Te(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function jd(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function Rd(t,e,l){switch(e=Bu(l),t){case"html":if(t=e.documentElement,!t)throw Error(o(452));return t;case"head":if(t=e.head,!t)throw Error(o(453));return t;case"body":if(t=e.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function An(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);pi(t)}var Ae=new Map,Hd=new Set;function qu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Ie=U.d;U.d={f:A0,r:z0,D:E0,C:M0,L:_0,m:O0,X:D0,S:C0,M:U0};function A0(){var t=Ie.f(),e=Ou();return t||e}function z0(t){var e=kl(t);e!==null&&e.tag===5&&e.type==="form"?Fo(e):Ie.r(t)}var Ma=typeof document>"u"?null:document;function Nd(t,e,l){var a=Ma;if(a&&typeof e=="string"&&e){var n=ge(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Hd.has(n)||(Hd.add(n),t={rel:t,crossOrigin:l,href:e},a.querySelector(n)===null&&(e=a.createElement("link"),Zt(e,"link",t),Gt(e),a.head.appendChild(e)))}}function E0(t){Ie.D(t),Nd("dns-prefetch",t,null)}function M0(t,e){Ie.C(t,e),Nd("preconnect",t,e)}function _0(t,e,l){Ie.L(t,e,l);var a=Ma;if(a&&t&&e){var n='link[rel="preload"][as="'+ge(e)+'"]';e==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+ge(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+ge(l.imageSizes)+'"]')):n+='[href="'+ge(t)+'"]';var u=n;switch(e){case"style":u=_a(t);break;case"script":u=Oa(t)}Ae.has(u)||(t=_({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Ae.set(u,t),a.querySelector(n)!==null||e==="style"&&a.querySelector(zn(u))||e==="script"&&a.querySelector(En(u))||(e=a.createElement("link"),Zt(e,"link",t),Gt(e),a.head.appendChild(e)))}}function O0(t,e){Ie.m(t,e);var l=Ma;if(l&&t){var a=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+ge(a)+'"][href="'+ge(t)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Oa(t)}if(!Ae.has(u)&&(t=_({rel:"modulepreload",href:t},e),Ae.set(u,t),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(En(u)))return}a=l.createElement("link"),Zt(a,"link",t),Gt(a),l.head.appendChild(a)}}}function C0(t,e,l){Ie.S(t,e,l);var a=Ma;if(a&&t){var n=Wl(a).hoistableStyles,u=_a(t);e=e||"default";var i=n.get(u);if(!i){var c={loading:0,preload:null};if(i=a.querySelector(zn(u)))c.loading=5;else{t=_({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Ae.get(u))&&pf(t,l);var s=i=a.createElement("link");Gt(s),Zt(s,"link",t),s._p=new Promise(function(v,T){s.onload=v,s.onerror=T}),s.addEventListener("load",function(){c.loading|=1}),s.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Yu(i,e,a)}i={type:"stylesheet",instance:i,count:1,state:c},n.set(u,i)}}}function D0(t,e){Ie.X(t,e);var l=Ma;if(l&&t){var a=Wl(l).hoistableScripts,n=Oa(t),u=a.get(n);u||(u=l.querySelector(En(n)),u||(t=_({src:t,async:!0},e),(e=Ae.get(n))&&bf(t,e),u=l.createElement("script"),Gt(u),Zt(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function U0(t,e){Ie.M(t,e);var l=Ma;if(l&&t){var a=Wl(l).hoistableScripts,n=Oa(t),u=a.get(n);u||(u=l.querySelector(En(n)),u||(t=_({src:t,async:!0,type:"module"},e),(e=Ae.get(n))&&bf(t,e),u=l.createElement("script"),Gt(u),Zt(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Bd(t,e,l,a){var n=(n=P.current)?qu(n):null;if(!n)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=_a(l.href),l=Wl(n).hoistableStyles,a=l.get(e),a||(a={type:"style",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=_a(l.href);var u=Wl(n).hoistableStyles,i=u.get(t);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,i),(u=n.querySelector(zn(t)))&&!u._p&&(i.instance=u,i.state.loading=5),Ae.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ae.set(t,l),u||j0(n,t,l,i.state))),e&&a===null)throw Error(o(528,""));return i}if(e&&a!==null)throw Error(o(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Oa(l),l=Wl(n).hoistableScripts,a=l.get(e),a||(a={type:"script",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function _a(t){return'href="'+ge(t)+'"'}function zn(t){return'link[rel="stylesheet"]['+t+"]"}function qd(t){return _({},t,{"data-precedence":t.precedence,precedence:null})}function j0(t,e,l,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),Zt(e,"link",l),Gt(e),t.head.appendChild(e))}function Oa(t){return'[src="'+ge(t)+'"]'}function En(t){return"script[async]"+t}function Yd(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+ge(l.href)+'"]');if(a)return e.instance=a,Gt(a),a;var n=_({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),Gt(a),Zt(a,"style",n),Yu(a,l.precedence,t),e.instance=a;case"stylesheet":n=_a(l.href);var u=t.querySelector(zn(n));if(u)return e.state.loading|=4,e.instance=u,Gt(u),u;a=qd(l),(n=Ae.get(n))&&pf(a,n),u=(t.ownerDocument||t).createElement("link"),Gt(u);var i=u;return i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),Zt(u,"link",a),e.state.loading|=4,Yu(u,l.precedence,t),e.instance=u;case"script":return u=Oa(l.src),(n=t.querySelector(En(u)))?(e.instance=n,Gt(n),n):(a=l,(n=Ae.get(u))&&(a=_({},l),bf(a,n)),t=t.ownerDocument||t,n=t.createElement("script"),Gt(n),Zt(n,"link",a),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(o(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,Yu(a,l.precedence,t));return e.instance}function Yu(t,e,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i<a.length;i++){var c=a[i];if(c.dataset.precedence===e)u=c;else if(u!==n)break}u?u.parentNode.insertBefore(t,u.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function pf(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function bf(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Gu=null;function Gd(t,e,l){if(Gu===null){var a=new Map,n=Gu=new Map;n.set(l,a)}else n=Gu,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(t))return a;for(a.set(t,null),l=l.getElementsByTagName(t),n=0;n<l.length;n++){var u=l[n];if(!(u[Xa]||u[Lt]||t==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var i=u.getAttribute(e)||"";i=t+i;var c=a.get(i);c?c.push(u):a.set(i,[u])}}return a}function Xd(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function R0(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Ld(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function H0(t,e,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=_a(a.href),u=e.querySelector(zn(n));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Xu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=u,Gt(u);return}u=e.ownerDocument||e,a=qd(a),(n=Ae.get(n))&&pf(a,n),u=u.createElement("link"),Gt(u);var i=u;i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),Zt(u,"link",a),l.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Xu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var Sf=0;function N0(t,e){return t.stylesheets&&t.count===0&&Qu(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var a=setTimeout(function(){if(t.stylesheets&&Qu(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&Sf===0&&(Sf=62500*g0());var n=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Qu(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>Sf?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Xu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Lu=null;function Qu(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Lu=new Map,e.forEach(B0,t),Lu=null,Xu.call(t))}function B0(t,e){if(!(e.state.loading&4)){var l=Lu.get(t);if(l)var a=l.get(null);else{l=new Map,Lu.set(t,l);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<n.length;u++){var i=n[u];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(l.set(i.dataset.precedence,i),a=i)}a&&l.set(null,a)}n=e.instance,i=n.getAttribute("data-precedence"),u=l.get(i)||a,u===a&&l.set(null,n),l.set(i,n),this.count++,a=Xu.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),u?u.parentNode.insertBefore(n,u.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(n,t.firstChild)),e.state.loading|=4}}var Mn={$$typeof:bt,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function q0(t,e,l,a,n,u,i,c,s){this.tag=1,this.containerInfo=t,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=hi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hi(0),this.hiddenUpdates=hi(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function Qd(t,e,l,a,n,u,i,c,s,v,T,E){return t=new q0(t,e,l,i,s,v,T,E,c),e=1,u===!0&&(e|=24),u=fe(3,null,null,e),t.current=u,u.stateNode=t,e=Ii(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:a,isDehydrated:l,cache:e},lc(u),t}function Vd(t){return t?(t=ua,t):ua}function wd(t,e,l,a,n,u){n=Vd(n),a.context===null?a.context=n:a.pendingContext=n,a=cl(e),a.payload={element:l},u=u===void 0?null:u,u!==null&&(a.callback=u),l=fl(t,a,e),l!==null&&(ae(l,t,e),an(l,t,e))}function Zd(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function xf(t,e){Zd(t,e),(t=t.alternate)&&Zd(t,e)}function Kd(t){if(t.tag===13||t.tag===31){var e=jl(t,67108864);e!==null&&ae(e,t,67108864),xf(t,67108864)}}function Jd(t){if(t.tag===13||t.tag===31){var e=ye();e=gi(e);var l=jl(t,e);l!==null&&ae(l,t,e),xf(t,e)}}var Vu=!0;function Y0(t,e,l,a){var n=A.T;A.T=null;var u=U.p;try{U.p=2,Tf(t,e,l,a)}finally{U.p=u,A.T=n}}function G0(t,e,l,a){var n=A.T;A.T=null;var u=U.p;try{U.p=8,Tf(t,e,l,a)}finally{U.p=u,A.T=n}}function Tf(t,e,l,a){if(Vu){var n=Af(a);if(n===null)ff(t,e,a,wu,l),Wd(t,a);else if(L0(n,t,e,l,a))a.stopPropagation();else if(Wd(t,a),e&4&&-1<X0.indexOf(t)){for(;n!==null;){var u=kl(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var i=_l(u.pendingLanes);if(i!==0){var c=u;for(c.pendingLanes|=2,c.entangledLanes|=2;i;){var s=1<<31-ie(i);c.entanglements[1]|=s,i&=~s}je(u),(st&6)===0&&(Mu=ne()+500,Sn(0))}}break;case 31:case 13:c=jl(u,2),c!==null&&ae(c,u,2),Ou(),xf(u,2)}if(u=Af(a),u===null&&ff(t,e,a,wu,l),u===n)break;n=u}n!==null&&a.stopPropagation()}else ff(t,e,a,null,l)}}function Af(t){return t=zi(t),zf(t)}var wu=null;function zf(t){if(wu=null,t=Jl(t),t!==null){var e=D(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=Y(e),t!==null)return t;t=null}else if(l===31){if(t=w(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return wu=t,null}function kd(t){switch(t){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(Ey()){case es:return 2;case ls:return 8;case Rn:case My:return 32;case as:return 268435456;default:return 32}default:return 32}}var Ef=!1,bl=null,Sl=null,xl=null,_n=new Map,On=new Map,Tl=[],X0="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 Wd(t,e){switch(t){case"focusin":case"focusout":bl=null;break;case"dragenter":case"dragleave":Sl=null;break;case"mouseover":case"mouseout":xl=null;break;case"pointerover":case"pointerout":_n.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":On.delete(e.pointerId)}}function Cn(t,e,l,a,n,u){return t===null||t.nativeEvent!==u?(t={blockedOn:e,domEventName:l,eventSystemFlags:a,nativeEvent:u,targetContainers:[n]},e!==null&&(e=kl(e),e!==null&&Kd(e)),t):(t.eventSystemFlags|=a,e=t.targetContainers,n!==null&&e.indexOf(n)===-1&&e.push(n),t)}function L0(t,e,l,a,n){switch(e){case"focusin":return bl=Cn(bl,t,e,l,a,n),!0;case"dragenter":return Sl=Cn(Sl,t,e,l,a,n),!0;case"mouseover":return xl=Cn(xl,t,e,l,a,n),!0;case"pointerover":var u=n.pointerId;return _n.set(u,Cn(_n.get(u)||null,t,e,l,a,n)),!0;case"gotpointercapture":return u=n.pointerId,On.set(u,Cn(On.get(u)||null,t,e,l,a,n)),!0}return!1}function $d(t){var e=Jl(t.target);if(e!==null){var l=D(e);if(l!==null){if(e=l.tag,e===13){if(e=Y(l),e!==null){t.blockedOn=e,ss(t.priority,function(){Jd(l)});return}}else if(e===31){if(e=w(l),e!==null){t.blockedOn=e,ss(t.priority,function(){Jd(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Zu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=Af(t.nativeEvent);if(l===null){l=t.nativeEvent;var a=new l.constructor(l.type,l);Ai=a,l.target.dispatchEvent(a),Ai=null}else return e=kl(l),e!==null&&Kd(e),t.blockedOn=l,!1;e.shift()}return!0}function Fd(t,e,l){Zu(t)&&l.delete(e)}function Q0(){Ef=!1,bl!==null&&Zu(bl)&&(bl=null),Sl!==null&&Zu(Sl)&&(Sl=null),xl!==null&&Zu(xl)&&(xl=null),_n.forEach(Fd),On.forEach(Fd)}function Ku(t,e){t.blockedOn===e&&(t.blockedOn=null,Ef||(Ef=!0,h.unstable_scheduleCallback(h.unstable_NormalPriority,Q0)))}var Ju=null;function Id(t){Ju!==t&&(Ju=t,h.unstable_scheduleCallback(h.unstable_NormalPriority,function(){Ju===t&&(Ju=null);for(var e=0;e<t.length;e+=3){var l=t[e],a=t[e+1],n=t[e+2];if(typeof a!="function"){if(zf(a||l)===null)continue;break}var u=kl(l);u!==null&&(t.splice(e,3),e-=3,Tc(u,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function Ca(t){function e(s){return Ku(s,t)}bl!==null&&Ku(bl,t),Sl!==null&&Ku(Sl,t),xl!==null&&Ku(xl,t),_n.forEach(e),On.forEach(e);for(var l=0;l<Tl.length;l++){var a=Tl[l];a.blockedOn===t&&(a.blockedOn=null)}for(;0<Tl.length&&(l=Tl[0],l.blockedOn===null);)$d(l),l.blockedOn===null&&Tl.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],u=l[a+1],i=n[Ft]||null;if(typeof u=="function")i||Id(l);else if(i){var c=null;if(u&&u.hasAttribute("formAction")){if(n=u,i=u[Ft]||null)c=i.formAction;else if(zf(n)!==null)continue}else c=i.action;typeof c=="function"?l[a+1]=c:(l.splice(a,3),a-=3),Id(l)}}}function Pd(){function t(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(i){return n=i})},focusReset:"manual",scroll:"manual"})}function e(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),n!==null&&(n(),n=null)}}}function Mf(t){this._internalRoot=t}ku.prototype.render=Mf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(o(409));var l=e.current,a=ye();wd(l,a,t,e,null,null)},ku.prototype.unmount=Mf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;wd(t.current,2,null,t,null,null),Ou(),e[Kl]=null}};function ku(t){this._internalRoot=t}ku.prototype.unstable_scheduleHydration=function(t){if(t){var e=fs();t={blockedOn:null,target:t,priority:e};for(var l=0;l<Tl.length&&e!==0&&e<Tl[l].priority;l++);Tl.splice(l,0,t),l===0&&$d(t)}};var ty=f.version;if(ty!=="19.2.4")throw Error(o(527,ty,"19.2.4"));U.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=x(e),t=t!==null?G(t):null,t=t===null?null:t.stateNode,t};var V0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wu.isDisabled&&Wu.supportsFiber)try{qa=Wu.inject(V0),ue=Wu}catch{}}return Na.createRoot=function(t,e){if(!C(t))throw Error(o(299));var l=!1,a="",n=cr,u=fr,i=sr;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(a=e.identifierPrefix),e.onUncaughtError!==void 0&&(n=e.onUncaughtError),e.onCaughtError!==void 0&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Qd(t,1,!1,null,null,l,a,null,n,u,i,Pd),t[Kl]=e.current,cf(t),new Mf(e)},Na.hydrateRoot=function(t,e,l){if(!C(t))throw Error(o(299));var a=!1,n="",u=cr,i=fr,c=sr,s=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(i=l.onCaughtError),l.onRecoverableError!==void 0&&(c=l.onRecoverableError),l.formState!==void 0&&(s=l.formState)),e=Qd(t,1,!0,e,l??null,a,n,s,u,i,c,Pd),e.context=Vd(null),l=e.current,a=ye(),a=gi(a),n=cl(a),n.callback=null,fl(l,n,a),l=a,e.current.lanes=l,Ga(e,l),je(e),t[Kl]=e.current,cf(t),new ku(e)},Na.version="19.2.4",Na}var Ff;function Sy(){if(Ff)return ni.exports;Ff=1;function h(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(h)}catch(f){console.error(f)}}return h(),ni.exports=by(),ni.exports}var If=Sy();let Re=null,zl=null;const Un={init(h){if(!h.publishableKey&&!h.apiKey&&!h.authToken)return console.error("[GlydeChat] Authentication required: provide publishableKey, apiKey, or authToken"),null;const f=h.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":h.theme||"light";Ra(f),Re&&zl&&(Re.unmount(),zl.remove(),Re=null,zl=null);const g=document.createElement("div");g.id="glyde-chat-widget",g.className="glyde-widget-root",document.body.appendChild(g),zl=g;const o=If.createRoot(g);return Re=o,o.render(Dn.createElement(Ha,{...h,initialExpanded:!1})),console.log("[GlydeChat] Widget initialized"),{destroy(){Re&&zl&&(Re.unmount(),zl.remove(),Re=null,zl=null,console.log("[GlydeChat] Widget destroyed"))},update(C){Re&&Re.render(Dn.createElement(Ha,{...h,...C}))}}},render(h,f){const g=typeof h=="string"?document.querySelector(h):h;if(!g)return console.error("[GlydeChat] Container not found:",h),null;const o=f.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":f.theme||"light";Ra(o);const C=If.createRoot(g);return C.render(Dn.createElement(Ha,{...f,container:g})),{destroy(){C.unmount()},update(D){C.render(Dn.createElement(Ha,{...f,...D,container:g}))}}},isReady(){return!0},get version(){return"__SDK_VERSION__"}};function xy(){const h=document.querySelectorAll('script[src*="glyde-chat"]'),f=h[h.length-1];if(!f){console.log("[GlydeChat] No script tag found for auto-init");return}const g=f.getAttribute("data-auto-init");if(g==="false"){console.log('[GlydeChat] Auto-init disabled via data-auto-init="false"');return}const o=f.getAttribute("data-publishable-key")||void 0,C=f.getAttribute("data-api-key")||void 0,D=f.getAttribute("data-auth-token")||void 0,Y=o||C||D;if(!Y&&!(g==="true")){console.log("[GlydeChat] Auto-init skipped: no authentication data attributes found. Call GlydeChat.init() manually.");return}if(!Y){console.warn("[GlydeChat] Auto-init skipped: no authentication provided (publishableKey, apiKey, or authToken required)");return}const O={publishableKey:o,apiKey:C,authToken:D,contextId:f.getAttribute("data-context-id")||void 0,unityBaseUrl:f.getAttribute("data-unity-url")||"https://api.glydeunity.com",contextType:f.getAttribute("data-context-type")||"screening",defaultMode:f.getAttribute("data-default-mode")||"voice",position:f.getAttribute("data-position")||"bottom-right",theme:f.getAttribute("data-theme")||"light",allowModeSwitch:f.getAttribute("data-allow-mode-switch")!=="false"};console.log("[GlydeChat] Auto-initializing with config:",{hasPublishableKey:!!O.publishableKey,hasApiKey:!!O.apiKey,hasAuthToken:!!O.authToken,contextId:O.contextId,defaultMode:O.defaultMode,position:O.position,theme:O.theme}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Un.init(O)):Un.init(O)}typeof window<"u"&&(window.GlydeChat=Un,xy()),ut.ActivityIcon=Gf,ut.BotIcon=Yf,ut.ChatWidget=Ha,ut.GlydeChat=Un,ut.GlydeText=Of,ut.GlydeVoice=_f,ut.LoaderIcon=fy,ut.MessageIcon=Pu,ut.MicIcon=ja,ut.MicOffIcon=iy,ut.MinimizeIcon=Qf,ut.PhoneIcon=cy,ut.PhoneOffIcon=Nf,ut.SendIcon=Bf,ut.TextChat=ai,ut.UserIcon=qf,ut.VoiceChat=li,ut.VolumeXIcon=Xf,ut.XIcon=Lf,ut.componentStyles=Et,ut.getPositionStyles=wf,ut.getThemeCSSVariables=ti,ut.globalStyles=ei,ut.injectGlobalStyles=Ra,ut.themeColors=Vf,ut.updateTheme=sy,ut.useTextChat=jf,ut.useVoiceAgent=Uf,Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"})}));
271
279
  //# sourceMappingURL=glyde-chat.umd.js.map