@elevenlabs/convai-widget-embed 0.13.1 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){function e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function t(t,n=`Expected a JSON object`){if(!e(t))throw Error(n)}async function n(t){try{let n=await t.json();if(!e(n))return t.statusText||`Unknown error`;let r=n.detail,i=e(r)?r.message:r;if(typeof i==`string`)return i}catch(e){console.warn(`Failed to parse API error response as JSON:`,e)}return t.statusText||`Unknown error`}var r=class extends Error{closeCode;closeReason;constructor(e,t){super(e),this.name=`SessionConnectionError`,this.closeCode=t?.closeCode,this.closeReason=t?.closeReason}},i=`https://api.elevenlabs.io`,a={reason:`agent`,context:{type:`end_call`,reason:`Agent ended the call`}};function o(e){let{textOnly:t}=e.overrides?.conversation??{},{textOnly:n}=e;if(typeof n==`boolean`)return typeof t==`boolean`&&n!==t&&console.warn(`Conflicting textOnly options provided: ${n} via options.textOnly (will be used) and ${t} via options.overrides.conversation.textOnly (will be ignored)`),n;if(typeof t==`boolean`)return t}var s=class{options;connection;lastInterruptTimestamp=0;mode=`listening`;status=`connecting`;volume=1;currentEventId=1;lastFeedbackEventId=0;canSendFeedback=!1;static getFullOptions(e){let t=o(e);return{clientTools:{},onConnect:()=>{},onDebug:()=>{},onDisconnect:()=>{},onError:()=>{},onMessage:()=>{},onAudio:()=>{},onModeChange:()=>{},onStatusChange:()=>{},onCanSendFeedbackChange:()=>{},onInterruption:()=>{},onAgentResponseCorrection:()=>{},...e,textOnly:t,overrides:{...e.overrides,conversation:{...e.overrides?.conversation,textOnly:t}}}}constructor(e,t){this.options=e,this.connection=t,this.connection.onMessage(this.onMessage),this.connection.onDisconnect(this.endSessionWithDetails),this.connection.onModeChange(e=>this.updateMode(e))}markConnected(){this.updateStatus(`connected`)}endSession(){return this.endSessionWithDetails({reason:`user`})}endSessionWithDetails=async e=>{this.status!==`connected`&&this.status!==`connecting`||(this.updateStatus(`disconnecting`),await this.handleEndSession(),this.updateStatus(`disconnected`),this.options.onDisconnect&&this.options.onDisconnect(e))};async handleEndSession(){this.connection.close()}updateMode(e){e!==this.mode&&(this.mode=e,this.options.onModeChange&&this.options.onModeChange({mode:e}))}updateStatus(e){e!==this.status&&(this.status=e,this.options.onStatusChange&&this.options.onStatusChange({status:e}))}updateCanSendFeedback(){let e=this.currentEventId!==this.lastFeedbackEventId;this.canSendFeedback!==e&&(this.canSendFeedback=e,this.options.onCanSendFeedbackChange&&this.options.onCanSendFeedbackChange({canSendFeedback:e}))}handleInterruption(e){e.interruption_event&&(this.lastInterruptTimestamp=e.interruption_event.event_id,this.options.onInterruption&&this.options.onInterruption({event_id:e.interruption_event.event_id}))}handleAgentResponse(e){this.options.onMessage&&this.options.onMessage({source:`ai`,role:`agent`,message:e.agent_response_event.agent_response,event_id:e.agent_response_event.event_id})}handleAgentResponseCorrection(e){this.options.onAgentResponseCorrection&&this.options.onAgentResponseCorrection(e.agent_response_correction_event)}handleUserTranscript(e){this.options.onMessage&&this.options.onMessage({source:`user`,role:`user`,message:e.user_transcription_event.user_transcript,event_id:e.user_transcription_event.event_id})}handleTentativeAgentResponse(e){this.options.onDebug&&this.options.onDebug({type:`tentative_agent_response`,response:e.tentative_agent_response_internal_event.tentative_agent_response})}handleVadScore(e){this.options.onVadScore&&this.options.onVadScore({vadScore:e.vad_score_event.vad_score})}async handleClientToolCall(e){if(Object.prototype.hasOwnProperty.call(this.options.clientTools,e.client_tool_call.tool_name))try{let t=await this.options.clientTools[e.client_tool_call.tool_name](e.client_tool_call.parameters)??`Client tool execution successful.`,n=typeof t==`object`?JSON.stringify(t):String(t);this.connection.sendMessage({type:`client_tool_result`,tool_call_id:e.client_tool_call.tool_call_id,result:n,is_error:!1})}catch(t){this.onError(`Client tool execution failed with following error: ${t?.message}`,{clientToolName:e.client_tool_call.tool_name}),this.connection.sendMessage({type:`client_tool_result`,tool_call_id:e.client_tool_call.tool_call_id,result:`Client tool execution failed: ${t?.message}`,is_error:!0})}else{if(this.options.onUnhandledClientToolCall){this.options.onUnhandledClientToolCall(e.client_tool_call);return}this.onError(`Client tool with name ${e.client_tool_call.tool_name} is not defined on client`,{clientToolName:e.client_tool_call.tool_name}),this.connection.sendMessage({type:`client_tool_result`,tool_call_id:e.client_tool_call.tool_call_id,result:`Client tool with name ${e.client_tool_call.tool_name} is not defined on client`,is_error:!0})}}handleAudio(e){}handleMCPToolCall(e){this.options.onMCPToolCall&&this.options.onMCPToolCall(e.mcp_tool_call)}handleMCPConnectionStatus(e){this.options.onMCPConnectionStatus&&this.options.onMCPConnectionStatus(e.mcp_connection_status)}handleAgentToolRequest(e){this.options.onAgentToolRequest&&this.options.onAgentToolRequest(e.agent_tool_request)}handleAgentToolResponse(e){e.agent_tool_response.tool_name===`end_call`&&this.endSessionWithDetails(a).catch(e=>{this.onError(`Failed to end session after agent end_call`,e)}),this.options.onAgentToolResponse?.(e.agent_tool_response)}handleAgentToolResponseFullPayload(e){e.agent_tool_response_full_payload.tool_name===`end_call`&&this.endSessionWithDetails(a).catch(e=>{this.onError(`Failed to end session after agent end_call`,e)}),this.options.onAgentToolResponse?.(e.agent_tool_response_full_payload)}handleConversationMetadata(e){this.options.onConversationMetadata&&this.options.onConversationMetadata(e.conversation_initiation_metadata_event)}handleAsrInitiationMetadata(e){this.options.onAsrInitiationMetadata&&this.options.onAsrInitiationMetadata(e.asr_initiation_metadata_event)}handleAgentChatResponsePart(e){this.options.onAgentChatResponsePart&&this.options.onAgentChatResponsePart(e.text_response_part)}handleGuardrailTriggered(e){this.options.onGuardrailTriggered&&this.options.onGuardrailTriggered()}handleErrorEvent(e){let t=e.error_event.error_type,n=e.error_event.message||e.error_event.reason||`Unknown error`;if(t===`max_duration_exceeded`){this.endSessionWithDetails({reason:`error`,message:n,context:{type:`max_duration_exceeded`}}).catch(e=>{this.onError(`Failed to end session after max_duration_exceeded`,e)});return}this.onError(`Server error: ${n}`,{errorType:t,code:e.error_event.code,debugMessage:e.error_event.debug_message,details:e.error_event.details})}onMessage=async e=>{switch(e.type){case`interruption`:this.handleInterruption(e);return;case`agent_response`:this.handleAgentResponse(e);return;case`agent_response_correction`:this.handleAgentResponseCorrection(e);return;case`user_transcript`:this.handleUserTranscript(e);return;case`internal_tentative_agent_response`:this.handleTentativeAgentResponse(e);return;case`client_tool_call`:try{await this.handleClientToolCall(e)}catch(t){this.onError(`Unexpected error in client tool call handling: ${t instanceof Error?t.message:String(t)}`,{clientToolName:e.client_tool_call.tool_name,toolCallId:e.client_tool_call.tool_call_id})}return;case`audio`:this.handleAudio(e);return;case`vad_score`:this.handleVadScore(e);return;case`ping`:this.connection.sendMessage({type:`pong`,event_id:e.ping_event.event_id});return;case`mcp_tool_call`:this.handleMCPToolCall(e);return;case`mcp_connection_status`:this.handleMCPConnectionStatus(e);return;case`agent_tool_request`:this.handleAgentToolRequest(e);return;case`agent_tool_response`:this.handleAgentToolResponse(e);return;case`agent_tool_response_full_payload`:this.handleAgentToolResponseFullPayload(e);return;case`conversation_initiation_metadata`:this.handleConversationMetadata(e);return;case`asr_initiation_metadata`:this.handleAsrInitiationMetadata(e);return;case`agent_chat_response_part`:this.handleAgentChatResponsePart(e);return;case`guardrail_triggered`:this.handleGuardrailTriggered(e);return;case`error`:this.handleErrorEvent(e);return;default:this.options.onDebug&&this.options.onDebug(e);return}};onError(e,t){console.error(e,t),this.options.onError&&this.options.onError(e,t)}getId(){return this.connection.conversationId}isOpen(){return this.status===`connected`}sendFeedback(e){if(!this.canSendFeedback){console.warn(this.lastFeedbackEventId===0?`Cannot send feedback: the conversation has not started yet.`:`Cannot send feedback: feedback has already been sent for the current response.`);return}this.connection.sendMessage({type:`feedback`,score:e?`like`:`dislike`,event_id:this.currentEventId}),this.lastFeedbackEventId=this.currentEventId,this.updateCanSendFeedback()}sendContextualUpdate(e,t){this.connection.sendMessage({type:`contextual_update`,text:e,...t?.contextId?{context_id:t.contextId}:{}})}sendUserMessage(e){this.connection.sendMessage({type:`user_message`,text:e})}sendUserActivity(){this.connection.sendMessage({type:`user_activity`})}sendMCPToolApprovalResult(e,t){this.connection.sendMessage({type:`mcp_tool_approval_result`,tool_call_id:e,is_approved:t})}sendMultimodalMessage(e){this.connection.sendMessage({type:`multimodal_message`,text:e.text?{type:`user_message`,text:e.text}:void 0,file:e.fileId?{type:`file_input`,file_id:e.fileId}:void 0})}async uploadFile(e){let r=(this.options.origin??i).replace(/^wss:\/\//,`https://`).replace(/^ws:\/\//,`http://`),a=`name`in e&&typeof e.name==`string`?e.name:`upload.${(e.type||`image/png`).split(`/`).pop()?.split(`+`)[0]}`,o=new FormData;o.append(`file`,e,a);let s=await fetch(`${r}/v1/convai/conversations/${this.connection.conversationId}/files`,{method:`POST`,body:o});if(!s.ok){let e=await n(s);throw Error(`Upload failed: ${s.status} ${e}`)}let c=await s.json();t(c,`Upload response is not a JSON object`);let{file_id:l}=c;if(typeof l!=`string`||!l)throw Error(`Upload response is missing a valid file_id`);return{fileId:l}}},c=Object.freeze({name:`js_sdk`,version:`1.9.0`});function l(e){c=Object.freeze(e)}var u=class{queue=[];disconnectionDetails=null;onDisconnectCallback=null;onMessageCallback=null;onModeChangeCallback=null;onDebug;constructor(e={}){this.onDebug=e.onDebug}debug(e){this.onDebug&&this.onDebug(e)}onMessage(e){this.onMessageCallback=e;let t=this.queue;this.queue=[],t.length>0&&queueMicrotask(()=>{t.forEach(e)})}onDisconnect(e){this.onDisconnectCallback=e;let t=this.disconnectionDetails;t&&queueMicrotask(()=>{e(t)})}onModeChange(e){this.onModeChangeCallback=e}updateMode(e){this.onModeChangeCallback?.(e)}disconnect(e){this.disconnectionDetails||(this.disconnectionDetails=e,this.onDisconnectCallback?.(e))}handleMessage(e){this.onMessageCallback?this.onMessageCallback(e):this.queue.push(e)}};function d(e){let[t,n]=e.split(`_`);if(![`pcm`,`ulaw`].includes(t))throw Error(`Invalid format: ${e}`);let r=Number.parseInt(n);if(Number.isNaN(r))throw Error(`Invalid sample rate: ${n}`);return{format:t,sampleRate:r}}function f(e){return!!e.type}function p(e,t){return t.forEach(function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!==`default`&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var m=Object.defineProperty,h=(e,t,n)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t,n)=>h(e,typeof t==`symbol`?t:t+``,n),_=class{constructor(){g(this,`_locking`),g(this,`_locks`),this._locking=Promise.resolve(),this._locks=0}isLocked(){return this._locks>0}lock(){this._locks+=1;let e,t=new Promise(t=>e=()=>{--this._locks,t()}),n=this._locking.then(()=>e);return this._locking=this._locking.then(()=>t),n}};function v(e,t){if(!e)throw Error(t)}var y=34028234663852886e22,b=-34028234663852886e22,x=4294967295,S=2147483647,C=-2147483648;function w(e){if(typeof e!=`number`)throw Error(`invalid int 32: `+typeof e);if(!Number.isInteger(e)||e>S||e<C)throw Error(`invalid int 32: `+e)}function T(e){if(typeof e!=`number`)throw Error(`invalid uint 32: `+typeof e);if(!Number.isInteger(e)||e>x||e<0)throw Error(`invalid uint 32: `+e)}function ee(e){if(typeof e!=`number`)throw Error(`invalid float 32: `+typeof e);if(Number.isFinite(e)&&(e>y||e<b))throw Error(`invalid float 32: `+e)}var te=Symbol(`@bufbuild/protobuf/enum-type`);function ne(e){let t=e[te];return v(t,`missing enum type on enum object`),t}function re(e,t,n,r){e[te]=ie(t,n.map(t=>({no:t.no,name:t.name,localName:e[t.no]})))}function ie(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let e of t){let t=oe(e);a.push(t),r[e.name]=t,i[e.no]=t}return{typeName:e,values:a,findName(e){return r[e]},findNumber(e){return i[e]}}}function ae(e,t,n){let r={};for(let e of t){let t=oe(e);r[t.localName]=t.no,r[t.no]=t.localName}return re(r,e,t),r}function oe(e){return`localName`in e?e:Object.assign(Object.assign({},e),{localName:e.name})}var se=class{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){let n=this.getType().runtime.bin,r=n.makeReadOptions(t);return n.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){let n=this.getType(),r=n.runtime.json,i=r.makeReadOptions(t);return r.readMessage(n,e,i,this),this}fromJsonString(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`cannot decode ${this.getType().typeName} from JSON: ${e instanceof Error?e.message:String(e)}`)}return this.fromJson(n,t)}toBinary(e){let t=this.getType().runtime.bin,n=t.makeWriteOptions(e),r=n.writerFactory();return t.writeMessage(this,r,n),r.finish()}toJson(e){let t=this.getType().runtime.json,n=t.makeWriteOptions(e);return t.writeMessage(this,n)}toJsonString(e){let t=this.toJson(e);return JSON.stringify(t,null,e?.prettySpaces??0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function E(e,t,n,r){let i=r?.localName??t.substring(t.lastIndexOf(`.`)+1),a={[i]:function(t){e.util.initFields(this),e.util.initPartial(t,this)}}[i];return Object.setPrototypeOf(a.prototype,new se),Object.assign(a,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(e,t){return new a().fromBinary(e,t)},fromJson(e,t){return new a().fromJson(e,t)},fromJsonString(e,t){return new a().fromJsonString(e,t)},equals(t,n){return e.util.equals(a,t,n)}}),a}function ce(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<n,!(r&128))return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,!(n&128))return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<n,!(r&128))return this.assertBounds(),[e,t]}throw Error(`invalid varint`)}function le(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(!(i>>>7)&&t==0),o=(a?i|128:i)&255;if(n.push(o),!a)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=!!(r>>>7),a=(i?r|128:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}var ue=4294967296;function de(e){let t=e[0]===`-`;t&&(e=e.slice(1));let n=1e6,r=0,i=0;function a(t,a){let o=Number(e.slice(t,a));i*=n,r=r*n+o,r>=ue&&(i+=r/ue|0,r%=ue)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?ge(r,i):he(r,i)}function fe(e,t){let n=he(e,t),r=n.hi&2147483648;r&&(n=ge(n.lo,n.hi));let i=pe(n.lo,n.hi);return r?`-`+i:i}function pe(e,t){if({lo:e,hi:t}=me(e,t),t<=2097151)return String(ue*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,s=i*2,c=1e7;return a>=c&&(o+=Math.floor(a/c),a%=c),o>=c&&(s+=Math.floor(o/c),o%=c),s.toString()+_e(o)+_e(a)}function me(e,t){return{lo:e>>>0,hi:t>>>0}}function he(e,t){return{lo:e|0,hi:t|0}}function ge(e,t){return t=~t,e?e=~e+1:t+=1,he(e,t)}var _e=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function ve(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e>>=7;t.push(1)}}function ye(){let e=this.buf[this.pos++],t=e&127;if(!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}function be(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt==`function`&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`&&(typeof process!=`object`||typeof process.env!=`object`||process.env.BUF_BIGINT_DISABLE!==`1`)){let t=BigInt(`-9223372036854775808`),n=BigInt(`9223372036854775807`),r=BigInt(`0`),i=BigInt(`18446744073709551615`);return{zero:BigInt(0),supported:!0,parse(e){let r=typeof e==`bigint`?e:BigInt(e);if(r>n||r<t)throw Error(`int64 invalid: ${e}`);return r},uParse(e){let t=typeof e==`bigint`?e:BigInt(e);if(t>i||t<r)throw Error(`uint64 invalid: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(t,n){return e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)},uDec(t,n){return e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0)}}}let t=e=>v(/^-?[0-9]+$/.test(e),`int64 invalid: ${e}`),n=e=>v(/^[0-9]+$/.test(e),`uint64 invalid: ${e}`);return{zero:`0`,supported:!1,parse(e){return typeof e!=`string`&&(e=e.toString()),t(e),e},uParse(e){return typeof e!=`string`&&(e=e.toString()),n(e),e},enc(e){return typeof e!=`string`&&(e=e.toString()),t(e),de(e)},uEnc(e){return typeof e!=`string`&&(e=e.toString()),n(e),de(e)},dec(e,t){return fe(e,t)},uDec(e,t){return pe(e,t)}}}var xe=be(),D;(function(e){e[e.DOUBLE=1]=`DOUBLE`,e[e.FLOAT=2]=`FLOAT`,e[e.INT64=3]=`INT64`,e[e.UINT64=4]=`UINT64`,e[e.INT32=5]=`INT32`,e[e.FIXED64=6]=`FIXED64`,e[e.FIXED32=7]=`FIXED32`,e[e.BOOL=8]=`BOOL`,e[e.STRING=9]=`STRING`,e[e.BYTES=12]=`BYTES`,e[e.UINT32=13]=`UINT32`,e[e.SFIXED32=15]=`SFIXED32`,e[e.SFIXED64=16]=`SFIXED64`,e[e.SINT32=17]=`SINT32`,e[e.SINT64=18]=`SINT64`})(D||={});var Se;(function(e){e[e.BIGINT=0]=`BIGINT`,e[e.STRING=1]=`STRING`})(Se||={});function Ce(e,t,n){if(t===n)return!0;if(e==D.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}switch(e){case D.UINT64:case D.FIXED64:case D.INT64:case D.SFIXED64:case D.SINT64:return t==n}return!1}function we(e,t){switch(e){case D.BOOL:return!1;case D.UINT64:case D.FIXED64:case D.INT64:case D.SFIXED64:case D.SINT64:return t==0?xe.zero:`0`;case D.DOUBLE:case D.FLOAT:return 0;case D.BYTES:return new Uint8Array;case D.STRING:return``;default:return 0}}function Te(e,t){switch(e){case D.BOOL:return t===!1;case D.STRING:return t===``;case D.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return t==0}}var Ee;(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(Ee||={});var De=class{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error(`invalid state, fork stack empty`);return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(T(e);e>127;)this.buf.push(e&127|128),e>>>=7;return this.buf.push(e),this}int32(e){return w(e),ve(e,this.buf),this}bool(e){return this.buf.push(+!!e),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){ee(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){T(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){w(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return w(e),e=(e<<1^e>>31)>>>0,ve(e,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=xe.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=xe.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=xe.enc(e);return le(t.lo,t.hi,this.buf),this}sint64(e){let t=xe.enc(e),n=t.hi>>31;return le(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=xe.uEnc(e);return le(t.lo,t.hi,this.buf),this}},Oe=class{constructor(e,t){this.varint64=ce,this.uint32=ye,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=t??new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,n=e&7;if(t<=0||n<0||n>5)throw Error(`illegal tag: field no `+t+` wire type `+n);return[t,n]}skip(e,t){let n=this.pos;switch(e){case Ee.Varint:for(;this.buf[this.pos++]&128;);break;case Ee.Bit64:this.pos+=4;case Ee.Bit32:this.pos+=4;break;case Ee.LengthDelimited:let n=this.uint32();this.pos+=n;break;case Ee.StartGroup:for(;;){let[e,n]=this.tag();if(n===Ee.EndGroup){if(t!==void 0&&e!==t)throw Error(`invalid end group tag`);break}this.skip(n,e)}break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return xe.dec(...this.varint64())}uint64(){return xe.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(e&1);return e=(e>>>1|(t&1)<<31)^n,t=t>>>1^n,xe.dec(e,t)}bool(){let[e,t]=this.varint64();return e!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return xe.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return xe.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}};function ke(e,t,n,r){let i;return{typeName:t,extendee:n,get field(){if(!i){let n=typeof r==`function`?r():r;n.name=t.split(`.`).pop(),n.jsonName=`[${t}]`,i=e.util.newFieldList([n]).list()[0]}return i},runtime:e}}function Ae(e){let t=e.field.localName,n=Object.create(null);return n[t]=je(e),[n,()=>n[t]]}function je(e){let t=e.field;if(t.repeated)return[];if(t.default!==void 0)return t.default;switch(t.kind){case`enum`:return t.T.values[0].no;case`scalar`:return we(t.T,t.L);case`message`:let e=t.T,n=new e;return e.fieldWrapper?e.fieldWrapper.unwrapField(n):n;case`map`:throw`map fields are not allowed to be extensions`}}function Me(e,t){if(!t.repeated&&(t.kind==`enum`||t.kind==`scalar`)){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(e=>e.no===t.no)}var Ne=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),Pe=[];for(let e=0;e<Ne.length;e++)Pe[Ne[e].charCodeAt(0)]=e;Pe[45]=Ne.indexOf(`+`),Pe[95]=Ne.indexOf(`/`);var Fe={dec(e){let t=e.length*3/4;e[e.length-2]==`=`?t-=2:e[e.length-1]==`=`&&--t;let n=new Uint8Array(t),r=0,i=0,a,o=0;for(let t=0;t<e.length;t++){if(a=Pe[e.charCodeAt(t)],a===void 0)switch(e[t]){case`=`:i=0;case`
|
|
1
|
+
(function(){function e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function t(t,n=`Expected a JSON object`){if(!e(t))throw Error(n)}async function n(t){try{let n=await t.json();if(!e(n))return t.statusText||`Unknown error`;let r=n.detail,i=e(r)?r.message:r;if(typeof i==`string`)return i}catch(e){console.warn(`Failed to parse API error response as JSON:`,e)}return t.statusText||`Unknown error`}var r=class extends Error{closeCode;closeReason;constructor(e,t){super(e),this.name=`SessionConnectionError`,this.closeCode=t?.closeCode,this.closeReason=t?.closeReason}},i=`https://api.elevenlabs.io`,a={reason:`agent`,context:{type:`end_call`,reason:`Agent ended the call`}};function o(e){let{textOnly:t}=e.overrides?.conversation??{},{textOnly:n}=e;if(typeof n==`boolean`)return typeof t==`boolean`&&n!==t&&console.warn(`Conflicting textOnly options provided: ${n} via options.textOnly (will be used) and ${t} via options.overrides.conversation.textOnly (will be ignored)`),n;if(typeof t==`boolean`)return t}var s=class{options;connection;lastInterruptTimestamp=0;mode=`listening`;status=`connecting`;volume=1;currentEventId=1;lastFeedbackEventId=0;canSendFeedback=!1;static getFullOptions(e){let t=o(e);return{clientTools:{},onConnect:()=>{},onDebug:()=>{},onDisconnect:()=>{},onError:()=>{},onMessage:()=>{},onAudio:()=>{},onModeChange:()=>{},onStatusChange:()=>{},onCanSendFeedbackChange:()=>{},onInterruption:()=>{},onAgentResponseCorrection:()=>{},onAgentTyping:()=>{},onExternalAgentConnected:()=>{},...e,textOnly:t,overrides:{...e.overrides,conversation:{...e.overrides?.conversation,textOnly:t}}}}constructor(e,t){this.options=e,this.connection=t,this.connection.onMessage(this.onMessage),this.connection.onDisconnect(this.endSessionWithDetails),this.connection.onModeChange(e=>this.updateMode(e))}markConnected(){this.updateStatus(`connected`)}endSession(){return this.endSessionWithDetails({reason:`user`})}endSessionWithDetails=async e=>{this.status!==`connected`&&this.status!==`connecting`||(this.updateStatus(`disconnecting`),await this.handleEndSession(),this.updateStatus(`disconnected`),this.options.onDisconnect&&this.options.onDisconnect(e))};async handleEndSession(){this.connection.close()}updateMode(e){e!==this.mode&&(this.mode=e,this.options.onModeChange&&this.options.onModeChange({mode:e}))}updateStatus(e){e!==this.status&&(this.status=e,this.options.onStatusChange&&this.options.onStatusChange({status:e}))}updateCanSendFeedback(){let e=this.currentEventId!==this.lastFeedbackEventId;this.canSendFeedback!==e&&(this.canSendFeedback=e,this.options.onCanSendFeedbackChange&&this.options.onCanSendFeedbackChange({canSendFeedback:e}))}handleInterruption(e){e.interruption_event&&(this.lastInterruptTimestamp=e.interruption_event.event_id,this.options.onInterruption&&this.options.onInterruption({event_id:e.interruption_event.event_id}))}handleAgentResponse(e){this.options.onMessage&&this.options.onMessage({source:`ai`,role:`agent`,message:e.agent_response_event.agent_response,event_id:e.agent_response_event.event_id})}handleAgentResponseCorrection(e){this.options.onAgentResponseCorrection&&this.options.onAgentResponseCorrection(e.agent_response_correction_event)}handleUserTranscript(e){this.options.onMessage&&this.options.onMessage({source:`user`,role:`user`,message:e.user_transcription_event.user_transcript,event_id:e.user_transcription_event.event_id})}handleTentativeAgentResponse(e){this.options.onDebug&&this.options.onDebug({type:`tentative_agent_response`,response:e.tentative_agent_response_internal_event.tentative_agent_response})}handleVadScore(e){this.options.onVadScore&&this.options.onVadScore({vadScore:e.vad_score_event.vad_score})}async handleClientToolCall(e){if(Object.prototype.hasOwnProperty.call(this.options.clientTools,e.client_tool_call.tool_name))try{let t=await this.options.clientTools[e.client_tool_call.tool_name](e.client_tool_call.parameters)??`Client tool execution successful.`,n=typeof t==`object`?JSON.stringify(t):String(t);this.connection.sendMessage({type:`client_tool_result`,tool_call_id:e.client_tool_call.tool_call_id,result:n,is_error:!1})}catch(t){this.onError(`Client tool execution failed with following error: ${t?.message}`,{clientToolName:e.client_tool_call.tool_name}),this.connection.sendMessage({type:`client_tool_result`,tool_call_id:e.client_tool_call.tool_call_id,result:`Client tool execution failed: ${t?.message}`,is_error:!0})}else{if(this.options.onUnhandledClientToolCall){this.options.onUnhandledClientToolCall(e.client_tool_call);return}this.onError(`Client tool with name ${e.client_tool_call.tool_name} is not defined on client`,{clientToolName:e.client_tool_call.tool_name}),this.connection.sendMessage({type:`client_tool_result`,tool_call_id:e.client_tool_call.tool_call_id,result:`Client tool with name ${e.client_tool_call.tool_name} is not defined on client`,is_error:!0})}}handleAudio(e){}handleMCPToolCall(e){this.options.onMCPToolCall&&this.options.onMCPToolCall(e.mcp_tool_call)}handleMCPConnectionStatus(e){this.options.onMCPConnectionStatus&&this.options.onMCPConnectionStatus(e.mcp_connection_status)}handleAgentToolRequest(e){this.options.onAgentToolRequest&&this.options.onAgentToolRequest(e.agent_tool_request)}handleAgentToolResponse(e){e.agent_tool_response.tool_name===`end_call`&&this.endSessionWithDetails(a).catch(e=>{this.onError(`Failed to end session after agent end_call`,e)}),this.options.onAgentToolResponse?.(e.agent_tool_response)}handleAgentToolResponseFullPayload(e){e.agent_tool_response_full_payload.tool_name===`end_call`&&this.endSessionWithDetails(a).catch(e=>{this.onError(`Failed to end session after agent end_call`,e)}),this.options.onAgentToolResponse?.(e.agent_tool_response_full_payload)}handleConversationMetadata(e){this.options.onConversationMetadata&&this.options.onConversationMetadata(e.conversation_initiation_metadata_event)}handleAsrInitiationMetadata(e){this.options.onAsrInitiationMetadata&&this.options.onAsrInitiationMetadata(e.asr_initiation_metadata_event)}handleAgentChatResponsePart(e){this.options.onAgentChatResponsePart&&this.options.onAgentChatResponsePart(e.text_response_part)}handleGuardrailTriggered(e){this.options.onGuardrailTriggered&&this.options.onGuardrailTriggered()}handleAgentTyping(e){this.options.onAgentTyping&&this.options.onAgentTyping(e.agent_typing_event)}handleExternalAgentConnected(e){this.options.onExternalAgentConnected&&this.options.onExternalAgentConnected()}handleErrorEvent(e){let t=e.error_event.error_type,n=e.error_event.message||e.error_event.reason||`Unknown error`;if(t===`max_duration_exceeded`){this.endSessionWithDetails({reason:`error`,message:n,context:{type:`max_duration_exceeded`}}).catch(e=>{this.onError(`Failed to end session after max_duration_exceeded`,e)});return}this.onError(`Server error: ${n}`,{errorType:t,code:e.error_event.code,debugMessage:e.error_event.debug_message,details:e.error_event.details})}onMessage=async e=>{switch(e.type){case`interruption`:this.handleInterruption(e);return;case`agent_response`:this.handleAgentResponse(e);return;case`agent_response_correction`:this.handleAgentResponseCorrection(e);return;case`user_transcript`:this.handleUserTranscript(e);return;case`internal_tentative_agent_response`:this.handleTentativeAgentResponse(e);return;case`client_tool_call`:try{await this.handleClientToolCall(e)}catch(t){this.onError(`Unexpected error in client tool call handling: ${t instanceof Error?t.message:String(t)}`,{clientToolName:e.client_tool_call.tool_name,toolCallId:e.client_tool_call.tool_call_id})}return;case`audio`:this.handleAudio(e);return;case`vad_score`:this.handleVadScore(e);return;case`ping`:this.connection.sendMessage({type:`pong`,event_id:e.ping_event.event_id});return;case`mcp_tool_call`:this.handleMCPToolCall(e);return;case`mcp_connection_status`:this.handleMCPConnectionStatus(e);return;case`agent_tool_request`:this.handleAgentToolRequest(e);return;case`agent_tool_response`:this.handleAgentToolResponse(e);return;case`agent_tool_response_full_payload`:this.handleAgentToolResponseFullPayload(e);return;case`conversation_initiation_metadata`:this.handleConversationMetadata(e);return;case`asr_initiation_metadata`:this.handleAsrInitiationMetadata(e);return;case`agent_chat_response_part`:this.handleAgentChatResponsePart(e);return;case`guardrail_triggered`:this.handleGuardrailTriggered(e);return;case`error`:this.handleErrorEvent(e);return;case`agent_typing`:this.handleAgentTyping(e);return;case`external_agent_connected`:this.handleExternalAgentConnected(e);return;default:this.options.onDebug&&this.options.onDebug(e);return}};onError(e,t){console.error(e,t),this.options.onError&&this.options.onError(e,t)}getId(){return this.connection.conversationId}isOpen(){return this.status===`connected`}sendFeedback(e){if(!this.canSendFeedback){console.warn(this.lastFeedbackEventId===0?`Cannot send feedback: the conversation has not started yet.`:`Cannot send feedback: feedback has already been sent for the current response.`);return}this.connection.sendMessage({type:`feedback`,score:e?`like`:`dislike`,event_id:this.currentEventId}),this.lastFeedbackEventId=this.currentEventId,this.updateCanSendFeedback()}sendContextualUpdate(e,t){this.connection.sendMessage({type:`contextual_update`,text:e,...t?.contextId?{context_id:t.contextId}:{}})}sendUserMessage(e){this.connection.sendMessage({type:`user_message`,text:e})}sendUserActivity(){this.connection.sendMessage({type:`user_activity`})}sendMCPToolApprovalResult(e,t){this.connection.sendMessage({type:`mcp_tool_approval_result`,tool_call_id:e,is_approved:t})}sendMultimodalMessage(e){this.connection.sendMessage({type:`multimodal_message`,text:e.text?{type:`user_message`,text:e.text}:void 0,file:e.fileId?{type:`file_input`,file_id:e.fileId}:void 0})}async uploadFile(e){let r=(this.options.origin??i).replace(/^wss:\/\//,`https://`).replace(/^ws:\/\//,`http://`),a=`name`in e&&typeof e.name==`string`?e.name:`upload.${(e.type||`image/png`).split(`/`).pop()?.split(`+`)[0]}`,o=new FormData;o.append(`file`,e,a);let s=await fetch(`${r}/v1/convai/conversations/${this.connection.conversationId}/files`,{method:`POST`,body:o});if(!s.ok){let e=await n(s);throw Error(`Upload failed: ${s.status} ${e}`)}let c=await s.json();t(c,`Upload response is not a JSON object`);let{file_id:l}=c;if(typeof l!=`string`||!l)throw Error(`Upload response is missing a valid file_id`);return{fileId:l}}},c=Object.freeze({name:`js_sdk`,version:`1.11.0`});function l(e){c=Object.freeze(e)}var u=class{queue=[];disconnectionDetails=null;onDisconnectCallback=null;onMessageCallback=null;onModeChangeCallback=null;onDebug;constructor(e={}){this.onDebug=e.onDebug}debug(e){this.onDebug&&this.onDebug(e)}onMessage(e){this.onMessageCallback=e;let t=this.queue;this.queue=[],t.length>0&&queueMicrotask(()=>{t.forEach(e)})}onDisconnect(e){this.onDisconnectCallback=e;let t=this.disconnectionDetails;t&&queueMicrotask(()=>{e(t)})}onModeChange(e){this.onModeChangeCallback=e}updateMode(e){this.onModeChangeCallback?.(e)}disconnect(e){this.disconnectionDetails||(this.disconnectionDetails=e,this.onDisconnectCallback?.(e))}handleMessage(e){this.onMessageCallback?this.onMessageCallback(e):this.queue.push(e)}};function d(e){let[t,n]=e.split(`_`);if(![`pcm`,`ulaw`].includes(t))throw Error(`Invalid format: ${e}`);let r=Number.parseInt(n);if(Number.isNaN(r))throw Error(`Invalid sample rate: ${n}`);return{format:t,sampleRate:r}}function f(e){return!!e.type}function p(e,t){return t.forEach(function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!==`default`&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var m=Object.defineProperty,h=(e,t,n)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t,n)=>h(e,typeof t==`symbol`?t:t+``,n),_=class{constructor(){g(this,`_locking`),g(this,`_locks`),this._locking=Promise.resolve(),this._locks=0}isLocked(){return this._locks>0}lock(){this._locks+=1;let e,t=new Promise(t=>e=()=>{--this._locks,t()}),n=this._locking.then(()=>e);return this._locking=this._locking.then(()=>t),n}};function v(e,t){if(!e)throw Error(t)}var y=34028234663852886e22,b=-34028234663852886e22,x=4294967295,S=2147483647,C=-2147483648;function w(e){if(typeof e!=`number`)throw Error(`invalid int 32: `+typeof e);if(!Number.isInteger(e)||e>S||e<C)throw Error(`invalid int 32: `+e)}function T(e){if(typeof e!=`number`)throw Error(`invalid uint 32: `+typeof e);if(!Number.isInteger(e)||e>x||e<0)throw Error(`invalid uint 32: `+e)}function ee(e){if(typeof e!=`number`)throw Error(`invalid float 32: `+typeof e);if(Number.isFinite(e)&&(e>y||e<b))throw Error(`invalid float 32: `+e)}var te=Symbol(`@bufbuild/protobuf/enum-type`);function ne(e){let t=e[te];return v(t,`missing enum type on enum object`),t}function re(e,t,n,r){e[te]=ie(t,n.map(t=>({no:t.no,name:t.name,localName:e[t.no]})))}function ie(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let e of t){let t=oe(e);a.push(t),r[e.name]=t,i[e.no]=t}return{typeName:e,values:a,findName(e){return r[e]},findNumber(e){return i[e]}}}function ae(e,t,n){let r={};for(let e of t){let t=oe(e);r[t.localName]=t.no,r[t.no]=t.localName}return re(r,e,t),r}function oe(e){return`localName`in e?e:Object.assign(Object.assign({},e),{localName:e.name})}var se=class{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){let n=this.getType().runtime.bin,r=n.makeReadOptions(t);return n.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){let n=this.getType(),r=n.runtime.json,i=r.makeReadOptions(t);return r.readMessage(n,e,i,this),this}fromJsonString(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`cannot decode ${this.getType().typeName} from JSON: ${e instanceof Error?e.message:String(e)}`)}return this.fromJson(n,t)}toBinary(e){let t=this.getType().runtime.bin,n=t.makeWriteOptions(e),r=n.writerFactory();return t.writeMessage(this,r,n),r.finish()}toJson(e){let t=this.getType().runtime.json,n=t.makeWriteOptions(e);return t.writeMessage(this,n)}toJsonString(e){let t=this.toJson(e);return JSON.stringify(t,null,e?.prettySpaces??0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function E(e,t,n,r){let i=r?.localName??t.substring(t.lastIndexOf(`.`)+1),a={[i]:function(t){e.util.initFields(this),e.util.initPartial(t,this)}}[i];return Object.setPrototypeOf(a.prototype,new se),Object.assign(a,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(e,t){return new a().fromBinary(e,t)},fromJson(e,t){return new a().fromJson(e,t)},fromJsonString(e,t){return new a().fromJsonString(e,t)},equals(t,n){return e.util.equals(a,t,n)}}),a}function ce(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<n,!(r&128))return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,!(n&128))return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<n,!(r&128))return this.assertBounds(),[e,t]}throw Error(`invalid varint`)}function le(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(!(i>>>7)&&t==0),o=(a?i|128:i)&255;if(n.push(o),!a)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=!!(r>>>7),a=(i?r|128:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}var ue=4294967296;function de(e){let t=e[0]===`-`;t&&(e=e.slice(1));let n=1e6,r=0,i=0;function a(t,a){let o=Number(e.slice(t,a));i*=n,r=r*n+o,r>=ue&&(i+=r/ue|0,r%=ue)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?ge(r,i):he(r,i)}function fe(e,t){let n=he(e,t),r=n.hi&2147483648;r&&(n=ge(n.lo,n.hi));let i=pe(n.lo,n.hi);return r?`-`+i:i}function pe(e,t){if({lo:e,hi:t}=me(e,t),t<=2097151)return String(ue*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,s=i*2,c=1e7;return a>=c&&(o+=Math.floor(a/c),a%=c),o>=c&&(s+=Math.floor(o/c),o%=c),s.toString()+_e(o)+_e(a)}function me(e,t){return{lo:e>>>0,hi:t>>>0}}function he(e,t){return{lo:e|0,hi:t|0}}function ge(e,t){return t=~t,e?e=~e+1:t+=1,he(e,t)}var _e=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function ve(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e>>=7;t.push(1)}}function ye(){let e=this.buf[this.pos++],t=e&127;if(!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}function be(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt==`function`&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`&&(typeof process!=`object`||typeof process.env!=`object`||process.env.BUF_BIGINT_DISABLE!==`1`)){let t=BigInt(`-9223372036854775808`),n=BigInt(`9223372036854775807`),r=BigInt(`0`),i=BigInt(`18446744073709551615`);return{zero:BigInt(0),supported:!0,parse(e){let r=typeof e==`bigint`?e:BigInt(e);if(r>n||r<t)throw Error(`int64 invalid: ${e}`);return r},uParse(e){let t=typeof e==`bigint`?e:BigInt(e);if(t>i||t<r)throw Error(`uint64 invalid: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(t,n){return e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)},uDec(t,n){return e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0)}}}let t=e=>v(/^-?[0-9]+$/.test(e),`int64 invalid: ${e}`),n=e=>v(/^[0-9]+$/.test(e),`uint64 invalid: ${e}`);return{zero:`0`,supported:!1,parse(e){return typeof e!=`string`&&(e=e.toString()),t(e),e},uParse(e){return typeof e!=`string`&&(e=e.toString()),n(e),e},enc(e){return typeof e!=`string`&&(e=e.toString()),t(e),de(e)},uEnc(e){return typeof e!=`string`&&(e=e.toString()),n(e),de(e)},dec(e,t){return fe(e,t)},uDec(e,t){return pe(e,t)}}}var xe=be(),D;(function(e){e[e.DOUBLE=1]=`DOUBLE`,e[e.FLOAT=2]=`FLOAT`,e[e.INT64=3]=`INT64`,e[e.UINT64=4]=`UINT64`,e[e.INT32=5]=`INT32`,e[e.FIXED64=6]=`FIXED64`,e[e.FIXED32=7]=`FIXED32`,e[e.BOOL=8]=`BOOL`,e[e.STRING=9]=`STRING`,e[e.BYTES=12]=`BYTES`,e[e.UINT32=13]=`UINT32`,e[e.SFIXED32=15]=`SFIXED32`,e[e.SFIXED64=16]=`SFIXED64`,e[e.SINT32=17]=`SINT32`,e[e.SINT64=18]=`SINT64`})(D||={});var Se;(function(e){e[e.BIGINT=0]=`BIGINT`,e[e.STRING=1]=`STRING`})(Se||={});function Ce(e,t,n){if(t===n)return!0;if(e==D.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}switch(e){case D.UINT64:case D.FIXED64:case D.INT64:case D.SFIXED64:case D.SINT64:return t==n}return!1}function we(e,t){switch(e){case D.BOOL:return!1;case D.UINT64:case D.FIXED64:case D.INT64:case D.SFIXED64:case D.SINT64:return t==0?xe.zero:`0`;case D.DOUBLE:case D.FLOAT:return 0;case D.BYTES:return new Uint8Array;case D.STRING:return``;default:return 0}}function Te(e,t){switch(e){case D.BOOL:return t===!1;case D.STRING:return t===``;case D.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return t==0}}var Ee;(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(Ee||={});var De=class{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error(`invalid state, fork stack empty`);return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(T(e);e>127;)this.buf.push(e&127|128),e>>>=7;return this.buf.push(e),this}int32(e){return w(e),ve(e,this.buf),this}bool(e){return this.buf.push(+!!e),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){ee(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){T(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){w(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return w(e),e=(e<<1^e>>31)>>>0,ve(e,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=xe.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=xe.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=xe.enc(e);return le(t.lo,t.hi,this.buf),this}sint64(e){let t=xe.enc(e),n=t.hi>>31;return le(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=xe.uEnc(e);return le(t.lo,t.hi,this.buf),this}},Oe=class{constructor(e,t){this.varint64=ce,this.uint32=ye,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=t??new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,n=e&7;if(t<=0||n<0||n>5)throw Error(`illegal tag: field no `+t+` wire type `+n);return[t,n]}skip(e,t){let n=this.pos;switch(e){case Ee.Varint:for(;this.buf[this.pos++]&128;);break;case Ee.Bit64:this.pos+=4;case Ee.Bit32:this.pos+=4;break;case Ee.LengthDelimited:let n=this.uint32();this.pos+=n;break;case Ee.StartGroup:for(;;){let[e,n]=this.tag();if(n===Ee.EndGroup){if(t!==void 0&&e!==t)throw Error(`invalid end group tag`);break}this.skip(n,e)}break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return xe.dec(...this.varint64())}uint64(){return xe.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(e&1);return e=(e>>>1|(t&1)<<31)^n,t=t>>>1^n,xe.dec(e,t)}bool(){let[e,t]=this.varint64();return e!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return xe.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return xe.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}};function ke(e,t,n,r){let i;return{typeName:t,extendee:n,get field(){if(!i){let n=typeof r==`function`?r():r;n.name=t.split(`.`).pop(),n.jsonName=`[${t}]`,i=e.util.newFieldList([n]).list()[0]}return i},runtime:e}}function Ae(e){let t=e.field.localName,n=Object.create(null);return n[t]=je(e),[n,()=>n[t]]}function je(e){let t=e.field;if(t.repeated)return[];if(t.default!==void 0)return t.default;switch(t.kind){case`enum`:return t.T.values[0].no;case`scalar`:return we(t.T,t.L);case`message`:let e=t.T,n=new e;return e.fieldWrapper?e.fieldWrapper.unwrapField(n):n;case`map`:throw`map fields are not allowed to be extensions`}}function Me(e,t){if(!t.repeated&&(t.kind==`enum`||t.kind==`scalar`)){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(e=>e.no===t.no)}var Ne=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),Pe=[];for(let e=0;e<Ne.length;e++)Pe[Ne[e].charCodeAt(0)]=e;Pe[45]=Ne.indexOf(`+`),Pe[95]=Ne.indexOf(`/`);var Fe={dec(e){let t=e.length*3/4;e[e.length-2]==`=`?t-=2:e[e.length-1]==`=`&&--t;let n=new Uint8Array(t),r=0,i=0,a,o=0;for(let t=0;t<e.length;t++){if(a=Pe[e.charCodeAt(t)],a===void 0)switch(e[t]){case`=`:i=0;case`
|
|
2
2
|
`:case`\r`:case` `:case` `:continue;default:throw Error(`invalid base64 string.`)}switch(i){case 0:o=a,i=1;break;case 1:n[r++]=o<<2|(a&48)>>4,o=a,i=2;break;case 2:n[r++]=(o&15)<<4|(a&60)>>2,o=a,i=3;break;case 3:n[r++]=(o&3)<<6|a,i=0;break}}if(i==1)throw Error(`invalid base64 string.`);return n.subarray(0,r)},enc(e){let t=``,n=0,r,i=0;for(let a=0;a<e.length;a++)switch(r=e[a],n){case 0:t+=Ne[r>>2],i=(r&3)<<4,n=1;break;case 1:t+=Ne[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Ne[i|r>>6],t+=Ne[r&63],n=0;break}return n&&(t+=Ne[i],t+=`=`,n==1&&(t+=`=`)),t}};function Ie(e,t,n){ze(t,e);let r=t.runtime.bin.makeReadOptions(n),i=Me(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=Ae(t);for(let e of i)t.runtime.bin.readField(a,r.readerFactory(e.data),t.field,e.wireType,r);return o()}function Le(e,t,n,r){ze(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(Re(e,t)){let n=e.getType().runtime.bin.listUnknownFields(e).filter(e=>e.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let t of n)e.getType().runtime.bin.onUnknownField(e,t.no,t.wireType,t.data)}let o=a.writerFactory(),s=t.field;!s.opt&&!s.repeated&&(s.kind==`enum`||s.kind==`scalar`)&&(s=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(s,n,o,a);let c=i.readerFactory(o.finish());for(;c.pos<c.len;){let[t,n]=c.tag(),r=c.skip(n,t);e.getType().runtime.bin.onUnknownField(e,t,n,r)}}function Re(e,t){let n=e.getType();return t.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(e).find(e=>e.no==t.field.no)}function ze(e,t){v(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}function Be(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case`enum`:case`scalar`:return e.opt||e.req?t[n]!==void 0:e.kind==`enum`?t[n]!==e.T.values[0].no:!Te(e.T,t[n]);case`message`:return t[n]!==void 0;case`map`:return Object.keys(t[n]).length>0}}function Ve(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case`map`:t[n]={};break;case`enum`:t[n]=r?e.T.values[0].no:void 0;break;case`scalar`:t[n]=r?we(e.T,e.L):void 0;break;case`message`:t[n]=void 0;break}}function He(e,t){if(typeof e!=`object`||!e||!Object.getOwnPropertyNames(se.prototype).every(t=>t in e&&typeof e[t]==`function`))return!1;let n=e.getType();return n===null||typeof n!=`function`||!(`typeName`in n)||typeof n.typeName!=`string`?!1:t===void 0?!0:n.typeName==t.typeName}function Ue(e,t){return He(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}D.DOUBLE,D.FLOAT,D.INT64,D.UINT64,D.INT32,D.UINT32,D.BOOL,D.STRING,D.BYTES;var We={ignoreUnknownFields:!1},Ge={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function Ke(e){return e?Object.assign(Object.assign({},We),e):We}function qe(e){return e?Object.assign(Object.assign({},Ge),e):Ge}var Je=Symbol(),Ye=Symbol();function Xe(){return{makeReadOptions:Ke,makeWriteOptions:qe,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!=`object`)throw Error(`cannot decode message ${e.typeName} from JSON: ${Ze(t)}`);r??=new e;let i=new Map,a=n.typeRegistry;for(let[o,s]of Object.entries(t)){let t=e.fields.findJsonName(o);if(t){if(t.oneof){if(s===null&&t.kind==`scalar`)continue;let n=i.get(t.oneof);if(n!==void 0)throw Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${t.oneof.name}" present: "${n}", "${o}"`);i.set(t.oneof,o)}Qe(r,s,t,n,e)}else{let t=!1;if(a?.findExtension&&o.startsWith(`[`)&&o.endsWith(`]`)){let i=a.findExtension(o.substring(1,o.length-1));if(i&&i.extendee.typeName==e.typeName){t=!0;let[e,a]=Ae(i);Qe(e,s,i.field,n,i),Le(r,i,a(),n)}}if(!t&&!n.ignoreUnknownFields)throw Error(`cannot decode message ${e.typeName} from JSON: key "${o}" is unknown`)}}return r},writeMessage(e,t){let n=e.getType(),r={},i;try{for(i of n.fields.byNumber()){if(!Be(i,e)){if(i.req)throw`required field not set`;if(!t.emitDefaultValues||!nt(i))continue}let n=i.oneof?e[i.oneof.localName].value:e[i.localName],a=rt(i,n,t);a!==void 0&&(r[t.useProtoFieldName?i.name:i.jsonName]=a)}let a=t.typeRegistry;if(a?.findExtensionFor)for(let i of n.runtime.bin.listUnknownFields(e)){let o=a.findExtensionFor(n.typeName,i.no);if(o&&Re(e,o)){let n=Ie(e,o,t),i=rt(o.field,n,t);i!==void 0&&(r[o.field.jsonName]=i)}}}catch(e){let t=i?`cannot encode field ${n.typeName}.${i.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,r=e instanceof Error?e.message:String(e);throw Error(t+(r.length>0?`: ${r}`:``))}return r},readScalar(e,t,n){return et(e,t,n??Se.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||Te(e,t)))return at(e,t)},debug:Ze}}function Ze(e){if(e===null)return`null`;switch(typeof e){case`object`:return Array.isArray(e)?`array`:`object`;case`string`:return e.length>100?`string`:`"${e.split(`"`).join(`\\"`)}"`;default:return String(e)}}function Qe(e,t,n,r,i){let a=n.localName;if(n.repeated){if(v(n.kind!=`map`),t===null)return;if(!Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${Ze(t)}`);let o=e[a];for(let e of t){if(e===null)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${Ze(e)}`);switch(n.kind){case`message`:o.push(n.T.fromJson(e,r));break;case`enum`:let t=tt(n.T,e,r.ignoreUnknownFields,!0);t!==Ye&&o.push(t);break;case`scalar`:try{o.push(et(n.T,e,n.L,!0))}catch(t){let r=`cannot decode field ${i.typeName}.${n.name} from JSON: ${Ze(e)}`;throw t instanceof Error&&t.message.length>0&&(r+=`: ${t.message}`),Error(r)}break}}}else if(n.kind==`map`){if(t===null)return;if(typeof t!=`object`||Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${Ze(t)}`);let o=e[a];for(let[e,a]of Object.entries(t)){if(a===null)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);let s;try{s=$e(n.K,e)}catch(e){let r=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${Ze(t)}`;throw e instanceof Error&&e.message.length>0&&(r+=`: ${e.message}`),Error(r)}switch(n.V.kind){case`message`:o[s]=n.V.T.fromJson(a,r);break;case`enum`:let e=tt(n.V.T,a,r.ignoreUnknownFields,!0);e!==Ye&&(o[s]=e);break;case`scalar`:try{o[s]=et(n.V.T,a,Se.BIGINT,!0)}catch(e){let r=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${Ze(t)}`;throw e instanceof Error&&e.message.length>0&&(r+=`: ${e.message}`),Error(r)}break}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a=`value`),n.kind){case`message`:let o=n.T;if(t===null&&o.typeName!=`google.protobuf.Value`)return;let s=e[a];He(s)?s.fromJson(t,r):(e[a]=s=o.fromJson(t,r),o.fieldWrapper&&!n.oneof&&(e[a]=o.fieldWrapper.unwrapField(s)));break;case`enum`:let c=tt(n.T,t,r.ignoreUnknownFields,!1);switch(c){case Je:Ve(n,e);break;case Ye:break;default:e[a]=c;break}break;case`scalar`:try{let r=et(n.T,t,n.L,!1);switch(r){case Je:Ve(n,e);break;default:e[a]=r;break}}catch(e){let r=`cannot decode field ${i.typeName}.${n.name} from JSON: ${Ze(t)}`;throw e instanceof Error&&e.message.length>0&&(r+=`: ${e.message}`),Error(r)}break}}function $e(e,t){if(e===D.BOOL)switch(t){case`true`:t=!0;break;case`false`:t=!1;break}return et(e,t,Se.BIGINT,!0).toString()}function et(e,t,n,r){if(t===null)return r?we(e,n):Je;switch(e){case D.DOUBLE:case D.FLOAT:if(t===`NaN`)return NaN;if(t===`Infinity`)return 1/0;if(t===`-Infinity`)return-1/0;if(t===``||typeof t==`string`&&t.trim().length!==t.length||typeof t!=`string`&&typeof t!=`number`)break;let r=Number(t);if(Number.isNaN(r)||!Number.isFinite(r))break;return e==D.FLOAT&&ee(r),r;case D.INT32:case D.FIXED32:case D.SFIXED32:case D.SINT32:case D.UINT32:let i;if(typeof t==`number`?i=t:typeof t==`string`&&t.length>0&&t.trim().length===t.length&&(i=Number(t)),i===void 0)break;return e==D.UINT32||e==D.FIXED32?T(i):w(i),i;case D.INT64:case D.SFIXED64:case D.SINT64:if(typeof t!=`number`&&typeof t!=`string`)break;let a=xe.parse(t);return n?a.toString():a;case D.FIXED64:case D.UINT64:if(typeof t!=`number`&&typeof t!=`string`)break;let o=xe.uParse(t);return n?o.toString():o;case D.BOOL:if(typeof t!=`boolean`)break;return t;case D.STRING:if(typeof t!=`string`)break;return t;case D.BYTES:if(t===``)return new Uint8Array;if(typeof t!=`string`)break;return Fe.dec(t)}throw Error()}function tt(e,t,n,r){if(t===null)return e.typeName==`google.protobuf.NullValue`?0:r?e.values[0].no:Je;switch(typeof t){case`number`:if(Number.isInteger(t))return t;break;case`string`:let r=e.findName(t);if(r!==void 0)return r.no;if(n)return Ye;break}throw Error(`cannot decode enum ${e.typeName} from JSON: ${Ze(t)}`)}function nt(e){return e.repeated||e.kind==`map`?!0:!(e.oneof||e.kind==`message`||e.opt||e.req)}function rt(e,t,n){if(e.kind==`map`){v(typeof t==`object`&&!!t);let r={},i=Object.entries(t);switch(e.V.kind){case`scalar`:for(let[t,n]of i)r[t.toString()]=at(e.V.T,n);break;case`message`:for(let[e,t]of i)r[e.toString()]=t.toJson(n);break;case`enum`:let t=e.V.T;for(let[e,a]of i)r[e.toString()]=it(t,a,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){v(Array.isArray(t));let r=[];switch(e.kind){case`scalar`:for(let n=0;n<t.length;n++)r.push(at(e.T,t[n]));break;case`enum`:for(let i=0;i<t.length;i++)r.push(it(e.T,t[i],n.enumAsInteger));break;case`message`:for(let e=0;e<t.length;e++)r.push(t[e].toJson(n));break}return n.emitDefaultValues||r.length>0?r:void 0}switch(e.kind){case`scalar`:return at(e.T,t);case`enum`:return it(e.T,t,n.enumAsInteger);case`message`:return Ue(e.T,t).toJson(n)}}function it(e,t,n){return v(typeof t==`number`),e.typeName==`google.protobuf.NullValue`?null:n?t:e.findNumber(t)?.name??t}function at(e,t){switch(e){case D.INT32:case D.SFIXED32:case D.SINT32:case D.FIXED32:case D.UINT32:return v(typeof t==`number`),t;case D.FLOAT:case D.DOUBLE:return v(typeof t==`number`),Number.isNaN(t)?`NaN`:t===1/0?`Infinity`:t===-1/0?`-Infinity`:t;case D.STRING:return v(typeof t==`string`),t;case D.BOOL:return v(typeof t==`boolean`),t;case D.UINT64:case D.FIXED64:case D.INT64:case D.SFIXED64:case D.SINT64:return v(typeof t==`bigint`||typeof t==`string`||typeof t==`number`),t.toString();case D.BYTES:return v(t instanceof Uint8Array),Fe.enc(t)}}var ot=Symbol(`@bufbuild/protobuf/unknown-fields`),st={readUnknownFields:!0,readerFactory:e=>new Oe(e)},ct={writeUnknownFields:!0,writerFactory:()=>new De};function lt(e){return e?Object.assign(Object.assign({},st),e):st}function ut(e){return e?Object.assign(Object.assign({},ct),e):ct}function dt(){return{makeReadOptions:lt,makeWriteOptions:ut,listUnknownFields(e){return e[ot]??[]},discardUnknownFields(e){delete e[ot]},writeUnknownFields(e,t){let n=e[ot];if(n)for(let e of n)t.tag(e.no,e.wireType).raw(e.data)},onUnknownField(e,t,n,r){let i=e;Array.isArray(i[ot])||(i[ot]=[]),i[ot].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a=e.getType(),o=i?t.len:t.pos+n,s,c;for(;t.pos<o&&([s,c]=t.tag(),!(i===!0&&c==Ee.EndGroup));){let n=a.fields.find(s);if(!n){let n=t.skip(c,s);r.readUnknownFields&&this.onUnknownField(e,s,c,n);continue}ft(e,t,n,c,r)}if(i&&(c!=Ee.EndGroup||s!==n))throw Error(`invalid end group tag`)},readField:ft,writeMessage(e,t,n){let r=e.getType();for(let i of r.fields.byNumber()){if(!Be(i,e)){if(i.req)throw Error(`cannot encode field ${r.typeName}.${i.name} to binary: required field not set`);continue}_t(i,i.oneof?e[i.oneof.localName].value:e[i.localName],t,n)}return n.writeUnknownFields&&this.writeUnknownFields(e,t),t},writeField(e,t,n,r){t!==void 0&&_t(e,t,n,r)}}}function ft(e,t,n,r,i){let{repeated:a,localName:o}=n;switch(n.oneof&&(e=e[n.oneof.localName],e.case!=o&&delete e.value,e.case=o,o=`value`),n.kind){case`scalar`:case`enum`:let s=n.kind==`enum`?D.INT32:n.T,c=gt;if(n.kind==`scalar`&&n.L>0&&(c=ht),a){let n=e[o];if(r==Ee.LengthDelimited&&s!=D.STRING&&s!=D.BYTES){let e=t.uint32()+t.pos;for(;t.pos<e;)n.push(c(t,s))}else n.push(c(t,s))}else e[o]=c(t,s);break;case`message`:let l=n.T;a?e[o].push(pt(t,new l,i,n)):He(e[o])?pt(t,e[o],i,n):(e[o]=pt(t,new l,i,n),l.fieldWrapper&&!n.oneof&&!n.repeated&&(e[o]=l.fieldWrapper.unwrapField(e[o])));break;case`map`:let[u,d]=mt(n,t,i);e[o][u]=d;break}}function pt(e,t,n,r){let i=t.getType().runtime.bin,a=r?.delimited;return i.readMessage(t,e,a?r.no:e.uint32(),n,a),t}function mt(e,t,n){let r=t.uint32(),i=t.pos+r,a,o;for(;t.pos<i;){let[r]=t.tag();switch(r){case 1:a=gt(t,e.K);break;case 2:switch(e.V.kind){case`scalar`:o=gt(t,e.V.T);break;case`enum`:o=t.int32();break;case`message`:o=pt(t,new e.V.T,n,void 0);break}break}}if(a===void 0&&(a=we(e.K,Se.BIGINT)),typeof a!=`string`&&typeof a!=`number`&&(a=a.toString()),o===void 0)switch(e.V.kind){case`scalar`:o=we(e.V.T,Se.BIGINT);break;case`enum`:o=e.V.T.values[0].no;break;case`message`:o=new e.V.T;break}return[a,o]}function ht(e,t){let n=gt(e,t);return typeof n==`bigint`?n.toString():n}function gt(e,t){switch(t){case D.STRING:return e.string();case D.BOOL:return e.bool();case D.DOUBLE:return e.double();case D.FLOAT:return e.float();case D.INT32:return e.int32();case D.INT64:return e.int64();case D.UINT64:return e.uint64();case D.FIXED64:return e.fixed64();case D.BYTES:return e.bytes();case D.FIXED32:return e.fixed32();case D.SFIXED32:return e.sfixed32();case D.SFIXED64:return e.sfixed64();case D.SINT64:return e.sint64();case D.UINT32:return e.uint32();case D.SINT32:return e.sint32()}}function _t(e,t,n,r){v(t!==void 0);let i=e.repeated;switch(e.kind){case`scalar`:case`enum`:let a=e.kind==`enum`?D.INT32:e.T;if(i)if(v(Array.isArray(t)),e.packed)xt(n,a,e.no,t);else for(let r of t)bt(n,a,e.no,r);else bt(n,a,e.no,t);break;case`message`:if(i){v(Array.isArray(t));for(let i of t)yt(n,r,e,i)}else yt(n,r,e,t);break;case`map`:v(typeof t==`object`&&!!t);for(let[i,a]of Object.entries(t))vt(n,r,e,i,a);break}}function vt(e,t,n,r,i){e.tag(n.no,Ee.LengthDelimited),e.fork();let a=r;switch(n.K){case D.INT32:case D.FIXED32:case D.UINT32:case D.SFIXED32:case D.SINT32:a=Number.parseInt(r);break;case D.BOOL:v(r==`true`||r==`false`),a=r==`true`;break}switch(bt(e,n.K,1,a),n.V.kind){case`scalar`:bt(e,n.V.T,2,i);break;case`enum`:bt(e,D.INT32,2,i);break;case`message`:v(i!==void 0),e.tag(2,Ee.LengthDelimited).bytes(i.toBinary(t));break}e.join()}function yt(e,t,n,r){let i=Ue(n.T,r);n.delimited?e.tag(n.no,Ee.StartGroup).raw(i.toBinary(t)).tag(n.no,Ee.EndGroup):e.tag(n.no,Ee.LengthDelimited).bytes(i.toBinary(t))}function bt(e,t,n,r){v(r!==void 0);let[i,a]=St(t);e.tag(n,i)[a](r)}function xt(e,t,n,r){if(!r.length)return;e.tag(n,Ee.LengthDelimited).fork();let[,i]=St(t);for(let t=0;t<r.length;t++)e[i](r[t]);e.join()}function St(e){let t=Ee.Varint;switch(e){case D.BYTES:case D.STRING:t=Ee.LengthDelimited;break;case D.DOUBLE:case D.FIXED64:case D.SFIXED64:t=Ee.Bit64;break;case D.FIXED32:case D.SFIXED32:case D.FLOAT:t=Ee.Bit32;break}let n=D[e].toLowerCase();return[t,n]}function Ct(){return{setEnumType:re,initPartial(e,t){if(e===void 0)return;let n=t.getType();for(let r of n.fields.byMember()){let n=r.localName,i=t,a=e;if(a[n]!=null)switch(r.kind){case`oneof`:let e=a[n].case;if(e===void 0)continue;let t=r.findField(e),o=a[n].value;t&&t.kind==`message`&&!He(o,t.T)?o=new t.T(o):t&&t.kind===`scalar`&&t.T===D.BYTES&&(o=Tt(o)),i[n]={case:e,value:o};break;case`scalar`:case`enum`:let s=a[n];r.T===D.BYTES&&(s=r.repeated?s.map(Tt):Tt(s)),i[n]=s;break;case`map`:switch(r.V.kind){case`scalar`:case`enum`:if(r.V.T===D.BYTES)for(let[e,t]of Object.entries(a[n]))i[n][e]=Tt(t);else Object.assign(i[n],a[n]);break;case`message`:let e=r.V.T;for(let t of Object.keys(a[n])){let r=a[n][t];e.fieldWrapper||(r=new e(r)),i[n][t]=r}break}break;case`message`:let c=r.T;if(r.repeated)i[n]=a[n].map(e=>He(e,c)?e:new c(e));else{let e=a[n];c.fieldWrapper?c.typeName===`google.protobuf.BytesValue`?i[n]=Tt(e):i[n]=e:i[n]=He(e,c)?e:new c(e)}break}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(e=>{let r=t[e.localName],i=n[e.localName];if(e.repeated){if(r.length!==i.length)return!1;switch(e.kind){case`message`:return r.every((t,n)=>e.T.equals(t,i[n]));case`scalar`:return r.every((t,n)=>Ce(e.T,t,i[n]));case`enum`:return r.every((e,t)=>Ce(D.INT32,e,i[t]))}throw Error(`repeated cannot contain ${e.kind}`)}switch(e.kind){case`message`:let t=r,n=i;return e.T.fieldWrapper&&(t!==void 0&&!He(t)&&(t=e.T.fieldWrapper.wrapField(t)),n!==void 0&&!He(n)&&(n=e.T.fieldWrapper.wrapField(n))),e.T.equals(t,n);case`enum`:return Ce(D.INT32,r,i);case`scalar`:return Ce(e.T,r,i);case`oneof`:if(r.case!==i.case)return!1;let a=e.findField(r.case);if(a===void 0)return!0;switch(a.kind){case`message`:return a.T.equals(r.value,i.value);case`enum`:return Ce(D.INT32,r.value,i.value);case`scalar`:return Ce(a.T,r.value,i.value)}throw Error(`oneof cannot contain ${a.kind}`);case`map`:let o=Object.keys(r).concat(Object.keys(i));switch(e.V.kind){case`message`:let t=e.V.T;return o.every(e=>t.equals(r[e],i[e]));case`enum`:return o.every(e=>Ce(D.INT32,r[e],i[e]));case`scalar`:let n=e.V.T;return o.every(e=>Ce(n,r[e],i[e]))}break}})},clone(e){let t=e.getType(),n=new t,r=n;for(let n of t.fields.byMember()){let t=e[n.localName],i;if(n.repeated)i=t.map(wt);else if(n.kind==`map`){i=r[n.localName];for(let[e,n]of Object.entries(t))i[e]=wt(n)}else i=n.kind==`oneof`?n.findField(t.case)?{case:t.case,value:wt(t.value)}:{case:void 0}:wt(t);r[n.localName]=i}for(let n of t.runtime.bin.listUnknownFields(e))t.runtime.bin.onUnknownField(r,n.no,n.wireType,n.data);return n}}}function wt(e){if(e===void 0)return e;if(He(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function Tt(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Et(e,t,n){return{syntax:e,json:Xe(),bin:dt(),util:Object.assign(Object.assign({},Ct()),{newFieldList:t,initFields:n}),makeMessageType(e,t,n){return E(this,e,t,n)},makeEnum:ae,makeEnumType:ie,getEnumType:ne,makeExtension(e,t,n){return ke(this,e,t,n)}}}var Dt=class{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){let e={};for(let t of this.list())e[t.jsonName]=e[t.name]=t;this.jsonNames=e}return this.jsonNames[e]}find(e){if(!this.numbers){let e={};for(let t of this.list())e[t.no]=t;this.numbers=e}return this.numbers[e]}list(){return this.all||=this._normalizer(this._fields),this.all}byNumber(){return this.numbersAsc||=this.list().concat().sort((e,t)=>e.no-t.no),this.numbersAsc}byMember(){if(!this.members){this.members=[];let e=this.members,t;for(let n of this.list())n.oneof?n.oneof!==t&&(t=n.oneof,e.push(t)):e.push(n)}return this.members}};function Ot(e,t){let n=jt(e);return t?n:It(Ft(n))}function kt(e){return Ot(e,!1)}var At=jt;function jt(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);switch(i){case`_`:t=!0;break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n.push(i),t=!1;break;default:t&&(t=!1,i=i.toUpperCase()),n.push(i);break}}return n.join(``)}var Mt=new Set([`constructor`,`toString`,`toJSON`,`valueOf`]),Nt=new Set([`getType`,`clone`,`equals`,`fromBinary`,`fromJson`,`fromJsonString`,`toBinary`,`toJson`,`toJsonString`,`toObject`]),Pt=e=>`${e}\$`,Ft=e=>Nt.has(e)?Pt(e):e,It=e=>Mt.has(e)?Pt(e):e,Lt=class{constructor(e){this.kind=`oneof`,this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=kt(e)}addField(e){v(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let e=0;e<this.fields.length;e++)this._lookup[this.fields[e].localName]=this.fields[e]}return this._lookup[e]}};function Rt(e,t){let n=[],r;for(let t of typeof e==`function`?e():e){let e=t;if(e.localName=Ot(t.name,t.oneof!==void 0),e.jsonName=t.jsonName??At(t.name),e.repeated=t.repeated??!1,t.kind==`scalar`&&(e.L=t.L??Se.BIGINT),e.delimited=t.delimited??!1,e.req=t.req??!1,e.opt=t.opt??!1,t.packed===void 0&&(e.packed=t.kind==`enum`||t.kind==`scalar`&&t.T!=D.BYTES&&t.T!=D.STRING),t.oneof!==void 0){let n=typeof t.oneof==`string`?t.oneof:t.oneof.name;(!r||r.name!=n)&&(r=new Lt(n)),e.oneof=r,r.addField(e)}n.push(e)}return n}var O=Et(`proto3`,e=>new Dt(e,e=>Rt(e)),e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName,r=e;if(t.repeated){r[n]=[];continue}switch(t.kind){case`oneof`:r[n]={case:void 0};break;case`enum`:r[n]=0;break;case`map`:r[n]={};break;case`scalar`:r[n]=we(t.T,t.L);break}}}),zt=class e extends se{constructor(e){super(),this.seconds=xe.zero,this.nanos=0,O.util.initPartial(e,this)}fromJson(e,t){if(typeof e!=`string`)throw Error(`cannot decode google.protobuf.Timestamp from JSON: ${O.json.debug(e)}`);let n=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!n)throw Error(`cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string`);let r=Date.parse(n[1]+`-`+n[2]+`-`+n[3]+`T`+n[4]+`:`+n[5]+`:`+n[6]+(n[8]?n[8]:`Z`));if(Number.isNaN(r))throw Error(`cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string`);if(r<Date.parse(`0001-01-01T00:00:00Z`)||r>Date.parse(`9999-12-31T23:59:59Z`))throw Error(`cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);return this.seconds=xe.parse(r/1e3),this.nanos=0,n[7]&&(this.nanos=parseInt(`1`+n[7]+`0`.repeat(9-n[7].length))-1e9),this}toJson(e){let t=Number(this.seconds)*1e3;if(t<Date.parse(`0001-01-01T00:00:00Z`)||t>Date.parse(`9999-12-31T23:59:59Z`))throw Error(`cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);if(this.nanos<0)throw Error(`cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative`);let n=`Z`;if(this.nanos>0){let e=(this.nanos+1e9).toString().substring(1);n=e.substring(3)===`000000`?`.`+e.substring(0,3)+`Z`:e.substring(6)===`000`?`.`+e.substring(0,6)+`Z`:`.`+e+`Z`}return new Date(t).toISOString().replace(`.000Z`,n)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return e.fromDate(new Date)}static fromDate(t){let n=t.getTime();return new e({seconds:xe.parse(Math.floor(n/1e3)),nanos:n%1e3*1e6})}static fromBinary(t,n){return new e().fromBinary(t,n)}static fromJson(t,n){return new e().fromJson(t,n)}static fromJsonString(t,n){return new e().fromJsonString(t,n)}static equals(t,n){return O.util.equals(e,t,n)}};zt.runtime=O,zt.typeName=`google.protobuf.Timestamp`,zt.fields=O.util.newFieldList(()=>[{no:1,name:`seconds`,kind:`scalar`,T:3},{no:2,name:`nanos`,kind:`scalar`,T:5}]);var Bt=O.makeMessageType(`livekit.MetricsBatch`,()=>[{no:1,name:`timestamp_ms`,kind:`scalar`,T:3},{no:2,name:`normalized_timestamp`,kind:`message`,T:zt},{no:3,name:`str_data`,kind:`scalar`,T:9,repeated:!0},{no:4,name:`time_series`,kind:`message`,T:Vt,repeated:!0},{no:5,name:`events`,kind:`message`,T:Ut,repeated:!0}]),Vt=O.makeMessageType(`livekit.TimeSeriesMetric`,()=>[{no:1,name:`label`,kind:`scalar`,T:13},{no:2,name:`participant_identity`,kind:`scalar`,T:13},{no:3,name:`track_sid`,kind:`scalar`,T:13},{no:4,name:`samples`,kind:`message`,T:Ht,repeated:!0},{no:5,name:`rid`,kind:`scalar`,T:13}]),Ht=O.makeMessageType(`livekit.MetricSample`,()=>[{no:1,name:`timestamp_ms`,kind:`scalar`,T:3},{no:2,name:`normalized_timestamp`,kind:`message`,T:zt},{no:3,name:`value`,kind:`scalar`,T:2}]),Ut=O.makeMessageType(`livekit.EventMetric`,()=>[{no:1,name:`label`,kind:`scalar`,T:13},{no:2,name:`participant_identity`,kind:`scalar`,T:13},{no:3,name:`track_sid`,kind:`scalar`,T:13},{no:4,name:`start_timestamp_ms`,kind:`scalar`,T:3},{no:5,name:`end_timestamp_ms`,kind:`scalar`,T:3,opt:!0},{no:6,name:`normalized_start_timestamp`,kind:`message`,T:zt},{no:7,name:`normalized_end_timestamp`,kind:`message`,T:zt,opt:!0},{no:8,name:`metadata`,kind:`scalar`,T:9},{no:9,name:`rid`,kind:`scalar`,T:13}]),Wt=O.makeEnum(`livekit.BackupCodecPolicy`,[{no:0,name:`PREFER_REGRESSION`},{no:1,name:`SIMULCAST`},{no:2,name:`REGRESSION`}]),Gt=O.makeEnum(`livekit.TrackType`,[{no:0,name:`AUDIO`},{no:1,name:`VIDEO`},{no:2,name:`DATA`}]),Kt=O.makeEnum(`livekit.TrackSource`,[{no:0,name:`UNKNOWN`},{no:1,name:`CAMERA`},{no:2,name:`MICROPHONE`},{no:3,name:`SCREEN_SHARE`},{no:4,name:`SCREEN_SHARE_AUDIO`}]),qt=O.makeEnum(`livekit.VideoQuality`,[{no:0,name:`LOW`},{no:1,name:`MEDIUM`},{no:2,name:`HIGH`},{no:3,name:`OFF`}]),Jt=O.makeEnum(`livekit.ConnectionQuality`,[{no:0,name:`POOR`},{no:1,name:`GOOD`},{no:2,name:`EXCELLENT`},{no:3,name:`LOST`}]),Yt=O.makeEnum(`livekit.ClientConfigSetting`,[{no:0,name:`UNSET`},{no:1,name:`DISABLED`},{no:2,name:`ENABLED`}]),Xt=O.makeEnum(`livekit.DisconnectReason`,[{no:0,name:`UNKNOWN_REASON`},{no:1,name:`CLIENT_INITIATED`},{no:2,name:`DUPLICATE_IDENTITY`},{no:3,name:`SERVER_SHUTDOWN`},{no:4,name:`PARTICIPANT_REMOVED`},{no:5,name:`ROOM_DELETED`},{no:6,name:`STATE_MISMATCH`},{no:7,name:`JOIN_FAILURE`},{no:8,name:`MIGRATION`},{no:9,name:`SIGNAL_CLOSE`},{no:10,name:`ROOM_CLOSED`},{no:11,name:`USER_UNAVAILABLE`},{no:12,name:`USER_REJECTED`},{no:13,name:`SIP_TRUNK_FAILURE`},{no:14,name:`CONNECTION_TIMEOUT`},{no:15,name:`MEDIA_FAILURE`}]),Zt=O.makeEnum(`livekit.ReconnectReason`,[{no:0,name:`RR_UNKNOWN`},{no:1,name:`RR_SIGNAL_DISCONNECTED`},{no:2,name:`RR_PUBLISHER_FAILED`},{no:3,name:`RR_SUBSCRIBER_FAILED`},{no:4,name:`RR_SWITCH_CANDIDATE`}]),Qt=O.makeEnum(`livekit.SubscriptionError`,[{no:0,name:`SE_UNKNOWN`},{no:1,name:`SE_CODEC_UNSUPPORTED`},{no:2,name:`SE_TRACK_NOTFOUND`}]),$t=O.makeEnum(`livekit.AudioTrackFeature`,[{no:0,name:`TF_STEREO`},{no:1,name:`TF_NO_DTX`},{no:2,name:`TF_AUTO_GAIN_CONTROL`},{no:3,name:`TF_ECHO_CANCELLATION`},{no:4,name:`TF_NOISE_SUPPRESSION`},{no:5,name:`TF_ENHANCED_NOISE_CANCELLATION`},{no:6,name:`TF_PRECONNECT_BUFFER`}]),en=O.makeMessageType(`livekit.Room`,()=>[{no:1,name:`sid`,kind:`scalar`,T:9},{no:2,name:`name`,kind:`scalar`,T:9},{no:3,name:`empty_timeout`,kind:`scalar`,T:13},{no:14,name:`departure_timeout`,kind:`scalar`,T:13},{no:4,name:`max_participants`,kind:`scalar`,T:13},{no:5,name:`creation_time`,kind:`scalar`,T:3},{no:15,name:`creation_time_ms`,kind:`scalar`,T:3},{no:6,name:`turn_password`,kind:`scalar`,T:9},{no:7,name:`enabled_codecs`,kind:`message`,T:tn,repeated:!0},{no:8,name:`metadata`,kind:`scalar`,T:9},{no:9,name:`num_participants`,kind:`scalar`,T:13},{no:11,name:`num_publishers`,kind:`scalar`,T:13},{no:10,name:`active_recording`,kind:`scalar`,T:8},{no:13,name:`version`,kind:`message`,T:In}]),tn=O.makeMessageType(`livekit.Codec`,()=>[{no:1,name:`mime`,kind:`scalar`,T:9},{no:2,name:`fmtp_line`,kind:`scalar`,T:9}]),nn=O.makeMessageType(`livekit.ParticipantPermission`,()=>[{no:1,name:`can_subscribe`,kind:`scalar`,T:8},{no:2,name:`can_publish`,kind:`scalar`,T:8},{no:3,name:`can_publish_data`,kind:`scalar`,T:8},{no:9,name:`can_publish_sources`,kind:`enum`,T:O.getEnumType(Kt),repeated:!0},{no:7,name:`hidden`,kind:`scalar`,T:8},{no:8,name:`recorder`,kind:`scalar`,T:8},{no:10,name:`can_update_metadata`,kind:`scalar`,T:8},{no:11,name:`agent`,kind:`scalar`,T:8},{no:12,name:`can_subscribe_metrics`,kind:`scalar`,T:8}]),rn=O.makeMessageType(`livekit.ParticipantInfo`,()=>[{no:1,name:`sid`,kind:`scalar`,T:9},{no:2,name:`identity`,kind:`scalar`,T:9},{no:3,name:`state`,kind:`enum`,T:O.getEnumType(an)},{no:4,name:`tracks`,kind:`message`,T:un,repeated:!0},{no:5,name:`metadata`,kind:`scalar`,T:9},{no:6,name:`joined_at`,kind:`scalar`,T:3},{no:17,name:`joined_at_ms`,kind:`scalar`,T:3},{no:9,name:`name`,kind:`scalar`,T:9},{no:10,name:`version`,kind:`scalar`,T:13},{no:11,name:`permission`,kind:`message`,T:nn},{no:12,name:`region`,kind:`scalar`,T:9},{no:13,name:`is_publisher`,kind:`scalar`,T:8},{no:14,name:`kind`,kind:`enum`,T:O.getEnumType(on)},{no:15,name:`attributes`,kind:`map`,K:9,V:{kind:`scalar`,T:9}},{no:16,name:`disconnect_reason`,kind:`enum`,T:O.getEnumType(Xt)},{no:18,name:`kind_details`,kind:`enum`,T:O.getEnumType(sn),repeated:!0}]),an=O.makeEnum(`livekit.ParticipantInfo.State`,[{no:0,name:`JOINING`},{no:1,name:`JOINED`},{no:2,name:`ACTIVE`},{no:3,name:`DISCONNECTED`}]),on=O.makeEnum(`livekit.ParticipantInfo.Kind`,[{no:0,name:`STANDARD`},{no:1,name:`INGRESS`},{no:2,name:`EGRESS`},{no:3,name:`SIP`},{no:4,name:`AGENT`},{no:7,name:`CONNECTOR`}]),sn=O.makeEnum(`livekit.ParticipantInfo.KindDetail`,[{no:0,name:`CLOUD_AGENT`},{no:1,name:`FORWARDED`}]),cn=O.makeEnum(`livekit.Encryption.Type`,[{no:0,name:`NONE`},{no:1,name:`GCM`},{no:2,name:`CUSTOM`}]),ln=O.makeMessageType(`livekit.SimulcastCodecInfo`,()=>[{no:1,name:`mime_type`,kind:`scalar`,T:9},{no:2,name:`mid`,kind:`scalar`,T:9},{no:3,name:`cid`,kind:`scalar`,T:9},{no:4,name:`layers`,kind:`message`,T:dn,repeated:!0},{no:5,name:`video_layer_mode`,kind:`enum`,T:O.getEnumType(fn)},{no:6,name:`sdp_cid`,kind:`scalar`,T:9}]),un=O.makeMessageType(`livekit.TrackInfo`,()=>[{no:1,name:`sid`,kind:`scalar`,T:9},{no:2,name:`type`,kind:`enum`,T:O.getEnumType(Gt)},{no:3,name:`name`,kind:`scalar`,T:9},{no:4,name:`muted`,kind:`scalar`,T:8},{no:5,name:`width`,kind:`scalar`,T:13},{no:6,name:`height`,kind:`scalar`,T:13},{no:7,name:`simulcast`,kind:`scalar`,T:8},{no:8,name:`disable_dtx`,kind:`scalar`,T:8},{no:9,name:`source`,kind:`enum`,T:O.getEnumType(Kt)},{no:10,name:`layers`,kind:`message`,T:dn,repeated:!0},{no:11,name:`mime_type`,kind:`scalar`,T:9},{no:12,name:`mid`,kind:`scalar`,T:9},{no:13,name:`codecs`,kind:`message`,T:ln,repeated:!0},{no:14,name:`stereo`,kind:`scalar`,T:8},{no:15,name:`disable_red`,kind:`scalar`,T:8},{no:16,name:`encryption`,kind:`enum`,T:O.getEnumType(cn)},{no:17,name:`stream`,kind:`scalar`,T:9},{no:18,name:`version`,kind:`message`,T:In},{no:19,name:`audio_features`,kind:`enum`,T:O.getEnumType($t),repeated:!0},{no:20,name:`backup_codec_policy`,kind:`enum`,T:O.getEnumType(Wt)}]),dn=O.makeMessageType(`livekit.VideoLayer`,()=>[{no:1,name:`quality`,kind:`enum`,T:O.getEnumType(qt)},{no:2,name:`width`,kind:`scalar`,T:13},{no:3,name:`height`,kind:`scalar`,T:13},{no:4,name:`bitrate`,kind:`scalar`,T:13},{no:5,name:`ssrc`,kind:`scalar`,T:13},{no:6,name:`spatial_layer`,kind:`scalar`,T:5},{no:7,name:`rid`,kind:`scalar`,T:9}]),fn=O.makeEnum(`livekit.VideoLayer.Mode`,[{no:0,name:`MODE_UNUSED`},{no:1,name:`ONE_SPATIAL_LAYER_PER_STREAM`},{no:2,name:`MULTIPLE_SPATIAL_LAYERS_PER_STREAM`},{no:3,name:`ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR`}]),pn=O.makeMessageType(`livekit.DataPacket`,()=>[{no:1,name:`kind`,kind:`enum`,T:O.getEnumType(mn)},{no:4,name:`participant_identity`,kind:`scalar`,T:9},{no:5,name:`destination_identities`,kind:`scalar`,T:9,repeated:!0},{no:2,name:`user`,kind:`message`,T:yn,oneof:`value`},{no:3,name:`speaker`,kind:`message`,T:_n,oneof:`value`},{no:6,name:`sip_dtmf`,kind:`message`,T:bn,oneof:`value`},{no:7,name:`transcription`,kind:`message`,T:xn,oneof:`value`},{no:8,name:`metrics`,kind:`message`,T:Bt,oneof:`value`},{no:9,name:`chat_message`,kind:`message`,T:Cn,oneof:`value`},{no:10,name:`rpc_request`,kind:`message`,T:wn,oneof:`value`},{no:11,name:`rpc_ack`,kind:`message`,T:Tn,oneof:`value`},{no:12,name:`rpc_response`,kind:`message`,T:En,oneof:`value`},{no:13,name:`stream_header`,kind:`message`,T:Bn,oneof:`value`},{no:14,name:`stream_chunk`,kind:`message`,T:Vn,oneof:`value`},{no:15,name:`stream_trailer`,kind:`message`,T:Hn,oneof:`value`},{no:18,name:`encrypted_packet`,kind:`message`,T:hn,oneof:`value`},{no:16,name:`sequence`,kind:`scalar`,T:13},{no:17,name:`participant_sid`,kind:`scalar`,T:9}]),mn=O.makeEnum(`livekit.DataPacket.Kind`,[{no:0,name:`RELIABLE`},{no:1,name:`LOSSY`}]),hn=O.makeMessageType(`livekit.EncryptedPacket`,()=>[{no:1,name:`encryption_type`,kind:`enum`,T:O.getEnumType(cn)},{no:2,name:`iv`,kind:`scalar`,T:12},{no:3,name:`key_index`,kind:`scalar`,T:13},{no:4,name:`encrypted_value`,kind:`scalar`,T:12}]),gn=O.makeMessageType(`livekit.EncryptedPacketPayload`,()=>[{no:1,name:`user`,kind:`message`,T:yn,oneof:`value`},{no:3,name:`chat_message`,kind:`message`,T:Cn,oneof:`value`},{no:4,name:`rpc_request`,kind:`message`,T:wn,oneof:`value`},{no:5,name:`rpc_ack`,kind:`message`,T:Tn,oneof:`value`},{no:6,name:`rpc_response`,kind:`message`,T:En,oneof:`value`},{no:7,name:`stream_header`,kind:`message`,T:Bn,oneof:`value`},{no:8,name:`stream_chunk`,kind:`message`,T:Vn,oneof:`value`},{no:9,name:`stream_trailer`,kind:`message`,T:Hn,oneof:`value`}]),_n=O.makeMessageType(`livekit.ActiveSpeakerUpdate`,()=>[{no:1,name:`speakers`,kind:`message`,T:vn,repeated:!0}]),vn=O.makeMessageType(`livekit.SpeakerInfo`,()=>[{no:1,name:`sid`,kind:`scalar`,T:9},{no:2,name:`level`,kind:`scalar`,T:2},{no:3,name:`active`,kind:`scalar`,T:8}]),yn=O.makeMessageType(`livekit.UserPacket`,()=>[{no:1,name:`participant_sid`,kind:`scalar`,T:9},{no:5,name:`participant_identity`,kind:`scalar`,T:9},{no:2,name:`payload`,kind:`scalar`,T:12},{no:3,name:`destination_sids`,kind:`scalar`,T:9,repeated:!0},{no:6,name:`destination_identities`,kind:`scalar`,T:9,repeated:!0},{no:4,name:`topic`,kind:`scalar`,T:9,opt:!0},{no:8,name:`id`,kind:`scalar`,T:9,opt:!0},{no:9,name:`start_time`,kind:`scalar`,T:4,opt:!0},{no:10,name:`end_time`,kind:`scalar`,T:4,opt:!0},{no:11,name:`nonce`,kind:`scalar`,T:12}]),bn=O.makeMessageType(`livekit.SipDTMF`,()=>[{no:3,name:`code`,kind:`scalar`,T:13},{no:4,name:`digit`,kind:`scalar`,T:9}]),xn=O.makeMessageType(`livekit.Transcription`,()=>[{no:2,name:`transcribed_participant_identity`,kind:`scalar`,T:9},{no:3,name:`track_id`,kind:`scalar`,T:9},{no:4,name:`segments`,kind:`message`,T:Sn,repeated:!0}]),Sn=O.makeMessageType(`livekit.TranscriptionSegment`,()=>[{no:1,name:`id`,kind:`scalar`,T:9},{no:2,name:`text`,kind:`scalar`,T:9},{no:3,name:`start_time`,kind:`scalar`,T:4},{no:4,name:`end_time`,kind:`scalar`,T:4},{no:5,name:`final`,kind:`scalar`,T:8},{no:6,name:`language`,kind:`scalar`,T:9}]),Cn=O.makeMessageType(`livekit.ChatMessage`,()=>[{no:1,name:`id`,kind:`scalar`,T:9},{no:2,name:`timestamp`,kind:`scalar`,T:3},{no:3,name:`edit_timestamp`,kind:`scalar`,T:3,opt:!0},{no:4,name:`message`,kind:`scalar`,T:9},{no:5,name:`deleted`,kind:`scalar`,T:8},{no:6,name:`generated`,kind:`scalar`,T:8}]),wn=O.makeMessageType(`livekit.RpcRequest`,()=>[{no:1,name:`id`,kind:`scalar`,T:9},{no:2,name:`method`,kind:`scalar`,T:9},{no:3,name:`payload`,kind:`scalar`,T:9},{no:4,name:`response_timeout_ms`,kind:`scalar`,T:13},{no:5,name:`version`,kind:`scalar`,T:13}]),Tn=O.makeMessageType(`livekit.RpcAck`,()=>[{no:1,name:`request_id`,kind:`scalar`,T:9}]),En=O.makeMessageType(`livekit.RpcResponse`,()=>[{no:1,name:`request_id`,kind:`scalar`,T:9},{no:2,name:`payload`,kind:`scalar`,T:9,oneof:`value`},{no:3,name:`error`,kind:`message`,T:Dn,oneof:`value`}]),Dn=O.makeMessageType(`livekit.RpcError`,()=>[{no:1,name:`code`,kind:`scalar`,T:13},{no:2,name:`message`,kind:`scalar`,T:9},{no:3,name:`data`,kind:`scalar`,T:9}]),On=O.makeMessageType(`livekit.ParticipantTracks`,()=>[{no:1,name:`participant_sid`,kind:`scalar`,T:9},{no:2,name:`track_sids`,kind:`scalar`,T:9,repeated:!0}]),kn=O.makeMessageType(`livekit.ServerInfo`,()=>[{no:1,name:`edition`,kind:`enum`,T:O.getEnumType(An)},{no:2,name:`version`,kind:`scalar`,T:9},{no:3,name:`protocol`,kind:`scalar`,T:5},{no:4,name:`region`,kind:`scalar`,T:9},{no:5,name:`node_id`,kind:`scalar`,T:9},{no:6,name:`debug_info`,kind:`scalar`,T:9},{no:7,name:`agent_protocol`,kind:`scalar`,T:5}]),An=O.makeEnum(`livekit.ServerInfo.Edition`,[{no:0,name:`Standard`},{no:1,name:`Cloud`}]),jn=O.makeMessageType(`livekit.ClientInfo`,()=>[{no:1,name:`sdk`,kind:`enum`,T:O.getEnumType(Mn)},{no:2,name:`version`,kind:`scalar`,T:9},{no:3,name:`protocol`,kind:`scalar`,T:5},{no:4,name:`os`,kind:`scalar`,T:9},{no:5,name:`os_version`,kind:`scalar`,T:9},{no:6,name:`device_model`,kind:`scalar`,T:9},{no:7,name:`browser`,kind:`scalar`,T:9},{no:8,name:`browser_version`,kind:`scalar`,T:9},{no:9,name:`address`,kind:`scalar`,T:9},{no:10,name:`network`,kind:`scalar`,T:9},{no:11,name:`other_sdks`,kind:`scalar`,T:9}]),Mn=O.makeEnum(`livekit.ClientInfo.SDK`,[{no:0,name:`UNKNOWN`},{no:1,name:`JS`},{no:2,name:`SWIFT`},{no:3,name:`ANDROID`},{no:4,name:`FLUTTER`},{no:5,name:`GO`},{no:6,name:`UNITY`},{no:7,name:`REACT_NATIVE`},{no:8,name:`RUST`},{no:9,name:`PYTHON`},{no:10,name:`CPP`},{no:11,name:`UNITY_WEB`},{no:12,name:`NODE`},{no:13,name:`UNREAL`},{no:14,name:`ESP32`}]),Nn=O.makeMessageType(`livekit.ClientConfiguration`,()=>[{no:1,name:`video`,kind:`message`,T:Pn},{no:2,name:`screen`,kind:`message`,T:Pn},{no:3,name:`resume_connection`,kind:`enum`,T:O.getEnumType(Yt)},{no:4,name:`disabled_codecs`,kind:`message`,T:Fn},{no:5,name:`force_relay`,kind:`enum`,T:O.getEnumType(Yt)}]),Pn=O.makeMessageType(`livekit.VideoConfiguration`,()=>[{no:1,name:`hardware_encoder`,kind:`enum`,T:O.getEnumType(Yt)}]),Fn=O.makeMessageType(`livekit.DisabledCodecs`,()=>[{no:1,name:`codecs`,kind:`message`,T:tn,repeated:!0},{no:2,name:`publish`,kind:`message`,T:tn,repeated:!0}]),In=O.makeMessageType(`livekit.TimedVersion`,()=>[{no:1,name:`unix_micro`,kind:`scalar`,T:3},{no:2,name:`ticks`,kind:`scalar`,T:5}]),Ln=O.makeEnum(`livekit.DataStream.OperationType`,[{no:0,name:`CREATE`},{no:1,name:`UPDATE`},{no:2,name:`DELETE`},{no:3,name:`REACTION`}]),Rn=O.makeMessageType(`livekit.DataStream.TextHeader`,()=>[{no:1,name:`operation_type`,kind:`enum`,T:O.getEnumType(Ln)},{no:2,name:`version`,kind:`scalar`,T:5},{no:3,name:`reply_to_stream_id`,kind:`scalar`,T:9},{no:4,name:`attached_stream_ids`,kind:`scalar`,T:9,repeated:!0},{no:5,name:`generated`,kind:`scalar`,T:8}],{localName:`DataStream_TextHeader`}),zn=O.makeMessageType(`livekit.DataStream.ByteHeader`,()=>[{no:1,name:`name`,kind:`scalar`,T:9}],{localName:`DataStream_ByteHeader`}),Bn=O.makeMessageType(`livekit.DataStream.Header`,()=>[{no:1,name:`stream_id`,kind:`scalar`,T:9},{no:2,name:`timestamp`,kind:`scalar`,T:3},{no:3,name:`topic`,kind:`scalar`,T:9},{no:4,name:`mime_type`,kind:`scalar`,T:9},{no:5,name:`total_length`,kind:`scalar`,T:4,opt:!0},{no:7,name:`encryption_type`,kind:`enum`,T:O.getEnumType(cn)},{no:8,name:`attributes`,kind:`map`,K:9,V:{kind:`scalar`,T:9}},{no:9,name:`text_header`,kind:`message`,T:Rn,oneof:`content_header`},{no:10,name:`byte_header`,kind:`message`,T:zn,oneof:`content_header`}],{localName:`DataStream_Header`}),Vn=O.makeMessageType(`livekit.DataStream.Chunk`,()=>[{no:1,name:`stream_id`,kind:`scalar`,T:9},{no:2,name:`chunk_index`,kind:`scalar`,T:4},{no:3,name:`content`,kind:`scalar`,T:12},{no:4,name:`version`,kind:`scalar`,T:5},{no:5,name:`iv`,kind:`scalar`,T:12,opt:!0}],{localName:`DataStream_Chunk`}),Hn=O.makeMessageType(`livekit.DataStream.Trailer`,()=>[{no:1,name:`stream_id`,kind:`scalar`,T:9},{no:2,name:`reason`,kind:`scalar`,T:9},{no:3,name:`attributes`,kind:`map`,K:9,V:{kind:`scalar`,T:9}}],{localName:`DataStream_Trailer`}),Un=O.makeMessageType(`livekit.SubscribedAudioCodec`,()=>[{no:1,name:`codec`,kind:`scalar`,T:9},{no:2,name:`enabled`,kind:`scalar`,T:8}]),Wn=O.makeEnum(`livekit.SignalTarget`,[{no:0,name:`PUBLISHER`},{no:1,name:`SUBSCRIBER`}]),Gn=O.makeEnum(`livekit.StreamState`,[{no:0,name:`ACTIVE`},{no:1,name:`PAUSED`}]),Kn=O.makeEnum(`livekit.CandidateProtocol`,[{no:0,name:`UDP`},{no:1,name:`TCP`},{no:2,name:`TLS`}]),qn=O.makeMessageType(`livekit.SignalRequest`,()=>[{no:1,name:`offer`,kind:`message`,T:rr,oneof:`message`},{no:2,name:`answer`,kind:`message`,T:rr,oneof:`message`},{no:3,name:`trickle`,kind:`message`,T:Zn,oneof:`message`},{no:4,name:`add_track`,kind:`message`,T:Xn,oneof:`message`},{no:5,name:`mute`,kind:`message`,T:Qn,oneof:`message`},{no:6,name:`subscription`,kind:`message`,T:ar,oneof:`message`},{no:7,name:`track_setting`,kind:`message`,T:or,oneof:`message`},{no:8,name:`leave`,kind:`message`,T:lr,oneof:`message`},{no:10,name:`update_layers`,kind:`message`,T:dr,oneof:`message`},{no:11,name:`subscription_permission`,kind:`message`,T:Tr,oneof:`message`},{no:12,name:`sync_state`,kind:`message`,T:Or,oneof:`message`},{no:13,name:`simulate`,kind:`message`,T:jr,oneof:`message`},{no:14,name:`ping`,kind:`scalar`,T:3,oneof:`message`},{no:15,name:`update_metadata`,kind:`message`,T:fr,oneof:`message`},{no:16,name:`ping_req`,kind:`message`,T:Mr,oneof:`message`},{no:17,name:`update_audio_track`,kind:`message`,T:sr,oneof:`message`},{no:18,name:`update_video_track`,kind:`message`,T:cr,oneof:`message`}]),Jn=O.makeMessageType(`livekit.SignalResponse`,()=>[{no:1,name:`join`,kind:`message`,T:$n,oneof:`message`},{no:2,name:`answer`,kind:`message`,T:rr,oneof:`message`},{no:3,name:`offer`,kind:`message`,T:rr,oneof:`message`},{no:4,name:`trickle`,kind:`message`,T:Zn,oneof:`message`},{no:5,name:`update`,kind:`message`,T:ir,oneof:`message`},{no:6,name:`track_published`,kind:`message`,T:tr,oneof:`message`},{no:8,name:`leave`,kind:`message`,T:lr,oneof:`message`},{no:9,name:`mute`,kind:`message`,T:Qn,oneof:`message`},{no:10,name:`speakers_changed`,kind:`message`,T:mr,oneof:`message`},{no:11,name:`room_update`,kind:`message`,T:hr,oneof:`message`},{no:12,name:`connection_quality`,kind:`message`,T:_r,oneof:`message`},{no:13,name:`stream_state_update`,kind:`message`,T:yr,oneof:`message`},{no:14,name:`subscribed_quality_update`,kind:`message`,T:Sr,oneof:`message`},{no:15,name:`subscription_permission_update`,kind:`message`,T:Er,oneof:`message`},{no:16,name:`refresh_token`,kind:`scalar`,T:9,oneof:`message`},{no:17,name:`track_unpublished`,kind:`message`,T:nr,oneof:`message`},{no:18,name:`pong`,kind:`scalar`,T:3,oneof:`message`},{no:19,name:`reconnect`,kind:`message`,T:er,oneof:`message`},{no:20,name:`pong_resp`,kind:`message`,T:Nr,oneof:`message`},{no:21,name:`subscription_response`,kind:`message`,T:Ir,oneof:`message`},{no:22,name:`request_response`,kind:`message`,T:Lr,oneof:`message`},{no:23,name:`track_subscribed`,kind:`message`,T:zr,oneof:`message`},{no:24,name:`room_moved`,kind:`message`,T:Dr,oneof:`message`},{no:25,name:`media_sections_requirement`,kind:`message`,T:Wr,oneof:`message`},{no:26,name:`subscribed_audio_codec_update`,kind:`message`,T:Cr,oneof:`message`}]),Yn=O.makeMessageType(`livekit.SimulcastCodec`,()=>[{no:1,name:`codec`,kind:`scalar`,T:9},{no:2,name:`cid`,kind:`scalar`,T:9},{no:4,name:`layers`,kind:`message`,T:dn,repeated:!0},{no:5,name:`video_layer_mode`,kind:`enum`,T:O.getEnumType(fn)}]),Xn=O.makeMessageType(`livekit.AddTrackRequest`,()=>[{no:1,name:`cid`,kind:`scalar`,T:9},{no:2,name:`name`,kind:`scalar`,T:9},{no:3,name:`type`,kind:`enum`,T:O.getEnumType(Gt)},{no:4,name:`width`,kind:`scalar`,T:13},{no:5,name:`height`,kind:`scalar`,T:13},{no:6,name:`muted`,kind:`scalar`,T:8},{no:7,name:`disable_dtx`,kind:`scalar`,T:8},{no:8,name:`source`,kind:`enum`,T:O.getEnumType(Kt)},{no:9,name:`layers`,kind:`message`,T:dn,repeated:!0},{no:10,name:`simulcast_codecs`,kind:`message`,T:Yn,repeated:!0},{no:11,name:`sid`,kind:`scalar`,T:9},{no:12,name:`stereo`,kind:`scalar`,T:8},{no:13,name:`disable_red`,kind:`scalar`,T:8},{no:14,name:`encryption`,kind:`enum`,T:O.getEnumType(cn)},{no:15,name:`stream`,kind:`scalar`,T:9},{no:16,name:`backup_codec_policy`,kind:`enum`,T:O.getEnumType(Wt)},{no:17,name:`audio_features`,kind:`enum`,T:O.getEnumType($t),repeated:!0}]),Zn=O.makeMessageType(`livekit.TrickleRequest`,()=>[{no:1,name:`candidateInit`,kind:`scalar`,T:9},{no:2,name:`target`,kind:`enum`,T:O.getEnumType(Wn)},{no:3,name:`final`,kind:`scalar`,T:8}]),Qn=O.makeMessageType(`livekit.MuteTrackRequest`,()=>[{no:1,name:`sid`,kind:`scalar`,T:9},{no:2,name:`muted`,kind:`scalar`,T:8}]),$n=O.makeMessageType(`livekit.JoinResponse`,()=>[{no:1,name:`room`,kind:`message`,T:en},{no:2,name:`participant`,kind:`message`,T:rn},{no:3,name:`other_participants`,kind:`message`,T:rn,repeated:!0},{no:4,name:`server_version`,kind:`scalar`,T:9},{no:5,name:`ice_servers`,kind:`message`,T:pr,repeated:!0},{no:6,name:`subscriber_primary`,kind:`scalar`,T:8},{no:7,name:`alternative_url`,kind:`scalar`,T:9},{no:8,name:`client_configuration`,kind:`message`,T:Nn},{no:9,name:`server_region`,kind:`scalar`,T:9},{no:10,name:`ping_timeout`,kind:`scalar`,T:5},{no:11,name:`ping_interval`,kind:`scalar`,T:5},{no:12,name:`server_info`,kind:`message`,T:kn},{no:13,name:`sif_trailer`,kind:`scalar`,T:12},{no:14,name:`enabled_publish_codecs`,kind:`message`,T:tn,repeated:!0},{no:15,name:`fast_publish`,kind:`scalar`,T:8}]),er=O.makeMessageType(`livekit.ReconnectResponse`,()=>[{no:1,name:`ice_servers`,kind:`message`,T:pr,repeated:!0},{no:2,name:`client_configuration`,kind:`message`,T:Nn},{no:3,name:`server_info`,kind:`message`,T:kn},{no:4,name:`last_message_seq`,kind:`scalar`,T:13}]),tr=O.makeMessageType(`livekit.TrackPublishedResponse`,()=>[{no:1,name:`cid`,kind:`scalar`,T:9},{no:2,name:`track`,kind:`message`,T:un}]),nr=O.makeMessageType(`livekit.TrackUnpublishedResponse`,()=>[{no:1,name:`track_sid`,kind:`scalar`,T:9}]),rr=O.makeMessageType(`livekit.SessionDescription`,()=>[{no:1,name:`type`,kind:`scalar`,T:9},{no:2,name:`sdp`,kind:`scalar`,T:9},{no:3,name:`id`,kind:`scalar`,T:13},{no:4,name:`mid_to_track_id`,kind:`map`,K:9,V:{kind:`scalar`,T:9}}]),ir=O.makeMessageType(`livekit.ParticipantUpdate`,()=>[{no:1,name:`participants`,kind:`message`,T:rn,repeated:!0}]),ar=O.makeMessageType(`livekit.UpdateSubscription`,()=>[{no:1,name:`track_sids`,kind:`scalar`,T:9,repeated:!0},{no:2,name:`subscribe`,kind:`scalar`,T:8},{no:3,name:`participant_tracks`,kind:`message`,T:On,repeated:!0}]),or=O.makeMessageType(`livekit.UpdateTrackSettings`,()=>[{no:1,name:`track_sids`,kind:`scalar`,T:9,repeated:!0},{no:3,name:`disabled`,kind:`scalar`,T:8},{no:4,name:`quality`,kind:`enum`,T:O.getEnumType(qt)},{no:5,name:`width`,kind:`scalar`,T:13},{no:6,name:`height`,kind:`scalar`,T:13},{no:7,name:`fps`,kind:`scalar`,T:13},{no:8,name:`priority`,kind:`scalar`,T:13}]),sr=O.makeMessageType(`livekit.UpdateLocalAudioTrack`,()=>[{no:1,name:`track_sid`,kind:`scalar`,T:9},{no:2,name:`features`,kind:`enum`,T:O.getEnumType($t),repeated:!0}]),cr=O.makeMessageType(`livekit.UpdateLocalVideoTrack`,()=>[{no:1,name:`track_sid`,kind:`scalar`,T:9},{no:2,name:`width`,kind:`scalar`,T:13},{no:3,name:`height`,kind:`scalar`,T:13}]),lr=O.makeMessageType(`livekit.LeaveRequest`,()=>[{no:1,name:`can_reconnect`,kind:`scalar`,T:8},{no:2,name:`reason`,kind:`enum`,T:O.getEnumType(Xt)},{no:3,name:`action`,kind:`enum`,T:O.getEnumType(ur)},{no:4,name:`regions`,kind:`message`,T:Pr}]),ur=O.makeEnum(`livekit.LeaveRequest.Action`,[{no:0,name:`DISCONNECT`},{no:1,name:`RESUME`},{no:2,name:`RECONNECT`}]),dr=O.makeMessageType(`livekit.UpdateVideoLayers`,()=>[{no:1,name:`track_sid`,kind:`scalar`,T:9},{no:2,name:`layers`,kind:`message`,T:dn,repeated:!0}]),fr=O.makeMessageType(`livekit.UpdateParticipantMetadata`,()=>[{no:1,name:`metadata`,kind:`scalar`,T:9},{no:2,name:`name`,kind:`scalar`,T:9},{no:3,name:`attributes`,kind:`map`,K:9,V:{kind:`scalar`,T:9}},{no:4,name:`request_id`,kind:`scalar`,T:13}]),pr=O.makeMessageType(`livekit.ICEServer`,()=>[{no:1,name:`urls`,kind:`scalar`,T:9,repeated:!0},{no:2,name:`username`,kind:`scalar`,T:9},{no:3,name:`credential`,kind:`scalar`,T:9}]),mr=O.makeMessageType(`livekit.SpeakersChanged`,()=>[{no:1,name:`speakers`,kind:`message`,T:vn,repeated:!0}]),hr=O.makeMessageType(`livekit.RoomUpdate`,()=>[{no:1,name:`room`,kind:`message`,T:en}]),gr=O.makeMessageType(`livekit.ConnectionQualityInfo`,()=>[{no:1,name:`participant_sid`,kind:`scalar`,T:9},{no:2,name:`quality`,kind:`enum`,T:O.getEnumType(Jt)},{no:3,name:`score`,kind:`scalar`,T:2}]),_r=O.makeMessageType(`livekit.ConnectionQualityUpdate`,()=>[{no:1,name:`updates`,kind:`message`,T:gr,repeated:!0}]),vr=O.makeMessageType(`livekit.StreamStateInfo`,()=>[{no:1,name:`participant_sid`,kind:`scalar`,T:9},{no:2,name:`track_sid`,kind:`scalar`,T:9},{no:3,name:`state`,kind:`enum`,T:O.getEnumType(Gn)}]),yr=O.makeMessageType(`livekit.StreamStateUpdate`,()=>[{no:1,name:`stream_states`,kind:`message`,T:vr,repeated:!0}]),br=O.makeMessageType(`livekit.SubscribedQuality`,()=>[{no:1,name:`quality`,kind:`enum`,T:O.getEnumType(qt)},{no:2,name:`enabled`,kind:`scalar`,T:8}]),xr=O.makeMessageType(`livekit.SubscribedCodec`,()=>[{no:1,name:`codec`,kind:`scalar`,T:9},{no:2,name:`qualities`,kind:`message`,T:br,repeated:!0}]),Sr=O.makeMessageType(`livekit.SubscribedQualityUpdate`,()=>[{no:1,name:`track_sid`,kind:`scalar`,T:9},{no:2,name:`subscribed_qualities`,kind:`message`,T:br,repeated:!0},{no:3,name:`subscribed_codecs`,kind:`message`,T:xr,repeated:!0}]),Cr=O.makeMessageType(`livekit.SubscribedAudioCodecUpdate`,()=>[{no:1,name:`track_sid`,kind:`scalar`,T:9},{no:2,name:`subscribed_audio_codecs`,kind:`message`,T:Un,repeated:!0}]),wr=O.makeMessageType(`livekit.TrackPermission`,()=>[{no:1,name:`participant_sid`,kind:`scalar`,T:9},{no:2,name:`all_tracks`,kind:`scalar`,T:8},{no:3,name:`track_sids`,kind:`scalar`,T:9,repeated:!0},{no:4,name:`participant_identity`,kind:`scalar`,T:9}]),Tr=O.makeMessageType(`livekit.SubscriptionPermission`,()=>[{no:1,name:`all_participants`,kind:`scalar`,T:8},{no:2,name:`track_permissions`,kind:`message`,T:wr,repeated:!0}]),Er=O.makeMessageType(`livekit.SubscriptionPermissionUpdate`,()=>[{no:1,name:`participant_sid`,kind:`scalar`,T:9},{no:2,name:`track_sid`,kind:`scalar`,T:9},{no:3,name:`allowed`,kind:`scalar`,T:8}]),Dr=O.makeMessageType(`livekit.RoomMovedResponse`,()=>[{no:1,name:`room`,kind:`message`,T:en},{no:2,name:`token`,kind:`scalar`,T:9},{no:3,name:`participant`,kind:`message`,T:rn},{no:4,name:`other_participants`,kind:`message`,T:rn,repeated:!0}]),Or=O.makeMessageType(`livekit.SyncState`,()=>[{no:1,name:`answer`,kind:`message`,T:rr},{no:2,name:`subscription`,kind:`message`,T:ar},{no:3,name:`publish_tracks`,kind:`message`,T:tr,repeated:!0},{no:4,name:`data_channels`,kind:`message`,T:Ar,repeated:!0},{no:5,name:`offer`,kind:`message`,T:rr},{no:6,name:`track_sids_disabled`,kind:`scalar`,T:9,repeated:!0},{no:7,name:`datachannel_receive_states`,kind:`message`,T:kr,repeated:!0}]),kr=O.makeMessageType(`livekit.DataChannelReceiveState`,()=>[{no:1,name:`publisher_sid`,kind:`scalar`,T:9},{no:2,name:`last_seq`,kind:`scalar`,T:13}]),Ar=O.makeMessageType(`livekit.DataChannelInfo`,()=>[{no:1,name:`label`,kind:`scalar`,T:9},{no:2,name:`id`,kind:`scalar`,T:13},{no:3,name:`target`,kind:`enum`,T:O.getEnumType(Wn)}]),jr=O.makeMessageType(`livekit.SimulateScenario`,()=>[{no:1,name:`speaker_update`,kind:`scalar`,T:5,oneof:`scenario`},{no:2,name:`node_failure`,kind:`scalar`,T:8,oneof:`scenario`},{no:3,name:`migration`,kind:`scalar`,T:8,oneof:`scenario`},{no:4,name:`server_leave`,kind:`scalar`,T:8,oneof:`scenario`},{no:5,name:`switch_candidate_protocol`,kind:`enum`,T:O.getEnumType(Kn),oneof:`scenario`},{no:6,name:`subscriber_bandwidth`,kind:`scalar`,T:3,oneof:`scenario`},{no:7,name:`disconnect_signal_on_resume`,kind:`scalar`,T:8,oneof:`scenario`},{no:8,name:`disconnect_signal_on_resume_no_messages`,kind:`scalar`,T:8,oneof:`scenario`},{no:9,name:`leave_request_full_reconnect`,kind:`scalar`,T:8,oneof:`scenario`}]),Mr=O.makeMessageType(`livekit.Ping`,()=>[{no:1,name:`timestamp`,kind:`scalar`,T:3},{no:2,name:`rtt`,kind:`scalar`,T:3}]),Nr=O.makeMessageType(`livekit.Pong`,()=>[{no:1,name:`last_ping_timestamp`,kind:`scalar`,T:3},{no:2,name:`timestamp`,kind:`scalar`,T:3}]),Pr=O.makeMessageType(`livekit.RegionSettings`,()=>[{no:1,name:`regions`,kind:`message`,T:Fr,repeated:!0}]),Fr=O.makeMessageType(`livekit.RegionInfo`,()=>[{no:1,name:`region`,kind:`scalar`,T:9},{no:2,name:`url`,kind:`scalar`,T:9},{no:3,name:`distance`,kind:`scalar`,T:3}]),Ir=O.makeMessageType(`livekit.SubscriptionResponse`,()=>[{no:1,name:`track_sid`,kind:`scalar`,T:9},{no:2,name:`err`,kind:`enum`,T:O.getEnumType(Qt)}]),Lr=O.makeMessageType(`livekit.RequestResponse`,()=>[{no:1,name:`request_id`,kind:`scalar`,T:13},{no:2,name:`reason`,kind:`enum`,T:O.getEnumType(Rr)},{no:3,name:`message`,kind:`scalar`,T:9},{no:4,name:`trickle`,kind:`message`,T:Zn,oneof:`request`},{no:5,name:`add_track`,kind:`message`,T:Xn,oneof:`request`},{no:6,name:`mute`,kind:`message`,T:Qn,oneof:`request`},{no:7,name:`update_metadata`,kind:`message`,T:fr,oneof:`request`},{no:8,name:`update_audio_track`,kind:`message`,T:sr,oneof:`request`},{no:9,name:`update_video_track`,kind:`message`,T:cr,oneof:`request`}]),Rr=O.makeEnum(`livekit.RequestResponse.Reason`,[{no:0,name:`OK`},{no:1,name:`NOT_FOUND`},{no:2,name:`NOT_ALLOWED`},{no:3,name:`LIMIT_EXCEEDED`},{no:4,name:`QUEUED`},{no:5,name:`UNSUPPORTED_TYPE`},{no:6,name:`UNCLASSIFIED_ERROR`}]),zr=O.makeMessageType(`livekit.TrackSubscribed`,()=>[{no:1,name:`track_sid`,kind:`scalar`,T:9}]),Br=O.makeMessageType(`livekit.ConnectionSettings`,()=>[{no:1,name:`auto_subscribe`,kind:`scalar`,T:8},{no:2,name:`adaptive_stream`,kind:`scalar`,T:8},{no:3,name:`subscriber_allow_pause`,kind:`scalar`,T:8,opt:!0},{no:4,name:`disable_ice_lite`,kind:`scalar`,T:8}]),Vr=O.makeMessageType(`livekit.JoinRequest`,()=>[{no:1,name:`client_info`,kind:`message`,T:jn},{no:2,name:`connection_settings`,kind:`message`,T:Br},{no:3,name:`metadata`,kind:`scalar`,T:9},{no:4,name:`participant_attributes`,kind:`map`,K:9,V:{kind:`scalar`,T:9}},{no:5,name:`add_track_requests`,kind:`message`,T:Xn,repeated:!0},{no:6,name:`publisher_offer`,kind:`message`,T:rr},{no:7,name:`reconnect`,kind:`scalar`,T:8},{no:8,name:`reconnect_reason`,kind:`enum`,T:O.getEnumType(Zt)},{no:9,name:`participant_sid`,kind:`scalar`,T:9},{no:10,name:`sync_state`,kind:`message`,T:Or}]),Hr=O.makeMessageType(`livekit.WrappedJoinRequest`,()=>[{no:1,name:`compression`,kind:`enum`,T:O.getEnumType(Ur)},{no:2,name:`join_request`,kind:`scalar`,T:12}]),Ur=O.makeEnum(`livekit.WrappedJoinRequest.Compression`,[{no:0,name:`NONE`},{no:1,name:`GZIP`}]),Wr=O.makeMessageType(`livekit.MediaSectionsRequirement`,()=>[{no:1,name:`num_audios`,kind:`scalar`,T:13},{no:2,name:`num_videos`,kind:`scalar`,T:13}]);function Gr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Kr={exports:{}},qr=Kr.exports,Jr;function Yr(){return Jr?Kr.exports:(Jr=1,(function(e){(function(t,n){e.exports?e.exports=n():t.log=n()})(qr,function(){var e=function(){},t=`undefined`,n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=[`trace`,`debug`,`info`,`warn`,`error`],i={},a=null;function o(e,t){var n=e[t];if(typeof n.bind==`function`)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(r){return r===`debug`&&(r=`log`),typeof console===t?!1:r===`trace`&&n?s:console[r]===void 0?console.log===void 0?e:o(console,`log`):o(console,r)}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var a=r[i];this[a]=i<n?e:this.methodFactory(a,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return`No console available for logging`}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function d(e,t,n){return c(e)||u.apply(this,arguments)}function f(e,n){var o=this,s,c,u,f=`loglevel`;typeof e==`string`?f+=`:`+e:typeof e==`symbol`&&(f=void 0);function p(e){var n=(r[e]||`silent`).toUpperCase();if(!(typeof window===t||!f)){try{window.localStorage[f]=n;return}catch{}try{window.document.cookie=encodeURIComponent(f)+`=`+n+`;`}catch{}}}function m(){var e;if(!(typeof window===t||!f)){try{e=window.localStorage[f]}catch{}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+`=`);i!==-1&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch{}return o.levels[e]===void 0&&(e=void 0),e}}function h(){if(!(typeof window===t||!f)){try{window.localStorage.removeItem(f)}catch{}try{window.document.cookie=encodeURIComponent(f)+`=; expires=Thu, 01 Jan 1970 00:00:00 UTC`}catch{}}}function g(e){var t=e;if(typeof t==`string`&&o.levels[t.toUpperCase()]!==void 0&&(t=o.levels[t.toUpperCase()]),typeof t==`number`&&t>=0&&t<=o.levels.SILENT)return t;throw TypeError(`log.setLevel() called with invalid level: `+e)}o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=n||d,o.getLevel=function(){return u??c??s},o.setLevel=function(e,t){return u=g(e),t!==!1&&p(u),l.call(o)},o.setDefaultLevel=function(e){c=g(e),m()||o.setLevel(e,!1)},o.resetLevel=function(){u=null,h(),l.call(o)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)},o.rebuild=function(){if(a!==o&&(s=g(a.getLevel())),l.call(o),a===o)for(var e in i)i[e].rebuild()},s=g(a?a.getLevel():`WARN`);var _=m();_!=null&&(u=g(_)),l.call(o)}a=new f,a.getLogger=function(e){if(typeof e!=`symbol`&&typeof e!=`string`||e===``)throw TypeError(`You must supply a name when creating a logger.`);var t=i[e];return t||=i[e]=new f(e,a.methodFactory),t};var p=typeof window===t?void 0:window.log;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=p),a},a.getLoggers=function(){return i},a.default=a,a})})(Kr),Kr.exports)}var Xr=Yr(),Zr;(function(e){e[e.trace=0]=`trace`,e[e.debug=1]=`debug`,e[e.info=2]=`info`,e[e.warn=3]=`warn`,e[e.error=4]=`error`,e[e.silent=5]=`silent`})(Zr||={});var Qr;(function(e){e.Default=`livekit`,e.Room=`livekit-room`,e.TokenSource=`livekit-token-source`,e.Participant=`livekit-participant`,e.Track=`livekit-track`,e.Publication=`livekit-track-publication`,e.Engine=`livekit-engine`,e.Signal=`livekit-signal`,e.PCManager=`livekit-pc-manager`,e.PCTransport=`livekit-pc-transport`,e.E2EE=`lk-e2ee`})(Qr||={});var $r=Xr.getLogger(`livekit`);Object.values(Qr).map(e=>Xr.getLogger(e)),$r.setDefaultLevel(Zr.info);function ei(e){let t=Xr.getLogger(e);return t.setDefaultLevel($r.getLevel()),t}var ti=Xr.getLogger(`lk-e2ee`),ni=7e3,ri=[0,300,4*300,9*300,16*300,ni,ni,ni,ni,ni],ii=class{constructor(e){this._retryDelays=e===void 0?ri:[...e]}nextRetryDelayInMs(e){if(e.retryCount>=this._retryDelays.length)return null;let t=this._retryDelays[e.retryCount];return e.retryCount<=1?t:t+Math.random()*1e3}};function ai(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function k(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function oi(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function si(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof oi==`function`?oi(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}var ci={exports:{}},li;function ui(){if(li)return ci.exports;li=1;var e=typeof Reflect==`object`?Reflect:null,t=e&&typeof e.apply==`function`?e.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},n=e&&typeof e.ownKeys==`function`?e.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function r(e){console&&console.warn&&console.warn(e)}var i=Number.isNaN||function(e){return e!==e};function a(){a.init.call(this)}ci.exports=a,ci.exports.once=_,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(a,`defaultMaxListeners`,{enumerable:!0,get:function(){return o},set:function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);o=e}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function c(e){return e._maxListeners===void 0?a.defaultMaxListeners:e._maxListeners}a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(n.length>0&&(o=n[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)t(c,this,n);else for(var l=c.length,u=m(c,l),r=0;r<l;++r)t(u[r],this,n);return!0};function l(e,t,n,i){var a,o,l;if(s(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),l=o[t]),l===void 0)l=o[t]=n,++e._eventsCount;else if(typeof l==`function`?l=o[t]=i?[n,l]:[l,n]:i?l.unshift(n):l.push(n),a=c(e),a>0&&l.length>a&&!l.warned){l.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+l.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=l.length,r(u)}return e}a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}a.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():h(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function f(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?g(i):m(i,i.length)}a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p;function p(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function m(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function g(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function _(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}y(e,t,a,{once:!0}),t!==`error`&&v(e,i,{once:!0})})}function v(e,t,n){typeof e.on==`function`&&y(e,`error`,t,n)}function y(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}return ci.exports}var di=ui(),fi=!0,pi=!0;function mi(e,t,n){let r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function hi(e,t,n){if(!e.RTCPeerConnection)return;let r=e.RTCPeerConnection.prototype;try{r.addEventListener=r.addEventListener}catch(e){console.warn(`livekit-client: skipping RTCPeerConnection event patching — addEventListener is non-writable`,e);return}let i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);let a=e=>{let t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,a),i.apply(this,[e,a])};let a=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t]||!this._eventMap[t].has(n))return a.apply(this,arguments);let r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,a.apply(this,[e,r])},Object.defineProperty(r,`on`+t,{get(){return this[`_on`+t]},set(e){this[`_on`+t]&&(this.removeEventListener(t,this[`_on`+t]),delete this[`_on`+t]),e&&this.addEventListener(t,this[`_on`+t]=e)},enumerable:!0,configurable:!0})}function gi(e){return typeof e==`boolean`?(fi=e,e?`adapter.js logging disabled`:`adapter.js logging enabled`):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function _i(e){return typeof e==`boolean`?(pi=!e,`adapter.js deprecation warnings `+(e?`disabled`:`enabled`)):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function vi(){if(typeof window==`object`){if(fi)return;typeof console<`u`&&typeof console.log==`function`&&console.log.apply(console,arguments)}}function yi(e,t){pi&&console.warn(e+` is deprecated, please use `+t+` instead.`)}function bi(e){let t={browser:null,version:null};if(e===void 0||!e.navigator||!e.navigator.userAgent)return t.browser=`Not a browser.`,t;let{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){let e=n.userAgentData.brands.find(e=>e.brand===`Chromium`);if(e)return{browser:`chrome`,version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser=`firefox`,t.version=parseInt(mi(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser=`chrome`,t.version=parseInt(mi(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser=`safari`,t.version=parseInt(mi(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&`currentDirection`in e.RTCRtpTransceiver.prototype,t._safariVersion=mi(n.userAgent,/Version\/(\d+(\.?\d+))/,1);else return t.browser=`Not a supported browser.`,t;return t}function xi(e){return Object.prototype.toString.call(e)===`[object Object]`}function Si(e){return xi(e)?Object.keys(e).reduce(function(t,n){let r=xi(e[n]),i=r?Si(e[n]):e[n],a=r&&!Object.keys(i).length;return i===void 0||a?t:Object.assign(t,{[n]:i})},{}):e}function Ci(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith(`Id`)?Ci(e,e.get(t[r]),n):r.endsWith(`Ids`)&&t[r].forEach(t=>{Ci(e,e.get(t),n)})}))}function wi(e,t,n){let r=n?`outbound-rtp`:`inbound-rtp`,i=new Map;if(t===null)return i;let a=[];return e.forEach(e=>{e.type===`track`&&e.trackIdentifier===t.id&&a.push(e)}),a.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&Ci(e,n,i)})}),i}var Ti=vi;function Ei(e,t){let n=e&&e.navigator;if(!n.mediaDevices)return;let r=function(e){if(typeof e!=`object`||e.mandatory||e.optional)return e;let t={};return Object.keys(e).forEach(n=>{if(n===`require`||n===`advanced`||n===`mediaSource`)return;let r=typeof e[n]==`object`?e[n]:{ideal:e[n]};r.exact!==void 0&&typeof r.exact==`number`&&(r.min=r.max=r.exact);let i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):t===`deviceId`?`sourceId`:t};if(r.ideal!==void 0){t.optional=t.optional||[];let e={};typeof r.ideal==`number`?(e[i(`min`,n)]=r.ideal,t.optional.push(e),e={},e[i(`max`,n)]=r.ideal,t.optional.push(e)):(e[i(``,n)]=r.ideal,t.optional.push(e))}r.exact!==void 0&&typeof r.exact!=`number`?(t.mandatory=t.mandatory||{},t.mandatory[i(``,n)]=r.exact):[`min`,`max`].forEach(e=>{r[e]!==void 0&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if(e=JSON.parse(JSON.stringify(e)),e&&typeof e.audio==`object`){let t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};e=JSON.parse(JSON.stringify(e)),t(e.audio,`autoGainControl`,`googAutoGainControl`),t(e.audio,`noiseSuppression`,`googNoiseSuppression`),e.audio=r(e.audio)}if(e&&typeof e.video==`object`){let a=e.video.facingMode;a&&=typeof a==`object`?a:{ideal:a};let o=t.version<66;if(a&&(a.exact===`user`||a.exact===`environment`||a.ideal===`user`||a.ideal===`environment`)&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!o)){delete e.video.facingMode;let t;if(a.exact===`environment`||a.ideal===`environment`?t=[`back`,`rear`]:(a.exact===`user`||a.ideal===`user`)&&(t=[`front`]),t)return n.mediaDevices.enumerateDevices().then(n=>{n=n.filter(e=>e.kind===`videoinput`);let o=n.find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!o&&n.length&&t.includes(`back`)&&(o=n[n.length-1]),o&&(e.video.deviceId=a.exact?{exact:o.deviceId}:{ideal:o.deviceId}),e.video=r(e.video),Ti(`chrome: `+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return Ti(`chrome: `+JSON.stringify(e)),i(e)},a=function(e){return t.version>=64?e:{name:{PermissionDeniedError:`NotAllowedError`,PermissionDismissedError:`NotAllowedError`,InvalidStateError:`NotAllowedError`,DevicesNotFoundError:`NotFoundError`,ConstraintNotSatisfiedError:`OverconstrainedError`,TrackStartError:`NotReadableError`,MediaDeviceFailedDueToShutdown:`NotAllowedError`,MediaDeviceKillSwitchOn:`NotAllowedError`,TabCaptureError:`AbortError`,ScreenCaptureError:`AbortError`,DeviceCaptureError:`AbortError`}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&`: `)+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(a(e))})})}.bind(n),n.mediaDevices.getUserMedia){let e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException(``,`NotFoundError`);return e},e=>Promise.reject(a(e))))}}}function Di(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function Oi(e){if(typeof e==`object`&&e.RTCPeerConnection&&!(`ontrack`in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,`ontrack`,{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener(`track`,this._ontrack),this.addEventListener(`track`,this._ontrack=e)},enumerable:!0,configurable:!0});let t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener(`addtrack`,n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};let i=new Event(`track`);i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};let i=new Event(`track`);i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener(`addstream`,this._ontrackpoly)),t.apply(this,arguments)}}else hi(e,`track`,e=>(e.transceiver||Object.defineProperty(e,`transceiver`,{value:{receiver:e.receiver}}),e))}function ki(e){if(typeof e==`object`&&e.RTCPeerConnection&&!(`getSenders`in e.RTCPeerConnection.prototype)&&`createDTMFSender`in e.RTCPeerConnection.prototype){let t=function(e,t){return{track:t,get dtmf(){return this._dtmf===void 0&&(t.kind===`audio`?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};let n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};let r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);let t=this._senders.indexOf(e);t!==-1&&this._senders.splice(t,1)}}let n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};let r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{let t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if(typeof e==`object`&&e.RTCPeerConnection&&`getSenders`in e.RTCPeerConnection.prototype&&`createDTMFSender`in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!(`dtmf`in e.RTCRtpSender.prototype)){let t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,`dtmf`,{get(){return this._dtmf===void 0&&(this.track.kind===`audio`?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function Ai(e){if(!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!(`getStats`in e.RTCRtpSender.prototype)){let t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});let n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>wi(t,e.track,!0))}}if(!(`getStats`in e.RTCRtpReceiver.prototype)){let t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),hi(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>wi(t,e.track,!1))}}if(!(`getStats`in e.RTCRtpSender.prototype&&`getStats`in e.RTCRtpReceiver.prototype))return;let t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){let e=arguments[0],t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException(`There are more than one sender or receiver for the track.`,`InvalidAccessError`)):t?t.getStats():n?n.getStats():Promise.reject(new DOMException(`There is no sender or receiver for the track.`,`InvalidAccessError`))}return t.apply(this,arguments)}}function ji(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};let t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};let r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?this._shimmedLocalStreams[n.id].indexOf(r)===-1&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};let n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException(`Track already exists.`,`InvalidAccessError`)});let t=this.getSenders();n.apply(this,arguments);let r=this.getSenders().filter(e=>t.indexOf(e)===-1);this._shimmedLocalStreams[e.id]=[e].concat(r)};let r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};let i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{let n=this._shimmedLocalStreams[t].indexOf(e);n!==-1&&this._shimmedLocalStreams[t].splice(n,1),this._shimmedLocalStreams[t].length===1&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function Mi(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return ji(e);let n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){let e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};let r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException(`Track already exists.`,`InvalidAccessError`)}),!this._reverseStreams[t.id]){let n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};let i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if(this.signalingState===`closed`)throw new DOMException(`The RTCPeerConnection's signalingState is 'closed'.`,`InvalidStateError`);let r=[].slice.call(arguments,1);if(r.length!==1||!r[0].getTracks().find(e=>e===t))throw new DOMException(`The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.`,`NotSupportedError`);if(this.getSenders().find(e=>e.track===t))throw new DOMException(`Track already exists.`,`InvalidAccessError`);this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};let i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event(`negotiationneeded`))});else{let r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)};function a(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{let r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,`g`),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{let r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,`g`),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}[`createOffer`,`createAnswer`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){let e=arguments;return arguments.length&&typeof arguments[0]==`function`?n.apply(this,[t=>{let n=a(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>a(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});let s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type||(arguments[0]=o(this,arguments[0])),s.apply(this,arguments)};let c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,`localDescription`);Object.defineProperty(e.RTCPeerConnection.prototype,`localDescription`,{get(){let e=c.get.apply(this);return e.type===``?e:a(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if(this.signalingState===`closed`)throw new DOMException(`The RTCPeerConnection's signalingState is 'closed'.`,`InvalidStateError`);if(!e._pc)throw new DOMException(`Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.`,`TypeError`);if(e._pc!==this)throw new DOMException(`Sender was not created by this connection.`,`InvalidAccessError`);this._streams=this._streams||{};let t;Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(t.getTracks().length===1?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event(`negotiationneeded`)))}}function Ni(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&[`setLocalDescription`,`setRemoteDescription`,`addIceCandidate`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new(t===`addIceCandidate`?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function Pi(e,t){hi(e,`negotiationneeded`,e=>{let n=e.target;if(!((t.version<72||n.getConfiguration&&n.getConfiguration().sdpSemantics===`plan-b`)&&n.signalingState!==`stable`))return e})}var Fi=Object.freeze({__proto__:null,fixNegotiationNeeded:Pi,shimAddTrackRemoveTrack:Mi,shimAddTrackRemoveTrackWithNative:ji,shimGetSendersWithDtmf:ki,shimGetUserMedia:Ei,shimMediaStream:Di,shimOnTrack:Oi,shimPeerConnection:Ni,shimSenderReceiverGetStats:Ai});function Ii(e,t){let n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){yi(`navigator.getUserMedia`,`navigator.mediaDevices.getUserMedia`),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&`autoGainControl`in n.mediaDevices.getSupportedConstraints())){let e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return typeof n==`object`&&typeof n.audio==`object`&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,`autoGainControl`,`mozAutoGainControl`),e(n.audio,`noiseSuppression`,`mozNoiseSuppression`)),t(n)},r&&r.prototype.getSettings){let t=r.prototype.getSettings;r.prototype.getSettings=function(){let n=t.apply(this,arguments);return e(n,`mozAutoGainControl`,`autoGainControl`),e(n,`mozNoiseSuppression`,`noiseSuppression`),n}}if(r&&r.prototype.applyConstraints){let t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return this.kind===`audio`&&typeof n==`object`&&(n=JSON.parse(JSON.stringify(n)),e(n,`autoGainControl`,`mozAutoGainControl`),e(n,`noiseSuppression`,`mozNoiseSuppression`)),t.apply(this,[n])}}}}function Li(e,t){e.navigator.mediaDevices&&`getDisplayMedia`in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!(n&&n.video)){let e=new DOMException(`getDisplayMedia without video constraints is undefined`);return e.name=`NotFoundError`,e.code=8,Promise.reject(e)}return n.video===!0?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}function Ri(e){typeof e==`object`&&e.RTCTrackEvent&&`receiver`in e.RTCTrackEvent.prototype&&!(`transceiver`in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,`transceiver`,{get(){return{receiver:this.receiver}}})}function zi(e,t){if(typeof e!=`object`||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&[`setLocalDescription`,`setRemoteDescription`,`addIceCandidate`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new(t===`addIceCandidate`?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});let n={inboundrtp:`inbound-rtp`,outboundrtp:`outbound-rtp`,candidatepair:`candidate-pair`,localcandidate:`local-candidate`,remotecandidate:`remote-candidate`},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){let[e,i,a]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if(t.name!==`TypeError`)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,a)}}function Bi(e){if(!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&`getStats`in e.RTCRtpSender.prototype)return;let t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});let n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function Vi(e){if(!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&`getStats`in e.RTCRtpReceiver.prototype)return;let t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),hi(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function Hi(e){!e.RTCPeerConnection||`removeStream`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){yi(`removeStream`,`removeTrack`),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function Ui(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function Wi(e){if(!(typeof e==`object`&&e.RTCPeerConnection))return;let t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;e===void 0&&(e=[]),e=[...e];let n=e.length>0;n&&e.forEach(e=>{if(`rid`in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw TypeError(`Invalid RID value provided.`);if(`scaleResolutionDownBy`in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw RangeError(`scale_resolution_down_by must be >= 1.0`);if(`maxFramerate`in e&&!(parseFloat(e.maxFramerate)>=0))throw RangeError(`max_framerate must be >= 0.0`)});let r=t.apply(this,arguments);if(n){let{sender:t}=r,n=t.getParameters();(!(`encodings`in n)||n.encodings.length===1&&Object.keys(n.encodings[0]).length===0)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function Gi(e){if(!(typeof e==`object`&&e.RTCRtpSender))return;let t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){let e=t.apply(this,arguments);return`encodings`in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function Ki(e){if(!(typeof e==`object`&&e.RTCPeerConnection))return;let t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function qi(e){if(!(typeof e==`object`&&e.RTCPeerConnection))return;let t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var Ji=Object.freeze({__proto__:null,shimAddTransceiver:Wi,shimCreateAnswer:qi,shimCreateOffer:Ki,shimGetDisplayMedia:Li,shimGetParameters:Gi,shimGetUserMedia:Ii,shimOnTrack:Ri,shimPeerConnection:zi,shimRTCDataChannel:Ui,shimReceiverGetStats:Vi,shimRemoveStream:Hi,shimSenderGetStats:Bi});function Yi(e){if(!(typeof e!=`object`||!e.RTCPeerConnection)){if(`getLocalStreams`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||=[],this._localStreams}),!(`addStream`in e.RTCPeerConnection.prototype)){let t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||=[],this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r&&r.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}`removeStream`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||=[];let t=this._localStreams.indexOf(e);if(t===-1)return;this._localStreams.splice(t,1);let n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function Xi(e){if(!(typeof e!=`object`||!e.RTCPeerConnection)&&(`getRemoteStreams`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!(`onaddstream`in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,`onaddstream`,{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener(`addstream`,this._onaddstream),this.removeEventListener(`track`,this._onaddstreampoly)),this.addEventListener(`addstream`,this._onaddstream=e),this.addEventListener(`track`,this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||=[],this._remoteStreams.includes(e))return;this._remoteStreams.push(e);let t=new Event(`addstream`);t.stream=e,this.dispatchEvent(t)})})}});let t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){let e=this;return this._onaddstreampoly||this.addEventListener(`track`,this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||=[],e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);let n=new Event(`addstream`);n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function Zi(e){if(typeof e!=`object`||!e.RTCPeerConnection)return;let t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,a=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(e,t){let r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){let n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let s=function(e,t,n){let r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){let r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){let r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}function Qi(e){let t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){let e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n($i(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function $i(e){return e&&e.video!==void 0?Object.assign({},e,{video:Si(e.video)}):e}function ea(e){if(!e.RTCPeerConnection)return;let t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){let t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];r.urls===void 0&&r.url?(yi(`RTCIceServer.url`,`RTCIceServer.urls`),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,`generateCertificate`in t&&Object.defineProperty(e.RTCPeerConnection,`generateCertificate`,{get(){return t.generateCertificate}})}function ta(e){typeof e==`object`&&e.RTCTrackEvent&&`receiver`in e.RTCTrackEvent.prototype&&!(`transceiver`in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,`transceiver`,{get(){return{receiver:this.receiver}}})}function na(e){let t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){e.offerToReceiveAudio!==void 0&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);let t=this.getTransceivers().find(e=>e.receiver.track.kind===`audio`);e.offerToReceiveAudio===!1&&t?t.direction===`sendrecv`?t.setDirection?t.setDirection(`sendonly`):t.direction=`sendonly`:t.direction===`recvonly`&&(t.setDirection?t.setDirection(`inactive`):t.direction=`inactive`):e.offerToReceiveAudio===!0&&!t&&this.addTransceiver(`audio`,{direction:`recvonly`}),e.offerToReceiveVideo!==void 0&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);let n=this.getTransceivers().find(e=>e.receiver.track.kind===`video`);e.offerToReceiveVideo===!1&&n?n.direction===`sendrecv`?n.setDirection?n.setDirection(`sendonly`):n.direction=`sendonly`:n.direction===`recvonly`&&(n.setDirection?n.setDirection(`inactive`):n.direction=`inactive`):e.offerToReceiveVideo===!0&&!n&&this.addTransceiver(`video`,{direction:`recvonly`})}return t.apply(this,arguments)}}function ra(e){typeof e!=`object`||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var ia=Object.freeze({__proto__:null,shimAudioContext:ra,shimCallbacksAPI:Zi,shimConstraints:$i,shimCreateOfferLegacy:na,shimGetUserMedia:Qi,shimLocalStreamsAPI:Yi,shimRTCIceServerUrls:ea,shimRemoteStreamsAPI:Xi,shimTrackEventTransceiver:ta}),aa={exports:{}},oa;function sa(){return oa?aa.exports:(oa=1,(function(e){let t={};t.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split(`
|
|
3
3
|
`).map(e=>e.trim())},t.splitSections=function(e){return e.split(`
|
|
4
4
|
m=`).map((e,t)=>(t>0?`m=`+e:e).trim()+`\r
|
|
@@ -267,7 +267,7 @@ class RawAudioProcessor extends AudioWorkletProcessor {
|
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
registerProcessor("rawAudioProcessor", RawAudioProcessor);
|
|
270
|
-
`),km={echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:{ideal:1}},Am=class e{context;analyser;worklet;inputStream;mediaStreamSource;permissions;onError;static async create({sampleRate:t,format:n,preferHeadphonesForIosDevices:r,inputDeviceId:i,workletPaths:a,libsampleratePath:o,onError:s,inputChunkDurationMs:c=25}){let l=null,u=null;try{let d={sampleRate:{ideal:t},...km};if(wm()&&r){let e=(await window.navigator.mediaDevices.enumerateDevices()).find(e=>e.kind===`audioinput`&&[`airpod`,`headphone`,`earphone`].find(t=>e.label.toLowerCase().includes(t)));e&&(d.deviceId={ideal:e.deviceId})}i&&(d.deviceId=e.getDeviceIdConstraint(i));let f=navigator.mediaDevices.getSupportedConstraints().sampleRate;l=new window.AudioContext(f?{sampleRate:t}:{});let p=l.createAnalyser();f||await xm(l,o),await Om(l.audioWorklet,a?.rawAudioProcessor);let m={voiceIsolation:!0,...d};u=await navigator.mediaDevices.getUserMedia({audio:m});let h=l.createMediaStreamSource(u),g=new AudioWorkletNode(l,`rawAudioProcessor`);g.port.postMessage({type:`setFormat`,format:n,sampleRate:t,chunkDurationMs:c}),h.connect(p),p.connect(g),await l.resume();let _=await navigator.permissions.query({name:`microphone`});return new e(l,p,g,u,h,_,s)}catch(e){throw u?.getTracks().forEach(e=>{e.stop()}),l?.close(),e}}static getDeviceIdConstraint(e){if(e)return wm()?{ideal:e}:{exact:e}}muted=!1;volumeProvider;constructor(e,t,n,r,i,a,o=console.error){this.context=e,this.analyser=t,this.worklet=n,this.inputStream=r,this.mediaStreamSource=i,this.permissions=a,this.onError=o,this.permissions.addEventListener(`change`,this.handlePermissionsChange),this.worklet.port.start(),this.volumeProvider=Cm(t,e.sampleRate)}getAnalyser(){return this.analyser}getVolume(){return this.muted?0:this.volumeProvider.getVolume()}getByteFrequencyData(e){if(this.muted){e.fill(0);return}this.volumeProvider.getByteFrequencyData(e)}isMuted(){return this.muted}addListener(e){this.worklet.port.addEventListener(`message`,e)}removeListener(e){this.worklet.port.removeEventListener(`message`,e)}forgetInputStreamAndSource(){for(let e of this.inputStream.getTracks())e.stop();this.mediaStreamSource.disconnect()}async close(){this.forgetInputStreamAndSource(),this.permissions.removeEventListener(`change`,this.handlePermissionsChange),await this.context.close()}async setMuted(e){this.muted=e,this.worklet.port.postMessage({type:`setMuted`,isMuted:e})}settingInput=!1;async setDevice(t){try{if(this.settingInput)throw Error(`Input device is already being set`);this.settingInput=!0;let n=t?.inputDeviceId,r={...km};n&&(r.deviceId=e.getDeviceIdConstraint(n));let i={voiceIsolation:!0,...r},a=await navigator.mediaDevices.getUserMedia({audio:i});this.forgetInputStreamAndSource(),this.inputStream=a,this.mediaStreamSource=this.context.createMediaStreamSource(a),this.mediaStreamSource.connect(this.analyser)}catch(e){throw this.onError(`Failed to switch input device:`,e),e}finally{this.settingInput=!1}}handlePermissionsChange=()=>{if(this.permissions.state===`denied`)this.onError(`Microphone permission denied`);else if(!this.settingInput){let[e]=this.inputStream.getAudioTracks(),{deviceId:t}=e?.getSettings()??{};this.setDevice({inputDeviceId:t}).catch(e=>{this.onError(`Failed to reset input device after permission change:`,e)})}}};function jm(e,t){let n=e=>{let n=e.data[0];t.sendMessage({user_audio_chunk:bu(n.buffer)})};return e.addListener(n),()=>{e.removeListener(n)}}function Mm(e,t){let n=e=>{t.playAudio(xu(e.audio_base_64))};return e.addListener(n),()=>{e.removeListener(n)}}var Nm={default:0,android:3e3};function Pm(e,t=`default`){let n=e??Nm;return t===`android`?n.android??n.default:t===`ios`?n.ios??n.default:n.default}async function Fm(e){e>0&&await new Promise(t=>setTimeout(t,e))}var Im=3e4,Lm=[`touchstart`,`touchend`,`click`],Rm=null,zm=null,Bm=!1;function Vm(e){let t=e.createBuffer(1,1,22050),n=e.createBufferSource();n.buffer=t,n.connect(e.destination),n.start(0),e.resume().catch(()=>{})}function Hm(){zm&&clearTimeout(zm),zm=setTimeout(()=>{zm=null,qm()},Im)}function Um(){zm&&=(clearTimeout(zm),null)}function Wm(){if(!wm()||Rm)return;let e=new AudioContext;Vm(e),Rm=e,Hm()}function Gm(){if(!wm()||Bm||typeof document>`u`)return;Bm=!0;let e=()=>{Wm()};for(let t of Lm)document.addEventListener(t,e,!0)}function Km(){let e=Rm;return Rm=null,Um(),e}function qm(){Rm&&(Rm.close().catch(()=>{}),Rm=null,Um())}function Jm(){return Tm()?`android`:wm()?`ios`:`default`}async function Ym(){if(`wakeLock`in navigator)try{return await navigator.wakeLock.request(`screen`)}catch{}return null}async function Xm(e,t,n){let[r,i]=await Promise.all([Am.create({...t.inputFormat,preferHeadphonesForIosDevices:e.preferHeadphonesForIosDevices,inputDeviceId:e.inputDeviceId,inputChunkDurationMs:e.inputChunkDurationMs,workletPaths:e.workletPaths,libsampleratePath:e.libsampleratePath}),Dm.create({...t.outputFormat,outputDeviceId:e.outputDeviceId,workletPaths:e.workletPaths,audioContext:n??void 0})]),a=jm(r,t),o=Mm(t,i);return{input:r,output:i,playbackEventTarget:i,detach:async()=>{a(),o()}}}async function Zm(e){let t=e.useWakeLock??!0,n=null,r=null,i=null;try{t&&(n=await Ym()),r=await navigator.mediaDevices.getUserMedia({audio:!0});let a=Jm();await Fm(Pm(e.connectionDelay,a));let o=await Vu(e),s;try{o instanceof zu?(i=Km(),s={connection:o,...await Xm(e,o,i)},i=null):(qm(),s=Fu(o))}catch(e){throw await i?.close().catch(()=>{}),i=null,o.close(),e}if(r){for(let e of r.getTracks())e.stop();r=null}let c=null;n&&(c=()=>{document.visibilityState===`visible`&&n?.released&&Ym().then(e=>{n=e})},document.addEventListener(`visibilitychange`,c));let l=s.detach;return{...s,detach:async()=>{await l(),c&&document.removeEventListener(`visibilitychange`,c);try{await n?.release(),n=null}catch{}}}}catch(e){if(r)for(let e of r.getTracks())e.stop();try{await n?.release(),n=null}catch{}throw qm(),e}}Pu(Zm);var Qm=class{audioElements=[];inputAudioContext=null;audioCaptureContext=null;async attachRemoteTrack(e,t){let n=e.attach();if(n.autoplay=!0,n.controls=!1,t&&n.setSinkId)try{await n.setSinkId(t)}catch(e){console.warn(`Failed to set output device for new audio element:`,e)}n.style.display=`none`,document.body.appendChild(n),this.audioElements.push(n)}setupInputAnalysis(e){this.inputAudioContext&&=(this.inputAudioContext.close().catch(()=>{}),null);let t=new AudioContext,n=t.createAnalyser();return t.createMediaStreamSource(new MediaStream([e])).connect(n),this.inputAudioContext=t,{volumeProvider:Cm(n,t.sampleRate),analyser:n}}async setupOutputAnalysis(e,t,n){this.audioCaptureContext&&=(this.audioCaptureContext.close().catch(()=>{}),null);let r=new AudioContext;this.audioCaptureContext=r;let i=r.createAnalyser();i.fftSize=2048,i.smoothingTimeConstant=.8;let a=new MediaStream([e.mediaStreamTrack]),o=r.createMediaStreamSource(a),s=Cm(i,r.sampleRate);await Om(r.audioWorklet);let c=new AudioWorkletNode(r,`rawAudioProcessor`);return c.port.postMessage({type:`setFormat`,format:t.format,sampleRate:t.sampleRate}),c.port.onmessage=e=>{let[t,r]=e.data;n(t.buffer,r)},o.connect(i),i.connect(c),{volumeProvider:s,analyser:i}}setVolume(e){for(let t of this.audioElements)t.volume=e}async setOutputDevice(e){if(!(`setSinkId`in HTMLAudioElement.prototype))throw Error(`setSinkId is not supported in this browser`);await Promise.all(this.audioElements.map(async t=>{try{await t.setSinkId(e)}catch(e){throw console.error(`Failed to set sink ID for audio element:`,e),e}}))}cleanup(){this.inputAudioContext&&=(this.inputAudioContext.close().catch(e=>{console.warn(`Error closing input audio context:`,e)}),null),this.audioCaptureContext&&=(this.audioCaptureContext.close().catch(e=>{console.warn(`Error closing audio capture context:`,e)}),null);for(let e of this.audioElements)e.remove();this.audioElements=[]}};function $m(){for(let e of[`fetch`,`WebSocket`,`TextEncoder`,`TextDecoder`,`URL`,`btoa`,`atob`])if(globalThis[e]===void 0)throw Error(`${e} is not available in this environment.`)}var eh=new Uint8Array,th=class e extends s{type=`text`;setVolume(){throw Error(`setVolume is not supported in text conversations`)}setMicMuted(){throw Error(`setMicMuted is not supported in text conversations`)}getInputByteFrequencyData(){return eh}getOutputByteFrequencyData(){return eh}getInputVolume(){return 0}getOutputVolume(){return 0}static async startSession(t){let n=s.getFullOptions(t);n.onStatusChange&&n.onStatusChange({status:`connecting`}),n.onCanSendFeedbackChange&&n.onCanSendFeedbackChange({canSendFeedback:!1}),n.onModeChange&&n.onModeChange({mode:`listening`}),n.onCanSendFeedbackChange&&n.onCanSendFeedbackChange({canSendFeedback:!1});let r=null,i=null;try{return await Fm(Pm(n.connectionDelay)),r=await Vu(n),i=new e(n,r),n.onConversationCreated?.(i),i.markConnected(),n.onConnect?.({conversationId:r.conversationId}),i}catch(e){throw i?await i.endSession().catch(()=>{}):(n.onStatusChange?.({status:`disconnected`}),r?.close()),e}}},nh=class e extends s{input;output;playbackEventTarget;cleanUp;type=`voice`;static async startSession(t){let n=s.getFullOptions(t);n.onStatusChange&&n.onStatusChange({status:`connecting`}),n.onCanSendFeedbackChange&&n.onCanSendFeedbackChange({canSendFeedback:!1});let r=null,i=null;try{if(!Nu)throw Error(`No voice session setup strategy registered. Import the platform-specific entry point (e.g. @elevenlabs/client via the "browser" export).`);return i=await Nu(n),r=new e(n,i.connection,i.input,i.output,i.playbackEventTarget,i.detach),n.onConversationCreated?.(r),r.markConnected(),n.onConnect?.({conversationId:i.connection.conversationId}),r}catch(e){throw r?await r.endSession().catch(()=>{}):(i&&await i.detach().catch(()=>{}),n.onStatusChange?.({status:`disconnected`})),e}}inputFrequencyData;outputFrequencyData;handlePlaybackEvent=e=>{e.data.type===`process`&&this.updateMode(e.data.finished?`listening`:`speaking`)};constructor(e,t,n,r,i,a){super(e,t),this.input=n,this.output=r,this.playbackEventTarget=i,this.cleanUp=a,i?.addListener(this.handlePlaybackEvent)}async handleEndSession(){this.playbackEventTarget?.removeListener(this.handlePlaybackEvent),this.playbackEventTarget=null,await this.cleanUp(),await super.handleEndSession(),await this.input.close(),await this.output.close()}handleInterruption(e){super.handleInterruption(e),this.updateMode(`listening`),this.output.interrupt()}handleAudio(e){super.handleAudio(e),e.audio_event.alignment&&this.options.onAudioAlignment&&this.options.onAudioAlignment(e.audio_event.alignment),this.lastInterruptTimestamp<=e.audio_event.event_id&&(e.audio_event.audio_base_64&&this.options.onAudio?.(e.audio_event.audio_base_64),this.currentEventId=e.audio_event.event_id,this.updateCanSendFeedback(),this.updateMode(`speaking`))}static FREQUENCY_BIN_COUNT=1024;setMicMuted(e){this.input.setMuted(e).catch(e=>{this.options.onError?.(`Failed to set input muted state`,e)})}getInputByteFrequencyData(){return this.inputFrequencyData??=new Uint8Array(e.FREQUENCY_BIN_COUNT),this.input.getByteFrequencyData(this.inputFrequencyData),this.inputFrequencyData}getOutputByteFrequencyData(){return this.outputFrequencyData??=new Uint8Array(e.FREQUENCY_BIN_COUNT),this.output.getByteFrequencyData(this.outputFrequencyData),this.outputFrequencyData}getInputVolume(){return this.input.getVolume()}getOutputVolume(){return this.output.getVolume()}async changeInputDevice({sampleRate:e,format:t,preferHeadphonesForIosDevices:n,inputDeviceId:r}){try{await this.input.setDevice({inputDeviceId:r,sampleRate:e,format:t,preferHeadphonesForIosDevices:n})}catch(e){throw console.error(`Error changing input device`,e),e}}async changeOutputDevice({sampleRate:e,format:t,outputDeviceId:n}){try{await this.output.setDevice({outputDeviceId:n,sampleRate:e,format:t})}catch(e){throw console.error(`Error changing output device`,e),e}}setVolume=({volume:e})=>{let t=Number.isFinite(e)?Math.min(1,Math.max(0,e)):1;this.volume=t,this.output.setVolume(t)}},rh=`https://api.elevenlabs.io`;function ih(e,t,n=rh){let r={};return typeof t==`boolean`?r.feedback=t?`like`:`dislike`:(r.rating=t.rating,r.comment=t.comment),fetch(`${n}/v1/convai/conversations/${e}/feedback`,{method:`POST`,body:JSON.stringify(r),headers:{"Content-Type":`application/json`}})}var ah;(function(e){e.SESSION_STARTED=`session_started`,e.PARTIAL_TRANSCRIPT=`partial_transcript`,e.COMMITTED_TRANSCRIPT=`committed_transcript`,e.COMMITTED_TRANSCRIPT_WITH_TIMESTAMPS=`committed_transcript_with_timestamps`,e.AUTH_ERROR=`auth_error`,e.ERROR=`error`,e.OPEN=`open`,e.CLOSE=`close`,e.QUOTA_EXCEEDED=`quota_exceeded`,e.COMMIT_THROTTLED=`commit_throttled`,e.TRANSCRIBER_ERROR=`transcriber_error`,e.UNACCEPTED_TERMS=`unaccepted_terms`,e.RATE_LIMITED=`rate_limited`,e.INPUT_ERROR=`input_error`,e.QUEUE_OVERFLOW=`queue_overflow`,e.RESOURCE_EXHAUSTED=`resource_exhausted`,e.SESSION_TIME_LIMIT_EXCEEDED=`session_time_limit_exceeded`,e.CHUNK_SIZE_EXCEEDED=`chunk_size_exceeded`,e.INSUFFICIENT_AUDIO_ACTIVITY=`insufficient_audio_activity`})(ah||={});var oh;(function(e){e.PCM_8000=`pcm_8000`,e.PCM_16000=`pcm_16000`,e.PCM_22050=`pcm_22050`,e.PCM_24000=`pcm_24000`,e.PCM_44100=`pcm_44100`,e.PCM_48000=`pcm_48000`,e.ULAW_8000=`ulaw_8000`})(oh||={});var sh;(function(e){e.MANUAL=`manual`,e.VAD=`vad`})(sh||={});var ch={async startSession(e){return $m(),o(e)?th.startSession(e):nh.startSession(e)}};Gm(),Eu(()=>new Qm);var lh=Object.create,uh=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,fh=Object.getOwnPropertyNames,ph=Object.getPrototypeOf,mh=Object.prototype.hasOwnProperty,hh=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),gh=(e,t)=>{let n={};for(var r in e)uh(n,r,{get:e[r],enumerable:!0});return t||uh(n,Symbol.toStringTag,{value:`Module`}),n},_h=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=fh(t),a=0,o=i.length,s;a<o;a++)s=i[a],!mh.call(e,s)&&s!==n&&uh(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=dh(t,s))||r.enumerable});return e},vh=(e,t,n)=>(n=e==null?{}:lh(ph(e)),_h(t||!e||!e.__esModule?uh(n,`default`,{value:e,enumerable:!0}):n,e)),yh=`0.13.1`;function bh(e){return e?e===`true`?!0:e===`false`?!1:null:null}var xh=`variant.placement.override-config.avatar-image-url.avatar-orb-color-1.avatar-orb-color-2.agent-id.signed-url.terms-key.server-location.language.dynamic-variables.show-avatar-when-collapsed.override-prompt.override-llm.override-speed.override-stability.override-similarity-boost.override-first-message.override-language.override-voice-id.override-text-only.mic-muting.transcript.text-input.text-contents.default-expanded.always-expanded.dismissible.strip-audio-tags.user-id.use-rtc.collect-feedback.worklet-path-raw-audio-processor.worklet-path-audio-concat-processor.worklet-path-libsamplerate.syntax-highlight-theme.markdown-link-allowed-hosts.markdown-link-include-www.markdown-link-allow-http.allow-events.show-agent-status.show-conversation-id.environment`.split(`.`),Sh=`@import "https://fonts.googleapis.com/css2?family=Inter:wght@400,500&display=swap";@layer components;@layer properties{@media all {*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:host,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--font-weight-medium:500;--font-weight-semibold:600;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.start-3{inset-inline-start:12px}.end-3{inset-inline-end:12px}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.top-4{top:16px}.top-16{top:64px}.top-20{top:80px}.top-\\[40\\%\\]{top:40%}.top-\\[88px\\]{top:88px}.right-0{right:0}.right-1{right:4px}.right-1\\.5{right:6px}.-bottom-3{bottom:-12px}.bottom-0{bottom:0}.bottom-20{bottom:80px}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:16px}.z-1{z-index:1}.z-2{z-index:2}.z-10{z-index:10}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.m-1{margin:4px}.-mx-0\\.5{margin-inline:-2px}.mx-1{margin-inline:4px}.-my-4{margin-block:-16px}.my-4{margin-block:16px}.my-6{margin-block:24px}.ms-auto{margin-inline-start:auto}.\\!mt-0{margin-top:0!important}.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-6{margin-top:24px}.-mr-1\\.5{margin-right:-6px}.mb-0\\.5{margin-bottom:2px}.mb-1{margin-bottom:4px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}.ml-4{margin-left:16px}.ml-auto{margin-left:auto}.\\!flex{display:flex!important}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.table-cell{display:table-cell}.table-row{display:table-row}.\\[field-sizing\\:content\\],.field-sizing-content{field-sizing:content}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-11{height:44px}.h-12{height:48px}.h-16{height:64px}.h-48{height:192px}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[50\\%\\]{max-height:50%}.max-h-\\[min\\(384px\\,var\\(--radix-select-content-available-height\\)\\)\\]{max-height:min(384px, var(--radix-select-content-available-height))}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-11{min-height:44px}.min-h-\\[6lh\\]{min-height:6lh}.min-h-full{min-height:100%}.min-h-min{min-height:min-content}.w-1\\/2{width:50%}.w-4{width:16px}.w-5{width:20px}.w-6{width:24px}.w-8{width:32px}.w-9{width:36px}.w-11{width:44px}.w-12{width:48px}.w-20{width:80px}.w-48{width:192px}.w-full{width:100%}.w-screen{width:100vw}.max-w-64{max-width:256px}.max-w-\\[180px\\]{max-width:180px}.max-w-\\[220px\\]{max-width:220px}.max-w-\\[400px\\]{max-width:400px}.max-w-full{max-width:100%}.min-w-0{min-width:0}.min-w-9{min-width:36px}.min-w-60{min-width:240px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-max{min-width:max-content}.min-w-min{min-width:min-content}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:0 100%}.origin-bottom-right{transform-origin:100% 100%}.origin-top{transform-origin:top}.origin-top-left{transform-origin:0 0}.origin-top-right{transform-origin:100% 0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y:calc(calc(var(--el-overlay-padding)) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-full{--tw-translate-y:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1\\/2{--tw-translate-y:calc(1 / 2 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y:calc(var(--el-overlay-padding));translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-90{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-150{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\\[0\\.1667\\]{scale:.1667}.-rotate-90{rotate:-90deg}.-rotate-180{rotate:-180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.list-outside{list-style-position:outside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.place-content-center{place-content:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:4px}.gap-1\\.5{gap:6px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-3{gap:12px}.gap-6{gap:24px}.gap-8{gap:32px}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(12px * var(--tw-space-y-reverse));margin-block-end:calc(12px * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-base-border>:not(:last-child)){border-color:var(--el-base-border)}.self-auto{align-self:auto}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\\[calc\\(var\\(--el-button-radius\\)\\+4px\\)\\]{border-radius:calc(var(--el-button-radius) + 4px)}.rounded-\\[calc\\(var\\(--el-sheet-radius\\)-8px\\)\\]{border-radius:calc(var(--el-sheet-radius) - 8px)}.rounded-bubble{border-radius:var(--el-bubble-radius)}.rounded-button{border-radius:var(--el-button-radius)}.rounded-compact-sheet{border-radius:var(--el-compact-sheet-radius)}.rounded-dropdown-sheet{border-radius:var(--el-dropdown-sheet-radius)}.rounded-full{border-radius:9999px}.rounded-input{border-radius:var(--el-input-radius)}.rounded-sheet{border-radius:var(--el-sheet-radius)}.border{border-style:var(--tw-border-style);border-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-accent{border-color:var(--el-accent)}.border-audio-tag\\/20{border-color:hsl(var(--el-audio-tag) / 1)}@supports (color:color-mix(in lab, red, red)){.border-audio-tag\\/20{border-color:color-mix(in oklab, hsl(var(--el-audio-tag) / 1) 20%, transparent)}}.border-base{border-color:var(--el-base)}.border-base-border,.border-base-border\\/60{border-color:var(--el-base-border)}@supports (color:color-mix(in lab, red, red)){.border-base-border\\/60{border-color:color-mix(in oklab, var(--el-base-border) 60%, transparent)}}.border-base-error\\/30{border-color:var(--el-base-error)}@supports (color:color-mix(in lab, red, red)){.border-base-error\\/30{border-color:color-mix(in oklab, var(--el-base-error) 30%, transparent)}}.border-base-subtle\\/30{border-color:var(--el-base-subtle)}@supports (color:color-mix(in lab, red, red)){.border-base-subtle\\/30{border-color:color-mix(in oklab, var(--el-base-subtle) 30%, transparent)}}.bg-accent{background-color:var(--el-accent)}.bg-base{background-color:var(--el-base)}.bg-base-active,.bg-base-active\\/40{background-color:var(--el-base-active)}@supports (color:color-mix(in lab, red, red)){.bg-base-active\\/40{background-color:color-mix(in oklab, var(--el-base-active) 40%, transparent)}}.bg-base-active\\/80{background-color:var(--el-base-active)}@supports (color:color-mix(in lab, red, red)){.bg-base-active\\/80{background-color:color-mix(in oklab, var(--el-base-active) 80%, transparent)}}.bg-base-border{background-color:var(--el-base-border)}.bg-base-error\\/5{background-color:var(--el-base-error)}@supports (color:color-mix(in lab, red, red)){.bg-base-error\\/5{background-color:color-mix(in oklab, var(--el-base-error) 5%, transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-base{--tw-gradient-from:var(--el-base);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.\\[mask-image\\:linear-gradient\\(to_bottom\\,black\\,transparent\\)\\]{-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000)}.\\[mask-image\\:linear-gradient\\(to_top\\,black\\,transparent\\)\\]{-webkit-mask-image:linear-gradient(#0000,#000);mask-image:linear-gradient(#0000,#000)}.bg-cover{background-size:cover}.object-cover{object-fit:cover}.p-1{padding:4px}.p-1\\.5{padding:6px}.p-2{padding:8px}.p-3{padding:12px}.p-4{padding:16px}.px-1{padding-inline:4px}.px-1\\.5{padding-inline:6px}.px-2{padding-inline:8px}.px-2\\.5{padding-inline:10px}.px-3{padding-inline:12px}.px-4{padding-inline:16px}.px-8{padding-inline:32px}.py-0\\.5{padding-block:2px}.py-1{padding-block:4px}.py-1\\.5{padding-block:6px}.py-2{padding-block:8px}.py-2\\.5{padding-block:10px}.py-4{padding-block:16px}.py-\\[calc\\(theme\\(spacing\\.2\\)-1px\\)\\]{padding-block:7px}.py-px{padding-block:1px}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-2{padding-top:8px}.pt-3{padding-top:12px}.pt-4{padding-top:16px}.pt-20{padding-top:80px}.pr-3{padding-right:12px}.pr-7{padding-right:28px}.pr-8{padding-right:32px}.pr-16{padding-right:64px}.pb-1{padding-bottom:4px}.pb-1\\.5{padding-bottom:6px}.pb-2{padding-bottom:8px}.pb-3{padding-bottom:12px}.pb-4{padding-bottom:16px}.pb-\\[60px\\]{padding-bottom:60px}.pl-1\\.5{padding-left:6px}.pl-4{padding-left:16px}.pl-16{padding-left:64px}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:18px;line-height:var(--tw-leading,26px)}.text-md{font-size:16px;line-height:var(--tw-leading,24px)}.text-sm{font-size:14px;line-height:var(--tw-leading,20px)}.text-xl{font-size:20px;line-height:var(--tw-leading,28px)}.text-xs{font-size:12px;line-height:var(--tw-leading,16px)}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.leading-4{--tw-leading:16px;line-height:16px}.leading-5{--tw-leading:20px;line-height:20px}.\\[line-height\\:var\\(--el-overlay-padding\\)\\]{line-height:var(--el-overlay-padding)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent-primary{color:var(--el-accent-primary)}.text-audio-tag{color:hsl(var(--el-audio-tag) / 1)}.text-base-border{color:var(--el-base-border)}.text-base-error{color:var(--el-base-error)}.text-base-primary{color:var(--el-base-primary)}.text-base-subtle{color:var(--el-base-subtle)}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-header{--tw-shadow:0 0 1px 0 var(--tw-shadow-color,#0006), 0 2px 2px 0 var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 2px 40px 1px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 2px 24px 1px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-scroll-fade-bottom{--tw-shadow:0 8px 16px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-scroll-fade-top{--tw-shadow:0 -8px 16px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--el-accent)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[border-radius\\]{transition-property:border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[colors\\,opacity\\]{transition-property:colors,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[margin\\]{transition-property:margin;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,width\\,height\\,transform\\,flex-grow\\]{transition-property:opacity,width,height,transform,flex-grow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\]{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,left\\,top\\,opacity\\,scale\\]{transition-property:transform,left,top,opacity,scale;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\,height\\,max-width\\,max-height\\,transform\\,border-radius\\,opacity\\,inset\\,bottom\\,top\\,left\\,right\\,margin\\,padding\\]{transition-property:width,height,max-width,max-height,transform,border-radius,opacity,inset,bottom,top,left,right,margin,padding;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}.group-focus-within\\:pointer-events-auto:is(:where(.group):focus-within *){pointer-events:auto}.group-focus-within\\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\\:text-base-subtle::placeholder{color:var(--el-base-subtle)}.first\\:mt-0:first-child,:is(.\\*\\:first\\:mt-0>*):first-child{margin-top:0}.last\\:mb-0:last-child,:is(.\\*\\:last\\:mb-0>*):last-child{margin-bottom:0}@media (hover:hover){.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-accent-hover:hover{border-color:var(--el-accent-hover)}.hover\\:border-base-hover:hover{border-color:var(--el-base-hover)}.hover\\:bg-accent-hover:hover{background-color:var(--el-accent-hover)}.hover\\:bg-base-hover:hover{background-color:var(--el-base-hover)}.hover\\:text-base-primary:hover{color:var(--el-base-primary)}.hover\\:opacity-50:hover{opacity:.5}.hover\\:opacity-100:hover{opacity:1}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:underline-offset-2:focus-visible{text-underline-offset:2px}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:border-accent-active:active{border-color:var(--el-accent-active)}.active\\:border-base-active:active{border-color:var(--el-base-active)}.active\\:bg-accent-active:active{background-color:var(--el-accent-active)}.active\\:bg-base-active:active{background-color:var(--el-base-active)}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.data-hidden\\:translate-x-full[data-shown=false]{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-hidden\\:-translate-y-4[data-shown=false]{--tw-translate-y:calc(16px * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-hidden\\:translate-y-2[data-shown=false]{--tw-translate-y:8px;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-hidden\\:scale-75[data-shown=false]{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-hidden\\:scale-90[data-shown=false]{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-hidden\\:scale-100[data-shown=false]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-hidden\\:opacity-0[data-shown=false]{opacity:0}.data-highlighted\\:bg-base-active[data-highlighted]{background-color:var(--el-base-active)}.overlay{inset:var(--el-overlay-padding);right:calc(var(--el-overlay-padding) + var(--removed-body-scroll-bar-size,0px));position:absolute}.focus-ring{--tw-ring-color:var(--el-accent);--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--el-base)}.focus-ring:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);--tw-outline-style:none;outline-style:none}[data-variant=compact].sheet{border-radius:var(--el-sheet-radius);width:100%;max-width:400px;height:calc(100% - 80px);max-height:550px}[data-variant=expanded].sheet{border-radius:var(--el-sheet-radius);width:100%;max-width:600px;height:100%;max-height:calc(100% - 80px)}[data-variant=fullscreen].sheet{width:100%;max-width:100dvw;height:100%;max-height:100dvh;margin:calc(-1 * var(--el-overlay-padding));width:calc(100% + 2 * var(--el-overlay-padding));height:calc(100% + 2 * var(--el-overlay-padding));border-radius:0;padding-bottom:24px;bottom:0}.animate-text{background-image:linear-gradient(75deg, var(--el-base-primary), var(--el-base-subtle), var(--el-base-primary), var(--el-base-subtle));color:#0000;background-size:300% 100%;-webkit-background-clip:text;background-clip:text;animation:2s linear infinite TextAnimation}@keyframes TextAnimation{0%{background-position:0 0}to{background-position:100% 0}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.terms h6{font-size:12px;line-height:var(--tw-leading,16px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}.terms h5{font-size:14px;line-height:var(--tw-leading,20px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}.terms h4{font-size:16px;line-height:var(--tw-leading,24px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}.terms h3{font-size:18px;line-height:var(--tw-leading,26px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}.terms h2{font-size:20px;line-height:var(--tw-leading,28px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}.terms h1{font-size:24px;line-height:var(--tw-leading,30px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}}.dev-host,:host{--el-audio-tag:293 53% 52%;pointer-events:none;z-index:1000;font-size:16px;line-height:var(--tw-leading,24px);color:var(--el-base-primary);scrollbar-color:#e5e7eb transparent;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;position:fixed;inset:0}:is(.dev-host,:host) button{margin:0}.markdown{text-autospace:normal;text-spacing-trim:trim-start}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{word-break:auto-phrase}.tok-comment,.tok-meta{color:#6a737d}.tok-keyword{color:#d73a49}.tok-atom,.tok-bool,.tok-literal,.tok-number{color:#005cc5}.tok-string,.tok-string2{color:#032f62}.tok-variableName{color:#24292e}.tok-variableName.tok-definition{color:#6f42c1}.tok-variableName.tok-local{color:#24292e}.tok-variableName2,.tok-macroName,.tok-typeName,.tok-namespace,.tok-className{color:#6f42c1}.tok-propertyName{color:#24292e}.tok-propertyName.tok-definition{color:#005cc5}.tok-labelName{color:#22863a}.tok-url,.tok-link{color:#032f62;text-decoration:underline}.tok-operator{color:#d73a49}.tok-punctuation{color:#24292e}.tok-invalid{color:#b31d28}.tok-deleted{color:#b31d28;background-color:#ffeef0}.tok-inserted{color:#22863a;background-color:#f0fff4}.tok-heading{color:#005cc5;font-weight:700}.tok-emphasis{color:#24292e;font-style:italic}.tok-strong{color:#24292e;font-weight:700}.tok-strikethrough{text-decoration:line-through}.tok-monospace{color:#005cc5}.tok-processingInstruction,[data-syntax-theme=dark] .tok-comment,[data-syntax-theme=dark] .tok-meta{color:#6a737d}[data-syntax-theme=dark] .tok-keyword{color:#f97583}[data-syntax-theme=dark] .tok-atom,[data-syntax-theme=dark] .tok-bool,[data-syntax-theme=dark] .tok-literal,[data-syntax-theme=dark] .tok-number,[data-syntax-theme=dark] .tok-propertyName.tok-definition{color:#79b8ff}[data-syntax-theme=dark] .tok-string,[data-syntax-theme=dark] .tok-string2{color:#9ecbff}[data-syntax-theme=dark] .tok-url,[data-syntax-theme=dark] .tok-link{color:#dbedff}[data-syntax-theme=dark] .tok-variableName,[data-syntax-theme=dark] .tok-variableName.tok-local,[data-syntax-theme=dark] .tok-propertyName,[data-syntax-theme=dark] .tok-emphasis,[data-syntax-theme=dark] .tok-strong{color:#e1e4e8}[data-syntax-theme=dark] .tok-variableName.tok-definition,[data-syntax-theme=dark] .tok-variableName2,[data-syntax-theme=dark] .tok-macroName,[data-syntax-theme=dark] .tok-typeName,[data-syntax-theme=dark] .tok-namespace,[data-syntax-theme=dark] .tok-className{color:#b392f0}[data-syntax-theme=dark] .tok-labelName{color:#85e89d}[data-syntax-theme=dark] .tok-invalid{color:#fdaeb7}[data-syntax-theme=dark] .tok-deleted{color:#fdaeb7;background-color:#86181d}[data-syntax-theme=dark] .tok-inserted{color:#85e89d;background-color:#144620}[data-syntax-theme=dark] .tok-heading{color:#79b8ff}[data-syntax-theme=dark] .tok-operator{color:#f97583}[data-syntax-theme=dark] .tok-punctuation{color:#e1e4e8}[data-syntax-theme=dark] .tok-monospace{color:#79b8ff}[data-syntax-theme=dark] .tok-processingInstruction{color:#6a737d}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}`;function Ch(e,t){Th(e)&&(e=`100%`);let n=Eh(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(e=t===360?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t)),e)}function wh(e){return Math.min(1,Math.max(0,e))}function Th(e){return typeof e==`string`&&e.indexOf(`.`)!==-1&&parseFloat(e)===1}function Eh(e){return typeof e==`string`&&e.indexOf(`%`)!==-1}function Dh(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Oh(e){return Number(e)<=1?`${Number(e)*100}%`:e}function kh(e){return e.length===1?`0`+e:String(e)}function Ah(e,t,n){return{r:Ch(e,255)*255,g:Ch(t,255)*255,b:Ch(n,255)*255}}function jh(e,t,n){e=Ch(e,255),t=Ch(t,255),n=Ch(n,255);let r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=0,s=(r+i)/2;if(r===i)o=0,a=0;else{let c=r-i;switch(o=s>.5?c/(2-r-i):c/(r+i),r){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4;break;default:break}a/=6}return{h:a,s:o,l:s}}function Mh(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Nh(e,t,n){let r,i,a;if(e=Ch(e,360),t=Ch(t,100),n=Ch(n,100),t===0)i=n,a=n,r=n;else{let o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=Mh(s,o,e+1/3),i=Mh(s,o,e),a=Mh(s,o,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function Ph(e,t,n){e=Ch(e,255),t=Ch(t,255),n=Ch(n,255);let r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=r,s=r-i,c=r===0?0:s/r;if(r===i)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4;break;default:break}a/=6}return{h:a,s:c,v:o}}function Fh(e,t,n){e=Ch(e,360)*6,t=Ch(t,100),n=Ch(n,100);let r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6,l=[n,o,a,a,s,n][c],u=[s,n,n,o,a,a][c],d=[a,a,s,n,n,o][c];return{r:l*255,g:u*255,b:d*255}}function Ih(e,t,n,r){let i=[kh(Math.round(e).toString(16)),kh(Math.round(t).toString(16)),kh(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(``)}function Lh(e,t,n,r,i){let a=[kh(Math.round(e).toString(16)),kh(Math.round(t).toString(16)),kh(Math.round(n).toString(16)),kh(Bh(r))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join(``)}function Rh(e,t,n,r){let i=e/100,a=t/100,o=n/100,s=r/100;return{r:255*(1-i)*(1-s),g:255*(1-a)*(1-s),b:255*(1-o)*(1-s)}}function zh(e,t,n){let r=1-e/255,i=1-t/255,a=1-n/255,o=Math.min(r,i,a);return o===1?(r=0,i=0,a=0):(r=(r-o)/(1-o)*100,i=(i-o)/(1-o)*100,a=(a-o)/(1-o)*100),o*=100,{c:Math.round(r),m:Math.round(i),y:Math.round(a),k:Math.round(o)}}function Bh(e){return Math.round(parseFloat(e)*255).toString(16)}function Vh(e){return Hh(e)/255}function Hh(e){return parseInt(e,16)}function Uh(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Wh={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,goldenrod:`#daa520`,gold:`#ffd700`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavenderblush:`#fff0f5`,lavender:`#e6e6fa`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`};function Gh(e){let t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e==`string`&&(e=Xh(e)),typeof e==`object`&&(Zh(e.r)&&Zh(e.g)&&Zh(e.b)?(t=Ah(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):Zh(e.h)&&Zh(e.s)&&Zh(e.v)?(r=Oh(e.s),i=Oh(e.v),t=Fh(e.h,r,i),o=!0,s=`hsv`):Zh(e.h)&&Zh(e.s)&&Zh(e.l)?(r=Oh(e.s),a=Oh(e.l),t=Nh(e.h,r,a),o=!0,s=`hsl`):Zh(e.c)&&Zh(e.m)&&Zh(e.y)&&Zh(e.k)&&(t=Rh(e.c,e.m,e.y,e.k),o=!0,s=`cmyk`),Object.prototype.hasOwnProperty.call(e,`a`)&&(n=e.a)),n=Dh(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Kh=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,qh=`[\\s|\\(]+(`+Kh+`)[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`,Jh=`[\\s|\\(]+(`+Kh+`)[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`,Yh={CSS_UNIT:new RegExp(Kh),rgb:RegExp(`rgb`+qh),rgba:RegExp(`rgba`+Jh),hsl:RegExp(`hsl`+qh),hsla:RegExp(`hsla`+Jh),hsv:RegExp(`hsv`+qh),hsva:RegExp(`hsva`+Jh),cmyk:RegExp(`cmyk`+Jh),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Xh(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(Wh[e])e=Wh[e],t=!0;else if(e===`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};let n=Yh.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Yh.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Yh.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Yh.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Yh.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Yh.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Yh.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Yh.hex8.exec(e),n?{r:Hh(n[1]),g:Hh(n[2]),b:Hh(n[3]),a:Vh(n[4]),format:t?`name`:`hex8`}:(n=Yh.hex6.exec(e),n?{r:Hh(n[1]),g:Hh(n[2]),b:Hh(n[3]),format:t?`name`:`hex`}:(n=Yh.hex4.exec(e),n?{r:Hh(n[1]+n[1]),g:Hh(n[2]+n[2]),b:Hh(n[3]+n[3]),a:Vh(n[4]+n[4]),format:t?`name`:`hex8`}:(n=Yh.hex3.exec(e),n?{r:Hh(n[1]+n[1]),g:Hh(n[2]+n[2]),b:Hh(n[3]+n[3]),format:t?`name`:`hex`}:!1))))))))))}function Zh(e){return typeof e==`number`?!Number.isNaN(e):Yh.CSS_UNIT.test(e)}var Qh=class e{constructor(t=``,n={}){if(t instanceof e)return t;typeof t==`number`&&(t=Uh(t)),this.originalInput=t;let r=Gh(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){let e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){let e=this.toRgb(),t,n,r,i=e.r/255,a=e.g/255,o=e.b/255;return t=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,n=a<=.03928?a/12.92:((a+.055)/1.055)**2.4,r=o<=.03928?o/12.92:((o+.055)/1.055)**2.4,.2126*t+.7152*n+.0722*r}getAlpha(){return this.a}setAlpha(e){return this.a=Dh(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){let{s:e}=this.toHsl();return e===0}toHsv(){let e=Ph(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){let e=Ph(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.v*100);return this.a===1?`hsv(${t}, ${n}%, ${r}%)`:`hsva(${t}, ${n}%, ${r}%, ${this.roundA})`}toHsl(){let e=jh(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){let e=jh(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.l*100);return this.a===1?`hsl(${t}, ${n}%, ${r}%)`:`hsla(${t}, ${n}%, ${r}%, ${this.roundA})`}toHex(e=!1){return Ih(this.r,this.g,this.b,e)}toHexString(e=!1){return`#`+this.toHex(e)}toHex8(e=!1){return Lh(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return`#`+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){let e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?`rgb(${e}, ${t}, ${n})`:`rgba(${e}, ${t}, ${n}, ${this.roundA})`}toPercentageRgb(){let e=e=>`${Math.round(Ch(e,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){let e=e=>Math.round(Ch(e,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...zh(this.r,this.g,this.b)}}toCmykString(){let{c:e,m:t,y:n,k:r}=zh(this.r,this.g,this.b);return`cmyk(${e}, ${t}, ${n}, ${r})`}toName(){if(this.a===0)return`transparent`;if(this.a<1)return!1;let e=`#`+Ih(this.r,this.g,this.b,!1);for(let[t,n]of Object.entries(Wh))if(e===n)return t;return!1}toString(e){let t=!!e;e??=this.format;let n=!1,r=this.a<1&&this.a>=0;return!t&&r&&(e.startsWith(`hex`)||e===`name`)?e===`name`&&this.a===0?this.toName():this.toRgbString():(e===`rgb`&&(n=this.toRgbString()),e===`prgb`&&(n=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(n=this.toHexString()),e===`hex3`&&(n=this.toHexString(!0)),e===`hex4`&&(n=this.toHex8String(!0)),e===`hex8`&&(n=this.toHex8String()),e===`name`&&(n=this.toName()),e===`hsl`&&(n=this.toHslString()),e===`hsv`&&(n=this.toHsvString()),e===`cmyk`&&(n=this.toCmykString()),n||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new e(this.toString())}lighten(t=10){let n=this.toHsl();return n.l+=t/100,n.l=wh(n.l),new e(n)}brighten(t=10){let n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)}darken(t=10){let n=this.toHsl();return n.l-=t/100,n.l=wh(n.l),new e(n)}tint(e=10){return this.mix(`white`,e)}shade(e=10){return this.mix(`black`,e)}desaturate(t=10){let n=this.toHsl();return n.s-=t/100,n.s=wh(n.s),new e(n)}saturate(t=10){let n=this.toHsl();return n.s+=t/100,n.s=wh(n.s),new e(n)}greyscale(){return this.desaturate(100)}spin(t){let n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)}mix(t,n=50){let r=this.toRgb(),i=new e(t).toRgb(),a=n/100;return new e({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})}analogous(t=6,n=30){let r=this.toHsl(),i=360/n,a=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(new e(r));return a}complement(){let t=this.toHsl();return t.h=(t.h+180)%360,new e(t)}monochromatic(t=6){let n=this.toHsv(),{h:r}=n,{s:i}=n,{v:a}=n,o=[],s=1/t;for(;t--;)o.push(new e({h:r,s:i,v:a})),a=(a+s)%1;return o}splitcomplement(){let t=this.toHsl(),{h:n}=t;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){let n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){let n=this.toHsl(),{h:r}=n,i=[this],a=360/t;for(let o=1;o<t;o++)i.push(new e({h:(r+o*a)%360,s:n.s,l:n.l}));return i}equals(t){let n=new e(t);return this.format===`cmyk`||n.format===`cmyk`?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}},$h=[`tiny`,`compact`,`full`];function eg(e){return $h.includes(e)?e:$h[0]}var tg=[`top-left`,`top`,`top-right`,`bottom-left`,`bottom`,`bottom-right`];function ng(e){return tg.includes(e)?e:`bottom-right`}var rg={main_label:`Need help?`,start_call:`Start a call`,start_chat:`Message`,send_message:`Send`,new_call:`New call`,end_call:`End`,mute_microphone:`Mute microphone`,text_mode:`Switch to text mode`,voice_mode:`Switch to voice mode`,switched_to_text_mode:`Switched to text mode`,switched_to_voice_mode:`Switched to voice mode`,change_language:`Change language`,collapse:`Collapse`,expand:`Expand`,copied:`Copied!`,accept_terms:`Accept`,dismiss_terms:`Cancel`,listening_status:`Listening`,speaking_status:`Talk to interrupt`,connecting_status:`Connecting`,chatting_status:`Chatting with AI Agent`,input_label:`Text message input`,input_placeholder:`Send a message...`,input_placeholder_text_only:`Send a message...`,input_placeholder_new_conversation:`Start a new conversation`,user_ended_conversation:`You ended the conversation`,agent_ended_conversation:`The agent ended the conversation`,conversation_id:`ID`,error_occurred:`An error occurred`,copy_id:`Copy ID`,initiate_feedback:`How was this conversation?`,request_follow_up_feedback:`Tell us more`,thanks_for_feedback:`Thank you for your feedback!`,thanks_for_feedback_details:`Your feedback helps us improve our service and better support you in the future.`,follow_up_feedback_placeholder:`Tell us more about your experience...`,submit:`Submit`,go_back:`Go back`,copy:`Copy`,download:`Download`,wrap:`Wrap`,agent_working:`Working...`,agent_done:`Completed`,agent_error:`Error occurred`,attach_file:`Attach file`,remove_file:`Remove file`,file_upload_error:`Failed to upload file.`,file_type_unsupported:`Unsupported file type. Accepted types:`,file_too_large:`File size exceeds the maximum limit.`,file_limit_reached:`Maximum number of files for this conversation reached.`},ig=Object.keys(rg),ag={base:`#ffffff`,base_hover:`#f9fafb`,base_active:`#f3f4f6`,base_border:`#e5e7eb`,base_subtle:`#6b7280`,base_primary:`#000000`,base_error:`#ef4444`,accent:`#000000`,accent_hover:`#1f2937`,accent_active:`#374151`,accent_border:`#4b5563`,accent_subtle:`#6b7280`,accent_primary:`#ffffff`,overlay_padding:32,button_radius:18,input_radius:10,bubble_radius:15,sheet_radius:`calc(var(--el-button-radius) + 6px)`,compact_sheet_radius:`calc(var(--el-button-radius) + 12px)`,dropdown_sheet_radius:`calc(var(--el-input-radius) + 6px)`},og=Object.keys(ag);function sg(e=`us`){switch(e){case`eu-residency`:case`in-residency`:case`us`:case`global`:return e;default:return console.warn(`[ConversationalAI] Invalid server-location: ${e}. Defaulting to "us"`),`us`}}function cg(e){let t=hf(e);if(t==null)throw Error(`${e.displayName} cannot be used outside of provider`);return t}var lg=Fd(null);function ug({value:e,children:t}){let n=mf(()=>Object.fromEntries(xh.map(t=>[t,Vp(e[t])])),[]);return xh.forEach(t=>{n[t].value=e[t]}),R(lg.Provider,{value:n,children:t})}function dg(){return cg(lg)}function fg(e){return dg()[e]}var pg=Fd(null);function mg({children:e}){let t=fg(`server-location`),n=mf(()=>{let e=Kp(()=>sg(t.value)),n={us:`https://api.us.elevenlabs.io`,"eu-residency":`https://api.eu.residency.elevenlabs.io`,"in-residency":`https://api.in.residency.elevenlabs.io`,global:`https://api.elevenlabs.io`},r={us:`wss://api.us.elevenlabs.io`,"eu-residency":`wss://api.eu.residency.elevenlabs.io`,"in-residency":`wss://api.in.residency.elevenlabs.io`,global:`wss://api.elevenlabs.io`};return{location:e,serverUrl:Kp(()=>n[e.value]),webSocketUrl:Kp(()=>r[e.value])}},[]);return R(pg.Provider,{value:n,children:e})}function hg(){return cg(pg)}var gg={en:{name:`English`,flagCode:`us`,languageCode:`en`},zh:{name:`中文`,flagCode:`cn`,languageCode:`zh`},es:{name:`Español`,flagCode:`es`,languageCode:`es`},hi:{name:`हिन्दी`,flagCode:`in`,languageCode:`hi`},pt:{name:`Português (Portugal)`,flagCode:`pt`,languageCode:`pt`},"pt-br":{name:`Português (Brasil)`,flagCode:`br`,languageCode:`pt-br`},fr:{name:`Français`,flagCode:`fr`,languageCode:`fr`},de:{name:`Deutsch`,flagCode:`de`,languageCode:`de`},ja:{name:`日本語`,flagCode:`jp`,languageCode:`ja`},ar:{name:`العربية`,flagCode:`ae`,languageCode:`ar`},ru:{name:`Русский`,flagCode:`ru`,languageCode:`ru`},ko:{name:`한국어`,flagCode:`kr`,languageCode:`ko`},id:{name:`Bahasa Indonesia`,flagCode:`id`,languageCode:`id`},it:{name:`Italiano`,flagCode:`it`,languageCode:`it`},nl:{name:`Nederlands`,flagCode:`nl`,languageCode:`nl`},tr:{name:`Türkçe`,flagCode:`tr`,languageCode:`tr`},pl:{name:`Polski`,flagCode:`pl`,languageCode:`pl`},sv:{name:`Svenska`,flagCode:`se`,languageCode:`sv`},ms:{name:`Bahasa Melayu`,flagCode:`my`,languageCode:`ms`},ro:{name:`Română`,flagCode:`ro`,languageCode:`ro`},uk:{name:`Українська`,flagCode:`ua`,languageCode:`uk`},el:{name:`Ελληνικά`,flagCode:`gr`,languageCode:`el`},cs:{name:`Čeština`,flagCode:`cz`,languageCode:`cs`},da:{name:`Dansk`,flagCode:`dk`,languageCode:`da`},fi:{name:`Suomi`,flagCode:`fi`,languageCode:`fi`},bg:{name:`Български`,flagCode:`bg`,languageCode:`bg`},hr:{name:`Hrvatski`,flagCode:`hr`,languageCode:`hr`},sk:{name:`Slovenčina`,flagCode:`sk`,languageCode:`sk`},ta:{name:`தமிழ்`,flagCode:`in`,languageCode:`ta`},hu:{name:`Magyar`,flagCode:`hu`,languageCode:`hu`},no:{name:`Norsk`,flagCode:`no`,languageCode:`no`},vi:{name:`Tiếng Việt`,flagCode:`vn`,languageCode:`vi`},tl:{name:`Filipino`,flagCode:`ph`,languageCode:`tl`},af:{name:`Afrikaans`,flagCode:`za`,languageCode:`af`},hy:{name:`Հայերեն`,flagCode:`am`,languageCode:`hy`},as:{name:`অসমীয়া`,flagCode:`in`,languageCode:`as`},az:{name:`Azərbaycan`,flagCode:`az`,languageCode:`az`},be:{name:`Беларуская`,flagCode:`by`,languageCode:`be`},bn:{name:`বাংলা`,flagCode:`in`,languageCode:`bn`},bs:{name:`Bosanski`,flagCode:`ba`,languageCode:`bs`},ca:{name:`Català`,flagCode:`es-ct`,languageCode:`ca`},et:{name:`Eesti`,flagCode:`ee`,languageCode:`et`},gl:{name:`Galego`,flagCode:`es-ga`,languageCode:`gl`},ka:{name:`ქართული`,flagCode:`ge`,languageCode:`ka`},gu:{name:`ગુજરાતી`,flagCode:`in`,languageCode:`gu`},ha:{name:`Hausa`,flagCode:`ng`,languageCode:`ha`},he:{name:`עברית`,flagCode:`il`,languageCode:`he`},is:{name:`Íslenska`,flagCode:`is`,languageCode:`is`},ga:{name:`Gaeilge`,flagCode:`ie`,languageCode:`ga`},jv:{name:`Basa Jawa`,flagCode:`id`,languageCode:`jv`},kn:{name:`ಕನ್ನಡ`,flagCode:`in`,languageCode:`kn`},kk:{name:`Қазақша`,flagCode:`kz`,languageCode:`kk`},ky:{name:`Кыргызча`,flagCode:`kg`,languageCode:`ky`},lv:{name:`Latviešu`,flagCode:`lv`,languageCode:`lv`},lt:{name:`Lietuvių`,flagCode:`lt`,languageCode:`lt`},lb:{name:`Lëtzebuergesch`,flagCode:`lu`,languageCode:`lb`},mk:{name:`Македонски`,flagCode:`mk`,languageCode:`mk`},ml:{name:`മലയാളം`,flagCode:`in`,languageCode:`ml`},mr:{name:`मराठी`,flagCode:`in`,languageCode:`mr`},ne:{name:`नेपाली`,flagCode:`np`,languageCode:`ne`},ps:{name:`پښتو`,flagCode:`af`,languageCode:`ps`},fa:{name:`فارسی`,flagCode:`ir`,languageCode:`fa`},pa:{name:`ਪੰਜਾਬੀ`,flagCode:`in`,languageCode:`pa`},sr:{name:`Српски`,flagCode:`rs`,languageCode:`sr`},sd:{name:`سنڌي`,flagCode:`in`,languageCode:`sd`},sl:{name:`Slovenščina`,flagCode:`si`,languageCode:`sl`},so:{name:`Soomaali`,flagCode:`so`,languageCode:`so`},sw:{name:`Kiswahili`,flagCode:`ke`,languageCode:`sw`},te:{name:`తెలుగు`,flagCode:`in`,languageCode:`te`},th:{name:`ไทย`,flagCode:`th`,languageCode:`th`},ur:{name:`اردو`,flagCode:`pk`,languageCode:`ur`},cy:{name:`Cymraeg`,flagCode:`gb-wls`,languageCode:`cy`}};function _g(e){return Object.keys(gg).includes(e??``)}var vg=`xi:convai-widget-last-used-language`,yg=Fd(null);function bg(){try{let e=localStorage.getItem(vg);if(e&&_g(e))return e}catch{}}function xg(){try{let e=[];for(let t of navigator.languages){let n=t.toLowerCase();e.push(n);let r=n.split(`-`)[0];r!==n&&e.push(r)}return e}catch(e){return console.warn(`[ConversationalAI] Could not read navigator.languages:`,e),[]}}function Sg({languageAttribute:e,supported:t,defaultLanguage:n}){let r=new Set([...t,n]),i=[e,bg(),...xg()];for(let e of i)if(e&&r.has(e))return e;return n}function Cg(e){try{localStorage.setItem(vg,e)}catch{}}function wg({children:e}){let t=fb(),n=fg(`language`),r=fg(`override-language`),i=L(()=>(t.value.supported_language_overrides??[]).filter(_g)),a=n.peek(),o=t.peek(),s=(o.supported_language_overrides??[]).filter(_g),c=cm(Sg({languageAttribute:a&&_g(a)?a:void 0,supported:s,defaultLanguage:o.language})),l=L(()=>i.value.map(e=>gg[e]).sort((e,t)=>e.name.localeCompare(t.name))),u=mf(()=>({language:Kp(()=>_g(r.value)?gg[r.value]:_g(c.value)&&i.value.includes(c.value)?gg[c.value]:gg[t.value.language]),setLanguage:e=>{c.value=e,Cg(e)},options:l,showPicker:Kp(()=>l.value.length>0)}),[]);return R(yg.Provider,{value:u,children:e})}function Tg(){return cg(yg)}var Eg=Fd(null);function Dg({children:e}){let{language:t}=Tg(),n=fg(`override-prompt`),r=fg(`override-llm`),i=fg(`override-speed`),a=fg(`override-stability`),o=fg(`override-similarity-boost`),s=fg(`override-first-message`),c=fg(`override-voice-id`),l=fg(`override-text-only`),u=fg(`user-id`),d=L(()=>({agent:{prompt:{prompt:n.value,llm:r.value},firstMessage:s.value,language:t.value.languageCode},tts:{voiceId:c.value,speed:i.value?parseFloat(i.value):void 0,stability:a.value?parseFloat(a.value):void 0,similarityBoost:o.value?parseFloat(o.value):void 0},conversation:{textOnly:bh(l.value)??void 0}})),f=fg(`dynamic-variables`),p=L(()=>{if(f.value)try{return JSON.parse(f.value)}catch(e){console.error(`[ConversationalAI] Cannot parse dynamic-variables: ${e?.message}`)}}),m=fg(`worklet-path-raw-audio-processor`),h=fg(`worklet-path-audio-concat-processor`),g=fg(`worklet-path-libsamplerate`),{webSocketUrl:_}=hg(),v=fg(`agent-id`),y=fg(`signed-url`),b=fg(`environment`),x=pb(),S=xb(),C=L(()=>{let e=S.value,t={dynamicVariables:p.value,overrides:d.value,connectionDelay:{default:300},textOnly:x.value,userId:u.value||void 0,environment:b.value||void 0,libsampleratePath:g.value,workletPaths:{rawAudioProcessor:m.value,audioConcatProcessor:h.value}};return v.value?e?{agentId:v.value,origin:_.value,connectionType:`webrtc`,...t}:{agentId:v.value,origin:_.value,connectionType:`websocket`,...t}:y.value?{signedUrl:y.value,connectionType:`websocket`,...t}:(console.error(`[ConversationalAI] Either agent-id or signed-url is required`),null)});return C.value?R(Eg.Provider,{value:C,children:e}):null}function Og(){return cg(Eg)}var kg=`5.2.0`;function Ag(e,t){return new Promise(n=>setTimeout(n,e,t))}function jg(){return new Promise(e=>{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(null)})}function Mg(e,t=1/0){let{requestIdleCallback:n}=window;return n?new Promise(e=>n.call(window,()=>e(),{timeout:t})):Ag(Math.min(e,t))}function Ng(e){return!!e&&typeof e.then==`function`}function Pg(e,t){try{let n=e();Ng(n)?n.then(e=>t(!0,e),e=>t(!1,e)):t(!0,n)}catch(e){t(!1,e)}}async function Fg(e,t,n=16){let r=Array(e.length),i=Date.now();for(let a=0;a<e.length;++a){r[a]=t(e[a],a);let o=Date.now();o>=i+n&&(i=o,await jg())}return r}function Ig(e){return e.then(void 0,()=>void 0),e}function Lg(e,t){for(let n=0,r=e.length;n<r;++n)if(e[n]===t)return!0;return!1}function Rg(e,t){return!Lg(e,t)}function zg(e){return parseInt(e)}function Bg(e){return parseFloat(e)}function Vg(e,t){return typeof e==`number`&&isNaN(e)?t:e}function Hg(e){return e.reduce((e,t)=>e+ +!!t,0)}function Ug(e,t=1){if(Math.abs(t)>=1)return Math.round(e/t)*t;{let n=1/t;return Math.round(e*n)/n}}function Wg(e){let t=`Unexpected syntax '${e}'`,n=/^\s*([a-z-]*)(.*)$/i.exec(e),r=n[1]||void 0,i={},a=/([.:#][\w-]+|\[.+?\])/gi,o=(e,t)=>{i[e]=i[e]||[],i[e].push(t)};for(;;){let e=a.exec(n[2]);if(!e)break;let r=e[0];switch(r[0]){case`.`:o(`class`,r.slice(1));break;case`#`:o(`id`,r.slice(1));break;case`[`:{let e=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(r);if(e)o(e[1],e[4]??e[5]??``);else throw Error(t);break}default:throw Error(t)}}return[r,i]}function Gg(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r>127)return new TextEncoder().encode(e);t[n]=r}return t}function Kg(e,t){let n=e[0]>>>16,r=e[0]&65535,i=e[1]>>>16,a=e[1]&65535,o=t[0]>>>16,s=t[0]&65535,c=t[1]>>>16,l=t[1]&65535,u=0,d=0,f=0,p=0;p+=a+l,f+=p>>>16,p&=65535,f+=i+c,d+=f>>>16,f&=65535,d+=r+s,u+=d>>>16,d&=65535,u+=n+o,u&=65535,e[0]=u<<16|d,e[1]=f<<16|p}function qg(e,t){let n=e[0]>>>16,r=e[0]&65535,i=e[1]>>>16,a=e[1]&65535,o=t[0]>>>16,s=t[0]&65535,c=t[1]>>>16,l=t[1]&65535,u=0,d=0,f=0,p=0;p+=a*l,f+=p>>>16,p&=65535,f+=i*l,d+=f>>>16,f&=65535,f+=a*c,d+=f>>>16,f&=65535,d+=r*l,u+=d>>>16,d&=65535,d+=i*c,u+=d>>>16,d&=65535,d+=a*s,u+=d>>>16,d&=65535,u+=n*l+r*c+i*s+a*o,u&=65535,e[0]=u<<16|d,e[1]=f<<16|p}function Jg(e,t){let n=e[0];t%=64,t===32?(e[0]=e[1],e[1]=n):t<32?(e[0]=n<<t|e[1]>>>32-t,e[1]=e[1]<<t|n>>>32-t):(t-=32,e[0]=e[1]<<t|n>>>32-t,e[1]=n<<t|e[1]>>>32-t)}function Yg(e,t){t%=64,t!==0&&(t<32?(e[0]=e[1]>>>32-t,e[1]<<=t):(e[0]=e[1]<<t-32,e[1]=0))}function Xg(e,t){e[0]^=t[0],e[1]^=t[1]}var Zg=[4283543511,3981806797],Qg=[3301882366,444984403];function $g(e){let t=[0,e[0]>>>1];Xg(e,t),qg(e,Zg),t[1]=e[0]>>>1,Xg(e,t),qg(e,Qg),t[1]=e[0]>>>1,Xg(e,t)}var e_=[2277735313,289559509],t_=[1291169091,658871167],n_=[0,5],r_=[0,1390208809],i_=[0,944331445];function a_(e,t){let n=Gg(e);t||=0;let r=[0,n.length],i=r[1]%16,a=r[1]-i,o=[0,t],s=[0,t],c=[0,0],l=[0,0],u;for(u=0;u<a;u+=16)c[0]=n[u+4]|n[u+5]<<8|n[u+6]<<16|n[u+7]<<24,c[1]=n[u]|n[u+1]<<8|n[u+2]<<16|n[u+3]<<24,l[0]=n[u+12]|n[u+13]<<8|n[u+14]<<16|n[u+15]<<24,l[1]=n[u+8]|n[u+9]<<8|n[u+10]<<16|n[u+11]<<24,qg(c,e_),Jg(c,31),qg(c,t_),Xg(o,c),Jg(o,27),Kg(o,s),qg(o,n_),Kg(o,r_),qg(l,t_),Jg(l,33),qg(l,e_),Xg(s,l),Jg(s,31),Kg(s,o),qg(s,n_),Kg(s,i_);c[0]=0,c[1]=0,l[0]=0,l[1]=0;let d=[0,0];switch(i){case 15:d[1]=n[u+14],Yg(d,48),Xg(l,d);case 14:d[1]=n[u+13],Yg(d,40),Xg(l,d);case 13:d[1]=n[u+12],Yg(d,32),Xg(l,d);case 12:d[1]=n[u+11],Yg(d,24),Xg(l,d);case 11:d[1]=n[u+10],Yg(d,16),Xg(l,d);case 10:d[1]=n[u+9],Yg(d,8),Xg(l,d);case 9:d[1]=n[u+8],Xg(l,d),qg(l,t_),Jg(l,33),qg(l,e_),Xg(s,l);case 8:d[1]=n[u+7],Yg(d,56),Xg(c,d);case 7:d[1]=n[u+6],Yg(d,48),Xg(c,d);case 6:d[1]=n[u+5],Yg(d,40),Xg(c,d);case 5:d[1]=n[u+4],Yg(d,32),Xg(c,d);case 4:d[1]=n[u+3],Yg(d,24),Xg(c,d);case 3:d[1]=n[u+2],Yg(d,16),Xg(c,d);case 2:d[1]=n[u+1],Yg(d,8),Xg(c,d);case 1:d[1]=n[u],Xg(c,d),qg(c,e_),Jg(c,31),qg(c,t_),Xg(o,c)}return Xg(o,r),Xg(s,r),Kg(o,s),Kg(s,o),$g(o),$g(s),Kg(o,s),Kg(s,o),(`00000000`+(o[0]>>>0).toString(16)).slice(-8)+(`00000000`+(o[1]>>>0).toString(16)).slice(-8)+(`00000000`+(s[0]>>>0).toString(16)).slice(-8)+(`00000000`+(s[1]>>>0).toString(16)).slice(-8)}function o_(e){return{name:e.name,message:e.message,stack:e.stack?.split(`
|
|
270
|
+
`),km={echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:{ideal:1}},Am=class e{context;analyser;worklet;inputStream;mediaStreamSource;permissions;onError;static async create({sampleRate:t,format:n,preferHeadphonesForIosDevices:r,inputDeviceId:i,workletPaths:a,libsampleratePath:o,onError:s,inputChunkDurationMs:c=25}){let l=null,u=null;try{let d={sampleRate:{ideal:t},...km};if(wm()&&r){let e=(await window.navigator.mediaDevices.enumerateDevices()).find(e=>e.kind===`audioinput`&&[`airpod`,`headphone`,`earphone`].find(t=>e.label.toLowerCase().includes(t)));e&&(d.deviceId={ideal:e.deviceId})}i&&(d.deviceId=e.getDeviceIdConstraint(i));let f=navigator.mediaDevices.getSupportedConstraints().sampleRate;l=new window.AudioContext(f?{sampleRate:t}:{});let p=l.createAnalyser();f||await xm(l,o),await Om(l.audioWorklet,a?.rawAudioProcessor);let m={voiceIsolation:!0,...d};u=await navigator.mediaDevices.getUserMedia({audio:m});let h=l.createMediaStreamSource(u),g=new AudioWorkletNode(l,`rawAudioProcessor`);g.port.postMessage({type:`setFormat`,format:n,sampleRate:t,chunkDurationMs:c}),h.connect(p),p.connect(g),await l.resume();let _=await navigator.permissions.query({name:`microphone`});return new e(l,p,g,u,h,_,s)}catch(e){throw u?.getTracks().forEach(e=>{e.stop()}),l?.close(),e}}static getDeviceIdConstraint(e){if(e)return wm()?{ideal:e}:{exact:e}}muted=!1;volumeProvider;constructor(e,t,n,r,i,a,o=console.error){this.context=e,this.analyser=t,this.worklet=n,this.inputStream=r,this.mediaStreamSource=i,this.permissions=a,this.onError=o,this.permissions.addEventListener(`change`,this.handlePermissionsChange),this.worklet.port.start(),this.volumeProvider=Cm(t,e.sampleRate)}getAnalyser(){return this.analyser}getVolume(){return this.muted?0:this.volumeProvider.getVolume()}getByteFrequencyData(e){if(this.muted){e.fill(0);return}this.volumeProvider.getByteFrequencyData(e)}isMuted(){return this.muted}addListener(e){this.worklet.port.addEventListener(`message`,e)}removeListener(e){this.worklet.port.removeEventListener(`message`,e)}forgetInputStreamAndSource(){for(let e of this.inputStream.getTracks())e.stop();this.mediaStreamSource.disconnect()}async close(){this.forgetInputStreamAndSource(),this.permissions.removeEventListener(`change`,this.handlePermissionsChange),await this.context.close()}async setMuted(e){this.muted=e,this.worklet.port.postMessage({type:`setMuted`,isMuted:e})}settingInput=!1;async setDevice(t){try{if(this.settingInput)throw Error(`Input device is already being set`);this.settingInput=!0;let n=t?.inputDeviceId,r={...km};n&&(r.deviceId=e.getDeviceIdConstraint(n));let i={voiceIsolation:!0,...r},a=await navigator.mediaDevices.getUserMedia({audio:i});this.forgetInputStreamAndSource(),this.inputStream=a,this.mediaStreamSource=this.context.createMediaStreamSource(a),this.mediaStreamSource.connect(this.analyser)}catch(e){throw this.onError(`Failed to switch input device:`,e),e}finally{this.settingInput=!1}}handlePermissionsChange=()=>{if(this.permissions.state===`denied`)this.onError(`Microphone permission denied`);else if(!this.settingInput){let[e]=this.inputStream.getAudioTracks(),{deviceId:t}=e?.getSettings()??{};this.setDevice({inputDeviceId:t}).catch(e=>{this.onError(`Failed to reset input device after permission change:`,e)})}}};function jm(e,t){let n=e=>{let n=e.data[0];t.sendMessage({user_audio_chunk:bu(n.buffer)})};return e.addListener(n),()=>{e.removeListener(n)}}function Mm(e,t){let n=e=>{t.playAudio(xu(e.audio_base_64))};return e.addListener(n),()=>{e.removeListener(n)}}var Nm={default:0,android:3e3};function Pm(e,t=`default`){let n=e??Nm;return t===`android`?n.android??n.default:t===`ios`?n.ios??n.default:n.default}async function Fm(e){e>0&&await new Promise(t=>setTimeout(t,e))}var Im=3e4,Lm=[`touchstart`,`touchend`,`click`],Rm=null,zm=null,Bm=!1;function Vm(e){let t=e.createBuffer(1,1,22050),n=e.createBufferSource();n.buffer=t,n.connect(e.destination),n.start(0),e.resume().catch(()=>{})}function Hm(){zm&&clearTimeout(zm),zm=setTimeout(()=>{zm=null,qm()},Im)}function Um(){zm&&=(clearTimeout(zm),null)}function Wm(){if(!wm()||Rm)return;let e=new AudioContext;Vm(e),Rm=e,Hm()}function Gm(){if(!wm()||Bm||typeof document>`u`)return;Bm=!0;let e=()=>{Wm()};for(let t of Lm)document.addEventListener(t,e,!0)}function Km(){let e=Rm;return Rm=null,Um(),e}function qm(){Rm&&(Rm.close().catch(()=>{}),Rm=null,Um())}function Jm(){return Tm()?`android`:wm()?`ios`:`default`}async function Ym(){if(`wakeLock`in navigator)try{return await navigator.wakeLock.request(`screen`)}catch{}return null}async function Xm(e,t,n){let[r,i]=await Promise.all([Am.create({...t.inputFormat,preferHeadphonesForIosDevices:e.preferHeadphonesForIosDevices,inputDeviceId:e.inputDeviceId,inputChunkDurationMs:e.inputChunkDurationMs,workletPaths:e.workletPaths,libsampleratePath:e.libsampleratePath}),Dm.create({...t.outputFormat,outputDeviceId:e.outputDeviceId,workletPaths:e.workletPaths,audioContext:n??void 0})]),a=jm(r,t),o=Mm(t,i);return{input:r,output:i,playbackEventTarget:i,detach:async()=>{a(),o()}}}async function Zm(e){let t=e.useWakeLock??!0,n=null,r=null,i=null;try{t&&(n=await Ym()),r=await navigator.mediaDevices.getUserMedia({audio:!0});let a=Jm();await Fm(Pm(e.connectionDelay,a));let o=await Vu(e),s;try{o instanceof zu?(i=Km(),s={connection:o,...await Xm(e,o,i)},i=null):(qm(),s=Fu(o))}catch(e){throw await i?.close().catch(()=>{}),i=null,o.close(),e}if(r){for(let e of r.getTracks())e.stop();r=null}let c=null;n&&(c=()=>{document.visibilityState===`visible`&&n?.released&&Ym().then(e=>{n=e})},document.addEventListener(`visibilitychange`,c));let l=s.detach;return{...s,detach:async()=>{await l(),c&&document.removeEventListener(`visibilitychange`,c);try{await n?.release(),n=null}catch{}}}}catch(e){if(r)for(let e of r.getTracks())e.stop();try{await n?.release(),n=null}catch{}throw qm(),e}}Pu(Zm);var Qm=class{audioElements=[];inputAudioContext=null;audioCaptureContext=null;async attachRemoteTrack(e,t){let n=e.attach();if(n.autoplay=!0,n.controls=!1,t&&n.setSinkId)try{await n.setSinkId(t)}catch(e){console.warn(`Failed to set output device for new audio element:`,e)}n.style.display=`none`,document.body.appendChild(n),this.audioElements.push(n)}setupInputAnalysis(e){this.inputAudioContext&&=(this.inputAudioContext.close().catch(()=>{}),null);let t=new AudioContext,n=t.createAnalyser();return t.createMediaStreamSource(new MediaStream([e])).connect(n),this.inputAudioContext=t,{volumeProvider:Cm(n,t.sampleRate),analyser:n}}async setupOutputAnalysis(e,t,n){this.audioCaptureContext&&=(this.audioCaptureContext.close().catch(()=>{}),null);let r=new AudioContext;this.audioCaptureContext=r;let i=r.createAnalyser();i.fftSize=2048,i.smoothingTimeConstant=.8;let a=new MediaStream([e.mediaStreamTrack]),o=r.createMediaStreamSource(a),s=Cm(i,r.sampleRate);await Om(r.audioWorklet);let c=new AudioWorkletNode(r,`rawAudioProcessor`);return c.port.postMessage({type:`setFormat`,format:t.format,sampleRate:t.sampleRate}),c.port.onmessage=e=>{let[t,r]=e.data;n(t.buffer,r)},o.connect(i),i.connect(c),{volumeProvider:s,analyser:i}}setVolume(e){for(let t of this.audioElements)t.volume=e}async setOutputDevice(e){if(!(`setSinkId`in HTMLAudioElement.prototype))throw Error(`setSinkId is not supported in this browser`);await Promise.all(this.audioElements.map(async t=>{try{await t.setSinkId(e)}catch(e){throw console.error(`Failed to set sink ID for audio element:`,e),e}}))}cleanup(){this.inputAudioContext&&=(this.inputAudioContext.close().catch(e=>{console.warn(`Error closing input audio context:`,e)}),null),this.audioCaptureContext&&=(this.audioCaptureContext.close().catch(e=>{console.warn(`Error closing audio capture context:`,e)}),null);for(let e of this.audioElements)e.remove();this.audioElements=[]}};function $m(){for(let e of[`fetch`,`WebSocket`,`TextEncoder`,`TextDecoder`,`URL`,`btoa`,`atob`])if(globalThis[e]===void 0)throw Error(`${e} is not available in this environment.`)}var eh=new Uint8Array,th=class e extends s{type=`text`;setVolume(){throw Error(`setVolume is not supported in text conversations`)}setMicMuted(){throw Error(`setMicMuted is not supported in text conversations`)}getInputByteFrequencyData(){return eh}getOutputByteFrequencyData(){return eh}getInputVolume(){return 0}getOutputVolume(){return 0}static async startSession(t){let n=s.getFullOptions(t);n.onStatusChange&&n.onStatusChange({status:`connecting`}),n.onCanSendFeedbackChange&&n.onCanSendFeedbackChange({canSendFeedback:!1}),n.onModeChange&&n.onModeChange({mode:`listening`}),n.onCanSendFeedbackChange&&n.onCanSendFeedbackChange({canSendFeedback:!1});let r=null,i=null;try{return await Fm(Pm(n.connectionDelay)),r=await Vu(n),i=new e(n,r),n.onConversationCreated?.(i),i.markConnected(),n.onConnect?.({conversationId:r.conversationId}),i}catch(e){throw i?await i.endSession().catch(()=>{}):(n.onStatusChange?.({status:`disconnected`}),r?.close()),e}}},nh=class e extends s{input;output;playbackEventTarget;cleanUp;type=`voice`;static async startSession(t){let n=s.getFullOptions(t);n.onStatusChange&&n.onStatusChange({status:`connecting`}),n.onCanSendFeedbackChange&&n.onCanSendFeedbackChange({canSendFeedback:!1});let r=null,i=null;try{if(!Nu)throw Error(`No voice session setup strategy registered. Import the platform-specific entry point (e.g. @elevenlabs/client via the "browser" export).`);return i=await Nu(n),r=new e(n,i.connection,i.input,i.output,i.playbackEventTarget,i.detach),n.onConversationCreated?.(r),r.markConnected(),n.onConnect?.({conversationId:i.connection.conversationId}),r}catch(e){throw r?await r.endSession().catch(()=>{}):(i&&await i.detach().catch(()=>{}),n.onStatusChange?.({status:`disconnected`})),e}}inputFrequencyData;outputFrequencyData;handlePlaybackEvent=e=>{e.data.type===`process`&&this.updateMode(e.data.finished?`listening`:`speaking`)};constructor(e,t,n,r,i,a){super(e,t),this.input=n,this.output=r,this.playbackEventTarget=i,this.cleanUp=a,i?.addListener(this.handlePlaybackEvent)}async handleEndSession(){this.playbackEventTarget?.removeListener(this.handlePlaybackEvent),this.playbackEventTarget=null,await this.cleanUp(),await super.handleEndSession(),await this.input.close(),await this.output.close()}handleInterruption(e){super.handleInterruption(e),this.updateMode(`listening`),this.output.interrupt()}handleAudio(e){super.handleAudio(e),e.audio_event.alignment&&this.options.onAudioAlignment&&this.options.onAudioAlignment(e.audio_event.alignment),this.lastInterruptTimestamp<=e.audio_event.event_id&&(e.audio_event.audio_base_64&&this.options.onAudio?.(e.audio_event.audio_base_64),this.currentEventId=e.audio_event.event_id,this.updateCanSendFeedback(),this.updateMode(`speaking`))}static FREQUENCY_BIN_COUNT=1024;setMicMuted(e){this.input.setMuted(e).catch(e=>{this.options.onError?.(`Failed to set input muted state`,e)})}getInputByteFrequencyData(){return this.inputFrequencyData??=new Uint8Array(e.FREQUENCY_BIN_COUNT),this.input.getByteFrequencyData(this.inputFrequencyData),this.inputFrequencyData}getOutputByteFrequencyData(){return this.outputFrequencyData??=new Uint8Array(e.FREQUENCY_BIN_COUNT),this.output.getByteFrequencyData(this.outputFrequencyData),this.outputFrequencyData}getInputVolume(){return this.input.getVolume()}getOutputVolume(){return this.output.getVolume()}async changeInputDevice({sampleRate:e,format:t,preferHeadphonesForIosDevices:n,inputDeviceId:r}){try{await this.input.setDevice({inputDeviceId:r,sampleRate:e,format:t,preferHeadphonesForIosDevices:n})}catch(e){throw console.error(`Error changing input device`,e),e}}async changeOutputDevice({sampleRate:e,format:t,outputDeviceId:n}){try{await this.output.setDevice({outputDeviceId:n,sampleRate:e,format:t})}catch(e){throw console.error(`Error changing output device`,e),e}}setVolume=({volume:e})=>{let t=Number.isFinite(e)?Math.min(1,Math.max(0,e)):1;this.volume=t,this.output.setVolume(t)}},rh=`https://api.elevenlabs.io`;function ih(e,t,n=rh){let r={};return typeof t==`boolean`?r.feedback=t?`like`:`dislike`:(r.rating=t.rating,r.comment=t.comment),fetch(`${n}/v1/convai/conversations/${e}/feedback`,{method:`POST`,body:JSON.stringify(r),headers:{"Content-Type":`application/json`}})}var ah;(function(e){e.SESSION_STARTED=`session_started`,e.PARTIAL_TRANSCRIPT=`partial_transcript`,e.COMMITTED_TRANSCRIPT=`committed_transcript`,e.COMMITTED_TRANSCRIPT_WITH_TIMESTAMPS=`committed_transcript_with_timestamps`,e.AUTH_ERROR=`auth_error`,e.ERROR=`error`,e.OPEN=`open`,e.CLOSE=`close`,e.QUOTA_EXCEEDED=`quota_exceeded`,e.COMMIT_THROTTLED=`commit_throttled`,e.TRANSCRIBER_ERROR=`transcriber_error`,e.UNACCEPTED_TERMS=`unaccepted_terms`,e.RATE_LIMITED=`rate_limited`,e.INPUT_ERROR=`input_error`,e.QUEUE_OVERFLOW=`queue_overflow`,e.RESOURCE_EXHAUSTED=`resource_exhausted`,e.SESSION_TIME_LIMIT_EXCEEDED=`session_time_limit_exceeded`,e.CHUNK_SIZE_EXCEEDED=`chunk_size_exceeded`,e.INSUFFICIENT_AUDIO_ACTIVITY=`insufficient_audio_activity`})(ah||={});var oh;(function(e){e.PCM_8000=`pcm_8000`,e.PCM_16000=`pcm_16000`,e.PCM_22050=`pcm_22050`,e.PCM_24000=`pcm_24000`,e.PCM_44100=`pcm_44100`,e.PCM_48000=`pcm_48000`,e.ULAW_8000=`ulaw_8000`})(oh||={});var sh;(function(e){e.MANUAL=`manual`,e.VAD=`vad`})(sh||={});var ch={async startSession(e){return $m(),o(e)?th.startSession(e):nh.startSession(e)}};Gm(),Eu(()=>new Qm);var lh=Object.create,uh=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,fh=Object.getOwnPropertyNames,ph=Object.getPrototypeOf,mh=Object.prototype.hasOwnProperty,hh=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),gh=(e,t)=>{let n={};for(var r in e)uh(n,r,{get:e[r],enumerable:!0});return t||uh(n,Symbol.toStringTag,{value:`Module`}),n},_h=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=fh(t),a=0,o=i.length,s;a<o;a++)s=i[a],!mh.call(e,s)&&s!==n&&uh(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=dh(t,s))||r.enumerable});return e},vh=(e,t,n)=>(n=e==null?{}:lh(ph(e)),_h(t||!e||!e.__esModule?uh(n,`default`,{value:e,enumerable:!0}):n,e)),yh=`0.14.1`;function bh(e){return e?e===`true`?!0:e===`false`?!1:null:null}var xh=`variant.placement.override-config.avatar-image-url.avatar-orb-color-1.avatar-orb-color-2.agent-id.signed-url.terms-key.server-location.language.dynamic-variables.show-avatar-when-collapsed.override-prompt.override-llm.override-speed.override-stability.override-similarity-boost.override-first-message.override-language.override-voice-id.override-text-only.mic-muting.transcript.text-input.text-contents.default-expanded.always-expanded.dismissible.strip-audio-tags.user-id.use-rtc.collect-feedback.worklet-path-raw-audio-processor.worklet-path-audio-concat-processor.worklet-path-libsamplerate.syntax-highlight-theme.markdown-link-allowed-hosts.markdown-link-include-www.markdown-link-allow-http.allow-events.show-agent-status.show-conversation-id.environment`.split(`.`),Sh=`@import "https://fonts.googleapis.com/css2?family=Inter:wght@400,500&display=swap";@layer components;@layer properties{@media all {*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:host,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--font-weight-medium:500;--font-weight-semibold:600;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.start-3{inset-inline-start:12px}.end-3{inset-inline-end:12px}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.top-4{top:16px}.top-16{top:64px}.top-20{top:80px}.top-\\[40\\%\\]{top:40%}.top-\\[88px\\]{top:88px}.right-0{right:0}.right-1{right:4px}.right-1\\.5{right:6px}.-bottom-3{bottom:-12px}.bottom-0{bottom:0}.bottom-20{bottom:80px}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:16px}.z-1{z-index:1}.z-2{z-index:2}.z-10{z-index:10}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.m-1{margin:4px}.-mx-0\\.5{margin-inline:-2px}.mx-1{margin-inline:4px}.-my-4{margin-block:-16px}.my-4{margin-block:16px}.my-6{margin-block:24px}.ms-auto{margin-inline-start:auto}.\\!mt-0{margin-top:0!important}.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-6{margin-top:24px}.-mr-1\\.5{margin-right:-6px}.mb-0\\.5{margin-bottom:2px}.mb-1{margin-bottom:4px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}.ml-4{margin-left:16px}.ml-auto{margin-left:auto}.\\!flex{display:flex!important}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.table-cell{display:table-cell}.table-row{display:table-row}.\\[field-sizing\\:content\\],.field-sizing-content{field-sizing:content}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-11{height:44px}.h-12{height:48px}.h-16{height:64px}.h-48{height:192px}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[50\\%\\]{max-height:50%}.max-h-\\[min\\(384px\\,var\\(--radix-select-content-available-height\\)\\)\\]{max-height:min(384px, var(--radix-select-content-available-height))}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-11{min-height:44px}.min-h-\\[6lh\\]{min-height:6lh}.min-h-full{min-height:100%}.min-h-min{min-height:min-content}.w-1\\/2{width:50%}.w-4{width:16px}.w-5{width:20px}.w-6{width:24px}.w-8{width:32px}.w-9{width:36px}.w-11{width:44px}.w-12{width:48px}.w-20{width:80px}.w-48{width:192px}.w-full{width:100%}.w-screen{width:100vw}.max-w-64{max-width:256px}.max-w-\\[180px\\]{max-width:180px}.max-w-\\[220px\\]{max-width:220px}.max-w-\\[400px\\]{max-width:400px}.max-w-full{max-width:100%}.min-w-0{min-width:0}.min-w-9{min-width:36px}.min-w-60{min-width:240px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-max{min-width:max-content}.min-w-min{min-width:min-content}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:0 100%}.origin-bottom-right{transform-origin:100% 100%}.origin-top{transform-origin:top}.origin-top-left{transform-origin:0 0}.origin-top-right{transform-origin:100% 0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y:calc(calc(var(--el-overlay-padding)) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-full{--tw-translate-y:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1\\/2{--tw-translate-y:calc(1 / 2 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y:calc(var(--el-overlay-padding));translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-90{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-150{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\\[0\\.1667\\]{scale:.1667}.-rotate-90{rotate:-90deg}.-rotate-180{rotate:-180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.list-outside{list-style-position:outside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.place-content-center{place-content:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:4px}.gap-1\\.5{gap:6px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-3{gap:12px}.gap-6{gap:24px}.gap-8{gap:32px}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(12px * var(--tw-space-y-reverse));margin-block-end:calc(12px * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-base-border>:not(:last-child)){border-color:var(--el-base-border)}.self-auto{align-self:auto}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\\[calc\\(var\\(--el-button-radius\\)\\+4px\\)\\]{border-radius:calc(var(--el-button-radius) + 4px)}.rounded-\\[calc\\(var\\(--el-sheet-radius\\)-8px\\)\\]{border-radius:calc(var(--el-sheet-radius) - 8px)}.rounded-bubble{border-radius:var(--el-bubble-radius)}.rounded-button{border-radius:var(--el-button-radius)}.rounded-compact-sheet{border-radius:var(--el-compact-sheet-radius)}.rounded-dropdown-sheet{border-radius:var(--el-dropdown-sheet-radius)}.rounded-full{border-radius:9999px}.rounded-input{border-radius:var(--el-input-radius)}.rounded-sheet{border-radius:var(--el-sheet-radius)}.border{border-style:var(--tw-border-style);border-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-accent{border-color:var(--el-accent)}.border-audio-tag\\/20{border-color:hsl(var(--el-audio-tag) / 1)}@supports (color:color-mix(in lab, red, red)){.border-audio-tag\\/20{border-color:color-mix(in oklab, hsl(var(--el-audio-tag) / 1) 20%, transparent)}}.border-base{border-color:var(--el-base)}.border-base-border,.border-base-border\\/60{border-color:var(--el-base-border)}@supports (color:color-mix(in lab, red, red)){.border-base-border\\/60{border-color:color-mix(in oklab, var(--el-base-border) 60%, transparent)}}.border-base-error\\/30{border-color:var(--el-base-error)}@supports (color:color-mix(in lab, red, red)){.border-base-error\\/30{border-color:color-mix(in oklab, var(--el-base-error) 30%, transparent)}}.border-base-subtle\\/30{border-color:var(--el-base-subtle)}@supports (color:color-mix(in lab, red, red)){.border-base-subtle\\/30{border-color:color-mix(in oklab, var(--el-base-subtle) 30%, transparent)}}.bg-accent{background-color:var(--el-accent)}.bg-base{background-color:var(--el-base)}.bg-base-active,.bg-base-active\\/40{background-color:var(--el-base-active)}@supports (color:color-mix(in lab, red, red)){.bg-base-active\\/40{background-color:color-mix(in oklab, var(--el-base-active) 40%, transparent)}}.bg-base-active\\/80{background-color:var(--el-base-active)}@supports (color:color-mix(in lab, red, red)){.bg-base-active\\/80{background-color:color-mix(in oklab, var(--el-base-active) 80%, transparent)}}.bg-base-border{background-color:var(--el-base-border)}.bg-base-error\\/5{background-color:var(--el-base-error)}@supports (color:color-mix(in lab, red, red)){.bg-base-error\\/5{background-color:color-mix(in oklab, var(--el-base-error) 5%, transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-base{--tw-gradient-from:var(--el-base);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.\\[mask-image\\:linear-gradient\\(to_bottom\\,black\\,transparent\\)\\]{-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000)}.\\[mask-image\\:linear-gradient\\(to_top\\,black\\,transparent\\)\\]{-webkit-mask-image:linear-gradient(#0000,#000);mask-image:linear-gradient(#0000,#000)}.bg-cover{background-size:cover}.object-cover{object-fit:cover}.p-1{padding:4px}.p-1\\.5{padding:6px}.p-2{padding:8px}.p-3{padding:12px}.p-4{padding:16px}.px-1{padding-inline:4px}.px-1\\.5{padding-inline:6px}.px-2{padding-inline:8px}.px-2\\.5{padding-inline:10px}.px-3{padding-inline:12px}.px-4{padding-inline:16px}.px-8{padding-inline:32px}.py-0\\.5{padding-block:2px}.py-1{padding-block:4px}.py-1\\.5{padding-block:6px}.py-2{padding-block:8px}.py-2\\.5{padding-block:10px}.py-4{padding-block:16px}.py-\\[calc\\(theme\\(spacing\\.2\\)-1px\\)\\]{padding-block:7px}.py-px{padding-block:1px}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-2{padding-top:8px}.pt-3{padding-top:12px}.pt-4{padding-top:16px}.pt-20{padding-top:80px}.pr-3{padding-right:12px}.pr-7{padding-right:28px}.pr-8{padding-right:32px}.pr-16{padding-right:64px}.pb-1{padding-bottom:4px}.pb-1\\.5{padding-bottom:6px}.pb-2{padding-bottom:8px}.pb-3{padding-bottom:12px}.pb-4{padding-bottom:16px}.pb-\\[60px\\]{padding-bottom:60px}.pl-1\\.5{padding-left:6px}.pl-4{padding-left:16px}.pl-16{padding-left:64px}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:18px;line-height:var(--tw-leading,26px)}.text-md{font-size:16px;line-height:var(--tw-leading,24px)}.text-sm{font-size:14px;line-height:var(--tw-leading,20px)}.text-xl{font-size:20px;line-height:var(--tw-leading,28px)}.text-xs{font-size:12px;line-height:var(--tw-leading,16px)}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.leading-4{--tw-leading:16px;line-height:16px}.leading-5{--tw-leading:20px;line-height:20px}.\\[line-height\\:var\\(--el-overlay-padding\\)\\]{line-height:var(--el-overlay-padding)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent-primary{color:var(--el-accent-primary)}.text-audio-tag{color:hsl(var(--el-audio-tag) / 1)}.text-base-border{color:var(--el-base-border)}.text-base-error{color:var(--el-base-error)}.text-base-primary{color:var(--el-base-primary)}.text-base-subtle{color:var(--el-base-subtle)}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-header{--tw-shadow:0 0 1px 0 var(--tw-shadow-color,#0006), 0 2px 2px 0 var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 2px 40px 1px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 2px 24px 1px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-scroll-fade-bottom{--tw-shadow:0 8px 16px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-scroll-fade-top{--tw-shadow:0 -8px 16px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--el-accent)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[border-radius\\]{transition-property:border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[colors\\,opacity\\]{transition-property:colors,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[margin\\]{transition-property:margin;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,width\\,height\\,transform\\,flex-grow\\]{transition-property:opacity,width,height,transform,flex-grow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\]{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,left\\,top\\,opacity\\,scale\\]{transition-property:transform,left,top,opacity,scale;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\,height\\,max-width\\,max-height\\,transform\\,border-radius\\,opacity\\,inset\\,bottom\\,top\\,left\\,right\\,margin\\,padding\\]{transition-property:width,height,max-width,max-height,transform,border-radius,opacity,inset,bottom,top,left,right,margin,padding;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}.group-focus-within\\:pointer-events-auto:is(:where(.group):focus-within *){pointer-events:auto}.group-focus-within\\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\\:text-base-subtle::placeholder{color:var(--el-base-subtle)}.first\\:mt-0:first-child,:is(.\\*\\:first\\:mt-0>*):first-child{margin-top:0}.last\\:mb-0:last-child,:is(.\\*\\:last\\:mb-0>*):last-child{margin-bottom:0}@media (hover:hover){.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-accent-hover:hover{border-color:var(--el-accent-hover)}.hover\\:border-base-hover:hover{border-color:var(--el-base-hover)}.hover\\:bg-accent-hover:hover{background-color:var(--el-accent-hover)}.hover\\:bg-base-hover:hover{background-color:var(--el-base-hover)}.hover\\:text-base-primary:hover{color:var(--el-base-primary)}.hover\\:opacity-50:hover{opacity:.5}.hover\\:opacity-100:hover{opacity:1}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:underline-offset-2:focus-visible{text-underline-offset:2px}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:border-accent-active:active{border-color:var(--el-accent-active)}.active\\:border-base-active:active{border-color:var(--el-base-active)}.active\\:bg-accent-active:active{background-color:var(--el-accent-active)}.active\\:bg-base-active:active{background-color:var(--el-base-active)}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.data-hidden\\:translate-x-full[data-shown=false]{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-hidden\\:-translate-y-4[data-shown=false]{--tw-translate-y:calc(16px * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-hidden\\:translate-y-2[data-shown=false]{--tw-translate-y:8px;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-hidden\\:scale-75[data-shown=false]{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-hidden\\:scale-90[data-shown=false]{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-hidden\\:scale-100[data-shown=false]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-hidden\\:opacity-0[data-shown=false]{opacity:0}.data-highlighted\\:bg-base-active[data-highlighted]{background-color:var(--el-base-active)}.overlay{inset:var(--el-overlay-padding);right:calc(var(--el-overlay-padding) + var(--removed-body-scroll-bar-size,0px));position:absolute}.focus-ring{--tw-ring-color:var(--el-accent);--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--el-base)}.focus-ring:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);--tw-outline-style:none;outline-style:none}[data-variant=compact].sheet{border-radius:var(--el-sheet-radius);width:100%;max-width:400px;height:calc(100% - 80px);max-height:550px}[data-variant=expanded].sheet{border-radius:var(--el-sheet-radius);width:100%;max-width:600px;height:100%;max-height:calc(100% - 80px)}[data-variant=fullscreen].sheet{width:100%;max-width:100dvw;height:100%;max-height:100dvh;margin:calc(-1 * var(--el-overlay-padding));width:calc(100% + 2 * var(--el-overlay-padding));height:calc(100% + 2 * var(--el-overlay-padding));border-radius:0;padding-bottom:24px;bottom:0}.animate-text{background-image:linear-gradient(75deg, var(--el-base-primary), var(--el-base-subtle), var(--el-base-primary), var(--el-base-subtle));color:#0000;background-size:300% 100%;-webkit-background-clip:text;background-clip:text;animation:2s linear infinite TextAnimation}@keyframes TextAnimation{0%{background-position:0 0}to{background-position:100% 0}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.terms h6{font-size:12px;line-height:var(--tw-leading,16px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}.terms h5{font-size:14px;line-height:var(--tw-leading,20px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}.terms h4{font-size:16px;line-height:var(--tw-leading,24px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}.terms h3{font-size:18px;line-height:var(--tw-leading,26px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}.terms h2{font-size:20px;line-height:var(--tw-leading,28px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}.terms h1{font-size:24px;line-height:var(--tw-leading,30px);--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--el-base-primary)}}.dev-host,:host{--el-audio-tag:293 53% 52%;pointer-events:none;z-index:1000;font-size:16px;line-height:var(--tw-leading,24px);color:var(--el-base-primary);scrollbar-color:#e5e7eb transparent;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;position:fixed;inset:0}:is(.dev-host,:host) button{margin:0}.markdown{text-autospace:normal;text-spacing-trim:trim-start}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{word-break:auto-phrase}.tok-comment,.tok-meta{color:#6a737d}.tok-keyword{color:#d73a49}.tok-atom,.tok-bool,.tok-literal,.tok-number{color:#005cc5}.tok-string,.tok-string2{color:#032f62}.tok-variableName{color:#24292e}.tok-variableName.tok-definition{color:#6f42c1}.tok-variableName.tok-local{color:#24292e}.tok-variableName2,.tok-macroName,.tok-typeName,.tok-namespace,.tok-className{color:#6f42c1}.tok-propertyName{color:#24292e}.tok-propertyName.tok-definition{color:#005cc5}.tok-labelName{color:#22863a}.tok-url,.tok-link{color:#032f62;text-decoration:underline}.tok-operator{color:#d73a49}.tok-punctuation{color:#24292e}.tok-invalid{color:#b31d28}.tok-deleted{color:#b31d28;background-color:#ffeef0}.tok-inserted{color:#22863a;background-color:#f0fff4}.tok-heading{color:#005cc5;font-weight:700}.tok-emphasis{color:#24292e;font-style:italic}.tok-strong{color:#24292e;font-weight:700}.tok-strikethrough{text-decoration:line-through}.tok-monospace{color:#005cc5}.tok-processingInstruction,[data-syntax-theme=dark] .tok-comment,[data-syntax-theme=dark] .tok-meta{color:#6a737d}[data-syntax-theme=dark] .tok-keyword{color:#f97583}[data-syntax-theme=dark] .tok-atom,[data-syntax-theme=dark] .tok-bool,[data-syntax-theme=dark] .tok-literal,[data-syntax-theme=dark] .tok-number,[data-syntax-theme=dark] .tok-propertyName.tok-definition{color:#79b8ff}[data-syntax-theme=dark] .tok-string,[data-syntax-theme=dark] .tok-string2{color:#9ecbff}[data-syntax-theme=dark] .tok-url,[data-syntax-theme=dark] .tok-link{color:#dbedff}[data-syntax-theme=dark] .tok-variableName,[data-syntax-theme=dark] .tok-variableName.tok-local,[data-syntax-theme=dark] .tok-propertyName,[data-syntax-theme=dark] .tok-emphasis,[data-syntax-theme=dark] .tok-strong{color:#e1e4e8}[data-syntax-theme=dark] .tok-variableName.tok-definition,[data-syntax-theme=dark] .tok-variableName2,[data-syntax-theme=dark] .tok-macroName,[data-syntax-theme=dark] .tok-typeName,[data-syntax-theme=dark] .tok-namespace,[data-syntax-theme=dark] .tok-className{color:#b392f0}[data-syntax-theme=dark] .tok-labelName{color:#85e89d}[data-syntax-theme=dark] .tok-invalid{color:#fdaeb7}[data-syntax-theme=dark] .tok-deleted{color:#fdaeb7;background-color:#86181d}[data-syntax-theme=dark] .tok-inserted{color:#85e89d;background-color:#144620}[data-syntax-theme=dark] .tok-heading{color:#79b8ff}[data-syntax-theme=dark] .tok-operator{color:#f97583}[data-syntax-theme=dark] .tok-punctuation{color:#e1e4e8}[data-syntax-theme=dark] .tok-monospace{color:#79b8ff}[data-syntax-theme=dark] .tok-processingInstruction{color:#6a737d}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}`;function Ch(e,t){Th(e)&&(e=`100%`);let n=Eh(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(e=t===360?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t)),e)}function wh(e){return Math.min(1,Math.max(0,e))}function Th(e){return typeof e==`string`&&e.indexOf(`.`)!==-1&&parseFloat(e)===1}function Eh(e){return typeof e==`string`&&e.indexOf(`%`)!==-1}function Dh(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Oh(e){return Number(e)<=1?`${Number(e)*100}%`:e}function kh(e){return e.length===1?`0`+e:String(e)}function Ah(e,t,n){return{r:Ch(e,255)*255,g:Ch(t,255)*255,b:Ch(n,255)*255}}function jh(e,t,n){e=Ch(e,255),t=Ch(t,255),n=Ch(n,255);let r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=0,s=(r+i)/2;if(r===i)o=0,a=0;else{let c=r-i;switch(o=s>.5?c/(2-r-i):c/(r+i),r){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4;break;default:break}a/=6}return{h:a,s:o,l:s}}function Mh(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Nh(e,t,n){let r,i,a;if(e=Ch(e,360),t=Ch(t,100),n=Ch(n,100),t===0)i=n,a=n,r=n;else{let o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=Mh(s,o,e+1/3),i=Mh(s,o,e),a=Mh(s,o,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function Ph(e,t,n){e=Ch(e,255),t=Ch(t,255),n=Ch(n,255);let r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=r,s=r-i,c=r===0?0:s/r;if(r===i)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4;break;default:break}a/=6}return{h:a,s:c,v:o}}function Fh(e,t,n){e=Ch(e,360)*6,t=Ch(t,100),n=Ch(n,100);let r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6,l=[n,o,a,a,s,n][c],u=[s,n,n,o,a,a][c],d=[a,a,s,n,n,o][c];return{r:l*255,g:u*255,b:d*255}}function Ih(e,t,n,r){let i=[kh(Math.round(e).toString(16)),kh(Math.round(t).toString(16)),kh(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(``)}function Lh(e,t,n,r,i){let a=[kh(Math.round(e).toString(16)),kh(Math.round(t).toString(16)),kh(Math.round(n).toString(16)),kh(Bh(r))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join(``)}function Rh(e,t,n,r){let i=e/100,a=t/100,o=n/100,s=r/100;return{r:255*(1-i)*(1-s),g:255*(1-a)*(1-s),b:255*(1-o)*(1-s)}}function zh(e,t,n){let r=1-e/255,i=1-t/255,a=1-n/255,o=Math.min(r,i,a);return o===1?(r=0,i=0,a=0):(r=(r-o)/(1-o)*100,i=(i-o)/(1-o)*100,a=(a-o)/(1-o)*100),o*=100,{c:Math.round(r),m:Math.round(i),y:Math.round(a),k:Math.round(o)}}function Bh(e){return Math.round(parseFloat(e)*255).toString(16)}function Vh(e){return Hh(e)/255}function Hh(e){return parseInt(e,16)}function Uh(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Wh={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,goldenrod:`#daa520`,gold:`#ffd700`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavenderblush:`#fff0f5`,lavender:`#e6e6fa`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`};function Gh(e){let t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e==`string`&&(e=Xh(e)),typeof e==`object`&&(Zh(e.r)&&Zh(e.g)&&Zh(e.b)?(t=Ah(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):Zh(e.h)&&Zh(e.s)&&Zh(e.v)?(r=Oh(e.s),i=Oh(e.v),t=Fh(e.h,r,i),o=!0,s=`hsv`):Zh(e.h)&&Zh(e.s)&&Zh(e.l)?(r=Oh(e.s),a=Oh(e.l),t=Nh(e.h,r,a),o=!0,s=`hsl`):Zh(e.c)&&Zh(e.m)&&Zh(e.y)&&Zh(e.k)&&(t=Rh(e.c,e.m,e.y,e.k),o=!0,s=`cmyk`),Object.prototype.hasOwnProperty.call(e,`a`)&&(n=e.a)),n=Dh(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Kh=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,qh=`[\\s|\\(]+(`+Kh+`)[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`,Jh=`[\\s|\\(]+(`+Kh+`)[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`,Yh={CSS_UNIT:new RegExp(Kh),rgb:RegExp(`rgb`+qh),rgba:RegExp(`rgba`+Jh),hsl:RegExp(`hsl`+qh),hsla:RegExp(`hsla`+Jh),hsv:RegExp(`hsv`+qh),hsva:RegExp(`hsva`+Jh),cmyk:RegExp(`cmyk`+Jh),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Xh(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(Wh[e])e=Wh[e],t=!0;else if(e===`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};let n=Yh.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Yh.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Yh.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Yh.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Yh.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Yh.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Yh.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Yh.hex8.exec(e),n?{r:Hh(n[1]),g:Hh(n[2]),b:Hh(n[3]),a:Vh(n[4]),format:t?`name`:`hex8`}:(n=Yh.hex6.exec(e),n?{r:Hh(n[1]),g:Hh(n[2]),b:Hh(n[3]),format:t?`name`:`hex`}:(n=Yh.hex4.exec(e),n?{r:Hh(n[1]+n[1]),g:Hh(n[2]+n[2]),b:Hh(n[3]+n[3]),a:Vh(n[4]+n[4]),format:t?`name`:`hex8`}:(n=Yh.hex3.exec(e),n?{r:Hh(n[1]+n[1]),g:Hh(n[2]+n[2]),b:Hh(n[3]+n[3]),format:t?`name`:`hex`}:!1))))))))))}function Zh(e){return typeof e==`number`?!Number.isNaN(e):Yh.CSS_UNIT.test(e)}var Qh=class e{constructor(t=``,n={}){if(t instanceof e)return t;typeof t==`number`&&(t=Uh(t)),this.originalInput=t;let r=Gh(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){let e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){let e=this.toRgb(),t,n,r,i=e.r/255,a=e.g/255,o=e.b/255;return t=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,n=a<=.03928?a/12.92:((a+.055)/1.055)**2.4,r=o<=.03928?o/12.92:((o+.055)/1.055)**2.4,.2126*t+.7152*n+.0722*r}getAlpha(){return this.a}setAlpha(e){return this.a=Dh(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){let{s:e}=this.toHsl();return e===0}toHsv(){let e=Ph(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){let e=Ph(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.v*100);return this.a===1?`hsv(${t}, ${n}%, ${r}%)`:`hsva(${t}, ${n}%, ${r}%, ${this.roundA})`}toHsl(){let e=jh(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){let e=jh(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.l*100);return this.a===1?`hsl(${t}, ${n}%, ${r}%)`:`hsla(${t}, ${n}%, ${r}%, ${this.roundA})`}toHex(e=!1){return Ih(this.r,this.g,this.b,e)}toHexString(e=!1){return`#`+this.toHex(e)}toHex8(e=!1){return Lh(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return`#`+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){let e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?`rgb(${e}, ${t}, ${n})`:`rgba(${e}, ${t}, ${n}, ${this.roundA})`}toPercentageRgb(){let e=e=>`${Math.round(Ch(e,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){let e=e=>Math.round(Ch(e,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...zh(this.r,this.g,this.b)}}toCmykString(){let{c:e,m:t,y:n,k:r}=zh(this.r,this.g,this.b);return`cmyk(${e}, ${t}, ${n}, ${r})`}toName(){if(this.a===0)return`transparent`;if(this.a<1)return!1;let e=`#`+Ih(this.r,this.g,this.b,!1);for(let[t,n]of Object.entries(Wh))if(e===n)return t;return!1}toString(e){let t=!!e;e??=this.format;let n=!1,r=this.a<1&&this.a>=0;return!t&&r&&(e.startsWith(`hex`)||e===`name`)?e===`name`&&this.a===0?this.toName():this.toRgbString():(e===`rgb`&&(n=this.toRgbString()),e===`prgb`&&(n=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(n=this.toHexString()),e===`hex3`&&(n=this.toHexString(!0)),e===`hex4`&&(n=this.toHex8String(!0)),e===`hex8`&&(n=this.toHex8String()),e===`name`&&(n=this.toName()),e===`hsl`&&(n=this.toHslString()),e===`hsv`&&(n=this.toHsvString()),e===`cmyk`&&(n=this.toCmykString()),n||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new e(this.toString())}lighten(t=10){let n=this.toHsl();return n.l+=t/100,n.l=wh(n.l),new e(n)}brighten(t=10){let n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)}darken(t=10){let n=this.toHsl();return n.l-=t/100,n.l=wh(n.l),new e(n)}tint(e=10){return this.mix(`white`,e)}shade(e=10){return this.mix(`black`,e)}desaturate(t=10){let n=this.toHsl();return n.s-=t/100,n.s=wh(n.s),new e(n)}saturate(t=10){let n=this.toHsl();return n.s+=t/100,n.s=wh(n.s),new e(n)}greyscale(){return this.desaturate(100)}spin(t){let n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)}mix(t,n=50){let r=this.toRgb(),i=new e(t).toRgb(),a=n/100;return new e({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})}analogous(t=6,n=30){let r=this.toHsl(),i=360/n,a=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(new e(r));return a}complement(){let t=this.toHsl();return t.h=(t.h+180)%360,new e(t)}monochromatic(t=6){let n=this.toHsv(),{h:r}=n,{s:i}=n,{v:a}=n,o=[],s=1/t;for(;t--;)o.push(new e({h:r,s:i,v:a})),a=(a+s)%1;return o}splitcomplement(){let t=this.toHsl(),{h:n}=t;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){let n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){let n=this.toHsl(),{h:r}=n,i=[this],a=360/t;for(let o=1;o<t;o++)i.push(new e({h:(r+o*a)%360,s:n.s,l:n.l}));return i}equals(t){let n=new e(t);return this.format===`cmyk`||n.format===`cmyk`?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}},$h=[`tiny`,`compact`,`full`];function eg(e){return $h.includes(e)?e:$h[0]}var tg=[`top-left`,`top`,`top-right`,`bottom-left`,`bottom`,`bottom-right`];function ng(e){return tg.includes(e)?e:`bottom-right`}var rg={main_label:`Need help?`,start_call:`Start a call`,start_chat:`Message`,send_message:`Send`,new_call:`New call`,end_call:`End`,mute_microphone:`Mute microphone`,text_mode:`Switch to text mode`,voice_mode:`Switch to voice mode`,switched_to_text_mode:`Switched to text mode`,switched_to_voice_mode:`Switched to voice mode`,change_language:`Change language`,collapse:`Collapse`,expand:`Expand`,copied:`Copied!`,accept_terms:`Accept`,dismiss_terms:`Cancel`,listening_status:`Listening`,speaking_status:`Talk to interrupt`,connecting_status:`Connecting`,chatting_status:`Chatting with AI Agent`,input_label:`Text message input`,input_placeholder:`Send a message...`,input_placeholder_text_only:`Send a message...`,input_placeholder_new_conversation:`Start a new conversation`,user_ended_conversation:`You ended the conversation`,agent_ended_conversation:`The agent ended the conversation`,conversation_id:`ID`,error_occurred:`An error occurred`,copy_id:`Copy ID`,initiate_feedback:`How was this conversation?`,request_follow_up_feedback:`Tell us more`,thanks_for_feedback:`Thank you for your feedback!`,thanks_for_feedback_details:`Your feedback helps us improve our service and better support you in the future.`,follow_up_feedback_placeholder:`Tell us more about your experience...`,submit:`Submit`,go_back:`Go back`,copy:`Copy`,download:`Download`,wrap:`Wrap`,agent_working:`Working...`,agent_done:`Completed`,agent_error:`Error occurred`,attach_file:`Attach file`,remove_file:`Remove file`,file_upload_error:`Failed to upload file.`,file_type_unsupported:`Unsupported file type. Accepted types:`,file_too_large:`File size exceeds the maximum limit.`,file_limit_reached:`Maximum number of files for this conversation reached.`,typing_indicator:`Agent is typing ...`},ig=Object.keys(rg),ag={base:`#ffffff`,base_hover:`#f9fafb`,base_active:`#f3f4f6`,base_border:`#e5e7eb`,base_subtle:`#6b7280`,base_primary:`#000000`,base_error:`#ef4444`,accent:`#000000`,accent_hover:`#1f2937`,accent_active:`#374151`,accent_border:`#4b5563`,accent_subtle:`#6b7280`,accent_primary:`#ffffff`,overlay_padding:32,button_radius:18,input_radius:10,bubble_radius:15,sheet_radius:`calc(var(--el-button-radius) + 6px)`,compact_sheet_radius:`calc(var(--el-button-radius) + 12px)`,dropdown_sheet_radius:`calc(var(--el-input-radius) + 6px)`},og=Object.keys(ag);function sg(e=`us`){switch(e){case`eu-residency`:case`in-residency`:case`us`:case`global`:return e;default:return console.warn(`[ConversationalAI] Invalid server-location: ${e}. Defaulting to "us"`),`us`}}function cg(e){let t=hf(e);if(t==null)throw Error(`${e.displayName} cannot be used outside of provider`);return t}var lg=Fd(null);function ug({value:e,children:t}){let n=mf(()=>Object.fromEntries(xh.map(t=>[t,Vp(e[t])])),[]);return xh.forEach(t=>{n[t].value=e[t]}),R(lg.Provider,{value:n,children:t})}function dg(){return cg(lg)}function fg(e){return dg()[e]}var pg=Fd(null);function mg({children:e}){let t=fg(`server-location`),n=mf(()=>{let e=Kp(()=>sg(t.value)),n={us:`https://api.us.elevenlabs.io`,"eu-residency":`https://api.eu.residency.elevenlabs.io`,"in-residency":`https://api.in.residency.elevenlabs.io`,global:`https://api.elevenlabs.io`},r={us:`wss://api.us.elevenlabs.io`,"eu-residency":`wss://api.eu.residency.elevenlabs.io`,"in-residency":`wss://api.in.residency.elevenlabs.io`,global:`wss://api.elevenlabs.io`};return{location:e,serverUrl:Kp(()=>n[e.value]),webSocketUrl:Kp(()=>r[e.value])}},[]);return R(pg.Provider,{value:n,children:e})}function hg(){return cg(pg)}var gg={en:{name:`English`,flagCode:`us`,languageCode:`en`},zh:{name:`中文`,flagCode:`cn`,languageCode:`zh`},es:{name:`Español`,flagCode:`es`,languageCode:`es`},hi:{name:`हिन्दी`,flagCode:`in`,languageCode:`hi`},pt:{name:`Português (Portugal)`,flagCode:`pt`,languageCode:`pt`},"pt-br":{name:`Português (Brasil)`,flagCode:`br`,languageCode:`pt-br`},fr:{name:`Français`,flagCode:`fr`,languageCode:`fr`},de:{name:`Deutsch`,flagCode:`de`,languageCode:`de`},ja:{name:`日本語`,flagCode:`jp`,languageCode:`ja`},ar:{name:`العربية`,flagCode:`ae`,languageCode:`ar`},ru:{name:`Русский`,flagCode:`ru`,languageCode:`ru`},ko:{name:`한국어`,flagCode:`kr`,languageCode:`ko`},id:{name:`Bahasa Indonesia`,flagCode:`id`,languageCode:`id`},it:{name:`Italiano`,flagCode:`it`,languageCode:`it`},nl:{name:`Nederlands`,flagCode:`nl`,languageCode:`nl`},tr:{name:`Türkçe`,flagCode:`tr`,languageCode:`tr`},pl:{name:`Polski`,flagCode:`pl`,languageCode:`pl`},sv:{name:`Svenska`,flagCode:`se`,languageCode:`sv`},ms:{name:`Bahasa Melayu`,flagCode:`my`,languageCode:`ms`},ro:{name:`Română`,flagCode:`ro`,languageCode:`ro`},uk:{name:`Українська`,flagCode:`ua`,languageCode:`uk`},el:{name:`Ελληνικά`,flagCode:`gr`,languageCode:`el`},cs:{name:`Čeština`,flagCode:`cz`,languageCode:`cs`},da:{name:`Dansk`,flagCode:`dk`,languageCode:`da`},fi:{name:`Suomi`,flagCode:`fi`,languageCode:`fi`},bg:{name:`Български`,flagCode:`bg`,languageCode:`bg`},hr:{name:`Hrvatski`,flagCode:`hr`,languageCode:`hr`},sk:{name:`Slovenčina`,flagCode:`sk`,languageCode:`sk`},ta:{name:`தமிழ்`,flagCode:`in`,languageCode:`ta`},hu:{name:`Magyar`,flagCode:`hu`,languageCode:`hu`},no:{name:`Norsk`,flagCode:`no`,languageCode:`no`},vi:{name:`Tiếng Việt`,flagCode:`vn`,languageCode:`vi`},tl:{name:`Filipino`,flagCode:`ph`,languageCode:`tl`},af:{name:`Afrikaans`,flagCode:`za`,languageCode:`af`},hy:{name:`Հայերեն`,flagCode:`am`,languageCode:`hy`},as:{name:`অসমীয়া`,flagCode:`in`,languageCode:`as`},az:{name:`Azərbaycan`,flagCode:`az`,languageCode:`az`},be:{name:`Беларуская`,flagCode:`by`,languageCode:`be`},bn:{name:`বাংলা`,flagCode:`in`,languageCode:`bn`},bs:{name:`Bosanski`,flagCode:`ba`,languageCode:`bs`},ca:{name:`Català`,flagCode:`es-ct`,languageCode:`ca`},et:{name:`Eesti`,flagCode:`ee`,languageCode:`et`},gl:{name:`Galego`,flagCode:`es-ga`,languageCode:`gl`},ka:{name:`ქართული`,flagCode:`ge`,languageCode:`ka`},gu:{name:`ગુજરાતી`,flagCode:`in`,languageCode:`gu`},ha:{name:`Hausa`,flagCode:`ng`,languageCode:`ha`},he:{name:`עברית`,flagCode:`il`,languageCode:`he`},is:{name:`Íslenska`,flagCode:`is`,languageCode:`is`},ga:{name:`Gaeilge`,flagCode:`ie`,languageCode:`ga`},jv:{name:`Basa Jawa`,flagCode:`id`,languageCode:`jv`},kn:{name:`ಕನ್ನಡ`,flagCode:`in`,languageCode:`kn`},kk:{name:`Қазақша`,flagCode:`kz`,languageCode:`kk`},ky:{name:`Кыргызча`,flagCode:`kg`,languageCode:`ky`},lv:{name:`Latviešu`,flagCode:`lv`,languageCode:`lv`},lt:{name:`Lietuvių`,flagCode:`lt`,languageCode:`lt`},lb:{name:`Lëtzebuergesch`,flagCode:`lu`,languageCode:`lb`},mk:{name:`Македонски`,flagCode:`mk`,languageCode:`mk`},ml:{name:`മലയാളം`,flagCode:`in`,languageCode:`ml`},mr:{name:`मराठी`,flagCode:`in`,languageCode:`mr`},ne:{name:`नेपाली`,flagCode:`np`,languageCode:`ne`},ps:{name:`پښتو`,flagCode:`af`,languageCode:`ps`},fa:{name:`فارسی`,flagCode:`ir`,languageCode:`fa`},pa:{name:`ਪੰਜਾਬੀ`,flagCode:`in`,languageCode:`pa`},sr:{name:`Српски`,flagCode:`rs`,languageCode:`sr`},sd:{name:`سنڌي`,flagCode:`in`,languageCode:`sd`},sl:{name:`Slovenščina`,flagCode:`si`,languageCode:`sl`},so:{name:`Soomaali`,flagCode:`so`,languageCode:`so`},sw:{name:`Kiswahili`,flagCode:`ke`,languageCode:`sw`},te:{name:`తెలుగు`,flagCode:`in`,languageCode:`te`},th:{name:`ไทย`,flagCode:`th`,languageCode:`th`},ur:{name:`اردو`,flagCode:`pk`,languageCode:`ur`},cy:{name:`Cymraeg`,flagCode:`gb-wls`,languageCode:`cy`}};function _g(e){return Object.keys(gg).includes(e??``)}var vg=`xi:convai-widget-last-used-language`,yg=Fd(null);function bg(){try{let e=localStorage.getItem(vg);if(e&&_g(e))return e}catch{}}function xg(){try{let e=[];for(let t of navigator.languages){let n=t.toLowerCase();e.push(n);let r=n.split(`-`)[0];r!==n&&e.push(r)}return e}catch(e){return console.warn(`[ConversationalAI] Could not read navigator.languages:`,e),[]}}function Sg({languageAttribute:e,supported:t,defaultLanguage:n}){let r=new Set([...t,n]),i=[e,bg(),...xg()];for(let e of i)if(e&&r.has(e))return e;return n}function Cg(e){try{localStorage.setItem(vg,e)}catch{}}function wg({children:e}){let t=fb(),n=fg(`language`),r=fg(`override-language`),i=L(()=>(t.value.supported_language_overrides??[]).filter(_g)),a=n.peek(),o=t.peek(),s=(o.supported_language_overrides??[]).filter(_g),c=cm(Sg({languageAttribute:a&&_g(a)?a:void 0,supported:s,defaultLanguage:o.language})),l=L(()=>i.value.map(e=>gg[e]).sort((e,t)=>e.name.localeCompare(t.name))),u=mf(()=>({language:Kp(()=>_g(r.value)?gg[r.value]:_g(c.value)&&i.value.includes(c.value)?gg[c.value]:gg[t.value.language]),setLanguage:e=>{c.value=e,Cg(e)},options:l,showPicker:Kp(()=>l.value.length>0)}),[]);return R(yg.Provider,{value:u,children:e})}function Tg(){return cg(yg)}var Eg=Fd(null);function Dg({children:e}){let{language:t}=Tg(),n=fg(`override-prompt`),r=fg(`override-llm`),i=fg(`override-speed`),a=fg(`override-stability`),o=fg(`override-similarity-boost`),s=fg(`override-first-message`),c=fg(`override-voice-id`),l=fg(`override-text-only`),u=fg(`user-id`),d=L(()=>({agent:{prompt:{prompt:n.value,llm:r.value},firstMessage:s.value,language:t.value.languageCode},tts:{voiceId:c.value,speed:i.value?parseFloat(i.value):void 0,stability:a.value?parseFloat(a.value):void 0,similarityBoost:o.value?parseFloat(o.value):void 0},conversation:{textOnly:bh(l.value)??void 0}})),f=fg(`dynamic-variables`),p=L(()=>{if(f.value)try{return JSON.parse(f.value)}catch(e){console.error(`[ConversationalAI] Cannot parse dynamic-variables: ${e?.message}`)}}),m=fg(`worklet-path-raw-audio-processor`),h=fg(`worklet-path-audio-concat-processor`),g=fg(`worklet-path-libsamplerate`),{webSocketUrl:_}=hg(),v=fg(`agent-id`),y=fg(`signed-url`),b=fg(`environment`),x=pb(),S=xb(),C=L(()=>{let e=S.value,t={dynamicVariables:p.value,overrides:d.value,connectionDelay:{default:300},textOnly:x.value,userId:u.value||void 0,environment:b.value||void 0,libsampleratePath:g.value,workletPaths:{rawAudioProcessor:m.value,audioConcatProcessor:h.value}};return v.value?e?{agentId:v.value,origin:_.value,connectionType:`webrtc`,...t}:{agentId:v.value,origin:_.value,connectionType:`websocket`,...t}:y.value?{signedUrl:y.value,connectionType:`websocket`,...t}:(console.error(`[ConversationalAI] Either agent-id or signed-url is required`),null)});return C.value?R(Eg.Provider,{value:C,children:e}):null}function Og(){return cg(Eg)}var kg=`5.2.0`;function Ag(e,t){return new Promise(n=>setTimeout(n,e,t))}function jg(){return new Promise(e=>{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(null)})}function Mg(e,t=1/0){let{requestIdleCallback:n}=window;return n?new Promise(e=>n.call(window,()=>e(),{timeout:t})):Ag(Math.min(e,t))}function Ng(e){return!!e&&typeof e.then==`function`}function Pg(e,t){try{let n=e();Ng(n)?n.then(e=>t(!0,e),e=>t(!1,e)):t(!0,n)}catch(e){t(!1,e)}}async function Fg(e,t,n=16){let r=Array(e.length),i=Date.now();for(let a=0;a<e.length;++a){r[a]=t(e[a],a);let o=Date.now();o>=i+n&&(i=o,await jg())}return r}function Ig(e){return e.then(void 0,()=>void 0),e}function Lg(e,t){for(let n=0,r=e.length;n<r;++n)if(e[n]===t)return!0;return!1}function Rg(e,t){return!Lg(e,t)}function zg(e){return parseInt(e)}function Bg(e){return parseFloat(e)}function Vg(e,t){return typeof e==`number`&&isNaN(e)?t:e}function Hg(e){return e.reduce((e,t)=>e+ +!!t,0)}function Ug(e,t=1){if(Math.abs(t)>=1)return Math.round(e/t)*t;{let n=1/t;return Math.round(e*n)/n}}function Wg(e){let t=`Unexpected syntax '${e}'`,n=/^\s*([a-z-]*)(.*)$/i.exec(e),r=n[1]||void 0,i={},a=/([.:#][\w-]+|\[.+?\])/gi,o=(e,t)=>{i[e]=i[e]||[],i[e].push(t)};for(;;){let e=a.exec(n[2]);if(!e)break;let r=e[0];switch(r[0]){case`.`:o(`class`,r.slice(1));break;case`#`:o(`id`,r.slice(1));break;case`[`:{let e=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(r);if(e)o(e[1],e[4]??e[5]??``);else throw Error(t);break}default:throw Error(t)}}return[r,i]}function Gg(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r>127)return new TextEncoder().encode(e);t[n]=r}return t}function Kg(e,t){let n=e[0]>>>16,r=e[0]&65535,i=e[1]>>>16,a=e[1]&65535,o=t[0]>>>16,s=t[0]&65535,c=t[1]>>>16,l=t[1]&65535,u=0,d=0,f=0,p=0;p+=a+l,f+=p>>>16,p&=65535,f+=i+c,d+=f>>>16,f&=65535,d+=r+s,u+=d>>>16,d&=65535,u+=n+o,u&=65535,e[0]=u<<16|d,e[1]=f<<16|p}function qg(e,t){let n=e[0]>>>16,r=e[0]&65535,i=e[1]>>>16,a=e[1]&65535,o=t[0]>>>16,s=t[0]&65535,c=t[1]>>>16,l=t[1]&65535,u=0,d=0,f=0,p=0;p+=a*l,f+=p>>>16,p&=65535,f+=i*l,d+=f>>>16,f&=65535,f+=a*c,d+=f>>>16,f&=65535,d+=r*l,u+=d>>>16,d&=65535,d+=i*c,u+=d>>>16,d&=65535,d+=a*s,u+=d>>>16,d&=65535,u+=n*l+r*c+i*s+a*o,u&=65535,e[0]=u<<16|d,e[1]=f<<16|p}function Jg(e,t){let n=e[0];t%=64,t===32?(e[0]=e[1],e[1]=n):t<32?(e[0]=n<<t|e[1]>>>32-t,e[1]=e[1]<<t|n>>>32-t):(t-=32,e[0]=e[1]<<t|n>>>32-t,e[1]=n<<t|e[1]>>>32-t)}function Yg(e,t){t%=64,t!==0&&(t<32?(e[0]=e[1]>>>32-t,e[1]<<=t):(e[0]=e[1]<<t-32,e[1]=0))}function Xg(e,t){e[0]^=t[0],e[1]^=t[1]}var Zg=[4283543511,3981806797],Qg=[3301882366,444984403];function $g(e){let t=[0,e[0]>>>1];Xg(e,t),qg(e,Zg),t[1]=e[0]>>>1,Xg(e,t),qg(e,Qg),t[1]=e[0]>>>1,Xg(e,t)}var e_=[2277735313,289559509],t_=[1291169091,658871167],n_=[0,5],r_=[0,1390208809],i_=[0,944331445];function a_(e,t){let n=Gg(e);t||=0;let r=[0,n.length],i=r[1]%16,a=r[1]-i,o=[0,t],s=[0,t],c=[0,0],l=[0,0],u;for(u=0;u<a;u+=16)c[0]=n[u+4]|n[u+5]<<8|n[u+6]<<16|n[u+7]<<24,c[1]=n[u]|n[u+1]<<8|n[u+2]<<16|n[u+3]<<24,l[0]=n[u+12]|n[u+13]<<8|n[u+14]<<16|n[u+15]<<24,l[1]=n[u+8]|n[u+9]<<8|n[u+10]<<16|n[u+11]<<24,qg(c,e_),Jg(c,31),qg(c,t_),Xg(o,c),Jg(o,27),Kg(o,s),qg(o,n_),Kg(o,r_),qg(l,t_),Jg(l,33),qg(l,e_),Xg(s,l),Jg(s,31),Kg(s,o),qg(s,n_),Kg(s,i_);c[0]=0,c[1]=0,l[0]=0,l[1]=0;let d=[0,0];switch(i){case 15:d[1]=n[u+14],Yg(d,48),Xg(l,d);case 14:d[1]=n[u+13],Yg(d,40),Xg(l,d);case 13:d[1]=n[u+12],Yg(d,32),Xg(l,d);case 12:d[1]=n[u+11],Yg(d,24),Xg(l,d);case 11:d[1]=n[u+10],Yg(d,16),Xg(l,d);case 10:d[1]=n[u+9],Yg(d,8),Xg(l,d);case 9:d[1]=n[u+8],Xg(l,d),qg(l,t_),Jg(l,33),qg(l,e_),Xg(s,l);case 8:d[1]=n[u+7],Yg(d,56),Xg(c,d);case 7:d[1]=n[u+6],Yg(d,48),Xg(c,d);case 6:d[1]=n[u+5],Yg(d,40),Xg(c,d);case 5:d[1]=n[u+4],Yg(d,32),Xg(c,d);case 4:d[1]=n[u+3],Yg(d,24),Xg(c,d);case 3:d[1]=n[u+2],Yg(d,16),Xg(c,d);case 2:d[1]=n[u+1],Yg(d,8),Xg(c,d);case 1:d[1]=n[u],Xg(c,d),qg(c,e_),Jg(c,31),qg(c,t_),Xg(o,c)}return Xg(o,r),Xg(s,r),Kg(o,s),Kg(s,o),$g(o),$g(s),Kg(o,s),Kg(s,o),(`00000000`+(o[0]>>>0).toString(16)).slice(-8)+(`00000000`+(o[1]>>>0).toString(16)).slice(-8)+(`00000000`+(s[0]>>>0).toString(16)).slice(-8)+(`00000000`+(s[1]>>>0).toString(16)).slice(-8)}function o_(e){return{name:e.name,message:e.message,stack:e.stack?.split(`
|
|
271
271
|
`),...e}}function s_(e){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String(e))}function c_(e){return typeof e!=`function`}function l_(e,t){let n=Ig(new Promise(n=>{let r=Date.now();Pg(e.bind(null,t),(...e)=>{let t=Date.now()-r;if(!e[0])return n(()=>({error:e[1],duration:t}));let i=e[1];if(c_(i))return n(()=>({value:i,duration:t}));n(()=>new Promise(e=>{let n=Date.now();Pg(i,(...r)=>{let i=t+Date.now()-n;if(!r[0])return e({error:r[1],duration:i});e({value:r[1],duration:i})})}))})}));return function(){return n.then(e=>e())}}function u_(e,t,n,r){let i=Object.keys(e).filter(e=>Rg(n,e)),a=Ig(Fg(i,n=>l_(e[n],t),r));return async function(){let e=await Fg(await a,e=>Ig(e()),r),t=await Promise.all(e),n={};for(let e=0;e<i.length;++e)n[i[e]]=t[e];return n}}function d_(){let e=window,t=navigator;return Hg([`MSCSSMatrix`in e,`msSetImmediate`in e,`msIndexedDB`in e,`msMaxTouchPoints`in t,`msPointerEnabled`in t])>=4}function f_(){let e=window,t=navigator;return Hg([`msWriteProfilerMark`in e,`MSStream`in e,`msLaunchUri`in t,`msSaveBlob`in t])>=3&&!d_()}function p_(){let e=window,t=navigator;return Hg([`webkitPersistentStorage`in t,`webkitTemporaryStorage`in t,(t.vendor||``).indexOf(`Google`)===0,`webkitResolveLocalFileSystemURL`in e,`BatteryManager`in e,`webkitMediaStream`in e,`webkitSpeechGrammar`in e])>=5}function m_(){let e=window,t=navigator;return Hg([`ApplePayError`in e,`CSSPrimitiveValue`in e,`Counter`in e,t.vendor.indexOf(`Apple`)===0,`RGBColor`in e,`WebKitMediaKeys`in e])>=4}function h_(){let e=window,{HTMLElement:t,Document:n}=e;return Hg([`safari`in e,!(`ongestureend`in e),!(`TouchEvent`in e),!(`orientation`in e),t&&!(`autocapitalize`in t.prototype),n&&`pointerLockElement`in n.prototype])>=4}function g_(){let e=window;return s_(e.print)&&String(e.browser)===`[object WebPageNamespace]`}function __(){let e=window;return Hg([`buildID`in navigator,`MozAppearance`in(document.documentElement?.style??{}),`onmozfullscreenchange`in e,`mozInnerScreenX`in e,`CSSMozDocumentRule`in e,`CanvasCaptureMediaStream`in e])>=4}function v_(){let e=window,t=navigator,{CSS:n}=e;return Hg([`userActivation`in t,n.supports(`color`,`light-dark(#000, #fff)`),n.supports(`height`,`1lh`),`globalPrivacyControl`in t])>=3}function y_(){let{CSS:e}=window;return Hg([e.supports(`selector(::details-content)`),e.supports(`selector(::before::marker)`),e.supports(`selector(::after::marker)`),!(`locale`in CompositionEvent.prototype)])>=3}function b_(){let e=window;return Hg([!(`MediaSettingsRange`in e),`RTCEncodedAudioFrame`in e,``+e.Intl==`[object Intl]`,``+e.Reflect==`[object Reflect]`])>=3}function x_(){let e=window,{URLPattern:t}=e;return Hg([`union`in Set.prototype,`Iterator`in e,t&&`hasRegExpGroups`in t.prototype,`RGB8`in WebGLRenderingContext.prototype])>=3}function S_(){let e=window,t=document,{CSS:n,Promise:r,AudioContext:i}=e;return Hg([r&&`try`in r,`caretPositionFromPoint`in t,i&&`onerror`in i.prototype,n.supports(`ruby-align`,`space-around`)])>=3}function C_(){let e=window;return Hg([`DOMRectList`in e,`RTCPeerConnectionIceEvent`in e,`SVGGeometryElement`in e,`ontransitioncancel`in e])>=3}function w_(){let e=window,t=navigator,{CSS:n,HTMLButtonElement:r}=e;return Hg([!(`getStorageUpdates`in t),r&&`popover`in r.prototype,`CSSCounterStyleRule`in e,n.supports(`font-size-adjust: ex-height 0.5`),n.supports(`text-transform: full-width`)])>=4}function T_(){if(navigator.platform===`iPad`)return!0;let e=screen,t=e.width/e.height;return Hg([`MediaSource`in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}function E_(){let e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function D_(){let e=document;return(e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen).call(e)}function O_(){let e=p_(),t=__(),n=window,r=navigator,i=`connection`;return e?Hg([!(`SharedWorker`in n),r[i]&&`ontypechange`in r[i],!(`sinkId`in new Audio)])>=2:t?Hg([`onorientationchange`in n,`orientation`in n,/android/i.test(r.appVersion)])>=2:!1}function k_(){let e=navigator,t=window,n=Audio.prototype,{visualViewport:r}=t;return Hg([`srLatency`in n,`srChannelCount`in n,`devicePosture`in e,r&&`segments`in r,`getTextInformation`in Image.prototype])>=3}function A_(){return N_()?-4:j_()}function j_(){let e=window,t=e.OfflineAudioContext||e.webkitOfflineAudioContext;if(!t)return-2;if(M_())return-1;let n=new t(1,5e3,44100),r=n.createOscillator();r.type=`triangle`,r.frequency.value=1e4;let i=n.createDynamicsCompressor();i.threshold.value=-50,i.knee.value=40,i.ratio.value=12,i.attack.value=0,i.release.value=.25,r.connect(i),i.connect(n.destination),r.start(0);let[a,o]=P_(n),s=Ig(a.then(e=>F_(e.getChannelData(0).subarray(4500)),e=>{if(e.name===`timeout`||e.name===`suspended`)return-3;throw e}));return()=>(o(),s)}function M_(){return m_()&&!h_()&&!C_()}function N_(){return m_()&&w_()&&g_()||p_()&&k_()&&x_()}function P_(e){let t=()=>void 0;return[new Promise((n,r)=>{let i=!1,a=0,o=0;e.oncomplete=e=>n(e.renderedBuffer);let s=()=>{setTimeout(()=>r(I_(`timeout`)),Math.min(500,o+5e3-Date.now()))},c=()=>{try{let t=e.startRendering();switch(Ng(t)&&Ig(t),e.state){case`running`:o=Date.now(),i&&s();break;case`suspended`:document.hidden||a++,i&&a>=3?r(I_(`suspended`)):setTimeout(c,500);break}}catch(e){r(e)}};c(),t=()=>{i||(i=!0,o>0&&s())}}),t]}function F_(e){let t=0;for(let n=0;n<e.length;++n)t+=Math.abs(e[n]);return t}function I_(e){let t=Error(e);return t.name=e,t}async function L_(e,t,n=50){var r;let i=document;for(;!i.body;)await Ag(n);let a=i.createElement(`iframe`);try{for(await new Promise((e,n)=>{let r=!1,o=()=>{r=!0,e()};a.onload=o,a.onerror=e=>{r=!0,n(e)};let{style:s}=a;s.setProperty(`display`,`block`,`important`),s.position=`absolute`,s.top=`0`,s.left=`0`,s.visibility=`hidden`,t&&`srcdoc`in a?a.srcdoc=t:a.src=`about:blank`,i.body.appendChild(a);let c=()=>{r||(a.contentWindow?.document?.readyState===`complete`?o():setTimeout(c,10))};c()});!a.contentWindow?.document?.body;)await Ag(n);return await e(a,a.contentWindow)}finally{(r=a.parentNode)==null||r.removeChild(a)}}function R_(e){let[t,n]=Wg(e),r=document.createElement(t??`div`);for(let e of Object.keys(n)){let t=n[e].join(` `);e===`style`?z_(r.style,t):r.setAttribute(e,t)}return r}function z_(e,t){for(let n of t.split(`;`)){let t=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(n);if(t){let[,n,r,,i]=t;e.setProperty(n,r,i||``)}}}function B_(){let e=window;for(;;){let t=e.parent;if(!t||t===e)return!1;try{if(t.location.origin!==e.location.origin)return!0}catch(e){if(e instanceof Error&&e.name===`SecurityError`)return!0;throw e}e=t}}var V_=`mmMwWLliI0O&1`,H_=`48px`,U_=[`monospace`,`sans-serif`,`serif`],W_=`sans-serif-thin.ARNO PRO.Agency FB.Arabic Typesetting.Arial Unicode MS.AvantGarde Bk BT.BankGothic Md BT.Batang.Bitstream Vera Sans Mono.Calibri.Century.Century Gothic.Clarendon.EUROSTILE.Franklin Gothic.Futura Bk BT.Futura Md BT.GOTHAM.Gill Sans.HELV.Haettenschweiler.Helvetica Neue.Humanst521 BT.Leelawadee.Letter Gothic.Levenim MT.Lucida Bright.Lucida Sans.Menlo.MS Mincho.MS Outlook.MS Reference Specialty.MS UI Gothic.MT Extra.MYRIAD PRO.Marlett.Meiryo UI.Microsoft Uighur.Minion Pro.Monotype Corsiva.PMingLiU.Pristina.SCRIPTINA.Segoe UI Light.Serifa.SimHei.Small Fonts.Staccato222 BT.TRAJAN PRO.Univers CE 55 Medium.Vrinda.ZWAdobeF`.split(`.`);function G_(){return L_(async(e,{document:t})=>{let n=t.body;n.style.fontSize=H_;let r=t.createElement(`div`);r.style.setProperty(`visibility`,`hidden`,`important`);let i={},a={},o=e=>{let n=t.createElement(`span`),{style:i}=n;return i.position=`absolute`,i.top=`0`,i.left=`0`,i.fontFamily=e,n.textContent=V_,r.appendChild(n),n},s=(e,t)=>o(`'${e}',${t}`),c=()=>U_.map(o),l=()=>{let e={};for(let t of W_)e[t]=U_.map(e=>s(t,e));return e},u=e=>U_.some((t,n)=>e[n].offsetWidth!==i[t]||e[n].offsetHeight!==a[t]),d=c(),f=l();n.appendChild(r);for(let e=0;e<U_.length;e++)i[U_[e]]=d[e].offsetWidth,a[U_[e]]=d[e].offsetHeight;return W_.filter(e=>u(f[e]))})}function K_(){let e=navigator.plugins;if(!e)return;let t=[];for(let n=0;n<e.length;++n){let r=e[n];if(!r)continue;let i=[];for(let e=0;e<r.length;++e){let t=r[e];i.push({type:t.type,suffixes:t.suffixes})}t.push({name:r.name,description:r.description,mimeTypes:i})}return t}function q_(){return J_(nv())}function J_(e){let t=!1,n,r,[i,a]=Y_();return X_(i,a)?(t=Z_(a),e?n=r=`skipped`:[n,r]=Q_(i,a)):n=r=`unsupported`,{winding:t,geometry:n,text:r}}function Y_(){let e=document.createElement(`canvas`);return e.width=1,e.height=1,[e,e.getContext(`2d`)]}function X_(e,t){return!!(t&&e.toDataURL)}function Z_(e){return e.rect(0,0,10,10),e.rect(2,2,6,6),!e.isPointInPath(5,5,`evenodd`)}function Q_(e,t){$_(e,t);let n=tv(e);return n===tv(e)?(ev(e,t),[tv(e),n]):[`unstable`,`unstable`]}function $_(e,t){e.width=240,e.height=60,t.textBaseline=`alphabetic`,t.fillStyle=`#f60`,t.fillRect(100,1,62,20),t.fillStyle=`#069`,t.font=`11pt "Times New Roman"`;let n=`Cwm fjordbank gly ${String.fromCharCode(55357,56835)}`;t.fillText(n,2,15),t.fillStyle=`rgba(102, 204, 0, 0.2)`,t.font=`18pt Arial`,t.fillText(n,4,45)}function ev(e,t){e.width=122,e.height=110,t.globalCompositeOperation=`multiply`;for(let[e,n,r]of[[`#f2f`,40,40],[`#2ff`,80,40],[`#ff2`,60,80]])t.fillStyle=e,t.beginPath(),t.arc(n,r,40,0,Math.PI*2,!0),t.closePath(),t.fill();t.fillStyle=`#f9c`,t.arc(60,60,60,0,Math.PI*2,!0),t.arc(60,60,20,0,Math.PI*2,!0),t.fill(`evenodd`)}function tv(e){return e.toDataURL()}function nv(){let e=m_()&&w_()&&g_(),t=__()&&v_();return e||t}function rv(){let e=navigator,t=0,n;e.maxTouchPoints===void 0?e.msMaxTouchPoints!==void 0&&(t=e.msMaxTouchPoints):t=zg(e.maxTouchPoints);try{document.createEvent(`TouchEvent`),n=!0}catch{n=!1}let r=`ontouchstart`in window;return{maxTouchPoints:t,touchEvent:n,touchStart:r}}function iv(){return navigator.oscpu}function av(){let e=navigator,t=[],n=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(n!==void 0&&t.push([n]),Array.isArray(e.languages))p_()&&b_()||t.push(e.languages);else if(typeof e.languages==`string`){let n=e.languages;n&&t.push(n.split(`,`))}return t}function ov(){return window.screen.colorDepth}function sv(){return Vg(Bg(navigator.deviceMemory),void 0)}function cv(){if(!(m_()&&w_()&&g_()))return lv()}function lv(){let e=screen,t=e=>Vg(zg(e),null),n=[t(e.width),t(e.height)];return n.sort().reverse(),n}var uv=2500,dv=10,fv,pv;function mv(){if(pv!==void 0)return;let e=()=>{let t=_v();vv(t)?pv=setTimeout(e,uv):(fv=t,pv=void 0)};e()}function hv(){return mv(),async()=>{let e=_v();if(vv(e)){if(fv)return[...fv];E_()&&(await D_(),e=_v())}return vv(e)||(fv=e),e}}function gv(){let e=m_()&&w_()&&g_(),t=__()&&y_();if(e||t)return()=>Promise.resolve(void 0);let n=hv();return async()=>{let e=await n(),t=e=>e===null?null:Ug(e,dv);return[t(e[0]),t(e[1]),t(e[2]),t(e[3])]}}function _v(){let e=screen;return[Vg(Bg(e.availTop),null),Vg(Bg(e.width)-Bg(e.availWidth)-Vg(Bg(e.availLeft),0),null),Vg(Bg(e.height)-Bg(e.availHeight)-Vg(Bg(e.availTop),0),null),Vg(Bg(e.availLeft),null)]}function vv(e){for(let t=0;t<4;++t)if(e[t])return!1;return!0}function yv(){let e=bv();return e!==void 0&&__()&&y_()?e>=8?8:4:e}function bv(){return Vg(zg(navigator.hardwareConcurrency),void 0)}function xv(){let e=window.Intl?.DateTimeFormat;if(e){let t=new e().resolvedOptions().timeZone;if(t)return t}let t=-Sv();return`UTC${t>=0?`+`:``}${t}`}function Sv(){let e=new Date().getFullYear();return Math.max(Bg(new Date(e,0,1).getTimezoneOffset()),Bg(new Date(e,6,1).getTimezoneOffset()))}function Cv(){try{return!!window.sessionStorage}catch{return!0}}function wv(){try{return!!window.localStorage}catch{return!0}}function Tv(){if(!(d_()||f_()))try{return!!window.indexedDB}catch{return!0}}function Ev(){return!!window.openDatabase}function Dv(){return navigator.cpuClass}function Ov(){let{platform:e}=navigator;return e===`MacIntel`&&m_()&&!h_()?T_()?`iPad`:`iPhone`:e}function kv(){return navigator.vendor||``}function Av(){let e=[];for(let t of[`chrome`,`safari`,`__crWeb`,`__gCrWeb`,`yandex`,`__yb`,`__ybro`,`__firefox__`,`__edgeTrackingPreventionStatistics`,`webkit`,`oprt`,`samsungAr`,`ucweb`,`UCShellJava`,`puffinDevice`]){let n=window[t];n&&typeof n==`object`&&e.push(t)}return e.sort()}function jv(){let e=document;try{e.cookie=`cookietest=1; SameSite=Strict;`;let t=e.cookie.indexOf(`cookietest=`)!==-1;return e.cookie=`cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT`,t}catch{return!1}}function Mv(){let e=atob;return{abpIndo:[`#Iklan-Melayang`,`#Kolom-Iklan-728`,`#SidebarIklan-wrapper`,`[title="ALIENBOLA" i]`,e(`I0JveC1CYW5uZXItYWRz`)],abpvn:[`.quangcao`,`#mobileCatfish`,e(`LmNsb3NlLWFkcw==`),`[id^="bn_bottom_fixed_"]`,`#pmadv`],adBlockFinland:[`.mainostila`,e(`LnNwb25zb3JpdA==`),`.ylamainos`,e(`YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd`),e(`YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd`)],adBlockPersian:[`#navbar_notice_50`,`.kadr`,`TABLE[width="140px"]`,`#divAgahi`,e(`YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd`)],adBlockWarningRemoval:[`#adblock-honeypot`,`.adblocker-root`,`.wp_adblock_detect`,e(`LmhlYWRlci1ibG9ja2VkLWFk`),e(`I2FkX2Jsb2NrZXI=`)],adGuardAnnoyances:[`.hs-sosyal`,`#cookieconsentdiv`,`div[class^="app_gdpr"]`,`.as-oil`,`[data-cypress="soft-push-notification-modal"]`],adGuardBase:[`.BetterJsPopOverlay`,e(`I2FkXzMwMFgyNTA=`),e(`I2Jhbm5lcmZsb2F0MjI=`),e(`I2NhbXBhaWduLWJhbm5lcg==`),e(`I0FkLUNvbnRlbnQ=`)],adGuardChinese:[e(`LlppX2FkX2FfSA==`),e(`YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd`),`#widget-quan`,e(`YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd`),e(`YVtocmVmKj0iLjE5NTZobC5jb20vIl0=`)],adGuardFrench:[`#pavePub`,e(`LmFkLWRlc2t0b3AtcmVjdGFuZ2xl`),`.mobile_adhesion`,`.widgetadv`,e(`LmFkc19iYW4=`)],adGuardGerman:[`aside[data-portal-id="leaderboard"]`],adGuardJapanese:[`#kauli_yad_1`,e(`YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0=`),e(`Ll9wb3BJbl9pbmZpbml0ZV9hZA==`),e(`LmFkZ29vZ2xl`),e(`Ll9faXNib29zdFJldHVybkFk`)],adGuardMobile:[e(`YW1wLWF1dG8tYWRz`),e(`LmFtcF9hZA==`),`amp-embed[type="24smi"]`,`#mgid_iframe1`,e(`I2FkX2ludmlld19hcmVh`)],adGuardRussian:[e(`YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0=`),e(`LnJlY2xhbWE=`),`div[id^="smi2adblock"]`,e(`ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd`),`#psyduckpockeball`],adGuardSocial:[e(`YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0=`),e(`YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0=`),`.etsy-tweet`,`#inlineShare`,`.popup-social`],adGuardSpanishPortuguese:[`#barraPublicidade`,`#Publicidade`,`#publiEspecial`,`#queTooltip`,`.cnt-publi`],adGuardTrackingProtection:[`#qoo-counter`,e(`YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ==`),e(`YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0=`),e(`YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ==`),`#top100counter`],adGuardTurkish:[`#backkapat`,e(`I3Jla2xhbWk=`),e(`YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0=`),e(`YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd`),e(`YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==`)],bulgarian:[e(`dGQjZnJlZW5ldF90YWJsZV9hZHM=`),`#ea_intext_div`,`.lapni-pop-over`,`#xenium_hot_offers`],easyList:[`.yb-floorad`,e(`LndpZGdldF9wb19hZHNfd2lkZ2V0`),e(`LnRyYWZmaWNqdW5reS1hZA==`),`.textad_headline`,e(`LnNwb25zb3JlZC10ZXh0LWxpbmtz`)],easyListChina:[e(`LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ==`),e(`LmZyb250cGFnZUFkdk0=`),`#taotaole`,`#aafoot.top_box`,`.cfa_popup`],easyListCookie:[`.ezmob-footer`,`.cc-CookieWarning`,`[data-cookie-number]`,e(`LmF3LWNvb2tpZS1iYW5uZXI=`),`.sygnal24-gdpr-modal-wrap`],easyListCzechSlovak:[`#onlajny-stickers`,e(`I3Jla2xhbW5pLWJveA==`),e(`LnJla2xhbWEtbWVnYWJvYXJk`),`.sklik`,e(`W2lkXj0ic2tsaWtSZWtsYW1hIl0=`)],easyListDutch:[e(`I2FkdmVydGVudGll`),e(`I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw==`),`.adstekst`,e(`YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0=`),`#semilo-lrectangle`],easyListGermany:[`#SSpotIMPopSlider`,e(`LnNwb25zb3JsaW5rZ3J1ZW4=`),e(`I3dlcmJ1bmdza3k=`),e(`I3Jla2xhbWUtcmVjaHRzLW1pdHRl`),e(`YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=`)],easyListItaly:[e(`LmJveF9hZHZfYW5udW5jaQ==`),`.sb-box-pubbliredazionale`,e(`YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd`),e(`YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd`),e(`YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==`)],easyListLithuania:[e(`LnJla2xhbW9zX3RhcnBhcw==`),e(`LnJla2xhbW9zX251b3JvZG9z`),e(`aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd`),e(`aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd`),e(`aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd`)],estonian:[e(`QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==`)],fanboyAnnoyances:[`#ac-lre-player`,`.navigate-to-top`,`#subscribe_popup`,`.newsletter_holder`,`#back-top`],fanboyAntiFacebook:[`.util-bar-module-firefly-visible`],fanboyEnhancedTrackers:[`.open.pushModal`,`#issuem-leaky-paywall-articles-zero-remaining-nag`,`#sovrn_container`,`div[class$="-hide"][zoompage-fontsize][style="display: block;"]`,`.BlockNag__Card`],fanboySocial:[`#FollowUs`,`#meteored_share`,`#social_follow`,`.article-sharer`,`.community__social-desc`],frellwitSwedish:[e(`YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ==`),e(`YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ==`),`article.category-samarbete`,e(`ZGl2LmhvbGlkQWRz`),`ul.adsmodern`],greekAdBlock:[e(`QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd`),e(`QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ==`),e(`QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd`),`DIV.agores300`,`TABLE.advright`],hungarian:[`#cemp_doboz`,`.optimonk-iframe-container`,e(`LmFkX19tYWlu`),e(`W2NsYXNzKj0iR29vZ2xlQWRzIl0=`),`#hirdetesek_box`],iDontCareAboutCookies:[`.alert-info[data-block-track*="CookieNotice"]`,`.ModuleTemplateCookieIndicator`,`.o--cookies--container`,`#cookies-policy-sticky`,`#stickyCookieBar`],icelandicAbp:[e(`QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==`)],latvian:[e(`YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0=`),e(`YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==`)],listKr:[e(`YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0=`),e(`I2xpdmVyZUFkV3JhcHBlcg==`),e(`YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ==`),e(`aW5zLmZhc3R2aWV3LWFk`),`.revenue_unit_item.dable`],listeAr:[e(`LmdlbWluaUxCMUFk`),`.right-and-left-sponsers`,e(`YVtocmVmKj0iLmFmbGFtLmluZm8iXQ==`),e(`YVtocmVmKj0iYm9vcmFxLm9yZyJd`),e(`YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd`)],listeFr:[e(`YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ==`),e(`I2FkY29udGFpbmVyX3JlY2hlcmNoZQ==`),e(`YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0=`),`.site-pub-interstitiel`,`div[id^="crt-"][data-criteo-id]`],officialPolish:[`#ceneo-placeholder-ceneo-12`,e(`W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd`),e(`YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ==`),e(`YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ==`),e(`ZGl2I3NrYXBpZWNfYWQ=`)],ro:[e(`YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd`),e(`YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd`),e(`YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0=`),e(`YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd`),`a[href^="/url/"]`],ruAd:[e(`YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd`),e(`YVtocmVmKj0iLy91dGltZy5ydS8iXQ==`),e(`YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0=`),`#pgeldiz`,`.yandex-rtb-block`],thaiAds:[`a[href*=macau-uta-popup]`,e(`I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA==`),e(`LmFkczMwMHM=`),`.bumq`,`.img-kosana`],webAnnoyancesUltralist:[`#mod-social-share-2`,`#social-tools`,e(`LmN0cGwtZnVsbGJhbm5lcg==`),`.zergnet-recommend`,`.yt.btn-link.btn-md.btn`]}}async function Nv({debug:e}={}){if(!Pv())return;let t=Mv(),n=Object.keys(t),r=await Fv([].concat(...n.map(e=>t[e])));e&&Lv(t,r);let i=n.filter(e=>{let n=t[e];return Hg(n.map(e=>r[e]))>n.length*.6});return i.sort(),i}function Pv(){return m_()||O_()}async function Fv(e){var t;let n=document,r=n.createElement(`div`),i=Array(e.length),a={};Iv(r);for(let t=0;t<e.length;++t){let a=R_(e[t]);a.tagName===`DIALOG`&&a.show();let o=n.createElement(`div`);Iv(o),o.appendChild(a),r.appendChild(o),i[t]=a}for(;!n.body;)await Ag(50);n.body.appendChild(r);try{for(let t=0;t<e.length;++t)i[t].offsetParent||(a[e[t]]=!0)}finally{(t=r.parentNode)==null||t.removeChild(r)}return a}function Iv(e){e.style.setProperty(`visibility`,`hidden`,`important`),e.style.setProperty(`display`,`block`,`important`)}function Lv(e,t){let n="DOM blockers debug:\n```";for(let r of Object.keys(e)){n+=`\n${r}:`;for(let i of e[r])n+=`\n ${t[i]?`🚫`:`➡️`} ${i}`}console.log(`${n}\n\`\`\``)}function Rv(){for(let e of[`rec2020`,`p3`,`srgb`])if(matchMedia(`(color-gamut: ${e})`).matches)return e}function zv(){if(Bv(`inverted`))return!0;if(Bv(`none`))return!1}function Bv(e){return matchMedia(`(inverted-colors: ${e})`).matches}function Vv(){if(Hv(`active`))return!0;if(Hv(`none`))return!1}function Hv(e){return matchMedia(`(forced-colors: ${e})`).matches}var Uv=100;function Wv(){if(matchMedia(`(min-monochrome: 0)`).matches){for(let e=0;e<=Uv;++e)if(matchMedia(`(max-monochrome: ${e})`).matches)return e;throw Error(`Too high value`)}}function Gv(){if(Kv(`no-preference`))return 0;if(Kv(`high`)||Kv(`more`))return 1;if(Kv(`low`)||Kv(`less`))return-1;if(Kv(`forced`))return 10}function Kv(e){return matchMedia(`(prefers-contrast: ${e})`).matches}function qv(){if(Jv(`reduce`))return!0;if(Jv(`no-preference`))return!1}function Jv(e){return matchMedia(`(prefers-reduced-motion: ${e})`).matches}function Yv(){if(Xv(`reduce`))return!0;if(Xv(`no-preference`))return!1}function Xv(e){return matchMedia(`(prefers-reduced-transparency: ${e})`).matches}function Zv(){if(Qv(`high`))return!0;if(Qv(`standard`))return!1}function Qv(e){return matchMedia(`(dynamic-range: ${e})`).matches}var $v=Math,ey=()=>0;function ty(){let e=$v.acos||ey,t=$v.acosh||ey,n=$v.asin||ey,r=$v.asinh||ey,i=$v.atanh||ey,a=$v.atan||ey,o=$v.sin||ey,s=$v.sinh||ey,c=$v.cos||ey,l=$v.cosh||ey,u=$v.tan||ey,d=$v.tanh||ey,f=$v.exp||ey,p=$v.expm1||ey,m=$v.log1p||ey;return{acos:e(.12312423423423424),acosh:t(1e308),acoshPf:(e=>$v.log(e+$v.sqrt(e*e-1)))(1e154),asin:n(.12312423423423424),asinh:r(1),asinhPf:(e=>$v.log(e+$v.sqrt(e*e+1)))(1),atanh:i(.5),atanhPf:(e=>$v.log((1+e)/(1-e))/2)(.5),atan:a(.5),sin:o(-1e300),sinh:s(1),sinhPf:(e=>$v.exp(e)-1/$v.exp(e)/2)(1),cos:c(10.000000000123),cosh:l(1),coshPf:(e=>($v.exp(e)+1/$v.exp(e))/2)(1),tan:u(-1e300),tanh:d(1),tanhPf:(e=>($v.exp(2*e)-1)/($v.exp(2*e)+1))(1),exp:f(1),expm1:p(1),expm1Pf:(e=>$v.exp(e)-1)(1),log1p:m(10),log1pPf:(e=>$v.log(1+e))(10),powPI:(e=>$v.pow($v.PI,e))(-100)}}var ny=`mmMwWLliI0fiflO&1`,ry={default:[],apple:[{font:`-apple-system-body`}],serif:[{fontFamily:`serif`}],sans:[{fontFamily:`sans-serif`}],mono:[{fontFamily:`monospace`}],min:[{fontSize:`1px`}],system:[{fontFamily:`system-ui`}]};function iy(){return oy((e,t,n)=>{let r={},i={};for(let n of Object.keys(ry)){let[i={},a=ny]=ry[n],o=e.createElement(`span`);o.textContent=a,o.style.whiteSpace=`nowrap`;for(let e of Object.keys(i)){let t=i[e];t!==void 0&&(o.style[e]=t)}r[n]=o,t.append(e.createElement(`br`),o)}let a=p_()&&S_();for(let e of Object.keys(ry)){let t=r[e].getBoundingClientRect().width;i[e]=a?ay(t*n.devicePixelRatio):t}return i})}function ay(e){let t=10**(O_()?0:3);return Math.floor(e*t)/t}function oy(e,t=4e3){return L_((n,r)=>{let i=r.document,a=i.body,o=a.style;o.width=`${t}px`,o.webkitTextSizeAdjust=o.textSizeAdjust=`none`,p_()?a.style.zoom=`${1/r.devicePixelRatio}`:m_()&&(a.style.zoom=`reset`);let s=i.createElement(`div`);return s.textContent=[...Array(t/20<<0)].map(()=>`word`).join(` `),a.appendChild(s),e(i,a,r)},`<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">`)}function sy(){return navigator.pdfViewerEnabled}function cy(){let e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]-=e[0],t[3]}function ly(){let{ApplePaySession:e}=window;if(typeof e?.canMakePayments!=`function`)return-1;if(uy())return-3;try{return+!!e.canMakePayments()}catch(e){return dy(e)}}var uy=B_;function dy(e){if(e instanceof Error&&e.name===`InvalidAccessError`&&/\bfrom\b.*\binsecure\b/i.test(e.message))return-2;throw e}function fy(){let e=document.createElement(`a`),t=e.attributionSourceId??e.attributionsourceid;return t===void 0?void 0:String(t)}var py=-1,my=-2,hy=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),gy=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),_y=[`FRAGMENT_SHADER`,`VERTEX_SHADER`],vy=[`LOW_FLOAT`,`MEDIUM_FLOAT`,`HIGH_FLOAT`,`LOW_INT`,`MEDIUM_INT`,`HIGH_INT`],yy=`WEBGL_debug_renderer_info`,by=`WEBGL_polygon_mode`;function xy({cache:e}){let t=Cy(e);if(!t)return py;if(!ky(t))return my;let n=Dy()?null:t.getExtension(yy);return{version:t.getParameter(t.VERSION)?.toString()||``,vendor:t.getParameter(t.VENDOR)?.toString()||``,vendorUnmasked:n?t.getParameter(n.UNMASKED_VENDOR_WEBGL)?.toString():``,renderer:t.getParameter(t.RENDERER)?.toString()||``,rendererUnmasked:n?t.getParameter(n.UNMASKED_RENDERER_WEBGL)?.toString():``,shadingLanguageVersion:t.getParameter(t.SHADING_LANGUAGE_VERSION)?.toString()||``}}function Sy({cache:e}){let t=Cy(e);if(!t)return py;if(!ky(t))return my;let n=t.getSupportedExtensions(),r=t.getContextAttributes(),i=[],a=[],o=[],s=[],c=[];if(r)for(let e of Object.keys(r))a.push(`${e}=${r[e]}`);let l=Ty(t);for(let e of l){let n=t[e];o.push(`${e}=${n}${hy.has(n)?`=${t.getParameter(n)}`:``}`)}if(n)for(let e of n){if(e===yy&&Dy()||e===by&&Oy())continue;let n=t.getExtension(e);if(!n){i.push(e);continue}for(let e of Ty(n)){let r=n[e];s.push(`${e}=${r}${gy.has(r)?`=${t.getParameter(r)}`:``}`)}}for(let e of _y)for(let n of vy){let r=wy(t,e,n);c.push(`${e}.${n}=${r.join(`,`)}`)}return s.sort(),o.sort(),{contextAttributes:a,parameters:o,shaderPrecisions:c,extensions:n,extensionParameters:s,unsupportedExtensions:i}}function Cy(e){if(e.webgl)return e.webgl.context;let t=document.createElement(`canvas`),n;t.addEventListener(`webglCreateContextError`,()=>n=void 0);for(let e of[`webgl`,`experimental-webgl`]){try{n=t.getContext(e)}catch{}if(n)break}return e.webgl={context:n},n}function wy(e,t,n){let r=e.getShaderPrecisionFormat(e[t],e[n]);return r?[r.rangeMin,r.rangeMax,r.precision]:[]}function Ty(e){return Object.keys(e.__proto__).filter(Ey)}function Ey(e){return typeof e==`string`&&!e.match(/[^A-Z0-9_x]/)}function Dy(){return __()}function Oy(){return p_()||m_()}function ky(e){return typeof e.getParameter==`function`}function Ay(){if(!(O_()||m_()))return-2;if(!window.AudioContext)return-1;let e=new AudioContext().baseLatency;return e==null?-1:isFinite(e)?e:-3}function jy(){if(!window.Intl)return-1;let e=window.Intl.DateTimeFormat;if(!e)return-2;let t=e().resolvedOptions().locale;return!t&&t!==``?-3:t}function My(e){return/not/i.test(e)}async function Ny(){let e=navigator.userAgentData;if(!e)return;let t=e.brands.filter(({brand:e})=>!My(e)).map(({brand:e})=>e),n={brands:t.length>1?t.filter(e=>e!==`Chromium`):t,mobile:e.mobile,platform:e.platform};if(e.getHighEntropyValues)try{let t=await e.getHighEntropyValues([`architecture`,`bitness`,`model`,`platformVersion`]);n.architecture=t.architecture,n.bitness=t.bitness,n.model=t.model,n.platformVersion=t.platformVersion}catch(e){if(e instanceof DOMException&&e.name===`NotAllowedError`)n.highEntropyStatus=`not_allowed`;else throw e}return n}var Py={userAgentData:Ny,fonts:G_,domBlockers:Nv,fontPreferences:iy,audio:A_,screenFrame:gv,canvas:q_,osCpu:iv,languages:av,colorDepth:ov,deviceMemory:sv,screenResolution:cv,hardwareConcurrency:yv,timezone:xv,sessionStorage:Cv,localStorage:wv,indexedDB:Tv,openDatabase:Ev,cpuClass:Dv,platform:Ov,plugins:K_,touchSupport:rv,vendor:kv,vendorFlavors:Av,cookiesEnabled:jv,colorGamut:Rv,invertedColors:zv,forcedColors:Vv,monochrome:Wv,contrast:Gv,reducedMotion:qv,reducedTransparency:Yv,hdr:Zv,math:ty,pdfViewerEnabled:sy,architecture:cy,applePay:ly,privateClickMeasurement:fy,audioBaseLatency:Ay,dateTimeLocale:jy,webGlBasics:xy,webGlExtensions:Sy};function Fy(e){return u_(Py,e,[])}var Iy=`$ if upgrade to Pro: https://fingerprint.com/github/?utm_source=oss&utm_medium=referral&utm_campaign=confidence_score`;function Ly(e){let t=Ry(e),n=zy(t);return{score:t,comment:Iy.replace(/\$/g,`${n}`)}}function Ry(e){if(O_())return .4;if(m_())return h_()&&!(w_()&&g_())?.5:.3;let t=`value`in e.platform?e.platform.value:``;return/^Win/.test(t)?.6:/^Mac/.test(t)?.5:.7}function zy(e){return Ug(.99+.01*e,1e-4)}function By(e){let t=``;for(let n of Object.keys(e).sort()){let r=e[n],i=`error`in r?`error`:JSON.stringify(r.value);t+=`${t?`|`:``}${n.replace(/([:|\\])/g,`\\$1`)}:${i}`}return t}function Vy(e){return JSON.stringify(e,(e,t)=>t instanceof Error?o_(t):t,2)}function Hy(e){return a_(By(e))}function Uy(e){let t;return{get visitorId(){return t===void 0&&(t=Hy(this.components)),t},set visitorId(e){t=e},confidence:Ly(e),components:e,version:kg}}function Wy(e=50){return Mg(e,e*2)}function Gy(e,t){let n=Date.now();return{async get(r){let i=Date.now(),a=await e(),o=Uy(a);return(t||r?.debug)&&console.log(`Copy the text below to get the debug data:
|
|
272
272
|
|
|
273
273
|
\`\`\`
|
|
@@ -276,8 +276,8 @@ userAgent: ${navigator.userAgent}
|
|
|
276
276
|
timeBetweenLoadAndGet: ${i-n}
|
|
277
277
|
visitorId: ${o.visitorId}
|
|
278
278
|
components: ${Vy(a)}
|
|
279
|
-
\`\`\``),o}}}function Ky(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{let e=new XMLHttpRequest;e.open(`get`,`https://m1.openfpcdn.io/fingerprintjs/v${kg}/npm-monitoring`,!0),e.send()}catch(e){console.error(e)}}async function qy(e={}){let{delayFallback:t,debug:n,monitoring:r=!0}=e;return r&&Ky(),await Wy(t),Gy(Fy({cache:{},debug:n}),n)}var Jy={load:qy,hashComponents:Hy,componentsToDebugString:Vy},Yy=Fd(null);function Xy({children:e}){let t=bb(),n=cm(!1),r=cm(!1),i=mf(()=>{let e=Kp(()=>!t.value.terms_html||r.value),i=[];return{termsShown:n,termsAccepted:e,dismissTerms:()=>{n.value=!1,i.forEach(e=>e.reject()),i=[]},acceptTerms:()=>{r.value=!0,n.value=!1;let e=t.peek().terms_key;e&&localStorage.setItem(e,`true`),i.forEach(e=>e.resolve()),i=[]},requestTerms:async()=>{e.peek()||(n.value=!0,await new Promise((e,t)=>{i.push({resolve:e,reject:t})}))}}},[n,r,t]);return hm(()=>{let e=t.value.terms_key;r.value=e?!!localStorage.getItem(e):!1}),R(Yy.Provider,{value:i,children:e})}function Zy(){return cg(Yy)}var Qy=Fd(null);function $y({children:e}){let t=cm(null),n=I(e=>{t.value=tb(e)},[t]);return R(Qy.Provider,{value:t,children:[R(`template`,{ref:n}),e]})}function eb(){return cg(Qy)}function tb(e){if(!e)return null;let t=e?.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}var nb=Fd(null);function rb(e,t){if(t.role!==`user`||t.eventId==null)return[...e,t];let n=e.findIndex(e=>e.type===`message`&&e.role===`agent`&&e.eventId===t.eventId&&e.conversationIndex===t.conversationIndex);return n===-1?[...e,t]:[...e.slice(0,n),t,...e.slice(n)]}function ib({children:e}){let t=sb();return hm(()=>{if(t.conversationTextOnly.value===!0){t.transcript.value;let e=setTimeout(()=>{t.endSession()},600*1e3);return()=>{clearTimeout(e)}}}),R(nb.Provider,{value:t,children:e})}function ab(){return cg(nb)}function ob(){let{status:e}=ab();return L(()=>e.value===`disconnecting`||e.value===`connecting`)}function sb(){let e=F(null),t=F(null),n=F(!1),r=F(null),i=F(!1),a=eb(),o=fb(),s=hb(),c=Zy(),l=Og();return df(()=>()=>{e.current?.endSession()},[]),mf(()=>{let u=Vp(`disconnected`),d=Kp(()=>u.value===`disconnected`),f=Vp(`listening`),p=Kp(()=>f.value===`speaking`),m=Vp(null),h=Vp(null),g=Vp(!1),_=Vp([]),v=Vp(0),y=Vp(null);return{status:u,isSpeaking:p,mode:f,isDisconnected:d,lastId:h,error:m,canSendFeedback:g,conversationIndex:v,conversationTextOnly:y,transcript:_,startSession:async(d,p)=>{if(await c.requestTerms(),e.current?.isOpen())return e.current.getId();if(t.current)return(await t.current).getId();let b=structuredClone(l.peek());b.userId||=await cb(),p&&o.value.supports_text_only&&(b.textOnly=!0,o.value.text_only||(b.overrides??={},b.overrides.conversation??={},b.overrides.conversation.textOnly=!0));try{b=lb(a.value??d,b)}catch(e){console.error(`[ConversationalAI] Error triggering call event:`,e)}y.value=b.textOnly??!1,_.value=p?[{type:`message`,role:`user`,message:p,isText:!0,conversationIndex:v.peek()}]:[];try{if(t.current=ch.startSession({...b,onModeChange:e=>{f.value=e.mode},onStatusChange:e=>{u.value=e.status},onCanSendFeedbackChange:e=>{g.value=e.canSendFeedback},onMessage:({role:e,message:t,event_id:a})=>{if(s.peek()&&y.peek()===!0&&e===`agent`&&!n.current){n.current=!0;return}else e===`agent`&&(n.current=!0);if(e===`agent`&&i.current){let e=r.current;if(e!==null){let n=[..._.peek()];n[e]={type:`message`,role:`agent`,message:t,isText:!0,conversationIndex:v.peek(),eventId:a},_.value=n}i.current=!1;return}_.value=rb(_.peek(),{type:`message`,role:e,message:t,isText:!1,conversationIndex:v.peek(),eventId:a})},onAgentChatResponsePart:({text:e,type:t,event_id:a})=>{if(y.peek()===!0&&!(s.peek()&&!n.current))if(t===`start`){i.current=!0;let e=_.peek();r.current=e.length,_.value=[...e,{type:`message`,role:`agent`,message:``,isText:!0,conversationIndex:v.peek(),eventId:a}]}else if(t===`delta`){let t=r.current;if(t!==null&&e){let n=_.peek(),r=n[t];if(r.type===`message`){let i=[...n];i[t]={...r,message:r.message+e},_.value=i}}}else t===`stop`&&(r.current=null)},onAgentToolRequest:({tool_call_id:e,tool_name:t,event_id:n})=>{_.value=[..._.peek(),{type:`agent_tool_request`,toolName:t,toolCallId:e,eventId:n,conversationIndex:v.peek()}]},onAgentToolResponse:({tool_call_id:e,is_error:t,event_id:n})=>{_.value=[..._.peek(),{type:`agent_tool_response`,toolCallId:e,eventId:n,isError:t,conversationIndex:v.peek()}]},onDisconnect:e=>{n.current=!1,y.value=null,r.current=null,i.current=!1,_.value=[..._.peek(),e.reason===`error`?{type:`error`,message:e.message,conversationIndex:v.peek()}:{type:`disconnection`,role:e.reason===`user`?`user`:`agent`,conversationIndex:v.peek()}],v.value++,e.reason===`error`&&(m.value=e.message,console.error(`[ConversationalAI] Disconnected due to an error:`,e.message))}}),e.current=await t.current,p){let t=e.current;setTimeout(()=>t.sendUserMessage(p),100)}let a=e.current.getId();return h.value=a,m.value=null,a}catch(e){let t=`Could not start a conversation.`;e instanceof CloseEvent?t=e.reason||t:e instanceof Error&&(t=e.message||t),m.value=t,_.value=[..._.value,{type:`error`,message:t,conversationIndex:v.peek()}]}finally{t.current=null}},endSession:async()=>{let t=e.current;e.current=null,await t?.endSession()},getInputVolume:()=>e.current?.getInputVolume()??0,getOutputVolume:()=>e.current?.getOutputVolume()??0,setVolume:t=>{e.current?.setVolume({volume:t})},setMicMuted:t=>{e.current?.setMicMuted(t)},sendFeedback:t=>{e.current?.sendFeedback(t)},sendUserMessage:t=>{e.current?.sendUserMessage(t),_.value=[..._.value,{type:`message`,role:`user`,message:t,isText:!0,conversationIndex:v.peek()}]},sendMultimodalMessage:t=>{let n=t.text?.trim()??``,{fileId:r,...i}=t.file;e.current?.sendMultimodalMessage({text:n||void 0,fileId:r}),_.value=[..._.value,{type:`message`,role:`user`,message:n,isText:!0,conversationIndex:v.peek(),fileInput:i}]},sendUserActivity:()=>{e.current?.sendUserActivity()},sendContextualUpdate:t=>{e.current?.sendContextualUpdate(t)},addModeToggleEntry:t=>{e.current?.isOpen()&&(_.value=[..._.value,{type:`mode_toggle`,mode:t,conversationIndex:v.peek()}])}}},[l])}async function cb(){let e=`elevenlabs_convai_user_id`,t=localStorage.getItem(e);if(!t){try{t=(await(await Jy.load()).get()).visitorId}catch(e){console.warn(`[ConversationalAI] FingerprintJS failed, falling back to random UUID:`,e),t=crypto.randomUUID()}localStorage.setItem(e,t)}return t}function lb(e,t){try{let n=new CustomEvent(`elevenlabs-convai:call`,{bubbles:!0,composed:!0,detail:{config:t}});return e.dispatchEvent(n),n.detail.config}catch(e){return console.error(`[ConversationalAI] Could not trigger call event:`,e),t}}var ub=Fd(null);function db({children:e}){let{serverUrl:t}=hg(),n=fg(`agent-id`),r=fg(`override-config`),i=fg(`signed-url`),a=cm(null);hm(()=>{if(r.value)try{let e=JSON.parse(r.value);if(e){a.value=e;return}}catch(e){console.error(`[ConversationalAI] Cannot parse override-config: ${e?.message}`)}let e=n.value,o;if(i.value){let t=new URL(i.value).searchParams;e=t.get(`agent_id`)??n.value,o=t.get(`conversation_signature`)??void 0}if(!e){a.value=null;return}let s=new AbortController;return Eb(e,t.value,s.signal,o).then(e=>{s.signal.aborted||(a.value=e)}).catch(e=>{console.error(`[ConversationalAI] Cannot fetch config for agent ${n.value}: ${e?.message}`),s.signal.aborted||(a.value=null)}),()=>{s.abort()}});let o=fg(`variant`),s=fg(`placement`),c=fg(`terms-key`),l=fg(`mic-muting`),u=fg(`transcript`),d=fg(`text-input`),f=fg(`default-expanded`),p=fg(`always-expanded`),m=fg(`dismissible`),h=fg(`strip-audio-tags`),g=fg(`override-text-only`),_=fg(`use-rtc`),v=fg(`show-agent-status`),y=fg(`show-conversation-id`),b=L(()=>{if(!a.value)return null;let e=o.value??a.value.variant,t=s.value??a.value.placement,n=c.value??a.value.terms_key,r=bh(g.value)??a.value.text_only??!1,i=bh(l.value)??a.value.mic_muting_enabled,b=bh(u.value)??a.value.transcript_enabled,x=bh(d.value)??a.value.text_input_enabled,S=bh(p.value)??a.value.always_expanded??!1,C=bh(f.value)??a.value.default_expanded??!1,w=bh(m.value)??a.value.dismissible??!1,T=bh(h.value)??a.value.strip_audio_tags??!r,ee=bh(_.value)??a.value.use_rtc??!1,te=bh(v.value)??a.value.show_agent_status??!1,ne=bh(y.value)??a.value.show_conversation_id??!0;return{...a.value,variant:eg(e),placement:ng(t),terms_key:n,mic_muting_enabled:!r&&i,transcript_enabled:r||b,text_input_enabled:r||x,always_expanded:S,default_expanded:C,dismissible:w,strip_audio_tags:T,use_rtc:ee,show_agent_status:te,show_conversation_id:ne}});return b.value?R(ub.Provider,{value:b,children:e}):null}function fb(){return cg(ub)}function pb(){let e=fg(`override-text-only`),t=fb();return L(()=>bh(e.value)??t.value.text_only??!1)}function mb(){let e=pb(),{conversationTextOnly:t}=ab();return L(()=>t.value??e.value)}function hb(){let e=fg(`override-first-message`),t=fb(),{language:n}=Tg();return L(()=>e.value??t.value.language_presets?.[n.value.languageCode]?.first_message??t.value.first_message??null)}function gb(){let e=fb();return L(()=>e.value.text_input_enabled??!1)}function _b(){let e=pb();return{showCall:L(()=>!e.value),showMessage:gb()}}function vb(){let e=fb();return L(()=>e.value.file_input_config?.enabled??!1)}function yb(){let e=fb();return L(()=>e.value.file_input_config?.max_files_per_conversation??null)}function bb(){let e=fb(),{language:t}=Tg();return L(()=>{if(e.value.terms_html==null&&e.value.terms_text==null)return{terms_html:void 0,terms_text:void 0,terms_key:void 0};let n=e.value.language_presets?.[t.value.languageCode];return{terms_html:n?.terms_html??e.value.terms_html,terms_text:n?.terms_text??e.value.terms_text,terms_key:n?.terms_key??e.value.terms_key}})}function xb(){let e=fb();return L(()=>e.value.use_rtc??!1)}function Sb(){let e=fb();return L(()=>e.value.end_feedback?.type??null)}function Cb(){let e=fg(`markdown-link-allowed-hosts`),t=fg(`markdown-link-include-www`),n=fg(`markdown-link-allow-http`),r=fb();return L(()=>{let i=[];if(e.value)i=e.value.split(`,`).map(e=>e.trim()).filter(Boolean);else{let e=r.value.markdown_link_allowed_hosts;e&&e.length>0&&(i=e.some(e=>e.hostname===`*`)?[`*`]:e.map(e=>e.hostname))}let a=bh(t.value)??r.value.markdown_link_include_www??!0,o=bh(n.value)??r.value.markdown_link_allow_http??!0;return{allowedHosts:i,includeWww:a,allowHttp:o}})}function wb(){let e=fg(`syntax-highlight-theme`),t=fb();return L(()=>{let n=e.value??t.value.syntax_highlight_theme;if(n===`light`||n===`dark`)return n;let r=new Qh(t.value.styles?.base_active??ag.base_active);return r.isValid&&r.isDark()?`dark`:`light`})}function Tb(){let e=fg(`allow-events`);return L(()=>bh(e.value)??!1)}async function Eb(e,t,n,r){let i=await(await fetch(`${t}/v1/convai/agents/${e}/widget${r?`?conversation_signature=${encodeURIComponent(r)}`:``}`,{signal:n})).json();if(!i.widget_config)throw Error(`Response does not contain widget_config`);return i.widget_config}var Db=Pf(function(){let e=fb();return R(`style`,{children:[L(()=>{let t=e.value.styles;return`:host, :root {\n${og.map(e=>`${Ob(e)}: ${kb(t?.[e]??ag[e])};`).join(`
|
|
280
|
-
`)}\n}`}),Sh]})});function Ob(e){return`--el-${e.replace(/_/g,`-`)}`}function kb(e){return typeof e==`number`?`${e}px`:e}var Ab=Fd(null);function jb({children:e}){let t=cm(`voice`),{isDisconnected:n,addModeToggleEntry:r,setVolume:i}=ab();hm(()=>{i(t.value===`text`?0:1)});let a=mf(()=>({mode:Kp(()=>t.value),setMode:e=>{t.value!==e&&(t.value=e,n.value||r(e))},isTextMode:Kp(()=>t.value===`text`),isVoiceMode:Kp(()=>t.value===`voice`)}),[n,r]);return R(Ab.Provider,{value:a,children:e})}function Mb(){return cg(Ab)}var Nb=Fd(null);function Pb({children:e}){let t=fb(),{isTextMode:n}=Mb(),{setMicMuted:r,status:i}=ab(),a=L(()=>t.value.mic_muting_enabled??!1),o=cm(!1),s=F(null);hm(()=>{i.value===`disconnected`&&(o.value=!1)}),hm(()=>{n.value?(s.current===null&&(s.current=o.peek()),r(!0)):(s.current!==null&&(o.value=s.current,s.current=null),r(a.value?o.value:!1))});let c=mf(()=>({isMuted:Kp(()=>n.value?!0:a.value?o.value:!1),setIsMuted:e=>{o.value=e},isMutingEnabled:a}),[]);return R(Nb.Provider,{value:c,children:e})}function Fb(){return cg(Nb)}var Ib=Fd(null);function Lb({children:e}){let t=fb(),{language:n}=Tg(),r=fg(`text-contents`),i=L(()=>{try{if(r.value){let e=JSON.parse(r.value);if(typeof e==`object`)return e}}catch(e){console.error(`[ConversationalAI] Cannot parse text-contents:`,e)}return{}}),a=mf(()=>Object.fromEntries(ig.map(e=>[e,Kp(()=>i.value[e]??t.value.language_presets?.[n.value.languageCode]?.text_contents?.[e]??t.value.text_contents?.[e]??rg[e])])),[]);return R(Ib.Provider,{value:a,children:e})}function Rb(){return cg(Ib)}var zb=Fd(null);function Bb({children:e}){let t=fb(),n=fg(`avatar-image-url`),r=fg(`avatar-orb-color-1`),i=fg(`avatar-orb-color-2`),a=cm(``),o=L(()=>n.value?{type:`image`,url:n.value}:r.value&&i.value?{type:`orb`,color_1:r.value,color_2:i.value}:t.value.avatar),s=L(()=>{switch(o.value.type){case`url`:return o.value.custom_url;case`orb`:return a.value;case`image`:return o.value.url}}),c=mf(()=>({config:o,previewUrl:s,canvasUrl:a}),[]);return R(zb.Provider,{value:c,children:e})}function Vb(){return cg(zb)}var Hb=Fd(null);function Ub({children:e,...t}){let[n,r]=lf(null);return R(`div`,{ref:r,...t,children:n&&R(Hb.Provider,{value:n,children:e})})}function Wb(){return cg(Hb)}var Gb={LOADING:`loading`,SUCCESS:`success`,ERROR:`error`};function Kb(e,t){let n=[];t.firstMessage&&n.push({type:`message`,role:`agent`,message:t.firstMessage,isText:!0,conversationIndex:e[0]?.conversationIndex??t.firstMessageConversationIndex??0});let r=new Map;for(let t of e)if(t.type===`agent_tool_request`){let e=r.get(t.eventId)??{loading:0,error:0,success:0};e.loading++,r.set(t.eventId,e)}else if(t.type===`agent_tool_response`){let e=r.get(t.eventId);e&&(e.loading--,t.isError?e.error++:e.success++)}for(let i of e){if(i.type===`agent_tool_request`||i.type===`agent_tool_response`||i.type===`message`&&i.role===`agent`&&!i.message&&!(t.showAgentStatus&&i.eventId!=null&&r.has(i.eventId))||!t.transcriptEnabled&&i.type===`message`&&!i.isText)continue;let e=n[n.length-1];if(i.type===`message`&&i.eventId!=null&&e?.type===`message`&&e.eventId===i.eventId&&e.role===i.role){n[n.length-1]=i;continue}n.push(i)}if(t.showAgentStatus)for(let e=0;e<n.length;e++){let t=n[e];if(t.type!==`message`||t.role!==`agent`||t.eventId==null)continue;let i=r.get(t.eventId);if(!i)continue;let a=i.loading>0?Gb.LOADING:i.error>0?Gb.ERROR:Gb.SUCCESS;n[e]={...t,toolStatus:a}}return n}function qb(e){return e&&typeof e==`object`&&`peek`in e}function Jb(e){let t=qb(e),n=cm(t?e.peek():e);return t?e:(n.value=e,n)}function Yb(e){return qb(e)?e.value:e}function Xb(e){return qb(e)?e.peek():e}function Zb(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Qb(...e){return t=>{let n=!1,r=e.map(e=>{let r=Zb(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Zb(e[t],null)}}}}function $b(...e){return I(Qb(...e),e)}var ex=Symbol.for(`react.lazy`),tx=void 0;function nx(e){return typeof e==`object`&&!!e&&`then`in e}function rx(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ex&&`_payload`in e&&nx(e._payload)}function ix(e){let t=ox(e),n=Lf((e,n)=>{let{children:r,...i}=e;rx(r)&&typeof tx==`function`&&(r=tx(r._payload));let a=zf.toArray(r),o=a.find(cx);if(o){let e=o.props.children,r=a.map(t=>t===o?zf.count(e)>1?zf.only(null):_p(e)?e.props.children:null:t);return R(t,{...i,ref:n,children:_p(e)?bp(e,void 0,r):null})}return R(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var ax=ix(`Slot`);function ox(e){let t=Lf((e,t)=>{let{children:n,...r}=e;if(rx(n)&&typeof tx==`function`&&(n=tx(n._payload)),_p(n)){let e=ux(n),i=lx(r,n.props);return n.type!==ud&&(i.ref=t?Qb(t,e):e),bp(n,i)}return zf.count(n)>1?zf.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sx=Symbol(`radix.slottable`);function cx(e){return _p(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===sx}function lx(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ux(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dx=window.matchMedia(`(prefers-reduced-motion: reduce)`);function fx(){let e=cm(dx.matches);return df(()=>{let t=t=>{e.value=t.matches};return dx.addEventListener(`change`,t),()=>dx.removeEventListener(`change`,t)},[]),e}function px({onStart:e,onEnd:t}){let n=F();n.current??=new Set;let r=F(e);r.current=e;let i=F(t);i.current=t;let a=cm(!1);return{transitioning:a,handlers:{onTransitionStart:I(e=>{e.target===e.currentTarget&&(n.current?.add(e.propertyName),a.peek()||(a.value=!0,r.current?.()))},[]),onTransitionEnd:I(e=>{e.target===e.currentTarget&&(n.current?.delete(e.propertyName),n.current?.size||(a.value=!1,i.current?.()))},[])}}}function mx(e){return R(fx().value?hx:gx,{...e})}function hx({active:e,...t}){return Yb(e)?R(ax,{"data-shown":!0,...t}):null}function gx({active:e,initial:t=e,...n}){let r=Jb(e),i=cm(Xb(t));hm(()=>{r.value&&(i.value=r.value)});let{handlers:a}=px({onEnd:()=>{i.value=r.value}});return!r.value&&!i.value?null:R(ax,{"data-shown":r.value&&i.value,...a,...n})}function _x(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_x(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function vx(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_x(e))&&(r&&(r+=` `),r+=t);return r}var yx=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},bx=(e,t)=>({classGroupId:e,validator:t}),xx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Sx=`-`,Cx=[],wx=`arbitrary..`,Tx=e=>{let t=Ox(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Dx(e);let n=e.split(Sx);return Ex(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?yx(i,t):t:i||Cx}return n[e]||Cx}}},Ex=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ex(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Sx):e.slice(t).join(Sx),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Dx=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?wx+r:void 0})(),Ox=e=>{let{theme:t,classGroups:n}=e;return kx(n,t)},kx=(e,t)=>{let n=xx();for(let r in e){let i=e[r];Ax(i,n,r,t)}return n},Ax=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];jx(i,t,n,r)}},jx=(e,t,n,r)=>{if(typeof e==`string`){Mx(e,t,n);return}if(typeof e==`function`){Nx(e,t,n,r);return}Px(e,t,n,r)},Mx=(e,t,n)=>{let r=e===``?t:Fx(t,e);r.classGroupId=n},Nx=(e,t,n,r)=>{if(Ix(e)){Ax(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bx(n,e))},Px=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ax(o,Fx(t,a),n,r)}},Fx=(e,t)=>{let n=e,r=t.split(Sx),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=xx(),n.nextPart.set(t,i)),n=i}return n},Ix=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Lx=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Rx=`!`,zx=`:`,Bx=[],Vx=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Hx=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===zx){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Rx)?(c=s.slice(0,-1),l=!0):s.startsWith(Rx)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Vx(t,l,c,u)};if(t){let e=t+zx,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Vx(Bx,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ux=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Wx=e=>({cache:Lx(e.cacheSize),parseClassName:Hx(e),sortModifiers:Ux(e),...Tx(e)}),Gx=/\s+/,Kx=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Gx),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Rx:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},qx=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Jx(n))&&(i&&(i+=` `),i+=r);return i},Jx=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Jx(e[r]))&&(n&&(n+=` `),n+=t);return n},Yx=(e,...t)=>{let n,r,i,a,o=o=>(n=Wx(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Kx(e,n);return i(e,a),a};return a=o,(...e)=>a(qx(...e))},Xx=[],Zx=e=>{let t=t=>t[e]||Xx;return t.isThemeGetter=!0,t},Qx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$x=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eS=/^\d+\/\d+$/,tS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,iS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oS=e=>eS.test(e),sS=e=>!!e&&!Number.isNaN(Number(e)),cS=e=>!!e&&Number.isInteger(Number(e)),lS=e=>e.endsWith(`%`)&&sS(e.slice(0,-1)),uS=e=>tS.test(e),dS=()=>!0,fS=e=>nS.test(e)&&!rS.test(e),pS=()=>!1,mS=e=>iS.test(e),hS=e=>aS.test(e),gS=e=>!z(e)&&!B(e),_S=e=>kS(e,NS,pS),z=e=>Qx.test(e),vS=e=>kS(e,PS,fS),yS=e=>kS(e,FS,sS),bS=e=>kS(e,jS,pS),xS=e=>kS(e,MS,hS),SS=e=>kS(e,LS,mS),B=e=>$x.test(e),CS=e=>AS(e,PS),wS=e=>AS(e,IS),TS=e=>AS(e,jS),ES=e=>AS(e,NS),DS=e=>AS(e,MS),OS=e=>AS(e,LS,!0),kS=(e,t,n)=>{let r=Qx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},AS=(e,t,n=!1)=>{let r=$x.exec(e);return r?r[1]?t(r[1]):n:!1},jS=e=>e===`position`||e===`percentage`,MS=e=>e===`image`||e===`url`,NS=e=>e===`length`||e===`size`||e===`bg-size`,PS=e=>e===`length`,FS=e=>e===`number`,IS=e=>e===`family-name`,LS=e=>e===`shadow`,RS=Yx(()=>{let e=Zx(`color`),t=Zx(`font`),n=Zx(`text`),r=Zx(`font-weight`),i=Zx(`tracking`),a=Zx(`leading`),o=Zx(`breakpoint`),s=Zx(`container`),c=Zx(`spacing`),l=Zx(`radius`),u=Zx(`shadow`),d=Zx(`inset-shadow`),f=Zx(`text-shadow`),p=Zx(`drop-shadow`),m=Zx(`blur`),h=Zx(`perspective`),g=Zx(`aspect`),_=Zx(`ease`),v=Zx(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),B,z],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[B,z,c],T=()=>[oS,`full`,`auto`,...w()],ee=()=>[cS,`none`,`subgrid`,B,z],te=()=>[`auto`,{span:[`full`,cS,B,z]},cS,B,z],ne=()=>[cS,`auto`,B,z],re=()=>[`auto`,`min`,`max`,`fr`,B,z],ie=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ae=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],oe=()=>[`auto`,...w()],se=()=>[oS,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],E=()=>[e,B,z],ce=()=>[...b(),TS,bS,{position:[B,z]}],le=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ue=()=>[`auto`,`cover`,`contain`,ES,_S,{size:[B,z]}],de=()=>[lS,CS,vS],fe=()=>[``,`none`,`full`,l,B,z],pe=()=>[``,sS,CS,vS],me=()=>[`solid`,`dashed`,`dotted`,`double`],he=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ge=()=>[sS,lS,TS,bS],_e=()=>[``,`none`,m,B,z],ve=()=>[`none`,sS,B,z],ye=()=>[`none`,sS,B,z],be=()=>[sS,B,z],xe=()=>[oS,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[uS],breakpoint:[uS],color:[dS],container:[uS],"drop-shadow":[uS],ease:[`in`,`out`,`in-out`],font:[gS],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[uS],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[uS],shadow:[uS],spacing:[`px`,sS],text:[uS],"text-shadow":[uS],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,oS,z,B,g]}],container:[`container`],columns:[{columns:[sS,z,B,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[cS,`auto`,B,z]}],basis:[{basis:[oS,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[sS,oS,`auto`,`initial`,`none`,z]}],grow:[{grow:[``,sS,B,z]}],shrink:[{shrink:[``,sS,B,z]}],order:[{order:[cS,`first`,`last`,`none`,B,z]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ie(),`normal`]}],"justify-items":[{"justify-items":[...ae(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ae()]}],"align-content":[{content:[`normal`,...ie()]}],"align-items":[{items:[...ae(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ae(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ae(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ae()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:oe()}],mx:[{mx:oe()}],my:[{my:oe()}],ms:[{ms:oe()}],me:[{me:oe()}],mt:[{mt:oe()}],mr:[{mr:oe()}],mb:[{mb:oe()}],ml:[{ml:oe()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:se()}],w:[{w:[s,`screen`,...se()]}],"min-w":[{"min-w":[s,`screen`,`none`,...se()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...se()]}],h:[{h:[`screen`,`lh`,...se()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...se()]}],"max-h":[{"max-h":[`screen`,`lh`,...se()]}],"font-size":[{text:[`base`,n,CS,vS]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,B,yS]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,lS,z]}],"font-family":[{font:[wS,z,t]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,B,z]}],"line-clamp":[{"line-clamp":[sS,`none`,B,yS]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,B,z]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,B,z]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...me(),`wavy`]}],"text-decoration-thickness":[{decoration:[sS,`from-font`,`auto`,B,vS]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[sS,`auto`,B,z]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,B,z]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,B,z]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},cS,B,z],radial:[``,B,z],conic:[cS,B,z]},DS,xS]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:de()}],"gradient-via-pos":[{via:de()}],"gradient-to-pos":[{to:de()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...me(),`hidden`,`none`]}],"divide-style":[{divide:[...me(),`hidden`,`none`]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...me(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[sS,B,z]}],"outline-w":[{outline:[``,sS,CS,vS]}],"outline-color":[{outline:E()}],shadow:[{shadow:[``,`none`,u,OS,SS]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":[`none`,d,OS,SS]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:pe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[sS,vS]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":[`none`,f,OS,SS]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[sS,B,z]}],"mix-blend":[{"mix-blend":[...he(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[sS]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[B,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[sS]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,B,z]}],filter:[{filter:[``,`none`,B,z]}],blur:[{blur:_e()}],brightness:[{brightness:[sS,B,z]}],contrast:[{contrast:[sS,B,z]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,OS,SS]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:[``,sS,B,z]}],"hue-rotate":[{"hue-rotate":[sS,B,z]}],invert:[{invert:[``,sS,B,z]}],saturate:[{saturate:[sS,B,z]}],sepia:[{sepia:[``,sS,B,z]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,B,z]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[sS,B,z]}],"backdrop-contrast":[{"backdrop-contrast":[sS,B,z]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,sS,B,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[sS,B,z]}],"backdrop-invert":[{"backdrop-invert":[``,sS,B,z]}],"backdrop-opacity":[{"backdrop-opacity":[sS,B,z]}],"backdrop-saturate":[{"backdrop-saturate":[sS,B,z]}],"backdrop-sepia":[{"backdrop-sepia":[``,sS,B,z]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,B,z]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[sS,`initial`,B,z]}],ease:[{ease:[`linear`,`initial`,_,B,z]}],delay:[{delay:[sS,B,z]}],animate:[{animate:[`none`,v,B,z]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,B,z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":[`scale-3d`],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[B,z,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":[`translate-none`],accent:[{accent:E()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,B,z]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,B,z]}],fill:[{fill:[`none`,...E()]}],"stroke-w":[{stroke:[sS,CS,vS,yS]}],stroke:[{stroke:[`none`,...E()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),zS=(...e)=>RS(vx(e)),BS=Fd(null);function VS({children:e}){let t=cm(null),n=cm(``),r=cm(`initial`),{lastId:i}=ab();fg(`agent-id`);let{serverUrl:a}=hg(),o=I(async e=>{let n=i.value;if(!n){console.warn(`[ConversationalAI] Cannot submit rating: missing conversation_id`);return}try{t.value=e,r.value=`submitted-rating`,await ih(n,{rating:e},a.value)}catch(e){console.error(`[ConversationalAI] Failed to submit rating:`,e)}},[]),s=I(async()=>{let e=i.value;if(!e){console.warn(`[ConversationalAI] Cannot submit feedback: missing conversation_id`);return}if(t.value===null){console.warn(`[ConversationalAI] Cannot submit feedback: rating not set`);return}if(n.value)try{r.value=`submitted-follow-up`,await ih(e,{rating:t.value,comment:n.value||void 0},a.value)}catch(e){console.error(`[ConversationalAI] Failed to submit feedback:`,e)}},[]),c=I(()=>{t.value=null,n.value=``,r.value=`initial`},[]);hm(()=>{i.value!==null&&c()});let l=mf(()=>({rating:t,feedbackText:n,feedbackProgress:r,submitRating:o,submitFeedback:s,reset:c}),[o,s,c]);return R(BS.Provider,{value:l,children:e})}function HS(){return cg(BS)}var US=Fd(null);function WS({defaultContent:e=`transcript`,children:t}){let n=cm(e),r=cm(!1),i=mf(()=>({currentContent:n,currentConfig:n.value===`feedback`?{showHeaderBack:!0,onHeaderBack:()=>{n.value=`transcript`}}:{showHeaderBack:!1},pendingInputFocus:r}),[n.value]);return R(US.Provider,{value:i,children:t})}function GS(){return cg(US)}var KS={phone:YS,"phone-off":XS,paperclip:ZS,chat:QS,mic:$S,"mic-off":eC,soundwave:tC,check:iC,"chevron-down":nC,"chevron-up":rC,send:aC,star:oC,copy:sC,download:cC,wrap:lC,maximize:dC,minimize:fC,loader:pC,x:mC},qS={xs:`text-xs`,sm:`text-sm`,md:`text-lg`,lg:`text-xl`};function JS({name:e,size:t=`md`,className:n}){let r=KS[e];return R(`slot`,{name:`icon-${e}`,className:vx(`flex`,qS[t],n),"aria-hidden":!0,children:R(r,{})})}function YS(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 18 18`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:R(`path`,{d:`M3.7489 2.25C2.93286 2.25 2.21942 2.92142 2.27338 3.7963C2.6686 10.2041 7.79483 15.3303 14.2026 15.7255C15.0775 15.7795 15.7489 15.066 15.7489 14.25V11.958C15.7489 11.2956 15.3144 10.7116 14.6799 10.5213L12.6435 9.91035C12.1149 9.75179 11.542 9.89623 11.1518 10.2864L10.5901 10.8482C9.15291 10.0389 7.95998 8.84599 7.15074 7.40881L7.71246 6.84709C8.10266 6.45689 8.24711 5.88396 8.08854 5.35541L7.47761 3.31898C7.28727 2.6845 6.70329 2.25 6.04087 2.25H3.7489Z`})})}function XS(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 19 18`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[R(`path`,{d:`M16.0303 3.53033C16.3232 3.23744 16.3232 2.76256 16.0303 2.46967C15.7374 2.17678 15.2626 2.17678 14.9697 2.46967L8.6271 8.81224C8.25925 8.3778 7.93185 7.90804 7.65074 7.40881L8.21246 6.84709C8.60266 6.45689 8.74711 5.88396 8.58854 5.35541L7.97761 3.31898C7.78727 2.6845 7.20329 2.25 6.54087 2.25H4.2489C3.43286 2.25 2.71942 2.92142 2.77338 3.7963C2.95462 6.73468 4.13069 9.40357 5.96899 11.4703L2.96967 14.4697C2.67678 14.7626 2.67678 15.2374 2.96967 15.5303C3.26256 15.8232 3.73744 15.8232 4.03033 15.5303L16.0303 3.53033Z`}),R(`path`,{d:`M14.7026 15.7255C12.2994 15.5773 10.0765 14.7636 8.21584 13.4665L10.9278 10.7545C10.9815 10.7863 11.0356 10.8175 11.0901 10.8482L11.6518 10.2864C12.042 9.89623 12.6149 9.75179 13.1435 9.91035L15.1799 10.5213C15.8144 10.7116 16.2489 11.2956 16.2489 11.958V14.25C16.2489 15.066 15.5775 15.7795 14.7026 15.7255Z`})]})}function ZS(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`path`,{d:`M13.234 20.252 21 12.3`}),R(`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486`})]})}function QS(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 19.25 16.5`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:R(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M9.62501 0C12.468 0 14.8748 0.737978 16.5834 2.16927C18.3067 3.61283 19.25 5.70467 19.25 8.25C19.25 10.7953 18.3067 12.8872 16.5834 14.3307C14.8748 15.762 12.468 16.5 9.62501 16.5C8.07283 16.5 6.35212 16.3511 4.82753 15.6549C4.80704 15.667 4.78576 15.6793 4.76373 15.6919C4.508 15.8383 4.14334 16.0229 3.70626 16.1752C2.84316 16.4761 1.61386 16.6782 0.392042 16.0967C0.205543 16.0079 0.0688354 15.84 0.0197227 15.6394C-0.0293882 15.4387 0.0142992 15.2267 0.138705 15.0618C1.46111 13.3092 1.06848 12.2379 1.052 12.193C1.052 12.193 1.05072 12.1895 1.04678 12.1801L1.03931 12.1625L1.02838 12.1365C0.958706 11.9688 0.706686 11.3495 0.470952 10.6108C0.242207 9.89392 5.99197e-06 8.97868 5.99197e-06 8.25C5.99197e-06 5.70467 0.943343 3.61283 2.6666 2.16927C4.37521 0.737978 6.78205 0 9.62501 0ZM4.58333 8.25C4.58333 8.75626 4.99374 9.16667 5.5 9.16667C6.00626 9.16667 6.41667 8.75626 6.41667 8.25C6.41667 7.74374 6.00626 7.33333 5.5 7.33333C4.99374 7.33333 4.58333 7.74374 4.58333 8.25ZM8.70833 8.25C8.70833 8.75626 9.11874 9.16667 9.625 9.16667C10.1313 9.16667 10.5417 8.75626 10.5417 8.25C10.5417 7.74374 10.1313 7.33333 9.625 7.33333C9.11874 7.33333 8.70833 7.74374 8.70833 8.25ZM13.75 9.16667C13.2437 9.16667 12.8333 8.75626 12.8333 8.25C12.8333 7.74374 13.2437 7.33333 13.75 7.33333C14.2563 7.33333 14.6667 7.74374 14.6667 8.25C14.6667 8.75626 14.2563 9.16667 13.75 9.16667Z`})})}function $S(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 19 18`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[R(`path`,{d:`M9.50008 1.5C7.42901 1.5 5.75008 3.17893 5.75008 5.25V8.25C5.75008 10.3211 7.42901 12 9.50008 12C11.5712 12 13.2501 10.3211 13.2501 8.25V5.25C13.2501 3.17893 11.5712 1.5 9.50008 1.5Z`}),R(`path`,{d:`M4.88997 10.8417C4.66448 10.4943 4.20002 10.3954 3.85256 10.6209C3.50509 10.8463 3.40621 11.3108 3.63169 11.6583C4.47442 12.9569 6.08493 14.6838 8.75008 14.9616V15.75C8.75008 16.1642 9.08587 16.5 9.50008 16.5C9.9143 16.5 10.2501 16.1642 10.2501 15.75V14.9616C12.9152 14.6838 14.5257 12.9569 15.3685 11.6583C15.594 11.3108 15.4951 10.8463 15.1476 10.6209C14.8001 10.3954 14.3357 10.4943 14.1102 10.8417C13.3305 12.0432 11.9002 13.5 9.50008 13.5C7.1 13.5 5.66968 12.0432 4.88997 10.8417Z`})]})}function eC(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 19 18`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[R(`path`,{d:`M13.25 8.25C13.25 8.64791 13.188 9.03135 13.0732 9.39119L6.57947 2.8975C7.26687 2.04521 8.31974 1.5 9.49995 1.5C11.571 1.5 13.25 3.17893 13.25 5.25V8.25Z`}),R(`path`,{d:`M2.21967 1.71967C2.51256 1.42678 2.98744 1.42678 3.28033 1.71967L16.7803 15.2197C17.0732 15.5126 17.0732 15.9874 16.7803 16.2803C16.4874 16.5732 16.0126 16.5732 15.7197 16.2803L13.2828 13.8435C12.4719 14.4022 11.4678 14.8338 10.25 14.9614V15.75C10.25 16.1642 9.91422 16.5 9.50001 16.5C9.08579 16.5 8.75001 16.1642 8.75001 15.75V14.9616C6.08485 14.6838 4.47434 12.9569 3.63162 11.6583C3.40614 11.3108 3.50502 10.8463 3.85248 10.6209C4.19995 10.3954 4.66441 10.4943 4.88989 10.8417C5.6696 12.0432 7.09993 13.5 9.50001 13.5C10.5978 13.5 11.4845 13.1981 12.1992 12.7598L11.0875 11.6482C10.605 11.8739 10.0667 12 9.50001 12C7.42894 12 5.75001 10.3211 5.75001 8.25V6.31067L2.21967 2.78033C1.92678 2.48744 1.92678 2.01256 2.21967 1.71967Z`})]})}function tC(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 18 18`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[R(`rect`,{x:`1.5`,y:`6.75`,width:`2`,height:`4.5`,rx:`1`}),R(`rect`,{x:`5`,y:`4.5`,width:`2`,height:`9`,rx:`1`}),R(`rect`,{x:`8.5`,y:`2.25`,width:`2`,height:`13.5`,rx:`1`}),R(`rect`,{x:`12`,y:`4.5`,width:`2`,height:`9`,rx:`1`}),R(`rect`,{x:`15.5`,y:`6.75`,width:`2`,height:`4.5`,rx:`1`})]})}function nC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:R(`path`,{d:`m6 9 6 6 6-6`})})}function rC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:R(`path`,{d:`m18 15-6-6-6 6`})})}function iC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:R(`path`,{d:`M20 6 9 17l-5-5`})})}function aC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 20 20`,fill:`currentColor`,...e,children:R(`path`,{d:`M4.64337 17.6645C3.243 18.1313 1.97185 16.6817 2.6176 15.3543L8.50148 3.25965C9.10962 2.00957 10.8908 2.00958 11.4989 3.25965L17.3828 15.3543C18.0286 16.6817 16.7574 18.1313 15.357 17.6645L10.8334 16.1567L10.8334 12.5005C10.8334 12.0403 10.4603 11.6672 10 11.6672C9.5398 11.6672 9.16671 12.0403 9.16671 12.5005L9.16671 16.1568L4.64337 17.6645Z`})})}function oC(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 21 20`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:R(`path`,{d:`M11.8621 0.854898C11.3145 -0.284967 9.68804 -0.284965 9.1404 0.854899L6.77181 5.78487C6.77181 5.78487 6.76902 5.78867 6.7646 5.78925L1.31499 6.50272C0.0591912 6.66713 -0.452868 8.21568 0.474832 9.09033L4.45896 12.8466C4.46075 12.8483 4.46059 12.8502 4.46059 12.8502L3.46003 18.2169C3.22657 19.4691 4.55184 20.4152 5.66108 19.8172L10.4957 17.2111C10.4991 17.2093 10.5035 17.2093 10.5068 17.2111L15.3415 19.8172C16.4507 20.4152 17.776 19.4691 17.5425 18.2169L16.542 12.8502C16.542 12.8502 16.5418 12.8483 16.5436 12.8466L20.5277 9.09033C21.4554 8.21568 20.9434 6.66713 19.6876 6.50272L14.2379 5.78925C14.2335 5.78867 14.2307 5.78487 14.2307 5.78487L11.8621 0.854898Z`})})}function sC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),R(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})}function cC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),R(`polyline`,{points:`7 10 12 15 17 10`}),R(`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`})]})}function lC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`line`,{x1:`3`,x2:`21`,y1:`6`,y2:`6`}),R(`path`,{d:`M3 12h15a3 3 0 1 1 0 6h-4`}),R(`polyline`,{points:`16 16 14 18 16 20`}),R(`line`,{x1:`3`,x2:`10`,y1:`18`,y2:`18`})]})}function uC({orbColor:e,circleBackgroundColor:t,starColor:n,className:r}){return R(`slot`,{name:`icon-feedback`,className:vx(`flex`,r),"aria-hidden":!0,children:R(`svg`,{width:`100%`,height:`100%`,viewBox:`0 0 82 88`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[R(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M9 42C9 59.6731 23.3269 74 41 74C58.6731 74 73 59.6731 73 42C73 24.3269 58.6731 10 41 10C23.3269 10 9 24.3269 9 42ZM29.4529 18.5973C31.1347 18.0574 32.8641 17.5023 34.9844 16.6005C42.2533 13.5091 48.3526 11.9217 51.7782 14.094C53.5063 15.1899 54.4051 16.7749 55.6117 18.9024C56.7969 20.9922 58.279 23.6057 61.1358 26.7937C62.2737 28.0636 63.3886 29.2195 64.4371 30.3064C68.7007 34.7263 71.8645 38.0061 70.9949 43.1697C70.2965 47.316 67.9794 49.4559 65.6038 51.65C63.4317 53.656 61.2107 55.7073 60.1332 59.3786C57.8774 67.0653 53.5327 71.9113 48.3526 72.7468C43.1725 73.5823 36.6555 75.1698 29.8043 70.1567C26.1949 67.5157 25.229 64.3182 24.1947 60.894C23.2657 57.8184 22.2814 54.56 19.2768 51.3577C14.1619 45.9062 10.2533 29.6345 19.2768 23.0339C23.736 20.4327 26.5223 19.5382 29.4529 18.5973Z`,fill:e,"fill-opacity":`0.15`,stroke:e,"stroke-opacity":`0.35`}),R(`path`,{d:`M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988`,stroke:e,"stroke-opacity":`0.35`}),R(`path`,{d:`M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988`,stroke:e,"stroke-opacity":`0.35`}),R(`path`,{d:`M21.9366 68.1987C21.3549 66.5119 21.0386 60.9231 28.1376 53.3448C37.0114 43.8719 40.5 43.9579 51.4911 31.7482C59.5691 22.7747 59.1723 17.0524 58.0993 15.4626`,stroke:e,"stroke-opacity":`0.35`}),R(`path`,{d:`M9.26819 42.161C10.4003 43.5337 15.6951 46.3853 25.7661 44.3926C38.3548 41.9018 52.434 40.307 57.694 41.0287C70.352 42.7655 71.4138 51.3035 71.4138 51.3035`,stroke:e,"stroke-opacity":`0.35`}),R(`path`,{d:`M22 16.4916C18.815 21.85 19.6451 26.0591 27.9943 32.0828C38.4307 39.6124 50.2985 48.8304 53.5024 53.1027C58.6684 59.9914 59.5 67.928 59.5 67.928`,stroke:e,"stroke-opacity":`0.35`}),R(`rect`,{x:`9.26099`,y:`10`,width:`63.7129`,height:`63.7129`,rx:`31.8565`,stroke:e,"stroke-opacity":`0.43`,"stroke-width":`1.5`}),R(`g`,{"clip-path":`url(#clip0_7006_42127)`,children:[R(`circle`,{cx:`62.4996`,cy:`18.2032`,r:`15.0195`,transform:`rotate(6.27205 62.4996 18.2032)`,fill:t}),R(`path`,{d:`M60.7142 12.1753C62.057 10.0714 65.2294 10.4202 66.0833 12.7654L66.6158 14.2308L68.1251 14.6217C70.5415 15.2484 71.1908 18.3742 69.2237 19.911L67.9944 20.8704L68.0896 22.4262C68.2403 24.9178 65.4681 26.5011 63.3987 25.1056L62.1065 24.2326L60.6555 24.8041C58.3322 25.7172 55.9702 23.5694 56.6585 21.1698L57.0884 19.6717L56.0977 18.4684C54.5112 16.541 55.8231 13.6307 58.318 13.5438L59.8751 13.4899L60.7142 12.1753Z`,fill:n,stroke:t,"stroke-width":`3.27381`}),R(`path`,{d:`M63.925 5.23719C71.0867 6.02431 76.2545 12.4676 75.4676 19.6293C74.6805 26.7911 68.2364 31.959 61.0746 31.1718C53.9129 30.3845 48.7459 23.9406 49.533 16.7789C50.3203 9.61739 56.7634 4.45029 63.925 5.23719ZM63.6957 7.32326C57.6866 6.66302 52.2797 10.9991 51.6191 17.0082C50.9586 23.0174 55.2946 28.4251 61.3038 29.0858C67.3132 29.7462 72.7211 25.4094 73.3816 19.4C74.0418 13.3908 69.705 7.98372 63.6957 7.32326Z`,fill:n,stroke:t,"stroke-width":`0.3`,"stroke-linecap":`round`,"stroke-linejoin":`round`})]}),R(`ellipse`,{cx:`41`,cy:`85`,rx:`15`,ry:`3`,fill:e,"fill-opacity":`0.35`}),R(`defs`,{children:R(`clipPath`,{id:`clip0_7006_42127`,children:R(`rect`,{width:`33`,height:`33`,fill:`white`,transform:`translate(47.9012) rotate(6.27205)`})})})]})})}function dC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`path`,{d:`M15 3h6v6`}),R(`path`,{d:`m21 3-7 7`}),R(`path`,{d:`m3 21 7-7`}),R(`path`,{d:`M9 21H3v-6`})]})}function fC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`path`,{d:`m14 10 7-7`}),R(`path`,{d:`M20 10h-6V4`}),R(`path`,{d:`m3 21 7-7`}),R(`path`,{d:`M4 14h6v6`})]})}function pC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:R(`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`})})}function mC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`path`,{d:`M18 6 6 18`}),R(`path`,{d:`m6 6 12 12`})]})}function hC(e){return R(fx().value?gC:_C,{...e})}function gC({visible:e,className:t,grow:n,dep:r,...i}){return e?R(`div`,{className:vx(n&&`grow`,t),...i}):null}function _C({visible:e,children:t,className:n,grow:r,dep:i,...a}){let[o,s]=lf(e),[c,l]=lf(null),[u,d]=lf(null),f=F(t);e&&(f.current=t);let p=I(t=>{l(t),t&&!e&&(t.style.width=`0px`,t.style.height=`0px`)},[]);df(()=>{u&&(u.style.transition=`none`,u.style.opacity=`0`,u.offsetWidth,u.style.transition=``,u.style.opacity=``)},[i]),mf(()=>{c&&(c.style.width=`${c.offsetWidth}px`,c.style.height=`${c.offsetHeight}px`)},[c,e,i]),df(()=>{if(!c||!u)return;e&&s(!0);let t=e?u.offsetWidth:0,n=e?u.offsetHeight:0;c.style.width=!e||c.offsetWidth!==t?`${t}px`:``,c.style.height=!e||c.offsetHeight!==n?`${n}px`:``},[c,u,e,i]);let{transitioning:m,handlers:h}=px({onEnd:()=>{e?(c.style.width=``,c.style.height=``):s(!1)}});return R(`div`,{ref:p,className:vx(`relative inline-flex shrink-0 justify-center items-center transition-[opacity,width,height,transform,flex-grow] duration-200 min-w-0`,!e&&`opacity-0 scale-75`,e&&r&&`grow`,e&&o&&!m.value&&`z-1`),...h,children:R(`div`,{ref:d,className:vx(`shrink-0 min-h-min min-w-min transition-opacity duration-200`,r&&`grow`,n),...a,children:(e||o)&&f.current})})}var vC={primary:`text-accent-primary border border-accent bg-accent hover:border-accent-hover hover:bg-accent-hover active:border-accent-active active:bg-accent-active`,secondary:`text-base-primary border border-base-border bg-base hover:bg-base-hover active:bg-base-active`,ghost:`text-base-primary border border-base bg-base hover:bg-base-hover hover:border-base-hover active:bg-base-active active:border-base-active`,"md-button":`text-base-primary border border-base-border bg-base hover:bg-base-hover active:bg-base-active text-sm h-6`},yC=Lf(function({variant:e=`secondary`,children:t,icon:n,className:r,iconClassName:i,truncate:a=!0,...o},s){let c=!!n&&!t;return R(`button`,{ref:s,className:zS(`h-9 flex px-2.5 text-sm items-center transition-[colors,opacity] justify-center rounded-button duration-200 focus-ring overflow-hidden select-none`,`disabled:opacity-50 disabled:pointer-events-none`,vC[e],c&&`min-w-9`,r),type:`button`,...o,children:[n&&R(JS,{className:zS(`transition-[margin] duration-200`,c&&`-mx-0.5`,e===`md-button`&&`text-sm`,i),name:n}),R(hC,{visible:!!t,dep:t,children:R(`span`,{className:zS(`block whitespace-nowrap max-w-64 truncate`,e===`md-button`?`pl-1.5`:`px-1.5`),children:t})})]})}),bC=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e),xC=({isFilled:e,iconName:t})=>R(`span`,{className:vx(`w-8 h-8 grid place-content-center`,e?`text-base-primary`:`text-base-border`),children:R(JS,{name:t,size:`lg`})}),SC=({value:e,rating:t,hoverRating:n,onClick:r,onHover:i,onKeyDown:a,iconName:o})=>{let s=t.value!==null&&e<=t.value,c=n.value!==null&&e<=n.value,l=I(t=>{t.stopPropagation(),r(e)},[r,e]),u=I(t=>{a(t,e)},[a,e]);return R(`button`,{type:`button`,role:`radio`,"aria-checked":s,"aria-label":e.toString(),onMouseEnter:()=>i(e),onClick:l,onKeyDown:u,className:vx(`w-8 h-8 grid place-content-center rounded-full focus-ring transition-colors cursor-pointer`,s||c?`text-base-primary`:`text-base-border`),children:R(JS,{name:o,size:`lg`})})},CC=({onRate:e,min:t=1,max:n=5,ariaLabel:r,icon:i=`star`})=>{let a=cm(null),o=cm(null),s=bC(t,n),c=I(e=>{o.value=e},[o]),l=I(()=>{o.value=null},[o]),u=I(t=>{a.value=t,e(t)},[a,e]),d=I((r,i)=>{r.key===`Enter`||r.key===` `?(r.preventDefault(),a.value=i,e(i)):r.key===`ArrowLeft`||r.key===`ArrowDown`?(r.preventDefault(),i-1>=t&&(r.currentTarget?.previousElementSibling)?.focus()):(r.key===`ArrowRight`||r.key===`ArrowUp`)&&(r.preventDefault(),i+1<=n&&(r.currentTarget?.nextElementSibling)?.focus())},[a,e,t,n]);return R(`div`,{role:`radiogroup`,"aria-label":r,className:`flex no-wrap cursor-pointer`,onMouseLeave:l,children:s.map(e=>R(SC,{value:e,rating:a,hoverRating:o,onClick:u,onHover:c,onKeyDown:d,iconName:i},e))})};function wC({rating:e,min:t=1,max:n=5,icon:r=`star`}){let i=bC(t,n);return R(`div`,{className:`flex no-wrap`,role:`img`,"aria-label":`Rating: ${e} out of ${n}`,children:i.map(t=>R(xC,{isFilled:e>=t,iconName:r},t))})}function TC({icon:e,onRate:t}){let n=Rb();return R(`div`,{className:`flex flex-col items-center`,children:[R(`div`,{className:`text-sm text-base-primary font-medium`,children:n.initiate_feedback}),R(`div`,{className:`py-4`,children:R(CC,{onRate:t,ariaLabel:n.initiate_feedback,icon:e})})]})}function EC({icon:e,rating:t,showFollowUpButton:n,onFollowUpClick:r}){let i=Rb();return R(`div`,{className:`flex flex-col items-center gap-3 mb-4`,children:[R(`div`,{className:`text-sm text-base-primary font-medium`,children:i.thanks_for_feedback}),R(wC,{rating:t,min:1,max:5,icon:e}),n&&R(yC,{variant:`secondary`,onClick:r,children:i.request_follow_up_feedback})]})}function DC({icon:e=`star`}){let{currentContent:t}=GS(),{rating:n,feedbackProgress:r,submitRating:i}=HS(),a=r.value!==`initial`&&n.value!==null,o=I(e=>{i(e),t.value=`feedback`},[i]),s=I(()=>{t.value=`feedback`},[]);return a?R(EC,{icon:e,rating:n.value??0,showFollowUpButton:r.value!==`submitted-follow-up`,onFollowUpClick:s}):R(TC,{icon:e,onRate:o})}var OC=/\[[\w\s]+\](?!\()/,kC=`font-medium py-px px-1 border border-audio-tag/20 rounded-button whitespace-nowrap text-audio-tag`;function AC(e){let t=[],n=new RegExp(OC,`g`),r=0;for(let i of e.matchAll(n))i.index!==void 0&&(i.index>r&&t.push({type:`text`,content:e.slice(r,i.index)}),t.push({type:`audioTag`,content:i[0]}),r=i.index+i[0].length);return r<e.length&&t.push({type:`text`,content:e.slice(r)}),t}function jC({text:e,className:t}){return R(ud,{children:mf(()=>AC(e),[e]).map((e,n)=>e.type===`audioTag`?R(`span`,{"data-audio-tag":!0,className:zS(kC,t),children:e.content},n):R(ud,{children:e.content},n))})}function MC(e){return e.replace(RegExp(`${OC.source}\\s*`,`g`),``).trim()}var NC=typeof self==`object`?self:globalThis,PC=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new NC[e](t)},FC=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(PC(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(PC(a,o),i)};return r},IC=e=>FC(new Map,e)(0),LC=``,{toString:RC}={},{keys:zC}=Object,BC=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=RC.call(e).slice(8,-1);switch(n){case`Array`:return[1,LC];case`Object`:return[2,LC];case`Date`:return[3,LC];case`RegExp`:return[4,LC];case`Map`:return[5,LC];case`Set`:return[6,LC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},VC=([e,t])=>e===0&&(t===`function`||t===`symbol`),HC=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=BC(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of zC(r))(e||!VC(BC(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(VC(BC(n))||VC(BC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!VC(BC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},UC=(e,{json:t,lossy:n}={})=>{let r=[];return HC(!(t||n),!!t,new Map,r)(e),r},WC=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?IC(UC(e,t)):structuredClone(e):(e,t)=>IC(UC(e,t)),GC=qC(`end`),KC=qC(`start`);function qC(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function JC(e){let t=KC(e),n=GC(e);if(t&&n)return{start:t,end:n}}var YC=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],XC={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...YC,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...YC],h2:[[`className`,`sr-only`]],img:[...YC,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...YC,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...YC],table:[...YC],ul:[...YC,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},ZC={}.hasOwnProperty;function QC(e,t){let n={type:`root`,children:[]},r=$C({schema:t?{...XC,...t}:XC,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function $C(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return ew(e,n);case`doctype`:return tw(e,n);case`element`:return nw(e,n);case`root`:return rw(e,n);case`text`:return iw(e,n);default:}}}function ew(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return dw(r,t),r}}function tw(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return dw(e,t),e}}function nw(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=aw(e,t.children),i=ow(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&ZC.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return dw(o,t),o}function rw(e,t){let n={type:`root`,children:aw(e,t.children)};return dw(n,t),n}function iw(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return dw(n,t),n}function aw(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=$C(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function ow(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&ZC.call(r,n)?r[n]:void 0,o=r&&ZC.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(ZC.call(s,l)){let t=s[l],n=sw(e,fw(a,l),l,t);n??=sw(e,fw(o,l),l,t),n!=null&&(c[l]=n)}if(i&&ZC.call(i,n)){let e=i[n];for(l in e)ZC.call(e,l)&&!ZC.call(c,l)&&(c[l]=e[l])}return c}function sw(e,t,n,r){return t?Array.isArray(r)?cw(e,t,n,r):lw(e,t,n,r):void 0}function cw(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=lw(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function lw(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&uw(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function uw(e,t,n){let r=e.schema.protocols&&ZC.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function dw(e,t){let n=JC(t);t.data&&(e.data=WC(t.data)),n&&(e.position=n)}function fw(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function pw(e){return function(t){return QC(t,e)}}var mw=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};mw.prototype.normal={},mw.prototype.property={},mw.prototype.space=void 0;function hw(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new mw(n,r,t)}function gw(e){return e.toLowerCase()}var _w=class{constructor(e,t){this.attribute=t,this.property=e}};_w.prototype.attribute=``,_w.prototype.booleanish=!1,_w.prototype.boolean=!1,_w.prototype.commaOrSpaceSeparated=!1,_w.prototype.commaSeparated=!1,_w.prototype.defined=!1,_w.prototype.mustUseProperty=!1,_w.prototype.number=!1,_w.prototype.overloadedBoolean=!1,_w.prototype.property=``,_w.prototype.spaceSeparated=!1,_w.prototype.space=void 0;var vw=gh({boolean:()=>bw,booleanish:()=>xw,commaOrSpaceSeparated:()=>Tw,commaSeparated:()=>ww,number:()=>V,overloadedBoolean:()=>Sw,spaceSeparated:()=>Cw}),yw=0,bw=Ew(),xw=Ew(),Sw=Ew(),V=Ew(),Cw=Ew(),ww=Ew(),Tw=Ew();function Ew(){return 2**++yw}var Dw=Object.keys(vw),Ow=class extends _w{constructor(e,t,n,r){let i=-1;if(super(e,t),kw(this,`space`,r),typeof n==`number`)for(;++i<Dw.length;){let e=Dw[i];kw(this,Dw[i],(n&vw[e])===vw[e])}}};Ow.prototype.defined=!0;function kw(e,t,n){n&&(e[t]=n)}function Aw(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ow(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gw(r)]=r,n[gw(a.attribute)]=r}return new mw(t,n,e.space)}var jw=Aw({properties:{ariaActiveDescendant:null,ariaAtomic:xw,ariaAutoComplete:null,ariaBusy:xw,ariaChecked:xw,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Cw,ariaCurrent:null,ariaDescribedBy:Cw,ariaDetails:null,ariaDisabled:xw,ariaDropEffect:Cw,ariaErrorMessage:null,ariaExpanded:xw,ariaFlowTo:Cw,ariaGrabbed:xw,ariaHasPopup:null,ariaHidden:xw,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Cw,ariaLevel:V,ariaLive:null,ariaModal:xw,ariaMultiLine:xw,ariaMultiSelectable:xw,ariaOrientation:null,ariaOwns:Cw,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:xw,ariaReadOnly:xw,ariaRelevant:null,ariaRequired:xw,ariaRoleDescription:Cw,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:xw,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Mw(e,t){return t in e?e[t]:t}function Nw(e,t){return Mw(e,t.toLowerCase())}var Pw=Aw({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ww,acceptCharset:Cw,accessKey:Cw,action:null,allow:null,allowFullScreen:bw,allowPaymentRequest:bw,allowUserMedia:bw,alt:null,as:null,async:bw,autoCapitalize:null,autoComplete:Cw,autoFocus:bw,autoPlay:bw,blocking:Cw,capture:null,charSet:null,checked:bw,cite:null,className:Cw,cols:V,colSpan:null,content:null,contentEditable:xw,controls:bw,controlsList:Cw,coords:V|ww,crossOrigin:null,data:null,dateTime:null,decoding:null,default:bw,defer:bw,dir:null,dirName:null,disabled:bw,download:Sw,draggable:xw,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:bw,formTarget:null,headers:Cw,height:V,hidden:Sw,high:V,href:null,hrefLang:null,htmlFor:Cw,httpEquiv:Cw,id:null,imageSizes:null,imageSrcSet:null,inert:bw,inputMode:null,integrity:null,is:null,isMap:bw,itemId:null,itemProp:Cw,itemRef:Cw,itemScope:bw,itemType:Cw,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:bw,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:bw,muted:bw,name:null,nonce:null,noModule:bw,noValidate:bw,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:bw,optimum:V,pattern:null,ping:Cw,placeholder:null,playsInline:bw,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:bw,referrerPolicy:null,rel:Cw,required:bw,reversed:bw,rows:V,rowSpan:V,sandbox:Cw,scope:null,scoped:bw,seamless:bw,selected:bw,shadowRootClonable:bw,shadowRootDelegatesFocus:bw,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:xw,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:bw,useMap:null,value:xw,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Cw,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:bw,declare:bw,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:bw,noHref:bw,noShade:bw,noWrap:bw,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:xw,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:bw,disableRemotePlayback:bw,prefix:null,property:null,results:V,security:null,unselectable:null},space:`html`,transform:Nw}),Fw=Aw({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Tw,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Cw,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:bw,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ww,g2:ww,glyphName:ww,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Tw,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Cw,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Tw,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tw,rev:Tw,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tw,requiredFeatures:Tw,requiredFonts:Tw,requiredFormats:Tw,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Tw,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Tw,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Tw,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Mw}),Iw=Aw({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Lw=Aw({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Nw}),Rw=Aw({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),zw={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Bw=/[A-Z]/g,Vw=/-[a-z]/g,Hw=/^data[-\w.:]+$/i;function Uw(e,t){let n=gw(t),r=t,i=_w;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Hw.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Vw,Gw);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Vw.test(e)){let n=e.replace(Bw,Ww);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ow}return new i(r,t)}function Ww(e){return`-`+e.toLowerCase()}function Gw(e){return e.charAt(1).toUpperCase()}var Kw=hw([jw,Pw,Iw,Lw,Rw],`html`),qw=hw([jw,Fw,Iw,Lw,Rw],`svg`);function Jw(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Yw(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Xw=/[#.]/g;function Zw(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Xw.lastIndex=i;let e=Xw.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Qw(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function $w(e){return e.join(` `).trim()}function eT(e,t,n){let r=n?oT(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Zw(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,tT(i))a.unshift(i);else for(let[t,n]of Object.entries(i))nT(e,o.properties,t,n)}for(let e of a)rT(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function tT(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function nT(e,t,n,r){let i=Uw(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Qw(r):i.commaSeparated?Jw(r):i.commaOrSpaceSeparated?Qw(Jw(r).join(` `)):iT(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?aT(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(iT(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function rT(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)rT(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?rT(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function iT(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||gw(n)===gw(t)))return!0}return n}function aT(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function oT(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var sT=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),cT=eT(Kw,`div`),lT=eT(qw,`g`,sT);function uT(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=dT(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=dT(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function dT(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
279
|
+
\`\`\``),o}}}function Ky(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{let e=new XMLHttpRequest;e.open(`get`,`https://m1.openfpcdn.io/fingerprintjs/v${kg}/npm-monitoring`,!0),e.send()}catch(e){console.error(e)}}async function qy(e={}){let{delayFallback:t,debug:n,monitoring:r=!0}=e;return r&&Ky(),await Wy(t),Gy(Fy({cache:{},debug:n}),n)}var Jy={load:qy,hashComponents:Hy,componentsToDebugString:Vy},Yy=Fd(null);function Xy({children:e}){let t=bb(),n=cm(!1),r=cm(!1),i=mf(()=>{let e=Kp(()=>!t.value.terms_html||r.value),i=[];return{termsShown:n,termsAccepted:e,dismissTerms:()=>{n.value=!1,i.forEach(e=>e.reject()),i=[]},acceptTerms:()=>{r.value=!0,n.value=!1;let e=t.peek().terms_key;e&&localStorage.setItem(e,`true`),i.forEach(e=>e.resolve()),i=[]},requestTerms:async()=>{e.peek()||(n.value=!0,await new Promise((e,t)=>{i.push({resolve:e,reject:t})}))}}},[n,r,t]);return hm(()=>{let e=t.value.terms_key;r.value=e?!!localStorage.getItem(e):!1}),R(Yy.Provider,{value:i,children:e})}function Zy(){return cg(Yy)}var Qy=Fd(null);function $y({children:e}){let t=cm(null),n=I(e=>{t.value=tb(e)},[t]);return R(Qy.Provider,{value:t,children:[R(`template`,{ref:n}),e]})}function eb(){return cg(Qy)}function tb(e){if(!e)return null;let t=e?.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}var nb=Fd(null);function rb(e,t){if(t.role!==`user`||t.eventId==null)return[...e,t];let n=e.findIndex(e=>e.type===`message`&&e.role===`agent`&&e.eventId===t.eventId&&e.conversationIndex===t.conversationIndex);return n===-1?[...e,t]:[...e.slice(0,n),t,...e.slice(n)]}function ib({children:e}){let t=sb();return hm(()=>{if(t.conversationTextOnly.value===!0){t.transcript.value;let e=setTimeout(()=>{t.endSession()},600*1e3);return()=>{clearTimeout(e)}}}),R(nb.Provider,{value:t,children:e})}function ab(){return cg(nb)}function ob(){let{status:e}=ab();return L(()=>e.value===`disconnecting`||e.value===`connecting`)}function sb(){let e=F(null),t=F(null),n=F(!1),r=F(null),i=F(!1),a=F(null),o=eb(),s=fb(),c=hb(),l=Zy(),u=Og(),d=()=>{a.current&&=(clearTimeout(a.current),null)};return df(()=>()=>{e.current?.endSession(),d()},[]),mf(()=>{let f=Vp(`disconnected`),p=Kp(()=>f.value===`disconnected`),m=Vp(`listening`),h=Kp(()=>m.value===`speaking`),g=Vp(null),_=Vp(null),v=Vp(!1),y=Vp([]),b=Vp(0),x=Vp(null),S=Vp(!1),C=Vp(!1),w=(e,t)=>{d(),S.value=e,e&&t&&(a.current=setTimeout(()=>{S.value=!1},t))};return{status:f,isSpeaking:h,mode:m,isDisconnected:p,lastId:_,error:g,canSendFeedback:v,conversationIndex:b,conversationTextOnly:x,transcript:y,isAgentTyping:S,isExternalAgentMode:C,startSession:async(a,p)=>{if(await l.requestTerms(),e.current?.isOpen())return e.current.getId();if(t.current)return(await t.current).getId();let h=structuredClone(u.peek());h.userId||=await cb(),p&&s.value.supports_text_only&&(h.textOnly=!0,s.value.text_only||(h.overrides??={},h.overrides.conversation??={},h.overrides.conversation.textOnly=!0));try{h=lb(o.value??a,h)}catch(e){console.error(`[ConversationalAI] Error triggering call event:`,e)}x.value=h.textOnly??!1,y.value=p?[{type:`message`,role:`user`,message:p,isText:!0,conversationIndex:b.peek()}]:[];try{if(t.current=ch.startSession({...h,onModeChange:e=>{m.value=e.mode},onStatusChange:e=>{f.value=e.status},onCanSendFeedbackChange:e=>{v.value=e.canSendFeedback},onMessage:({role:e,message:t,event_id:a})=>{if(c.peek()&&x.peek()===!0&&e===`agent`&&!n.current){n.current=!0;return}else e===`agent`&&(n.current=!0,w(!1));if(e===`agent`&&i.current){let e=r.current;if(e!==null){let n=[...y.peek()];n[e]={type:`message`,role:`agent`,message:t,isText:!0,conversationIndex:b.peek(),eventId:a},y.value=n}i.current=!1;return}y.value=rb(y.peek(),{type:`message`,role:e,message:t,isText:!1,conversationIndex:b.peek(),eventId:a})},onAgentChatResponsePart:({text:e,type:t,event_id:a})=>{if(x.peek()===!0&&!(c.peek()&&!n.current))if(w(!1),t===`start`){i.current=!0;let e=y.peek();r.current=e.length,y.value=[...e,{type:`message`,role:`agent`,message:``,isText:!0,conversationIndex:b.peek(),eventId:a}]}else if(t===`delta`){let t=r.current;if(t!==null&&e){let n=y.peek(),r=n[t];if(r.type===`message`){let i=[...n];i[t]={...r,message:r.message+e},y.value=i}}}else t===`stop`&&(r.current=null)},onAgentToolRequest:({tool_call_id:e,tool_name:t,event_id:n})=>{y.value=[...y.peek(),{type:`agent_tool_request`,toolName:t,toolCallId:e,eventId:n,conversationIndex:b.peek()}]},onAgentToolResponse:({tool_call_id:e,is_error:t,event_id:n})=>{y.value=[...y.peek(),{type:`agent_tool_response`,toolCallId:e,eventId:n,isError:t,conversationIndex:b.peek()}]},onAgentTyping:({is_typing:e,duration_ms:t})=>{w(e,t)},onExternalAgentConnected:()=>{C.value=!0},onDisconnect:e=>{n.current=!1,x.value=null,r.current=null,i.current=!1,d(),S.value=!1,C.value=!1,y.value=[...y.peek(),e.reason===`error`?{type:`error`,message:e.message,conversationIndex:b.peek()}:{type:`disconnection`,role:e.reason===`user`?`user`:`agent`,conversationIndex:b.peek()}],b.value++,e.reason===`error`&&(g.value=e.message,console.error(`[ConversationalAI] Disconnected due to an error:`,e.message))}}),e.current=await t.current,p){let t=e.current;setTimeout(()=>t.sendUserMessage(p),100)}let a=e.current.getId();return _.value=a,g.value=null,a}catch(e){let t=`Could not start a conversation.`;e instanceof CloseEvent?t=e.reason||t:e instanceof Error&&(t=e.message||t),g.value=t,y.value=[...y.value,{type:`error`,message:t,conversationIndex:b.peek()}]}finally{t.current=null}},endSession:async()=>{let t=e.current;e.current=null,await t?.endSession()},getInputVolume:()=>e.current?.getInputVolume()??0,getOutputVolume:()=>e.current?.getOutputVolume()??0,setVolume:t=>{e.current?.setVolume({volume:t})},setMicMuted:t=>{e.current?.setMicMuted(t)},sendFeedback:t=>{e.current?.sendFeedback(t)},sendUserMessage:t=>{e.current?.sendUserMessage(t),y.value=[...y.value,{type:`message`,role:`user`,message:t,isText:!0,conversationIndex:b.peek()}]},sendMultimodalMessage:t=>{let n=t.text?.trim()??``,{fileId:r,...i}=t.file;e.current?.sendMultimodalMessage({text:n||void 0,fileId:r}),y.value=[...y.value,{type:`message`,role:`user`,message:n,isText:!0,conversationIndex:b.peek(),fileInput:i}]},sendUserActivity:()=>{e.current?.sendUserActivity()},sendContextualUpdate:t=>{e.current?.sendContextualUpdate(t)},addModeToggleEntry:t=>{e.current?.isOpen()&&(y.value=[...y.value,{type:`mode_toggle`,mode:t,conversationIndex:b.peek()}])}}},[u])}async function cb(){let e=`elevenlabs_convai_user_id`,t=localStorage.getItem(e);if(!t){try{t=(await(await Jy.load()).get()).visitorId}catch(e){console.warn(`[ConversationalAI] FingerprintJS failed, falling back to random UUID:`,e),t=crypto.randomUUID()}localStorage.setItem(e,t)}return t}function lb(e,t){try{let n=new CustomEvent(`elevenlabs-convai:call`,{bubbles:!0,composed:!0,detail:{config:t}});return e.dispatchEvent(n),n.detail.config}catch(e){return console.error(`[ConversationalAI] Could not trigger call event:`,e),t}}var ub=Fd(null);function db({children:e}){let{serverUrl:t}=hg(),n=fg(`agent-id`),r=fg(`override-config`),i=fg(`signed-url`),a=cm(null);hm(()=>{if(r.value)try{let e=JSON.parse(r.value);if(e){a.value=e;return}}catch(e){console.error(`[ConversationalAI] Cannot parse override-config: ${e?.message}`)}let e=n.value,o;if(i.value){let t=new URL(i.value).searchParams;e=t.get(`agent_id`)??n.value,o=t.get(`conversation_signature`)??void 0}if(!e){a.value=null;return}let s=new AbortController;return Eb(e,t.value,s.signal,o).then(e=>{s.signal.aborted||(a.value=e)}).catch(e=>{console.error(`[ConversationalAI] Cannot fetch config for agent ${n.value}: ${e?.message}`),s.signal.aborted||(a.value=null)}),()=>{s.abort()}});let o=fg(`variant`),s=fg(`placement`),c=fg(`terms-key`),l=fg(`mic-muting`),u=fg(`transcript`),d=fg(`text-input`),f=fg(`default-expanded`),p=fg(`always-expanded`),m=fg(`dismissible`),h=fg(`strip-audio-tags`),g=fg(`override-text-only`),_=fg(`use-rtc`),v=fg(`show-agent-status`),y=fg(`show-conversation-id`),b=L(()=>{if(!a.value)return null;let e=o.value??a.value.variant,t=s.value??a.value.placement,n=c.value??a.value.terms_key,r=bh(g.value)??a.value.text_only??!1,i=bh(l.value)??a.value.mic_muting_enabled,b=bh(u.value)??a.value.transcript_enabled,x=bh(d.value)??a.value.text_input_enabled,S=bh(p.value)??a.value.always_expanded??!1,C=bh(f.value)??a.value.default_expanded??!1,w=bh(m.value)??a.value.dismissible??!1,T=bh(h.value)??a.value.strip_audio_tags??!r,ee=bh(_.value)??a.value.use_rtc??!1,te=bh(v.value)??a.value.show_agent_status??!1,ne=bh(y.value)??a.value.show_conversation_id??!0;return{...a.value,variant:eg(e),placement:ng(t),terms_key:n,mic_muting_enabled:!r&&i,transcript_enabled:r||b,text_input_enabled:r||x,always_expanded:S,default_expanded:C,dismissible:w,strip_audio_tags:T,use_rtc:ee,show_agent_status:te,show_conversation_id:ne}});return b.value?R(ub.Provider,{value:b,children:e}):null}function fb(){return cg(ub)}function pb(){let e=fg(`override-text-only`),t=fb();return L(()=>bh(e.value)??t.value.text_only??!1)}function mb(){let e=pb(),{conversationTextOnly:t}=ab();return L(()=>t.value??e.value)}function hb(){let e=fg(`override-first-message`),t=fb(),{language:n}=Tg();return L(()=>e.value??t.value.language_presets?.[n.value.languageCode]?.first_message??t.value.first_message??null)}function gb(){let e=fb();return L(()=>e.value.text_input_enabled??!1)}function _b(){let e=pb();return{showCall:L(()=>!e.value),showMessage:gb()}}function vb(){let e=fb();return L(()=>e.value.file_input_config?.enabled??!1)}function yb(){let e=fb();return L(()=>e.value.file_input_config?.max_files_per_conversation??null)}function bb(){let e=fb(),{language:t}=Tg();return L(()=>{if(e.value.terms_html==null&&e.value.terms_text==null)return{terms_html:void 0,terms_text:void 0,terms_key:void 0};let n=e.value.language_presets?.[t.value.languageCode];return{terms_html:n?.terms_html??e.value.terms_html,terms_text:n?.terms_text??e.value.terms_text,terms_key:n?.terms_key??e.value.terms_key}})}function xb(){let e=fb();return L(()=>e.value.use_rtc??!1)}function Sb(){let e=fb();return L(()=>e.value.end_feedback?.type??null)}function Cb(){let e=fg(`markdown-link-allowed-hosts`),t=fg(`markdown-link-include-www`),n=fg(`markdown-link-allow-http`),r=fb();return L(()=>{let i=[];if(e.value)i=e.value.split(`,`).map(e=>e.trim()).filter(Boolean);else{let e=r.value.markdown_link_allowed_hosts;e&&e.length>0&&(i=e.some(e=>e.hostname===`*`)?[`*`]:e.map(e=>e.hostname))}let a=bh(t.value)??r.value.markdown_link_include_www??!0,o=bh(n.value)??r.value.markdown_link_allow_http??!0;return{allowedHosts:i,includeWww:a,allowHttp:o}})}function wb(){let e=fg(`syntax-highlight-theme`),t=fb();return L(()=>{let n=e.value??t.value.syntax_highlight_theme;if(n===`light`||n===`dark`)return n;let r=new Qh(t.value.styles?.base_active??ag.base_active);return r.isValid&&r.isDark()?`dark`:`light`})}function Tb(){let e=fg(`allow-events`);return L(()=>bh(e.value)??!1)}async function Eb(e,t,n,r){let i=await(await fetch(`${t}/v1/convai/agents/${e}/widget${r?`?conversation_signature=${encodeURIComponent(r)}`:``}`,{signal:n})).json();if(!i.widget_config)throw Error(`Response does not contain widget_config`);return i.widget_config}var Db=Pf(function(){let e=fb();return R(`style`,{children:[L(()=>{let t=e.value.styles;return`:host, :root {\n${og.map(e=>`${Ob(e)}: ${kb(t?.[e]??ag[e])};`).join(`
|
|
280
|
+
`)}\n}`}),Sh]})});function Ob(e){return`--el-${e.replace(/_/g,`-`)}`}function kb(e){return typeof e==`number`?`${e}px`:e}var Ab=Fd(null);function jb({children:e}){let t=cm(`voice`),{isDisconnected:n,addModeToggleEntry:r,setVolume:i}=ab();hm(()=>{i(t.value===`text`?0:1)});let a=mf(()=>({mode:Kp(()=>t.value),setMode:e=>{t.value!==e&&(t.value=e,n.value||r(e))},isTextMode:Kp(()=>t.value===`text`),isVoiceMode:Kp(()=>t.value===`voice`)}),[n,r]);return R(Ab.Provider,{value:a,children:e})}function Mb(){return cg(Ab)}var Nb=Fd(null);function Pb({children:e}){let t=fb(),{isTextMode:n}=Mb(),{setMicMuted:r,status:i}=ab(),a=L(()=>t.value.mic_muting_enabled??!1),o=cm(!1),s=F(null);hm(()=>{i.value===`disconnected`&&(o.value=!1)}),hm(()=>{n.value?(s.current===null&&(s.current=o.peek()),r(!0)):(s.current!==null&&(o.value=s.current,s.current=null),r(a.value?o.value:!1))});let c=mf(()=>({isMuted:Kp(()=>n.value?!0:a.value?o.value:!1),setIsMuted:e=>{o.value=e},isMutingEnabled:a}),[]);return R(Nb.Provider,{value:c,children:e})}function Fb(){return cg(Nb)}var Ib=Fd(null);function Lb({children:e}){let t=fb(),{language:n}=Tg(),r=fg(`text-contents`),i=L(()=>{try{if(r.value){let e=JSON.parse(r.value);if(typeof e==`object`)return e}}catch(e){console.error(`[ConversationalAI] Cannot parse text-contents:`,e)}return{}}),a=mf(()=>Object.fromEntries(ig.map(e=>[e,Kp(()=>i.value[e]??t.value.language_presets?.[n.value.languageCode]?.text_contents?.[e]??t.value.text_contents?.[e]??rg[e])])),[]);return R(Ib.Provider,{value:a,children:e})}function Rb(){return cg(Ib)}var zb=Fd(null);function Bb({children:e}){let t=fb(),n=fg(`avatar-image-url`),r=fg(`avatar-orb-color-1`),i=fg(`avatar-orb-color-2`),a=cm(``),o=L(()=>n.value?{type:`image`,url:n.value}:r.value&&i.value?{type:`orb`,color_1:r.value,color_2:i.value}:t.value.avatar),s=L(()=>{switch(o.value.type){case`url`:return o.value.custom_url;case`orb`:return a.value;case`image`:return o.value.url}}),c=mf(()=>({config:o,previewUrl:s,canvasUrl:a}),[]);return R(zb.Provider,{value:c,children:e})}function Vb(){return cg(zb)}var Hb=Fd(null);function Ub({children:e,...t}){let[n,r]=lf(null);return R(`div`,{ref:r,...t,children:n&&R(Hb.Provider,{value:n,children:e})})}function Wb(){return cg(Hb)}var Gb={LOADING:`loading`,SUCCESS:`success`,ERROR:`error`};function Kb(e,t){let n=[];t.firstMessage&&n.push({type:`message`,role:`agent`,message:t.firstMessage,isText:!0,conversationIndex:e[0]?.conversationIndex??t.firstMessageConversationIndex??0});let r=new Map;for(let t of e)if(t.type===`agent_tool_request`){let e=r.get(t.eventId)??{loading:0,error:0,success:0};e.loading++,r.set(t.eventId,e)}else if(t.type===`agent_tool_response`){let e=r.get(t.eventId);e&&(e.loading--,t.isError?e.error++:e.success++)}for(let i of e){if(i.type===`agent_tool_request`||i.type===`agent_tool_response`||i.type===`message`&&i.role===`agent`&&!i.message&&!(t.showAgentStatus&&i.eventId!=null&&r.has(i.eventId))||!t.transcriptEnabled&&i.type===`message`&&!i.isText)continue;let e=n[n.length-1];if(i.type===`message`&&i.eventId!=null&&e?.type===`message`&&e.eventId===i.eventId&&e.role===i.role){n[n.length-1]=i;continue}n.push(i)}if(t.showAgentStatus)for(let e=0;e<n.length;e++){let t=n[e];if(t.type!==`message`||t.role!==`agent`||t.eventId==null)continue;let i=r.get(t.eventId);if(!i)continue;let a=i.loading>0?Gb.LOADING:i.error>0?Gb.ERROR:Gb.SUCCESS;n[e]={...t,toolStatus:a}}return t.showTypingIndicator&&n.push({type:`typing_indicator`,conversationIndex:e[e.length-1]?.conversationIndex??t.firstMessageConversationIndex??0}),n}function qb(e){return e&&typeof e==`object`&&`peek`in e}function Jb(e){let t=qb(e),n=cm(t?e.peek():e);return t?e:(n.value=e,n)}function Yb(e){return qb(e)?e.value:e}function Xb(e){return qb(e)?e.peek():e}function Zb(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Qb(...e){return t=>{let n=!1,r=e.map(e=>{let r=Zb(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Zb(e[t],null)}}}}function $b(...e){return I(Qb(...e),e)}var ex=Symbol.for(`react.lazy`),tx=void 0;function nx(e){return typeof e==`object`&&!!e&&`then`in e}function rx(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ex&&`_payload`in e&&nx(e._payload)}function ix(e){let t=ox(e),n=Lf((e,n)=>{let{children:r,...i}=e;rx(r)&&typeof tx==`function`&&(r=tx(r._payload));let a=zf.toArray(r),o=a.find(cx);if(o){let e=o.props.children,r=a.map(t=>t===o?zf.count(e)>1?zf.only(null):_p(e)?e.props.children:null:t);return R(t,{...i,ref:n,children:_p(e)?bp(e,void 0,r):null})}return R(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var ax=ix(`Slot`);function ox(e){let t=Lf((e,t)=>{let{children:n,...r}=e;if(rx(n)&&typeof tx==`function`&&(n=tx(n._payload)),_p(n)){let e=ux(n),i=lx(r,n.props);return n.type!==ud&&(i.ref=t?Qb(t,e):e),bp(n,i)}return zf.count(n)>1?zf.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sx=Symbol(`radix.slottable`);function cx(e){return _p(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===sx}function lx(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ux(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dx=window.matchMedia(`(prefers-reduced-motion: reduce)`);function fx(){let e=cm(dx.matches);return df(()=>{let t=t=>{e.value=t.matches};return dx.addEventListener(`change`,t),()=>dx.removeEventListener(`change`,t)},[]),e}function px({onStart:e,onEnd:t}){let n=F();n.current??=new Set;let r=F(e);r.current=e;let i=F(t);i.current=t;let a=cm(!1);return{transitioning:a,handlers:{onTransitionStart:I(e=>{e.target===e.currentTarget&&(n.current?.add(e.propertyName),a.peek()||(a.value=!0,r.current?.()))},[]),onTransitionEnd:I(e=>{e.target===e.currentTarget&&(n.current?.delete(e.propertyName),n.current?.size||(a.value=!1,i.current?.()))},[])}}}function mx(e){return R(fx().value?hx:gx,{...e})}function hx({active:e,...t}){return Yb(e)?R(ax,{"data-shown":!0,...t}):null}function gx({active:e,initial:t=e,...n}){let r=Jb(e),i=cm(Xb(t));hm(()=>{r.value&&(i.value=r.value)});let{handlers:a}=px({onEnd:()=>{i.value=r.value}});return!r.value&&!i.value?null:R(ax,{"data-shown":r.value&&i.value,...a,...n})}function _x(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_x(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function vx(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_x(e))&&(r&&(r+=` `),r+=t);return r}var yx=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},bx=(e,t)=>({classGroupId:e,validator:t}),xx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Sx=`-`,Cx=[],wx=`arbitrary..`,Tx=e=>{let t=Ox(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Dx(e);let n=e.split(Sx);return Ex(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?yx(i,t):t:i||Cx}return n[e]||Cx}}},Ex=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ex(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Sx):e.slice(t).join(Sx),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Dx=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?wx+r:void 0})(),Ox=e=>{let{theme:t,classGroups:n}=e;return kx(n,t)},kx=(e,t)=>{let n=xx();for(let r in e){let i=e[r];Ax(i,n,r,t)}return n},Ax=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];jx(i,t,n,r)}},jx=(e,t,n,r)=>{if(typeof e==`string`){Mx(e,t,n);return}if(typeof e==`function`){Nx(e,t,n,r);return}Px(e,t,n,r)},Mx=(e,t,n)=>{let r=e===``?t:Fx(t,e);r.classGroupId=n},Nx=(e,t,n,r)=>{if(Ix(e)){Ax(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bx(n,e))},Px=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ax(o,Fx(t,a),n,r)}},Fx=(e,t)=>{let n=e,r=t.split(Sx),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=xx(),n.nextPart.set(t,i)),n=i}return n},Ix=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Lx=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Rx=`!`,zx=`:`,Bx=[],Vx=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Hx=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===zx){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Rx)?(c=s.slice(0,-1),l=!0):s.startsWith(Rx)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Vx(t,l,c,u)};if(t){let e=t+zx,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Vx(Bx,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ux=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Wx=e=>({cache:Lx(e.cacheSize),parseClassName:Hx(e),sortModifiers:Ux(e),...Tx(e)}),Gx=/\s+/,Kx=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Gx),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Rx:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},qx=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Jx(n))&&(i&&(i+=` `),i+=r);return i},Jx=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Jx(e[r]))&&(n&&(n+=` `),n+=t);return n},Yx=(e,...t)=>{let n,r,i,a,o=o=>(n=Wx(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Kx(e,n);return i(e,a),a};return a=o,(...e)=>a(qx(...e))},Xx=[],Zx=e=>{let t=t=>t[e]||Xx;return t.isThemeGetter=!0,t},Qx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$x=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eS=/^\d+\/\d+$/,tS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,iS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oS=e=>eS.test(e),sS=e=>!!e&&!Number.isNaN(Number(e)),cS=e=>!!e&&Number.isInteger(Number(e)),lS=e=>e.endsWith(`%`)&&sS(e.slice(0,-1)),uS=e=>tS.test(e),dS=()=>!0,fS=e=>nS.test(e)&&!rS.test(e),pS=()=>!1,mS=e=>iS.test(e),hS=e=>aS.test(e),gS=e=>!z(e)&&!B(e),_S=e=>kS(e,NS,pS),z=e=>Qx.test(e),vS=e=>kS(e,PS,fS),yS=e=>kS(e,FS,sS),bS=e=>kS(e,jS,pS),xS=e=>kS(e,MS,hS),SS=e=>kS(e,LS,mS),B=e=>$x.test(e),CS=e=>AS(e,PS),wS=e=>AS(e,IS),TS=e=>AS(e,jS),ES=e=>AS(e,NS),DS=e=>AS(e,MS),OS=e=>AS(e,LS,!0),kS=(e,t,n)=>{let r=Qx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},AS=(e,t,n=!1)=>{let r=$x.exec(e);return r?r[1]?t(r[1]):n:!1},jS=e=>e===`position`||e===`percentage`,MS=e=>e===`image`||e===`url`,NS=e=>e===`length`||e===`size`||e===`bg-size`,PS=e=>e===`length`,FS=e=>e===`number`,IS=e=>e===`family-name`,LS=e=>e===`shadow`,RS=Yx(()=>{let e=Zx(`color`),t=Zx(`font`),n=Zx(`text`),r=Zx(`font-weight`),i=Zx(`tracking`),a=Zx(`leading`),o=Zx(`breakpoint`),s=Zx(`container`),c=Zx(`spacing`),l=Zx(`radius`),u=Zx(`shadow`),d=Zx(`inset-shadow`),f=Zx(`text-shadow`),p=Zx(`drop-shadow`),m=Zx(`blur`),h=Zx(`perspective`),g=Zx(`aspect`),_=Zx(`ease`),v=Zx(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),B,z],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[B,z,c],T=()=>[oS,`full`,`auto`,...w()],ee=()=>[cS,`none`,`subgrid`,B,z],te=()=>[`auto`,{span:[`full`,cS,B,z]},cS,B,z],ne=()=>[cS,`auto`,B,z],re=()=>[`auto`,`min`,`max`,`fr`,B,z],ie=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ae=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],oe=()=>[`auto`,...w()],se=()=>[oS,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],E=()=>[e,B,z],ce=()=>[...b(),TS,bS,{position:[B,z]}],le=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ue=()=>[`auto`,`cover`,`contain`,ES,_S,{size:[B,z]}],de=()=>[lS,CS,vS],fe=()=>[``,`none`,`full`,l,B,z],pe=()=>[``,sS,CS,vS],me=()=>[`solid`,`dashed`,`dotted`,`double`],he=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ge=()=>[sS,lS,TS,bS],_e=()=>[``,`none`,m,B,z],ve=()=>[`none`,sS,B,z],ye=()=>[`none`,sS,B,z],be=()=>[sS,B,z],xe=()=>[oS,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[uS],breakpoint:[uS],color:[dS],container:[uS],"drop-shadow":[uS],ease:[`in`,`out`,`in-out`],font:[gS],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[uS],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[uS],shadow:[uS],spacing:[`px`,sS],text:[uS],"text-shadow":[uS],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,oS,z,B,g]}],container:[`container`],columns:[{columns:[sS,z,B,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[cS,`auto`,B,z]}],basis:[{basis:[oS,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[sS,oS,`auto`,`initial`,`none`,z]}],grow:[{grow:[``,sS,B,z]}],shrink:[{shrink:[``,sS,B,z]}],order:[{order:[cS,`first`,`last`,`none`,B,z]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ie(),`normal`]}],"justify-items":[{"justify-items":[...ae(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ae()]}],"align-content":[{content:[`normal`,...ie()]}],"align-items":[{items:[...ae(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ae(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ae(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ae()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:oe()}],mx:[{mx:oe()}],my:[{my:oe()}],ms:[{ms:oe()}],me:[{me:oe()}],mt:[{mt:oe()}],mr:[{mr:oe()}],mb:[{mb:oe()}],ml:[{ml:oe()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:se()}],w:[{w:[s,`screen`,...se()]}],"min-w":[{"min-w":[s,`screen`,`none`,...se()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...se()]}],h:[{h:[`screen`,`lh`,...se()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...se()]}],"max-h":[{"max-h":[`screen`,`lh`,...se()]}],"font-size":[{text:[`base`,n,CS,vS]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,B,yS]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,lS,z]}],"font-family":[{font:[wS,z,t]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,B,z]}],"line-clamp":[{"line-clamp":[sS,`none`,B,yS]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,B,z]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,B,z]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...me(),`wavy`]}],"text-decoration-thickness":[{decoration:[sS,`from-font`,`auto`,B,vS]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[sS,`auto`,B,z]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,B,z]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,B,z]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},cS,B,z],radial:[``,B,z],conic:[cS,B,z]},DS,xS]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:de()}],"gradient-via-pos":[{via:de()}],"gradient-to-pos":[{to:de()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...me(),`hidden`,`none`]}],"divide-style":[{divide:[...me(),`hidden`,`none`]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...me(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[sS,B,z]}],"outline-w":[{outline:[``,sS,CS,vS]}],"outline-color":[{outline:E()}],shadow:[{shadow:[``,`none`,u,OS,SS]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":[`none`,d,OS,SS]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:pe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[sS,vS]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":[`none`,f,OS,SS]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[sS,B,z]}],"mix-blend":[{"mix-blend":[...he(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[sS]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[B,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[sS]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,B,z]}],filter:[{filter:[``,`none`,B,z]}],blur:[{blur:_e()}],brightness:[{brightness:[sS,B,z]}],contrast:[{contrast:[sS,B,z]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,OS,SS]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:[``,sS,B,z]}],"hue-rotate":[{"hue-rotate":[sS,B,z]}],invert:[{invert:[``,sS,B,z]}],saturate:[{saturate:[sS,B,z]}],sepia:[{sepia:[``,sS,B,z]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,B,z]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[sS,B,z]}],"backdrop-contrast":[{"backdrop-contrast":[sS,B,z]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,sS,B,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[sS,B,z]}],"backdrop-invert":[{"backdrop-invert":[``,sS,B,z]}],"backdrop-opacity":[{"backdrop-opacity":[sS,B,z]}],"backdrop-saturate":[{"backdrop-saturate":[sS,B,z]}],"backdrop-sepia":[{"backdrop-sepia":[``,sS,B,z]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,B,z]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[sS,`initial`,B,z]}],ease:[{ease:[`linear`,`initial`,_,B,z]}],delay:[{delay:[sS,B,z]}],animate:[{animate:[`none`,v,B,z]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,B,z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":[`scale-3d`],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[B,z,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":[`translate-none`],accent:[{accent:E()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,B,z]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,B,z]}],fill:[{fill:[`none`,...E()]}],"stroke-w":[{stroke:[sS,CS,vS,yS]}],stroke:[{stroke:[`none`,...E()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),zS=(...e)=>RS(vx(e)),BS=Fd(null);function VS({children:e}){let t=cm(null),n=cm(``),r=cm(`initial`),{lastId:i}=ab();fg(`agent-id`);let{serverUrl:a}=hg(),o=I(async e=>{let n=i.value;if(!n){console.warn(`[ConversationalAI] Cannot submit rating: missing conversation_id`);return}try{t.value=e,r.value=`submitted-rating`,await ih(n,{rating:e},a.value)}catch(e){console.error(`[ConversationalAI] Failed to submit rating:`,e)}},[]),s=I(async()=>{let e=i.value;if(!e){console.warn(`[ConversationalAI] Cannot submit feedback: missing conversation_id`);return}if(t.value===null){console.warn(`[ConversationalAI] Cannot submit feedback: rating not set`);return}if(n.value)try{r.value=`submitted-follow-up`,await ih(e,{rating:t.value,comment:n.value||void 0},a.value)}catch(e){console.error(`[ConversationalAI] Failed to submit feedback:`,e)}},[]),c=I(()=>{t.value=null,n.value=``,r.value=`initial`},[]);hm(()=>{i.value!==null&&c()});let l=mf(()=>({rating:t,feedbackText:n,feedbackProgress:r,submitRating:o,submitFeedback:s,reset:c}),[o,s,c]);return R(BS.Provider,{value:l,children:e})}function HS(){return cg(BS)}var US=Fd(null);function WS({defaultContent:e=`transcript`,children:t}){let n=cm(e),r=cm(!1),i=mf(()=>({currentContent:n,currentConfig:n.value===`feedback`?{showHeaderBack:!0,onHeaderBack:()=>{n.value=`transcript`}}:{showHeaderBack:!1},pendingInputFocus:r}),[n.value]);return R(US.Provider,{value:i,children:t})}function GS(){return cg(US)}var KS={phone:YS,"phone-off":XS,paperclip:ZS,chat:QS,mic:$S,"mic-off":eC,soundwave:tC,check:iC,"chevron-down":nC,"chevron-up":rC,send:aC,star:oC,copy:sC,download:cC,wrap:lC,maximize:dC,minimize:fC,loader:pC,x:mC},qS={xs:`text-xs`,sm:`text-sm`,md:`text-lg`,lg:`text-xl`};function JS({name:e,size:t=`md`,className:n}){let r=KS[e];return R(`slot`,{name:`icon-${e}`,className:vx(`flex`,qS[t],n),"aria-hidden":!0,children:R(r,{})})}function YS(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 18 18`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:R(`path`,{d:`M3.7489 2.25C2.93286 2.25 2.21942 2.92142 2.27338 3.7963C2.6686 10.2041 7.79483 15.3303 14.2026 15.7255C15.0775 15.7795 15.7489 15.066 15.7489 14.25V11.958C15.7489 11.2956 15.3144 10.7116 14.6799 10.5213L12.6435 9.91035C12.1149 9.75179 11.542 9.89623 11.1518 10.2864L10.5901 10.8482C9.15291 10.0389 7.95998 8.84599 7.15074 7.40881L7.71246 6.84709C8.10266 6.45689 8.24711 5.88396 8.08854 5.35541L7.47761 3.31898C7.28727 2.6845 6.70329 2.25 6.04087 2.25H3.7489Z`})})}function XS(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 19 18`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[R(`path`,{d:`M16.0303 3.53033C16.3232 3.23744 16.3232 2.76256 16.0303 2.46967C15.7374 2.17678 15.2626 2.17678 14.9697 2.46967L8.6271 8.81224C8.25925 8.3778 7.93185 7.90804 7.65074 7.40881L8.21246 6.84709C8.60266 6.45689 8.74711 5.88396 8.58854 5.35541L7.97761 3.31898C7.78727 2.6845 7.20329 2.25 6.54087 2.25H4.2489C3.43286 2.25 2.71942 2.92142 2.77338 3.7963C2.95462 6.73468 4.13069 9.40357 5.96899 11.4703L2.96967 14.4697C2.67678 14.7626 2.67678 15.2374 2.96967 15.5303C3.26256 15.8232 3.73744 15.8232 4.03033 15.5303L16.0303 3.53033Z`}),R(`path`,{d:`M14.7026 15.7255C12.2994 15.5773 10.0765 14.7636 8.21584 13.4665L10.9278 10.7545C10.9815 10.7863 11.0356 10.8175 11.0901 10.8482L11.6518 10.2864C12.042 9.89623 12.6149 9.75179 13.1435 9.91035L15.1799 10.5213C15.8144 10.7116 16.2489 11.2956 16.2489 11.958V14.25C16.2489 15.066 15.5775 15.7795 14.7026 15.7255Z`})]})}function ZS(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`path`,{d:`M13.234 20.252 21 12.3`}),R(`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486`})]})}function QS(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 19.25 16.5`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:R(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M9.62501 0C12.468 0 14.8748 0.737978 16.5834 2.16927C18.3067 3.61283 19.25 5.70467 19.25 8.25C19.25 10.7953 18.3067 12.8872 16.5834 14.3307C14.8748 15.762 12.468 16.5 9.62501 16.5C8.07283 16.5 6.35212 16.3511 4.82753 15.6549C4.80704 15.667 4.78576 15.6793 4.76373 15.6919C4.508 15.8383 4.14334 16.0229 3.70626 16.1752C2.84316 16.4761 1.61386 16.6782 0.392042 16.0967C0.205543 16.0079 0.0688354 15.84 0.0197227 15.6394C-0.0293882 15.4387 0.0142992 15.2267 0.138705 15.0618C1.46111 13.3092 1.06848 12.2379 1.052 12.193C1.052 12.193 1.05072 12.1895 1.04678 12.1801L1.03931 12.1625L1.02838 12.1365C0.958706 11.9688 0.706686 11.3495 0.470952 10.6108C0.242207 9.89392 5.99197e-06 8.97868 5.99197e-06 8.25C5.99197e-06 5.70467 0.943343 3.61283 2.6666 2.16927C4.37521 0.737978 6.78205 0 9.62501 0ZM4.58333 8.25C4.58333 8.75626 4.99374 9.16667 5.5 9.16667C6.00626 9.16667 6.41667 8.75626 6.41667 8.25C6.41667 7.74374 6.00626 7.33333 5.5 7.33333C4.99374 7.33333 4.58333 7.74374 4.58333 8.25ZM8.70833 8.25C8.70833 8.75626 9.11874 9.16667 9.625 9.16667C10.1313 9.16667 10.5417 8.75626 10.5417 8.25C10.5417 7.74374 10.1313 7.33333 9.625 7.33333C9.11874 7.33333 8.70833 7.74374 8.70833 8.25ZM13.75 9.16667C13.2437 9.16667 12.8333 8.75626 12.8333 8.25C12.8333 7.74374 13.2437 7.33333 13.75 7.33333C14.2563 7.33333 14.6667 7.74374 14.6667 8.25C14.6667 8.75626 14.2563 9.16667 13.75 9.16667Z`})})}function $S(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 19 18`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[R(`path`,{d:`M9.50008 1.5C7.42901 1.5 5.75008 3.17893 5.75008 5.25V8.25C5.75008 10.3211 7.42901 12 9.50008 12C11.5712 12 13.2501 10.3211 13.2501 8.25V5.25C13.2501 3.17893 11.5712 1.5 9.50008 1.5Z`}),R(`path`,{d:`M4.88997 10.8417C4.66448 10.4943 4.20002 10.3954 3.85256 10.6209C3.50509 10.8463 3.40621 11.3108 3.63169 11.6583C4.47442 12.9569 6.08493 14.6838 8.75008 14.9616V15.75C8.75008 16.1642 9.08587 16.5 9.50008 16.5C9.9143 16.5 10.2501 16.1642 10.2501 15.75V14.9616C12.9152 14.6838 14.5257 12.9569 15.3685 11.6583C15.594 11.3108 15.4951 10.8463 15.1476 10.6209C14.8001 10.3954 14.3357 10.4943 14.1102 10.8417C13.3305 12.0432 11.9002 13.5 9.50008 13.5C7.1 13.5 5.66968 12.0432 4.88997 10.8417Z`})]})}function eC(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 19 18`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[R(`path`,{d:`M13.25 8.25C13.25 8.64791 13.188 9.03135 13.0732 9.39119L6.57947 2.8975C7.26687 2.04521 8.31974 1.5 9.49995 1.5C11.571 1.5 13.25 3.17893 13.25 5.25V8.25Z`}),R(`path`,{d:`M2.21967 1.71967C2.51256 1.42678 2.98744 1.42678 3.28033 1.71967L16.7803 15.2197C17.0732 15.5126 17.0732 15.9874 16.7803 16.2803C16.4874 16.5732 16.0126 16.5732 15.7197 16.2803L13.2828 13.8435C12.4719 14.4022 11.4678 14.8338 10.25 14.9614V15.75C10.25 16.1642 9.91422 16.5 9.50001 16.5C9.08579 16.5 8.75001 16.1642 8.75001 15.75V14.9616C6.08485 14.6838 4.47434 12.9569 3.63162 11.6583C3.40614 11.3108 3.50502 10.8463 3.85248 10.6209C4.19995 10.3954 4.66441 10.4943 4.88989 10.8417C5.6696 12.0432 7.09993 13.5 9.50001 13.5C10.5978 13.5 11.4845 13.1981 12.1992 12.7598L11.0875 11.6482C10.605 11.8739 10.0667 12 9.50001 12C7.42894 12 5.75001 10.3211 5.75001 8.25V6.31067L2.21967 2.78033C1.92678 2.48744 1.92678 2.01256 2.21967 1.71967Z`})]})}function tC(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 18 18`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[R(`rect`,{x:`1.5`,y:`6.75`,width:`2`,height:`4.5`,rx:`1`}),R(`rect`,{x:`5`,y:`4.5`,width:`2`,height:`9`,rx:`1`}),R(`rect`,{x:`8.5`,y:`2.25`,width:`2`,height:`13.5`,rx:`1`}),R(`rect`,{x:`12`,y:`4.5`,width:`2`,height:`9`,rx:`1`}),R(`rect`,{x:`15.5`,y:`6.75`,width:`2`,height:`4.5`,rx:`1`})]})}function nC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:R(`path`,{d:`m6 9 6 6 6-6`})})}function rC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:R(`path`,{d:`m18 15-6-6-6 6`})})}function iC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:R(`path`,{d:`M20 6 9 17l-5-5`})})}function aC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 20 20`,fill:`currentColor`,...e,children:R(`path`,{d:`M4.64337 17.6645C3.243 18.1313 1.97185 16.6817 2.6176 15.3543L8.50148 3.25965C9.10962 2.00957 10.8908 2.00958 11.4989 3.25965L17.3828 15.3543C18.0286 16.6817 16.7574 18.1313 15.357 17.6645L10.8334 16.1567L10.8334 12.5005C10.8334 12.0403 10.4603 11.6672 10 11.6672C9.5398 11.6672 9.16671 12.0403 9.16671 12.5005L9.16671 16.1568L4.64337 17.6645Z`})})}function oC(e){return R(`svg`,{height:`1em`,width:`1em`,viewBox:`0 0 21 20`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`,...e,children:R(`path`,{d:`M11.8621 0.854898C11.3145 -0.284967 9.68804 -0.284965 9.1404 0.854899L6.77181 5.78487C6.77181 5.78487 6.76902 5.78867 6.7646 5.78925L1.31499 6.50272C0.0591912 6.66713 -0.452868 8.21568 0.474832 9.09033L4.45896 12.8466C4.46075 12.8483 4.46059 12.8502 4.46059 12.8502L3.46003 18.2169C3.22657 19.4691 4.55184 20.4152 5.66108 19.8172L10.4957 17.2111C10.4991 17.2093 10.5035 17.2093 10.5068 17.2111L15.3415 19.8172C16.4507 20.4152 17.776 19.4691 17.5425 18.2169L16.542 12.8502C16.542 12.8502 16.5418 12.8483 16.5436 12.8466L20.5277 9.09033C21.4554 8.21568 20.9434 6.66713 19.6876 6.50272L14.2379 5.78925C14.2335 5.78867 14.2307 5.78487 14.2307 5.78487L11.8621 0.854898Z`})})}function sC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),R(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})}function cC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),R(`polyline`,{points:`7 10 12 15 17 10`}),R(`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`})]})}function lC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`1em`,width:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`line`,{x1:`3`,x2:`21`,y1:`6`,y2:`6`}),R(`path`,{d:`M3 12h15a3 3 0 1 1 0 6h-4`}),R(`polyline`,{points:`16 16 14 18 16 20`}),R(`line`,{x1:`3`,x2:`10`,y1:`18`,y2:`18`})]})}function uC({orbColor:e,circleBackgroundColor:t,starColor:n,className:r}){return R(`slot`,{name:`icon-feedback`,className:vx(`flex`,r),"aria-hidden":!0,children:R(`svg`,{width:`100%`,height:`100%`,viewBox:`0 0 82 88`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[R(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M9 42C9 59.6731 23.3269 74 41 74C58.6731 74 73 59.6731 73 42C73 24.3269 58.6731 10 41 10C23.3269 10 9 24.3269 9 42ZM29.4529 18.5973C31.1347 18.0574 32.8641 17.5023 34.9844 16.6005C42.2533 13.5091 48.3526 11.9217 51.7782 14.094C53.5063 15.1899 54.4051 16.7749 55.6117 18.9024C56.7969 20.9922 58.279 23.6057 61.1358 26.7937C62.2737 28.0636 63.3886 29.2195 64.4371 30.3064C68.7007 34.7263 71.8645 38.0061 70.9949 43.1697C70.2965 47.316 67.9794 49.4559 65.6038 51.65C63.4317 53.656 61.2107 55.7073 60.1332 59.3786C57.8774 67.0653 53.5327 71.9113 48.3526 72.7468C43.1725 73.5823 36.6555 75.1698 29.8043 70.1567C26.1949 67.5157 25.229 64.3182 24.1947 60.894C23.2657 57.8184 22.2814 54.56 19.2768 51.3577C14.1619 45.9062 10.2533 29.6345 19.2768 23.0339C23.736 20.4327 26.5223 19.5382 29.4529 18.5973Z`,fill:e,"fill-opacity":`0.15`,stroke:e,"stroke-opacity":`0.35`}),R(`path`,{d:`M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988`,stroke:e,"stroke-opacity":`0.35`}),R(`path`,{d:`M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988`,stroke:e,"stroke-opacity":`0.35`}),R(`path`,{d:`M21.9366 68.1987C21.3549 66.5119 21.0386 60.9231 28.1376 53.3448C37.0114 43.8719 40.5 43.9579 51.4911 31.7482C59.5691 22.7747 59.1723 17.0524 58.0993 15.4626`,stroke:e,"stroke-opacity":`0.35`}),R(`path`,{d:`M9.26819 42.161C10.4003 43.5337 15.6951 46.3853 25.7661 44.3926C38.3548 41.9018 52.434 40.307 57.694 41.0287C70.352 42.7655 71.4138 51.3035 71.4138 51.3035`,stroke:e,"stroke-opacity":`0.35`}),R(`path`,{d:`M22 16.4916C18.815 21.85 19.6451 26.0591 27.9943 32.0828C38.4307 39.6124 50.2985 48.8304 53.5024 53.1027C58.6684 59.9914 59.5 67.928 59.5 67.928`,stroke:e,"stroke-opacity":`0.35`}),R(`rect`,{x:`9.26099`,y:`10`,width:`63.7129`,height:`63.7129`,rx:`31.8565`,stroke:e,"stroke-opacity":`0.43`,"stroke-width":`1.5`}),R(`g`,{"clip-path":`url(#clip0_7006_42127)`,children:[R(`circle`,{cx:`62.4996`,cy:`18.2032`,r:`15.0195`,transform:`rotate(6.27205 62.4996 18.2032)`,fill:t}),R(`path`,{d:`M60.7142 12.1753C62.057 10.0714 65.2294 10.4202 66.0833 12.7654L66.6158 14.2308L68.1251 14.6217C70.5415 15.2484 71.1908 18.3742 69.2237 19.911L67.9944 20.8704L68.0896 22.4262C68.2403 24.9178 65.4681 26.5011 63.3987 25.1056L62.1065 24.2326L60.6555 24.8041C58.3322 25.7172 55.9702 23.5694 56.6585 21.1698L57.0884 19.6717L56.0977 18.4684C54.5112 16.541 55.8231 13.6307 58.318 13.5438L59.8751 13.4899L60.7142 12.1753Z`,fill:n,stroke:t,"stroke-width":`3.27381`}),R(`path`,{d:`M63.925 5.23719C71.0867 6.02431 76.2545 12.4676 75.4676 19.6293C74.6805 26.7911 68.2364 31.959 61.0746 31.1718C53.9129 30.3845 48.7459 23.9406 49.533 16.7789C50.3203 9.61739 56.7634 4.45029 63.925 5.23719ZM63.6957 7.32326C57.6866 6.66302 52.2797 10.9991 51.6191 17.0082C50.9586 23.0174 55.2946 28.4251 61.3038 29.0858C67.3132 29.7462 72.7211 25.4094 73.3816 19.4C74.0418 13.3908 69.705 7.98372 63.6957 7.32326Z`,fill:n,stroke:t,"stroke-width":`0.3`,"stroke-linecap":`round`,"stroke-linejoin":`round`})]}),R(`ellipse`,{cx:`41`,cy:`85`,rx:`15`,ry:`3`,fill:e,"fill-opacity":`0.35`}),R(`defs`,{children:R(`clipPath`,{id:`clip0_7006_42127`,children:R(`rect`,{width:`33`,height:`33`,fill:`white`,transform:`translate(47.9012) rotate(6.27205)`})})})]})})}function dC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`path`,{d:`M15 3h6v6`}),R(`path`,{d:`m21 3-7 7`}),R(`path`,{d:`m3 21 7-7`}),R(`path`,{d:`M9 21H3v-6`})]})}function fC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`path`,{d:`m14 10 7-7`}),R(`path`,{d:`M20 10h-6V4`}),R(`path`,{d:`m3 21 7-7`}),R(`path`,{d:`M4 14h6v6`})]})}function pC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:R(`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`})})}function mC(e){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,...e,children:[R(`path`,{d:`M18 6 6 18`}),R(`path`,{d:`m6 6 12 12`})]})}function hC(e){return R(fx().value?gC:_C,{...e})}function gC({visible:e,className:t,grow:n,dep:r,...i}){return e?R(`div`,{className:vx(n&&`grow`,t),...i}):null}function _C({visible:e,children:t,className:n,grow:r,dep:i,...a}){let[o,s]=lf(e),[c,l]=lf(null),[u,d]=lf(null),f=F(t);e&&(f.current=t);let p=I(t=>{l(t),t&&!e&&(t.style.width=`0px`,t.style.height=`0px`)},[]);df(()=>{u&&(u.style.transition=`none`,u.style.opacity=`0`,u.offsetWidth,u.style.transition=``,u.style.opacity=``)},[i]),mf(()=>{c&&(c.style.width=`${c.offsetWidth}px`,c.style.height=`${c.offsetHeight}px`)},[c,e,i]),df(()=>{if(!c||!u)return;e&&s(!0);let t=e?u.offsetWidth:0,n=e?u.offsetHeight:0;c.style.width=!e||c.offsetWidth!==t?`${t}px`:``,c.style.height=!e||c.offsetHeight!==n?`${n}px`:``},[c,u,e,i]);let{transitioning:m,handlers:h}=px({onEnd:()=>{e?(c.style.width=``,c.style.height=``):s(!1)}});return R(`div`,{ref:p,className:vx(`relative inline-flex shrink-0 justify-center items-center transition-[opacity,width,height,transform,flex-grow] duration-200 min-w-0`,!e&&`opacity-0 scale-75`,e&&r&&`grow`,e&&o&&!m.value&&`z-1`),...h,children:R(`div`,{ref:d,className:vx(`shrink-0 min-h-min min-w-min transition-opacity duration-200`,r&&`grow`,n),...a,children:(e||o)&&f.current})})}var vC={primary:`text-accent-primary border border-accent bg-accent hover:border-accent-hover hover:bg-accent-hover active:border-accent-active active:bg-accent-active`,secondary:`text-base-primary border border-base-border bg-base hover:bg-base-hover active:bg-base-active`,ghost:`text-base-primary border border-base bg-base hover:bg-base-hover hover:border-base-hover active:bg-base-active active:border-base-active`,"md-button":`text-base-primary border border-base-border bg-base hover:bg-base-hover active:bg-base-active text-sm h-6`},yC=Lf(function({variant:e=`secondary`,children:t,icon:n,className:r,iconClassName:i,truncate:a=!0,...o},s){let c=!!n&&!t;return R(`button`,{ref:s,className:zS(`h-9 flex px-2.5 text-sm items-center transition-[colors,opacity] justify-center rounded-button duration-200 focus-ring overflow-hidden select-none`,`disabled:opacity-50 disabled:pointer-events-none`,vC[e],c&&`min-w-9`,r),type:`button`,...o,children:[n&&R(JS,{className:zS(`transition-[margin] duration-200`,c&&`-mx-0.5`,e===`md-button`&&`text-sm`,i),name:n}),R(hC,{visible:!!t,dep:t,children:R(`span`,{className:zS(`block whitespace-nowrap max-w-64 truncate`,e===`md-button`?`pl-1.5`:`px-1.5`),children:t})})]})}),bC=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e),xC=({isFilled:e,iconName:t})=>R(`span`,{className:vx(`w-8 h-8 grid place-content-center`,e?`text-base-primary`:`text-base-border`),children:R(JS,{name:t,size:`lg`})}),SC=({value:e,rating:t,hoverRating:n,onClick:r,onHover:i,onKeyDown:a,iconName:o})=>{let s=t.value!==null&&e<=t.value,c=n.value!==null&&e<=n.value,l=I(t=>{t.stopPropagation(),r(e)},[r,e]),u=I(t=>{a(t,e)},[a,e]);return R(`button`,{type:`button`,role:`radio`,"aria-checked":s,"aria-label":e.toString(),onMouseEnter:()=>i(e),onClick:l,onKeyDown:u,className:vx(`w-8 h-8 grid place-content-center rounded-full focus-ring transition-colors cursor-pointer`,s||c?`text-base-primary`:`text-base-border`),children:R(JS,{name:o,size:`lg`})})},CC=({onRate:e,min:t=1,max:n=5,ariaLabel:r,icon:i=`star`})=>{let a=cm(null),o=cm(null),s=bC(t,n),c=I(e=>{o.value=e},[o]),l=I(()=>{o.value=null},[o]),u=I(t=>{a.value=t,e(t)},[a,e]),d=I((r,i)=>{r.key===`Enter`||r.key===` `?(r.preventDefault(),a.value=i,e(i)):r.key===`ArrowLeft`||r.key===`ArrowDown`?(r.preventDefault(),i-1>=t&&(r.currentTarget?.previousElementSibling)?.focus()):(r.key===`ArrowRight`||r.key===`ArrowUp`)&&(r.preventDefault(),i+1<=n&&(r.currentTarget?.nextElementSibling)?.focus())},[a,e,t,n]);return R(`div`,{role:`radiogroup`,"aria-label":r,className:`flex no-wrap cursor-pointer`,onMouseLeave:l,children:s.map(e=>R(SC,{value:e,rating:a,hoverRating:o,onClick:u,onHover:c,onKeyDown:d,iconName:i},e))})};function wC({rating:e,min:t=1,max:n=5,icon:r=`star`}){let i=bC(t,n);return R(`div`,{className:`flex no-wrap`,role:`img`,"aria-label":`Rating: ${e} out of ${n}`,children:i.map(t=>R(xC,{isFilled:e>=t,iconName:r},t))})}function TC({icon:e,onRate:t}){let n=Rb();return R(`div`,{className:`flex flex-col items-center`,children:[R(`div`,{className:`text-sm text-base-primary font-medium`,children:n.initiate_feedback}),R(`div`,{className:`py-4`,children:R(CC,{onRate:t,ariaLabel:n.initiate_feedback,icon:e})})]})}function EC({icon:e,rating:t,showFollowUpButton:n,onFollowUpClick:r}){let i=Rb();return R(`div`,{className:`flex flex-col items-center gap-3 mb-4`,children:[R(`div`,{className:`text-sm text-base-primary font-medium`,children:i.thanks_for_feedback}),R(wC,{rating:t,min:1,max:5,icon:e}),n&&R(yC,{variant:`secondary`,onClick:r,children:i.request_follow_up_feedback})]})}function DC({icon:e=`star`}){let{currentContent:t}=GS(),{rating:n,feedbackProgress:r,submitRating:i}=HS(),a=r.value!==`initial`&&n.value!==null,o=I(e=>{i(e),t.value=`feedback`},[i]),s=I(()=>{t.value=`feedback`},[]);return a?R(EC,{icon:e,rating:n.value??0,showFollowUpButton:r.value!==`submitted-follow-up`,onFollowUpClick:s}):R(TC,{icon:e,onRate:o})}var OC=/\[[\w\s]+\](?!\()/,kC=`font-medium py-px px-1 border border-audio-tag/20 rounded-button whitespace-nowrap text-audio-tag`;function AC(e){let t=[],n=new RegExp(OC,`g`),r=0;for(let i of e.matchAll(n))i.index!==void 0&&(i.index>r&&t.push({type:`text`,content:e.slice(r,i.index)}),t.push({type:`audioTag`,content:i[0]}),r=i.index+i[0].length);return r<e.length&&t.push({type:`text`,content:e.slice(r)}),t}function jC({text:e,className:t}){return R(ud,{children:mf(()=>AC(e),[e]).map((e,n)=>e.type===`audioTag`?R(`span`,{"data-audio-tag":!0,className:zS(kC,t),children:e.content},n):R(ud,{children:e.content},n))})}function MC(e){return e.replace(RegExp(`${OC.source}\\s*`,`g`),``).trim()}var NC=typeof self==`object`?self:globalThis,PC=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new NC[e](t)},FC=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(PC(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(PC(a,o),i)};return r},IC=e=>FC(new Map,e)(0),LC=``,{toString:RC}={},{keys:zC}=Object,BC=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=RC.call(e).slice(8,-1);switch(n){case`Array`:return[1,LC];case`Object`:return[2,LC];case`Date`:return[3,LC];case`RegExp`:return[4,LC];case`Map`:return[5,LC];case`Set`:return[6,LC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},VC=([e,t])=>e===0&&(t===`function`||t===`symbol`),HC=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=BC(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of zC(r))(e||!VC(BC(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(VC(BC(n))||VC(BC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!VC(BC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},UC=(e,{json:t,lossy:n}={})=>{let r=[];return HC(!(t||n),!!t,new Map,r)(e),r},WC=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?IC(UC(e,t)):structuredClone(e):(e,t)=>IC(UC(e,t)),GC=qC(`end`),KC=qC(`start`);function qC(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function JC(e){let t=KC(e),n=GC(e);if(t&&n)return{start:t,end:n}}var YC=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],XC={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...YC,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...YC],h2:[[`className`,`sr-only`]],img:[...YC,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...YC,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...YC],table:[...YC],ul:[...YC,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},ZC={}.hasOwnProperty;function QC(e,t){let n={type:`root`,children:[]},r=$C({schema:t?{...XC,...t}:XC,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function $C(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return ew(e,n);case`doctype`:return tw(e,n);case`element`:return nw(e,n);case`root`:return rw(e,n);case`text`:return iw(e,n);default:}}}function ew(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return dw(r,t),r}}function tw(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return dw(e,t),e}}function nw(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=aw(e,t.children),i=ow(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&ZC.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return dw(o,t),o}function rw(e,t){let n={type:`root`,children:aw(e,t.children)};return dw(n,t),n}function iw(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return dw(n,t),n}function aw(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=$C(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function ow(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&ZC.call(r,n)?r[n]:void 0,o=r&&ZC.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(ZC.call(s,l)){let t=s[l],n=sw(e,fw(a,l),l,t);n??=sw(e,fw(o,l),l,t),n!=null&&(c[l]=n)}if(i&&ZC.call(i,n)){let e=i[n];for(l in e)ZC.call(e,l)&&!ZC.call(c,l)&&(c[l]=e[l])}return c}function sw(e,t,n,r){return t?Array.isArray(r)?cw(e,t,n,r):lw(e,t,n,r):void 0}function cw(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=lw(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function lw(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&uw(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function uw(e,t,n){let r=e.schema.protocols&&ZC.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function dw(e,t){let n=JC(t);t.data&&(e.data=WC(t.data)),n&&(e.position=n)}function fw(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function pw(e){return function(t){return QC(t,e)}}var mw=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};mw.prototype.normal={},mw.prototype.property={},mw.prototype.space=void 0;function hw(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new mw(n,r,t)}function gw(e){return e.toLowerCase()}var _w=class{constructor(e,t){this.attribute=t,this.property=e}};_w.prototype.attribute=``,_w.prototype.booleanish=!1,_w.prototype.boolean=!1,_w.prototype.commaOrSpaceSeparated=!1,_w.prototype.commaSeparated=!1,_w.prototype.defined=!1,_w.prototype.mustUseProperty=!1,_w.prototype.number=!1,_w.prototype.overloadedBoolean=!1,_w.prototype.property=``,_w.prototype.spaceSeparated=!1,_w.prototype.space=void 0;var vw=gh({boolean:()=>bw,booleanish:()=>xw,commaOrSpaceSeparated:()=>Tw,commaSeparated:()=>ww,number:()=>V,overloadedBoolean:()=>Sw,spaceSeparated:()=>Cw}),yw=0,bw=Ew(),xw=Ew(),Sw=Ew(),V=Ew(),Cw=Ew(),ww=Ew(),Tw=Ew();function Ew(){return 2**++yw}var Dw=Object.keys(vw),Ow=class extends _w{constructor(e,t,n,r){let i=-1;if(super(e,t),kw(this,`space`,r),typeof n==`number`)for(;++i<Dw.length;){let e=Dw[i];kw(this,Dw[i],(n&vw[e])===vw[e])}}};Ow.prototype.defined=!0;function kw(e,t,n){n&&(e[t]=n)}function Aw(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ow(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gw(r)]=r,n[gw(a.attribute)]=r}return new mw(t,n,e.space)}var jw=Aw({properties:{ariaActiveDescendant:null,ariaAtomic:xw,ariaAutoComplete:null,ariaBusy:xw,ariaChecked:xw,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Cw,ariaCurrent:null,ariaDescribedBy:Cw,ariaDetails:null,ariaDisabled:xw,ariaDropEffect:Cw,ariaErrorMessage:null,ariaExpanded:xw,ariaFlowTo:Cw,ariaGrabbed:xw,ariaHasPopup:null,ariaHidden:xw,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Cw,ariaLevel:V,ariaLive:null,ariaModal:xw,ariaMultiLine:xw,ariaMultiSelectable:xw,ariaOrientation:null,ariaOwns:Cw,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:xw,ariaReadOnly:xw,ariaRelevant:null,ariaRequired:xw,ariaRoleDescription:Cw,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:xw,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Mw(e,t){return t in e?e[t]:t}function Nw(e,t){return Mw(e,t.toLowerCase())}var Pw=Aw({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ww,acceptCharset:Cw,accessKey:Cw,action:null,allow:null,allowFullScreen:bw,allowPaymentRequest:bw,allowUserMedia:bw,alt:null,as:null,async:bw,autoCapitalize:null,autoComplete:Cw,autoFocus:bw,autoPlay:bw,blocking:Cw,capture:null,charSet:null,checked:bw,cite:null,className:Cw,cols:V,colSpan:null,content:null,contentEditable:xw,controls:bw,controlsList:Cw,coords:V|ww,crossOrigin:null,data:null,dateTime:null,decoding:null,default:bw,defer:bw,dir:null,dirName:null,disabled:bw,download:Sw,draggable:xw,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:bw,formTarget:null,headers:Cw,height:V,hidden:Sw,high:V,href:null,hrefLang:null,htmlFor:Cw,httpEquiv:Cw,id:null,imageSizes:null,imageSrcSet:null,inert:bw,inputMode:null,integrity:null,is:null,isMap:bw,itemId:null,itemProp:Cw,itemRef:Cw,itemScope:bw,itemType:Cw,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:bw,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:bw,muted:bw,name:null,nonce:null,noModule:bw,noValidate:bw,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:bw,optimum:V,pattern:null,ping:Cw,placeholder:null,playsInline:bw,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:bw,referrerPolicy:null,rel:Cw,required:bw,reversed:bw,rows:V,rowSpan:V,sandbox:Cw,scope:null,scoped:bw,seamless:bw,selected:bw,shadowRootClonable:bw,shadowRootDelegatesFocus:bw,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:xw,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:bw,useMap:null,value:xw,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Cw,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:bw,declare:bw,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:bw,noHref:bw,noShade:bw,noWrap:bw,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:xw,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:bw,disableRemotePlayback:bw,prefix:null,property:null,results:V,security:null,unselectable:null},space:`html`,transform:Nw}),Fw=Aw({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Tw,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Cw,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:bw,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ww,g2:ww,glyphName:ww,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Tw,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Cw,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Tw,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tw,rev:Tw,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tw,requiredFeatures:Tw,requiredFonts:Tw,requiredFormats:Tw,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Tw,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Tw,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Tw,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Mw}),Iw=Aw({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Lw=Aw({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Nw}),Rw=Aw({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),zw={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Bw=/[A-Z]/g,Vw=/-[a-z]/g,Hw=/^data[-\w.:]+$/i;function Uw(e,t){let n=gw(t),r=t,i=_w;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Hw.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Vw,Gw);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Vw.test(e)){let n=e.replace(Bw,Ww);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ow}return new i(r,t)}function Ww(e){return`-`+e.toLowerCase()}function Gw(e){return e.charAt(1).toUpperCase()}var Kw=hw([jw,Pw,Iw,Lw,Rw],`html`),qw=hw([jw,Fw,Iw,Lw,Rw],`svg`);function Jw(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Yw(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Xw=/[#.]/g;function Zw(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Xw.lastIndex=i;let e=Xw.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Qw(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function $w(e){return e.join(` `).trim()}function eT(e,t,n){let r=n?oT(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Zw(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,tT(i))a.unshift(i);else for(let[t,n]of Object.entries(i))nT(e,o.properties,t,n)}for(let e of a)rT(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function tT(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function nT(e,t,n,r){let i=Uw(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Qw(r):i.commaSeparated?Jw(r):i.commaOrSpaceSeparated?Qw(Jw(r).join(` `)):iT(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?aT(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(iT(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function rT(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)rT(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?rT(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function iT(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||gw(n)===gw(t)))return!0}return n}function aT(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function oT(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var sT=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),cT=eT(Kw,`div`),lT=eT(qw,`g`,sT);function uT(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=dT(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=dT(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function dT(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
281
281
|
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var fT={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},pT={}.hasOwnProperty,mT=Object.prototype;function hT(e,t){let n=t||{};return gT({file:n.file||void 0,location:!1,schema:n.space===`svg`?qw:Kw,verbose:n.verbose||!1},e)}function gT(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},yT(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:_T(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=uT(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},yT(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},yT(e,r,n),n}default:return n=vT(e,t),n}}function _T(e,t){let n=-1,r=[];for(;++n<t.length;){let i=gT(e,t[n]);r.push(i)}return r}function vT(e,t){let n=e.schema;e.schema=t.namespaceURI===fT.svg?qw:Kw;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;pT.call(mT,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?lT:cT)(t.tagName,i,_T(e,t.childNodes));if(yT(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&xT(r.startTag),o=r&&r.endTag&&xT(r.endTag),s=gT(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function yT(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=bT(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function bT(e,t,n){let r=xT(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)pT.call(n.attrs,i)&&(r[Uw(e.schema,i).property]=xT(n.attrs[i]));n.startTag;let a=xT(n.startTag),o=n.endTag?xT(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function xT(e){let t=ST({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ST({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ST(e){return e.line&&e.column?e:void 0}var CT={}.hasOwnProperty;function wT(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&CT.call(t,e)){let n=String(t[e]);i=CT.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var TT={},ET={}.hasOwnProperty,DT=wT(`type`,{handlers:{root:kT,element:PT,text:MT,comment:NT,doctype:jT}});function OT(e,t){let n=(t||TT).space;return DT(e,n===`svg`?qw:Kw)}function kT(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=IT(e.children,n,t),LT(e,n),n}function AT(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=IT(e.children,n,t),LT(e,n),n}function jT(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return LT(e,t),t}function MT(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return LT(e,t),t}function NT(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return LT(e,t),t}function PT(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=qw);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&ET.call(e.properties,a)){let t=FT(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:fT[o],childNodes:[],parentNode:null};return s.childNodes=IT(e.children,s,r),LT(e,s),e.tagName===`template`&&e.content&&(s.content=AT(e.content,r)),s}function FT(e,t,n){let r=Uw(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Yw(n):$w(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=fT[r.space]}return i}function IT(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=DT(e[r],n);a.parentNode=t,i.push(a)}return i}function LT(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var RT=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],zT=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),H;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(H||={});var BT={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function VT(e){return e>=55296&&e<=57343}function HT(e){return e>=56320&&e<=57343}function UT(e,t){return(e-55296)*1024+9216+t}function WT(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function GT(e){return e>=64976&&e<=65007||zT.has(e)}var U;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(U||={});var KT=65536,qT=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=KT,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(HT(t))return this.pos++,this._addGap(),UT(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,H.EOF;return this._err(U.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,H.EOF;let n=this.html.charCodeAt(t);return n===H.CARRIAGE_RETURN?H.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,H.EOF;let e=this.html.charCodeAt(this.pos);return e===H.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,H.LINE_FEED):e===H.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,VT(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===H.LINE_FEED||e===H.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){WT(e)?this._err(U.controlCharacterInInputStream):GT(e)&&this._err(U.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},JT;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(JT||={});function YT(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var XT=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),ZT=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function QT(e){return e>=55296&&e<=57343||e>1114111?65533:ZT.get(e)??e}var $T;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})($T||={});var eE=32,tE;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(tE||={});function nE(e){return e>=$T.ZERO&&e<=$T.NINE}function rE(e){return e>=$T.UPPER_A&&e<=$T.UPPER_F||e>=$T.LOWER_A&&e<=$T.LOWER_F}function iE(e){return e>=$T.UPPER_A&&e<=$T.UPPER_Z||e>=$T.LOWER_A&&e<=$T.LOWER_Z||nE(e)}function aE(e){return e===$T.EQUALS||iE(e)}var oE;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(oE||={});var sE;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(sE||={});var cE=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=oE.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=sE.Strict}startEntity(e){this.decodeMode=e,this.state=oE.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case oE.EntityStart:return e.charCodeAt(t)===$T.NUM?(this.state=oE.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=oE.NamedEntity,this.stateNamedEntity(e,t));case oE.NumericStart:return this.stateNumericStart(e,t);case oE.NumericDecimal:return this.stateNumericDecimal(e,t);case oE.NumericHex:return this.stateNumericHex(e,t);case oE.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|eE)===$T.LOWER_X?(this.state=oE.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=oE.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(nE(r)||rE(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(nE(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===$T.SEMI)this.consumed+=1;else if(this.decodeMode===sE.Strict)return 0;return this.emitCodePoint(QT(this.result),this.consumed),this.errors&&(e!==$T.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&tE.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=lE(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===sE.Attribute&&(i===0||aE(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&tE.VALUE_LENGTH)>>14,i!==0){if(a===$T.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==sE.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&tE.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~tE.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case oE.NamedEntity:return this.result!==0&&(this.decodeMode!==sE.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case oE.NumericDecimal:return this.emitNumericEntity(0,2);case oE.NumericHex:return this.emitNumericEntity(0,3);case oE.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case oE.EntityStart:return 0}}};function lE(e,t,n,r){let i=(t&tE.BRANCH_LENGTH)>>7,a=t&tE.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var W;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(W||={});var uE;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(uE||={});var dE;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(dE||={});var G;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(G||={});var K;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(K||={});var fE=new Map([[G.A,K.A],[G.ADDRESS,K.ADDRESS],[G.ANNOTATION_XML,K.ANNOTATION_XML],[G.APPLET,K.APPLET],[G.AREA,K.AREA],[G.ARTICLE,K.ARTICLE],[G.ASIDE,K.ASIDE],[G.B,K.B],[G.BASE,K.BASE],[G.BASEFONT,K.BASEFONT],[G.BGSOUND,K.BGSOUND],[G.BIG,K.BIG],[G.BLOCKQUOTE,K.BLOCKQUOTE],[G.BODY,K.BODY],[G.BR,K.BR],[G.BUTTON,K.BUTTON],[G.CAPTION,K.CAPTION],[G.CENTER,K.CENTER],[G.CODE,K.CODE],[G.COL,K.COL],[G.COLGROUP,K.COLGROUP],[G.DD,K.DD],[G.DESC,K.DESC],[G.DETAILS,K.DETAILS],[G.DIALOG,K.DIALOG],[G.DIR,K.DIR],[G.DIV,K.DIV],[G.DL,K.DL],[G.DT,K.DT],[G.EM,K.EM],[G.EMBED,K.EMBED],[G.FIELDSET,K.FIELDSET],[G.FIGCAPTION,K.FIGCAPTION],[G.FIGURE,K.FIGURE],[G.FONT,K.FONT],[G.FOOTER,K.FOOTER],[G.FOREIGN_OBJECT,K.FOREIGN_OBJECT],[G.FORM,K.FORM],[G.FRAME,K.FRAME],[G.FRAMESET,K.FRAMESET],[G.H1,K.H1],[G.H2,K.H2],[G.H3,K.H3],[G.H4,K.H4],[G.H5,K.H5],[G.H6,K.H6],[G.HEAD,K.HEAD],[G.HEADER,K.HEADER],[G.HGROUP,K.HGROUP],[G.HR,K.HR],[G.HTML,K.HTML],[G.I,K.I],[G.IMG,K.IMG],[G.IMAGE,K.IMAGE],[G.INPUT,K.INPUT],[G.IFRAME,K.IFRAME],[G.KEYGEN,K.KEYGEN],[G.LABEL,K.LABEL],[G.LI,K.LI],[G.LINK,K.LINK],[G.LISTING,K.LISTING],[G.MAIN,K.MAIN],[G.MALIGNMARK,K.MALIGNMARK],[G.MARQUEE,K.MARQUEE],[G.MATH,K.MATH],[G.MENU,K.MENU],[G.META,K.META],[G.MGLYPH,K.MGLYPH],[G.MI,K.MI],[G.MO,K.MO],[G.MN,K.MN],[G.MS,K.MS],[G.MTEXT,K.MTEXT],[G.NAV,K.NAV],[G.NOBR,K.NOBR],[G.NOFRAMES,K.NOFRAMES],[G.NOEMBED,K.NOEMBED],[G.NOSCRIPT,K.NOSCRIPT],[G.OBJECT,K.OBJECT],[G.OL,K.OL],[G.OPTGROUP,K.OPTGROUP],[G.OPTION,K.OPTION],[G.P,K.P],[G.PARAM,K.PARAM],[G.PLAINTEXT,K.PLAINTEXT],[G.PRE,K.PRE],[G.RB,K.RB],[G.RP,K.RP],[G.RT,K.RT],[G.RTC,K.RTC],[G.RUBY,K.RUBY],[G.S,K.S],[G.SCRIPT,K.SCRIPT],[G.SEARCH,K.SEARCH],[G.SECTION,K.SECTION],[G.SELECT,K.SELECT],[G.SOURCE,K.SOURCE],[G.SMALL,K.SMALL],[G.SPAN,K.SPAN],[G.STRIKE,K.STRIKE],[G.STRONG,K.STRONG],[G.STYLE,K.STYLE],[G.SUB,K.SUB],[G.SUMMARY,K.SUMMARY],[G.SUP,K.SUP],[G.TABLE,K.TABLE],[G.TBODY,K.TBODY],[G.TEMPLATE,K.TEMPLATE],[G.TEXTAREA,K.TEXTAREA],[G.TFOOT,K.TFOOT],[G.TD,K.TD],[G.TH,K.TH],[G.THEAD,K.THEAD],[G.TITLE,K.TITLE],[G.TR,K.TR],[G.TRACK,K.TRACK],[G.TT,K.TT],[G.U,K.U],[G.UL,K.UL],[G.SVG,K.SVG],[G.VAR,K.VAR],[G.WBR,K.WBR],[G.XMP,K.XMP]]);function pE(e){return fE.get(e)??K.UNKNOWN}var q=K,mE={[W.HTML]:new Set([q.ADDRESS,q.APPLET,q.AREA,q.ARTICLE,q.ASIDE,q.BASE,q.BASEFONT,q.BGSOUND,q.BLOCKQUOTE,q.BODY,q.BR,q.BUTTON,q.CAPTION,q.CENTER,q.COL,q.COLGROUP,q.DD,q.DETAILS,q.DIR,q.DIV,q.DL,q.DT,q.EMBED,q.FIELDSET,q.FIGCAPTION,q.FIGURE,q.FOOTER,q.FORM,q.FRAME,q.FRAMESET,q.H1,q.H2,q.H3,q.H4,q.H5,q.H6,q.HEAD,q.HEADER,q.HGROUP,q.HR,q.HTML,q.IFRAME,q.IMG,q.INPUT,q.LI,q.LINK,q.LISTING,q.MAIN,q.MARQUEE,q.MENU,q.META,q.NAV,q.NOEMBED,q.NOFRAMES,q.NOSCRIPT,q.OBJECT,q.OL,q.P,q.PARAM,q.PLAINTEXT,q.PRE,q.SCRIPT,q.SECTION,q.SELECT,q.SOURCE,q.STYLE,q.SUMMARY,q.TABLE,q.TBODY,q.TD,q.TEMPLATE,q.TEXTAREA,q.TFOOT,q.TH,q.THEAD,q.TITLE,q.TR,q.TRACK,q.UL,q.WBR,q.XMP]),[W.MATHML]:new Set([q.MI,q.MO,q.MN,q.MS,q.MTEXT,q.ANNOTATION_XML]),[W.SVG]:new Set([q.TITLE,q.FOREIGN_OBJECT,q.DESC]),[W.XLINK]:new Set,[W.XML]:new Set,[W.XMLNS]:new Set},hE=new Set([q.H1,q.H2,q.H3,q.H4,q.H5,q.H6]);new Set([G.STYLE,G.SCRIPT,G.XMP,G.IFRAME,G.NOEMBED,G.NOFRAMES,G.PLAINTEXT]);var J;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(J||={});var gE={DATA:J.DATA,RCDATA:J.RCDATA,RAWTEXT:J.RAWTEXT,SCRIPT_DATA:J.SCRIPT_DATA,PLAINTEXT:J.PLAINTEXT,CDATA_SECTION:J.CDATA_SECTION};function _E(e){return e>=H.DIGIT_0&&e<=H.DIGIT_9}function vE(e){return e>=H.LATIN_CAPITAL_A&&e<=H.LATIN_CAPITAL_Z}function yE(e){return e>=H.LATIN_SMALL_A&&e<=H.LATIN_SMALL_Z}function bE(e){return yE(e)||vE(e)}function xE(e){return bE(e)||_E(e)}function SE(e){return e+32}function CE(e){return e===H.SPACE||e===H.LINE_FEED||e===H.TABULATION||e===H.FORM_FEED}function wE(e){return CE(e)||e===H.SOLIDUS||e===H.GREATER_THAN_SIGN}function TE(e){return e===H.NULL?U.nullCharacterReference:e>1114111?U.characterReferenceOutsideUnicodeRange:VT(e)?U.surrogateCharacterReference:GT(e)?U.noncharacterCharacterReference:WT(e)||e===H.CARRIAGE_RETURN?U.controlCharacterReference:null}var EE=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=J.DATA,this.returnState=J.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new qT(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new cE(XT,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(U.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(U.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=TE(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:JT.START_TAG,tagName:``,tagID:K.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:JT.END_TAG,tagName:``,tagID:K.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:JT.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:JT.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(YT(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(U.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=pE(e.tagName),e.type===JT.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(U.endTagWithAttributes),e.selfClosing&&this._err(U.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case JT.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case JT.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case JT.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:JT.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=CE(e)?JT.WHITESPACE_CHARACTER:e===H.NULL?JT.NULL_CHARACTER:JT.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(JT.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=J.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?sE.Attribute:sE.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===J.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===J.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===J.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case J.DATA:this._stateData(e);break;case J.RCDATA:this._stateRcdata(e);break;case J.RAWTEXT:this._stateRawtext(e);break;case J.SCRIPT_DATA:this._stateScriptData(e);break;case J.PLAINTEXT:this._statePlaintext(e);break;case J.TAG_OPEN:this._stateTagOpen(e);break;case J.END_TAG_OPEN:this._stateEndTagOpen(e);break;case J.TAG_NAME:this._stateTagName(e);break;case J.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case J.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case J.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case J.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case J.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case J.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case J.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case J.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case J.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case J.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case J.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case J.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case J.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case J.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case J.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case J.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case J.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case J.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case J.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case J.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case J.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case J.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case J.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case J.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case J.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case J.BOGUS_COMMENT:this._stateBogusComment(e);break;case J.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case J.COMMENT_START:this._stateCommentStart(e);break;case J.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case J.COMMENT:this._stateComment(e);break;case J.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case J.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case J.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case J.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case J.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case J.COMMENT_END:this._stateCommentEnd(e);break;case J.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case J.DOCTYPE:this._stateDoctype(e);break;case J.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case J.DOCTYPE_NAME:this._stateDoctypeName(e);break;case J.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case J.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case J.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case J.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case J.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case J.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case J.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case J.CDATA_SECTION:this._stateCdataSection(e);break;case J.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case J.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case J.CHARACTER_REFERENCE:this._stateCharacterReference();break;case J.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case H.LESS_THAN_SIGN:this.state=J.TAG_OPEN;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitCodePoint(e);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case H.AMPERSAND:this._startCharacterReference();break;case H.LESS_THAN_SIGN:this.state=J.RCDATA_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case H.LESS_THAN_SIGN:this.state=J.RAWTEXT_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(bE(e))this._createStartTagToken(),this.state=J.TAG_NAME,this._stateTagName(e);else switch(e){case H.EXCLAMATION_MARK:this.state=J.MARKUP_DECLARATION_OPEN;break;case H.SOLIDUS:this.state=J.END_TAG_OPEN;break;case H.QUESTION_MARK:this._err(U.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=J.BOGUS_COMMENT,this._stateBogusComment(e);break;case H.EOF:this._err(U.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(U.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=J.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(bE(e))this._createEndTagToken(),this.state=J.TAG_NAME,this._stateTagName(e);else switch(e){case H.GREATER_THAN_SIGN:this._err(U.missingEndTagName),this.state=J.DATA;break;case H.EOF:this._err(U.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(U.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=J.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_ATTRIBUTE_NAME;break;case H.SOLIDUS:this.state=J.SELF_CLOSING_START_TAG;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentTagToken();break;case H.NULL:this._err(U.unexpectedNullCharacter),t.tagName+=`�`;break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(vE(e)?SE(e):e)}}_stateRcdataLessThanSign(e){e===H.SOLIDUS?this.state=J.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=J.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){bE(e)?(this.state=J.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=J.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=J.BEFORE_ATTRIBUTE_NAME,!1;case H.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=J.SELF_CLOSING_START_TAG,!1;case H.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=J.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===H.SOLIDUS?this.state=J.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=J.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){bE(e)?(this.state=J.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=J.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case H.SOLIDUS:this.state=J.SCRIPT_DATA_END_TAG_OPEN;break;case H.EXCLAMATION_MARK:this.state=J.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=J.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){bE(e)?(this.state=J.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===H.HYPHEN_MINUS?(this.state=J.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===H.HYPHEN_MINUS?(this.state=J.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case H.HYPHEN_MINUS:this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.GREATER_THAN_SIGN:this.state=J.SCRIPT_DATA,this._emitChars(`>`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===H.SOLIDUS?this.state=J.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:bE(e)?(this._emitChars(`<`),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){bE(e)?(this.state=J.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(BT.SCRIPT,!1)&&wE(this.preprocessor.peek(BT.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<BT.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case H.HYPHEN_MINUS:this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.GREATER_THAN_SIGN:this.state=J.SCRIPT_DATA,this._emitChars(`>`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===H.SOLIDUS?(this.state=J.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(BT.SCRIPT,!1)&&wE(this.preprocessor.peek(BT.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<BT.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=J.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.SOLIDUS:case H.GREATER_THAN_SIGN:case H.EOF:this.state=J.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case H.EQUALS_SIGN:this._err(U.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=J.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=J.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:case H.SOLIDUS:case H.GREATER_THAN_SIGN:case H.EOF:this._leaveAttrName(),this.state=J.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case H.EQUALS_SIGN:this._leaveAttrName(),this.state=J.BEFORE_ATTRIBUTE_VALUE;break;case H.QUOTATION_MARK:case H.APOSTROPHE:case H.LESS_THAN_SIGN:this._err(U.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(vE(e)?SE(e):e)}}_stateAfterAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.SOLIDUS:this.state=J.SELF_CLOSING_START_TAG;break;case H.EQUALS_SIGN:this.state=J.BEFORE_ATTRIBUTE_VALUE;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentTagToken();break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=J.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:this.state=J.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case H.APOSTROPHE:this.state=J.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingAttributeValue),this.state=J.DATA,this.emitCurrentTagToken();break;default:this.state=J.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case H.QUOTATION_MARK:this.state=J.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case H.APOSTROPHE:this.state=J.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this._leaveAttrValue(),this.state=J.BEFORE_ATTRIBUTE_NAME;break;case H.AMPERSAND:this._startCharacterReference();break;case H.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=J.DATA,this.emitCurrentTagToken();break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.QUOTATION_MARK:case H.APOSTROPHE:case H.LESS_THAN_SIGN:case H.EQUALS_SIGN:case H.GRAVE_ACCENT:this._err(U.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this._leaveAttrValue(),this.state=J.BEFORE_ATTRIBUTE_NAME;break;case H.SOLIDUS:this._leaveAttrValue(),this.state=J.SELF_CLOSING_START_TAG;break;case H.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=J.DATA,this.emitCurrentTagToken();break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this._err(U.missingWhitespaceBetweenAttributes),this.state=J.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case H.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=J.DATA,this.emitCurrentTagToken();break}case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this._err(U.unexpectedSolidusInTag),this.state=J.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentComment(t);break;case H.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case H.NULL:this._err(U.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(BT.DASH_DASH,!0)?(this._createCommentToken(BT.DASH_DASH.length+1),this.state=J.COMMENT_START):this._consumeSequenceIfMatch(BT.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(BT.DOCTYPE.length+1),this.state=J.DOCTYPE):this._consumeSequenceIfMatch(BT.CDATA_START,!0)?this.inForeignNode?this.state=J.CDATA_SECTION:(this._err(U.cdataInHtmlContent),this._createCommentToken(BT.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=J.BOGUS_COMMENT):this._ensureHibernation()||(this._err(U.incorrectlyOpenedComment),this._createCommentToken(2),this.state=J.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_START_DASH;break;case H.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=J.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=J.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_END;break;case H.GREATER_THAN_SIGN:this._err(U.abruptClosingOfEmptyComment),this.state=J.DATA,this.emitCurrentComment(t);break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=J.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_END_DASH;break;case H.LESS_THAN_SIGN:t.data+=`<`,this.state=J.COMMENT_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.data+=`�`;break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case H.EXCLAMATION_MARK:t.data+=`!`,this.state=J.COMMENT_LESS_THAN_SIGN_BANG;break;case H.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=J.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===H.HYPHEN_MINUS?this.state=J.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=J.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===H.HYPHEN_MINUS?this.state=J.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=J.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==H.GREATER_THAN_SIGN&&e!==H.EOF&&this._err(U.nestedComment),this.state=J.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_END;break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=J.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentComment(t);break;case H.EXCLAMATION_MARK:this.state=J.COMMENT_END_BANG;break;case H.HYPHEN_MINUS:t.data+=`-`;break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=J.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:t.data+=`--!`,this.state=J.COMMENT_END_DASH;break;case H.GREATER_THAN_SIGN:this._err(U.incorrectlyClosedComment),this.state=J.DATA,this.emitCurrentComment(t);break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=J.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:this.state=J.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case H.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBeforeDoctypeName),this.state=J.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(vE(e))this._createDoctypeToken(String.fromCharCode(SE(e))),this.state=J.DOCTYPE_NAME;else switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.NULL:this._err(U.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=J.DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:{this._err(U.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=J.DATA;break}case H.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=J.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.AFTER_DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.NULL:this._err(U.unexpectedNullCharacter),t.name+=`�`;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(vE(e)?SE(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(BT.PUBLIC,!1)?this.state=J.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(BT.SYSTEM,!1)?this.state=J.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(U.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.QUOTATION_MARK:this._err(U.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(U.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case H.QUOTATION_MARK:this.state=J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.publicId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case H.APOSTROPHE:this.state=J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.publicId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.QUOTATION_MARK:this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.QUOTATION_MARK:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.QUOTATION_MARK:this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case H.QUOTATION_MARK:this.state=J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.systemId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case H.APOSTROPHE:this.state=J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.systemId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.NULL:this._err(U.unexpectedNullCharacter);break;case H.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case H.RIGHT_SQUARE_BRACKET:this.state=J.CDATA_SECTION_BRACKET;break;case H.EOF:this._err(U.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===H.RIGHT_SQUARE_BRACKET?this.state=J.CDATA_SECTION_END:(this._emitChars(`]`),this.state=J.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case H.GREATER_THAN_SIGN:this.state=J.DATA;break;case H.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=J.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(H.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&xE(this.preprocessor.peek(1))?J.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){xE(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===H.SEMICOLON&&this._err(U.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},DE=new Set([K.DD,K.DT,K.LI,K.OPTGROUP,K.OPTION,K.P,K.RB,K.RP,K.RT,K.RTC]),OE=new Set([...DE,K.CAPTION,K.COLGROUP,K.TBODY,K.TD,K.TFOOT,K.TH,K.THEAD,K.TR]),kE=new Set([K.APPLET,K.CAPTION,K.HTML,K.MARQUEE,K.OBJECT,K.TABLE,K.TD,K.TEMPLATE,K.TH]),AE=new Set([...kE,K.OL,K.UL]),jE=new Set([...kE,K.BUTTON]),ME=new Set([K.ANNOTATION_XML,K.MI,K.MN,K.MO,K.MS,K.MTEXT]),NE=new Set([K.DESC,K.FOREIGN_OBJECT,K.TITLE]),PE=new Set([K.TR,K.TEMPLATE,K.HTML]),FE=new Set([K.TBODY,K.TFOOT,K.THEAD,K.TEMPLATE,K.HTML]),IE=new Set([K.TABLE,K.TEMPLATE,K.HTML]),LE=new Set([K.TD,K.TH]),RE=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=K.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===K.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===W.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==W.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(hE,W.HTML)}popUntilTableCellPopped(){this.popUntilPopped(LE,W.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(IE,W.HTML)}clearBackToTableBodyContext(){this.clearBackTo(FE,W.HTML)}clearBackToTableRowContext(){this.clearBackTo(PE,W.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===K.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===K.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case W.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case W.SVG:if(NE.has(r))return!1;break;case W.MATHML:if(ME.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,kE)}hasInListItemScope(e){return this.hasInDynamicScope(e,AE)}hasInButtonScope(e){return this.hasInDynamicScope(e,jE)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case W.HTML:if(hE.has(t))return!0;if(kE.has(t))return!1;break;case W.SVG:if(NE.has(t))return!1;break;case W.MATHML:if(ME.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case e:return!0;case K.TABLE:case K.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===W.HTML)switch(this.tagIDs[e]){case K.TBODY:case K.THEAD:case K.TFOOT:return!0;case K.TABLE:case K.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case e:return!0;case K.OPTION:case K.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&DE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&OE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&OE.has(this.currentTagId);)this.pop()}},zE=3,BE;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(BE||={});var VE={type:BE.Marker},HE=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===BE.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<zE)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<zE)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=zE&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(VE)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:BE.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:BE.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(VE);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===BE.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===BE.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===BE.Element&&t.element===e)}},UE={createDocument(){return{nodeName:`#document`,mode:dE.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};UE.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(UE.isTextNode(n)){n.value+=t;return}}UE.appendChild(e,UE.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&UE.isTextNode(r)?r.value+=t:UE.insertBefore(e,UE.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},WE=`html`,GE=`about:legacy-compat`,KE=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,qE=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),JE=[...qE,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],YE=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),XE=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],ZE=[...XE,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function QE(e,t){return t.some(t=>e.startsWith(t))}function $E(e){return e.name===WE&&e.publicId===null&&(e.systemId===null||e.systemId===GE)}function eD(e){if(e.name!==WE)return dE.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===KE)return dE.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),YE.has(n))return dE.QUIRKS;let e=t===null?JE:qE;if(QE(n,e))return dE.QUIRKS;if(e=t===null?XE:ZE,QE(n,e))return dE.LIMITED_QUIRKS}return dE.NO_QUIRKS}var tD={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},nD=`definitionurl`,rD=`definitionURL`,iD=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),aD=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:W.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:W.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:W.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:W.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:W.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:W.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:W.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:W.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:W.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:W.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:W.XMLNS}]]),oD=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),sD=new Set([K.B,K.BIG,K.BLOCKQUOTE,K.BODY,K.BR,K.CENTER,K.CODE,K.DD,K.DIV,K.DL,K.DT,K.EM,K.EMBED,K.H1,K.H2,K.H3,K.H4,K.H5,K.H6,K.HEAD,K.HR,K.I,K.IMG,K.LI,K.LISTING,K.MENU,K.META,K.NOBR,K.OL,K.P,K.PRE,K.RUBY,K.S,K.SMALL,K.SPAN,K.STRONG,K.STRIKE,K.SUB,K.SUP,K.TABLE,K.TT,K.U,K.UL,K.VAR]);function cD(e){let t=e.tagID;return t===K.FONT&&e.attrs.some(({name:e})=>e===uE.COLOR||e===uE.SIZE||e===uE.FACE)||sD.has(t)}function lD(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===nD){e.attrs[t].name=rD;break}}function uD(e){for(let t=0;t<e.attrs.length;t++){let n=iD.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function dD(e){for(let t=0;t<e.attrs.length;t++){let n=aD.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function fD(e){let t=oD.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=pE(e.tagName))}function pD(e,t){return t===W.MATHML&&(e===K.MI||e===K.MO||e===K.MN||e===K.MS||e===K.MTEXT)}function mD(e,t,n){if(t===W.MATHML&&e===K.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===uE.ENCODING){let t=n[e].value.toLowerCase();return t===tD.TEXT_HTML||t===tD.APPLICATION_XML}}return t===W.SVG&&(e===K.FOREIGN_OBJECT||e===K.DESC||e===K.TITLE)}function hD(e,t,n,r){return(!r||r===W.HTML)&&mD(e,t,n)||(!r||r===W.MATHML)&&pD(e,t)}var gD=`hidden`,_D=8,vD=3,Y;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(Y||={});var yD={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},bD=new Set([K.TABLE,K.TBODY,K.TFOOT,K.THEAD,K.TR]),xD={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:UE,onParseError:null},SD=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Y.INITIAL,this.originalInsertionMode=Y.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...xD,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new EE(this.options,this),this.activeFormattingElements=new HE(this.treeAdapter),this.fragmentContextID=n?pE(this.treeAdapter.getTagName(n)):K.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new RE(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...xD,...t};e??=n.treeAdapter.createElement(G.TEMPLATE,W.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,W.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===K.TEMPLATE&&i.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??yD,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===W.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,W.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Y.TEXT}switchToPlaintextParsing(){this.insertionMode=Y.TEXT,this.originalInsertionMode=Y.IN_BODY,this.tokenizer.state=gE.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===G.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==W.HTML))switch(this.fragmentContextID){case K.TITLE:case K.TEXTAREA:this.tokenizer.state=gE.RCDATA;break;case K.STYLE:case K.XMP:case K.IFRAME:case K.NOEMBED:case K.NOFRAMES:case K.NOSCRIPT:this.tokenizer.state=gE.RAWTEXT;break;case K.SCRIPT:this.tokenizer.state=gE.SCRIPT_DATA;break;case K.PLAINTEXT:this.tokenizer.state=gE.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,W.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,W.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(G.HTML,W.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,K.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===JT.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===K.SVG&&this.treeAdapter.getTagName(t)===G.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===W.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===K.MGLYPH||e.tagID===K.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,W.HTML)}_processToken(e){switch(e.type){case JT.CHARACTER:this.onCharacter(e);break;case JT.NULL_CHARACTER:this.onNullCharacter(e);break;case JT.COMMENT:this.onComment(e);break;case JT.DOCTYPE:this.onDoctype(e);break;case JT.START_TAG:this._processStartTag(e);break;case JT.END_TAG:this.onEndTag(e);break;case JT.EOF:this.onEof(e);break;case JT.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return hD(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===BE.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(K.P),this.openElements.popUntilTagNamePopped(K.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case K.TR:this.insertionMode=Y.IN_ROW;return;case K.TBODY:case K.THEAD:case K.TFOOT:this.insertionMode=Y.IN_TABLE_BODY;return;case K.CAPTION:this.insertionMode=Y.IN_CAPTION;return;case K.COLGROUP:this.insertionMode=Y.IN_COLUMN_GROUP;return;case K.TABLE:this.insertionMode=Y.IN_TABLE;return;case K.BODY:this.insertionMode=Y.IN_BODY;return;case K.FRAMESET:this.insertionMode=Y.IN_FRAMESET;return;case K.SELECT:this._resetInsertionModeForSelect(e);return;case K.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case K.HTML:this.insertionMode=this.headElement?Y.AFTER_HEAD:Y.BEFORE_HEAD;return;case K.TD:case K.TH:if(e>0){this.insertionMode=Y.IN_CELL;return}break;case K.HEAD:if(e>0){this.insertionMode=Y.IN_HEAD;return}break}this.insertionMode=Y.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===K.TEMPLATE)break;if(e===K.TABLE){this.insertionMode=Y.IN_SELECT_IN_TABLE;return}}this.insertionMode=Y.IN_SELECT}_isElementCausesFosterParenting(e){return bD.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case K.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===W.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case K.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return mE[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Bk(this,e);return}switch(this.insertionMode){case Y.INITIAL:FD(this,e);break;case Y.BEFORE_HTML:RD(this,e);break;case Y.BEFORE_HEAD:VD(this,e);break;case Y.IN_HEAD:GD(this,e);break;case Y.IN_HEAD_NO_SCRIPT:JD(this,e);break;case Y.AFTER_HEAD:ZD(this,e);break;case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:eO(this,e);break;case Y.TEXT:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:YO(this,e);break;case Y.IN_TABLE_TEXT:ck(this,e);break;case Y.IN_COLUMN_GROUP:hk(this,e);break;case Y.AFTER_BODY:jk(this,e);break;case Y.AFTER_AFTER_BODY:Lk(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){zk(this,e);return}switch(this.insertionMode){case Y.INITIAL:FD(this,e);break;case Y.BEFORE_HTML:RD(this,e);break;case Y.BEFORE_HEAD:VD(this,e);break;case Y.IN_HEAD:GD(this,e);break;case Y.IN_HEAD_NO_SCRIPT:JD(this,e);break;case Y.AFTER_HEAD:ZD(this,e);break;case Y.TEXT:this._insertCharacters(e);break;case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:YO(this,e);break;case Y.IN_COLUMN_GROUP:hk(this,e);break;case Y.AFTER_BODY:jk(this,e);break;case Y.AFTER_AFTER_BODY:Lk(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){AD(this,e);return}switch(this.insertionMode){case Y.INITIAL:case Y.BEFORE_HTML:case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_TEMPLATE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:AD(this,e);break;case Y.IN_TABLE_TEXT:lk(this,e);break;case Y.AFTER_BODY:jD(this,e);break;case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:MD(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Y.INITIAL:PD(this,e);break;case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:this._err(e,U.misplacedDoctype);break;case Y.IN_TABLE_TEXT:lk(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,U.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Hk(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Y.INITIAL:FD(this,e);break;case Y.BEFORE_HTML:ID(this,e);break;case Y.BEFORE_HEAD:zD(this,e);break;case Y.IN_HEAD:HD(this,e);break;case Y.IN_HEAD_NO_SCRIPT:KD(this,e);break;case Y.AFTER_HEAD:YD(this,e);break;case Y.IN_BODY:NO(this,e);break;case Y.IN_TABLE:ik(this,e);break;case Y.IN_TABLE_TEXT:lk(this,e);break;case Y.IN_CAPTION:dk(this,e);break;case Y.IN_COLUMN_GROUP:pk(this,e);break;case Y.IN_TABLE_BODY:gk(this,e);break;case Y.IN_ROW:vk(this,e);break;case Y.IN_CELL:bk(this,e);break;case Y.IN_SELECT:Sk(this,e);break;case Y.IN_SELECT_IN_TABLE:wk(this,e);break;case Y.IN_TEMPLATE:Ek(this,e);break;case Y.AFTER_BODY:kk(this,e);break;case Y.IN_FRAMESET:Mk(this,e);break;case Y.AFTER_FRAMESET:Pk(this,e);break;case Y.AFTER_AFTER_BODY:Ik(this,e);break;case Y.AFTER_AFTER_FRAMESET:Rk(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?Uk(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Y.INITIAL:FD(this,e);break;case Y.BEFORE_HTML:LD(this,e);break;case Y.BEFORE_HEAD:BD(this,e);break;case Y.IN_HEAD:UD(this,e);break;case Y.IN_HEAD_NO_SCRIPT:qD(this,e);break;case Y.AFTER_HEAD:XD(this,e);break;case Y.IN_BODY:GO(this,e);break;case Y.TEXT:qO(this,e);break;case Y.IN_TABLE:ak(this,e);break;case Y.IN_TABLE_TEXT:lk(this,e);break;case Y.IN_CAPTION:fk(this,e);break;case Y.IN_COLUMN_GROUP:mk(this,e);break;case Y.IN_TABLE_BODY:_k(this,e);break;case Y.IN_ROW:yk(this,e);break;case Y.IN_CELL:xk(this,e);break;case Y.IN_SELECT:Ck(this,e);break;case Y.IN_SELECT_IN_TABLE:Tk(this,e);break;case Y.IN_TEMPLATE:Dk(this,e);break;case Y.AFTER_BODY:Ak(this,e);break;case Y.IN_FRAMESET:Nk(this,e);break;case Y.AFTER_FRAMESET:Fk(this,e);break;case Y.AFTER_AFTER_BODY:Lk(this,e);break;default:}}onEof(e){switch(this.insertionMode){case Y.INITIAL:FD(this,e);break;case Y.BEFORE_HTML:RD(this,e);break;case Y.BEFORE_HEAD:VD(this,e);break;case Y.IN_HEAD:GD(this,e);break;case Y.IN_HEAD_NO_SCRIPT:JD(this,e);break;case Y.AFTER_HEAD:ZD(this,e);break;case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:KO(this,e);break;case Y.TEXT:JO(this,e);break;case Y.IN_TABLE_TEXT:lk(this,e);break;case Y.IN_TEMPLATE:Ok(this,e);break;case Y.AFTER_BODY:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:ND(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===H.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.TEXT:case Y.IN_COLUMN_GROUP:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:this._insertCharacters(e);break;case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:case Y.AFTER_BODY:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:$D(this,e);break;case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:YO(this,e);break;case Y.IN_TABLE_TEXT:sk(this,e);break;default:}}};function CD(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):WO(e,t),n}function wD(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function TD(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=vD;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=ED(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function ED(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function DD(e,t,n){let r=pE(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===K.TEMPLATE&&i===W.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function OD(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function kD(e,t){for(let n=0;n<_D;n++){let n=CD(e,t);if(!n)break;let r=wD(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=TD(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&DD(e,a,i),OD(e,r,n)}}function AD(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function jD(e,t){e._appendCommentNode(t,e.openElements.items[0])}function MD(e,t){e._appendCommentNode(t,e.document)}function ND(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function PD(e,t){e._setDocumentType(t);let n=t.forceQuirks?dE.QUIRKS:eD(t);$E(t)||e._err(t,U.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Y.BEFORE_HTML}function FD(e,t){e._err(t,U.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,dE.QUIRKS),e.insertionMode=Y.BEFORE_HTML,e._processToken(t)}function ID(e,t){t.tagID===K.HTML?(e._insertElement(t,W.HTML),e.insertionMode=Y.BEFORE_HEAD):RD(e,t)}function LD(e,t){let n=t.tagID;(n===K.HTML||n===K.HEAD||n===K.BODY||n===K.BR)&&RD(e,t)}function RD(e,t){e._insertFakeRootElement(),e.insertionMode=Y.BEFORE_HEAD,e._processToken(t)}function zD(e,t){switch(t.tagID){case K.HTML:NO(e,t);break;case K.HEAD:e._insertElement(t,W.HTML),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD;break;default:VD(e,t)}}function BD(e,t){let n=t.tagID;n===K.HEAD||n===K.BODY||n===K.HTML||n===K.BR?VD(e,t):e._err(t,U.endTagWithoutMatchingOpenElement)}function VD(e,t){e._insertFakeElement(G.HEAD,K.HEAD),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD,e._processToken(t)}function HD(e,t){switch(t.tagID){case K.HTML:NO(e,t);break;case K.BASE:case K.BASEFONT:case K.BGSOUND:case K.LINK:case K.META:e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.TITLE:e._switchToTextParsing(t,gE.RCDATA);break;case K.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,gE.RAWTEXT):(e._insertElement(t,W.HTML),e.insertionMode=Y.IN_HEAD_NO_SCRIPT);break;case K.NOFRAMES:case K.STYLE:e._switchToTextParsing(t,gE.RAWTEXT);break;case K.SCRIPT:e._switchToTextParsing(t,gE.SCRIPT_DATA);break;case K.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Y.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE);break;case K.HEAD:e._err(t,U.misplacedStartTagForHeadElement);break;default:GD(e,t)}}function UD(e,t){switch(t.tagID){case K.HEAD:e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD;break;case K.BODY:case K.BR:case K.HTML:GD(e,t);break;case K.TEMPLATE:WD(e,t);break;default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function WD(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==K.TEMPLATE&&e._err(t,U.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(K.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,U.endTagWithoutMatchingOpenElement)}function GD(e,t){e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD,e._processToken(t)}function KD(e,t){switch(t.tagID){case K.HTML:NO(e,t);break;case K.BASEFONT:case K.BGSOUND:case K.HEAD:case K.LINK:case K.META:case K.NOFRAMES:case K.STYLE:HD(e,t);break;case K.NOSCRIPT:e._err(t,U.nestedNoscriptInHead);break;default:JD(e,t)}}function qD(e,t){switch(t.tagID){case K.NOSCRIPT:e.openElements.pop(),e.insertionMode=Y.IN_HEAD;break;case K.BR:JD(e,t);break;default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function JD(e,t){let n=t.type===JT.EOF?U.openElementsLeftAfterEof:U.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Y.IN_HEAD,e._processToken(t)}function YD(e,t){switch(t.tagID){case K.HTML:NO(e,t);break;case K.BODY:e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_BODY;break;case K.FRAMESET:e._insertElement(t,W.HTML),e.insertionMode=Y.IN_FRAMESET;break;case K.BASE:case K.BASEFONT:case K.BGSOUND:case K.LINK:case K.META:case K.NOFRAMES:case K.SCRIPT:case K.STYLE:case K.TEMPLATE:case K.TITLE:e._err(t,U.abandonedHeadElementChild),e.openElements.push(e.headElement,K.HEAD),HD(e,t),e.openElements.remove(e.headElement);break;case K.HEAD:e._err(t,U.misplacedStartTagForHeadElement);break;default:ZD(e,t)}}function XD(e,t){switch(t.tagID){case K.BODY:case K.HTML:case K.BR:ZD(e,t);break;case K.TEMPLATE:WD(e,t);break;default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function ZD(e,t){e._insertFakeElement(G.BODY,K.BODY),e.insertionMode=Y.IN_BODY,QD(e,t)}function QD(e,t){switch(t.type){case JT.CHARACTER:eO(e,t);break;case JT.WHITESPACE_CHARACTER:$D(e,t);break;case JT.COMMENT:AD(e,t);break;case JT.START_TAG:NO(e,t);break;case JT.END_TAG:GO(e,t);break;case JT.EOF:KO(e,t);break;default:}}function $D(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function eO(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function tO(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function nO(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function rO(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_FRAMESET)}function iO(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function aO(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&hE.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,W.HTML)}function oO(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function sO(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),n||(e.formElement=e.openElements.current))}function cO(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===K.LI&&r===K.LI||(n===K.DD||n===K.DT)&&(r===K.DD||r===K.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==K.ADDRESS&&r!==K.DIV&&r!==K.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function lO(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.tokenizer.state=gE.PLAINTEXT}function uO(e,t){e.openElements.hasInScope(K.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(K.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1}function dO(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(G.A);n&&(kD(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function fO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pO(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(K.NOBR)&&(kD(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function hO(e,t){e.treeAdapter.getDocumentMode(e.document)!==dE.QUIRKS&&e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_TABLE}function gO(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function _O(e){let t=YT(e,uE.TYPE);return t!=null&&t.toLowerCase()===gD}function vO(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),_O(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yO(e,t){e._appendElement(t,W.HTML),t.ackSelfClosing=!0}function bO(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xO(e,t){t.tagName=G.IMG,t.tagID=K.IMG,gO(e,t)}function SO(e,t){e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.tokenizer.state=gE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Y.TEXT}function CO(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,gE.RAWTEXT)}function wO(e,t){e.framesetOk=!1,e._switchToTextParsing(t,gE.RAWTEXT)}function TO(e,t){e._switchToTextParsing(t,gE.RAWTEXT)}function EO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Y.IN_TABLE||e.insertionMode===Y.IN_CAPTION||e.insertionMode===Y.IN_TABLE_BODY||e.insertionMode===Y.IN_ROW||e.insertionMode===Y.IN_CELL?Y.IN_SELECT_IN_TABLE:Y.IN_SELECT}function DO(e,t){e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function OO(e,t){e.openElements.hasInScope(K.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,W.HTML)}function kO(e,t){e.openElements.hasInScope(K.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(K.RTC),e._insertElement(t,W.HTML)}function AO(e,t){e._reconstructActiveFormattingElements(),lD(t),dD(t),t.selfClosing?e._appendElement(t,W.MATHML):e._insertElement(t,W.MATHML),t.ackSelfClosing=!0}function jO(e,t){e._reconstructActiveFormattingElements(),uD(t),dD(t),t.selfClosing?e._appendElement(t,W.SVG):e._insertElement(t,W.SVG),t.ackSelfClosing=!0}function MO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function NO(e,t){switch(t.tagID){case K.I:case K.S:case K.B:case K.U:case K.EM:case K.TT:case K.BIG:case K.CODE:case K.FONT:case K.SMALL:case K.STRIKE:case K.STRONG:fO(e,t);break;case K.A:dO(e,t);break;case K.H1:case K.H2:case K.H3:case K.H4:case K.H5:case K.H6:aO(e,t);break;case K.P:case K.DL:case K.OL:case K.UL:case K.DIV:case K.DIR:case K.NAV:case K.MAIN:case K.MENU:case K.ASIDE:case K.CENTER:case K.FIGURE:case K.FOOTER:case K.HEADER:case K.HGROUP:case K.DIALOG:case K.DETAILS:case K.ADDRESS:case K.ARTICLE:case K.SEARCH:case K.SECTION:case K.SUMMARY:case K.FIELDSET:case K.BLOCKQUOTE:case K.FIGCAPTION:iO(e,t);break;case K.LI:case K.DD:case K.DT:cO(e,t);break;case K.BR:case K.IMG:case K.WBR:case K.AREA:case K.EMBED:case K.KEYGEN:gO(e,t);break;case K.HR:bO(e,t);break;case K.RB:case K.RTC:OO(e,t);break;case K.RT:case K.RP:kO(e,t);break;case K.PRE:case K.LISTING:oO(e,t);break;case K.XMP:CO(e,t);break;case K.SVG:jO(e,t);break;case K.HTML:tO(e,t);break;case K.BASE:case K.LINK:case K.META:case K.STYLE:case K.TITLE:case K.SCRIPT:case K.BGSOUND:case K.BASEFONT:case K.TEMPLATE:HD(e,t);break;case K.BODY:nO(e,t);break;case K.FORM:sO(e,t);break;case K.NOBR:pO(e,t);break;case K.MATH:AO(e,t);break;case K.TABLE:hO(e,t);break;case K.INPUT:vO(e,t);break;case K.PARAM:case K.TRACK:case K.SOURCE:yO(e,t);break;case K.IMAGE:xO(e,t);break;case K.BUTTON:uO(e,t);break;case K.APPLET:case K.OBJECT:case K.MARQUEE:mO(e,t);break;case K.IFRAME:wO(e,t);break;case K.SELECT:EO(e,t);break;case K.OPTION:case K.OPTGROUP:DO(e,t);break;case K.NOEMBED:case K.NOFRAMES:TO(e,t);break;case K.FRAMESET:rO(e,t);break;case K.TEXTAREA:SO(e,t);break;case K.NOSCRIPT:e.options.scriptingEnabled?TO(e,t):MO(e,t);break;case K.PLAINTEXT:lO(e,t);break;case K.COL:case K.TH:case K.TD:case K.TR:case K.HEAD:case K.FRAME:case K.TBODY:case K.TFOOT:case K.THEAD:case K.CAPTION:case K.COLGROUP:break;default:MO(e,t)}}function PO(e,t){if(e.openElements.hasInScope(K.BODY)&&(e.insertionMode=Y.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function FO(e,t){e.openElements.hasInScope(K.BODY)&&(e.insertionMode=Y.AFTER_BODY,Ak(e,t))}function IO(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function LO(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(K.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(K.FORM):n&&e.openElements.remove(n))}function RO(e){e.openElements.hasInButtonScope(K.P)||e._insertFakeElement(G.P,K.P),e._closePElement()}function zO(e){e.openElements.hasInListItemScope(K.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(K.LI),e.openElements.popUntilTagNamePopped(K.LI))}function BO(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function VO(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function HO(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function UO(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(G.BR,K.BR),e.openElements.pop(),e.framesetOk=!1}function WO(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==K.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function GO(e,t){switch(t.tagID){case K.A:case K.B:case K.I:case K.S:case K.U:case K.EM:case K.TT:case K.BIG:case K.CODE:case K.FONT:case K.NOBR:case K.SMALL:case K.STRIKE:case K.STRONG:kD(e,t);break;case K.P:RO(e);break;case K.DL:case K.UL:case K.OL:case K.DIR:case K.DIV:case K.NAV:case K.PRE:case K.MAIN:case K.MENU:case K.ASIDE:case K.BUTTON:case K.CENTER:case K.FIGURE:case K.FOOTER:case K.HEADER:case K.HGROUP:case K.DIALOG:case K.ADDRESS:case K.ARTICLE:case K.DETAILS:case K.SEARCH:case K.SECTION:case K.SUMMARY:case K.LISTING:case K.FIELDSET:case K.BLOCKQUOTE:case K.FIGCAPTION:IO(e,t);break;case K.LI:zO(e);break;case K.DD:case K.DT:BO(e,t);break;case K.H1:case K.H2:case K.H3:case K.H4:case K.H5:case K.H6:VO(e);break;case K.BR:UO(e);break;case K.BODY:PO(e,t);break;case K.HTML:FO(e,t);break;case K.FORM:LO(e);break;case K.APPLET:case K.OBJECT:case K.MARQUEE:HO(e,t);break;case K.TEMPLATE:WD(e,t);break;default:WO(e,t)}}function KO(e,t){e.tmplInsertionModeStack.length>0?Ok(e,t):ND(e,t)}function qO(e,t){var n;t.tagID===K.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function JO(e,t){e._err(t,U.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function YO(e,t){if(e.openElements.currentTagId!==void 0&&bD.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Y.IN_TABLE_TEXT,t.type){case JT.CHARACTER:ck(e,t);break;case JT.WHITESPACE_CHARACTER:sk(e,t);break}else ok(e,t)}function XO(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_CAPTION}function ZO(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_COLUMN_GROUP}function QO(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.COLGROUP,K.COLGROUP),e.insertionMode=Y.IN_COLUMN_GROUP,pk(e,t)}function $O(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_TABLE_BODY}function ek(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.TBODY,K.TBODY),e.insertionMode=Y.IN_TABLE_BODY,gk(e,t)}function tk(e,t){e.openElements.hasInTableScope(K.TABLE)&&(e.openElements.popUntilTagNamePopped(K.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function nk(e,t){_O(t)?e._appendElement(t,W.HTML):ok(e,t),t.ackSelfClosing=!0}function rk(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,W.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ik(e,t){switch(t.tagID){case K.TD:case K.TH:case K.TR:ek(e,t);break;case K.STYLE:case K.SCRIPT:case K.TEMPLATE:HD(e,t);break;case K.COL:QO(e,t);break;case K.FORM:rk(e,t);break;case K.TABLE:tk(e,t);break;case K.TBODY:case K.TFOOT:case K.THEAD:$O(e,t);break;case K.INPUT:nk(e,t);break;case K.CAPTION:XO(e,t);break;case K.COLGROUP:ZO(e,t);break;default:ok(e,t)}}function ak(e,t){switch(t.tagID){case K.TABLE:e.openElements.hasInTableScope(K.TABLE)&&(e.openElements.popUntilTagNamePopped(K.TABLE),e._resetInsertionMode());break;case K.TEMPLATE:WD(e,t);break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:case K.TBODY:case K.TD:case K.TFOOT:case K.TH:case K.THEAD:case K.TR:break;default:ok(e,t)}}function ok(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,QD(e,t),e.fosterParentingEnabled=n}function sk(e,t){e.pendingCharacterTokens.push(t)}function ck(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function lk(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ok(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var uk=new Set([K.CAPTION,K.COL,K.COLGROUP,K.TBODY,K.TD,K.TFOOT,K.TH,K.THEAD,K.TR]);function dk(e,t){let n=t.tagID;uk.has(n)?e.openElements.hasInTableScope(K.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(K.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,ik(e,t)):NO(e,t)}function fk(e,t){let n=t.tagID;switch(n){case K.CAPTION:case K.TABLE:e.openElements.hasInTableScope(K.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(K.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,n===K.TABLE&&ak(e,t));break;case K.BODY:case K.COL:case K.COLGROUP:case K.HTML:case K.TBODY:case K.TD:case K.TFOOT:case K.TH:case K.THEAD:case K.TR:break;default:GO(e,t)}}function pk(e,t){switch(t.tagID){case K.HTML:NO(e,t);break;case K.COL:e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.TEMPLATE:HD(e,t);break;default:hk(e,t)}}function mk(e,t){switch(t.tagID){case K.COLGROUP:e.openElements.currentTagId===K.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break;case K.TEMPLATE:WD(e,t);break;case K.COL:break;default:hk(e,t)}}function hk(e,t){e.openElements.currentTagId===K.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE,e._processToken(t))}function gk(e,t){switch(t.tagID){case K.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_ROW;break;case K.TH:case K.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(G.TR,K.TR),e.insertionMode=Y.IN_ROW,vk(e,t);break;case K.CAPTION:case K.COL:case K.COLGROUP:case K.TBODY:case K.TFOOT:case K.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,ik(e,t));break;default:ik(e,t)}}function _k(e,t){let n=t.tagID;switch(t.tagID){case K.TBODY:case K.TFOOT:case K.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break;case K.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,ak(e,t));break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:case K.TD:case K.TH:case K.TR:break;default:ak(e,t)}}function vk(e,t){switch(t.tagID){case K.TH:case K.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_CELL,e.activeFormattingElements.insertMarker();break;case K.CAPTION:case K.COL:case K.COLGROUP:case K.TBODY:case K.TFOOT:case K.THEAD:case K.TR:e.openElements.hasInTableScope(K.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,gk(e,t));break;default:ik(e,t)}}function yk(e,t){switch(t.tagID){case K.TR:e.openElements.hasInTableScope(K.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY);break;case K.TABLE:e.openElements.hasInTableScope(K.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,_k(e,t));break;case K.TBODY:case K.TFOOT:case K.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(K.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,_k(e,t));break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:case K.TD:case K.TH:break;default:ak(e,t)}}function bk(e,t){let n=t.tagID;uk.has(n)?(e.openElements.hasInTableScope(K.TD)||e.openElements.hasInTableScope(K.TH))&&(e._closeTableCell(),vk(e,t)):NO(e,t)}function xk(e,t){let n=t.tagID;switch(n){case K.TD:case K.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_ROW);break;case K.TABLE:case K.TBODY:case K.TFOOT:case K.THEAD:case K.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),yk(e,t));break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:break;default:GO(e,t)}}function Sk(e,t){switch(t.tagID){case K.HTML:NO(e,t);break;case K.OPTION:e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e._insertElement(t,W.HTML);break;case K.OPTGROUP:e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e.openElements.currentTagId===K.OPTGROUP&&e.openElements.pop(),e._insertElement(t,W.HTML);break;case K.HR:e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e.openElements.currentTagId===K.OPTGROUP&&e.openElements.pop(),e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.INPUT:case K.KEYGEN:case K.TEXTAREA:case K.SELECT:e.openElements.hasInSelectScope(K.SELECT)&&(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode(),t.tagID!==K.SELECT&&e._processStartTag(t));break;case K.SCRIPT:case K.TEMPLATE:HD(e,t);break;default:}}function Ck(e,t){switch(t.tagID){case K.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===K.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===K.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===K.OPTGROUP&&e.openElements.pop();break;case K.OPTION:e.openElements.currentTagId===K.OPTION&&e.openElements.pop();break;case K.SELECT:e.openElements.hasInSelectScope(K.SELECT)&&(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode());break;case K.TEMPLATE:WD(e,t);break;default:}}function wk(e,t){let n=t.tagID;n===K.CAPTION||n===K.TABLE||n===K.TBODY||n===K.TFOOT||n===K.THEAD||n===K.TR||n===K.TD||n===K.TH?(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Sk(e,t)}function Tk(e,t){let n=t.tagID;n===K.CAPTION||n===K.TABLE||n===K.TBODY||n===K.TFOOT||n===K.THEAD||n===K.TR||n===K.TD||n===K.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ck(e,t)}function Ek(e,t){switch(t.tagID){case K.BASE:case K.BASEFONT:case K.BGSOUND:case K.LINK:case K.META:case K.NOFRAMES:case K.SCRIPT:case K.STYLE:case K.TEMPLATE:case K.TITLE:HD(e,t);break;case K.CAPTION:case K.COLGROUP:case K.TBODY:case K.TFOOT:case K.THEAD:e.tmplInsertionModeStack[0]=Y.IN_TABLE,e.insertionMode=Y.IN_TABLE,ik(e,t);break;case K.COL:e.tmplInsertionModeStack[0]=Y.IN_COLUMN_GROUP,e.insertionMode=Y.IN_COLUMN_GROUP,pk(e,t);break;case K.TR:e.tmplInsertionModeStack[0]=Y.IN_TABLE_BODY,e.insertionMode=Y.IN_TABLE_BODY,gk(e,t);break;case K.TD:case K.TH:e.tmplInsertionModeStack[0]=Y.IN_ROW,e.insertionMode=Y.IN_ROW,vk(e,t);break;default:e.tmplInsertionModeStack[0]=Y.IN_BODY,e.insertionMode=Y.IN_BODY,NO(e,t)}}function Dk(e,t){t.tagID===K.TEMPLATE&&WD(e,t)}function Ok(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(K.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ND(e,t)}function kk(e,t){t.tagID===K.HTML?NO(e,t):jk(e,t)}function Ak(e,t){if(t.tagID===K.HTML){if(e.fragmentContext||(e.insertionMode=Y.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===K.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else jk(e,t)}function jk(e,t){e.insertionMode=Y.IN_BODY,QD(e,t)}function Mk(e,t){switch(t.tagID){case K.HTML:NO(e,t);break;case K.FRAMESET:e._insertElement(t,W.HTML);break;case K.FRAME:e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.NOFRAMES:HD(e,t);break;default:}}function Nk(e,t){t.tagID===K.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==K.FRAMESET&&(e.insertionMode=Y.AFTER_FRAMESET))}function Pk(e,t){switch(t.tagID){case K.HTML:NO(e,t);break;case K.NOFRAMES:HD(e,t);break;default:}}function Fk(e,t){t.tagID===K.HTML&&(e.insertionMode=Y.AFTER_AFTER_FRAMESET)}function Ik(e,t){t.tagID===K.HTML?NO(e,t):Lk(e,t)}function Lk(e,t){e.insertionMode=Y.IN_BODY,QD(e,t)}function Rk(e,t){switch(t.tagID){case K.HTML:NO(e,t);break;case K.NOFRAMES:HD(e,t);break;default:}}function zk(e,t){t.chars=`�`,e._insertCharacters(t)}function Bk(e,t){e._insertCharacters(t),e.framesetOk=!1}function Vk(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==W.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Hk(e,t){if(cD(t))Vk(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===W.MATHML?lD(t):r===W.SVG&&(fD(t),uD(t)),dD(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Uk(e,t){if(t.tagID===K.P||t.tagID===K.BR){Vk(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===W.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([G.AREA,G.BASE,G.BASEFONT,G.BGSOUND,G.BR,G.COL,G.EMBED,G.FRAME,G.HR,G.IMG,G.INPUT,G.KEYGEN,G.LINK,G.META,G.PARAM,G.SOURCE,G.TRACK,G.WBR]);var Wk=(function(e){if(e==null)return Yk;if(typeof e==`function`)return Jk(e);if(typeof e==`object`)return Array.isArray(e)?Gk(e):Kk(e);if(typeof e==`string`)return qk(e);throw Error(`Expected function, string, or object as test`)});function Gk(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Wk(e[n]);return Jk(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Kk(e){let t=e;return Jk(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function qk(e){return Jk(t);function t(t){return t&&t.type===e}}function Jk(e){return t;function t(t,n,r){return!!(Xk(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Yk(){return!0}function Xk(e){return typeof e==`object`&&!!e&&`type`in e}function Zk(e){return e}var Qk=[],$k=`skip`;function eA(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Wk(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Zk(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Qk,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=tA(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function tA(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Qk:[e]}function nA(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),eA(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var rA=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,iA=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),aA={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function oA(e,t){let n=bA(e),r=wT(`type`,{handlers:{root:cA,element:lA,text:uA,comment:pA,doctype:dA,raw:mA},unknown:hA}),i={parser:n?new SD(aA):SD.getFragmentParser(void 0,aA),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),gA(i,KC());let a=hT(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&nA(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function sA(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function cA(e,t){sA(e.children,t)}function lA(e,t){vA(e,t),sA(e.children,t),yA(e,t)}function uA(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:JT.CHARACTER,chars:e.value,location:xA(e)};gA(t,KC(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function dA(e,t){let n={type:JT.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:xA(e)};gA(t,KC(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function fA(e,t){t.stitches=!0;let n=SA(e);`children`in e&&`children`in n&&(n.children=oA({type:`root`,children:e.children},t.options).children),pA({type:`comment`,value:{stitch:n}},t)}function pA(e,t){let n=e.value,r={type:JT.COMMENT,data:n,location:xA(e)};gA(t,KC(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function mA(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,_A(t,KC(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(rA,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function hA(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))fA(n,t);else{let e=``;throw iA.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function gA(e,t){_A(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=gE.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function _A(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function vA(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===gE.PLAINTEXT)return;gA(t,KC(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:fT.html;i===fT.html&&n===`svg`&&(i=fT.svg);let a=OT({...e,children:[]},{space:i===fT.svg?`svg`:`html`}),o={type:JT.START_TAG,tagName:n,tagID:pE(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:xA(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function yA(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&RT.includes(n)||t.parser.tokenizer.state===gE.PLAINTEXT)return;gA(t,GC(e));let r={type:JT.END_TAG,tagName:n,tagID:pE(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xA(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===gE.RCDATA||t.parser.tokenizer.state===gE.RAWTEXT||t.parser.tokenizer.state===gE.SCRIPT_DATA)&&(t.parser.tokenizer.state=gE.DATA)}function bA(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function xA(e){let t=KC(e)||{line:void 0,column:void 0,offset:void 0},n=GC(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function SA(e){return`children`in e?WC({...e,children:[]}):WC(e)}function CA(e){return function(t,n){return oA(t,{...e,file:n})}}var wA={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function TA({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=wA.indicator,imageBlockPolicy:c=wA.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=FA(e,t,n,r,i,a,o,s,c);jA(l),nA(l,u)}}function EA(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function DA(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var OA=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),kA=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function AA(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=EA(e,n);if(!o||kA.has(o.protocol)||!(OA.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=DA(e);return o&&t.some(e=>{let t=EA(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function jA(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)jA(t)}}var MA=Symbol(`node-seen`);function NA(e,t,n){return t===wA.remove?{type:`remove`}:t===wA.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function PA(e,t,n){if(t===wA.remove)return{type:`remove`};if(t===wA.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var FA=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[MA])return!0;if(u.tagName===`a`){let n=AA(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[MA]=!0,nA(u,l),f&&typeof d==`number`){let e=NA(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[$k,d];f.children[d]=e.element}return $k}else return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=AA(u.properties.src,n,e,r,!0,i);if(t===null){if(u[MA]=!0,nA(u,l),f&&typeof d==`number`){let e=PA(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[$k,d];f.children[d]=e.element}return $k}else return u.properties.src=t,!0}return!0};return l},IA={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},LA={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:`CDATA[`,characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:`content`,contentTypeDocument:`document`,contentTypeFlow:`flow`,contentTypeString:`string`,contentTypeText:`text`,hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},RA={data:`data`,whitespace:`whitespace`,lineEnding:`lineEnding`,lineEndingBlank:`lineEndingBlank`,linePrefix:`linePrefix`,lineSuffix:`lineSuffix`,atxHeading:`atxHeading`,atxHeadingSequence:`atxHeadingSequence`,atxHeadingText:`atxHeadingText`,autolink:`autolink`,autolinkEmail:`autolinkEmail`,autolinkMarker:`autolinkMarker`,autolinkProtocol:`autolinkProtocol`,characterEscape:`characterEscape`,characterEscapeValue:`characterEscapeValue`,characterReference:`characterReference`,characterReferenceMarker:`characterReferenceMarker`,characterReferenceMarkerNumeric:`characterReferenceMarkerNumeric`,characterReferenceMarkerHexadecimal:`characterReferenceMarkerHexadecimal`,characterReferenceValue:`characterReferenceValue`,codeFenced:`codeFenced`,codeFencedFence:`codeFencedFence`,codeFencedFenceSequence:`codeFencedFenceSequence`,codeFencedFenceInfo:`codeFencedFenceInfo`,codeFencedFenceMeta:`codeFencedFenceMeta`,codeFlowValue:`codeFlowValue`,codeIndented:`codeIndented`,codeText:`codeText`,codeTextData:`codeTextData`,codeTextPadding:`codeTextPadding`,codeTextSequence:`codeTextSequence`,content:`content`,definition:`definition`,definitionDestination:`definitionDestination`,definitionDestinationLiteral:`definitionDestinationLiteral`,definitionDestinationLiteralMarker:`definitionDestinationLiteralMarker`,definitionDestinationRaw:`definitionDestinationRaw`,definitionDestinationString:`definitionDestinationString`,definitionLabel:`definitionLabel`,definitionLabelMarker:`definitionLabelMarker`,definitionLabelString:`definitionLabelString`,definitionMarker:`definitionMarker`,definitionTitle:`definitionTitle`,definitionTitleMarker:`definitionTitleMarker`,definitionTitleString:`definitionTitleString`,emphasis:`emphasis`,emphasisSequence:`emphasisSequence`,emphasisText:`emphasisText`,escapeMarker:`escapeMarker`,hardBreakEscape:`hardBreakEscape`,hardBreakTrailing:`hardBreakTrailing`,htmlFlow:`htmlFlow`,htmlFlowData:`htmlFlowData`,htmlText:`htmlText`,htmlTextData:`htmlTextData`,image:`image`,label:`label`,labelText:`labelText`,labelLink:`labelLink`,labelImage:`labelImage`,labelMarker:`labelMarker`,labelImageMarker:`labelImageMarker`,labelEnd:`labelEnd`,link:`link`,paragraph:`paragraph`,reference:`reference`,referenceMarker:`referenceMarker`,referenceString:`referenceString`,resource:`resource`,resourceDestination:`resourceDestination`,resourceDestinationLiteral:`resourceDestinationLiteral`,resourceDestinationLiteralMarker:`resourceDestinationLiteralMarker`,resourceDestinationRaw:`resourceDestinationRaw`,resourceDestinationString:`resourceDestinationString`,resourceMarker:`resourceMarker`,resourceTitle:`resourceTitle`,resourceTitleMarker:`resourceTitleMarker`,resourceTitleString:`resourceTitleString`,setextHeading:`setextHeading`,setextHeadingText:`setextHeadingText`,setextHeadingLine:`setextHeadingLine`,setextHeadingLineSequence:`setextHeadingLineSequence`,strong:`strong`,strongSequence:`strongSequence`,strongText:`strongText`,thematicBreak:`thematicBreak`,thematicBreakSequence:`thematicBreakSequence`,blockQuote:`blockQuote`,blockQuotePrefix:`blockQuotePrefix`,blockQuoteMarker:`blockQuoteMarker`,blockQuotePrefixWhitespace:`blockQuotePrefixWhitespace`,listOrdered:`listOrdered`,listUnordered:`listUnordered`,listItemIndent:`listItemIndent`,listItemMarker:`listItemMarker`,listItemPrefix:`listItemPrefix`,listItemPrefixWhitespace:`listItemPrefixWhitespace`,listItemValue:`listItemValue`,chunkDocument:`chunkDocument`,chunkContent:`chunkContent`,chunkFlow:`chunkFlow`,chunkText:`chunkText`,chunkString:`chunkString`},zA=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],BA=[12288,12288,65281,65376,65504,65510],VA=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],HA=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],UA=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],WA=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=i*2;if(t<e[a])r=i-1;else if(t>e[a+1])n=i+1;else return!0}return!1},GA=19968,[KA,qA]=JA(UA);function JA(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(GA>=i&&GA<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}var YA=e=>e<161||e>1114109?!1:WA(zA,e),XA=e=>e<12288||e>65510?!1:WA(BA,e),ZA=e=>e<8361||e>65518?!1:WA(VA,e),QA=e=>e<32||e>10630?!1:WA(HA,e),$A=e=>e>=KA&&e<=qA?!0:e<4352||e>262141?!1:WA(UA,e);function ej(e){return YA(e)?`ambiguous`:XA(e)?`fullwidth`:ZA(e)?`halfwidth`:QA(e)?`narrow`:$A(e)?`wide`:`neutral`}function tj(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function nj(e){return tj(e),ej(e)}function rj(e){return/^\p{Emoji_Presentation}/u.test(String.fromCodePoint(e))}function ij(e){if(!e||e<4352)return!1;switch(nj(e)){case`fullwidth`:case`halfwidth`:return!0;case`wide`:return!rj(e);case`narrow`:return!1;case`ambiguous`:return 917760<=e&&e<=917999?null:!1;case`neutral`:return/^\p{sc=Hangul}/u.test(String.fromCodePoint(e))}}function aj(e,t){return t!==65025||!e||e<8216?!1:e===8216||e===8217||e===8220||e===8221}function oj(e){return e!==null&&e>=65024&&e<=65038}var sj=lj(/\p{P}|\p{S}/u),cj=lj(/\s/);function lj(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCodePoint(t))}}function uj(e){return!!(e&LA.characterGroupWhitespace)}function dj(e){return(e&kj.cjkPunctuation)===LA.characterGroupPunctuation}function fj(e){return!!(e&kj.cjk)}function pj(e){return e===kj.ivs}function mj(e){return!!(e&kj.cjkOrIvs)}function hj(e){return e===kj.nonEmojiGeneralUseVS}function gj(e){return!!(e&kj.spaceOrPunctuation)}var _j=Oj(/[A-Za-z]/),vj=Oj(/[\dA-Za-z]/),yj=Oj(/[#-'*+\--9=?A-Z^-~]/);function bj(e){return e!==null&&(e<32||e===127)}var xj=Oj(/\d/),Sj=Oj(/[\dA-Fa-f]/),Cj=Oj(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function wj(e){return e!==null&&(e<0||e===32)}function Tj(e){return e===-2||e===-1||e===32}var Ej=Oj(/\p{P}|\p{S}/u),Dj=Oj(/\s/);function Oj(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var kj;(function(e){e.spaceOrPunctuation=3,e.cjk=4096,e.cjkPunctuation=4098,e.ivs=8192,e.cjkOrIvs=12288,e.nonEmojiGeneralUseVS=16384,e.variationSelector=24576,e.ivsToCjkRightShift=1})(kj||={});function Aj(e){if(e===IA.eof||wj(e)||cj(e))return LA.characterGroupWhitespace;let t=0;if(e>=4352){if(oj(e))return kj.nonEmojiGeneralUseVS;switch(ij(e)){case null:return kj.ivs;case!0:t|=kj.cjk;break}}return sj(e)&&(t|=LA.characterGroupPunctuation),t}function jj(e,t,n){if(!hj(e))return e;let r=t(),i=Aj(r);return!r||uj(i)?e:aj(r,n)?kj.cjkPunctuation:Mj(i)}function Mj(e){return e&~kj.ivs}function Nj(e){return!!(e&&e>=55296&&e<=56319)}function Pj(e){return!!(e&&e>=56320&&e<=57343)}function Fj(e,t,n){if(t._bufferIndex<2)return e;let r=n({start:{...t,_bufferIndex:t._bufferIndex-2},end:t}).codePointAt(0);return r&&r>=65536?r:e}function Ij(e,t,n){let r=e>=65536?2:1;if(t._bufferIndex<1+r)return null;let i=t._bufferIndex-r-2,a=n({start:{...t,_bufferIndex:i>=0?i:0},end:{...t,_bufferIndex:t._bufferIndex-r}}),o=a.charCodeAt(a.length-1);if(Number.isNaN(o))return null;if(a.length<2||o<56320||57343<o)return o;let s=a.codePointAt(0);return s&&s>=65536?s:o}var Lj=class{cachedValue=void 0;constructor(e,t,n){this.previousCode=e,this.nowPoint=t,this.sliceSerialize=n}value(){return this.cachedValue===void 0&&(this.cachedValue=Ij(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function Rj(e,t,n){let r=n({start:t,end:{...t,_bufferIndex:t._bufferIndex+2}}).codePointAt(0);return r&&r>=65536?r:e}function zj(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Bj(e,t){return e.length>0?(zj(e,e.length,0,t),e):t}function Vj(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Hj={name:`attention`,resolveAll:Uj,tokenize:Wj};function Uj(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Gj(d,-c),Gj(f,c),o={type:c>1?RA.strongSequence:RA.emphasisSequence,start:d,end:{...e[r][1].end}},s={type:c>1?RA.strongSequence:RA.emphasisSequence,start:{...e[n][1].start},end:f},a={type:c>1?RA.strongText:RA.emphasisText,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?RA.strong:RA.emphasis,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Bj(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Bj(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),t.parser.constructs.insideSpan.null,l=Bj(l,Vj(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Bj(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Bj(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,zj(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Wj(e,t){let n=this.parser.constructs.attentionMarkers.null,{now:r,sliceSerialize:i,previous:a}=this,o=Pj(a)?Fj(a,r(),i):a,s=Aj(o),c=new Lj(o,r(),i),l=jj(s,c.value.bind(c),o),u;return d;function d(t){return t===IA.asterisk||IA.underscore,u=t,e.enter(`attentionSequence`),f(t)}function f(a){if(a===u)return e.consume(a),f;let s=e.exit(`attentionSequence`),c=Aj(Nj(a)?Rj(a,r(),i):a),d=dj(l),p=d||uj(l),m=dj(c),h=m||uj(c),g=mj(l),_=!h||m&&(p||g)||n.includes(a),v=!p||d&&(h||fj(c))||n.includes(o);return s._open=!!(u===IA.asterisk?_:_&&(gj(l)||!v)),s._close=!!(u===IA.asterisk?v:v&&(gj(c)||!_)),t(a)}}function Gj(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}function Kj(){return{text:{[IA.asterisk]:Hj,[IA.underscore]:Hj},insideSpan:{null:[Hj]}}}function qj(){let e=this.data();(e.micromarkExtensions||=[]).push(Kj())}function Jj(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{[IA.tilde]:n},insideSpan:{null:[n]},attentionMarkers:{null:[IA.tilde]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&zj(o,o.length,0,Vj(s,e.slice(r+1,n),t)),zj(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),zj(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=RA.data);return e}function i(e,n,r){let{now:i,sliceSerialize:a,previous:o}=this,s=Pj(o)?Fj(o,i(),a):o,c=Aj(s),l=new Lj(s,i(),a),u=jj(c,l.value.bind(l),s),d=this.events,f=0;return p;function p(t){return IA.tilde,s===IA.tilde&&d[d.length-1][1].type!==RA.characterEscape?r(t):(e.enter(`strikethroughSequenceTemporary`),m(t))}function m(o){let c=Aj(s);if(o===IA.tilde)return f>1?r(o):(e.consume(o),f++,m);if(f<2&&!t)return r(o);let l=e.exit(`strikethroughSequenceTemporary`),d=Aj(Nj(o)?Rj(o,i(),a):o),p=dj(u)||uj(u),h=dj(d)||uj(d),g=fj(u)||pj(c);return l._open=!h||d===LA.attentionSideAfter&&(p||g),l._close=!p||c===LA.attentionSideAfter&&(h||fj(d)),n(o)}}}function Yj(e){let t=this.data();(t.micromarkExtensions||=[]).push(Jj(e))}function Xj(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Zj(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Qj(e,t,n){let r=Wk((n||{}).ignore||[]),i=$j(t),a=-1;for(;++a<i.length;)eA(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function $j(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([eM(e[0]),tM(e[1])])}return t}function eM(e){return typeof e==`string`?new RegExp(Zj(e),`g`):e}function tM(e){return typeof e==`function`?e:function(){return e}}var nM=`phrasing`,rM=[`autolink`,`link`,`image`,`label`];function iM(){return{transforms:[fM],enter:{literalAutolink:oM,literalAutolinkEmail:sM,literalAutolinkHttp:sM,literalAutolinkWww:sM},exit:{literalAutolink:dM,literalAutolinkEmail:uM,literalAutolinkHttp:cM,literalAutolinkWww:lM}}}function aM(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:nM,notInConstruct:rM},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:nM,notInConstruct:rM},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:nM,notInConstruct:rM}]}}function oM(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function sM(e){this.config.enter.autolinkProtocol.call(this,e)}function cM(e){this.config.exit.autolinkProtocol.call(this,e)}function lM(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function uM(e){this.config.exit.autolinkEmail.call(this,e)}function dM(e){this.exit(e)}function fM(e){Qj(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,pM],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,mM]],{ignore:[`link`,`linkReference`]})}function pM(e,t,n,r,i){let a=``;if(!_M(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!hM(n)))return!1;let o=gM(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function mM(e,t,n,r){return!_M(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function hM(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function gM(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Xj(e,`(`),a=Xj(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function _M(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Dj(n)||Ej(n))&&(!t||n!==47)}function vM(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}OM.peek=DM;function yM(){this.buffer()}function bM(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function xM(){this.buffer()}function SM(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function CM(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=vM(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wM(e){this.exit(e)}function TM(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=vM(this.sliceSerialize(e)).toLowerCase(),n.label=t}function EM(e){this.exit(e)}function DM(){return`[`}function OM(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function kM(){return{enter:{gfmFootnoteCallString:yM,gfmFootnoteCall:bM,gfmFootnoteDefinitionLabelString:xM,gfmFootnoteDefinition:SM},exit:{gfmFootnoteCallString:CM,gfmFootnoteCall:wM,gfmFootnoteDefinitionLabelString:TM,gfmFootnoteDefinition:EM}}}function AM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:OM},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
282
282
|
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?MM:jM))),s(),o}}function jM(e,t,n){return t===0?e:MM(e,t,n)}function MM(e,t,n){return(n?``:` `)+e}var NM=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];RM.peek=zM;function PM(){return{canContainEols:[`delete`],enter:{strikethrough:IM},exit:{strikethrough:LM}}}function FM(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:NM}],handlers:{delete:RM}}}function IM(e){this.enter({type:`delete`,children:[]},e)}function LM(e){this.exit(e)}function RM(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function zM(){return`~`}function BM(e){return e.length}function VM(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||BM,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=HM(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=UM(r[d]);else{let e=UM(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
283
283
|
`)}function HM(e){return e==null?``:String(e)}function UM(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function WM(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),GM);return i(),o}function GM(e,t,n){return`>`+(n?``:` `)+e}function KM(e,t){return qM(e,t.inConstruct,!0)&&!qM(e,t.notInConstruct,!1)}function qM(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function JM(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
@@ -386,12 +386,12 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
386
386
|
`){o=t+1;break}let s=!0;for(let t=o;t<r;t+=1)if(e[t]!==` `&&e[t]!==` `){s=!1;break}s&&(a===` `||a===` `)||(t+=1)}return t},VX=e=>{if(NX(e))return e;if(e.match(CX)){let t=-1;for(let n=0;n<e.length;n+=1)if(e[n]===`*`&&e[n-1]!==`*`&&e[n+1]!==`*`&&e[n-1]!==`\\`){let r=n>0?e[n-1]:``,i=n<e.length-1?e[n+1]:``;if(r&&i&&MX(r)&&MX(i))continue;t=n;break}if(t===-1)return e;let n=e.substring(t+1);if(!n||DX.test(n))return e;if(BX(e)%2==1)return`${e}*`}return e},HX=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]===`\\`&&e[i+1]===`$`){i+=1;continue}e[i]===`$`&&(e[i+1]===`$`?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},UX=e=>{let t=e.includes(`$`),n=0,r=e.length;for(let i=0;i<r;i+=1){if(e[i]!==`_`)continue;let a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;a!==`\\`&&(t&&HX(e,i)||a===`_`||o===`_`||a&&o&&MX(a)&&MX(o)||(n+=1))}return n},WX=e=>{if(NX(e))return e;if(e.match(wX)){let t=-1;for(let n=0;n<e.length;n+=1)if(e[n]===`_`&&e[n-1]!==`_`&&e[n+1]!==`_`&&e[n-1]!==`\\`&&!HX(e,n)){let r=n>0?e[n-1]:``,i=n<e.length-1?e[n+1]:``;if(r&&i&&MX(r)&&MX(i))continue;t=n;break}if(t===-1)return e;let n=e.substring(t+1);if(!n||DX.test(n))return e;if(UX(e)%2==1){let t=e.length;for(;t>0&&e[t-1]===`
|
|
387
387
|
`;)--t;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`}}return e},GX=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},KX=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!GX(e,n)&&(t+=1);return t},qX=e=>{if(e.match(AX)&&!e.includes(`
|
|
388
388
|
`))return e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e;let t=(e.match(/```/g)||[]).length,n=t%2==1;if(t>0&&t%2==0&&e.includes(`
|
|
389
|
-
`)||(e.endsWith("```\n")||e.endsWith("```"))&&t%2==0)return e;let r=e.match(TX);if(r&&!n){let t=r[2];if(!t||DX.test(t))return e;if(KX(e)%2==1)return`${e}\``}return e},JX=e=>{let t=e.match(EX);if(t){let n=t[2];if(!n||DX.test(n))return e;if((e.match(/~~/g)||[]).length%2==1)return`${e}~~`}return e},YX=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]===`*`?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},XX=e=>{if(NX(e)||jX.test(e))return e;let t=e.match(SX);if(t){let n=t[2];if(!n||DX.test(n))return e;if(YX(e)%2==1)return`${e}***`}return e},ZX=e=>{if(!e||typeof e!=`string`)return e;let t=e,n=LX(t);return n.endsWith(`](streamdown:incomplete-link)`)?n:(t=n,t=XX(t),t=RX(t),t=zX(t),t=VX(t),t=WX(t),t=qX(t),t=JX(t),t)};function QX(){if(window.location!==window.parent.location){let{ancestorOrigins:e}=document.location;if(e&&e.length)return e[0];if(document.referrer)try{return new URL(document.referrer).origin}catch{}}return document.location.origin}function $X(e){let t=QX(),n=[t,...PJ(e)];return[CA,[pw,{...XC,protocols:{...XC.protocols,src:[...XC.protocols?.src||[],`data`]}}],[TA,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:n,allowedProtocols:[`*`],defaultOrigin:t,allowDataImages:!0}]]}var eZ=[[XI,{}],[qj,{}],[Yj,{}]],tZ=Fd({isAnimating:!1}),nZ=Pf(({content:e,shouldParseIncompleteMarkdown:t,markdownOptions:n})=>{let r=mf(()=>typeof e==`string`&&t?ZX(e.trim()):e,[e,t]);return R(kJ,{...n,children:r})},(e,t)=>e.content===t.content&&e.shouldParseIncompleteMarkdown===t.shouldParseIncompleteMarkdown&&e.markdownOptions===t.markdownOptions),rZ=Pf(({children:e,parseIncompleteMarkdown:t=!0,className:n,isAnimating:r=!1,linkConfig:i})=>{let a=_f(),o=mf(()=>yX(typeof e==`string`?e:``),[e]),s=mf(()=>({components:dK,rehypePlugins:$X(i),remarkPlugins:eZ}),[i]);return R(yG.Provider,{value:bG,children:R(tZ.Provider,{value:{isAnimating:r},children:R(`div`,{className:zS(`markdown *:first:mt-0 *:last:mb-0`,n),children:o.map((e,n)=>R(nZ,{content:e,shouldParseIncompleteMarkdown:t,markdownOptions:s},`${a}-block-${n}`))})})})},(e,t)=>e.children===t.children&&e.isAnimating===t.isAnimating&&e.className===t.className&&e.parseIncompleteMarkdown===t.parseIncompleteMarkdown&&e.linkConfig===t.linkConfig),iZ=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`application/pdf`],aZ=[`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.pdf`],oZ=10,sZ=20;function cZ(e){return e.startsWith(`image/`)}function lZ(e){return iZ.includes(e)}function uZ(e){return(cZ(e)?oZ:sZ)*1024*1024}function dZ(e,t){return`${e}/v1/convai/conversations/${t}/files`}function fZ(e,t,n){fetch(`${dZ(e,t)}/${n}`,{method:`DELETE`}).catch(()=>{})}function pZ({conversationId:e,maxFiles:t}){let{serverUrl:n}=hg(),r=mf(()=>Vp(null),[]),i=mf(()=>Vp(0),[]),a=F(null),o=F(null),s=F([]),c=F(null),l=e=>{let t=r.peek();t&&(r.value=null,t.status===`uploading`?c.current?.abort():t.status===`ready`&&e&&fZ(n.peek(),e,t.fileId),mZ(o.current),o.current=null)};if(e!==a.current){let t=a.current;a.current=e,i.value=0,e!==null&&(s.current.forEach(mZ),s.current=[]),l(t)}df(()=>()=>{l(a.current),s.current.forEach(mZ)},[]);let u=mf(()=>Kp(()=>{if(t==null)return!1;let e=+!!r.value;return i.value+e>=t}),[t,r,i]);return{pendingFile:r,isUploading:mf(()=>Kp(()=>r.value?.status===`uploading`),[r]),hasReachedLimit:u,addFile:I(t=>{if(!e)return null;if(u.peek())return`limit_reached`;if(!lZ(t.type))return`unsupported_type`;if(t.size>uZ(t.type))return`too_large`;mZ(o.current),o.current=null;let i=cZ(t.type)?URL.createObjectURL(t):null;o.current=i,r.value={file:t,status:`uploading`,previewUrl:i};let a=new FormData;a.append(`file`,t);let s=new AbortController;c.current=s;let l=e,d=n.peek();return fetch(dZ(d,l),{method:`POST`,body:a,signal:s.signal}).then(async e=>{if(!e.ok){let t=await e.json().catch(()=>null);throw Error(t?.detail?.message??t?.detail??`Upload failed`)}return e.json()}).then(e=>{let n=r.peek();n?.file===t?r.value={status:`ready`,file:n.file,previewUrl:n.previewUrl,fileId:e.file_id}:fZ(d,l,e.file_id)}).catch(e=>{if(e?.name===`AbortError`)return;console.warn(`[convai] file upload failed:`,e);let n=r.peek();n?.file===t&&(r.value={status:`error`,file:n.file,previewUrl:n.previewUrl,error:e?.message??`Upload failed`})}).finally(()=>{c.current===s&&(c.current=null)}),null},[e,r,n,u]),removeFile:I(()=>{l(e)},[e]),markFileAsSent:I(()=>{o.current&&=(s.current.push(o.current),null),r.value=null,i.value++},[r,i])}}function mZ(e){e&&URL.revokeObjectURL(e)}function hZ({entry:e}){let t=Cb(),n=fb(),r=!e.isText,i=n.value.strip_audio_tags&&r,a=r&&!i,o=i?MC(e.message):e.message;return R(`div`,{className:`pr-8`,children:[o&&(r?R(`div`,{dir:`auto`,className:`text-sm whitespace-pre-wrap wrap-break-word`,children:a?R(jC,{text:o}):o}):R(rZ,{linkConfig:t.value,children:o})),e.toolStatus&&R(`div`,{className:o?`mt-2`:void 0,children:R(SZ,{status:e.toolStatus})})]})}function gZ({entry:e}){let{previewUrl:t}=Vb(),n=e.fileInput;return R(`div`,{className:vx(`flex gap-2.5 transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:scale-75`,e.role===`user`?`justify-end pl-16 origin-top-right`:`pr-16 origin-top-left`),children:[e.role===`agent`&&R(`img`,{src:t,alt:`AI agent avatar`,className:`bg-base-border shrink-0 w-5 h-5 rounded-full`}),R(`div`,{className:`flex flex-col items-end gap-1.5 min-w-0`,children:[n&&R(_Z,{fileName:n.fileName,mimeType:n.mimeType,previewUrl:n.previewUrl}),e.message&&R(`div`,{dir:`auto`,className:vx(`px-3 py-2.5 rounded-bubble text-sm min-w-0 wrap-break-word whitespace-pre-wrap`,e.role===`user`?`bg-accent text-accent-primary`:`bg-base-active text-base-primary`),children:e.message})]})]})}function _Z({fileName:e,mimeType:t,previewUrl:n}){return cZ(t)&&n?R(`div`,{className:`rounded-bubble border border-base-border shadow-sm p-1`,children:R(`img`,{src:n,alt:e,className:`max-w-[180px] rounded-input object-cover`})}):R(`div`,{className:`flex items-center gap-2 px-3 py-2.5 rounded-bubble bg-accent text-accent-primary`,children:[R(vZ,{}),R(`span`,{className:`truncate text-sm`,children:e})]})}function vZ(){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,className:`shrink-0 opacity-70`,children:[R(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),R(`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`})]})}function yZ({entry:e}){let t=Rb(),{lastId:n}=ab(),r=Sb(),i=fb();return R(`div`,{className:`px-8 flex flex-col`,children:[r.value===`rating`&&R(DC,{}),R(`div`,{className:`text-xs text-base-subtle text-center transition-opacity duration-200 data-hidden:opacity-0`,children:[e.role===`user`?t.user_ended_conversation:t.agent_ended_conversation,R(`br`,{}),n.value&&i.value.show_conversation_id&&R(`span`,{className:`break-all`,children:[t.conversation_id,`: `,n.value]})]})]})}function bZ({entry:e}){let t=Rb(),{lastId:n}=ab();return R(`div`,{className:`px-8 text-xs text-base-error text-center transition-opacity duration-200 data-hidden:opacity-0`,children:[t.error_occurred,R(`br`,{}),e.message,n.value&&R(ud,{children:[R(`br`,{}),R(`span`,{className:`text-base-subtle break-all`,children:[t.conversation_id,`: `,n.value]})]})]})}function xZ({entry:e}){let t=Rb();return R(`div`,{className:`px-8 text-xs text-base-subtle text-center transition-opacity duration-200 data-hidden:opacity-0`,children:e.mode===`text`?t.switched_to_text_mode:t.switched_to_voice_mode})}function SZ({status:e}){let t=Rb();return R(`div`,{className:`-my-4 first:mt-0 last:mb-0 flex items-center`,children:R(`div`,{className:`flex items-center h-7 px-2 gap-1 rounded-button border border-base-border bg-base`,children:[e===Gb.LOADING&&R(ud,{children:[R(JS,{name:`loader`,size:`md`,className:`animate-spin shrink-0`}),R(`span`,{className:`text-xs leading-4`,children:t.agent_working})]}),e===Gb.SUCCESS&&R(mx,{active:!0,initial:!1,children:R(`span`,{className:`flex items-center gap-1 transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:scale-75`,children:[R(JS,{name:`check`,size:`sm`,className:`shrink-0`}),R(`span`,{className:`text-xs leading-4`,children:t.agent_done})]})}),e===Gb.ERROR&&R(mx,{active:!0,initial:!1,children:R(`span`,{className:`flex items-center gap-1 transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:scale-75`,children:[R(JS,{name:`x`,size:`sm`,className:`shrink-0 text-base-error`}),R(`span`,{className:`text-xs text-base-error leading-4`,children:t.agent_error})]})})]})})}function CZ(e){return e.type===`disconnection`?R(yZ,{entry:e}):e.type===`mode_toggle`?R(xZ,{entry:e}):e.type===`error`?R(bZ,{entry:e}):e.role===`agent`?R(hZ,{entry:e}):R(gZ,{entry:e})}function wZ({entry:e,animateIn:t}){return R(mx,{initial:!t,active:!0,children:CZ(e)})}var TZ=16;function EZ({scrollPinned:e}){let t=F(null),n=F(null),r=F(!0),i=I(()=>{let e=t.current;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},[]),a=I(t=>{t.deltaY<0&&(e.value=!1)},[e]),o=F(null),s=I(e=>{let t=e.touches[0];t&&(o.current=t.clientY)},[]),c=I(t=>{let n=t.touches[0];n&&o.current!==null&&(n.clientY>o.current&&(e.value=!1),o.current=n.clientY)},[e]),l=I(()=>{let n=t.current;if(!n)return;let{scrollTop:r,scrollHeight:i,clientHeight:a}=n;i-r-a<=TZ&&(e.value=!0)},[e]);return df(()=>{r.current=!1;let a=n.current,o=t.current;if(!a||!o)return;let s=a.getBoundingClientRect().height,c=new ResizeObserver(([t])=>{let n=t.contentRect.height,r=n>s;s=n,r&&e.peek()&&i()});return c.observe(a),()=>c.disconnect()},[e,i]),{scrollContainer:t,contentRef:n,handleScroll:l,handleWheel:a,handleTouchStart:s,handleTouchMove:c,firstRender:r}}function DZ({scrollPinned:e,transcript:t}){let{scrollContainer:n,contentRef:r,handleScroll:i,handleWheel:a,handleTouchStart:o,handleTouchMove:s,firstRender:c}=EZ({scrollPinned:e});return R(`div`,{ref:n,className:`px-4 pt-20 pb-4 grow overflow-y-auto z-2`,onScroll:i,onWheel:a,onTouchStart:o,onTouchMove:s,children:R(`div`,{ref:r,className:`flex flex-col gap-6`,children:t.value.map((e,t)=>R(wZ,{entry:e,animateIn:!c.current},`${t}-${e.conversationIndex}`))})})}function OZ({className:e,...t}){return R(`textarea`,{className:vx(`px-3 py-[calc(theme(spacing.2)-1px)] border text-sm text-base-primary bg-base border-base-border rounded-input focus-ring resize-none [field-sizing:content] placeholder:text-base-subtle`,e),...t})}function kZ(){let e=Rb(),{rating:t,feedbackText:n}=HS(),r=I(e=>{n.value=e.currentTarget.value},[]);return R(`div`,{className:`grow flex flex-col overflow-y-auto overflow-x-hidden px-4`,children:R(`div`,{className:`flex flex-col gap-8 min-h-full pt-4 pb-2`,children:[R(`div`,{className:`flex flex-col items-center justify-center gap-3`,children:[R(uC,{orbColor:`var(--el-base-subtle)`,circleBackgroundColor:`var(--el-base)`,starColor:`var(--el-base-primary)`,className:`w-20 h-22`}),t.value!==null&&R(wC,{rating:t.value,min:1,max:5}),R(`div`,{className:`text-center`,children:[R(`p`,{className:`text-sm text-base-primary font-medium`,children:e.thanks_for_feedback}),R(`p`,{className:`text-sm text-base-subtle`,children:e.thanks_for_feedback_details})]})]}),R(OZ,{className:`w-full min-h-[6lh]`,placeholder:e.follow_up_feedback_placeholder,rows:6,value:n,onInput:r})]})})}function AZ(){let e=Rb(),{currentContent:t}=GS(),{submitFeedback:n}=HS();return R(`div`,{className:`shrink-0 overflow-hidden flex p-3 items-end justify-end`,children:R(yC,{variant:`primary`,onClick:I(()=>{n(),t.value=`transcript`},[n]),children:e.submit})})}function jZ(e,[t,n]){return Math.min(n,Math.max(t,e))}typeof window<`u`&&window.document&&window.document.createElement;function MZ(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function NZ(e,t=[]){let n=[];function r(t,r){let i=Fd(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=mf(()=>o,Object.values(o));return R(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=hf(o?.[e]?.[a]||i);if(s)return s;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>Fd(e));return function(n){let r=n?.[e]||t;return mf(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,PZ(i,...t)]}function PZ(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return mf(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function FZ(e){let t=IZ(e),n=Lf((e,n)=>{let{children:r,...i}=e,a=zf.toArray(r),o=a.find(RZ);if(o){let e=o.props.children,r=a.map(t=>t===o?zf.count(e)>1?zf.only(null):_p(e)?e.props.children:null:t);return R(t,{...i,ref:n,children:_p(e)?bp(e,void 0,r):null})}return R(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function IZ(e){let t=Lf((e,t)=>{let{children:n,...r}=e;if(_p(n)){let e=BZ(n),i=zZ(r,n.props);return n.type!==ud&&(i.ref=t?Qb(t,e):e),bp(n,i)}return zf.count(n)>1?zf.only(null):null});return t.displayName=`${e}.SlotClone`,t}var LZ=Symbol(`radix.slottable`);function RZ(e){return _p(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===LZ}function zZ(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function BZ(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function VZ(e){let t=e+`CollectionProvider`,[n,r]=NZ(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=Tp.useRef(null),a=Tp.useRef(new Map).current;return R(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=FZ(s),l=Tp.forwardRef((e,t)=>{let{scope:n,children:r}=e;return R(c,{ref:$b(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=FZ(u),p=Tp.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=Tp.useRef(null),s=$b(t,o),c=a(u,n);return Tp.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),R(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return Tp.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var HZ=Fd(void 0);function UZ(e){let t=hf(HZ);return e||t||`ltr`}var WZ=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=FZ(`Primitive.${t}`),r=Lf((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),R(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function GZ(e,t){e&&wp(()=>e.dispatchEvent(t))}function KZ(e){let t=F(e);return df(()=>{t.current=e}),mf(()=>(...e)=>t.current?.(...e),[])}function qZ(e,t=globalThis?.document){let n=KZ(e);df(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var JZ=`DismissableLayer`,YZ=`dismissableLayer.update`,XZ=`dismissableLayer.pointerDownOutside`,ZZ=`dismissableLayer.focusOutside`,QZ,$Z=Fd({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),eQ=Lf((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=hf($Z),[u,d]=lf(null),f=u?.ownerDocument??globalThis?.document,[,p]=lf({}),m=$b(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=rQ(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=iQ(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return qZ(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),df(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(QZ=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),aQ(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=QZ)}},[u,f,n,l]),df(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),aQ())},[u,l]),df(()=>{let e=()=>p({});return document.addEventListener(YZ,e),()=>document.removeEventListener(YZ,e)},[]),R(WZ.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:MZ(e.onFocusCapture,S.onFocusCapture),onBlurCapture:MZ(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:MZ(e.onPointerDownCapture,x.onPointerDownCapture)})});eQ.displayName=JZ;var tQ=`DismissableLayerBranch`,nQ=Lf((e,t)=>{let n=hf($Z),r=F(null),i=$b(t,r);return df(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),R(WZ.div,{...e,ref:i})});nQ.displayName=tQ;function rQ(e,t=globalThis?.document){let n=KZ(e),r=F(!1),i=F(()=>{});return df(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){oQ(XZ,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function iQ(e,t=globalThis?.document){let n=KZ(e),r=F(!1);return df(()=>{let e=e=>{e.target&&!r.current&&oQ(ZZ,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function aQ(){let e=new CustomEvent(YZ);document.dispatchEvent(e)}function oQ(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?GZ(i,a):i.dispatchEvent(a)}var sQ=0;function cQ(){df(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??lQ()),document.body.insertAdjacentElement(`beforeend`,e[1]??lQ()),sQ++,()=>{sQ===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),sQ--}},[])}function lQ(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var uQ=`focusScope.autoFocusOnMount`,dQ=`focusScope.autoFocusOnUnmount`,fQ={bubbles:!1,cancelable:!0},pQ=`FocusScope`,mQ=Lf((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=lf(null),l=KZ(i),u=KZ(a),d=F(null),f=$b(t,e=>c(e)),p=F({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;df(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:xQ(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||xQ(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&xQ(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),df(()=>{if(s){SQ.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(uQ,fQ);s.addEventListener(uQ,l),s.dispatchEvent(t),t.defaultPrevented||(hQ(TQ(_Q(s)),{select:!0}),document.activeElement===e&&xQ(s))}return()=>{s.removeEventListener(uQ,l),setTimeout(()=>{let t=new CustomEvent(dQ,fQ);s.addEventListener(dQ,u),s.dispatchEvent(t),t.defaultPrevented||xQ(e??document.body,{select:!0}),s.removeEventListener(dQ,u),SQ.remove(p)},0)}}},[s,l,u,p]);let m=I(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=gQ(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&xQ(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&xQ(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return R(WZ.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});mQ.displayName=pQ;function hQ(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(xQ(r,{select:t}),document.activeElement!==n)return}function gQ(e){let t=_Q(e);return[vQ(t,e),vQ(t.reverse(),e)]}function _Q(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function vQ(e,t){for(let n of e)if(!yQ(n,{upTo:t}))return n}function yQ(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function bQ(e){return e instanceof HTMLInputElement&&`select`in e}function xQ(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&bQ(e)&&t&&e.select()}}var SQ=CQ();function CQ(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=wQ(e,t),e.unshift(t)},remove(t){e=wQ(e,t),e[0]?.resume()}}}function wQ(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function TQ(e){return e.filter(e=>e.tagName!==`A`)}var EQ=globalThis?.document?ff:()=>{},DQ=_f||(()=>void 0),OQ=0;function kQ(e){let[t,n]=lf(DQ());return EQ(()=>{e||n(e=>e??String(OQ++))},[e]),e||(t?`radix-${t}`:``)}var AQ=[`top`,`right`,`bottom`,`left`],jQ=Math.min,MQ=Math.max,NQ=Math.round,PQ=Math.floor,FQ=e=>({x:e,y:e}),IQ={left:`right`,right:`left`,bottom:`top`,top:`bottom`},LQ={start:`end`,end:`start`};function RQ(e,t,n){return MQ(e,jQ(t,n))}function zQ(e,t){return typeof e==`function`?e(t):e}function BQ(e){return e.split(`-`)[0]}function VQ(e){return e.split(`-`)[1]}function HQ(e){return e===`x`?`y`:`x`}function UQ(e){return e===`y`?`height`:`width`}var WQ=new Set([`top`,`bottom`]);function GQ(e){return WQ.has(BQ(e))?`y`:`x`}function KQ(e){return HQ(GQ(e))}function qQ(e,t,n){n===void 0&&(n=!1);let r=VQ(e),i=KQ(e),a=UQ(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=n$(o)),[o,n$(o)]}function JQ(e){let t=n$(e);return[YQ(e),t,YQ(t)]}function YQ(e){return e.replace(/start|end/g,e=>LQ[e])}var XQ=[`left`,`right`],ZQ=[`right`,`left`],QQ=[`top`,`bottom`],$Q=[`bottom`,`top`];function e$(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ZQ:XQ:t?XQ:ZQ;case`left`:case`right`:return t?QQ:$Q;default:return[]}}function t$(e,t,n,r){let i=VQ(e),a=e$(BQ(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(YQ)))),a}function n$(e){return e.replace(/left|right|bottom|top/g,e=>IQ[e])}function r$(e){return{top:0,right:0,bottom:0,left:0,...e}}function i$(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:r$(e)}function a$(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function o$(e,t,n){let{reference:r,floating:i}=e,a=GQ(t),o=KQ(t),s=UQ(o),c=BQ(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(VQ(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var s$=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=o$(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=o$(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function c$(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=zQ(t,e),p=i$(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=a$(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=a$(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var l$=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=zQ(e,t)||{};if(l==null)return{};let d=i$(u),f={x:n,y:r},p=KQ(i),m=UQ(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=jQ(d[_],T),te=jQ(d[v],T),ne=ee,re=C-h[m]-te,ie=C/2-h[m]/2+w,ae=RQ(ne,ie,re),oe=!c.arrow&&VQ(i)!=null&&ie!==ae&&a.reference[m]/2-(ie<ne?ee:te)-h[m]/2<0,se=oe?ie<ne?ie-ne:ie-re:0;return{[p]:f[p]+se,data:{[p]:ae,centerOffset:ie-ae-se,...oe&&{alignmentOffset:se}},reset:oe}}}),u$=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=zQ(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=BQ(r),_=GQ(o),v=BQ(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[n$(o)]:JQ(o)),x=p!==`none`;!d&&x&&b.push(...t$(o,m,p,y));let S=[o,...b],C=await c$(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=qQ(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==GQ(t))||T.every(e=>GQ(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=GQ(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function d$(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function f$(e){return AQ.some(t=>e[t]>=0)}var p$=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=zQ(e,t);switch(r){case`referenceHidden`:{let e=d$(await c$(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:f$(e)}}}case`escaped`:{let e=d$(await c$(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:f$(e)}}}default:return{}}}}},m$=new Set([`left`,`top`]);async function h$(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=BQ(n),s=VQ(n),c=GQ(n)===`y`,l=m$.has(o)?-1:1,u=a&&c?-1:1,d=zQ(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var g$=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await h$(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_$=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=zQ(e,t),l={x:n,y:r},u=await c$(t,c),d=GQ(BQ(i)),f=HQ(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=RQ(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=RQ(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},v$=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=zQ(e,t),u={x:n,y:r},d=GQ(i),f=HQ(d),p=u[f],m=u[d],h=zQ(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=m$.has(BQ(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},y$=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=zQ(e,t),u=await c$(t,l),d=BQ(i),f=VQ(i),p=GQ(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=jQ(h-u[g],v),x=jQ(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=MQ(u.left,0),t=MQ(u.right,0),n=MQ(u.top,0),r=MQ(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:MQ(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:MQ(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function b$(){return typeof window<`u`}function x$(e){return w$(e)?(e.nodeName||``).toLowerCase():`#document`}function S$(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function C$(e){return((w$(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function w$(e){return b$()?e instanceof Node||e instanceof S$(e).Node:!1}function T$(e){return b$()?e instanceof Element||e instanceof S$(e).Element:!1}function E$(e){return b$()?e instanceof HTMLElement||e instanceof S$(e).HTMLElement:!1}function D$(e){return!b$()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof S$(e).ShadowRoot}var O$=new Set([`inline`,`contents`]);function k$(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=H$(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!O$.has(i)}var A$=new Set([`table`,`td`,`th`]);function j$(e){return A$.has(x$(e))}var M$=[`:popover-open`,`:modal`];function N$(e){return M$.some(t=>{try{return e.matches(t)}catch{return!1}})}var P$=[`transform`,`translate`,`scale`,`rotate`,`perspective`],F$=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],I$=[`paint`,`layout`,`strict`,`content`];function L$(e){let t=z$(),n=T$(e)?H$(e):e;return P$.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||F$.some(e=>(n.willChange||``).includes(e))||I$.some(e=>(n.contain||``).includes(e))}function R$(e){let t=W$(e);for(;E$(t)&&!V$(t);){if(L$(t))return t;if(N$(t))return null;t=W$(t)}return null}function z$(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var B$=new Set([`html`,`body`,`#document`]);function V$(e){return B$.has(x$(e))}function H$(e){return S$(e).getComputedStyle(e)}function U$(e){return T$(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function W$(e){if(x$(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||D$(e)&&e.host||C$(e);return D$(t)?t.host:t}function G$(e){let t=W$(e);return V$(t)?e.ownerDocument?e.ownerDocument.body:e.body:E$(t)&&k$(t)?t:G$(t)}function K$(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=G$(e),i=r===e.ownerDocument?.body,a=S$(r);if(i){let e=q$(a);return t.concat(a,a.visualViewport||[],k$(r)?r:[],e&&n?K$(e):[])}return t.concat(r,K$(r,[],n))}function q$(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function J$(e){let t=H$(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=E$(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=NQ(n)!==a||NQ(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Y$(e){return T$(e)?e:e.contextElement}function X$(e){let t=Y$(e);if(!E$(t))return FQ(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=J$(t),o=(a?NQ(n.width):n.width)/r,s=(a?NQ(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Z$=FQ(0);function Q$(e){let t=S$(e);return!z$()||!t.visualViewport?Z$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $$(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==S$(e)?!1:t}function e1(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Y$(e),o=FQ(1);t&&(r?T$(r)&&(o=X$(r)):o=X$(e));let s=$$(a,n,r)?Q$(a):FQ(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=S$(a),t=r&&T$(r)?S$(r):r,n=e,i=q$(n);for(;i&&r&&t!==n;){let e=X$(i),t=i.getBoundingClientRect(),r=H$(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=S$(i),i=q$(n)}}return a$({width:u,height:d,x:c,y:l})}function t1(e,t){let n=U$(e).scrollLeft;return t?t.left+n:e1(C$(e)).left+n}function n1(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-t1(e,n),y:n.top+t.scrollTop}}function r1(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=C$(r),s=t?N$(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=FQ(1),u=FQ(0),d=E$(r);if((d||!d&&!a)&&((x$(r)!==`body`||k$(o))&&(c=U$(r)),E$(r))){let e=e1(r);l=X$(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?n1(o,c):FQ(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function i1(e){return Array.from(e.getClientRects())}function a1(e){let t=C$(e),n=U$(e),r=e.ownerDocument.body,i=MQ(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=MQ(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+t1(e),s=-n.scrollTop;return H$(r).direction===`rtl`&&(o+=MQ(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var o1=25;function s1(e,t){let n=S$(e),r=C$(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=z$();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=t1(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=o1&&(a-=o)}else l<=o1&&(a+=l);return{width:a,height:o,x:s,y:c}}var c1=new Set([`absolute`,`fixed`]);function l1(e,t){let n=e1(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=E$(e)?X$(e):FQ(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function u1(e,t,n){let r;if(t===`viewport`)r=s1(e,n);else if(t===`document`)r=a1(C$(e));else if(T$(t))r=l1(t,n);else{let n=Q$(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return a$(r)}function d1(e,t){let n=W$(e);return n===t||!T$(n)||V$(n)?!1:H$(n).position===`fixed`||d1(n,t)}function f1(e,t){let n=t.get(e);if(n)return n;let r=K$(e,[],!1).filter(e=>T$(e)&&x$(e)!==`body`),i=null,a=H$(e).position===`fixed`,o=a?W$(e):e;for(;T$(o)&&!V$(o);){let t=H$(o),n=L$(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&c1.has(i.position)||k$(o)&&!n&&d1(e,o))?r=r.filter(e=>e!==o):i=t,o=W$(o)}return t.set(e,r),r}function p1(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?N$(t)?[]:f1(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=u1(t,n,i);return e.top=MQ(r.top,e.top),e.right=jQ(r.right,e.right),e.bottom=jQ(r.bottom,e.bottom),e.left=MQ(r.left,e.left),e},u1(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function m1(e){let{width:t,height:n}=J$(e);return{width:t,height:n}}function h1(e,t,n){let r=E$(t),i=C$(t),a=n===`fixed`,o=e1(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=FQ(0);function l(){c.x=t1(i)}if(r||!r&&!a)if((x$(t)!==`body`||k$(i))&&(s=U$(t)),r){let e=e1(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?n1(i,s):FQ(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function g1(e){return H$(e).position===`static`}function _1(e,t){if(!E$(e)||H$(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return C$(e)===n&&(n=n.ownerDocument.body),n}function v1(e,t){let n=S$(e);if(N$(e))return n;if(!E$(e)){let t=W$(e);for(;t&&!V$(t);){if(T$(t)&&!g1(t))return t;t=W$(t)}return n}let r=_1(e,t);for(;r&&j$(r)&&g1(r);)r=_1(r,t);return r&&V$(r)&&g1(r)&&!L$(r)?n:r||R$(e)||n}var y1=async function(e){let t=this.getOffsetParent||v1,n=this.getDimensions,r=await n(e.floating);return{reference:h1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function b1(e){return H$(e).direction===`rtl`}var x1={convertOffsetParentRelativeRectToViewportRelativeRect:r1,getDocumentElement:C$,getClippingRect:p1,getOffsetParent:v1,getElementRects:y1,getClientRects:i1,getDimensions:m1,getScale:X$,isElement:T$,isRTL:b1};function S1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function C1(e,t){let n=null,r,i=C$(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=PQ(d),h=PQ(i.clientWidth-(u+f)),g=PQ(i.clientHeight-(d+p)),_=PQ(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:MQ(0,jQ(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!S1(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function w1(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Y$(e),u=i||a?[...l?K$(l):[],...K$(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?C1(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?e1(e):null;c&&g();function g(){let t=e1(e);h&&!S1(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var T1=g$,E1=_$,D1=u$,O1=y$,k1=p$,A1=l$,j1=v$,M1=(e,t,n)=>{let r=new Map,i={platform:x1,...n},a={...i.platform,_c:r};return s$(e,t,{...i,platform:a})},N1=typeof document<`u`?ff:function(){};function P1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!P1(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!P1(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function F1(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function I1(e,t){let n=F1(e);return Math.round(t*n)/n}function L1(e){let t=F(e);return N1(()=>{t.current=e}),t}function R1(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=lf({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=lf(r);P1(f,r)||p(r);let[m,h]=lf(null),[g,_]=lf(null),v=I(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=I(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=F(null),C=F(null),w=F(u),T=c!=null,ee=L1(c),te=L1(i),ne=L1(l),re=I(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};te.current&&(e.platform=te.current),M1(S.current,C.current,e).then(e=>{let t={...e,isPositioned:ne.current!==!1};ie.current&&!P1(w.current,t)&&(w.current=t,wp(()=>{d(t)}))})},[f,t,n,te,ne]);N1(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ie=F(!1);N1(()=>(ie.current=!0,()=>{ie.current=!1}),[]),N1(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(ee.current)return ee.current(b,x,re);re()}},[b,x,re,ee,T]);let ae=mf(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),oe=mf(()=>({reference:b,floating:x}),[b,x]),se=mf(()=>{let e={position:n,left:0,top:0};if(!oe.floating)return e;let t=I1(oe.floating,u.x),r=I1(oe.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...F1(oe.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,oe.floating,u.x,u.y]);return mf(()=>({...u,update:re,refs:ae,elements:oe,floatingStyles:se}),[u,re,ae,oe,se])}var z1=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:A1({element:r.current,padding:i}).fn(n):r?A1({element:r,padding:i}).fn(n):{}}}},B1=(e,t)=>({...T1(e),options:[e,t]}),V1=(e,t)=>({...E1(e),options:[e,t]}),H1=(e,t)=>({...j1(e),options:[e,t]}),U1=(e,t)=>({...D1(e),options:[e,t]}),W1=(e,t)=>({...O1(e),options:[e,t]}),G1=(e,t)=>({...k1(e),options:[e,t]}),K1=(e,t)=>({...z1(e),options:[e,t]}),q1=`Arrow`,J1=Lf((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return R(WZ.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:R(`polygon`,{points:`0,0 30,0 15,10`})})});J1.displayName=q1;var Y1=J1;function X1(e){let[t,n]=lf(void 0);return EQ(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Z1=`Popper`,[Q1,$1]=NZ(Z1),[e0,t0]=Q1(Z1),n0=e=>{let{__scopePopper:t,children:n}=e,[r,i]=lf(null);return R(e0,{scope:t,anchor:r,onAnchorChange:i,children:n})};n0.displayName=Z1;var r0=`PopperAnchor`,i0=Lf((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=t0(r0,n),o=F(null),s=$b(t,o),c=F(null);return df(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:R(WZ.div,{...i,ref:s})});i0.displayName=r0;var a0=`PopperContent`,[o0,s0]=Q1(a0),c0=Lf((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=t0(a0,n),[_,v]=lf(null),y=$b(t,e=>v(e)),[b,x]=lf(null),S=X1(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),ee=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},te=Array.isArray(l)?l:[l],ne=te.length>0,re={padding:ee,boundary:te.filter(f0),altBoundary:ne},{refs:ie,floatingStyles:ae,placement:oe,isPositioned:se,middlewareData:E}=R1({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>w1(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[B1({mainAxis:i+w,alignmentAxis:o}),c&&V1({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?H1():void 0,...re}),c&&U1({...re}),W1({...re,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&K1({element:b,padding:s}),p0({arrowWidth:C,arrowHeight:w}),f&&G1({strategy:`referenceHidden`,...re})]}),[ce,le]=m0(oe),ue=KZ(m);EQ(()=>{se&&ue?.()},[se,ue]);let de=E.arrow?.x,fe=E.arrow?.y,pe=E.arrow?.centerOffset!==0,[me,he]=lf();return EQ(()=>{_&&he(window.getComputedStyle(_).zIndex)},[_]),R(`div`,{ref:ie.setFloating,"data-radix-popper-content-wrapper":``,style:{...ae,transform:se?ae.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:me,"--radix-popper-transform-origin":[E.transformOrigin?.x,E.transformOrigin?.y].join(` `),...E.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:R(o0,{scope:n,placedSide:ce,onArrowChange:x,arrowX:de,arrowY:fe,shouldHideArrow:pe,children:R(WZ.div,{"data-side":ce,"data-align":le,...h,ref:y,style:{...h.style,animation:se?void 0:`none`}})})})});c0.displayName=a0;var l0=`PopperArrow`,u0={top:`bottom`,right:`left`,bottom:`top`,left:`right`},d0=Lf(function(e,t){let{__scopePopper:n,...r}=e,i=s0(l0,n),a=u0[i.placedSide];return R(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:R(Y1,{...r,ref:t,style:{...r.style,display:`block`}})})});d0.displayName=l0;function f0(e){return e!==null}var p0=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=m0(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function m0(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var h0=n0,g0=i0,_0=c0,v0=d0,y0=`Portal`,b0=Lf((e,t)=>{let{container:n,...r}=e,[i,a]=lf(!1);EQ(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Tp.createPortal(R(WZ.div,{...r,ref:t}),o):null});b0.displayName=y0;var x0=Mf||EQ;function S0({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=C0({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=F(e!==void 0);df(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,I(t=>{if(s){let n=w0(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function C0({defaultProp:e,onChange:t}){let[n,r]=lf(e),i=F(n),a=F(t);return x0(()=>{a.current=t},[t]),df(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function w0(e){return typeof e==`function`}function T0(e){let t=F({value:e,previous:e});return mf(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var E0=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),D0=`VisuallyHidden`,O0=Lf((e,t)=>R(WZ.span,{...e,ref:t,style:{...E0,...e.style}}));O0.displayName=D0;var k0=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},A0=new WeakMap,j0=new WeakMap,M0={},N0=0,P0=function(e){return e&&(e.host||P0(e.parentNode))},F0=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=P0(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},I0=function(e,t,n,r){var i=F0(t,Array.isArray(e)?e:[e]);M0[n]||(M0[n]=new WeakMap);var a=M0[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(A0.get(e)||0)+1,l=(a.get(e)||0)+1;A0.set(e,c),a.set(e,l),o.push(e),c===1&&i&&j0.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),N0++,function(){o.forEach(function(e){var t=A0.get(e)-1,i=a.get(e)-1;A0.set(e,t),a.set(e,i),t||(j0.has(e)||e.removeAttribute(r),j0.delete(e)),i||e.removeAttribute(n)}),N0--,N0||(A0=new WeakMap,A0=new WeakMap,j0=new WeakMap,M0={})}},L0=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||k0(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),I0(r,i,n,`aria-hidden`)):function(){return null}},R0=function(){return R0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},R0.apply(this,arguments)};function z0(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function B0(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var V0=`right-scroll-bar-position`,H0=`width-before-scroll-bar`,U0=`with-scroll-bars-hidden`,W0=`--removed-body-scroll-bar-size`;function G0(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function K0(e,t){var n=lf(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var q0=typeof window<`u`?ff:df,J0=new WeakMap;function Y0(e,t){var n=K0(t||null,function(t){return e.forEach(function(e){return G0(e,t)})});return q0(function(){var t=J0.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||G0(e,null)}),i.forEach(function(e){r.has(e)||G0(e,a)})}J0.set(n,e)},[e]),n}function X0(e){return e}function Z0(e,t){t===void 0&&(t=X0);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Q0(e){e===void 0&&(e={});var t=Z0(null);return t.options=R0({async:!0,ssr:!1},e),t}var $0=function(e){var t=e.sideCar,n=z0(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return sd(r,R0({},n))};$0.isSideCarExport=!0;function e2(e,t){return e.useMedium(t),$0}var t2=Q0(),n2=function(){},r2=Lf(function(e,t){var n=F(null),r=lf({onScrollCapture:n2,onWheelCapture:n2,onTouchMoveCapture:n2}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=z0(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Y0([n,t]),C=R0(R0({},b),i);return sd(ud,null,u&&sd(x,{sideCar:t2,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?bp(zf.only(s),R0(R0({},C),{ref:S})):sd(v,R0({},C,{className:c,ref:S}),s))});r2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},r2.classNames={fullWidth:H0,zeroRight:V0};var i2,a2=function(){if(i2)return i2;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function o2(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=a2();return t&&e.setAttribute(`nonce`,t),e}function s2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function c2(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var l2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=o2())&&(s2(t,n),c2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},u2=function(){var e=l2();return function(t,n){df(function(){return e.add(t),function(){e.remove()}},[t&&n])}},d2=function(){var e=u2();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},f2={left:0,top:0,right:0,gap:0},p2=function(e){return parseInt(e||``,10)||0},m2=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[p2(n),p2(r),p2(i)]},h2=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return f2;var t=m2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},g2=d2(),_2=`data-scroll-locked`,v2=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
390
|
-
.${
|
|
389
|
+
`)||(e.endsWith("```\n")||e.endsWith("```"))&&t%2==0)return e;let r=e.match(TX);if(r&&!n){let t=r[2];if(!t||DX.test(t))return e;if(KX(e)%2==1)return`${e}\``}return e},JX=e=>{let t=e.match(EX);if(t){let n=t[2];if(!n||DX.test(n))return e;if((e.match(/~~/g)||[]).length%2==1)return`${e}~~`}return e},YX=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]===`*`?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},XX=e=>{if(NX(e)||jX.test(e))return e;let t=e.match(SX);if(t){let n=t[2];if(!n||DX.test(n))return e;if(YX(e)%2==1)return`${e}***`}return e},ZX=e=>{if(!e||typeof e!=`string`)return e;let t=e,n=LX(t);return n.endsWith(`](streamdown:incomplete-link)`)?n:(t=n,t=XX(t),t=RX(t),t=zX(t),t=VX(t),t=WX(t),t=qX(t),t=JX(t),t)};function QX(){if(window.location!==window.parent.location){let{ancestorOrigins:e}=document.location;if(e&&e.length)return e[0];if(document.referrer)try{return new URL(document.referrer).origin}catch{}}return document.location.origin}function $X(e){let t=QX(),n=[t,...PJ(e)];return[CA,[pw,{...XC,protocols:{...XC.protocols,src:[...XC.protocols?.src||[],`data`]}}],[TA,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:n,allowedProtocols:[`*`],defaultOrigin:t,allowDataImages:!0}]]}var eZ=[[XI,{}],[qj,{}],[Yj,{}]],tZ=Fd({isAnimating:!1}),nZ=Pf(({content:e,shouldParseIncompleteMarkdown:t,markdownOptions:n})=>{let r=mf(()=>typeof e==`string`&&t?ZX(e.trim()):e,[e,t]);return R(kJ,{...n,children:r})},(e,t)=>e.content===t.content&&e.shouldParseIncompleteMarkdown===t.shouldParseIncompleteMarkdown&&e.markdownOptions===t.markdownOptions),rZ=Pf(({children:e,parseIncompleteMarkdown:t=!0,className:n,isAnimating:r=!1,linkConfig:i})=>{let a=_f(),o=mf(()=>yX(typeof e==`string`?e:``),[e]),s=mf(()=>({components:dK,rehypePlugins:$X(i),remarkPlugins:eZ}),[i]);return R(yG.Provider,{value:bG,children:R(tZ.Provider,{value:{isAnimating:r},children:R(`div`,{className:zS(`markdown *:first:mt-0 *:last:mb-0`,n),children:o.map((e,n)=>R(nZ,{content:e,shouldParseIncompleteMarkdown:t,markdownOptions:s},`${a}-block-${n}`))})})})},(e,t)=>e.children===t.children&&e.isAnimating===t.isAnimating&&e.className===t.className&&e.parseIncompleteMarkdown===t.parseIncompleteMarkdown&&e.linkConfig===t.linkConfig),iZ=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`application/pdf`],aZ=[`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.pdf`],oZ=10,sZ=20;function cZ(e){return e.startsWith(`image/`)}function lZ(e){return iZ.includes(e)}function uZ(e){return(cZ(e)?oZ:sZ)*1024*1024}function dZ(e,t){return`${e}/v1/convai/conversations/${t}/files`}function fZ(e,t,n){fetch(`${dZ(e,t)}/${n}`,{method:`DELETE`}).catch(()=>{})}function pZ({conversationId:e,maxFiles:t}){let{serverUrl:n}=hg(),r=mf(()=>Vp(null),[]),i=mf(()=>Vp(0),[]),a=F(null),o=F(null),s=F([]),c=F(null),l=e=>{let t=r.peek();t&&(r.value=null,t.status===`uploading`?c.current?.abort():t.status===`ready`&&e&&fZ(n.peek(),e,t.fileId),mZ(o.current),o.current=null)};if(e!==a.current){let t=a.current;a.current=e,i.value=0,e!==null&&(s.current.forEach(mZ),s.current=[]),l(t)}df(()=>()=>{l(a.current),s.current.forEach(mZ)},[]);let u=mf(()=>Kp(()=>{if(t==null)return!1;let e=+!!r.value;return i.value+e>=t}),[t,r,i]);return{pendingFile:r,isUploading:mf(()=>Kp(()=>r.value?.status===`uploading`),[r]),hasReachedLimit:u,addFile:I(t=>{if(!e)return null;if(u.peek())return`limit_reached`;if(!lZ(t.type))return`unsupported_type`;if(t.size>uZ(t.type))return`too_large`;mZ(o.current),o.current=null;let i=cZ(t.type)?URL.createObjectURL(t):null;o.current=i,r.value={file:t,status:`uploading`,previewUrl:i};let a=new FormData;a.append(`file`,t);let s=new AbortController;c.current=s;let l=e,d=n.peek();return fetch(dZ(d,l),{method:`POST`,body:a,signal:s.signal}).then(async e=>{if(!e.ok){let t=await e.json().catch(()=>null);throw Error(t?.detail?.message??t?.detail??`Upload failed`)}return e.json()}).then(e=>{let n=r.peek();n?.file===t?r.value={status:`ready`,file:n.file,previewUrl:n.previewUrl,fileId:e.file_id}:fZ(d,l,e.file_id)}).catch(e=>{if(e?.name===`AbortError`)return;console.warn(`[convai] file upload failed:`,e);let n=r.peek();n?.file===t&&(r.value={status:`error`,file:n.file,previewUrl:n.previewUrl,error:e?.message??`Upload failed`})}).finally(()=>{c.current===s&&(c.current=null)}),null},[e,r,n,u]),removeFile:I(()=>{l(e)},[e]),markFileAsSent:I(()=>{o.current&&=(s.current.push(o.current),null),r.value=null,i.value++},[r,i])}}function mZ(e){e&&URL.revokeObjectURL(e)}function hZ({text:e,className:t}){return R(`span`,{className:zS(`animate-text`,t),children:e})}function gZ({entry:e}){let t=Cb(),n=fb(),r=!e.isText,i=n.value.strip_audio_tags&&r,a=r&&!i,o=i?MC(e.message):e.message;return R(`div`,{className:`pr-8`,children:[o&&(r?R(`div`,{dir:`auto`,className:`text-sm whitespace-pre-wrap wrap-break-word`,children:a?R(jC,{text:o}):o}):R(rZ,{linkConfig:t.value,children:o})),e.toolStatus&&R(`div`,{className:o?`mt-2`:void 0,children:R(CZ,{status:e.toolStatus})})]})}function _Z({entry:e}){let{previewUrl:t}=Vb(),n=e.fileInput;return R(`div`,{className:vx(`flex gap-2.5 transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:scale-75`,e.role===`user`?`justify-end pl-16 origin-top-right`:`pr-16 origin-top-left`),children:[e.role===`agent`&&R(`img`,{src:t,alt:`AI agent avatar`,className:`bg-base-border shrink-0 w-5 h-5 rounded-full`}),R(`div`,{className:`flex flex-col items-end gap-1.5 min-w-0`,children:[n&&R(vZ,{fileName:n.fileName,mimeType:n.mimeType,previewUrl:n.previewUrl}),e.message&&R(`div`,{dir:`auto`,className:vx(`px-3 py-2.5 rounded-bubble text-sm min-w-0 wrap-break-word whitespace-pre-wrap`,e.role===`user`?`bg-accent text-accent-primary`:`bg-base-active text-base-primary`),children:e.message})]})]})}function vZ({fileName:e,mimeType:t,previewUrl:n}){return cZ(t)&&n?R(`div`,{className:`rounded-bubble border border-base-border shadow-sm p-1`,children:R(`img`,{src:n,alt:e,className:`max-w-[180px] rounded-input object-cover`})}):R(`div`,{className:`flex items-center gap-2 px-3 py-2.5 rounded-bubble bg-accent text-accent-primary`,children:[R(yZ,{}),R(`span`,{className:`truncate text-sm`,children:e})]})}function yZ(){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,className:`shrink-0 opacity-70`,children:[R(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),R(`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`})]})}function bZ({entry:e}){let t=Rb(),{lastId:n}=ab(),r=Sb(),i=fb();return R(`div`,{className:`px-8 flex flex-col`,children:[r.value===`rating`&&R(DC,{}),R(`div`,{className:`text-xs text-base-subtle text-center transition-opacity duration-200 data-hidden:opacity-0`,children:[e.role===`user`?t.user_ended_conversation:t.agent_ended_conversation,R(`br`,{}),n.value&&i.value.show_conversation_id&&R(`span`,{className:`break-all`,children:[t.conversation_id,`: `,n.value]})]})]})}function xZ({entry:e}){let t=Rb(),{lastId:n}=ab();return R(`div`,{className:`px-8 text-xs text-base-error text-center transition-opacity duration-200 data-hidden:opacity-0`,children:[t.error_occurred,R(`br`,{}),e.message,n.value&&R(ud,{children:[R(`br`,{}),R(`span`,{className:`text-base-subtle break-all`,children:[t.conversation_id,`: `,n.value]})]})]})}function SZ({entry:e}){let t=Rb();return R(`div`,{className:`px-8 text-xs text-base-subtle text-center transition-opacity duration-200 data-hidden:opacity-0`,children:e.mode===`text`?t.switched_to_text_mode:t.switched_to_voice_mode})}function CZ({status:e}){let t=Rb();return R(`div`,{className:`-my-4 first:mt-0 last:mb-0 flex items-center`,children:R(`div`,{className:`flex items-center h-7 px-2 gap-1 rounded-button border border-base-border bg-base`,children:[e===Gb.LOADING&&R(ud,{children:[R(JS,{name:`loader`,size:`md`,className:`animate-spin shrink-0`}),R(`span`,{className:`text-xs leading-4`,children:t.agent_working})]}),e===Gb.SUCCESS&&R(mx,{active:!0,initial:!1,children:R(`span`,{className:`flex items-center gap-1 transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:scale-75`,children:[R(JS,{name:`check`,size:`sm`,className:`shrink-0`}),R(`span`,{className:`text-xs leading-4`,children:t.agent_done})]})}),e===Gb.ERROR&&R(mx,{active:!0,initial:!1,children:R(`span`,{className:`flex items-center gap-1 transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:scale-75`,children:[R(JS,{name:`x`,size:`sm`,className:`shrink-0 text-base-error`}),R(`span`,{className:`text-xs text-base-error leading-4`,children:t.agent_error})]})})]})})}function wZ(){return R(`div`,{className:`pr-8`,children:R(hZ,{text:Rb().typing_indicator.value,className:`text-sm`})})}function TZ(e){return e.type===`disconnection`?R(bZ,{entry:e}):e.type===`mode_toggle`?R(SZ,{entry:e}):e.type===`error`?R(xZ,{entry:e}):e.type===`typing_indicator`?R(wZ,{}):e.role===`agent`?R(gZ,{entry:e}):R(_Z,{entry:e})}function EZ({entry:e,animateIn:t}){return R(mx,{initial:!t,active:!0,children:TZ(e)})}var DZ=16;function OZ({scrollPinned:e}){let t=F(null),n=F(null),r=F(!0),i=I(()=>{let e=t.current;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},[]),a=I(t=>{t.deltaY<0&&(e.value=!1)},[e]),o=F(null),s=I(e=>{let t=e.touches[0];t&&(o.current=t.clientY)},[]),c=I(t=>{let n=t.touches[0];n&&o.current!==null&&(n.clientY>o.current&&(e.value=!1),o.current=n.clientY)},[e]),l=I(()=>{let n=t.current;if(!n)return;let{scrollTop:r,scrollHeight:i,clientHeight:a}=n;i-r-a<=DZ&&(e.value=!0)},[e]);return df(()=>{r.current=!1;let a=n.current,o=t.current;if(!a||!o)return;let s=a.getBoundingClientRect().height,c=new ResizeObserver(([t])=>{let n=t.contentRect.height,r=n>s;s=n,r&&e.peek()&&i()});return c.observe(a),()=>c.disconnect()},[e,i]),{scrollContainer:t,contentRef:n,handleScroll:l,handleWheel:a,handleTouchStart:s,handleTouchMove:c,firstRender:r}}function kZ({scrollPinned:e,transcript:t}){let{scrollContainer:n,contentRef:r,handleScroll:i,handleWheel:a,handleTouchStart:o,handleTouchMove:s,firstRender:c}=OZ({scrollPinned:e});return R(`div`,{ref:n,className:`px-4 pt-20 pb-4 grow overflow-y-auto z-2`,onScroll:i,onWheel:a,onTouchStart:o,onTouchMove:s,children:R(`div`,{ref:r,className:`flex flex-col gap-6`,children:t.value.map((e,t)=>R(EZ,{entry:e,animateIn:!c.current},`${t}-${e.conversationIndex}`))})})}function AZ({className:e,...t}){return R(`textarea`,{className:vx(`px-3 py-[calc(theme(spacing.2)-1px)] border text-sm text-base-primary bg-base border-base-border rounded-input focus-ring resize-none [field-sizing:content] placeholder:text-base-subtle`,e),...t})}function jZ(){let e=Rb(),{rating:t,feedbackText:n}=HS(),r=I(e=>{n.value=e.currentTarget.value},[]);return R(`div`,{className:`grow flex flex-col overflow-y-auto overflow-x-hidden px-4`,children:R(`div`,{className:`flex flex-col gap-8 min-h-full pt-4 pb-2`,children:[R(`div`,{className:`flex flex-col items-center justify-center gap-3`,children:[R(uC,{orbColor:`var(--el-base-subtle)`,circleBackgroundColor:`var(--el-base)`,starColor:`var(--el-base-primary)`,className:`w-20 h-22`}),t.value!==null&&R(wC,{rating:t.value,min:1,max:5}),R(`div`,{className:`text-center`,children:[R(`p`,{className:`text-sm text-base-primary font-medium`,children:e.thanks_for_feedback}),R(`p`,{className:`text-sm text-base-subtle`,children:e.thanks_for_feedback_details})]})]}),R(AZ,{className:`w-full min-h-[6lh]`,placeholder:e.follow_up_feedback_placeholder,rows:6,value:n,onInput:r})]})})}function MZ(){let e=Rb(),{currentContent:t}=GS(),{submitFeedback:n}=HS();return R(`div`,{className:`shrink-0 overflow-hidden flex p-3 items-end justify-end`,children:R(yC,{variant:`primary`,onClick:I(()=>{n(),t.value=`transcript`},[n]),children:e.submit})})}function NZ(e,[t,n]){return Math.min(n,Math.max(t,e))}typeof window<`u`&&window.document&&window.document.createElement;function PZ(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function FZ(e,t=[]){let n=[];function r(t,r){let i=Fd(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=mf(()=>o,Object.values(o));return R(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=hf(o?.[e]?.[a]||i);if(s)return s;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>Fd(e));return function(n){let r=n?.[e]||t;return mf(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,IZ(i,...t)]}function IZ(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return mf(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function LZ(e){let t=RZ(e),n=Lf((e,n)=>{let{children:r,...i}=e,a=zf.toArray(r),o=a.find(BZ);if(o){let e=o.props.children,r=a.map(t=>t===o?zf.count(e)>1?zf.only(null):_p(e)?e.props.children:null:t);return R(t,{...i,ref:n,children:_p(e)?bp(e,void 0,r):null})}return R(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function RZ(e){let t=Lf((e,t)=>{let{children:n,...r}=e;if(_p(n)){let e=HZ(n),i=VZ(r,n.props);return n.type!==ud&&(i.ref=t?Qb(t,e):e),bp(n,i)}return zf.count(n)>1?zf.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zZ=Symbol(`radix.slottable`);function BZ(e){return _p(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===zZ}function VZ(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function HZ(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function UZ(e){let t=e+`CollectionProvider`,[n,r]=FZ(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=Tp.useRef(null),a=Tp.useRef(new Map).current;return R(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=LZ(s),l=Tp.forwardRef((e,t)=>{let{scope:n,children:r}=e;return R(c,{ref:$b(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=LZ(u),p=Tp.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=Tp.useRef(null),s=$b(t,o),c=a(u,n);return Tp.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),R(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return Tp.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var WZ=Fd(void 0);function GZ(e){let t=hf(WZ);return e||t||`ltr`}var KZ=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=LZ(`Primitive.${t}`),r=Lf((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),R(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qZ(e,t){e&&wp(()=>e.dispatchEvent(t))}function JZ(e){let t=F(e);return df(()=>{t.current=e}),mf(()=>(...e)=>t.current?.(...e),[])}function YZ(e,t=globalThis?.document){let n=JZ(e);df(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var XZ=`DismissableLayer`,ZZ=`dismissableLayer.update`,QZ=`dismissableLayer.pointerDownOutside`,$Z=`dismissableLayer.focusOutside`,eQ,tQ=Fd({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nQ=Lf((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=hf(tQ),[u,d]=lf(null),f=u?.ownerDocument??globalThis?.document,[,p]=lf({}),m=$b(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=aQ(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=oQ(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return YZ(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),df(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(eQ=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),sQ(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=eQ)}},[u,f,n,l]),df(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),sQ())},[u,l]),df(()=>{let e=()=>p({});return document.addEventListener(ZZ,e),()=>document.removeEventListener(ZZ,e)},[]),R(KZ.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:PZ(e.onFocusCapture,S.onFocusCapture),onBlurCapture:PZ(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:PZ(e.onPointerDownCapture,x.onPointerDownCapture)})});nQ.displayName=XZ;var rQ=`DismissableLayerBranch`,iQ=Lf((e,t)=>{let n=hf(tQ),r=F(null),i=$b(t,r);return df(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),R(KZ.div,{...e,ref:i})});iQ.displayName=rQ;function aQ(e,t=globalThis?.document){let n=JZ(e),r=F(!1),i=F(()=>{});return df(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){cQ(QZ,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function oQ(e,t=globalThis?.document){let n=JZ(e),r=F(!1);return df(()=>{let e=e=>{e.target&&!r.current&&cQ($Z,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function sQ(){let e=new CustomEvent(ZZ);document.dispatchEvent(e)}function cQ(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?qZ(i,a):i.dispatchEvent(a)}var lQ=0;function uQ(){df(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??dQ()),document.body.insertAdjacentElement(`beforeend`,e[1]??dQ()),lQ++,()=>{lQ===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),lQ--}},[])}function dQ(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var fQ=`focusScope.autoFocusOnMount`,pQ=`focusScope.autoFocusOnUnmount`,mQ={bubbles:!1,cancelable:!0},hQ=`FocusScope`,gQ=Lf((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=lf(null),l=JZ(i),u=JZ(a),d=F(null),f=$b(t,e=>c(e)),p=F({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;df(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:CQ(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||CQ(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&CQ(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),df(()=>{if(s){wQ.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(fQ,mQ);s.addEventListener(fQ,l),s.dispatchEvent(t),t.defaultPrevented||(_Q(DQ(yQ(s)),{select:!0}),document.activeElement===e&&CQ(s))}return()=>{s.removeEventListener(fQ,l),setTimeout(()=>{let t=new CustomEvent(pQ,mQ);s.addEventListener(pQ,u),s.dispatchEvent(t),t.defaultPrevented||CQ(e??document.body,{select:!0}),s.removeEventListener(pQ,u),wQ.remove(p)},0)}}},[s,l,u,p]);let m=I(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=vQ(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&CQ(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&CQ(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return R(KZ.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});gQ.displayName=hQ;function _Q(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(CQ(r,{select:t}),document.activeElement!==n)return}function vQ(e){let t=yQ(e);return[bQ(t,e),bQ(t.reverse(),e)]}function yQ(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function bQ(e,t){for(let n of e)if(!xQ(n,{upTo:t}))return n}function xQ(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function SQ(e){return e instanceof HTMLInputElement&&`select`in e}function CQ(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&SQ(e)&&t&&e.select()}}var wQ=TQ();function TQ(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=EQ(e,t),e.unshift(t)},remove(t){e=EQ(e,t),e[0]?.resume()}}}function EQ(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function DQ(e){return e.filter(e=>e.tagName!==`A`)}var OQ=globalThis?.document?ff:()=>{},kQ=_f||(()=>void 0),AQ=0;function jQ(e){let[t,n]=lf(kQ());return OQ(()=>{e||n(e=>e??String(AQ++))},[e]),e||(t?`radix-${t}`:``)}var MQ=[`top`,`right`,`bottom`,`left`],NQ=Math.min,PQ=Math.max,FQ=Math.round,IQ=Math.floor,LQ=e=>({x:e,y:e}),RQ={left:`right`,right:`left`,bottom:`top`,top:`bottom`},zQ={start:`end`,end:`start`};function BQ(e,t,n){return PQ(e,NQ(t,n))}function VQ(e,t){return typeof e==`function`?e(t):e}function HQ(e){return e.split(`-`)[0]}function UQ(e){return e.split(`-`)[1]}function WQ(e){return e===`x`?`y`:`x`}function GQ(e){return e===`y`?`height`:`width`}var KQ=new Set([`top`,`bottom`]);function qQ(e){return KQ.has(HQ(e))?`y`:`x`}function JQ(e){return WQ(qQ(e))}function YQ(e,t,n){n===void 0&&(n=!1);let r=UQ(e),i=JQ(e),a=GQ(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=i$(o)),[o,i$(o)]}function XQ(e){let t=i$(e);return[ZQ(e),t,ZQ(t)]}function ZQ(e){return e.replace(/start|end/g,e=>zQ[e])}var QQ=[`left`,`right`],$Q=[`right`,`left`],e$=[`top`,`bottom`],t$=[`bottom`,`top`];function n$(e,t,n){switch(e){case`top`:case`bottom`:return n?t?$Q:QQ:t?QQ:$Q;case`left`:case`right`:return t?e$:t$;default:return[]}}function r$(e,t,n,r){let i=UQ(e),a=n$(HQ(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ZQ)))),a}function i$(e){return e.replace(/left|right|bottom|top/g,e=>RQ[e])}function a$(e){return{top:0,right:0,bottom:0,left:0,...e}}function o$(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:a$(e)}function s$(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function c$(e,t,n){let{reference:r,floating:i}=e,a=qQ(t),o=JQ(t),s=GQ(o),c=HQ(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(UQ(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var l$=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=c$(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=c$(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function u$(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=VQ(t,e),p=o$(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=s$(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=s$(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var d$=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=VQ(e,t)||{};if(l==null)return{};let d=o$(u),f={x:n,y:r},p=JQ(i),m=GQ(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=NQ(d[_],T),te=NQ(d[v],T),ne=ee,re=C-h[m]-te,ie=C/2-h[m]/2+w,ae=BQ(ne,ie,re),oe=!c.arrow&&UQ(i)!=null&&ie!==ae&&a.reference[m]/2-(ie<ne?ee:te)-h[m]/2<0,se=oe?ie<ne?ie-ne:ie-re:0;return{[p]:f[p]+se,data:{[p]:ae,centerOffset:ie-ae-se,...oe&&{alignmentOffset:se}},reset:oe}}}),f$=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=VQ(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=HQ(r),_=qQ(o),v=HQ(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[i$(o)]:XQ(o)),x=p!==`none`;!d&&x&&b.push(...r$(o,m,p,y));let S=[o,...b],C=await u$(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=YQ(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==qQ(t))||T.every(e=>qQ(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=qQ(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function p$(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function m$(e){return MQ.some(t=>e[t]>=0)}var h$=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=VQ(e,t);switch(r){case`referenceHidden`:{let e=p$(await u$(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:m$(e)}}}case`escaped`:{let e=p$(await u$(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:m$(e)}}}default:return{}}}}},g$=new Set([`left`,`top`]);async function _$(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=HQ(n),s=UQ(n),c=qQ(n)===`y`,l=g$.has(o)?-1:1,u=a&&c?-1:1,d=VQ(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var v$=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await _$(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},y$=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=VQ(e,t),l={x:n,y:r},u=await u$(t,c),d=qQ(HQ(i)),f=WQ(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=BQ(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=BQ(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},b$=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=VQ(e,t),u={x:n,y:r},d=qQ(i),f=WQ(d),p=u[f],m=u[d],h=VQ(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=g$.has(HQ(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},x$=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=VQ(e,t),u=await u$(t,l),d=HQ(i),f=UQ(i),p=qQ(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=NQ(h-u[g],v),x=NQ(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=PQ(u.left,0),t=PQ(u.right,0),n=PQ(u.top,0),r=PQ(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:PQ(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:PQ(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function S$(){return typeof window<`u`}function C$(e){return E$(e)?(e.nodeName||``).toLowerCase():`#document`}function w$(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function T$(e){return((E$(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function E$(e){return S$()?e instanceof Node||e instanceof w$(e).Node:!1}function D$(e){return S$()?e instanceof Element||e instanceof w$(e).Element:!1}function O$(e){return S$()?e instanceof HTMLElement||e instanceof w$(e).HTMLElement:!1}function k$(e){return!S$()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof w$(e).ShadowRoot}var A$=new Set([`inline`,`contents`]);function j$(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=W$(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!A$.has(i)}var M$=new Set([`table`,`td`,`th`]);function N$(e){return M$.has(C$(e))}var P$=[`:popover-open`,`:modal`];function F$(e){return P$.some(t=>{try{return e.matches(t)}catch{return!1}})}var I$=[`transform`,`translate`,`scale`,`rotate`,`perspective`],L$=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],R$=[`paint`,`layout`,`strict`,`content`];function z$(e){let t=V$(),n=D$(e)?W$(e):e;return I$.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||L$.some(e=>(n.willChange||``).includes(e))||R$.some(e=>(n.contain||``).includes(e))}function B$(e){let t=K$(e);for(;O$(t)&&!U$(t);){if(z$(t))return t;if(F$(t))return null;t=K$(t)}return null}function V$(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var H$=new Set([`html`,`body`,`#document`]);function U$(e){return H$.has(C$(e))}function W$(e){return w$(e).getComputedStyle(e)}function G$(e){return D$(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function K$(e){if(C$(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||k$(e)&&e.host||T$(e);return k$(t)?t.host:t}function q$(e){let t=K$(e);return U$(t)?e.ownerDocument?e.ownerDocument.body:e.body:O$(t)&&j$(t)?t:q$(t)}function J$(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=q$(e),i=r===e.ownerDocument?.body,a=w$(r);if(i){let e=Y$(a);return t.concat(a,a.visualViewport||[],j$(r)?r:[],e&&n?J$(e):[])}return t.concat(r,J$(r,[],n))}function Y$(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X$(e){let t=W$(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=O$(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=FQ(n)!==a||FQ(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Z$(e){return D$(e)?e:e.contextElement}function Q$(e){let t=Z$(e);if(!O$(t))return LQ(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=X$(t),o=(a?FQ(n.width):n.width)/r,s=(a?FQ(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var $$=LQ(0);function e1(e){let t=w$(e);return!V$()||!t.visualViewport?$$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function t1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==w$(e)?!1:t}function n1(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Z$(e),o=LQ(1);t&&(r?D$(r)&&(o=Q$(r)):o=Q$(e));let s=t1(a,n,r)?e1(a):LQ(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=w$(a),t=r&&D$(r)?w$(r):r,n=e,i=Y$(n);for(;i&&r&&t!==n;){let e=Q$(i),t=i.getBoundingClientRect(),r=W$(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=w$(i),i=Y$(n)}}return s$({width:u,height:d,x:c,y:l})}function r1(e,t){let n=G$(e).scrollLeft;return t?t.left+n:n1(T$(e)).left+n}function i1(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-r1(e,n),y:n.top+t.scrollTop}}function a1(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=T$(r),s=t?F$(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=LQ(1),u=LQ(0),d=O$(r);if((d||!d&&!a)&&((C$(r)!==`body`||j$(o))&&(c=G$(r)),O$(r))){let e=n1(r);l=Q$(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?i1(o,c):LQ(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function o1(e){return Array.from(e.getClientRects())}function s1(e){let t=T$(e),n=G$(e),r=e.ownerDocument.body,i=PQ(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=PQ(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+r1(e),s=-n.scrollTop;return W$(r).direction===`rtl`&&(o+=PQ(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var c1=25;function l1(e,t){let n=w$(e),r=T$(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=V$();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=r1(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=c1&&(a-=o)}else l<=c1&&(a+=l);return{width:a,height:o,x:s,y:c}}var u1=new Set([`absolute`,`fixed`]);function d1(e,t){let n=n1(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=O$(e)?Q$(e):LQ(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function f1(e,t,n){let r;if(t===`viewport`)r=l1(e,n);else if(t===`document`)r=s1(T$(e));else if(D$(t))r=d1(t,n);else{let n=e1(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return s$(r)}function p1(e,t){let n=K$(e);return n===t||!D$(n)||U$(n)?!1:W$(n).position===`fixed`||p1(n,t)}function m1(e,t){let n=t.get(e);if(n)return n;let r=J$(e,[],!1).filter(e=>D$(e)&&C$(e)!==`body`),i=null,a=W$(e).position===`fixed`,o=a?K$(e):e;for(;D$(o)&&!U$(o);){let t=W$(o),n=z$(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&u1.has(i.position)||j$(o)&&!n&&p1(e,o))?r=r.filter(e=>e!==o):i=t,o=K$(o)}return t.set(e,r),r}function h1(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?F$(t)?[]:m1(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=f1(t,n,i);return e.top=PQ(r.top,e.top),e.right=NQ(r.right,e.right),e.bottom=NQ(r.bottom,e.bottom),e.left=PQ(r.left,e.left),e},f1(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function g1(e){let{width:t,height:n}=X$(e);return{width:t,height:n}}function _1(e,t,n){let r=O$(t),i=T$(t),a=n===`fixed`,o=n1(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=LQ(0);function l(){c.x=r1(i)}if(r||!r&&!a)if((C$(t)!==`body`||j$(i))&&(s=G$(t)),r){let e=n1(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?i1(i,s):LQ(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function v1(e){return W$(e).position===`static`}function y1(e,t){if(!O$(e)||W$(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return T$(e)===n&&(n=n.ownerDocument.body),n}function b1(e,t){let n=w$(e);if(F$(e))return n;if(!O$(e)){let t=K$(e);for(;t&&!U$(t);){if(D$(t)&&!v1(t))return t;t=K$(t)}return n}let r=y1(e,t);for(;r&&N$(r)&&v1(r);)r=y1(r,t);return r&&U$(r)&&v1(r)&&!z$(r)?n:r||B$(e)||n}var x1=async function(e){let t=this.getOffsetParent||b1,n=this.getDimensions,r=await n(e.floating);return{reference:_1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function S1(e){return W$(e).direction===`rtl`}var C1={convertOffsetParentRelativeRectToViewportRelativeRect:a1,getDocumentElement:T$,getClippingRect:h1,getOffsetParent:b1,getElementRects:x1,getClientRects:o1,getDimensions:g1,getScale:Q$,isElement:D$,isRTL:S1};function w1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function T1(e,t){let n=null,r,i=T$(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=IQ(d),h=IQ(i.clientWidth-(u+f)),g=IQ(i.clientHeight-(d+p)),_=IQ(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:PQ(0,NQ(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!w1(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function E1(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Z$(e),u=i||a?[...l?J$(l):[],...J$(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?T1(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?n1(e):null;c&&g();function g(){let t=n1(e);h&&!w1(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var D1=v$,O1=y$,k1=f$,A1=x$,j1=h$,M1=d$,N1=b$,P1=(e,t,n)=>{let r=new Map,i={platform:C1,...n},a={...i.platform,_c:r};return l$(e,t,{...i,platform:a})},F1=typeof document<`u`?ff:function(){};function I1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!I1(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!I1(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function L1(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function R1(e,t){let n=L1(e);return Math.round(t*n)/n}function z1(e){let t=F(e);return F1(()=>{t.current=e}),t}function B1(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=lf({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=lf(r);I1(f,r)||p(r);let[m,h]=lf(null),[g,_]=lf(null),v=I(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=I(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=F(null),C=F(null),w=F(u),T=c!=null,ee=z1(c),te=z1(i),ne=z1(l),re=I(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};te.current&&(e.platform=te.current),P1(S.current,C.current,e).then(e=>{let t={...e,isPositioned:ne.current!==!1};ie.current&&!I1(w.current,t)&&(w.current=t,wp(()=>{d(t)}))})},[f,t,n,te,ne]);F1(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ie=F(!1);F1(()=>(ie.current=!0,()=>{ie.current=!1}),[]),F1(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(ee.current)return ee.current(b,x,re);re()}},[b,x,re,ee,T]);let ae=mf(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),oe=mf(()=>({reference:b,floating:x}),[b,x]),se=mf(()=>{let e={position:n,left:0,top:0};if(!oe.floating)return e;let t=R1(oe.floating,u.x),r=R1(oe.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...L1(oe.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,oe.floating,u.x,u.y]);return mf(()=>({...u,update:re,refs:ae,elements:oe,floatingStyles:se}),[u,re,ae,oe,se])}var V1=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:M1({element:r.current,padding:i}).fn(n):r?M1({element:r,padding:i}).fn(n):{}}}},H1=(e,t)=>({...D1(e),options:[e,t]}),U1=(e,t)=>({...O1(e),options:[e,t]}),W1=(e,t)=>({...N1(e),options:[e,t]}),G1=(e,t)=>({...k1(e),options:[e,t]}),K1=(e,t)=>({...A1(e),options:[e,t]}),q1=(e,t)=>({...j1(e),options:[e,t]}),J1=(e,t)=>({...V1(e),options:[e,t]}),Y1=`Arrow`,X1=Lf((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return R(KZ.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:R(`polygon`,{points:`0,0 30,0 15,10`})})});X1.displayName=Y1;var Z1=X1;function Q1(e){let[t,n]=lf(void 0);return OQ(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var $1=`Popper`,[e0,t0]=FZ($1),[n0,r0]=e0($1),i0=e=>{let{__scopePopper:t,children:n}=e,[r,i]=lf(null);return R(n0,{scope:t,anchor:r,onAnchorChange:i,children:n})};i0.displayName=$1;var a0=`PopperAnchor`,o0=Lf((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=r0(a0,n),o=F(null),s=$b(t,o),c=F(null);return df(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:R(KZ.div,{...i,ref:s})});o0.displayName=a0;var s0=`PopperContent`,[c0,l0]=e0(s0),u0=Lf((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=r0(s0,n),[_,v]=lf(null),y=$b(t,e=>v(e)),[b,x]=lf(null),S=Q1(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),ee=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},te=Array.isArray(l)?l:[l],ne=te.length>0,re={padding:ee,boundary:te.filter(m0),altBoundary:ne},{refs:ie,floatingStyles:ae,placement:oe,isPositioned:se,middlewareData:E}=B1({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>E1(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[H1({mainAxis:i+w,alignmentAxis:o}),c&&U1({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?W1():void 0,...re}),c&&G1({...re}),K1({...re,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&J1({element:b,padding:s}),h0({arrowWidth:C,arrowHeight:w}),f&&q1({strategy:`referenceHidden`,...re})]}),[ce,le]=g0(oe),ue=JZ(m);OQ(()=>{se&&ue?.()},[se,ue]);let de=E.arrow?.x,fe=E.arrow?.y,pe=E.arrow?.centerOffset!==0,[me,he]=lf();return OQ(()=>{_&&he(window.getComputedStyle(_).zIndex)},[_]),R(`div`,{ref:ie.setFloating,"data-radix-popper-content-wrapper":``,style:{...ae,transform:se?ae.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:me,"--radix-popper-transform-origin":[E.transformOrigin?.x,E.transformOrigin?.y].join(` `),...E.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:R(c0,{scope:n,placedSide:ce,onArrowChange:x,arrowX:de,arrowY:fe,shouldHideArrow:pe,children:R(KZ.div,{"data-side":ce,"data-align":le,...h,ref:y,style:{...h.style,animation:se?void 0:`none`}})})})});u0.displayName=s0;var d0=`PopperArrow`,f0={top:`bottom`,right:`left`,bottom:`top`,left:`right`},p0=Lf(function(e,t){let{__scopePopper:n,...r}=e,i=l0(d0,n),a=f0[i.placedSide];return R(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:R(Z1,{...r,ref:t,style:{...r.style,display:`block`}})})});p0.displayName=d0;function m0(e){return e!==null}var h0=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=g0(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function g0(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var _0=i0,v0=o0,y0=u0,b0=p0,x0=`Portal`,S0=Lf((e,t)=>{let{container:n,...r}=e,[i,a]=lf(!1);OQ(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Tp.createPortal(R(KZ.div,{...r,ref:t}),o):null});S0.displayName=x0;var C0=Mf||OQ;function w0({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=T0({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=F(e!==void 0);df(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,I(t=>{if(s){let n=E0(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function T0({defaultProp:e,onChange:t}){let[n,r]=lf(e),i=F(n),a=F(t);return C0(()=>{a.current=t},[t]),df(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function E0(e){return typeof e==`function`}function D0(e){let t=F({value:e,previous:e});return mf(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var O0=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),k0=`VisuallyHidden`,A0=Lf((e,t)=>R(KZ.span,{...e,ref:t,style:{...O0,...e.style}}));A0.displayName=k0;var j0=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},M0=new WeakMap,N0=new WeakMap,P0={},F0=0,I0=function(e){return e&&(e.host||I0(e.parentNode))},L0=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=I0(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},R0=function(e,t,n,r){var i=L0(t,Array.isArray(e)?e:[e]);P0[n]||(P0[n]=new WeakMap);var a=P0[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(M0.get(e)||0)+1,l=(a.get(e)||0)+1;M0.set(e,c),a.set(e,l),o.push(e),c===1&&i&&N0.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),F0++,function(){o.forEach(function(e){var t=M0.get(e)-1,i=a.get(e)-1;M0.set(e,t),a.set(e,i),t||(N0.has(e)||e.removeAttribute(r),N0.delete(e)),i||e.removeAttribute(n)}),F0--,F0||(M0=new WeakMap,M0=new WeakMap,N0=new WeakMap,P0={})}},z0=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||j0(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),R0(r,i,n,`aria-hidden`)):function(){return null}},B0=function(){return B0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},B0.apply(this,arguments)};function V0(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function H0(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var U0=`right-scroll-bar-position`,W0=`width-before-scroll-bar`,G0=`with-scroll-bars-hidden`,K0=`--removed-body-scroll-bar-size`;function q0(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function J0(e,t){var n=lf(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Y0=typeof window<`u`?ff:df,X0=new WeakMap;function Z0(e,t){var n=J0(t||null,function(t){return e.forEach(function(e){return q0(e,t)})});return Y0(function(){var t=X0.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||q0(e,null)}),i.forEach(function(e){r.has(e)||q0(e,a)})}X0.set(n,e)},[e]),n}function Q0(e){return e}function $0(e,t){t===void 0&&(t=Q0);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function e2(e){e===void 0&&(e={});var t=$0(null);return t.options=B0({async:!0,ssr:!1},e),t}var t2=function(e){var t=e.sideCar,n=V0(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return sd(r,B0({},n))};t2.isSideCarExport=!0;function n2(e,t){return e.useMedium(t),t2}var r2=e2(),i2=function(){},a2=Lf(function(e,t){var n=F(null),r=lf({onScrollCapture:i2,onWheelCapture:i2,onTouchMoveCapture:i2}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=V0(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Z0([n,t]),C=B0(B0({},b),i);return sd(ud,null,u&&sd(x,{sideCar:r2,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?bp(zf.only(s),B0(B0({},C),{ref:S})):sd(v,B0({},C,{className:c,ref:S}),s))});a2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},a2.classNames={fullWidth:W0,zeroRight:U0};var o2,s2=function(){if(o2)return o2;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function c2(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=s2();return t&&e.setAttribute(`nonce`,t),e}function l2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function u2(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var d2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=c2())&&(l2(t,n),u2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},f2=function(){var e=d2();return function(t,n){df(function(){return e.add(t),function(){e.remove()}},[t&&n])}},p2=function(){var e=f2();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},m2={left:0,top:0,right:0,gap:0},h2=function(e){return parseInt(e||``,10)||0},g2=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[h2(n),h2(r),h2(i)]},_2=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return m2;var t=g2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},v2=p2(),y2=`data-scroll-locked`,b2=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
390
|
+
.${G0} {
|
|
391
391
|
overflow: hidden ${r};
|
|
392
392
|
padding-right: ${s}px ${r};
|
|
393
393
|
}
|
|
394
|
-
body[${
|
|
394
|
+
body[${y2}] {
|
|
395
395
|
overflow: hidden ${r};
|
|
396
396
|
overscroll-behavior: contain;
|
|
397
397
|
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
@@ -404,29 +404,29 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
404
404
|
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
-
.${
|
|
407
|
+
.${U0} {
|
|
408
408
|
right: ${s}px ${r};
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
.${
|
|
411
|
+
.${W0} {
|
|
412
412
|
margin-right: ${s}px ${r};
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
.${
|
|
415
|
+
.${U0} .${U0} {
|
|
416
416
|
right: 0 ${r};
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
-
.${
|
|
419
|
+
.${W0} .${W0} {
|
|
420
420
|
margin-right: 0 ${r};
|
|
421
421
|
}
|
|
422
422
|
|
|
423
|
-
body[${
|
|
424
|
-
${
|
|
423
|
+
body[${y2}] {
|
|
424
|
+
${K0}: ${s}px;
|
|
425
425
|
}
|
|
426
|
-
`},
|
|
426
|
+
`},x2=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},S2=function(){df(function(){return document.body.setAttribute(y2,(x2()+1).toString()),function(){var e=x2()-1;e<=0?document.body.removeAttribute(y2):document.body.setAttribute(y2,e.toString())}},[])},C2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;return S2(),sd(v2,{styles:b2(mf(function(){return _2(i)},[i]),!t,i,n?``:`!important`)})},w2=!1;if(typeof window<`u`)try{var T2=Object.defineProperty({},`passive`,{get:function(){return w2=!0,!0}});window.addEventListener(`test`,T2,T2),window.removeEventListener(`test`,T2,T2)}catch{w2=!1}var E2=w2?{passive:!1}:!1,D2=function(e){return e.tagName===`TEXTAREA`},O2=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!D2(e)&&n[t]===`visible`)},k2=function(e){return O2(e,`overflowY`)},A2=function(e){return O2(e,`overflowX`)},j2=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),P2(e,r)){var i=F2(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},M2=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},N2=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},P2=function(e,t){return e===`v`?k2(t):A2(t)},F2=function(e,t){return e===`v`?M2(t):N2(t)},I2=function(e,t){return e===`h`&&t===`rtl`?-1:1},L2=function(e,t,n,r,i){var a=I2(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=F2(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&P2(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},R2=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},z2=function(e){return[e.deltaX,e.deltaY]},B2=function(e){return e&&`current`in e?e.current:e},V2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},H2=function(e){return`
|
|
427
427
|
.block-interactivity-${e} {pointer-events: none;}
|
|
428
428
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
429
|
-
`},V2=0,H2=[];function U2(e){var t=F([]),n=F([0,0]),r=F(),i=lf(V2++)[0],a=lf(d2)[0],o=F(e);df(function(){o.current=e},[e]),df(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=B0([e.lockRef.current],(e.shards||[]).map(R2),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=I(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=I2(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=k2(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=k2(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return F2(h,t,e,h===`h`?s:c,!0)},[]),c=I(function(e){var n=e;if(!(!H2.length||H2[H2.length-1]!==a)){var r=`deltaY`in n?L2(n):I2(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&z2(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(R2).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=I(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:W2(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=I(function(e){n.current=I2(e),r.current=void 0},[]),d=I(function(t){l(t.type,L2(t),t.target,s(t,e.lockRef.current))},[]),f=I(function(t){l(t.type,I2(t),t.target,s(t,e.lockRef.current))},[]);df(function(){return H2.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,w2),document.addEventListener(`touchmove`,c,w2),document.addEventListener(`touchstart`,u,w2),function(){H2=H2.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,w2),document.removeEventListener(`touchmove`,c,w2),document.removeEventListener(`touchstart`,u,w2)}},[]);var p=e.removeScrollBar,m=e.inert;return sd(ud,null,m?sd(a,{styles:B2(i)}):null,p?sd(x2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function W2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var G2=e2(t2,U2),K2=Lf(function(e,t){return sd(r2,R0({},e,{ref:t,sideCar:G2}))});K2.classNames=r2.classNames;var q2=[` `,`Enter`,`ArrowUp`,`ArrowDown`],J2=[` `,`Enter`],Y2=`Select`,[X2,Z2,Q2]=VZ(Y2),[$2,e4]=NZ(Y2,[Q2,$1]),t4=$1(),[n4,r4]=$2(Y2),[i4,a4]=$2(Y2),o4=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=t4(t),[g,_]=lf(null),[v,y]=lf(null),[b,x]=lf(!1),S=UZ(l),[C,w]=S0({prop:r,defaultProp:i??!1,onChange:a,caller:Y2}),[T,ee]=S0({prop:o,defaultProp:s,onChange:c,caller:Y2}),te=F(null),ne=g?m||!!g.closest(`form`):!0,[re,ie]=lf(new Set),ae=Array.from(re).map(e=>e.props.value).join(`;`);return R(h0,{...h,children:R(n4,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:kQ(),value:T,onValueChange:ee,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:te,disabled:f,children:[R(X2.Provider,{scope:t,children:R(i4,{scope:e.__scopeSelect,onNativeOptionAdd:I(e=>{ie(t=>new Set(t).add(e))},[]),onNativeOptionRemove:I(e=>{ie(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),ne?R(t3,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>ee(e.target.value),disabled:f,form:m,children:[T===void 0?R(`option`,{value:``}):null,Array.from(re)]},ae):null]})})};o4.displayName=Y2;var s4=`SelectTrigger`,c4=Lf((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=t4(n),o=r4(s4,n),s=o.disabled||r,c=$b(t,o.onTriggerChange),l=Z2(n),u=F(`touch`),[d,f,p]=r3(e=>{let t=l().filter(e=>!e.disabled),n=i3(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return R(g0,{asChild:!0,...a,children:R(WZ.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":n3(o.value)?``:void 0,...i,ref:c,onClick:MZ(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:MZ(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:MZ(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&q2.includes(e.key)&&(m(),e.preventDefault())})})})});c4.displayName=s4;var l4=`SelectValue`,u4=Lf((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=r4(l4,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=$b(t,c.onValueNodeChange);return EQ(()=>{l(u)},[l,u]),R(WZ.span,{...s,ref:d,style:{pointerEvents:`none`},children:n3(c.value)?R(ud,{children:o}):a})});u4.displayName=l4;var d4=`SelectIcon`,f4=Lf((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return R(WZ.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});f4.displayName=d4;var p4=`SelectPortal`,m4=e=>R(b0,{asChild:!0,...e});m4.displayName=p4;var h4=`SelectContent`,g4=Lf((e,t)=>{let n=r4(h4,e.__scopeSelect),[r,i]=lf();if(EQ(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Zf(R(v4,{scope:e.__scopeSelect,children:R(X2.Slot,{scope:e.__scopeSelect,children:R(`div`,{children:e.children})})}),t):null}return R(S4,{...e,ref:t})});g4.displayName=h4;var _4=10,[v4,y4]=$2(h4),b4=`SelectContentImpl`,x4=FZ(`SelectContent.RemoveScroll`),S4=Lf((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=r4(h4,n),[y,b]=lf(null),[x,S]=lf(null),C=$b(t,e=>b(e)),[w,T]=lf(null),[ee,te]=lf(null),ne=Z2(n),[re,ie]=lf(!1),ae=F(!1);df(()=>{if(y)return L0(y)},[y]),cQ();let oe=I(e=>{let[t,...n]=ne().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[ne,x]),se=I(()=>oe([w,y]),[oe,w,y]);df(()=>{re&&se()},[re,se]);let{onOpenChange:E,triggerPointerDownPosRef:ce}=v;df(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ce.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ce.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||E(!1),document.removeEventListener(`pointermove`,t),ce.current=null};return ce.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,E,ce]),df(()=>{let e=()=>E(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[E]);let[le,ue]=r3(e=>{let t=ne().filter(e=>!e.disabled),n=i3(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),de=I((e,t,n)=>{let r=!ae.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(ae.current=!0))},[v.value]),fe=I(()=>y?.focus(),[y]),pe=I((e,t,n)=>{let r=!ae.current&&!n;(v.value!==void 0&&v.value===t||r)&&te(e)},[v.value]),me=r===`popper`?E4:w4,he=me===E4?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return R(v4,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:de,selectedItem:w,onItemLeave:fe,itemTextRefCallback:pe,focusSelectedItem:se,selectedItemText:ee,position:r,isPositioned:re,searchRef:le,children:R(K2,{as:x4,allowPinchZoom:!0,children:R(mQ,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:MZ(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:R(eQ,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:R(me,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...he,onPlaced:()=>ie(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:MZ(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ue(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=ne().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>oe(t)),e.preventDefault()}})})})})})})});S4.displayName=b4;var C4=`SelectItemAlignedPosition`,w4=Lf((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=r4(h4,n),o=y4(h4,n),[s,c]=lf(null),[l,u]=lf(null),d=$b(t,e=>u(e)),f=Z2(n),p=F(!1),m=F(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=I(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-_4,d=jZ(a,[_4,Math.max(_4,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-_4,d=jZ(a,[_4,Math.max(_4,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-_4*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),ee=e.top+e.height/2-_4,te=c-ee,ne=g.offsetHeight/2,re=g.offsetTop+ne,ie=m+v+re,ae=x-ie;if(ie<=ee){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=ie+Math.max(te,ne+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(ee,m+h.offsetTop+(e?w:0)+ne)+ae;s.style.height=t+`px`,h.scrollTop=ie-ee+h.offsetTop}s.style.margin=`${_4}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);EQ(()=>y(),[y]);let[b,x]=lf();return EQ(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),R(D4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:I(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:R(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:R(WZ.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});w4.displayName=C4;var T4=`SelectPopperPosition`,E4=Lf((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=_4,...a}=e;return R(_0,{...t4(n),...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});E4.displayName=T4;var[D4,O4]=$2(h4,{}),k4=`SelectViewport`,A4=Lf((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=y4(k4,n),o=O4(k4,n),s=$b(t,a.onViewportChange),c=F(0);return R(ud,{children:[R(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),R(X2.Slot,{scope:n,children:R(WZ.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:MZ(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-_4*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});A4.displayName=k4;var j4=`SelectGroup`,[M4,N4]=$2(j4),P4=Lf((e,t)=>{let{__scopeSelect:n,...r}=e,i=kQ();return R(M4,{scope:n,id:i,children:R(WZ.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});P4.displayName=j4;var F4=`SelectLabel`,I4=Lf((e,t)=>{let{__scopeSelect:n,...r}=e,i=N4(F4,n);return R(WZ.div,{id:i.id,...r,ref:t})});I4.displayName=F4;var L4=`SelectItem`,[R4,z4]=$2(L4),B4=Lf((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=r4(L4,n),c=y4(L4,n),l=s.value===r,[u,d]=lf(a??``),[f,p]=lf(!1),m=$b(t,e=>c.itemRefCallback?.(e,r,i)),h=kQ(),g=F(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return R(R4,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:I(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:R(X2.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:R(WZ.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:MZ(o.onFocus,()=>p(!0)),onBlur:MZ(o.onBlur,()=>p(!1)),onClick:MZ(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:MZ(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:MZ(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:MZ(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:MZ(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:MZ(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(J2.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});B4.displayName=L4;var V4=`SelectItemText`,H4=Lf((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=r4(V4,n),s=y4(V4,n),c=z4(V4,n),l=a4(V4,n),[u,d]=lf(null),f=$b(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=mf(()=>R(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return EQ(()=>(h(m),()=>g(m)),[h,g,m]),R(ud,{children:[R(WZ.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Zf(a.children,o.valueNode):null]})});H4.displayName=V4;var U4=`SelectItemIndicator`,W4=Lf((e,t)=>{let{__scopeSelect:n,...r}=e;return z4(U4,n).isSelected?R(WZ.span,{"aria-hidden":!0,...r,ref:t}):null});W4.displayName=U4;var G4=`SelectScrollUpButton`,K4=Lf((e,t)=>{let n=y4(G4,e.__scopeSelect),r=O4(G4,e.__scopeSelect),[i,a]=lf(!1),o=$b(t,r.onScrollButtonChange);return EQ(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?R(Y4,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});K4.displayName=G4;var q4=`SelectScrollDownButton`,J4=Lf((e,t)=>{let n=y4(q4,e.__scopeSelect),r=O4(q4,e.__scopeSelect),[i,a]=lf(!1),o=$b(t,r.onScrollButtonChange);return EQ(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?R(Y4,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});J4.displayName=q4;var Y4=Lf((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=y4(`SelectScrollButton`,n),o=F(null),s=Z2(n),c=I(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return df(()=>()=>c(),[c]),EQ(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),R(WZ.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:MZ(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:MZ(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:MZ(i.onPointerLeave,()=>{c()})})}),X4=`SelectSeparator`,Z4=Lf((e,t)=>{let{__scopeSelect:n,...r}=e;return R(WZ.div,{"aria-hidden":!0,...r,ref:t})});Z4.displayName=X4;var Q4=`SelectArrow`,$4=Lf((e,t)=>{let{__scopeSelect:n,...r}=e,i=t4(n),a=r4(Q4,n),o=y4(Q4,n);return a.open&&o.position===`popper`?R(v0,{...i,...r,ref:t}):null});$4.displayName=Q4;var e3=`SelectBubbleInput`,t3=Lf(({__scopeSelect:e,value:t,...n},r)=>{let i=F(null),a=$b(r,i),o=T0(t);return df(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),R(WZ.select,{...n,style:{...E0,...n.style},ref:a,defaultValue:t})});t3.displayName=e3;function n3(e){return e===``||e===void 0}function r3(e){let t=KZ(e),n=F(``),r=F(0),i=I(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=I(()=>{n.current=``,window.clearTimeout(r.current)},[]);return df(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function i3(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=a3(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function a3(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var o3=o4,s3=c4,c3=f4,l3=m4,u3=g4,d3=A4,f3=B4,p3=H4,m3=W4,h3=K4,g3=J4,_3={sm:`w-4 h-4`,md:`w-6 h-6`};function v3({size:e=`md`,flagCode:t,className:n,...r}){return R(`img`,{className:vx(`rounded-full object-cover`,_3[e],n),src:`https://storage.googleapis.com/eleven-public-cdn/images/flags/circle-flags/${t}.svg`,alt:`${t.toUpperCase()} flag`,...r})}function y3({children:e,...t}){let[n,r]=lf(!1),{language:i,setLanguage:a,options:o}=Tg(),s=Wb();return R(o3,{open:n,value:i.value.languageCode,onValueChange:e=>{a(e),r(!1)},onOpenChange:e=>{e&&r(!0)},children:[e,R(l3,{container:s,children:R(u3,{className:`overflow-hidden bg-base border border-base-border rounded-dropdown-sheet max-h-[min(384px,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] z-10`,position:`popper`,sideOffset:8,align:`end`,side:`top`,onPointerDownOutside:()=>r(!1),onCloseAutoFocus:()=>r(!1),onEscapeKeyDown:()=>r(!1),...t,children:[R(h3,{className:`flex items-center justify-center h-6 bg-base text-base-subtle cursor-default`,children:R(JS,{size:`xs`,name:`chevron-up`})}),R(d3,{className:`p-1.5`,children:o.value.map(e=>R(f3,{value:e.languageCode,className:`flex select-none items-center p-1.5 pr-3 gap-2 cursor-pointer rounded-input relative focus-visible:outline-hidden data-highlighted:bg-base-active text-sm`,children:[R(v3,{flagCode:e.flagCode}),R(p3,{children:e.name}),R(m3,{className:`text-base-primary p-1.5 -mr-1.5 ml-auto`,children:R(JS,{size:`xs`,name:`check`})})]},e.languageCode))}),R(g3,{className:`flex items-center justify-center h-6 bg-base text-base-subtle cursor-default`,children:R(JS,{size:`xs`,name:`chevron-down`})})]})})]})}function b3({className:e,...t}){let n=Rb(),{language:r,showPicker:i}=Tg();return i.value?R(y3,{align:`center`,children:R(s3,{className:vx(`h-9 min-w-max rounded-button focus-ring px-2 flex gap-2 items-center text-base-primary bg-base hover:bg-base-hover active:bg-base-active font-medium`,e),"aria-label":n.change_language,...t,children:[R(v3,{size:`sm`,flagCode:r.value.flagCode}),r.value.name,R(c3,{className:`text-base-subtle`,asChild:!0,children:R(JS,{size:`xs`,name:`chevron-down`})})]})}):null}function x3({className:e,...t}){let{status:n,isSpeaking:r}=ab(),i=mb(),{isTextMode:a}=Mb(),o=Rb(),s=L(()=>n.value===`connected`?i.value||a.value?o.chatting_status.value:r.value?o.speaking_status.value:o.listening_status.value:o.connecting_status.value),[c,l]=lf(s.peek());return hm(()=>{let e=s.value;if(n.value===`connected`&&r.value)l(e);else{let t=setTimeout(()=>{l(e)},500);return()=>clearTimeout(t)}}),R(`div`,{className:vx(`py-1.5 px-3 bg-base-active overflow-hidden rounded-bubble text-sm`,e),...t,children:R(mx,{initial:!1,active:!0,children:R(`div`,{className:`animate-text whitespace-nowrap transition-[opacity,transform] ease-out duration-200 data-hidden:opacity-0 transform data-hidden:translate-y-2`,children:c})},c)})}var S3=Fd(void 0),C3=768;function w3({children:e,initialVariant:t=`compact`}){let n=cm(t!==`compact`),r=cm(typeof window<`u`?window.innerWidth<C3:!1);df(()=>{let e=()=>{r.value=window.innerWidth<C3};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let i=I(()=>{n.value=!n.value},[n]),a=L(()=>n.value?r.value?`fullscreen`:`expanded`:`compact`),o=mf(()=>({variant:a,toggleSize:i}),[a,i]);return R(S3.Provider,{value:o,children:e})}function T3(){return cg(S3)}function E3(e){let t=Rb(),{mode:n,setMode:r,isTextMode:i}=Mb(),a=I(()=>{r(n.peek()===`text`?`voice`:`text`)},[r,n]);return R(yC,{"aria-label":i.value?t.voice_mode:t.text_mode,icon:i.value?`soundwave`:`chat`,onClick:a,...e})}function D3({showBackButton:e,onBackClick:t,showStatusLabel:n,showLanguageSelector:r,showConversationModeToggle:i,showExpandButton:a}){let o=Rb(),{toggleSize:s,variant:c}=T3(),l=L(()=>c.value===`compact`?`Expand widget`:`Collapse widget`);return R(`div`,{className:`w-full relative shrink-0 z-10`,children:[R(`div`,{className:`h-16 absolute top-0 w-full bg-base`}),R(`div`,{className:`h-4 absolute top-16 w-full bg-gradient-to-b from-base to-transparent backdrop-blur-[1px] [mask-image:linear-gradient(to_bottom,black,transparent)] shadow-scroll-fade-bottom`}),R(`div`,{className:`h-16 top-0 absolute flex flex-row items-center justify-center w-full`,children:[R(`div`,{className:`absolute start-3 flex gap-2 items-center`,children:[e?R(yC,{variant:`ghost`,onClick:t,"aria-label":o.go_back,className:`h-8 w-8`,children:R(JS,{name:`chevron-up`,className:`-rotate-90`,size:`xs`})}):R(`div`,{className:`relative w-8 h-8`}),R(mx,{active:n,children:R(x3,{className:`transition-opacity data-hidden:opacity-0`})})]}),R(`div`,{className:`absolute flex flex-row items-center gap-2 ms-auto end-3`,children:[R(mx,{active:r,children:R(`div`,{className:`transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:-translate-y-4`,children:R(b3,{})})}),R(mx,{active:i,children:R(E3,{variant:`ghost`,className:`h-8 w-8 transition-opacity data-hidden:opacity-0`})}),R(mx,{active:a,children:R(yC,{variant:`ghost`,onClick:s,"aria-label":l,className:`h-8 w-8 transition-opacity data-hidden:opacity-0`,children:R(JS,{name:c.value===`compact`?`maximize`:`minimize`,size:`sm`})})})]})]})]})}function O3({iconOnly:e,isDisconnected:t,children:n,...r}){let{endSession:i,startSession:a}=ab(),o=Rb();return R(yC,{variant:t?`primary`:`secondary`,icon:t?`phone`:`phone-off`,onClick:t?e=>a(e.currentTarget):i,"aria-label":t?o.start_call:o.end_call,...r,children:e?void 0:n??(t?o.start_call:o.end_call)})}function k3(e){let t=Rb(),{isMuted:n,isMutingEnabled:r,setIsMuted:i}=Fb(),a=I(()=>{i(!n.peek())},[i]);return r.value?R(yC,{"aria-label":t.mute_microphone,"aria-pressed":n.value,icon:n.value?`mic-off`:`mic`,onClick:a,...e}):null}function A3({iconOnly:e,disabled:t,onFileSelect:n,children:r,...i}){let a=Rb(),o=F(null),s=I(e=>{e.stopPropagation(),o.current?.click()},[]),c=I(e=>{let t=e.target,r=t.files?.[0];r&&n(r),t.value=``},[n]);return R(ud,{children:[R(yC,{variant:`secondary`,icon:`paperclip`,onClick:s,disabled:t,"aria-label":a.attach_file,...i,children:e?void 0:r??a.attach_file}),R(`input`,{ref:o,type:`file`,accept:aZ.join(`,`),className:`hidden`,onChange:c})]})}function j3({pendingFile:e,onRemove:t}){let n=Rb(),r=cZ(e.file.type),i=e.status===`uploading`,a=e.status===`error`;return R(`div`,{className:zS(`relative inline-flex items-center gap-2 rounded-input border py-1.5 pl-1.5 pr-7 overflow-hidden`,a?`border-base-error/30 bg-base-error/5`:`border-base-border/60 bg-base-active/40`),children:[r&&e.previewUrl?R(`img`,{src:e.previewUrl,alt:e.file.name,className:`h-11 w-11 rounded-input object-cover shrink-0 bg-base-active`}):R(`div`,{className:`flex h-11 w-11 items-center justify-center rounded-input bg-base-active shrink-0`,children:R(M3,{})}),R(`div`,{className:`flex flex-col min-w-0 max-w-[220px]`,children:[R(`span`,{className:`text-sm text-base-primary truncate`,children:e.file.name}),a&&R(`span`,{className:`text-xs text-base-error break-words`,children:e.error||n.file_upload_error.value})]}),i&&R(JS,{name:`loader`,size:`sm`,className:`animate-spin text-base-subtle shrink-0`}),R(`button`,{type:`button`,onClick:t,"aria-label":n.remove_file.value,className:`absolute right-1.5 top-1/2 -translate-y-1/2 !mt-0 text-base-subtle hover:text-base-primary transition-colors`,children:R(JS,{name:`x`,size:`sm`})})]})}function M3(){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`22`,height:`22`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`,className:`text-base-subtle`,children:[R(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),R(`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`}),R(`path`,{d:`M10 9H8`}),R(`path`,{d:`M16 13H8`}),R(`path`,{d:`M16 17H8`})]})}function N3({showTranscript:e,scrollPinned:t}){let n=gb(),r=vb(),i=yb(),a=cm(``),o=cm(!1),s=Rb(),{isDisconnected:c,status:l,lastId:u,startSession:d,sendUserMessage:f,sendMultimodalMessage:p}=ab(),m=cm(null);hm(()=>{if(!m.value)return;let e=setTimeout(()=>{m.value=null},4e3);return()=>clearTimeout(e)});let{pendingFile:h,isUploading:g,hasReachedLimit:_,addFile:v,removeFile:y,markFileAsSent:b}=pZ({conversationId:l.value===`connected`?u.value:null,maxFiles:i.value}),x=L(()=>r.value&&n.value&&!c.value),S=L(()=>!h.value&&!_.value&&l.value===`connected`),C=I(e=>{let t=v(e);if(t){if(t===`unsupported_type`){m.value=`${s.file_type_unsupported.peek()} ${aZ.join(`, `)}.`;return}m.value={too_large:s.file_too_large,limit_reached:s.file_limit_reached}[t].peek()}},[v,s,m]),w=L(()=>{let e=!!a.value.trim(),t=h.value?.status===`ready`;return(e||t)&&!g.value}),T=I(async e=>{if(e.preventDefault(),!w.peek())return;let n=a.value.trim(),r=h.value;if(r?.status===`ready`&&!c.value){t.value=!0,p({text:n||void 0,file:{fileId:r.fileId,fileName:r.file.name,mimeType:r.file.type,previewUrl:r.previewUrl}}),b(),a.value=``;return}n&&(t.value=!0,a.value=``,c.value?await d(e.currentTarget,n):f(n))},[a,t,c,d,f,p,h,b,w]);return R(`div`,{className:`sticky bottom-0 pointer-events-none z-10 max-h-[50%] flex flex-col`,children:[R(`div`,{className:`absolute top-0 left-0 right-0 h-4 -translate-y-full bg-gradient-to-t from-base to-transparent pointer-events-none backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black,transparent)] shadow-scroll-fade-top`}),R(`div`,{className:`relative w-full px-3 pb-3 flex flex-col items-center pointer-events-auto min-h-0`,children:[m.value&&R(`div`,{className:`w-full px-1 pb-1.5 text-xs text-base-error text-center`,children:m.value}),n.value&&R(`div`,{className:zS(`bg-base relative flex flex-col min-h-0 rounded-[calc(var(--el-sheet-radius)-8px)] border border-base-border w-full transition-shadow overflow-hidden`,o.value&&`ring-2 ring-accent`),children:[h.value&&R(`div`,{className:`px-3 pt-3`,children:R(j3,{pendingFile:h.value,onRemove:y})}),R(P3,{userMessage:a,isFocused:o,canSend:w,onSendMessage:T}),R(`div`,{className:`absolute bottom-0 left-0 right-0 flex gap-1.5 items-center justify-end px-3 pb-3 pt-2 pointer-events-none`,children:R(`div`,{className:`pointer-events-auto flex gap-1.5 items-center`,children:R(F3,{canSend:w,onSendMessage:T,showTranscript:e,showUploadButton:x,uploadEnabled:S,onFileSelect:C})})})]}),!n.value&&R(`div`,{className:`w-full flex gap-1.5 items-center justify-end`,children:R(F3,{canSend:w,onSendMessage:T,showTranscript:e,showUploadButton:x,uploadEnabled:S,onFileSelect:C})})]})]})}function P3({userMessage:e,isFocused:t,canSend:n,onSendMessage:r}){let i=Rb(),a=mb(),{isDisconnected:o,conversationIndex:s,sendUserActivity:c}=ab(),{pendingInputFocus:l}=GS(),u=F(null);hm(()=>{l.value&&=(u.current?.focus(),!1)});let d=I(t=>{e.value=t.currentTarget.value},[e]),f=I(async e=>{e.isComposing||e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),n.peek()&&await r(e))},[r,n]),p=I(()=>{t.value=!0},[t]),m=I(()=>{t.value=!1},[t]);return R(`textarea`,{ref:u,"aria-label":i.input_label,value:e.value,onInput:c,onChange:d,onKeyDown:f,onFocus:p,onBlur:m,placeholder:a.value?o.value&&s.value>0?i.input_placeholder_new_conversation.value:i.input_placeholder_text_only.value:i.input_placeholder.value,className:`w-full h-full resize-none bg-base leading-5 outline-hidden text-sm text-base-primary placeholder:text-base-subtle p-3 pb-[60px] max-h-full field-sizing-content`})}function F3({canSend:e,onSendMessage:t,showTranscript:n=!1,showUploadButton:r,uploadEnabled:i,onFileSelect:a}){let o=Rb(),s=mb(),c=gb(),{isDisconnected:l}=ab(),u=ob(),{isTextMode:d}=Mb(),f=L(()=>!l.value||!s.value&&n);return R(ud,{children:[R(hC,{visible:L(()=>!s.value&&!l.value&&!d.value).value,children:R(k3,{className:`bg-base text-base-primary hover:bg-base-hover active:bg-base-active`})}),R(hC,{visible:r.value,children:R(A3,{iconOnly:!0,disabled:!i.value,onFileSelect:a,className:`bg-base text-base-primary hover:bg-base-hover active:bg-base-active`})}),R(hC,{visible:f.value,children:R(O3,{iconOnly:!0,isDisconnected:l.value,disabled:u.value,className:`bg-base text-base-primary hover:bg-base-hover active:bg-base-active`})}),c.value&&R(yC,{icon:`send`,onClick:t,variant:`primary`,disabled:!e.value,"aria-label":o.send_message.value})]})}var I3=`#version 300 es
|
|
429
|
+
`},U2=0,W2=[];function G2(e){var t=F([]),n=F([0,0]),r=F(),i=lf(U2++)[0],a=lf(p2)[0],o=F(e);df(function(){o.current=e},[e]),df(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=H0([e.lockRef.current],(e.shards||[]).map(B2),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=I(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=R2(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=j2(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=j2(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return L2(h,t,e,h===`h`?s:c,!0)},[]),c=I(function(e){var n=e;if(!(!W2.length||W2[W2.length-1]!==a)){var r=`deltaY`in n?z2(n):R2(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&V2(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(B2).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=I(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:K2(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=I(function(e){n.current=R2(e),r.current=void 0},[]),d=I(function(t){l(t.type,z2(t),t.target,s(t,e.lockRef.current))},[]),f=I(function(t){l(t.type,R2(t),t.target,s(t,e.lockRef.current))},[]);df(function(){return W2.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,E2),document.addEventListener(`touchmove`,c,E2),document.addEventListener(`touchstart`,u,E2),function(){W2=W2.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,E2),document.removeEventListener(`touchmove`,c,E2),document.removeEventListener(`touchstart`,u,E2)}},[]);var p=e.removeScrollBar,m=e.inert;return sd(ud,null,m?sd(a,{styles:H2(i)}):null,p?sd(C2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function K2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var q2=n2(r2,G2),J2=Lf(function(e,t){return sd(a2,B0({},e,{ref:t,sideCar:q2}))});J2.classNames=a2.classNames;var Y2=[` `,`Enter`,`ArrowUp`,`ArrowDown`],X2=[` `,`Enter`],Z2=`Select`,[Q2,$2,e4]=UZ(Z2),[t4,n4]=FZ(Z2,[e4,t0]),r4=t0(),[i4,a4]=t4(Z2),[o4,s4]=t4(Z2),c4=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=r4(t),[g,_]=lf(null),[v,y]=lf(null),[b,x]=lf(!1),S=GZ(l),[C,w]=w0({prop:r,defaultProp:i??!1,onChange:a,caller:Z2}),[T,ee]=w0({prop:o,defaultProp:s,onChange:c,caller:Z2}),te=F(null),ne=g?m||!!g.closest(`form`):!0,[re,ie]=lf(new Set),ae=Array.from(re).map(e=>e.props.value).join(`;`);return R(_0,{...h,children:R(i4,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:jQ(),value:T,onValueChange:ee,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:te,disabled:f,children:[R(Q2.Provider,{scope:t,children:R(o4,{scope:e.__scopeSelect,onNativeOptionAdd:I(e=>{ie(t=>new Set(t).add(e))},[]),onNativeOptionRemove:I(e=>{ie(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),ne?R(r3,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>ee(e.target.value),disabled:f,form:m,children:[T===void 0?R(`option`,{value:``}):null,Array.from(re)]},ae):null]})})};c4.displayName=Z2;var l4=`SelectTrigger`,u4=Lf((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=r4(n),o=a4(l4,n),s=o.disabled||r,c=$b(t,o.onTriggerChange),l=$2(n),u=F(`touch`),[d,f,p]=a3(e=>{let t=l().filter(e=>!e.disabled),n=o3(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return R(v0,{asChild:!0,...a,children:R(KZ.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":i3(o.value)?``:void 0,...i,ref:c,onClick:PZ(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:PZ(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:PZ(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Y2.includes(e.key)&&(m(),e.preventDefault())})})})});u4.displayName=l4;var d4=`SelectValue`,f4=Lf((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=a4(d4,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=$b(t,c.onValueNodeChange);return OQ(()=>{l(u)},[l,u]),R(KZ.span,{...s,ref:d,style:{pointerEvents:`none`},children:i3(c.value)?R(ud,{children:o}):a})});f4.displayName=d4;var p4=`SelectIcon`,m4=Lf((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return R(KZ.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});m4.displayName=p4;var h4=`SelectPortal`,g4=e=>R(S0,{asChild:!0,...e});g4.displayName=h4;var _4=`SelectContent`,v4=Lf((e,t)=>{let n=a4(_4,e.__scopeSelect),[r,i]=lf();if(OQ(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Zf(R(b4,{scope:e.__scopeSelect,children:R(Q2.Slot,{scope:e.__scopeSelect,children:R(`div`,{children:e.children})})}),t):null}return R(w4,{...e,ref:t})});v4.displayName=_4;var y4=10,[b4,x4]=t4(_4),S4=`SelectContentImpl`,C4=LZ(`SelectContent.RemoveScroll`),w4=Lf((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=a4(_4,n),[y,b]=lf(null),[x,S]=lf(null),C=$b(t,e=>b(e)),[w,T]=lf(null),[ee,te]=lf(null),ne=$2(n),[re,ie]=lf(!1),ae=F(!1);df(()=>{if(y)return z0(y)},[y]),uQ();let oe=I(e=>{let[t,...n]=ne().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[ne,x]),se=I(()=>oe([w,y]),[oe,w,y]);df(()=>{re&&se()},[re,se]);let{onOpenChange:E,triggerPointerDownPosRef:ce}=v;df(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ce.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ce.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||E(!1),document.removeEventListener(`pointermove`,t),ce.current=null};return ce.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,E,ce]),df(()=>{let e=()=>E(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[E]);let[le,ue]=a3(e=>{let t=ne().filter(e=>!e.disabled),n=o3(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),de=I((e,t,n)=>{let r=!ae.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(ae.current=!0))},[v.value]),fe=I(()=>y?.focus(),[y]),pe=I((e,t,n)=>{let r=!ae.current&&!n;(v.value!==void 0&&v.value===t||r)&&te(e)},[v.value]),me=r===`popper`?O4:E4,he=me===O4?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return R(b4,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:de,selectedItem:w,onItemLeave:fe,itemTextRefCallback:pe,focusSelectedItem:se,selectedItemText:ee,position:r,isPositioned:re,searchRef:le,children:R(J2,{as:C4,allowPinchZoom:!0,children:R(gQ,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:PZ(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:R(nQ,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:R(me,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...he,onPlaced:()=>ie(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:PZ(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ue(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=ne().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>oe(t)),e.preventDefault()}})})})})})})});w4.displayName=S4;var T4=`SelectItemAlignedPosition`,E4=Lf((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=a4(_4,n),o=x4(_4,n),[s,c]=lf(null),[l,u]=lf(null),d=$b(t,e=>u(e)),f=$2(n),p=F(!1),m=F(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=I(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-y4,d=NZ(a,[y4,Math.max(y4,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-y4,d=NZ(a,[y4,Math.max(y4,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-y4*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),ee=e.top+e.height/2-y4,te=c-ee,ne=g.offsetHeight/2,re=g.offsetTop+ne,ie=m+v+re,ae=x-ie;if(ie<=ee){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=ie+Math.max(te,ne+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(ee,m+h.offsetTop+(e?w:0)+ne)+ae;s.style.height=t+`px`,h.scrollTop=ie-ee+h.offsetTop}s.style.margin=`${y4}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);OQ(()=>y(),[y]);let[b,x]=lf();return OQ(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),R(k4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:I(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:R(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:R(KZ.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});E4.displayName=T4;var D4=`SelectPopperPosition`,O4=Lf((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=y4,...a}=e;return R(y0,{...r4(n),...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});O4.displayName=D4;var[k4,A4]=t4(_4,{}),j4=`SelectViewport`,M4=Lf((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=x4(j4,n),o=A4(j4,n),s=$b(t,a.onViewportChange),c=F(0);return R(ud,{children:[R(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),R(Q2.Slot,{scope:n,children:R(KZ.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:PZ(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-y4*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});M4.displayName=j4;var N4=`SelectGroup`,[P4,F4]=t4(N4),I4=Lf((e,t)=>{let{__scopeSelect:n,...r}=e,i=jQ();return R(P4,{scope:n,id:i,children:R(KZ.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});I4.displayName=N4;var L4=`SelectLabel`,R4=Lf((e,t)=>{let{__scopeSelect:n,...r}=e,i=F4(L4,n);return R(KZ.div,{id:i.id,...r,ref:t})});R4.displayName=L4;var z4=`SelectItem`,[B4,V4]=t4(z4),H4=Lf((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=a4(z4,n),c=x4(z4,n),l=s.value===r,[u,d]=lf(a??``),[f,p]=lf(!1),m=$b(t,e=>c.itemRefCallback?.(e,r,i)),h=jQ(),g=F(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return R(B4,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:I(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:R(Q2.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:R(KZ.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:PZ(o.onFocus,()=>p(!0)),onBlur:PZ(o.onBlur,()=>p(!1)),onClick:PZ(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:PZ(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:PZ(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:PZ(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:PZ(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:PZ(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(X2.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});H4.displayName=z4;var U4=`SelectItemText`,W4=Lf((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=a4(U4,n),s=x4(U4,n),c=V4(U4,n),l=s4(U4,n),[u,d]=lf(null),f=$b(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=mf(()=>R(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return OQ(()=>(h(m),()=>g(m)),[h,g,m]),R(ud,{children:[R(KZ.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Zf(a.children,o.valueNode):null]})});W4.displayName=U4;var G4=`SelectItemIndicator`,K4=Lf((e,t)=>{let{__scopeSelect:n,...r}=e;return V4(G4,n).isSelected?R(KZ.span,{"aria-hidden":!0,...r,ref:t}):null});K4.displayName=G4;var q4=`SelectScrollUpButton`,J4=Lf((e,t)=>{let n=x4(q4,e.__scopeSelect),r=A4(q4,e.__scopeSelect),[i,a]=lf(!1),o=$b(t,r.onScrollButtonChange);return OQ(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?R(Z4,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});J4.displayName=q4;var Y4=`SelectScrollDownButton`,X4=Lf((e,t)=>{let n=x4(Y4,e.__scopeSelect),r=A4(Y4,e.__scopeSelect),[i,a]=lf(!1),o=$b(t,r.onScrollButtonChange);return OQ(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?R(Z4,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});X4.displayName=Y4;var Z4=Lf((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=x4(`SelectScrollButton`,n),o=F(null),s=$2(n),c=I(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return df(()=>()=>c(),[c]),OQ(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),R(KZ.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:PZ(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:PZ(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:PZ(i.onPointerLeave,()=>{c()})})}),Q4=`SelectSeparator`,$4=Lf((e,t)=>{let{__scopeSelect:n,...r}=e;return R(KZ.div,{"aria-hidden":!0,...r,ref:t})});$4.displayName=Q4;var e3=`SelectArrow`,t3=Lf((e,t)=>{let{__scopeSelect:n,...r}=e,i=r4(n),a=a4(e3,n),o=x4(e3,n);return a.open&&o.position===`popper`?R(b0,{...i,...r,ref:t}):null});t3.displayName=e3;var n3=`SelectBubbleInput`,r3=Lf(({__scopeSelect:e,value:t,...n},r)=>{let i=F(null),a=$b(r,i),o=D0(t);return df(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),R(KZ.select,{...n,style:{...O0,...n.style},ref:a,defaultValue:t})});r3.displayName=n3;function i3(e){return e===``||e===void 0}function a3(e){let t=JZ(e),n=F(``),r=F(0),i=I(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=I(()=>{n.current=``,window.clearTimeout(r.current)},[]);return df(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function o3(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=s3(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function s3(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var c3=c4,l3=u4,u3=m4,d3=g4,f3=v4,p3=M4,m3=H4,h3=W4,g3=K4,_3=J4,v3=X4,y3={sm:`w-4 h-4`,md:`w-6 h-6`};function b3({size:e=`md`,flagCode:t,className:n,...r}){return R(`img`,{className:vx(`rounded-full object-cover`,y3[e],n),src:`https://storage.googleapis.com/eleven-public-cdn/images/flags/circle-flags/${t}.svg`,alt:`${t.toUpperCase()} flag`,...r})}function x3({children:e,...t}){let[n,r]=lf(!1),{language:i,setLanguage:a,options:o}=Tg(),s=Wb();return R(c3,{open:n,value:i.value.languageCode,onValueChange:e=>{a(e),r(!1)},onOpenChange:e=>{e&&r(!0)},children:[e,R(d3,{container:s,children:R(f3,{className:`overflow-hidden bg-base border border-base-border rounded-dropdown-sheet max-h-[min(384px,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] z-10`,position:`popper`,sideOffset:8,align:`end`,side:`top`,onPointerDownOutside:()=>r(!1),onCloseAutoFocus:()=>r(!1),onEscapeKeyDown:()=>r(!1),...t,children:[R(_3,{className:`flex items-center justify-center h-6 bg-base text-base-subtle cursor-default`,children:R(JS,{size:`xs`,name:`chevron-up`})}),R(p3,{className:`p-1.5`,children:o.value.map(e=>R(m3,{value:e.languageCode,className:`flex select-none items-center p-1.5 pr-3 gap-2 cursor-pointer rounded-input relative focus-visible:outline-hidden data-highlighted:bg-base-active text-sm`,children:[R(b3,{flagCode:e.flagCode}),R(h3,{children:e.name}),R(g3,{className:`text-base-primary p-1.5 -mr-1.5 ml-auto`,children:R(JS,{size:`xs`,name:`check`})})]},e.languageCode))}),R(v3,{className:`flex items-center justify-center h-6 bg-base text-base-subtle cursor-default`,children:R(JS,{size:`xs`,name:`chevron-down`})})]})})]})}function S3({className:e,...t}){let n=Rb(),{language:r,showPicker:i}=Tg();return i.value?R(x3,{align:`center`,children:R(l3,{className:vx(`h-9 min-w-max rounded-button focus-ring px-2 flex gap-2 items-center text-base-primary bg-base hover:bg-base-hover active:bg-base-active font-medium`,e),"aria-label":n.change_language,...t,children:[R(b3,{size:`sm`,flagCode:r.value.flagCode}),r.value.name,R(u3,{className:`text-base-subtle`,asChild:!0,children:R(JS,{size:`xs`,name:`chevron-down`})})]})}):null}function C3(){let{status:e,isSpeaking:t}=ab(),n=mb(),{isTextMode:r}=Mb(),i=Rb();return L(()=>e.value===`connected`?n.value||r.value?{label:i.chatting_status.value,updateImmediately:t.value}:t.value?{label:i.speaking_status.value,updateImmediately:t.value}:{label:i.listening_status.value,updateImmediately:t.value}:{label:i.connecting_status.value,updateImmediately:!0})}function w3({className:e,...t}){let n=C3(),[r,i]=lf(n.peek().label);return hm(()=>{let e=n.value;if(e.updateImmediately)i(e.label);else{let t=setTimeout(()=>{i(e.label)},500);return()=>clearTimeout(t)}}),R(`div`,{className:vx(`py-1.5 px-3 bg-base-active overflow-hidden rounded-bubble text-sm`,e),...t,children:R(mx,{initial:!1,active:!0,children:R(`div`,{className:`animate-text whitespace-nowrap transition-[opacity,transform] ease-out duration-200 data-hidden:opacity-0 transform data-hidden:translate-y-2`,children:r})},r)})}var T3=Fd(void 0),E3=768;function D3({children:e,initialVariant:t=`compact`}){let n=cm(t!==`compact`),r=cm(typeof window<`u`?window.innerWidth<E3:!1);df(()=>{let e=()=>{r.value=window.innerWidth<E3};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let i=I(()=>{n.value=!n.value},[n]),a=L(()=>n.value?r.value?`fullscreen`:`expanded`:`compact`),o=mf(()=>({variant:a,toggleSize:i}),[a,i]);return R(T3.Provider,{value:o,children:e})}function O3(){return cg(T3)}function k3(e){let t=Rb(),{mode:n,setMode:r,isTextMode:i}=Mb(),a=I(()=>{r(n.peek()===`text`?`voice`:`text`)},[r,n]);return R(yC,{"aria-label":i.value?t.voice_mode:t.text_mode,icon:i.value?`soundwave`:`chat`,onClick:a,...e})}function A3({showBackButton:e,onBackClick:t,showStatusLabel:n,showLanguageSelector:r,showConversationModeToggle:i,showExpandButton:a}){let o=Rb(),{toggleSize:s,variant:c}=O3(),l=L(()=>c.value===`compact`?`Expand widget`:`Collapse widget`);return R(`div`,{className:`w-full relative shrink-0 z-10`,children:[R(`div`,{className:`h-16 absolute top-0 w-full bg-base`}),R(`div`,{className:`h-4 absolute top-16 w-full bg-gradient-to-b from-base to-transparent backdrop-blur-[1px] [mask-image:linear-gradient(to_bottom,black,transparent)] shadow-scroll-fade-bottom`}),R(`div`,{className:`h-16 top-0 absolute flex flex-row items-center justify-center w-full`,children:[R(`div`,{className:`absolute start-3 flex gap-2 items-center`,children:[e?R(yC,{variant:`ghost`,onClick:t,"aria-label":o.go_back,className:`h-8 w-8`,children:R(JS,{name:`chevron-up`,className:`-rotate-90`,size:`xs`})}):R(`div`,{className:`relative w-8 h-8`}),R(mx,{active:n,children:R(w3,{className:`transition-opacity data-hidden:opacity-0`})})]}),R(`div`,{className:`absolute flex flex-row items-center gap-2 ms-auto end-3`,children:[R(mx,{active:r,children:R(`div`,{className:`transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:-translate-y-4`,children:R(S3,{})})}),R(mx,{active:i,children:R(k3,{variant:`ghost`,className:`h-8 w-8 transition-opacity data-hidden:opacity-0`})}),R(mx,{active:a,children:R(yC,{variant:`ghost`,onClick:s,"aria-label":l,className:`h-8 w-8 transition-opacity data-hidden:opacity-0`,children:R(JS,{name:c.value===`compact`?`maximize`:`minimize`,size:`sm`})})})]})]})]})}function j3({iconOnly:e,isDisconnected:t,children:n,...r}){let{endSession:i,startSession:a}=ab(),o=Rb();return R(yC,{variant:t?`primary`:`secondary`,icon:t?`phone`:`phone-off`,onClick:t?e=>a(e.currentTarget):i,"aria-label":t?o.start_call:o.end_call,...r,children:e?void 0:n??(t?o.start_call:o.end_call)})}function M3(e){let t=Rb(),{isMuted:n,isMutingEnabled:r,setIsMuted:i}=Fb(),a=I(()=>{i(!n.peek())},[i]);return r.value?R(yC,{"aria-label":t.mute_microphone,"aria-pressed":n.value,icon:n.value?`mic-off`:`mic`,onClick:a,...e}):null}function N3({iconOnly:e,disabled:t,onFileSelect:n,children:r,...i}){let a=Rb(),o=F(null),s=I(e=>{e.stopPropagation(),o.current?.click()},[]),c=I(e=>{let t=e.target,r=t.files?.[0];r&&n(r),t.value=``},[n]);return R(ud,{children:[R(yC,{variant:`secondary`,icon:`paperclip`,onClick:s,disabled:t,"aria-label":a.attach_file,...i,children:e?void 0:r??a.attach_file}),R(`input`,{ref:o,type:`file`,accept:aZ.join(`,`),className:`hidden`,onChange:c})]})}function P3({pendingFile:e,onRemove:t}){let n=Rb(),r=cZ(e.file.type),i=e.status===`uploading`,a=e.status===`error`;return R(`div`,{className:zS(`relative inline-flex items-center gap-2 rounded-input border py-1.5 pl-1.5 pr-7 overflow-hidden`,a?`border-base-error/30 bg-base-error/5`:`border-base-border/60 bg-base-active/40`),children:[r&&e.previewUrl?R(`img`,{src:e.previewUrl,alt:e.file.name,className:`h-11 w-11 rounded-input object-cover shrink-0 bg-base-active`}):R(`div`,{className:`flex h-11 w-11 items-center justify-center rounded-input bg-base-active shrink-0`,children:R(F3,{})}),R(`div`,{className:`flex flex-col min-w-0 max-w-[220px]`,children:[R(`span`,{className:`text-sm text-base-primary truncate`,children:e.file.name}),a&&R(`span`,{className:`text-xs text-base-error break-words`,children:e.error||n.file_upload_error.value})]}),i&&R(JS,{name:`loader`,size:`sm`,className:`animate-spin text-base-subtle shrink-0`}),R(`button`,{type:`button`,onClick:t,"aria-label":n.remove_file.value,className:`absolute right-1.5 top-1/2 -translate-y-1/2 !mt-0 text-base-subtle hover:text-base-primary transition-colors`,children:R(JS,{name:`x`,size:`sm`})})]})}function F3(){return R(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`22`,height:`22`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`,className:`text-base-subtle`,children:[R(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),R(`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`}),R(`path`,{d:`M10 9H8`}),R(`path`,{d:`M16 13H8`}),R(`path`,{d:`M16 17H8`})]})}function I3({showTranscript:e,scrollPinned:t}){let n=gb(),r=vb(),i=yb(),a=cm(``),o=cm(!1),s=Rb(),{isDisconnected:c,status:l,lastId:u,startSession:d,sendUserMessage:f,sendMultimodalMessage:p}=ab(),m=cm(null);hm(()=>{if(!m.value)return;let e=setTimeout(()=>{m.value=null},4e3);return()=>clearTimeout(e)});let{pendingFile:h,isUploading:g,hasReachedLimit:_,addFile:v,removeFile:y,markFileAsSent:b}=pZ({conversationId:l.value===`connected`?u.value:null,maxFiles:i.value}),x=L(()=>r.value&&n.value&&!c.value),S=L(()=>!h.value&&!_.value&&l.value===`connected`),C=I(e=>{let t=v(e);if(t){if(t===`unsupported_type`){m.value=`${s.file_type_unsupported.peek()} ${aZ.join(`, `)}.`;return}m.value={too_large:s.file_too_large,limit_reached:s.file_limit_reached}[t].peek()}},[v,s,m]),w=L(()=>{let e=!!a.value.trim(),t=h.value?.status===`ready`;return(e||t)&&!g.value}),T=I(async e=>{if(e.preventDefault(),!w.peek())return;let n=a.value.trim(),r=h.value;if(r?.status===`ready`&&!c.value){t.value=!0,p({text:n||void 0,file:{fileId:r.fileId,fileName:r.file.name,mimeType:r.file.type,previewUrl:r.previewUrl}}),b(),a.value=``;return}n&&(t.value=!0,a.value=``,c.value?await d(e.currentTarget,n):f(n))},[a,t,c,d,f,p,h,b,w]);return R(`div`,{className:`sticky bottom-0 pointer-events-none z-10 max-h-[50%] flex flex-col`,children:[R(`div`,{className:`absolute top-0 left-0 right-0 h-4 -translate-y-full bg-gradient-to-t from-base to-transparent pointer-events-none backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black,transparent)] shadow-scroll-fade-top`}),R(`div`,{className:`relative w-full px-3 pb-3 flex flex-col items-center pointer-events-auto min-h-0`,children:[m.value&&R(`div`,{className:`w-full px-1 pb-1.5 text-xs text-base-error text-center`,children:m.value}),n.value&&R(`div`,{className:zS(`bg-base relative flex flex-col min-h-0 rounded-[calc(var(--el-sheet-radius)-8px)] border border-base-border w-full transition-shadow overflow-hidden`,o.value&&`ring-2 ring-accent`),children:[h.value&&R(`div`,{className:`px-3 pt-3`,children:R(P3,{pendingFile:h.value,onRemove:y})}),R(L3,{userMessage:a,isFocused:o,canSend:w,onSendMessage:T}),R(`div`,{className:`absolute bottom-0 left-0 right-0 flex gap-1.5 items-center justify-end px-3 pb-3 pt-2 pointer-events-none`,children:R(`div`,{className:`pointer-events-auto flex gap-1.5 items-center`,children:R(R3,{canSend:w,onSendMessage:T,showTranscript:e,showUploadButton:x,uploadEnabled:S,onFileSelect:C})})})]}),!n.value&&R(`div`,{className:`w-full flex gap-1.5 items-center justify-end`,children:R(R3,{canSend:w,onSendMessage:T,showTranscript:e,showUploadButton:x,uploadEnabled:S,onFileSelect:C})})]})]})}function L3({userMessage:e,isFocused:t,canSend:n,onSendMessage:r}){let i=Rb(),a=mb(),{isDisconnected:o,conversationIndex:s,sendUserActivity:c}=ab(),{pendingInputFocus:l}=GS(),u=F(null);hm(()=>{l.value&&=(u.current?.focus(),!1)});let d=I(t=>{e.value=t.currentTarget.value},[e]),f=I(async e=>{e.isComposing||e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),n.peek()&&await r(e))},[r,n]),p=I(()=>{t.value=!0},[t]),m=I(()=>{t.value=!1},[t]);return R(`textarea`,{ref:u,"aria-label":i.input_label,value:e.value,onInput:c,onChange:d,onKeyDown:f,onFocus:p,onBlur:m,placeholder:a.value?o.value&&s.value>0?i.input_placeholder_new_conversation.value:i.input_placeholder_text_only.value:i.input_placeholder.value,className:`w-full h-full resize-none bg-base leading-5 outline-hidden text-sm text-base-primary placeholder:text-base-subtle p-3 pb-[60px] max-h-full field-sizing-content`})}function R3({canSend:e,onSendMessage:t,showTranscript:n=!1,showUploadButton:r,uploadEnabled:i,onFileSelect:a}){let o=Rb(),s=mb(),c=gb(),{isDisconnected:l}=ab(),u=ob(),{isTextMode:d}=Mb(),f=L(()=>!l.value||!s.value&&n);return R(ud,{children:[R(hC,{visible:L(()=>!s.value&&!l.value&&!d.value).value,children:R(M3,{className:`bg-base text-base-primary hover:bg-base-hover active:bg-base-active`})}),R(hC,{visible:r.value,children:R(N3,{iconOnly:!0,disabled:!i.value,onFileSelect:a,className:`bg-base text-base-primary hover:bg-base-hover active:bg-base-active`})}),R(hC,{visible:f.value,children:R(j3,{iconOnly:!0,isDisconnected:l.value,disabled:u.value,className:`bg-base text-base-primary hover:bg-base-hover active:bg-base-active`})}),c.value&&R(yC,{icon:`send`,onClick:t,variant:`primary`,disabled:!e.value,"aria-label":o.send_message.value})]})}var z3=`#version 300 es
|
|
430
430
|
precision highp float;
|
|
431
431
|
|
|
432
432
|
uniform float uTime;
|
|
@@ -590,7 +590,7 @@ void main() {
|
|
|
590
590
|
|
|
591
591
|
outColor = color;
|
|
592
592
|
}
|
|
593
|
-
`,
|
|
593
|
+
`,B3=`#version 300 es
|
|
594
594
|
precision highp float;
|
|
595
595
|
|
|
596
596
|
in vec2 position;
|
|
@@ -601,4 +601,4 @@ void main() {
|
|
|
601
601
|
vUv = position * 0.5 + 0.5;
|
|
602
602
|
gl_Position = vec4(position, 0, 1);
|
|
603
603
|
}
|
|
604
|
-
`,R3=0,z3=new Float32Array([-1,1,-1,-1,1,1,1,-1]),B3=`https://storage.googleapis.com/eleven-public-cdn/images/perlin-noise.png`,V3=class e{static noiseImage;gl;program;startTime;targetSpeed=0;speed=.5;rafId=null;resizeObserver;colorA=[0,0,0];colorB=[0,0,0];offsets=new Float32Array(7).map(()=>Math.random()*Math.PI*2);constructor(t){let n=t.getContext(`webgl2`,{depth:!1,stencil:!1});this.gl=n,this.program=this.setupProgram(I3,L3);let r=n.createTexture();n.bindTexture(n.TEXTURE_2D,r),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,new Uint8Array([128,128,128,255])),e.noiseImage||(e.noiseImage=new Image,e.noiseImage.crossOrigin=`anonymous`,e.noiseImage.src=B3),e.noiseImage.complete?this.copyNoiseImage():e.noiseImage.addEventListener(`load`,this.copyNoiseImage);let i=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,i),n.bufferData(n.ARRAY_BUFFER,z3,n.STATIC_DRAW),n.vertexAttribPointer(R3,2,n.FLOAT,!1,0,0),n.enableVertexAttribArray(R3),this.updateColors(`#2792DC`,`#9CE6E6`),this.resizeObserver=new ResizeObserver(e=>{let n=e[0],r=n.devicePixelContentBoxSize?n.devicePixelContentBoxSize[0]:n.contentBoxSize[0];t.width=Math.min(512,r.inlineSize),t.height=Math.min(512,r.blockSize),this.updateViewport()});let a=t.parentElement;if(a)try{this.resizeObserver.observe(a,{box:`device-pixel-content-box`})}catch{this.resizeObserver.observe(a)}this.startTime=performance.now(),this.rafId=requestAnimationFrame(this.render)}dispose(){this.rafId!==null&&cancelAnimationFrame(this.rafId),this.resizeObserver?.disconnect(),this.gl=null,this.program=null}updateViewport(){this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}updateColors(e,t){this.gl&&(this.colorA=this.updateColor(`uColor1`,e)??this.colorA,this.colorB=this.updateColor(`uColor2`,t)??this.colorB)}updateVolume(e,t){this.targetSpeed=.2+(1-(t-1)**2)*1.8,this.targetSpeed>this.speed&&(this.speed=this.targetSpeed),this.gl.uniform1f(this.gl.getUniformLocation(this.program,`uInputVolume`),e),this.gl.uniform1f(this.gl.getUniformLocation(this.program,`uOutputVolume`),t)}updateColor(e,t){try{let n=parseInt(t.slice(1,3),16)/255,r=parseInt(t.slice(3,5),16)/255,i=parseInt(t.slice(5,7),16)/255,a=[n**2.2,r**2.2,i**2.2];return this.gl.uniform3fv(this.gl.getUniformLocation(this.program,e),a),a}catch(e){console.error(`[ConversationalAI] Failed to parse ${t} as color:`,e)}}setupProgram(e,t){let n=this.getShader(this.gl.FRAGMENT_SHADER,e),r=this.getShader(this.gl.VERTEX_SHADER,t);if(!n||!r)throw Error(`Failed to compile shaders`);if(this.program=this.gl.createProgram(),this.gl.attachShader(this.program,n),this.gl.attachShader(this.program,r),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw Error(`Failed to link program`);return this.gl.useProgram(this.program),this.gl.uniform1i(this.gl.getUniformLocation(this.program,`uPerlinTexture`),0),this.gl.uniform1fv(this.gl.getUniformLocation(this.program,`uOffsets`),this.offsets),this.gl.uniform3fv(this.gl.getUniformLocation(this.program,`uColor1`),this.colorA),this.gl.uniform3fv(this.gl.getUniformLocation(this.program,`uColor2`),this.colorB),this.program}getShader(e,t){let n=this.gl.createShader(e);return this.gl.shaderSource(n,t),this.gl.compileShader(n),this.gl.getShaderParameter(n,this.gl.COMPILE_STATUS)?n:(this.gl.deleteShader(n),null)}copyNoiseImage=()=>{this.gl&&(this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,e.noiseImage),this.gl.generateMipmap(this.gl.TEXTURE_2D))};toDataURL=()=>this.gl.canvas.toDataURL(`image/png`);render=()=>{if(!this.gl){this.rafId=null;return}let e=(performance.now()-this.startTime)/1e3;this.gl.uniform1f(this.gl.getUniformLocation(this.program,`uTime`),e),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.rafId=requestAnimationFrame(this.render)}},H3={sm:`w-9 h-9`,lg:`w-48 h-48`};function U3({size:e=`sm`,className:t}){let{getInputVolume:n,getOutputVolume:r,isSpeaking:i,isDisconnected:a}=ab(),{config:o}=Vb(),s=F(null),c=F(null);hm(()=>{if(a.value){s.current.style.transform=``,c.current.style.transform=``;return}let e;function t(){let a=n(),o=r(),l=i.peek()?1:1-a*.4,u=i.peek()?1+o*.4:1;s.current.style.transform=`scale(${u})`,c.current.style.transform=`scale(${l})`,e=requestAnimationFrame(t)}return t(),()=>{cancelAnimationFrame(e)}});let l=L(()=>({backgroundImage:o.value.type===`image`?`url(${o.value.url})`:o.value.type===`url`?`url(${o.value.custom_url})`:void 0}));return R(`div`,{className:vx(`relative shrink-0`,H3[e],t),children:[R(`div`,{ref:s,className:`absolute inset-0 rounded-full bg-base-border`}),R(`div`,{ref:c,style:l,className:`absolute inset-0 rounded-full overflow-hidden bg-base bg-cover`,children:o.value.type===`orb`&&R(W3,{color1:o.value.color_1,color2:o.value.color_2})})]})}function W3({color1:e,color2:t}){let{canvasUrl:n}=Vb(),[r,i]=lf(null);return df(()=>{r&&(r.updateColors(e,t),r.render(),n.value=r.toDataURL())},[r,e,t]),R(`canvas`,{className:`w-full h-full`,ref:I(e=>{if(e){let t=new V3(e);return i(t),()=>t.dispose()}else i(null)},[i])})}function G3({showAvatar:e,showTranscript:t,isDisconnected:n,onStartSession:r}){let i=Rb(),a=gb(),o=pb(),s=L(()=>zS(`absolute origin-top-left transition-[transform,left,top,opacity,scale] duration-200 z-10`,`data-hidden:opacity-0`,t.value?`top-4 left-4 scale-[0.1667]`:a.value?`top-[40%] left-1/2 -translate-x-1/2 -translate-y-1/2 scale-100`:`top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 scale-100`)),c=L(()=>!t.value&&n.value&&!o.value),l=L(()=>!t.value&&!n.value);return R(mx,{active:e,children:R(`div`,{className:s,children:[R(U3,{size:`lg`}),R(mx,{active:c,children:R(`div`,{className:`absolute bottom-0 p-1 rounded-[calc(var(--el-button-radius)+4px)] bg-base left-1/2 -translate-x-1/2 translate-y-1/2 transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-100 scale-150`,children:R(yC,{"aria-label":i.start_call,variant:`primary`,icon:`phone`,onClick:e=>r(e.currentTarget)})})}),R(mx,{active:l,children:R(`div`,{className:`absolute -bottom-3 left-1/2 -translate-x-1/2 translate-y-full transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-75`,children:R(x3,{})})})]})})}var K3={"top-left":`origin-top-left`,top:`origin-top`,"top-right":`origin-top-right`,"bottom-left":`origin-bottom-left`,"bottom-right":`origin-bottom-right`,bottom:`origin-bottom`};function q3({open:e}){let t=pb(),n=mb(),r=fb(),i=r.value.placement,{isDisconnected:a,startSession:o,transcript:s,conversationIndex:c}=ab(),l=hb(),{currentContent:u,currentConfig:d}=GS(),{variant:f}=T3(),p=L(()=>{let e=t.value||n.value;return Kb(s.value,{showAgentStatus:r.value.show_agent_status??!1,transcriptEnabled:e||(r.value.transcript_enabled??!1),firstMessage:e&&t.value&&l.value?l.value:void 0,firstMessageConversationIndex:c.peek()})}),m=L(()=>p.value.length>0||!a.value&&r.value.transcript_enabled),h=cm(!0),g=L(()=>u.value!==`feedback`),_=L(()=>m.value&&!a.value),v=L(()=>u.value!==`feedback`&&(!m.value||a.value)),y=L(()=>!!r.value.conversation_mode_toggle_enabled&&!n.value&&!a.value),b=L(()=>m.value);return R(mx,{initial:!1,active:e,children:R(`div`,{"data-variant":f.value,className:zS(`sheet`,`flex flex-col overflow-hidden absolute bg-base shadow-lg pointer-events-auto z-2`,`transition-[width,height,max-width,max-height,transform,border-radius,opacity,inset,bottom,top,left,right,margin,padding] duration-200`,`data-hidden:scale-90 data-hidden:opacity-0`,K3[i],i.startsWith(`top`)?r.value.always_expanded?`top-0`:`top-20`:r.value.always_expanded?`bottom-0`:`bottom-20`),children:[R(D3,{showBackButton:d.showHeaderBack,onBackClick:d.onHeaderBack,showStatusLabel:_,showLanguageSelector:v,showConversationModeToggle:y,showExpandButton:b}),R(mx,{active:u.value===`transcript`,children:R(`div`,{className:`grow flex flex-col min-h-0 relative transition-opacity duration-300 ease-out data-hidden:opacity-0`,children:[R(DZ,{transcript:p,scrollPinned:h}),R(N3,{showTranscript:m.value,scrollPinned:h})]})}),R(mx,{active:u.value===`feedback`,children:R(`div`,{className:`absolute inset-0 top-[88px] flex flex-col bg-base transition-transform duration-300 ease-out data-hidden:translate-x-full`,children:[R(kZ,{}),R(AZ,{})]})}),R(G3,{showAvatar:g,showTranscript:m,isDisconnected:a,onStartSession:o})]})})}function J3({visible:e,className:t,...n}){let r=Rb(),{language:i,showPicker:a}=Tg();return a.value?R(hC,{visible:e,className:`p-1`,children:R(y3,{children:R(s3,{className:vx(`h-9 min-w-max border border-base-border rounded-button focus-ring px-1.5 flex gap-1 items-center transition-colors duration-200 hover:bg-base-hover active:bg-base-active`,t),"aria-label":r.change_language,...n,onClick:e=>e.stopPropagation(),children:[R(v3,{flagCode:i.value.flagCode}),R(c3,{className:`px-1 text-base-subtle`,asChild:!0,children:R(JS,{size:`xs`,name:`chevron-down`})})]})})}):null}function Y3({onDismiss:e,className:t,...n}){return R(yC,{onClick:t=>{t.preventDefault(),t.stopPropagation(),e&&e()},variant:`secondary`,icon:`minimize`,"aria-label":`Dismiss`,className:t,...n})}function X3({expanded:e,onDismiss:t}){let n=mb(),{showCall:r,showMessage:i}=_b(),a=fb().value.variant,o=a===`tiny`,{isDisconnected:s,startSession:c}=ab(),l=ob(),u=Rb(),d=Zy(),{pendingInputFocus:f}=GS(),p=I(()=>{e.value=!e.value},[e]),m=I(({focusInput:t=!1}={})=>{f.value=t,e.value=!0},[e,f]),h=I(async e=>{e.stopPropagation();let t=e.currentTarget;await d.requestTerms(),m(),c(t)},[d,m,c]),g=I(async e=>{e.stopPropagation(),await d.requestTerms(),m({focusInput:!0})},[d,m]),_=!e.value&&s.value,v=!e.value&&!s.value;return R(ud,{children:[a===`full`&&R(hC,{visible:v,className:`p-1`,children:R(U3,{})}),R(hC,{grow:!o,visible:!n.value&&v,className:`p-1`,children:R(O3,{iconOnly:!0,isDisconnected:!1})}),R(hC,{visible:!n.value&&v,className:`p-1`,children:R(k3,{})}),R(hC,{grow:!o,visible:_&&r.value,className:`p-1`,children:R(yC,{className:`w-full`,variant:`primary`,icon:`phone`,disabled:l.value,"aria-label":u.start_call,onClick:h,children:o?void 0:u.start_call})}),R(hC,{grow:!o&&!r.value,visible:_&&i.value,className:`p-1`,children:R(yC,{className:`w-full`,variant:r.value?`secondary`:`primary`,icon:`chat`,"aria-label":u.start_chat,onClick:g,children:!o&&!r.value?u.start_chat:void 0})}),R(J3,{visible:_}),R(hC,{grow:s.value,visible:e.value||!s.value,className:`p-1`,children:R(yC,{className:`w-full`,variant:`primary`,iconClassName:vx(`transition-transform duration-200`,e.value&&`-rotate-180`),icon:`chevron-up`,"aria-label":e.value?u.collapse:u.expand,onClick:!e.value&&!s.value?p:void 0})}),R(hC,{visible:!!t,className:`p-1`,children:R(Y3,{onDismiss:t})})]})}function Z3({expanded:e,className:t,onDismiss:n,...r}){let{isDisconnected:i}=ab(),a=Rb();return R(`div`,{className:vx(`transition-[border-radius] flex flex-col p-2`,!e.value&&i.value?`rounded-sheet`:`rounded-compact-sheet`,t),...r,children:[R(hC,{visible:!e.value&&i.value,className:`p-1 w-full`,children:R(`div`,{className:`flex items-center gap-2 min-w-60`,children:[R(U3,{}),R(`div`,{className:`text-sm max-w-64`,children:a.main_label})]})}),R(`div`,{className:`flex items-center min-h-11`,children:R(X3,{expanded:e,onDismiss:n})})]})}function Q3({expanded:e,className:t,onDismiss:n,...r}){return R(`div`,{className:vx(`rounded-compact-sheet flex items-center p-2`,t),...r,children:[R(hC,{visible:!e.value,className:`p-1`,children:R(U3,{})}),R(`div`,{className:`flex items-center min-h-11`,children:R(X3,{expanded:e,onDismiss:n})})]})}function $3({onDismiss:e}){let t=fb().value.variant,{isDisconnected:n}=ab(),r=ob();return R(ud,{children:[R(O3,{isDisconnected:n.value,iconOnly:t===`tiny`,className:`w-full m-1 z-1`,disabled:r.value}),R(J3,{visible:n.value}),R(hC,{visible:!n.value,className:`p-1`,children:R(k3,{})}),R(hC,{visible:!!e,className:`p-1`,children:R(Y3,{onDismiss:e})})]})}function e6({className:e,onDismiss:t,...n}){let{isDisconnected:r}=ab(),i=Rb();return R(`div`,{className:vx(`flex flex-col p-2 rounded-sheet`,e),...n,children:[R(`div`,{className:`flex items-center p-1 gap-2 min-w-60`,children:[R(U3,{}),R(`div`,{className:`relative text-sm max-w-64`,children:[R(`span`,{className:vx(`block transition-[transform,opacity] duration-200`,!r.value&&`opacity-0 scale-90`),children:i.main_label}),R(mx,{active:!r.value,children:R(x3,{className:`absolute top-1/2 -translate-y-1/2 transition-[transform,opacity] duration-200 data-hidden:opacity-0 data-hidden:scale-90`})})]})]}),R(`div`,{className:`flex items-center`,children:R($3,{onDismiss:t})})]})}function t6({className:e,onDismiss:t,...n}){return R(`div`,{className:vx(`rounded-compact-sheet flex items-center p-2`,e),...n,children:[R(U3,{className:`mx-1`}),R($3,{onDismiss:t})]})}function n6({expandable:e,expanded:t,onDismiss:n}){let r=fb().value.variant,i=Zy(),{isDisconnected:a}=ab(),o=I(async()=>{await i.requestTerms(),t.value=!t.peek()},[t]),s=r===`full`;return e?R(s?Z3:Q3,{expanded:t,onDismiss:n,className:vx(`bg-base shadow-md pointer-events-auto overflow-hidden`,(a.value||t.value)&&`cursor-pointer`),onClick:a.value||t.value?o:void 0}):R(s?e6:t6,{onDismiss:n,className:`bg-base shadow-md pointer-events-auto overflow-hidden`})}function r6(){let e=Rb(),t=bb(),{dismissTerms:n,acceptTerms:r}=Zy();return R(`div`,{className:`max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm`,children:[R(`div`,{className:`flex flex-col gap-1 terms p-2 pt-1`,dangerouslySetInnerHTML:{__html:t.value.terms_html??``}}),R(`div`,{className:`flex justify-end gap-2`,children:[R(yC,{onClick:n,children:e.dismiss_terms}),R(yC,{onClick:r,variant:`primary`,children:e.accept_terms})]})]})}function i6({copyText:e,children:t}){let n=Rb(),[r,i]=lf(!1);return df(()=>{if(r){let e=setTimeout(()=>{i(!1)},2e3);return()=>{clearTimeout(e)}}},[r]),R(yC,{onClick:I(()=>{let t=Yb(e);t&&(navigator.clipboard.writeText(t),i(!0))},[]),children:r?n.copied:t})}function a6({sawError:e}){let t=Rb(),{error:n,lastId:r}=ab(),i=I(()=>{e.value=!0},[]);return R(`div`,{className:`max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm`,children:[R(`div`,{className:`p-2 pt-1`,children:[R(`h1`,{className:`text-md font-medium pb-1`,children:t.error_occurred}),n.value,r.value&&R(ud,{children:[R(`br`,{}),R(`span`,{className:`text-base-subtle`,children:[t.conversation_id,`: `,r.value]})]})]}),R(`div`,{className:`flex justify-end gap-2`,children:[R(i6,{copyText:r,children:t.copy_id}),R(yC,{variant:`primary`,onClick:i,children:`Close`})]})]})}function o6(){let e=fb();return e.value.disable_banner?null:R(`p`,{className:vx(`whitespace-nowrap [line-height:var(--el-overlay-padding)] text-[10px] px-3 z-10`,e.value.placement.startsWith(`top`)?`-translate-y-[calc(var(--el-overlay-padding))]`:`translate-y-[calc(var(--el-overlay-padding))]`),children:[R(`span`,{className:`opacity-30`,children:`Powered by`}),` `,R(`a`,{href:e.value.override_link||`https://elevenlabs.io/agents`,className:`underline cursor-pointer pointer-events-auto focus-visible:outline-hidden opacity-30 hover:opacity-50 focus-visible:opacity-100 focus-visible:underline-offset-2`,target:`_blank`,children:`ElevenAgents`})]})}function s6({className:e,onExpand:t,...n}){return R(`button`,{onClick:e=>{e.preventDefault(),e.stopPropagation(),t&&t()},className:vx(`w-12 h-12 rounded-full flex items-center justify-center transition-all duration-200 pointer-events-auto hover:scale-105 active:scale-95`,e),"aria-label":`Open chat`,...n,children:R(U3,{className:`w-12 h-12`})})}var c6={left:`items-start`,center:`items-center`,right:`items-end`},l6={top:`flex-col-reverse justify-end`,bottom:`flex-col justify-end`},u6={"top-left":`${l6.top} ${c6.left}`,top:`${l6.top} ${c6.center}`,"top-right":`${l6.top} ${c6.right}`,"bottom-left":`${l6.bottom} ${c6.left}`,bottom:`${l6.bottom} ${c6.center}`,"bottom-right":`${l6.bottom} ${c6.right}`},d6={display:`none`},f6=Pf(function(){let e=fb(),t=cm(e.peek().default_expanded),n=cm(!1),r=cm(!1),{error:i,isDisconnected:a}=ab(),o=Zy(),{variant:s}=T3(),c=L(()=>e.value.transcript_enabled||e.value.text_input_enabled),l=eb(),u=L(()=>zS(`overlay !flex transition-[opacity] duration-200 data-hidden:opacity-0`,u6[e.value.placement])),d=L(()=>s.value===`fullscreen`?zS(u.value,u6.bottom):u.value);hm(()=>{i.value&&(c.value?(r.value=!0,t.value=!0):r.value=!1)}),hm(()=>{let e=(e=>{!e.detail||e.detail._convaiEventHandled||(e.detail._convaiEventHandled=!0,e.detail.action===`expand`?t.value=!0:e.detail.action===`collapse`?t.value=!1:e.detail.action===`toggle`&&(t.value=!t.value))}),n=l.value;return document.addEventListener(`elevenlabs-agent:expand`,e),n?.addEventListener(`elevenlabs-agent:expand`,e),()=>{document.removeEventListener(`elevenlabs-agent:expand`,e),n?.removeEventListener(`elevenlabs-agent:expand`,e)}});let f=L(()=>!c.value&&i.value&&!r.value?`error`:!o.termsAccepted.value&&o.termsShown.value?`terms`:`conversation`),p=L(()=>f.value===`error`),m=L(()=>f.value===`terms`),h=L(()=>f.value===`conversation`),g=()=>{n.value=!0},_=()=>{n.value=!1},v=L(()=>h.value&&!n.value),y=L(()=>m.value&&!n.value),b=L(()=>p.value&&!n.value),x=L(()=>!n.value),S=L(()=>e.value.dismissible&&a.value),C=L(()=>e.value.dismissible&&n.value);return R(ud,{children:[R(mx,{initial:!1,active:v,children:R(Ub,{className:u,style:d6,children:e.value.always_expanded?R(q3,{open:!0}):R(ud,{children:[c.value&&R(q3,{open:t}),R(n6,{expandable:c.value,expanded:t,onDismiss:S.value?g:void 0})]})})}),R(mx,{initial:!1,active:y,children:R(Ub,{className:u,style:d6,children:R(r6,{})})}),R(mx,{initial:!1,active:b,children:R(Ub,{className:u,style:d6,children:R(a6,{sawError:r})})}),R(mx,{initial:!1,active:x,children:R(Ub,{className:d,style:d6,children:R(o6,{})})}),R(mx,{initial:!1,active:C,children:R(Ub,{className:u,style:d6,children:R(s6,{onExpand:_})})})]})}),p6=`elevenlabs-agent:user-activity`,m6=`elevenlabs-agent:user-message`,h6=`elevenlabs-agent:contextual-update`,g6=Pf(function({children:e}){let{sendContextualUpdate:t,sendUserActivity:n,sendUserMessage:r}=ab(),i=eb(),a=Tb();return hm(()=>{function e(){n()}function o(e){v6(e)&&r(e.detail.message)}function s(e){v6(e)&&t(e.detail.message)}let c=i.value;return a.value&&(c?.addEventListener(p6,e),c?.addEventListener(m6,o),c?.addEventListener(h6,s)),()=>{c?.removeEventListener(p6,e),c?.removeEventListener(m6,o),c?.removeEventListener(h6,s)}}),e});function _6(e){return`detail`in e&&!!e.detail}function v6(e){return _6(e)&&typeof e.detail.message==`string`&&!!e.detail.message}function y6(e){return R($y,{children:R(ug,{value:e,children:R(mg,{children:R(db,{children:R(w3,{children:R(wg,{children:R(Xy,{children:R(Dg,{children:R(ib,{children:R(jb,{children:R(Pb,{children:R(Lb,{children:R(Bb,{children:R(WS,{children:R(VS,{children:[R(Db,{}),R(g6,{children:R(f6,{})})]})})})})})})})})})})})})})})})}l({name:`widget`,version:yh});function b6(e=`elevenlabs-convai`){Bd(y6,e,[...xh],{shadow:!0,mode:`open`})}b6()})();
|
|
604
|
+
`,V3=0,H3=new Float32Array([-1,1,-1,-1,1,1,1,-1]),U3=`https://storage.googleapis.com/eleven-public-cdn/images/perlin-noise.png`,W3=class e{static noiseImage;gl;program;startTime;targetSpeed=0;speed=.5;rafId=null;resizeObserver;colorA=[0,0,0];colorB=[0,0,0];offsets=new Float32Array(7).map(()=>Math.random()*Math.PI*2);constructor(t){let n=t.getContext(`webgl2`,{depth:!1,stencil:!1});this.gl=n,this.program=this.setupProgram(z3,B3);let r=n.createTexture();n.bindTexture(n.TEXTURE_2D,r),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,new Uint8Array([128,128,128,255])),e.noiseImage||(e.noiseImage=new Image,e.noiseImage.crossOrigin=`anonymous`,e.noiseImage.src=U3),e.noiseImage.complete?this.copyNoiseImage():e.noiseImage.addEventListener(`load`,this.copyNoiseImage);let i=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,i),n.bufferData(n.ARRAY_BUFFER,H3,n.STATIC_DRAW),n.vertexAttribPointer(V3,2,n.FLOAT,!1,0,0),n.enableVertexAttribArray(V3),this.updateColors(`#2792DC`,`#9CE6E6`),this.resizeObserver=new ResizeObserver(e=>{let n=e[0],r=n.devicePixelContentBoxSize?n.devicePixelContentBoxSize[0]:n.contentBoxSize[0];t.width=Math.min(512,r.inlineSize),t.height=Math.min(512,r.blockSize),this.updateViewport()});let a=t.parentElement;if(a)try{this.resizeObserver.observe(a,{box:`device-pixel-content-box`})}catch{this.resizeObserver.observe(a)}this.startTime=performance.now(),this.rafId=requestAnimationFrame(this.render)}dispose(){this.rafId!==null&&cancelAnimationFrame(this.rafId),this.resizeObserver?.disconnect(),this.gl=null,this.program=null}updateViewport(){this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}updateColors(e,t){this.gl&&(this.colorA=this.updateColor(`uColor1`,e)??this.colorA,this.colorB=this.updateColor(`uColor2`,t)??this.colorB)}updateVolume(e,t){this.targetSpeed=.2+(1-(t-1)**2)*1.8,this.targetSpeed>this.speed&&(this.speed=this.targetSpeed),this.gl.uniform1f(this.gl.getUniformLocation(this.program,`uInputVolume`),e),this.gl.uniform1f(this.gl.getUniformLocation(this.program,`uOutputVolume`),t)}updateColor(e,t){try{let n=parseInt(t.slice(1,3),16)/255,r=parseInt(t.slice(3,5),16)/255,i=parseInt(t.slice(5,7),16)/255,a=[n**2.2,r**2.2,i**2.2];return this.gl.uniform3fv(this.gl.getUniformLocation(this.program,e),a),a}catch(e){console.error(`[ConversationalAI] Failed to parse ${t} as color:`,e)}}setupProgram(e,t){let n=this.getShader(this.gl.FRAGMENT_SHADER,e),r=this.getShader(this.gl.VERTEX_SHADER,t);if(!n||!r)throw Error(`Failed to compile shaders`);if(this.program=this.gl.createProgram(),this.gl.attachShader(this.program,n),this.gl.attachShader(this.program,r),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw Error(`Failed to link program`);return this.gl.useProgram(this.program),this.gl.uniform1i(this.gl.getUniformLocation(this.program,`uPerlinTexture`),0),this.gl.uniform1fv(this.gl.getUniformLocation(this.program,`uOffsets`),this.offsets),this.gl.uniform3fv(this.gl.getUniformLocation(this.program,`uColor1`),this.colorA),this.gl.uniform3fv(this.gl.getUniformLocation(this.program,`uColor2`),this.colorB),this.program}getShader(e,t){let n=this.gl.createShader(e);return this.gl.shaderSource(n,t),this.gl.compileShader(n),this.gl.getShaderParameter(n,this.gl.COMPILE_STATUS)?n:(this.gl.deleteShader(n),null)}copyNoiseImage=()=>{this.gl&&(this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,e.noiseImage),this.gl.generateMipmap(this.gl.TEXTURE_2D))};toDataURL=()=>this.gl.canvas.toDataURL(`image/png`);render=()=>{if(!this.gl){this.rafId=null;return}let e=(performance.now()-this.startTime)/1e3;this.gl.uniform1f(this.gl.getUniformLocation(this.program,`uTime`),e),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.rafId=requestAnimationFrame(this.render)}},G3={sm:`w-9 h-9`,lg:`w-48 h-48`};function K3({size:e=`sm`,className:t}){let{getInputVolume:n,getOutputVolume:r,isSpeaking:i,isDisconnected:a}=ab(),{config:o}=Vb(),s=F(null),c=F(null);hm(()=>{if(a.value){s.current.style.transform=``,c.current.style.transform=``;return}let e;function t(){let a=n(),o=r(),l=i.peek()?1:1-a*.4,u=i.peek()?1+o*.4:1;s.current.style.transform=`scale(${u})`,c.current.style.transform=`scale(${l})`,e=requestAnimationFrame(t)}return t(),()=>{cancelAnimationFrame(e)}});let l=L(()=>({backgroundImage:o.value.type===`image`?`url(${o.value.url})`:o.value.type===`url`?`url(${o.value.custom_url})`:void 0}));return R(`div`,{className:vx(`relative shrink-0`,G3[e],t),children:[R(`div`,{ref:s,className:`absolute inset-0 rounded-full bg-base-border`}),R(`div`,{ref:c,style:l,className:`absolute inset-0 rounded-full overflow-hidden bg-base bg-cover`,children:o.value.type===`orb`&&R(q3,{color1:o.value.color_1,color2:o.value.color_2})})]})}function q3({color1:e,color2:t}){let{canvasUrl:n}=Vb(),[r,i]=lf(null);return df(()=>{r&&(r.updateColors(e,t),r.render(),n.value=r.toDataURL())},[r,e,t]),R(`canvas`,{className:`w-full h-full`,ref:I(e=>{if(e){let t=new W3(e);return i(t),()=>t.dispose()}else i(null)},[i])})}function J3({showAvatar:e,showTranscript:t,isDisconnected:n,onStartSession:r}){let i=Rb(),a=gb(),o=pb(),s=L(()=>zS(`absolute origin-top-left transition-[transform,left,top,opacity,scale] duration-200 z-10`,`data-hidden:opacity-0`,t.value?`top-4 left-4 scale-[0.1667]`:a.value?`top-[40%] left-1/2 -translate-x-1/2 -translate-y-1/2 scale-100`:`top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 scale-100`)),c=L(()=>!t.value&&n.value&&!o.value),l=L(()=>!t.value&&!n.value);return R(mx,{active:e,children:R(`div`,{className:s,children:[R(K3,{size:`lg`}),R(mx,{active:c,children:R(`div`,{className:`absolute bottom-0 p-1 rounded-[calc(var(--el-button-radius)+4px)] bg-base left-1/2 -translate-x-1/2 translate-y-1/2 transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-100 scale-150`,children:R(yC,{"aria-label":i.start_call,variant:`primary`,icon:`phone`,onClick:e=>r(e.currentTarget)})})}),R(mx,{active:l,children:R(`div`,{className:`absolute -bottom-3 left-1/2 -translate-x-1/2 translate-y-full transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-75`,children:R(w3,{})})})]})})}var Y3={"top-left":`origin-top-left`,top:`origin-top`,"top-right":`origin-top-right`,"bottom-left":`origin-bottom-left`,"bottom-right":`origin-bottom-right`,bottom:`origin-bottom`};function X3({open:e}){let t=pb(),n=mb(),r=fb(),i=r.value.placement,{isDisconnected:a,startSession:o,transcript:s,conversationIndex:c,isAgentTyping:l,isExternalAgentMode:u}=ab(),d=hb(),{currentContent:f,currentConfig:p}=GS(),{variant:m}=O3(),h=L(()=>{let e=t.value||n.value;return Kb(s.value,{showAgentStatus:r.value.show_agent_status??!1,transcriptEnabled:e||(r.value.transcript_enabled??!1),firstMessage:e&&t.value&&d.value?d.value:void 0,firstMessageConversationIndex:c.peek(),showTypingIndicator:u.value&&l.value})}),g=L(()=>h.value.length>0||!a.value&&r.value.transcript_enabled),_=cm(!0),v=L(()=>f.value!==`feedback`),y=L(()=>g.value&&!a.value),b=L(()=>f.value!==`feedback`&&(!g.value||a.value)),x=L(()=>!!r.value.conversation_mode_toggle_enabled&&!n.value&&!a.value),S=L(()=>g.value);return R(mx,{initial:!1,active:e,children:R(`div`,{"data-variant":m.value,className:zS(`sheet`,`flex flex-col overflow-hidden absolute bg-base shadow-lg pointer-events-auto z-2`,`transition-[width,height,max-width,max-height,transform,border-radius,opacity,inset,bottom,top,left,right,margin,padding] duration-200`,`data-hidden:scale-90 data-hidden:opacity-0`,Y3[i],i.startsWith(`top`)?r.value.always_expanded?`top-0`:`top-20`:r.value.always_expanded?`bottom-0`:`bottom-20`),children:[R(A3,{showBackButton:p.showHeaderBack,onBackClick:p.onHeaderBack,showStatusLabel:y,showLanguageSelector:b,showConversationModeToggle:x,showExpandButton:S}),R(mx,{active:f.value===`transcript`,children:R(`div`,{className:`grow flex flex-col min-h-0 relative transition-opacity duration-300 ease-out data-hidden:opacity-0`,children:[R(kZ,{transcript:h,scrollPinned:_}),R(I3,{showTranscript:g.value,scrollPinned:_})]})}),R(mx,{active:f.value===`feedback`,children:R(`div`,{className:`absolute inset-0 top-[88px] flex flex-col bg-base transition-transform duration-300 ease-out data-hidden:translate-x-full`,children:[R(jZ,{}),R(MZ,{})]})}),R(J3,{showAvatar:v,showTranscript:g,isDisconnected:a,onStartSession:o})]})})}function Z3({visible:e,className:t,...n}){let r=Rb(),{language:i,showPicker:a}=Tg();return a.value?R(hC,{visible:e,className:`p-1`,children:R(x3,{children:R(l3,{className:vx(`h-9 min-w-max border border-base-border rounded-button focus-ring px-1.5 flex gap-1 items-center transition-colors duration-200 hover:bg-base-hover active:bg-base-active`,t),"aria-label":r.change_language,...n,onClick:e=>e.stopPropagation(),children:[R(b3,{flagCode:i.value.flagCode}),R(u3,{className:`px-1 text-base-subtle`,asChild:!0,children:R(JS,{size:`xs`,name:`chevron-down`})})]})})}):null}function Q3({onDismiss:e,className:t,...n}){return R(yC,{onClick:t=>{t.preventDefault(),t.stopPropagation(),e&&e()},variant:`secondary`,icon:`minimize`,"aria-label":`Dismiss`,className:t,...n})}function $3({expanded:e,onDismiss:t}){let n=mb(),{showCall:r,showMessage:i}=_b(),a=fb().value.variant,o=a===`tiny`,{isDisconnected:s,startSession:c}=ab(),l=ob(),u=Rb(),d=Zy(),{pendingInputFocus:f}=GS(),p=I(()=>{e.value=!e.value},[e]),m=I(({focusInput:t=!1}={})=>{f.value=t,e.value=!0},[e,f]),h=I(async e=>{e.stopPropagation();let t=e.currentTarget;await d.requestTerms(),m(),c(t)},[d,m,c]),g=I(async e=>{e.stopPropagation(),await d.requestTerms(),m({focusInput:!0})},[d,m]),_=!e.value&&s.value,v=!e.value&&!s.value;return R(ud,{children:[a===`full`&&R(hC,{visible:v,className:`p-1`,children:R(K3,{})}),R(hC,{grow:!o,visible:!n.value&&v,className:`p-1`,children:R(j3,{iconOnly:!0,isDisconnected:!1})}),R(hC,{visible:!n.value&&v,className:`p-1`,children:R(M3,{})}),R(hC,{grow:!o,visible:_&&r.value,className:`p-1`,children:R(yC,{className:`w-full`,variant:`primary`,icon:`phone`,disabled:l.value,"aria-label":u.start_call,onClick:h,children:o?void 0:u.start_call})}),R(hC,{grow:!o&&!r.value,visible:_&&i.value,className:`p-1`,children:R(yC,{className:`w-full`,variant:r.value?`secondary`:`primary`,icon:`chat`,"aria-label":u.start_chat,onClick:g,children:!o&&!r.value?u.start_chat:void 0})}),R(Z3,{visible:_}),R(hC,{grow:s.value,visible:e.value||!s.value,className:`p-1`,children:R(yC,{className:`w-full`,variant:`primary`,iconClassName:vx(`transition-transform duration-200`,e.value&&`-rotate-180`),icon:`chevron-up`,"aria-label":e.value?u.collapse:u.expand,onClick:!e.value&&!s.value?p:void 0})}),R(hC,{visible:!!t,className:`p-1`,children:R(Q3,{onDismiss:t})})]})}function e6({expanded:e,className:t,onDismiss:n,...r}){let{isDisconnected:i}=ab(),a=Rb();return R(`div`,{className:vx(`transition-[border-radius] flex flex-col p-2`,!e.value&&i.value?`rounded-sheet`:`rounded-compact-sheet`,t),...r,children:[R(hC,{visible:!e.value&&i.value,className:`p-1 w-full`,children:R(`div`,{className:`flex items-center gap-2 min-w-60`,children:[R(K3,{}),R(`div`,{className:`text-sm max-w-64`,children:a.main_label})]})}),R(`div`,{className:`flex items-center min-h-11`,children:R($3,{expanded:e,onDismiss:n})})]})}function t6({expanded:e,className:t,onDismiss:n,...r}){return R(`div`,{className:vx(`rounded-compact-sheet flex items-center p-2`,t),...r,children:[R(hC,{visible:!e.value,className:`p-1`,children:R(K3,{})}),R(`div`,{className:`flex items-center min-h-11`,children:R($3,{expanded:e,onDismiss:n})})]})}function n6({onDismiss:e}){let t=fb().value.variant,{isDisconnected:n}=ab(),r=ob();return R(ud,{children:[R(j3,{isDisconnected:n.value,iconOnly:t===`tiny`,className:`w-full m-1 z-1`,disabled:r.value}),R(Z3,{visible:n.value}),R(hC,{visible:!n.value,className:`p-1`,children:R(M3,{})}),R(hC,{visible:!!e,className:`p-1`,children:R(Q3,{onDismiss:e})})]})}function r6({className:e,onDismiss:t,...n}){let{isDisconnected:r}=ab(),i=Rb();return R(`div`,{className:vx(`flex flex-col p-2 rounded-sheet`,e),...n,children:[R(`div`,{className:`flex items-center p-1 gap-2 min-w-60`,children:[R(K3,{}),R(`div`,{className:`relative text-sm max-w-64`,children:[R(`span`,{className:vx(`block transition-[transform,opacity] duration-200`,!r.value&&`opacity-0 scale-90`),children:i.main_label}),R(mx,{active:!r.value,children:R(w3,{className:`absolute top-1/2 -translate-y-1/2 transition-[transform,opacity] duration-200 data-hidden:opacity-0 data-hidden:scale-90`})})]})]}),R(`div`,{className:`flex items-center`,children:R(n6,{onDismiss:t})})]})}function i6({className:e,onDismiss:t,...n}){return R(`div`,{className:vx(`rounded-compact-sheet flex items-center p-2`,e),...n,children:[R(K3,{className:`mx-1`}),R(n6,{onDismiss:t})]})}function a6({expandable:e,expanded:t,onDismiss:n}){let r=fb().value.variant,i=Zy(),{isDisconnected:a}=ab(),o=I(async()=>{await i.requestTerms(),t.value=!t.peek()},[t]),s=r===`full`;return e?R(s?e6:t6,{expanded:t,onDismiss:n,className:vx(`bg-base shadow-md pointer-events-auto overflow-hidden`,(a.value||t.value)&&`cursor-pointer`),onClick:a.value||t.value?o:void 0}):R(s?r6:i6,{onDismiss:n,className:`bg-base shadow-md pointer-events-auto overflow-hidden`})}function o6(){let e=Rb(),t=bb(),{dismissTerms:n,acceptTerms:r}=Zy();return R(`div`,{className:`max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm`,children:[R(`div`,{className:`flex flex-col gap-1 terms p-2 pt-1`,dangerouslySetInnerHTML:{__html:t.value.terms_html??``}}),R(`div`,{className:`flex justify-end gap-2`,children:[R(yC,{onClick:n,children:e.dismiss_terms}),R(yC,{onClick:r,variant:`primary`,children:e.accept_terms})]})]})}function s6({copyText:e,children:t}){let n=Rb(),[r,i]=lf(!1);return df(()=>{if(r){let e=setTimeout(()=>{i(!1)},2e3);return()=>{clearTimeout(e)}}},[r]),R(yC,{onClick:I(()=>{let t=Yb(e);t&&(navigator.clipboard.writeText(t),i(!0))},[]),children:r?n.copied:t})}function c6({sawError:e}){let t=Rb(),{error:n,lastId:r}=ab(),i=I(()=>{e.value=!0},[]);return R(`div`,{className:`max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm`,children:[R(`div`,{className:`p-2 pt-1`,children:[R(`h1`,{className:`text-md font-medium pb-1`,children:t.error_occurred}),n.value,r.value&&R(ud,{children:[R(`br`,{}),R(`span`,{className:`text-base-subtle`,children:[t.conversation_id,`: `,r.value]})]})]}),R(`div`,{className:`flex justify-end gap-2`,children:[R(s6,{copyText:r,children:t.copy_id}),R(yC,{variant:`primary`,onClick:i,children:`Close`})]})]})}function l6(){let e=fb();return e.value.disable_banner?null:R(`p`,{className:vx(`whitespace-nowrap [line-height:var(--el-overlay-padding)] text-[10px] px-3 z-10`,e.value.placement.startsWith(`top`)?`-translate-y-[calc(var(--el-overlay-padding))]`:`translate-y-[calc(var(--el-overlay-padding))]`),children:[R(`span`,{className:`opacity-30`,children:`Powered by`}),` `,R(`a`,{href:e.value.override_link||`https://elevenlabs.io/agents`,className:`underline cursor-pointer pointer-events-auto focus-visible:outline-hidden opacity-30 hover:opacity-50 focus-visible:opacity-100 focus-visible:underline-offset-2`,target:`_blank`,children:`ElevenAgents`})]})}function u6({className:e,onExpand:t,...n}){return R(`button`,{onClick:e=>{e.preventDefault(),e.stopPropagation(),t&&t()},className:vx(`w-12 h-12 rounded-full flex items-center justify-center transition-all duration-200 pointer-events-auto hover:scale-105 active:scale-95`,e),"aria-label":`Open chat`,...n,children:R(K3,{className:`w-12 h-12`})})}var d6={left:`items-start`,center:`items-center`,right:`items-end`},f6={top:`flex-col-reverse justify-end`,bottom:`flex-col justify-end`},p6={"top-left":`${f6.top} ${d6.left}`,top:`${f6.top} ${d6.center}`,"top-right":`${f6.top} ${d6.right}`,"bottom-left":`${f6.bottom} ${d6.left}`,bottom:`${f6.bottom} ${d6.center}`,"bottom-right":`${f6.bottom} ${d6.right}`},m6={display:`none`},h6=Pf(function(){let e=fb(),t=cm(e.peek().default_expanded),n=cm(!1),r=cm(!1),{error:i,isDisconnected:a}=ab(),o=Zy(),{variant:s}=O3(),c=L(()=>e.value.transcript_enabled||e.value.text_input_enabled),l=eb(),u=L(()=>zS(`overlay !flex transition-[opacity] duration-200 data-hidden:opacity-0`,p6[e.value.placement])),d=L(()=>s.value===`fullscreen`?zS(u.value,p6.bottom):u.value);hm(()=>{i.value&&(c.value?(r.value=!0,t.value=!0):r.value=!1)}),hm(()=>{let e=(e=>{!e.detail||e.detail._convaiEventHandled||(e.detail._convaiEventHandled=!0,e.detail.action===`expand`?t.value=!0:e.detail.action===`collapse`?t.value=!1:e.detail.action===`toggle`&&(t.value=!t.value))}),n=l.value;return document.addEventListener(`elevenlabs-agent:expand`,e),n?.addEventListener(`elevenlabs-agent:expand`,e),()=>{document.removeEventListener(`elevenlabs-agent:expand`,e),n?.removeEventListener(`elevenlabs-agent:expand`,e)}});let f=L(()=>!c.value&&i.value&&!r.value?`error`:!o.termsAccepted.value&&o.termsShown.value?`terms`:`conversation`),p=L(()=>f.value===`error`),m=L(()=>f.value===`terms`),h=L(()=>f.value===`conversation`),g=()=>{n.value=!0},_=()=>{n.value=!1},v=L(()=>h.value&&!n.value),y=L(()=>m.value&&!n.value),b=L(()=>p.value&&!n.value),x=L(()=>!n.value),S=L(()=>e.value.dismissible&&a.value),C=L(()=>e.value.dismissible&&n.value);return R(ud,{children:[R(mx,{initial:!1,active:v,children:R(Ub,{className:u,style:m6,children:e.value.always_expanded?R(X3,{open:!0}):R(ud,{children:[c.value&&R(X3,{open:t}),R(a6,{expandable:c.value,expanded:t,onDismiss:S.value?g:void 0})]})})}),R(mx,{initial:!1,active:y,children:R(Ub,{className:u,style:m6,children:R(o6,{})})}),R(mx,{initial:!1,active:b,children:R(Ub,{className:u,style:m6,children:R(c6,{sawError:r})})}),R(mx,{initial:!1,active:x,children:R(Ub,{className:d,style:m6,children:R(l6,{})})}),R(mx,{initial:!1,active:C,children:R(Ub,{className:u,style:m6,children:R(u6,{onExpand:_})})})]})}),g6=`elevenlabs-agent:user-activity`,_6=`elevenlabs-agent:user-message`,v6=`elevenlabs-agent:contextual-update`,y6=Pf(function({children:e}){let{sendContextualUpdate:t,sendUserActivity:n,sendUserMessage:r}=ab(),i=eb(),a=Tb();return hm(()=>{function e(){n()}function o(e){x6(e)&&r(e.detail.message)}function s(e){x6(e)&&t(e.detail.message)}let c=i.value;return a.value&&(c?.addEventListener(g6,e),c?.addEventListener(_6,o),c?.addEventListener(v6,s)),()=>{c?.removeEventListener(g6,e),c?.removeEventListener(_6,o),c?.removeEventListener(v6,s)}}),e});function b6(e){return`detail`in e&&!!e.detail}function x6(e){return b6(e)&&typeof e.detail.message==`string`&&!!e.detail.message}function S6(e){return R($y,{children:R(ug,{value:e,children:R(mg,{children:R(db,{children:R(D3,{children:R(wg,{children:R(Xy,{children:R(Dg,{children:R(ib,{children:R(jb,{children:R(Pb,{children:R(Lb,{children:R(Bb,{children:R(WS,{children:R(VS,{children:[R(Db,{}),R(y6,{children:R(h6,{})})]})})})})})})})})})})})})})})})}l({name:`widget`,version:yh});function C6(e=`elevenlabs-convai`){Bd(S6,e,[...xh],{shadow:!0,mode:`open`})}C6()})();
|