From 2ecfbe334b5cbd43b4999bfdd7ea2b7dce2fa22e Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Sat, 27 Apr 2024 17:06:59 +0200 Subject: [PATCH] upgraded --- configs/config.yaml | 3 +- models.yaml | 1778 +++++++++++++++++ .../javascript_execution_engine.py | 1 + .../{index-57650c64.js => index-300e42b3.js} | 356 ++-- ...{index-96fe54f7.css => index-ec529940.css} | 2 +- web/dist/index.html | 4 +- web/src/views/SettingsView.vue | 15 + zoos/bindings_zoo | 2 +- 8 files changed, 1978 insertions(+), 183 deletions(-) create mode 100644 models.yaml rename web/dist/assets/{index-57650c64.js => index-300e42b3.js} (93%) rename web/dist/assets/{index-96fe54f7.css => index-ec529940.css} (99%) diff --git a/configs/config.yaml b/configs/config.yaml index 2b222491..592e3ecb 100644 --- a/configs/config.yaml +++ b/configs/config.yaml @@ -1,5 +1,5 @@ # =================== Lord Of Large Language Multimodal Systems Configuration file =========================== -version: 82 +version: 83 binding_name: null model_name: null model_variant: null @@ -109,6 +109,7 @@ petals_device: cuda # lollms service enable_lollms_service: false lollms_base_url: http://localhost:1234 +lollms_access_keys : "" # set a list of keys separated by coma to restrict access activate_lollms_server: True activate_ollama_emulator: True activate_openai_emulator: True diff --git a/models.yaml b/models.yaml new file mode 100644 index 00000000..33cfbd2f --- /dev/null +++ b/models.yaml @@ -0,0 +1,1778 @@ +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openrouter/auto + name: openrouter/auto + quantizer: null + rank: 0.0 + type: api + variants: + - name: Auto (best for prompt) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/nousresearch/nous-capybara-7b:free + name: nousresearch/nous-capybara-7b:free + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Nous: Capybara 7B (free)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mistral-7b-instruct:free + name: mistralai/mistral-7b-instruct:free + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mistral 7B Instruct (free) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openchat/openchat-7b:free + name: openchat/openchat-7b:free + quantizer: null + rank: 0.0 + type: api + variants: + - name: OpenChat 3.5 (free) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/gryphe/mythomist-7b:free + name: gryphe/mythomist-7b:free + quantizer: null + rank: 0.0 + type: api + variants: + - name: MythoMist 7B (free) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/undi95/toppy-m-7b:free + name: undi95/toppy-m-7b:free + quantizer: null + rank: 0.0 + type: api + variants: + - name: Toppy M 7B (free) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openrouter/cinematika-7b:free + name: openrouter/cinematika-7b:free + quantizer: null + rank: 0.0 + type: api + variants: + - name: Cinematika 7B (alpha) (free) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/google/gemma-7b-it:free + name: google/gemma-7b-it:free + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Google: Gemma 7B (free)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/koboldai/psyfighter-13b-2 + name: koboldai/psyfighter-13b-2 + quantizer: null + rank: 0.0 + type: api + variants: + - name: Psyfighter v2 13B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/intel/neural-chat-7b + name: intel/neural-chat-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Neural Chat 7B v3.1 + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/gryphe/mythomax-l2-13b + name: gryphe/mythomax-l2-13b + quantizer: null + rank: 0.0 + type: api + variants: + - name: MythoMax 13B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/pygmalionai/mythalion-13b + name: pygmalionai/mythalion-13b + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Pygmalion: Mythalion 13B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/xwin-lm/xwin-lm-70b + name: xwin-lm/xwin-lm-70b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Xwin 70B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/alpindale/goliath-120b + name: alpindale/goliath-120b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Goliath 120B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/neversleep/noromaid-20b + name: neversleep/noromaid-20b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Noromaid 20B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/gryphe/mythomist-7b + name: gryphe/mythomist-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: MythoMist 7B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/sophosympatheia/midnight-rose-70b + name: sophosympatheia/midnight-rose-70b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Midnight Rose 70B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/sao10k/fimbulvetr-11b-v2 + name: sao10k/fimbulvetr-11b-v2 + quantizer: null + rank: 0.0 + type: api + variants: + - name: Fimbulvetr 11B v2 + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/undi95/remm-slerp-l2-13b:extended + name: undi95/remm-slerp-l2-13b:extended + quantizer: null + rank: 0.0 + type: api + variants: + - name: ReMM SLERP 13B (extended) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/gryphe/mythomax-l2-13b:extended + name: gryphe/mythomax-l2-13b:extended + quantizer: null + rank: 0.0 + type: api + variants: + - name: MythoMax 13B (extended) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/meta-llama/llama-3-8b-instruct:extended + name: meta-llama/llama-3-8b-instruct:extended + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Meta: Llama 3 8B Instruct (extended)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mancer/weaver + name: mancer/weaver + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Mancer: Weaver (alpha)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/nousresearch/nous-capybara-7b + name: nousresearch/nous-capybara-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Nous: Capybara 7B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/meta-llama/codellama-34b-instruct + name: meta-llama/codellama-34b-instruct + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Meta: CodeLlama 34B Instruct' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/codellama/codellama-70b-instruct + name: codellama/codellama-70b-instruct + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Meta: CodeLlama 70B Instruct' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/phind/phind-codellama-34b + name: phind/phind-codellama-34b + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Phind: CodeLlama 34B v2' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/teknium/openhermes-2-mistral-7b + name: teknium/openhermes-2-mistral-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: OpenHermes 2 Mistral 7B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/undi95/remm-slerp-l2-13b + name: undi95/remm-slerp-l2-13b + quantizer: null + rank: 0.0 + type: api + variants: + - name: ReMM SLERP 13B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openrouter/cinematika-7b + name: openrouter/cinematika-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Cinematika 7B (alpha) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/01-ai/yi-34b-chat + name: 01-ai/yi-34b-chat + quantizer: null + rank: 0.0 + type: api + variants: + - name: Yi 34B Chat + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/01-ai/yi-34b + name: 01-ai/yi-34b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Yi 34B (base) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/01-ai/yi-6b + name: 01-ai/yi-6b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Yi 6B (base) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/togethercomputer/stripedhyena-nous-7b + name: togethercomputer/stripedhyena-nous-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: StripedHyena Nous 7B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/togethercomputer/stripedhyena-hessian-7b + name: togethercomputer/stripedhyena-hessian-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: StripedHyena Hessian 7B (base) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mixtral-8x7b + name: mistralai/mixtral-8x7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mixtral 8x7B (base) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/nousresearch/nous-hermes-yi-34b + name: nousresearch/nous-hermes-yi-34b + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Nous: Hermes 2 Yi 34B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/nousresearch/nous-hermes-2-mixtral-8x7b-sft + name: nousresearch/nous-hermes-2-mixtral-8x7b-sft + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Nous: Hermes 2 Mixtral 8x7B SFT' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/nousresearch/nous-hermes-2-mistral-7b-dpo + name: nousresearch/nous-hermes-2-mistral-7b-dpo + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Nous: Hermes 2 Mistral 7B DPO' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/meta-llama/llama-3-70b-instruct + name: meta-llama/llama-3-70b-instruct + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Meta: Llama 3 70B Instruct' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mixtral-8x7b-instruct:nitro + name: mistralai/mixtral-8x7b-instruct:nitro + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mixtral 8x7B Instruct (nitro) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/open-orca/mistral-7b-openorca + name: open-orca/mistral-7b-openorca + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mistral OpenOrca 7B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/huggingfaceh4/zephyr-7b-beta + name: huggingfaceh4/zephyr-7b-beta + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Hugging Face: Zephyr 7B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openai/gpt-3.5-turbo + name: openai/gpt-3.5-turbo + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'OpenAI: GPT-3.5 Turbo' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openai/gpt-3.5-turbo-0125 + name: openai/gpt-3.5-turbo-0125 + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'OpenAI: GPT-3.5 Turbo 16k' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openai/gpt-3.5-turbo-16k + name: openai/gpt-3.5-turbo-16k + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'OpenAI: GPT-3.5 Turbo 16k' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openai/gpt-4-turbo + name: openai/gpt-4-turbo + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'OpenAI: GPT-4 Turbo' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openai/gpt-4-turbo-preview + name: openai/gpt-4-turbo-preview + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'OpenAI: GPT-4 Turbo Preview' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openai/gpt-4 + name: openai/gpt-4 + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'OpenAI: GPT-4' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openai/gpt-4-32k + name: openai/gpt-4-32k + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'OpenAI: GPT-4 32k' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openai/gpt-4-vision-preview + name: openai/gpt-4-vision-preview + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'OpenAI: GPT-4 Vision' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openai/gpt-3.5-turbo-instruct + name: openai/gpt-3.5-turbo-instruct + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'OpenAI: GPT-3.5 Turbo Instruct' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/google/palm-2-chat-bison + name: google/palm-2-chat-bison + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Google: PaLM 2 Chat' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/google/palm-2-codechat-bison + name: google/palm-2-codechat-bison + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Google: PaLM 2 Code Chat' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/google/palm-2-chat-bison-32k + name: google/palm-2-chat-bison-32k + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Google: PaLM 2 Chat 32k' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/google/palm-2-codechat-bison-32k + name: google/palm-2-codechat-bison-32k + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Google: PaLM 2 Code Chat 32k' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/google/gemini-pro + name: google/gemini-pro + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Google: Gemini Pro 1.0' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/google/gemini-pro-vision + name: google/gemini-pro-vision + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Google: Gemini Pro Vision 1.0' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/google/gemini-pro-1.5 + name: google/gemini-pro-1.5 + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Google: Gemini Pro 1.5 (preview)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/perplexity/pplx-70b-online + name: perplexity/pplx-70b-online + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Perplexity: PPLX 70B Online' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/perplexity/pplx-7b-online + name: perplexity/pplx-7b-online + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Perplexity: PPLX 7B Online' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/perplexity/pplx-7b-chat + name: perplexity/pplx-7b-chat + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Perplexity: PPLX 7B Chat' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/perplexity/pplx-70b-chat + name: perplexity/pplx-70b-chat + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Perplexity: PPLX 70B Chat' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/perplexity/sonar-small-chat + name: perplexity/sonar-small-chat + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Perplexity: Sonar 7B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/perplexity/sonar-medium-chat + name: perplexity/sonar-medium-chat + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Perplexity: Sonar 8x7B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/perplexity/sonar-small-online + name: perplexity/sonar-small-online + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Perplexity: Sonar 7B Online' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/perplexity/sonar-medium-online + name: perplexity/sonar-medium-online + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Perplexity: Sonar 8x7B Online' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/fireworks/firellava-13b + name: fireworks/firellava-13b + quantizer: null + rank: 0.0 + type: api + variants: + - name: FireLLaVA 13B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-3-opus + name: anthropic/claude-3-opus + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude 3 Opus' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-3-sonnet + name: anthropic/claude-3-sonnet + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude 3 Sonnet' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-3-haiku + name: anthropic/claude-3-haiku + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude 3 Haiku' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-2 + name: anthropic/claude-2 + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude v2' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-2.1 + name: anthropic/claude-2.1 + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude v2.1' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-2.0 + name: anthropic/claude-2.0 + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude v2.0' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-instant-1 + name: anthropic/claude-instant-1 + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude Instant v1' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-instant-1.2 + name: anthropic/claude-instant-1.2 + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude Instant v1.2' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-3-opus:beta + name: anthropic/claude-3-opus:beta + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude 3 Opus (self-moderated)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-3-sonnet:beta + name: anthropic/claude-3-sonnet:beta + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude 3 Sonnet (self-moderated)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-3-haiku:beta + name: anthropic/claude-3-haiku:beta + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude 3 Haiku (self-moderated)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-2:beta + name: anthropic/claude-2:beta + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude v2 (self-moderated)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-2.1:beta + name: anthropic/claude-2.1:beta + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude v2.1 (self-moderated)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-2.0:beta + name: anthropic/claude-2.0:beta + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude v2.0 (self-moderated)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/anthropic/claude-instant-1:beta + name: anthropic/claude-instant-1:beta + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Anthropic: Claude Instant v1 (self-moderated)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/meta-llama/llama-2-13b-chat + name: meta-llama/llama-2-13b-chat + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Meta: Llama v2 13B Chat' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/meta-llama/llama-2-70b-chat + name: meta-llama/llama-2-70b-chat + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Meta: Llama v2 70B Chat' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/nousresearch/nous-hermes-llama2-13b + name: nousresearch/nous-hermes-llama2-13b + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Nous: Hermes 13B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/nousresearch/nous-capybara-34b + name: nousresearch/nous-capybara-34b + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Nous: Capybara 34B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/jondurbin/airoboros-l2-70b + name: jondurbin/airoboros-l2-70b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Airoboros 70B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/austism/chronos-hermes-13b + name: austism/chronos-hermes-13b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Chronos Hermes 13B v2 + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mistral-7b-instruct + name: mistralai/mistral-7b-instruct + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mistral 7B Instruct + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/teknium/openhermes-2.5-mistral-7b + name: teknium/openhermes-2.5-mistral-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: OpenHermes 2.5 Mistral 7B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/openchat/openchat-7b + name: openchat/openchat-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: OpenChat 3.5 + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/undi95/toppy-m-7b + name: undi95/toppy-m-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Toppy M 7B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/lizpreciatior/lzlv-70b-fp16-hf + name: lizpreciatior/lzlv-70b-fp16-hf + quantizer: null + rank: 0.0 + type: api + variants: + - name: lzlv 70B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mixtral-8x7b-instruct + name: mistralai/mixtral-8x7b-instruct + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mixtral 8x7B Instruct + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/cognitivecomputations/dolphin-mixtral-8x7b + name: cognitivecomputations/dolphin-mixtral-8x7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: "Dolphin 2.6 Mixtral 8x7B \U0001F42C" + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/neversleep/noromaid-mixtral-8x7b-instruct + name: neversleep/noromaid-mixtral-8x7b-instruct + quantizer: null + rank: 0.0 + type: api + variants: + - name: Noromaid Mixtral 8x7B Instruct + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/nousresearch/nous-hermes-2-mixtral-8x7b-dpo + name: nousresearch/nous-hermes-2-mixtral-8x7b-dpo + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Nous: Hermes 2 Mixtral 8x7B DPO' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/rwkv/rwkv-5-world-3b + name: rwkv/rwkv-5-world-3b + quantizer: null + rank: 0.0 + type: api + variants: + - name: RWKV v5 World 3B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/recursal/rwkv-5-3b-ai-town + name: recursal/rwkv-5-3b-ai-town + quantizer: null + rank: 0.0 + type: api + variants: + - name: RWKV v5 3B AI Town + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/recursal/eagle-7b + name: recursal/eagle-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'RWKV v5: Eagle 7B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/google/gemma-7b-it + name: google/gemma-7b-it + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Google: Gemma 7B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/databricks/dbrx-instruct + name: databricks/dbrx-instruct + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Databricks: DBRX 132B Instruct' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/huggingfaceh4/zephyr-orpo-141b-a35b + name: huggingfaceh4/zephyr-orpo-141b-a35b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Zephyr 141B-A35B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/meta-llama/llama-3-8b-instruct + name: meta-llama/llama-3-8b-instruct + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Meta: Llama 3 8B Instruct' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/microsoft/wizardlm-2-8x22b + name: microsoft/wizardlm-2-8x22b + quantizer: null + rank: 0.0 + type: api + variants: + - name: WizardLM-2 8x22B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/microsoft/wizardlm-2-7b + name: microsoft/wizardlm-2-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: WizardLM-2 7B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mixtral-8x22b + name: mistralai/mixtral-8x22b + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Mistral: Mixtral 8x22B (base)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mixtral-8x22b-instruct + name: mistralai/mixtral-8x22b-instruct + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Mistral: Mixtral 8x22B Instruct' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/lynn/soliloquy-l3 + name: lynn/soliloquy-l3 + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Lynn: Llama 3 Soliloquy 8B' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/huggingfaceh4/zephyr-7b-beta:free + name: huggingfaceh4/zephyr-7b-beta:free + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Hugging Face: Zephyr 7B (free)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/meta-llama/llama-2-70b-chat:nitro + name: meta-llama/llama-2-70b-chat:nitro + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Meta: Llama v2 70B Chat (nitro)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/gryphe/mythomax-l2-13b:nitro + name: gryphe/mythomax-l2-13b:nitro + quantizer: null + rank: 0.0 + type: api + variants: + - name: MythoMax 13B (nitro) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mistral-7b-instruct:nitro + name: mistralai/mistral-7b-instruct:nitro + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mistral 7B Instruct (nitro) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/google/gemma-7b-it:nitro + name: google/gemma-7b-it:nitro + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Google: Gemma 7B (nitro)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/undi95/toppy-m-7b:nitro + name: undi95/toppy-m-7b:nitro + quantizer: null + rank: 0.0 + type: api + variants: + - name: Toppy M 7B (nitro) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/microsoft/wizardlm-2-8x22b:nitro + name: microsoft/wizardlm-2-8x22b:nitro + quantizer: null + rank: 0.0 + type: api + variants: + - name: WizardLM-2 8x22B (nitro) + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/meta-llama/llama-3-8b-instruct:nitro + name: meta-llama/llama-3-8b-instruct:nitro + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Meta: Llama 3 8B Instruct (nitro)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/meta-llama/llama-3-70b-instruct:nitro + name: meta-llama/llama-3-70b-instruct:nitro + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Meta: Llama 3 70B Instruct (nitro)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/haotian-liu/llava-13b + name: haotian-liu/llava-13b + quantizer: null + rank: 0.0 + type: api + variants: + - name: Llava 13B + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/nousresearch/nous-hermes-2-vision-7b + name: nousresearch/nous-hermes-2-vision-7b + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Nous: Hermes 2 Vision 7B (alpha)' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mistral-tiny + name: mistralai/mistral-tiny + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mistral Tiny + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mistral-small + name: mistralai/mistral-small + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mistral Small + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mistral-medium + name: mistralai/mistral-medium + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mistral Medium + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/mistralai/mistral-large + name: mistralai/mistral-large + quantizer: null + rank: 0.0 + type: api + variants: + - name: Mistral Large + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/cohere/command + name: cohere/command + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Cohere: Command' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/cohere/command-r + name: cohere/command-r + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Cohere: Command R' + size: Not so much +- category: generic + datasets: unknown + icon: '' + last_commit_time: '' + license: commercial + model_creator: '' + model_creator_link: /models/cohere/command-r-plus + name: cohere/command-r-plus + quantizer: null + rank: 0.0 + type: api + variants: + - name: 'Cohere: Command R+' + size: Not so much diff --git a/utilities/execution_engines/javascript_execution_engine.py b/utilities/execution_engines/javascript_execution_engine.py index 2a490774..efaf6c13 100644 --- a/utilities/execution_engines/javascript_execution_engine.py +++ b/utilities/execution_engines/javascript_execution_engine.py @@ -76,6 +76,7 @@ def execute_javascript(code, client:Client, message_id, build_file=False): with open(tmp_file,"w",encoding="utf8") as f: f.write(build_javascript_output(code)["output"]) link = f"{host}:{lollmsElfServer.config.port}/{discussion_path_2_url(tmp_file)}" + execution_time = time.time() - start_time output_json = {"output": f'Page built successfully
Press here to view the page', "execution_time": execution_time} return output_json else: diff --git a/web/dist/assets/index-57650c64.js b/web/dist/assets/index-300e42b3.js similarity index 93% rename from web/dist/assets/index-57650c64.js rename to web/dist/assets/index-300e42b3.js index e08cd47e..2cc4a19e 100644 --- a/web/dist/assets/index-57650c64.js +++ b/web/dist/assets/index-300e42b3.js @@ -168,25 +168,25 @@ Response: Error: `+e.error,4,!1);this.isLoading=!1},async remountExtension(n){await this.unmountExtension(n),await this.mountExtension(n)},onExtensionReinstall(n){console.log("on reinstall ",n),this.isLoading=!0,console.log(n),Me.post("/reinstall_extension",{name:n.extension.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_extension",e),e.data.status?this.$store.state.toast.showToast("Extension reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall extension",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},onPersonalityReinstall(n){console.log("on reinstall ",n),this.isLoading=!0,console.log("Personality path:",n.personality.path),Me.post("/reinstall_personality",{client_id:this.$store.state.client_id,name:n.personality.path},{headers:this.posts_headers}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$store.state.toast.showToast("Personality reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},personalityImgPlacehodler(n){n.target.src=ga},extensionImgPlacehodler(n){n.target.src=_rt},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))},searchModel_func(){this.filterModels()}},async mounted(){console.log("Getting voices"),this.getVoices(),console.log("Constructing"),this.load_everything(),this.getSeviceVoices()},activated(){},computed:{rendered_models_zoo:{get(){return this.searchModel?this.show_only_installed_models?this.modelsFiltered.filter(n=>n.isInstalled===!0):this.modelsFiltered.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)):(console.log("this.models_zoo"),console.log(this.models_zoo),console.log(this.models_zoo_initialLoadCount),this.show_only_installed_models?this.models_zoo.filter(n=>n.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return Li;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(n=>n.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Li}}},imgModel:{get(){try{let n=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return n>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[n].icon}`),this.$store.state.modelsZoo[n].icon):Li}catch{console.log("error")}if(!this.isMounted)return Li;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(n=>n.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Li}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(n){this.$store.state.config.audio_out_voice=n}},whisperModels(){return["base","base.en","base.fr","base.es","small","small.en","small.fr","small.es","medium","medium.en","medium.fr","medium.es","large","large.en","large.fr","large.es"]},audioLanguages(){return[{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"fr-FR",name:"French (France)"},{code:"fr-CA",name:"French (Canada)"},{code:"de-DE",name:"German (Germany)"},{code:"it-IT",name:"Italian (Italy)"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"ru-RU",name:"Russian (Russia)"},{code:"zh-CN",name:"Chinese (China)"},{code:"ja-JP",name:"Japanese (Japan)"},{code:"ar-SA",name:"Arabic (Saudi Arabia)"},{code:"tr-TR",name:"Turkish (Turkey)"},{code:"ms-MY",name:"Malay (Malaysia)"},{code:"ko-KR",name:"Korean (South Korea)"},{code:"nl-NL",name:"Dutch (Netherlands)"},{code:"sv-SE",name:"Swedish (Sweden)"},{code:"da-DK",name:"Danish (Denmark)"},{code:"fi-FI",name:"Finnish (Finland)"},{code:"no-NO",name:"Norwegian (Norway)"},{code:"pl-PL",name:"Polish (Poland)"},{code:"el-GR",name:"Greek (Greece)"},{code:"hu-HU",name:"Hungarian (Hungary)"},{code:"cs-CZ",name:"Czech (Czech Republic)"},{code:"th-TH",name:"Thai (Thailand)"},{code:"hi-IN",name:"Hindi (India)"},{code:"he-IL",name:"Hebrew (Israel)"},{code:"id-ID",name:"Indonesian (Indonesia)"},{code:"vi-VN",name:"Vietnamese (Vietnam)"},{code:"uk-UA",name:"Ukrainian (Ukraine)"},{code:"ro-RO",name:"Romanian (Romania)"},{code:"bg-BG",name:"Bulgarian (Bulgaria)"},{code:"hr-HR",name:"Croatian (Croatia)"},{code:"sr-RS",name:"Serbian (Serbia)"},{code:"sk-SK",name:"Slovak (Slovakia)"},{code:"sl-SI",name:"Slovenian (Slovenia)"},{code:"et-EE",name:"Estonian (Estonia)"},{code:"lv-LV",name:"Latvian (Latvia)"},{code:"lt-LT",name:"Lithuanian (Lithuania)"},{code:"ka-GE",name:"Georgian (Georgia)"},{code:"hy-AM",name:"Armenian (Armenia)"},{code:"az-AZ",name:"Azerbaijani (Azerbaijan)"},{code:"kk-KZ",name:"Kazakh (Kazakhstan)"},{code:"uz-UZ",name:"Uzbek (Uzbekistan)"},{code:"kkj-CM",name:"Kako (Cameroon)"},{code:"my-MM",name:"Burmese (Myanmar)"},{code:"ne-NP",name:"Nepali (Nepal)"},{code:"si-LK",name:"Sinhala (Sri Lanka)"}]},configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},userName:{get(){return this.$store.state.config.user_name},set(n){this.$store.state.config.user_name=n}},user_avatar:{get(){return"/user_infos/"+this.$store.state.config.user_avatar},set(n){this.$store.state.config.user_avatar=n}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(n){this.$store.state.config.hardware_mode=n}},auto_update:{get(){return this.$store.state.config.auto_update},set(n){this.$store.state.config.auto_update=n}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(n){this.$store.state.config.auto_speak=n}},auto_read:{get(){return this.$store.state.config.auto_read},set(n){this.$store.state.config.auto_read=n}},enable_voice_service:{get(){return this.$store.state.config.enable_voice_service},set(n){this.$store.state.config.enable_voice_service=n}},current_language:{get(){return this.$store.state.config.current_language},set(n){console.log("Current voice set to ",n),this.$store.state.config.current_language=n}},current_voice:{get(){return this.$store.state.config.current_voice===null||this.$store.state.config.current_voice===void 0?(console.log("current voice",this.$store.state.config.current_voice),"main_voice"):this.$store.state.config.current_voice},set(n){n=="main_voice"||n===void 0?(console.log("Current voice set to None"),this.$store.state.config.current_voice=null):(console.log("Current voice set to ",n),this.$store.state.config.current_voice=n)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(n){this.$store.state.config.audio_pitch=n}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(n){this.$store.state.config.audio_in_language=n}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(n){this.$store.state.config.use_user_name_in_discussions=n}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(n){this.$store.state.config.discussion_db_name=n}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}},mountedExtensions:{get(){return console.log("this.$store.state.mountedExtensions:",this.$store.state.mountedExtensions),this.$store.state.mountedExtensions},set(n){this.$store.commit("setActiveExtensions",n)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(n){this.$store.commit("setbindingsZoo",n)}},modelsArr:{get(){return this.$store.state.modelsArr},set(n){this.$store.commit("setModelsArr",n)}},models:{get(){return this.models_zoo},set(n){this.$store.commit("setModelsZoo",n)}},installed_models:{get(){return this.models_zoo},set(n){this.$store.commit("setModelsZoo",n)}},diskUsage:{get(){return this.$store.state.diskUsage},set(n){this.$store.commit("setDiskUsage",n)}},ramUsage:{get(){return this.$store.state.ramUsage},set(n){this.$store.commit("setRamUsage",n)}},vramUsage:{get(){return this.$store.state.vramUsage},set(n){this.$store.commit("setVramUsage",n)}},disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return console.log(`this.diskUsage : ${this.diskUsage}`),this.computedFileSize(this.diskUsage.binding_models_usage)},disk_percent_usage(){return this.diskUsage.percent_usage},disk_total_space(){return this.computedFileSize(this.diskUsage.total_space)},ram_available_space(){return this.computedFileSize(this.ramUsage.available_space)},ram_usage(){return this.computedFileSize(this.ramUsage.ram_usage)},ram_percent_usage(){return this.ramUsage.percent_usage},ram_total_space(){return this.computedFileSize(this.ramUsage.total_space)},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return;const n=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);if(n>-1)return this.bindingsZoo[n].name},active_pesonality(){if(!this.isMounted)return;const n=this.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);if(n>-1)return this.personalities[n].name},speed_computed(){return ss(this.addModel.speed)},total_size_computed(){return ss(this.addModel.total_size)},downloaded_size_computed(){return ss(this.addModel.downloaded_size)}},watch:{enable_voice_service(n){n||(this.configFile.auto_read=!1)},bec_collapsed(){Ve(()=>{Ye.replace()})},pc_collapsed(){Ve(()=>{Ye.replace()})},mc_collapsed(){Ve(()=>{Ye.replace()})},sc_collapsed(){Ve(()=>{Ye.replace()})},showConfirmation(){Ve(()=>{Ye.replace()})},mzl_collapsed(){Ve(()=>{Ye.replace()})},pzl_collapsed(){Ve(()=>{Ye.replace()})},ezl_collapsed(){Ve(()=>{Ye.replace()})},bzl_collapsed(){Ve(()=>{Ye.replace()})},all_collapsed(n){this.collapseAll(n),Ve(()=>{Ye.replace()})},settingsChanged(n){this.$store.state.settingsChanged=n,Ve(()=>{Ye.replace()})},isLoading(){Ve(()=>{Ye.replace()})},searchPersonality(n){n==""&&this.filterPersonalities()},mzdc_collapsed(){Ve(()=>{Ye.replace()})}},async beforeRouteLeave(n){if(await this.$router.isReady(),this.settingsChanged)return await this.$store.state.yesNoDialog.askQuestion(`Did You forget to apply changes? -You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},ie=n=>(Nr("data-v-ef55939e"),n=n(),Or(),n),Oot={class:"container overflow-y-scroll flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},Iot={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},Mot={key:0,class:"flex gap-3 flex-1 items-center duration-75"},Dot=ie(()=>u("i",{"data-feather":"x"},null,-1)),kot=[Dot],Lot=ie(()=>u("i",{"data-feather":"check"},null,-1)),Pot=[Lot],Uot={key:1,class:"flex gap-3 flex-1 items-center"},Fot=ie(()=>u("i",{"data-feather":"save"},null,-1)),Bot=[Fot],Got=ie(()=>u("i",{"data-feather":"refresh-ccw"},null,-1)),zot=[Got],Vot=ie(()=>u("i",{"data-feather":"list"},null,-1)),Hot=[Vot],qot={class:"flex gap-3 flex-1 items-center justify-end"},Yot=ie(()=>u("i",{"data-feather":"trash-2"},null,-1)),$ot=[Yot],Wot=ie(()=>u("i",{"data-feather":"refresh-ccw"},null,-1)),Kot=[Wot],jot=ie(()=>u("i",{"data-feather":"arrow-up-circle"},null,-1)),Qot={key:0},Xot=ie(()=>u("i",{"data-feather":"alert-circle"},null,-1)),Zot=[Xot],Jot={class:"flex gap-3 items-center"},eat={key:0,class:"flex gap-3 items-center"},tat=ie(()=>u("p",{class:"text-red-600 font-bold"},"Apply changes:",-1)),nat=ie(()=>u("i",{"data-feather":"check"},null,-1)),iat=[nat],sat={key:1,role:"status"},rat=ie(()=>u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),oat=ie(()=>u("span",{class:"sr-only"},"Loading...",-1)),aat={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},lat={class:"flex flex-row p-3"},cat=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),dat=[cat],uat=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),pat=[uat],_at=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),hat=ie(()=>u("div",{class:"mr-2"},"|",-1)),fat={class:"text-base font-semibold cursor-pointer select-none items-center"},mat={class:"flex gap-2 items-center"},gat={key:0},bat=["src"],Eat={class:"font-bold font-large text-lg"},vat={key:1},yat={class:"flex gap-2 items-center"},Sat=["src"],Tat={class:"font-bold font-large text-lg"},xat=ie(()=>u("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),Cat={class:"font-bold font-large text-lg"},Rat=ie(()=>u("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),Aat={class:"font-bold font-large text-lg"},wat={class:"mb-2"},Nat=ie(()=>u("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[u("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[u("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),je(" CPU Ram usage: ")],-1)),Oat={class:"flex flex-col mx-2"},Iat=ie(()=>u("b",null,"Avaliable ram: ",-1)),Mat=ie(()=>u("b",null,"Ram usage: ",-1)),Dat={class:"p-2"},kat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Lat={class:"mb-2"},Pat=ie(()=>u("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[u("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),je(" Disk usage: ")],-1)),Uat={class:"flex flex-col mx-2"},Fat=ie(()=>u("b",null,"Avaliable disk space: ",-1)),Bat=ie(()=>u("b",null,"Disk usage: ",-1)),Gat={class:"p-2"},zat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Vat={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Hat=["src"],qat={class:"flex flex-col mx-2"},Yat=ie(()=>u("b",null,"Model: ",-1)),$at=ie(()=>u("b",null,"Avaliable vram: ",-1)),Wat=ie(()=>u("b",null,"GPU usage: ",-1)),Kat={class:"p-2"},jat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Qat={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Xat={class:"flex flex-row p-3"},Zat=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Jat=[Zat],elt=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),tlt=[elt],nlt=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),ilt={class:"flex flex-col mb-2 px-3 pb-2"},slt={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},rlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),olt={class:"text-center items-center"},alt={class:"flex flex-row"},llt=ie(()=>u("option",{value:"cpu"},"CPU",-1)),clt=ie(()=>u("option",{value:"cpu-noavx"},"CPU (No AVX)",-1)),dlt=ie(()=>u("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1)),ult=ie(()=>u("option",{value:"nvidia"},"NVIDIA",-1)),plt=ie(()=>u("option",{value:"amd-noavx"},"AMD (No AVX)",-1)),_lt=ie(()=>u("option",{value:"amd"},"AMD",-1)),hlt=ie(()=>u("option",{value:"apple-intel"},"Apple Intel",-1)),flt=ie(()=>u("option",{value:"apple-silicon"},"Apple Silicon",-1)),mlt=[llt,clt,dlt,ult,plt,_lt,hlt,flt],glt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),blt={style:{width:"100%"}},Elt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),vlt={class:"flex flex-row"},ylt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),Slt={class:"flex flex-row"},Tlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),xlt={class:"flex flex-row"},Clt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),Rlt={class:"flex flex-row"},Alt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),wlt={class:"flex flex-row"},Nlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),Olt={class:"flex flex-row"},Ilt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),Mlt={class:"flex flex-row"},Dlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),klt={class:"flex flex-row"},Llt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Plt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),Ult={style:{width:"100%"}},Flt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),Blt={style:{width:"100%"}},Glt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),zlt={style:{width:"100%"}},Vlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),Hlt={style:{width:"100%"}},qlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),Ylt={style:{width:"100%"}},$lt={for:"avatar-upload"},Wlt=["src"],Klt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),jlt={class:"flex flex-row"},Qlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),Xlt={style:{width:"100%"}},Zlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"min_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),Jlt={style:{width:"100%"}},ect={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},tct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),nct={style:{width:"100%"}},ict=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),sct={style:{width:"100%"}},rct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),oct={style:{width:"100%"}},act=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),lct={style:{width:"100%"}},cct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),dct={style:{width:"100%"}},uct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},pct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),_ct={class:"flex flex-row"},hct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),fct={style:{width:"100%"}},mct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},gct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet search:")],-1)),bct={class:"flex flex-row"},Ect=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),vct={class:"flex flex-row"},yct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),Sct={class:"flex flex-row"},Tct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),xct={class:"flex flex-col"},Cct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),Rct={class:"flex flex-col"},Act=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),wct={class:"flex flex-col"},Nct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),Oct={class:"flex flex-col"},Ict={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Mct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),Dct={class:"flex flex-row"},kct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Lct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),Pct={class:"flex flex-row"},Uct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),Fct={class:"flex flex-row"},Bct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"force_output_language_to_be",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force AI to answer in this language:")],-1)),Gct={class:"flex flex-row"},zct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),Vct={class:"flex flex-row"},Hct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},qct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),Yct={class:"flex flex-row"},$ct=["value"],Wct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Kct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),jct={class:"flex flex-row"},Qct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),Xct={class:"flex flex-row"},Zct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),Jct={class:"flex flex-row"},edt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),tdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),ndt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),idt=["value"],sdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),rdt=["value"],odt={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},adt={class:"flex flex-row p-3"},ldt=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),cdt=[ldt],ddt=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),udt=[ddt],pdt=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1)),_dt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},hdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"summerize_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Continuous Learning from discussions:")],-1)),fdt={class:"flex flex-row"},mdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),gdt={class:"flex flex-row"},bdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),Edt={class:"flex flex-row"},vdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_force_first_chunk",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force adding the first chunk of the file to the context:")],-1)),ydt={class:"flex flex-row"},Sdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),Tdt={class:"flex flex-row"},xdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),Cdt=ie(()=>u("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),Rdt=ie(()=>u("option",{value:"bm25_vectorizer"},"bm25 Vectorizer",-1)),Adt=ie(()=>u("option",{value:"model_embedding"},"Model Embedding",-1)),wdt=ie(()=>u("option",{value:"sentense_transformer"},"Sentense Transformer",-1)),Ndt=[Cdt,Rdt,Adt,wdt],Odt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_sentense_transformer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization model (for Sentense Transformer):")],-1)),Idt={style:{width:"100%"}},Mdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),Ddt=ie(()=>u("option",{value:"PCA"},"PCA",-1)),kdt=ie(()=>u("option",{value:"TSNE"},"TSNE",-1)),Ldt=[Ddt,kdt],Pdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),Udt={class:"flex flex-row"},Fdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),Bdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),Gdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),zdt={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Vdt={class:"flex flex-row p-3"},Hdt=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),qdt=[Hdt],Ydt=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),$dt=[Ydt],Wdt=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Servers configurations",-1)),Kdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},jdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),Qdt={style:{width:"100%"}},Xdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),Zdt={style:{width:"100%"}},Jdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode (deactivates all code exectuion to protect the PC from attacks):")],-1)),eut={style:{width:"100%"}},tut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),nut={style:{width:"100%"}},iut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),sut={style:{width:"100%"}},rut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),out={style:{width:"100%"}},aut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),lut={style:{width:"100%"}},cut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},dut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),uut={class:"flex flex-row"},put=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),_ut=[put],hut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),fut={class:"flex flex-row"},mut=ie(()=>u("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1)),gut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),but={class:"flex flex-row"},Eut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},vut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),yut={class:"flex flex-row"},Sut=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Tut=[Sut],xut=ie(()=>u("td",{style:{"min-width":"200px"}},null,-1)),Cut={class:"flex flex-row"},Rut=ie(()=>u("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1)),Aut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),wut={class:"flex flex-row"},Nut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Out=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Motion Ctrl service:")],-1)),Iut={class:"flex flex-row"},Mut=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Dut=[Mut],kut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Motion Ctrl service:")],-1)),Lut={class:"flex flex-row"},Put=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),Uut={class:"flex flex-row"},Fut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},But=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),Gut={class:"flex flex-row"},zut=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Vut=[zut],Hut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),qut={class:"flex flex-row"},Yut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),$ut={class:"flex flex-row"},Wut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Kut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),jut={class:"flex flex-row"},Qut=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Xut=[Qut],Zut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),Jut={class:"flex flex-row"},ept=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),tpt={class:"flex flex-row"},npt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),ipt={class:"flex flex-col align-bottom"},spt={class:"relative"},rpt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),opt={class:"absolute right-0"},apt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),lpt={class:"flex flex-row"},cpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),dpt={class:"flex flex-row"},upt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),ppt={class:"flex flex-row"},_pt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},hpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),fpt={class:"flex flex-row"},mpt=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),gpt=[mpt],bpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),Ept={class:"flex flex-row"},vpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),ypt={class:"flex flex-row"},Spt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Tpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_voice_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),xpt={class:"flex flex-row"},Cpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),Rpt={class:"flex flex-row"},Apt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),wpt={class:"flex flex-row"},Npt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Opt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_voice_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable voice service:")],-1)),Ipt={class:"flex flex-row"},Mpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_xtts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xTTS service:")],-1)),Dpt={class:"flex flex-row"},kpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"xtts_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts base url:")],-1)),Lpt={class:"flex flex-row"},Ppt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),Upt={class:"flex flex-row"},Fpt=["disabled"],Bpt=["value"],Gpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),zpt={class:"flex flex-row"},Vpt=["disabled"],Hpt=["value"],qpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),Ypt={class:"flex flex-row"},$pt=["disabled"],Wpt={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Kpt={class:"flex flex-row p-3"},jpt=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Qpt=[jpt],Xpt=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Zpt=[Xpt],Jpt=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),e_t={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},t_t=ie(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),n_t={key:1,class:"mr-2"},i_t={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},s_t={class:"flex gap-1 items-center"},r_t=["src"],o_t={class:"font-bold font-large text-lg line-clamp-1"},a_t={key:0,class:"mb-2"},l_t={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},c_t=ie(()=>u("i",{"data-feather":"chevron-up"},null,-1)),d_t=[c_t],u_t=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),p_t=[u_t],__t={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},h_t={class:"flex flex-row p-3"},f_t=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),m_t=[f_t],g_t=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),b_t=[g_t],E_t=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),v_t={class:"flex flex-row items-center"},y_t={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},S_t=ie(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),T_t={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},x_t=ie(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),C_t={key:2,class:"mr-2"},R_t={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},A_t={class:"flex gap-1 items-center"},w_t=["src"],N_t={class:"font-bold font-large text-lg line-clamp-1"},O_t={class:"mx-2 mb-4"},I_t={class:"relative"},M_t={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},D_t={key:0},k_t=ie(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),L_t=[k_t],P_t={key:1},U_t=ie(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),F_t=[U_t],B_t=ie(()=>u("label",{for:"only_installed"},"Show only installed models",-1)),G_t=ie(()=>u("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),z_t={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},V_t=ie(()=>u("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),H_t=ie(()=>u("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),q_t=[V_t,H_t],Y_t={key:1,class:"mb-2"},$_t={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},W_t=ie(()=>u("i",{"data-feather":"chevron-up"},null,-1)),K_t=[W_t],j_t=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Q_t=[j_t],X_t={class:"mb-2"},Z_t={class:"p-2"},J_t={class:"mb-3"},eht=ie(()=>u("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),tht={key:0},nht={class:"mb-3"},iht=ie(()=>u("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),sht={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},rht=ie(()=>u("div",{role:"status",class:"justify-center"},null,-1)),oht={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},aht={class:"w-full p-2"},lht={class:"flex justify-between mb-1"},cht=zu(' Downloading Loading...',1),dht={class:"text-sm font-medium text-blue-700 dark:text-white"},uht=["title"],pht={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},_ht={class:"flex justify-between mb-1"},hht={class:"text-base font-medium text-blue-700 dark:text-white"},fht={class:"text-sm font-medium text-blue-700 dark:text-white"},mht={class:"flex flex-grow"},ght={class:"flex flex-row flex-grow gap-3"},bht={class:"p-2 text-center grow"},Eht={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},vht={class:"flex flex-row p-3 items-center"},yht=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Sht=[yht],Tht=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),xht=[Tht],Cht=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),Rht={key:0,class:"mr-2"},Aht={class:"mr-2 font-bold font-large text-lg line-clamp-1"},wht={key:1,class:"mr-2"},Nht={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},Oht={key:0,class:"flex -space-x-4 items-center"},Iht={class:"group items-center flex flex-row"},Mht=["onClick"],Dht=["src","title"],kht=["onClick"],Lht=ie(()=>u("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),Pht=[Lht],Uht=ie(()=>u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),Fht=[Uht],Bht={class:"mx-2 mb-4"},Ght=ie(()=>u("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),zht={class:"relative"},Vht={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Hht={key:0},qht=ie(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),Yht=[qht],$ht={key:1},Wht=ie(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),Kht=[Wht],jht={key:0,class:"mx-2 mb-4"},Qht={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},Xht=["selected"],Zht={key:0,class:"mb-2"},Jht={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},eft=ie(()=>u("i",{"data-feather":"chevron-up"},null,-1)),tft=[eft],nft=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),ift=[nft],sft={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},rft={class:"flex flex-row p-3 items-center"},oft=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),aft=[oft],lft=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),cft=[lft],dft=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Extensions zoo",-1)),uft={key:0,class:"mr-2"},pft={key:1,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},_ft={key:0,class:"flex -space-x-4 items-center"},hft={class:"group items-center flex flex-row"},fft=["src","title"],mft=["onClick"],gft=ie(()=>u("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),bft=[gft],Eft={class:"mx-2 mb-4"},vft=ie(()=>u("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),yft={class:"relative"},Sft={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Tft={key:0},xft=ie(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),Cft=[xft],Rft={key:1},Aft=ie(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),wft=[Aft],Nft={key:0,class:"mx-2 mb-4"},Oft={for:"extCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},Ift=["selected"],Mft={key:0,class:"mb-2"},Dft={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},kft=ie(()=>u("i",{"data-feather":"chevron-up"},null,-1)),Lft=[kft],Pft=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Uft=[Pft],Fft={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Bft={class:"flex flex-row p-3 items-center"},Gft=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),zft=[Gft],Vft=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Hft=[Vft],qft=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Mounted Extensions Priority",-1)),Yft={class:"flex flex-col mb-2 p-3 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},$ft={class:"flex flex-row"},Wft=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Kft=[Wft],jft=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Qft=[jft],Xft=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),Zft={class:"m-2"},Jft={class:"flex flex-row gap-2 items-center"},emt=ie(()=>u("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),tmt={class:"m-2"},nmt=ie(()=>u("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),imt={class:"m-2"},smt={class:"flex flex-col align-bottom"},rmt={class:"relative"},omt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),amt={class:"absolute right-0"},lmt={class:"m-2"},cmt={class:"flex flex-col align-bottom"},dmt={class:"relative"},umt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),pmt={class:"absolute right-0"},_mt={class:"m-2"},hmt={class:"flex flex-col align-bottom"},fmt={class:"relative"},mmt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),gmt={class:"absolute right-0"},bmt={class:"m-2"},Emt={class:"flex flex-col align-bottom"},vmt={class:"relative"},ymt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),Smt={class:"absolute right-0"},Tmt={class:"m-2"},xmt={class:"flex flex-col align-bottom"},Cmt={class:"relative"},Rmt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),Amt={class:"absolute right-0"},wmt={class:"m-2"},Nmt={class:"flex flex-col align-bottom"},Omt={class:"relative"},Imt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),Mmt={class:"absolute right-0"};function Dmt(n,e,t,i,s,r){const o=ht("Card"),a=ht("BindingEntry"),l=ht("RadioOptions"),d=ht("model-entry"),c=ht("personality-entry"),_=ht("ExtensionEntry"),f=ht("AddModelDialog"),m=ht("ChoiceDialog");return w(),M($e,null,[u("div",Oot,[u("div",Iot,[s.showConfirmation?(w(),M("div",Mot,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=Te(h=>s.showConfirmation=!1,["stop"]))},kot),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=Te(h=>r.save_configuration(),["stop"]))},Pot)])):q("",!0),s.showConfirmation?q("",!0):(w(),M("div",Uot,[u("button",{title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=h=>s.showConfirmation=!0)},Bot),u("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[3]||(e[3]=h=>r.reset_configuration())},zot),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[4]||(e[4]=Te(h=>s.all_collapsed=!s.all_collapsed,["stop"]))},Hot)])),u("div",qot,[u("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=h=>r.api_get_req("clear_uploads").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},$ot),u("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=h=>r.api_get_req("restart_program").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},Kot),u("button",{title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[7]||(e[7]=h=>r.api_get_req("update_software").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},[jot,s.has_updates?(w(),M("div",Qot,Zot)):q("",!0)]),u("div",Jot,[s.settingsChanged?(w(),M("div",eat,[tat,s.isLoading?q("",!0):(w(),M("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[8]||(e[8]=Te(h=>r.applyConfiguration(),["stop"]))},iat))])):q("",!0),s.isLoading?(w(),M("div",sat,[u("p",null,fe(s.loading_text),1),rat,oat])):q("",!0)])])]),u("div",{class:He(s.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[u("div",aat,[u("div",lat,[u("button",{onClick:e[9]||(e[9]=Te(h=>s.sc_collapsed=!s.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ne(u("div",null,dat,512),[[Ot,s.sc_collapsed]]),ne(u("div",null,pat,512),[[Ot,!s.sc_collapsed]]),_at,hat,u("div",fat,[u("div",mat,[u("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(w(),M("div",gat,[(w(!0),M($e,null,dt(r.vramUsage.gpus,h=>(w(),M("div",{class:"flex gap-2 items-center",key:h},[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,bat),u("h3",Eat,[u("div",null,fe(r.computedFileSize(h.used_vram))+" / "+fe(r.computedFileSize(h.total_vram))+" ("+fe(h.percentage)+"%) ",1)])]))),128))])):q("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(w(),M("div",vat,[u("div",yat,[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,Sat),u("h3",Tat,[u("div",null,fe(r.vramUsage.gpus.length)+"x ",1)])])])):q("",!0)]),xat,u("h3",Cat,[u("div",null,fe(r.ram_usage)+" / "+fe(r.ram_total_space)+" ("+fe(r.ram_percent_usage)+"%)",1)]),Rat,u("h3",Aat,[u("div",null,fe(r.disk_binding_models_usage)+" / "+fe(r.disk_total_space)+" ("+fe(r.disk_percent_usage)+"%)",1)])])])])]),u("div",{class:He([{hidden:s.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",wat,[Nat,u("div",Oat,[u("div",null,[Iat,je(fe(r.ram_available_space),1)]),u("div",null,[Mat,je(" "+fe(r.ram_usage)+" / "+fe(r.ram_total_space)+" ("+fe(r.ram_percent_usage)+")% ",1)])]),u("div",Dat,[u("div",kat,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+r.ram_percent_usage+"%;")},null,4)])])]),u("div",Lat,[Pat,u("div",Uat,[u("div",null,[Fat,je(fe(r.disk_available_space),1)]),u("div",null,[Bat,je(" "+fe(r.disk_binding_models_usage)+" / "+fe(r.disk_total_space)+" ("+fe(r.disk_percent_usage)+"%)",1)])]),u("div",Gat,[u("div",zat,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(w(!0),M($e,null,dt(r.vramUsage.gpus,h=>(w(),M("div",{class:"mb-2",key:h},[u("label",Vat,[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,Hat),je(" GPU usage: ")]),u("div",qat,[u("div",null,[Yat,je(fe(h.gpu_model),1)]),u("div",null,[$at,je(fe(this.computedFileSize(h.available_space)),1)]),u("div",null,[Wat,je(" "+fe(this.computedFileSize(h.used_vram))+" / "+fe(this.computedFileSize(h.total_vram))+" ("+fe(h.percentage)+"%)",1)])]),u("div",Kat,[u("div",jat,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+h.percentage+"%;")},null,4)])])]))),128))],2)]),u("div",Qat,[u("div",Xat,[u("button",{onClick:e[10]||(e[10]=Te(h=>s.minconf_collapsed=!s.minconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ne(u("div",null,Jat,512),[[Ot,s.minconf_collapsed]]),ne(u("div",null,tlt,512),[[Ot,!s.minconf_collapsed]]),nlt])]),u("div",{class:He([{hidden:s.minconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",ilt,[Oe(o,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",slt,[u("tr",null,[rlt,u("td",olt,[u("div",alt,[ne(u("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[11]||(e[11]=h=>r.configFile.hardware_mode=h),onChange:e[12]||(e[12]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},mlt,544),[[zn,r.configFile.hardware_mode]])])])]),u("tr",null,[glt,u("td",blt,[ne(u("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[13]||(e[13]=h=>r.configFile.discussion_db_name=h),onChange:e[14]||(e[14]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.discussion_db_name]])])]),u("tr",null,[Elt,u("td",null,[u("div",vlt,[ne(u("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[15]||(e[15]=h=>r.configFile.copy_to_clipboard_add_all_details=h),onChange:e[16]||(e[16]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.copy_to_clipboard_add_all_details]])])])]),u("tr",null,[ylt,u("td",null,[u("div",Slt,[ne(u("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[17]||(e[17]=h=>r.configFile.auto_show_browser=h),onChange:e[18]||(e[18]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.auto_show_browser]])])])]),u("tr",null,[Tlt,u("td",null,[u("div",xlt,[ne(u("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[19]||(e[19]=h=>r.configFile.debug=h),onChange:e[20]||(e[20]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.debug]])])])]),u("tr",null,[Clt,u("td",null,[u("div",Rlt,[ne(u("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[21]||(e[21]=h=>r.configFile.debug_log_file_path=h),onChange:e[22]||(e[22]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.debug_log_file_path]])])])]),u("tr",null,[Alt,u("td",null,[u("div",wlt,[ne(u("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[23]||(e[23]=h=>r.configFile.show_news_panel=h),onChange:e[24]||(e[24]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.show_news_panel]])])])]),u("tr",null,[Nlt,u("td",null,[u("div",Olt,[ne(u("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[25]||(e[25]=h=>r.configFile.auto_save=h),onChange:e[26]||(e[26]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.auto_save]])])])]),u("tr",null,[Ilt,u("td",null,[u("div",Mlt,[ne(u("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[27]||(e[27]=h=>r.configFile.auto_update=h),onChange:e[28]||(e[28]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.auto_update]])])])]),u("tr",null,[Dlt,u("td",null,[u("div",klt,[ne(u("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[29]||(e[29]=h=>r.configFile.auto_title=h),onChange:e[30]||(e[30]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.auto_title]])])])])])]),_:1}),Oe(o,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Llt,[u("tr",null,[Plt,u("td",Ult,[ne(u("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[31]||(e[31]=h=>r.configFile.user_name=h),onChange:e[32]||(e[32]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.user_name]])])]),u("tr",null,[Flt,u("td",Blt,[ne(u("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[33]||(e[33]=h=>r.configFile.user_description=h),onChange:e[34]||(e[34]=h=>s.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.user_description]])])]),u("tr",null,[Glt,u("td",zlt,[ne(u("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[35]||(e[35]=h=>r.configFile.use_user_informations_in_discussion=h),onChange:e[36]||(e[36]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.use_user_informations_in_discussion]])])]),u("tr",null,[Vlt,u("td",Hlt,[ne(u("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[37]||(e[37]=h=>r.configFile.use_model_name_in_discussions=h),onChange:e[38]||(e[38]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.use_model_name_in_discussions]])])]),u("tr",null,[qlt,u("td",Ylt,[u("label",$lt,[u("img",{src:"/user_infos/"+r.configFile.user_avatar,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,Wlt)]),u("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[39]||(e[39]=(...h)=>r.uploadAvatar&&r.uploadAvatar(...h))},null,32)])]),u("tr",null,[Klt,u("td",null,[u("div",jlt,[ne(u("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[40]||(e[40]=h=>r.configFile.use_user_name_in_discussions=h),onChange:e[41]||(e[41]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.use_user_name_in_discussions]])])])]),u("tr",null,[Qlt,u("td",Xlt,[ne(u("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[42]||(e[42]=h=>r.configFile.min_n_predict=h),onChange:e[43]||(e[43]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.min_n_predict]])])]),u("tr",null,[Zlt,u("td",Jlt,[ne(u("input",{type:"number",id:"min_n_predict",required:"","onUpdate:modelValue":e[44]||(e[44]=h=>r.configFile.min_n_predict=h),onChange:e[45]||(e[45]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.min_n_predict]])])])])]),_:1}),Oe(o,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",ect,[u("tr",null,[tct,u("td",nct,[ne(u("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[46]||(e[46]=h=>r.configFile.turn_on_code_execution=h),onChange:e[47]||(e[47]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.turn_on_code_execution]])])]),u("tr",null,[ict,u("td",sct,[ne(u("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[48]||(e[48]=h=>r.configFile.turn_on_code_validation=h),onChange:e[49]||(e[49]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.turn_on_code_validation]])])]),u("tr",null,[rct,u("td",oct,[ne(u("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[50]||(e[50]=h=>r.configFile.turn_on_setting_update_validation=h),onChange:e[51]||(e[51]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.turn_on_setting_update_validation]])])]),u("tr",null,[act,u("td",lct,[ne(u("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[52]||(e[52]=h=>r.configFile.turn_on_open_file_validation=h),onChange:e[53]||(e[53]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.turn_on_open_file_validation]])])]),u("tr",null,[cct,u("td",dct,[ne(u("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[54]||(e[54]=h=>r.configFile.turn_on_send_file_validation=h),onChange:e[55]||(e[55]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.turn_on_send_file_validation]])])])])]),_:1}),Oe(o,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",uct,[u("tr",null,[pct,u("td",null,[u("div",_ct,[ne(u("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[56]||(e[56]=h=>r.configFile.activate_skills_lib=h),onChange:e[57]||(e[57]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_skills_lib]])])])]),u("tr",null,[hct,u("td",fct,[ne(u("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[58]||(e[58]=h=>r.configFile.skills_lib_database_name=h),onChange:e[59]||(e[59]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.skills_lib_database_name]])])])])]),_:1}),Oe(o,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",mct,[u("tr",null,[gct,u("td",null,[u("div",bct,[ne(u("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[60]||(e[60]=h=>r.configFile.activate_internet_search=h),onChange:e[61]||(e[61]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_internet_search]])])])]),u("tr",null,[Ect,u("td",null,[u("div",vct,[ne(u("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[62]||(e[62]=h=>r.configFile.internet_quick_search=h),onChange:e[63]||(e[63]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.internet_quick_search]])])])]),u("tr",null,[yct,u("td",null,[u("div",Sct,[ne(u("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[64]||(e[64]=h=>r.configFile.internet_activate_search_decision=h),onChange:e[65]||(e[65]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.internet_activate_search_decision]])])])]),u("tr",null,[Tct,u("td",null,[u("div",xct,[ne(u("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[66]||(e[66]=h=>r.configFile.internet_vectorization_chunk_size=h),onChange:e[67]||(e[67]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.internet_vectorization_chunk_size]]),ne(u("input",{"onUpdate:modelValue":e[68]||(e[68]=h=>r.configFile.internet_vectorization_chunk_size=h),type:"number",onChange:e[69]||(e[69]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.internet_vectorization_chunk_size]])])])]),u("tr",null,[Cct,u("td",null,[u("div",Rct,[ne(u("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[70]||(e[70]=h=>r.configFile.internet_vectorization_overlap_size=h),onChange:e[71]||(e[71]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.internet_vectorization_overlap_size]]),ne(u("input",{"onUpdate:modelValue":e[72]||(e[72]=h=>r.configFile.internet_vectorization_overlap_size=h),type:"number",onChange:e[73]||(e[73]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.internet_vectorization_overlap_size]])])])]),u("tr",null,[Act,u("td",null,[u("div",wct,[ne(u("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[74]||(e[74]=h=>r.configFile.internet_vectorization_nb_chunks=h),onChange:e[75]||(e[75]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.internet_vectorization_nb_chunks]]),ne(u("input",{"onUpdate:modelValue":e[76]||(e[76]=h=>r.configFile.internet_vectorization_nb_chunks=h),type:"number",onChange:e[77]||(e[77]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.internet_vectorization_nb_chunks]])])])]),u("tr",null,[Nct,u("td",null,[u("div",Oct,[ne(u("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[78]||(e[78]=h=>r.configFile.internet_nb_search_pages=h),onChange:e[79]||(e[79]=h=>s.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.internet_nb_search_pages]]),ne(u("input",{"onUpdate:modelValue":e[80]||(e[80]=h=>r.configFile.internet_nb_search_pages=h),type:"number",onChange:e[81]||(e[81]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.internet_nb_search_pages]])])])])])]),_:1}),Oe(o,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Ict,[u("tr",null,[Mct,u("td",null,[u("div",Dct,[ne(u("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[82]||(e[82]=h=>r.configFile.pdf_latex_path=h),onChange:e[83]||(e[83]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.pdf_latex_path]])])])])])]),_:1}),Oe(o,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",kct,[u("tr",null,[Lct,u("td",null,[u("div",Pct,[ne(u("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[84]||(e[84]=h=>r.configFile.positive_boost=h),onChange:e[85]||(e[85]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.positive_boost]])])])]),u("tr",null,[Uct,u("td",null,[u("div",Fct,[ne(u("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[86]||(e[86]=h=>r.configFile.negative_boost=h),onChange:e[87]||(e[87]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.negative_boost]])])])]),u("tr",null,[Bct,u("td",null,[u("div",Gct,[ne(u("input",{type:"text",id:"force_output_language_to_be",required:"","onUpdate:modelValue":e[88]||(e[88]=h=>r.configFile.force_output_language_to_be=h),onChange:e[89]||(e[89]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.force_output_language_to_be]])])])]),u("tr",null,[zct,u("td",null,[u("div",Vct,[ne(u("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[90]||(e[90]=h=>r.configFile.fun_mode=h),onChange:e[91]||(e[91]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.fun_mode]])])])])])]),_:1}),Oe(o,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Hct,[u("tr",null,[qct,u("td",null,[u("div",Yct,[ne(u("select",{id:"whisper_model","onUpdate:modelValue":e[92]||(e[92]=h=>r.configFile.whisper_model=h),onChange:e[93]||(e[93]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(w(!0),M($e,null,dt(r.whisperModels,h=>(w(),M("option",{key:h,value:h},fe(h),9,$ct))),128))],544),[[zn,r.configFile.whisper_model]])])])])])]),_:1}),Oe(o,{title:"Browser Audio",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Wct,[u("tr",null,[Kct,u("td",null,[u("div",jct,[ne(u("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[94]||(e[94]=h=>r.configFile.activate_audio_infos=h),onChange:e[95]||(e[95]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_audio_infos]])])])]),u("tr",null,[Qct,u("td",null,[u("div",Xct,[ne(u("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[96]||(e[96]=h=>r.configFile.audio_auto_send_input=h),onChange:e[97]||(e[97]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.audio_auto_send_input]])])])]),u("tr",null,[Zct,u("td",null,[u("div",Jct,[ne(u("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[98]||(e[98]=h=>r.configFile.auto_speak=h),onChange:e[99]||(e[99]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.auto_speak]])])])]),u("tr",null,[edt,u("td",null,[ne(u("input",{id:"audio_pitch","onUpdate:modelValue":e[100]||(e[100]=h=>r.configFile.audio_pitch=h),onChange:e[101]||(e[101]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.audio_pitch]]),ne(u("input",{"onUpdate:modelValue":e[102]||(e[102]=h=>r.configFile.audio_pitch=h),onChange:e[103]||(e[103]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.audio_pitch]])])]),u("tr",null,[tdt,u("td",null,[ne(u("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[104]||(e[104]=h=>r.configFile.audio_silenceTimer=h),onChange:e[105]||(e[105]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.audio_silenceTimer]]),ne(u("input",{"onUpdate:modelValue":e[106]||(e[106]=h=>r.configFile.audio_silenceTimer=h),onChange:e[107]||(e[107]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.audio_silenceTimer]])])]),u("tr",null,[ndt,u("td",null,[ne(u("select",{id:"audio_in_language","onUpdate:modelValue":e[108]||(e[108]=h=>r.configFile.audio_in_language=h),onChange:e[109]||(e[109]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(w(!0),M($e,null,dt(r.audioLanguages,h=>(w(),M("option",{key:h.code,value:h.code},fe(h.name),9,idt))),128))],544),[[zn,r.configFile.audio_in_language]])])]),u("tr",null,[sdt,u("td",null,[ne(u("select",{id:"audio_out_voice","onUpdate:modelValue":e[110]||(e[110]=h=>r.configFile.audio_out_voice=h),onChange:e[111]||(e[111]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(w(!0),M($e,null,dt(s.audioVoices,h=>(w(),M("option",{key:h.name,value:h.name},fe(h.name),9,rdt))),128))],544),[[zn,r.configFile.audio_out_voice]])])])])]),_:1})])],2)]),u("div",odt,[u("div",adt,[u("button",{onClick:e[112]||(e[112]=Te(h=>s.data_conf_collapsed=!s.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ne(u("div",null,cdt,512),[[Ot,s.data_conf_collapsed]]),ne(u("div",null,udt,512),[[Ot,!s.data_conf_collapsed]]),pdt])]),u("div",{class:He([{hidden:s.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Oe(o,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",_dt,[u("tr",null,[hdt,u("td",null,[u("div",fdt,[ne(u("input",{type:"checkbox",id:"summerize_discussion",required:"","onUpdate:modelValue":e[113]||(e[113]=h=>r.configFile.summerize_discussion=h),onChange:e[114]||(e[114]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.summerize_discussion]])])])]),u("tr",null,[mdt,u("td",null,[u("div",gdt,[ne(u("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[115]||(e[115]=h=>r.configFile.data_vectorization_visualize_on_vectorization=h),onChange:e[116]||(e[116]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.data_vectorization_visualize_on_vectorization]])])])]),u("tr",null,[bdt,u("td",null,[u("div",Edt,[ne(u("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[117]||(e[117]=h=>r.configFile.data_vectorization_build_keys_words=h),onChange:e[118]||(e[118]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.data_vectorization_build_keys_words]])])])]),u("tr",null,[vdt,u("td",null,[u("div",ydt,[ne(u("input",{type:"checkbox",id:"data_vectorization_force_first_chunk",required:"","onUpdate:modelValue":e[119]||(e[119]=h=>r.configFile.data_vectorization_force_first_chunk=h),onChange:e[120]||(e[120]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.data_vectorization_force_first_chunk]])])])]),u("tr",null,[Sdt,u("td",null,[u("div",Tdt,[ne(u("input",{type:"checkbox",id:"data_vectorization_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[121]||(e[121]=h=>r.configFile.data_vectorization_put_chunk_informations_into_context=h),onChange:e[122]||(e[122]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.data_vectorization_put_chunk_informations_into_context]])])])]),u("tr",null,[xdt,u("td",null,[ne(u("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[123]||(e[123]=h=>r.configFile.data_vectorization_method=h),onChange:e[124]||(e[124]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Ndt,544),[[zn,r.configFile.data_vectorization_method]])])]),u("tr",null,[Odt,u("td",Idt,[ne(u("input",{type:"text",id:"data_vectorization_sentense_transformer_model",required:"","onUpdate:modelValue":e[125]||(e[125]=h=>r.configFile.data_vectorization_sentense_transformer_model=h),onChange:e[126]||(e[126]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.data_vectorization_sentense_transformer_model]])])]),u("tr",null,[Mdt,u("td",null,[ne(u("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[127]||(e[127]=h=>r.configFile.data_visualization_method=h),onChange:e[128]||(e[128]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Ldt,544),[[zn,r.configFile.data_visualization_method]])])]),u("tr",null,[Pdt,u("td",null,[u("div",Udt,[ne(u("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[129]||(e[129]=h=>r.configFile.data_vectorization_save_db=h),onChange:e[130]||(e[130]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.data_vectorization_save_db]])])])]),u("tr",null,[Fdt,u("td",null,[ne(u("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[131]||(e[131]=h=>r.configFile.data_vectorization_chunk_size=h),onChange:e[132]||(e[132]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.data_vectorization_chunk_size]]),ne(u("input",{"onUpdate:modelValue":e[133]||(e[133]=h=>r.configFile.data_vectorization_chunk_size=h),type:"number",onChange:e[134]||(e[134]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.data_vectorization_chunk_size]])])]),u("tr",null,[Bdt,u("td",null,[ne(u("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[135]||(e[135]=h=>r.configFile.data_vectorization_overlap_size=h),onChange:e[136]||(e[136]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.data_vectorization_overlap_size]]),ne(u("input",{"onUpdate:modelValue":e[137]||(e[137]=h=>r.configFile.data_vectorization_overlap_size=h),type:"number",onChange:e[138]||(e[138]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.data_vectorization_overlap_size]])])]),u("tr",null,[Gdt,u("td",null,[ne(u("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[139]||(e[139]=h=>r.configFile.data_vectorization_nb_chunks=h),onChange:e[140]||(e[140]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.data_vectorization_nb_chunks]]),ne(u("input",{"onUpdate:modelValue":e[141]||(e[141]=h=>r.configFile.data_vectorization_nb_chunks=h),type:"number",onChange:e[142]||(e[142]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1})],2)]),u("div",zdt,[u("div",Vdt,[u("button",{onClick:e[143]||(e[143]=Te(h=>s.servers_conf_collapsed=!s.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ne(u("div",null,qdt,512),[[Ot,s.servers_conf_collapsed]]),ne(u("div",null,$dt,512),[[Ot,!s.servers_conf_collapsed]]),Wdt])]),u("div",{class:He([{hidden:s.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Oe(o,{title:"Lollms service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Kdt,[u("tr",null,[jdt,u("td",Qdt,[ne(u("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[144]||(e[144]=h=>r.configFile.host=h),onChange:e[145]||(e[145]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.host]])])]),u("tr",null,[Xdt,u("td",Zdt,[ne(u("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[146]||(e[146]=h=>r.configFile.port=h),onChange:e[147]||(e[147]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.port]])])]),u("tr",null,[Jdt,u("td",eut,[ne(u("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[148]||(e[148]=h=>r.configFile.headless_server_mode=h),onChange:e[149]||(e[149]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[lt,r.configFile.headless_server_mode]])])]),u("tr",null,[tut,u("td",nut,[ne(u("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[150]||(e[150]=h=>r.configFile.activate_lollms_server=h),onChange:e[151]||(e[151]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_lollms_server]])])]),u("tr",null,[iut,u("td",sut,[ne(u("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[152]||(e[152]=h=>r.configFile.activate_ollama_emulator=h),onChange:e[153]||(e[153]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_ollama_emulator]])])]),u("tr",null,[rut,u("td",out,[ne(u("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[154]||(e[154]=h=>r.configFile.activate_openai_emulator=h),onChange:e[155]||(e[155]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_openai_emulator]])])]),u("tr",null,[aut,u("td",lut,[ne(u("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[156]||(e[156]=h=>r.configFile.activate_mistralai_emulator=h),onChange:e[157]||(e[157]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_mistralai_emulator]])])])])]),_:1}),Oe(o,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",cut,[u("tr",null,[dut,u("td",null,[u("div",uut,[ne(u("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[158]||(e[158]=h=>r.configFile.enable_sd_service=h),onChange:e[159]||(e[159]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_sd_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[160]||(e[160]=h=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},_ut)])]),u("tr",null,[hut,u("td",null,[u("div",fut,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[161]||(e[161]=(...h)=>r.reinstallSDService&&r.reinstallSDService(...h))},"install sd service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[162]||(e[162]=(...h)=>r.upgradeSDService&&r.upgradeSDService(...h))},"upgrade sd service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[163]||(e[163]=(...h)=>r.startSDService&&r.startSDService(...h))},"start sd service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[164]||(e[164]=(...h)=>r.showSD&&r.showSD(...h))},"show sd ui"),mut])])]),u("tr",null,[gut,u("td",null,[u("div",but,[ne(u("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[165]||(e[165]=h=>r.configFile.sd_base_url=h),onChange:e[166]||(e[166]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.sd_base_url]])])])])])]),_:1}),Oe(o,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Eut,[u("tr",null,[vut,u("td",null,[u("div",yut,[ne(u("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[167]||(e[167]=h=>r.configFile.enable_comfyui_service=h),onChange:e[168]||(e[168]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_comfyui_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[169]||(e[169]=h=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Tut)])]),u("tr",null,[xut,u("td",null,[u("div",Cut,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[170]||(e[170]=(...h)=>r.reinstallComfyUIService&&r.reinstallComfyUIService(...h))},"install comfyui service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[171]||(e[171]=(...h)=>r.upgradeComfyUIService&&r.upgradeComfyUIService(...h))},"upgrade comfyui service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[172]||(e[172]=(...h)=>r.startComfyUIService&&r.startComfyUIService(...h))},"start comfyui service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[173]||(e[173]=(...h)=>r.showComfyui&&r.showComfyui(...h))},"show comfyui"),Rut])])]),u("tr",null,[Aut,u("td",null,[u("div",wut,[ne(u("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[174]||(e[174]=h=>r.configFile.comfyui_base_url=h),onChange:e[175]||(e[175]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.comfyui_base_url]])])])])])]),_:1}),Oe(o,{title:"Motion Ctrl service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Nut,[u("tr",null,[Out,u("td",null,[u("div",Iut,[ne(u("input",{type:"checkbox",id:"enable_motion_ctrl_service",required:"","onUpdate:modelValue":e[176]||(e[176]=h=>r.configFile.enable_motion_ctrl_service=h),onChange:e[177]||(e[177]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_motion_ctrl_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[178]||(e[178]=h=>this.$store.state.messageBox.showMessage("Activates Motion ctrl service. The service will be automatically loaded at startup alowing you to use the motoin control endpoint to generate videos"))},Dut)])]),u("tr",null,[kut,u("td",null,[u("div",Lut,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[179]||(e[179]=(...h)=>r.reinstallMotionCtrlService&&r.reinstallMotionCtrlService(...h))},"install Motion Ctrl service")])])]),u("tr",null,[Put,u("td",null,[u("div",Uut,[ne(u("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[180]||(e[180]=h=>r.configFile.sd_base_url=h),onChange:e[181]||(e[181]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.sd_base_url]])])])])])]),_:1}),Oe(o,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Fut,[u("tr",null,[But,u("td",null,[u("div",Gut,[ne(u("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[182]||(e[182]=h=>r.configFile.enable_ollama_service=h),onChange:e[183]||(e[183]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_ollama_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[184]||(e[184]=h=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. +You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},ie=n=>(Nr("data-v-83865e3b"),n=n(),Or(),n),Oot={class:"container overflow-y-scroll flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},Iot={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},Mot={key:0,class:"flex gap-3 flex-1 items-center duration-75"},Dot=ie(()=>u("i",{"data-feather":"x"},null,-1)),kot=[Dot],Lot=ie(()=>u("i",{"data-feather":"check"},null,-1)),Pot=[Lot],Uot={key:1,class:"flex gap-3 flex-1 items-center"},Fot=ie(()=>u("i",{"data-feather":"save"},null,-1)),Bot=[Fot],Got=ie(()=>u("i",{"data-feather":"refresh-ccw"},null,-1)),zot=[Got],Vot=ie(()=>u("i",{"data-feather":"list"},null,-1)),Hot=[Vot],qot={class:"flex gap-3 flex-1 items-center justify-end"},Yot=ie(()=>u("i",{"data-feather":"trash-2"},null,-1)),$ot=[Yot],Wot=ie(()=>u("i",{"data-feather":"refresh-ccw"},null,-1)),Kot=[Wot],jot=ie(()=>u("i",{"data-feather":"arrow-up-circle"},null,-1)),Qot={key:0},Xot=ie(()=>u("i",{"data-feather":"alert-circle"},null,-1)),Zot=[Xot],Jot={class:"flex gap-3 items-center"},eat={key:0,class:"flex gap-3 items-center"},tat=ie(()=>u("p",{class:"text-red-600 font-bold"},"Apply changes:",-1)),nat=ie(()=>u("i",{"data-feather":"check"},null,-1)),iat=[nat],sat={key:1,role:"status"},rat=ie(()=>u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),oat=ie(()=>u("span",{class:"sr-only"},"Loading...",-1)),aat={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},lat={class:"flex flex-row p-3"},cat=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),dat=[cat],uat=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),pat=[uat],_at=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),hat=ie(()=>u("div",{class:"mr-2"},"|",-1)),fat={class:"text-base font-semibold cursor-pointer select-none items-center"},mat={class:"flex gap-2 items-center"},gat={key:0},bat=["src"],Eat={class:"font-bold font-large text-lg"},vat={key:1},yat={class:"flex gap-2 items-center"},Sat=["src"],Tat={class:"font-bold font-large text-lg"},xat=ie(()=>u("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),Cat={class:"font-bold font-large text-lg"},Rat=ie(()=>u("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),Aat={class:"font-bold font-large text-lg"},wat={class:"mb-2"},Nat=ie(()=>u("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[u("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[u("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),je(" CPU Ram usage: ")],-1)),Oat={class:"flex flex-col mx-2"},Iat=ie(()=>u("b",null,"Avaliable ram: ",-1)),Mat=ie(()=>u("b",null,"Ram usage: ",-1)),Dat={class:"p-2"},kat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Lat={class:"mb-2"},Pat=ie(()=>u("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[u("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),je(" Disk usage: ")],-1)),Uat={class:"flex flex-col mx-2"},Fat=ie(()=>u("b",null,"Avaliable disk space: ",-1)),Bat=ie(()=>u("b",null,"Disk usage: ",-1)),Gat={class:"p-2"},zat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Vat={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Hat=["src"],qat={class:"flex flex-col mx-2"},Yat=ie(()=>u("b",null,"Model: ",-1)),$at=ie(()=>u("b",null,"Avaliable vram: ",-1)),Wat=ie(()=>u("b",null,"GPU usage: ",-1)),Kat={class:"p-2"},jat={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Qat={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Xat={class:"flex flex-row p-3"},Zat=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Jat=[Zat],elt=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),tlt=[elt],nlt=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),ilt={class:"flex flex-col mb-2 px-3 pb-2"},slt={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},rlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),olt={class:"text-center items-center"},alt={class:"flex flex-row"},llt=ie(()=>u("option",{value:"cpu"},"CPU",-1)),clt=ie(()=>u("option",{value:"cpu-noavx"},"CPU (No AVX)",-1)),dlt=ie(()=>u("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1)),ult=ie(()=>u("option",{value:"nvidia"},"NVIDIA",-1)),plt=ie(()=>u("option",{value:"amd-noavx"},"AMD (No AVX)",-1)),_lt=ie(()=>u("option",{value:"amd"},"AMD",-1)),hlt=ie(()=>u("option",{value:"apple-intel"},"Apple Intel",-1)),flt=ie(()=>u("option",{value:"apple-silicon"},"Apple Silicon",-1)),mlt=[llt,clt,dlt,ult,plt,_lt,hlt,flt],glt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),blt={style:{width:"100%"}},Elt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),vlt={class:"flex flex-row"},ylt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),Slt={class:"flex flex-row"},Tlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),xlt={class:"flex flex-row"},Clt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),Rlt={class:"flex flex-row"},Alt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),wlt={class:"flex flex-row"},Nlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),Olt={class:"flex flex-row"},Ilt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),Mlt={class:"flex flex-row"},Dlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),klt={class:"flex flex-row"},Llt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Plt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),Ult={style:{width:"100%"}},Flt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),Blt={style:{width:"100%"}},Glt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),zlt={style:{width:"100%"}},Vlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),Hlt={style:{width:"100%"}},qlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),Ylt={style:{width:"100%"}},$lt={for:"avatar-upload"},Wlt=["src"],Klt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),jlt={class:"flex flex-row"},Qlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),Xlt={style:{width:"100%"}},Zlt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"min_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),Jlt={style:{width:"100%"}},ect={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},tct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),nct={style:{width:"100%"}},ict=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),sct={style:{width:"100%"}},rct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),oct={style:{width:"100%"}},act=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),lct={style:{width:"100%"}},cct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),dct={style:{width:"100%"}},uct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},pct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),_ct={class:"flex flex-row"},hct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),fct={style:{width:"100%"}},mct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},gct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet search:")],-1)),bct={class:"flex flex-row"},Ect=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),vct={class:"flex flex-row"},yct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),Sct={class:"flex flex-row"},Tct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),xct={class:"flex flex-col"},Cct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),Rct={class:"flex flex-col"},Act=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),wct={class:"flex flex-col"},Nct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),Oct={class:"flex flex-col"},Ict={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Mct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),Dct={class:"flex flex-row"},kct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Lct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),Pct={class:"flex flex-row"},Uct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),Fct={class:"flex flex-row"},Bct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"force_output_language_to_be",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force AI to answer in this language:")],-1)),Gct={class:"flex flex-row"},zct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),Vct={class:"flex flex-row"},Hct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},qct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),Yct={class:"flex flex-row"},$ct=["value"],Wct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Kct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),jct={class:"flex flex-row"},Qct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),Xct={class:"flex flex-row"},Zct=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),Jct={class:"flex flex-row"},edt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),tdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),ndt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),idt=["value"],sdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),rdt=["value"],odt={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},adt={class:"flex flex-row p-3"},ldt=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),cdt=[ldt],ddt=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),udt=[ddt],pdt=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1)),_dt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},hdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"summerize_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Continuous Learning from discussions:")],-1)),fdt={class:"flex flex-row"},mdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),gdt={class:"flex flex-row"},bdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),Edt={class:"flex flex-row"},vdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_force_first_chunk",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force adding the first chunk of the file to the context:")],-1)),ydt={class:"flex flex-row"},Sdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),Tdt={class:"flex flex-row"},xdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),Cdt=ie(()=>u("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),Rdt=ie(()=>u("option",{value:"bm25_vectorizer"},"bm25 Vectorizer",-1)),Adt=ie(()=>u("option",{value:"model_embedding"},"Model Embedding",-1)),wdt=ie(()=>u("option",{value:"sentense_transformer"},"Sentense Transformer",-1)),Ndt=[Cdt,Rdt,Adt,wdt],Odt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_sentense_transformer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization model (for Sentense Transformer):")],-1)),Idt={style:{width:"100%"}},Mdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),Ddt=ie(()=>u("option",{value:"PCA"},"PCA",-1)),kdt=ie(()=>u("option",{value:"TSNE"},"TSNE",-1)),Ldt=[Ddt,kdt],Pdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),Udt={class:"flex flex-row"},Fdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),Bdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),Gdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),zdt={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Vdt={class:"flex flex-row p-3"},Hdt=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),qdt=[Hdt],Ydt=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),$dt=[Ydt],Wdt=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Servers configurations",-1)),Kdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},jdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),Qdt={style:{width:"100%"}},Xdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys (coma separated, if empty, anyone can use the server without authentication):")],-1)),Zdt={style:{width:"100%"}},Jdt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),eut={style:{width:"100%"}},tut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode (deactivates all code exectuion to protect the PC from attacks):")],-1)),nut={style:{width:"100%"}},iut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),sut={style:{width:"100%"}},rut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),out={style:{width:"100%"}},aut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),lut={style:{width:"100%"}},cut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),dut={style:{width:"100%"}},uut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},put=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),_ut={class:"flex flex-row"},hut=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),fut=[hut],mut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),gut={class:"flex flex-row"},but=ie(()=>u("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1)),Eut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),vut={class:"flex flex-row"},yut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Sut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),Tut={class:"flex flex-row"},xut=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Cut=[xut],Rut=ie(()=>u("td",{style:{"min-width":"200px"}},null,-1)),Aut={class:"flex flex-row"},wut=ie(()=>u("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1)),Nut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),Out={class:"flex flex-row"},Iut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Mut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Motion Ctrl service:")],-1)),Dut={class:"flex flex-row"},kut=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Lut=[kut],Put=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Motion Ctrl service:")],-1)),Uut={class:"flex flex-row"},Fut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),But={class:"flex flex-row"},Gut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},zut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),Vut={class:"flex flex-row"},Hut=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),qut=[Hut],Yut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),$ut={class:"flex flex-row"},Wut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),Kut={class:"flex flex-row"},jut={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Qut=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),Xut={class:"flex flex-row"},Zut=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Jut=[Zut],ept=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),tpt={class:"flex flex-row"},npt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),ipt={class:"flex flex-row"},spt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),rpt={class:"flex flex-col align-bottom"},opt={class:"relative"},apt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),lpt={class:"absolute right-0"},cpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),dpt={class:"flex flex-row"},upt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),ppt={class:"flex flex-row"},_pt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),hpt={class:"flex flex-row"},fpt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},mpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),gpt={class:"flex flex-row"},bpt=ie(()=>u("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Ept=[bpt],vpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),ypt={class:"flex flex-row"},Spt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),Tpt={class:"flex flex-row"},xpt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Cpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_voice_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),Rpt={class:"flex flex-row"},Apt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),wpt={class:"flex flex-row"},Npt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),Opt={class:"flex flex-row"},Ipt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Mpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"enable_voice_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable voice service:")],-1)),Dpt={class:"flex flex-row"},kpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"install_xtts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xTTS service:")],-1)),Lpt={class:"flex flex-row"},Ppt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"xtts_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts base url:")],-1)),Upt={class:"flex flex-row"},Fpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),Bpt={class:"flex flex-row"},Gpt=["disabled"],zpt=["value"],Vpt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),Hpt={class:"flex flex-row"},qpt=["disabled"],Ypt=["value"],$pt=ie(()=>u("td",{style:{"min-width":"200px"}},[u("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),Wpt={class:"flex flex-row"},Kpt=["disabled"],jpt={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Qpt={class:"flex flex-row p-3"},Xpt=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Zpt=[Xpt],Jpt=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),e_t=[Jpt],t_t=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),n_t={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},i_t=ie(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),s_t={key:1,class:"mr-2"},r_t={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},o_t={class:"flex gap-1 items-center"},a_t=["src"],l_t={class:"font-bold font-large text-lg line-clamp-1"},c_t={key:0,class:"mb-2"},d_t={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},u_t=ie(()=>u("i",{"data-feather":"chevron-up"},null,-1)),p_t=[u_t],__t=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),h_t=[__t],f_t={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},m_t={class:"flex flex-row p-3"},g_t=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),b_t=[g_t],E_t=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),v_t=[E_t],y_t=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),S_t={class:"flex flex-row items-center"},T_t={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},x_t=ie(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),C_t={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},R_t=ie(()=>u("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),A_t={key:2,class:"mr-2"},w_t={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},N_t={class:"flex gap-1 items-center"},O_t=["src"],I_t={class:"font-bold font-large text-lg line-clamp-1"},M_t={class:"mx-2 mb-4"},D_t={class:"relative"},k_t={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},L_t={key:0},P_t=ie(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),U_t=[P_t],F_t={key:1},B_t=ie(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),G_t=[B_t],z_t=ie(()=>u("label",{for:"only_installed"},"Show only installed models",-1)),V_t=ie(()=>u("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),H_t={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},q_t=ie(()=>u("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),Y_t=ie(()=>u("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),$_t=[q_t,Y_t],W_t={key:1,class:"mb-2"},K_t={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},j_t=ie(()=>u("i",{"data-feather":"chevron-up"},null,-1)),Q_t=[j_t],X_t=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Z_t=[X_t],J_t={class:"mb-2"},eht={class:"p-2"},tht={class:"mb-3"},nht=ie(()=>u("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),iht={key:0},sht={class:"mb-3"},rht=ie(()=>u("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),oht={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},aht=ie(()=>u("div",{role:"status",class:"justify-center"},null,-1)),lht={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},cht={class:"w-full p-2"},dht={class:"flex justify-between mb-1"},uht=zu(' Downloading Loading...',1),pht={class:"text-sm font-medium text-blue-700 dark:text-white"},_ht=["title"],hht={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},fht={class:"flex justify-between mb-1"},mht={class:"text-base font-medium text-blue-700 dark:text-white"},ght={class:"text-sm font-medium text-blue-700 dark:text-white"},bht={class:"flex flex-grow"},Eht={class:"flex flex-row flex-grow gap-3"},vht={class:"p-2 text-center grow"},yht={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Sht={class:"flex flex-row p-3 items-center"},Tht=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),xht=[Tht],Cht=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Rht=[Cht],Aht=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),wht={key:0,class:"mr-2"},Nht={class:"mr-2 font-bold font-large text-lg line-clamp-1"},Oht={key:1,class:"mr-2"},Iht={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},Mht={key:0,class:"flex -space-x-4 items-center"},Dht={class:"group items-center flex flex-row"},kht=["onClick"],Lht=["src","title"],Pht=["onClick"],Uht=ie(()=>u("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),Fht=[Uht],Bht=ie(()=>u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),Ght=[Bht],zht={class:"mx-2 mb-4"},Vht=ie(()=>u("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),Hht={class:"relative"},qht={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Yht={key:0},$ht=ie(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),Wht=[$ht],Kht={key:1},jht=ie(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),Qht=[jht],Xht={key:0,class:"mx-2 mb-4"},Zht={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},Jht=["selected"],eft={key:0,class:"mb-2"},tft={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},nft=ie(()=>u("i",{"data-feather":"chevron-up"},null,-1)),ift=[nft],sft=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),rft=[sft],oft={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},aft={class:"flex flex-row p-3 items-center"},lft=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),cft=[lft],dft=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),uft=[dft],pft=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Extensions zoo",-1)),_ft={key:0,class:"mr-2"},hft={key:1,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},fft={key:0,class:"flex -space-x-4 items-center"},mft={class:"group items-center flex flex-row"},gft=["src","title"],bft=["onClick"],Eft=ie(()=>u("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),vft=[Eft],yft={class:"mx-2 mb-4"},Sft=ie(()=>u("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),Tft={class:"relative"},xft={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Cft={key:0},Rft=ie(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),Aft=[Rft],wft={key:1},Nft=ie(()=>u("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),Oft=[Nft],Ift={key:0,class:"mx-2 mb-4"},Mft={for:"extCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},Dft=["selected"],kft={key:0,class:"mb-2"},Lft={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Pft=ie(()=>u("i",{"data-feather":"chevron-up"},null,-1)),Uft=[Pft],Fft=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Bft=[Fft],Gft={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},zft={class:"flex flex-row p-3 items-center"},Vft=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Hft=[Vft],qft=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Yft=[qft],$ft=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Mounted Extensions Priority",-1)),Wft={class:"flex flex-col mb-2 p-3 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Kft={class:"flex flex-row"},jft=ie(()=>u("i",{"data-feather":"chevron-right"},null,-1)),Qft=[jft],Xft=ie(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Zft=[Xft],Jft=ie(()=>u("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),emt={class:"m-2"},tmt={class:"flex flex-row gap-2 items-center"},nmt=ie(()=>u("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),imt={class:"m-2"},smt=ie(()=>u("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),rmt={class:"m-2"},omt={class:"flex flex-col align-bottom"},amt={class:"relative"},lmt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),cmt={class:"absolute right-0"},dmt={class:"m-2"},umt={class:"flex flex-col align-bottom"},pmt={class:"relative"},_mt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),hmt={class:"absolute right-0"},fmt={class:"m-2"},mmt={class:"flex flex-col align-bottom"},gmt={class:"relative"},bmt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),Emt={class:"absolute right-0"},vmt={class:"m-2"},ymt={class:"flex flex-col align-bottom"},Smt={class:"relative"},Tmt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),xmt={class:"absolute right-0"},Cmt={class:"m-2"},Rmt={class:"flex flex-col align-bottom"},Amt={class:"relative"},wmt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),Nmt={class:"absolute right-0"},Omt={class:"m-2"},Imt={class:"flex flex-col align-bottom"},Mmt={class:"relative"},Dmt=ie(()=>u("p",{class:"absolute left-0 mt-6"},[u("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),kmt={class:"absolute right-0"};function Lmt(n,e,t,i,s,r){const o=ht("Card"),a=ht("BindingEntry"),l=ht("RadioOptions"),d=ht("model-entry"),c=ht("personality-entry"),_=ht("ExtensionEntry"),f=ht("AddModelDialog"),m=ht("ChoiceDialog");return w(),M($e,null,[u("div",Oot,[u("div",Iot,[s.showConfirmation?(w(),M("div",Mot,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=Te(h=>s.showConfirmation=!1,["stop"]))},kot),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=Te(h=>r.save_configuration(),["stop"]))},Pot)])):q("",!0),s.showConfirmation?q("",!0):(w(),M("div",Uot,[u("button",{title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=h=>s.showConfirmation=!0)},Bot),u("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[3]||(e[3]=h=>r.reset_configuration())},zot),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[4]||(e[4]=Te(h=>s.all_collapsed=!s.all_collapsed,["stop"]))},Hot)])),u("div",qot,[u("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=h=>r.api_get_req("clear_uploads").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},$ot),u("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=h=>r.api_get_req("restart_program").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},Kot),u("button",{title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[7]||(e[7]=h=>r.api_get_req("update_software").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},[jot,s.has_updates?(w(),M("div",Qot,Zot)):q("",!0)]),u("div",Jot,[s.settingsChanged?(w(),M("div",eat,[tat,s.isLoading?q("",!0):(w(),M("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[8]||(e[8]=Te(h=>r.applyConfiguration(),["stop"]))},iat))])):q("",!0),s.isLoading?(w(),M("div",sat,[u("p",null,fe(s.loading_text),1),rat,oat])):q("",!0)])])]),u("div",{class:He(s.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[u("div",aat,[u("div",lat,[u("button",{onClick:e[9]||(e[9]=Te(h=>s.sc_collapsed=!s.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ne(u("div",null,dat,512),[[Ot,s.sc_collapsed]]),ne(u("div",null,pat,512),[[Ot,!s.sc_collapsed]]),_at,hat,u("div",fat,[u("div",mat,[u("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(w(),M("div",gat,[(w(!0),M($e,null,dt(r.vramUsage.gpus,h=>(w(),M("div",{class:"flex gap-2 items-center",key:h},[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,bat),u("h3",Eat,[u("div",null,fe(r.computedFileSize(h.used_vram))+" / "+fe(r.computedFileSize(h.total_vram))+" ("+fe(h.percentage)+"%) ",1)])]))),128))])):q("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(w(),M("div",vat,[u("div",yat,[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,Sat),u("h3",Tat,[u("div",null,fe(r.vramUsage.gpus.length)+"x ",1)])])])):q("",!0)]),xat,u("h3",Cat,[u("div",null,fe(r.ram_usage)+" / "+fe(r.ram_total_space)+" ("+fe(r.ram_percent_usage)+"%)",1)]),Rat,u("h3",Aat,[u("div",null,fe(r.disk_binding_models_usage)+" / "+fe(r.disk_total_space)+" ("+fe(r.disk_percent_usage)+"%)",1)])])])])]),u("div",{class:He([{hidden:s.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",wat,[Nat,u("div",Oat,[u("div",null,[Iat,je(fe(r.ram_available_space),1)]),u("div",null,[Mat,je(" "+fe(r.ram_usage)+" / "+fe(r.ram_total_space)+" ("+fe(r.ram_percent_usage)+")% ",1)])]),u("div",Dat,[u("div",kat,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+r.ram_percent_usage+"%;")},null,4)])])]),u("div",Lat,[Pat,u("div",Uat,[u("div",null,[Fat,je(fe(r.disk_available_space),1)]),u("div",null,[Bat,je(" "+fe(r.disk_binding_models_usage)+" / "+fe(r.disk_total_space)+" ("+fe(r.disk_percent_usage)+"%)",1)])]),u("div",Gat,[u("div",zat,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(w(!0),M($e,null,dt(r.vramUsage.gpus,h=>(w(),M("div",{class:"mb-2",key:h},[u("label",Vat,[u("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,Hat),je(" GPU usage: ")]),u("div",qat,[u("div",null,[Yat,je(fe(h.gpu_model),1)]),u("div",null,[$at,je(fe(this.computedFileSize(h.available_space)),1)]),u("div",null,[Wat,je(" "+fe(this.computedFileSize(h.used_vram))+" / "+fe(this.computedFileSize(h.total_vram))+" ("+fe(h.percentage)+"%)",1)])]),u("div",Kat,[u("div",jat,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en("width: "+h.percentage+"%;")},null,4)])])]))),128))],2)]),u("div",Qat,[u("div",Xat,[u("button",{onClick:e[10]||(e[10]=Te(h=>s.minconf_collapsed=!s.minconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ne(u("div",null,Jat,512),[[Ot,s.minconf_collapsed]]),ne(u("div",null,tlt,512),[[Ot,!s.minconf_collapsed]]),nlt])]),u("div",{class:He([{hidden:s.minconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",ilt,[Oe(o,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",slt,[u("tr",null,[rlt,u("td",olt,[u("div",alt,[ne(u("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[11]||(e[11]=h=>r.configFile.hardware_mode=h),onChange:e[12]||(e[12]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},mlt,544),[[zn,r.configFile.hardware_mode]])])])]),u("tr",null,[glt,u("td",blt,[ne(u("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[13]||(e[13]=h=>r.configFile.discussion_db_name=h),onChange:e[14]||(e[14]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.discussion_db_name]])])]),u("tr",null,[Elt,u("td",null,[u("div",vlt,[ne(u("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[15]||(e[15]=h=>r.configFile.copy_to_clipboard_add_all_details=h),onChange:e[16]||(e[16]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.copy_to_clipboard_add_all_details]])])])]),u("tr",null,[ylt,u("td",null,[u("div",Slt,[ne(u("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[17]||(e[17]=h=>r.configFile.auto_show_browser=h),onChange:e[18]||(e[18]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.auto_show_browser]])])])]),u("tr",null,[Tlt,u("td",null,[u("div",xlt,[ne(u("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[19]||(e[19]=h=>r.configFile.debug=h),onChange:e[20]||(e[20]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.debug]])])])]),u("tr",null,[Clt,u("td",null,[u("div",Rlt,[ne(u("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[21]||(e[21]=h=>r.configFile.debug_log_file_path=h),onChange:e[22]||(e[22]=h=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.debug_log_file_path]])])])]),u("tr",null,[Alt,u("td",null,[u("div",wlt,[ne(u("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[23]||(e[23]=h=>r.configFile.show_news_panel=h),onChange:e[24]||(e[24]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.show_news_panel]])])])]),u("tr",null,[Nlt,u("td",null,[u("div",Olt,[ne(u("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[25]||(e[25]=h=>r.configFile.auto_save=h),onChange:e[26]||(e[26]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.auto_save]])])])]),u("tr",null,[Ilt,u("td",null,[u("div",Mlt,[ne(u("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[27]||(e[27]=h=>r.configFile.auto_update=h),onChange:e[28]||(e[28]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.auto_update]])])])]),u("tr",null,[Dlt,u("td",null,[u("div",klt,[ne(u("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[29]||(e[29]=h=>r.configFile.auto_title=h),onChange:e[30]||(e[30]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.auto_title]])])])])])]),_:1}),Oe(o,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Llt,[u("tr",null,[Plt,u("td",Ult,[ne(u("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[31]||(e[31]=h=>r.configFile.user_name=h),onChange:e[32]||(e[32]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.user_name]])])]),u("tr",null,[Flt,u("td",Blt,[ne(u("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[33]||(e[33]=h=>r.configFile.user_description=h),onChange:e[34]||(e[34]=h=>s.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.user_description]])])]),u("tr",null,[Glt,u("td",zlt,[ne(u("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[35]||(e[35]=h=>r.configFile.use_user_informations_in_discussion=h),onChange:e[36]||(e[36]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.use_user_informations_in_discussion]])])]),u("tr",null,[Vlt,u("td",Hlt,[ne(u("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[37]||(e[37]=h=>r.configFile.use_model_name_in_discussions=h),onChange:e[38]||(e[38]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.use_model_name_in_discussions]])])]),u("tr",null,[qlt,u("td",Ylt,[u("label",$lt,[u("img",{src:"/user_infos/"+r.configFile.user_avatar,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,Wlt)]),u("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[39]||(e[39]=(...h)=>r.uploadAvatar&&r.uploadAvatar(...h))},null,32)])]),u("tr",null,[Klt,u("td",null,[u("div",jlt,[ne(u("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[40]||(e[40]=h=>r.configFile.use_user_name_in_discussions=h),onChange:e[41]||(e[41]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.use_user_name_in_discussions]])])])]),u("tr",null,[Qlt,u("td",Xlt,[ne(u("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[42]||(e[42]=h=>r.configFile.min_n_predict=h),onChange:e[43]||(e[43]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.min_n_predict]])])]),u("tr",null,[Zlt,u("td",Jlt,[ne(u("input",{type:"number",id:"min_n_predict",required:"","onUpdate:modelValue":e[44]||(e[44]=h=>r.configFile.min_n_predict=h),onChange:e[45]||(e[45]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.min_n_predict]])])])])]),_:1}),Oe(o,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",ect,[u("tr",null,[tct,u("td",nct,[ne(u("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[46]||(e[46]=h=>r.configFile.turn_on_code_execution=h),onChange:e[47]||(e[47]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.turn_on_code_execution]])])]),u("tr",null,[ict,u("td",sct,[ne(u("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[48]||(e[48]=h=>r.configFile.turn_on_code_validation=h),onChange:e[49]||(e[49]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.turn_on_code_validation]])])]),u("tr",null,[rct,u("td",oct,[ne(u("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[50]||(e[50]=h=>r.configFile.turn_on_setting_update_validation=h),onChange:e[51]||(e[51]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.turn_on_setting_update_validation]])])]),u("tr",null,[act,u("td",lct,[ne(u("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[52]||(e[52]=h=>r.configFile.turn_on_open_file_validation=h),onChange:e[53]||(e[53]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.turn_on_open_file_validation]])])]),u("tr",null,[cct,u("td",dct,[ne(u("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[54]||(e[54]=h=>r.configFile.turn_on_send_file_validation=h),onChange:e[55]||(e[55]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.turn_on_send_file_validation]])])])])]),_:1}),Oe(o,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",uct,[u("tr",null,[pct,u("td",null,[u("div",_ct,[ne(u("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[56]||(e[56]=h=>r.configFile.activate_skills_lib=h),onChange:e[57]||(e[57]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_skills_lib]])])])]),u("tr",null,[hct,u("td",fct,[ne(u("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[58]||(e[58]=h=>r.configFile.skills_lib_database_name=h),onChange:e[59]||(e[59]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.skills_lib_database_name]])])])])]),_:1}),Oe(o,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",mct,[u("tr",null,[gct,u("td",null,[u("div",bct,[ne(u("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[60]||(e[60]=h=>r.configFile.activate_internet_search=h),onChange:e[61]||(e[61]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_internet_search]])])])]),u("tr",null,[Ect,u("td",null,[u("div",vct,[ne(u("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[62]||(e[62]=h=>r.configFile.internet_quick_search=h),onChange:e[63]||(e[63]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.internet_quick_search]])])])]),u("tr",null,[yct,u("td",null,[u("div",Sct,[ne(u("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[64]||(e[64]=h=>r.configFile.internet_activate_search_decision=h),onChange:e[65]||(e[65]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.internet_activate_search_decision]])])])]),u("tr",null,[Tct,u("td",null,[u("div",xct,[ne(u("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[66]||(e[66]=h=>r.configFile.internet_vectorization_chunk_size=h),onChange:e[67]||(e[67]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.internet_vectorization_chunk_size]]),ne(u("input",{"onUpdate:modelValue":e[68]||(e[68]=h=>r.configFile.internet_vectorization_chunk_size=h),type:"number",onChange:e[69]||(e[69]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.internet_vectorization_chunk_size]])])])]),u("tr",null,[Cct,u("td",null,[u("div",Rct,[ne(u("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[70]||(e[70]=h=>r.configFile.internet_vectorization_overlap_size=h),onChange:e[71]||(e[71]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.internet_vectorization_overlap_size]]),ne(u("input",{"onUpdate:modelValue":e[72]||(e[72]=h=>r.configFile.internet_vectorization_overlap_size=h),type:"number",onChange:e[73]||(e[73]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.internet_vectorization_overlap_size]])])])]),u("tr",null,[Act,u("td",null,[u("div",wct,[ne(u("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[74]||(e[74]=h=>r.configFile.internet_vectorization_nb_chunks=h),onChange:e[75]||(e[75]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.internet_vectorization_nb_chunks]]),ne(u("input",{"onUpdate:modelValue":e[76]||(e[76]=h=>r.configFile.internet_vectorization_nb_chunks=h),type:"number",onChange:e[77]||(e[77]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.internet_vectorization_nb_chunks]])])])]),u("tr",null,[Nct,u("td",null,[u("div",Oct,[ne(u("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[78]||(e[78]=h=>r.configFile.internet_nb_search_pages=h),onChange:e[79]||(e[79]=h=>s.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.internet_nb_search_pages]]),ne(u("input",{"onUpdate:modelValue":e[80]||(e[80]=h=>r.configFile.internet_nb_search_pages=h),type:"number",onChange:e[81]||(e[81]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.internet_nb_search_pages]])])])])])]),_:1}),Oe(o,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Ict,[u("tr",null,[Mct,u("td",null,[u("div",Dct,[ne(u("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[82]||(e[82]=h=>r.configFile.pdf_latex_path=h),onChange:e[83]||(e[83]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.pdf_latex_path]])])])])])]),_:1}),Oe(o,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",kct,[u("tr",null,[Lct,u("td",null,[u("div",Pct,[ne(u("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[84]||(e[84]=h=>r.configFile.positive_boost=h),onChange:e[85]||(e[85]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.positive_boost]])])])]),u("tr",null,[Uct,u("td",null,[u("div",Fct,[ne(u("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[86]||(e[86]=h=>r.configFile.negative_boost=h),onChange:e[87]||(e[87]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.negative_boost]])])])]),u("tr",null,[Bct,u("td",null,[u("div",Gct,[ne(u("input",{type:"text",id:"force_output_language_to_be",required:"","onUpdate:modelValue":e[88]||(e[88]=h=>r.configFile.force_output_language_to_be=h),onChange:e[89]||(e[89]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.force_output_language_to_be]])])])]),u("tr",null,[zct,u("td",null,[u("div",Vct,[ne(u("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[90]||(e[90]=h=>r.configFile.fun_mode=h),onChange:e[91]||(e[91]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.fun_mode]])])])])])]),_:1}),Oe(o,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Hct,[u("tr",null,[qct,u("td",null,[u("div",Yct,[ne(u("select",{id:"whisper_model","onUpdate:modelValue":e[92]||(e[92]=h=>r.configFile.whisper_model=h),onChange:e[93]||(e[93]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(w(!0),M($e,null,dt(r.whisperModels,h=>(w(),M("option",{key:h,value:h},fe(h),9,$ct))),128))],544),[[zn,r.configFile.whisper_model]])])])])])]),_:1}),Oe(o,{title:"Browser Audio",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Wct,[u("tr",null,[Kct,u("td",null,[u("div",jct,[ne(u("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[94]||(e[94]=h=>r.configFile.activate_audio_infos=h),onChange:e[95]||(e[95]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_audio_infos]])])])]),u("tr",null,[Qct,u("td",null,[u("div",Xct,[ne(u("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[96]||(e[96]=h=>r.configFile.audio_auto_send_input=h),onChange:e[97]||(e[97]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.audio_auto_send_input]])])])]),u("tr",null,[Zct,u("td",null,[u("div",Jct,[ne(u("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[98]||(e[98]=h=>r.configFile.auto_speak=h),onChange:e[99]||(e[99]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.auto_speak]])])])]),u("tr",null,[edt,u("td",null,[ne(u("input",{id:"audio_pitch","onUpdate:modelValue":e[100]||(e[100]=h=>r.configFile.audio_pitch=h),onChange:e[101]||(e[101]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.audio_pitch]]),ne(u("input",{"onUpdate:modelValue":e[102]||(e[102]=h=>r.configFile.audio_pitch=h),onChange:e[103]||(e[103]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.audio_pitch]])])]),u("tr",null,[tdt,u("td",null,[ne(u("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[104]||(e[104]=h=>r.configFile.audio_silenceTimer=h),onChange:e[105]||(e[105]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.audio_silenceTimer]]),ne(u("input",{"onUpdate:modelValue":e[106]||(e[106]=h=>r.configFile.audio_silenceTimer=h),onChange:e[107]||(e[107]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.audio_silenceTimer]])])]),u("tr",null,[ndt,u("td",null,[ne(u("select",{id:"audio_in_language","onUpdate:modelValue":e[108]||(e[108]=h=>r.configFile.audio_in_language=h),onChange:e[109]||(e[109]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(w(!0),M($e,null,dt(r.audioLanguages,h=>(w(),M("option",{key:h.code,value:h.code},fe(h.name),9,idt))),128))],544),[[zn,r.configFile.audio_in_language]])])]),u("tr",null,[sdt,u("td",null,[ne(u("select",{id:"audio_out_voice","onUpdate:modelValue":e[110]||(e[110]=h=>r.configFile.audio_out_voice=h),onChange:e[111]||(e[111]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(w(!0),M($e,null,dt(s.audioVoices,h=>(w(),M("option",{key:h.name,value:h.name},fe(h.name),9,rdt))),128))],544),[[zn,r.configFile.audio_out_voice]])])])])]),_:1})])],2)]),u("div",odt,[u("div",adt,[u("button",{onClick:e[112]||(e[112]=Te(h=>s.data_conf_collapsed=!s.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ne(u("div",null,cdt,512),[[Ot,s.data_conf_collapsed]]),ne(u("div",null,udt,512),[[Ot,!s.data_conf_collapsed]]),pdt])]),u("div",{class:He([{hidden:s.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Oe(o,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",_dt,[u("tr",null,[hdt,u("td",null,[u("div",fdt,[ne(u("input",{type:"checkbox",id:"summerize_discussion",required:"","onUpdate:modelValue":e[113]||(e[113]=h=>r.configFile.summerize_discussion=h),onChange:e[114]||(e[114]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.summerize_discussion]])])])]),u("tr",null,[mdt,u("td",null,[u("div",gdt,[ne(u("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[115]||(e[115]=h=>r.configFile.data_vectorization_visualize_on_vectorization=h),onChange:e[116]||(e[116]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.data_vectorization_visualize_on_vectorization]])])])]),u("tr",null,[bdt,u("td",null,[u("div",Edt,[ne(u("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[117]||(e[117]=h=>r.configFile.data_vectorization_build_keys_words=h),onChange:e[118]||(e[118]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.data_vectorization_build_keys_words]])])])]),u("tr",null,[vdt,u("td",null,[u("div",ydt,[ne(u("input",{type:"checkbox",id:"data_vectorization_force_first_chunk",required:"","onUpdate:modelValue":e[119]||(e[119]=h=>r.configFile.data_vectorization_force_first_chunk=h),onChange:e[120]||(e[120]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.data_vectorization_force_first_chunk]])])])]),u("tr",null,[Sdt,u("td",null,[u("div",Tdt,[ne(u("input",{type:"checkbox",id:"data_vectorization_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[121]||(e[121]=h=>r.configFile.data_vectorization_put_chunk_informations_into_context=h),onChange:e[122]||(e[122]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.data_vectorization_put_chunk_informations_into_context]])])])]),u("tr",null,[xdt,u("td",null,[ne(u("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[123]||(e[123]=h=>r.configFile.data_vectorization_method=h),onChange:e[124]||(e[124]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Ndt,544),[[zn,r.configFile.data_vectorization_method]])])]),u("tr",null,[Odt,u("td",Idt,[ne(u("input",{type:"text",id:"data_vectorization_sentense_transformer_model",required:"","onUpdate:modelValue":e[125]||(e[125]=h=>r.configFile.data_vectorization_sentense_transformer_model=h),onChange:e[126]||(e[126]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.data_vectorization_sentense_transformer_model]])])]),u("tr",null,[Mdt,u("td",null,[ne(u("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[127]||(e[127]=h=>r.configFile.data_visualization_method=h),onChange:e[128]||(e[128]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Ldt,544),[[zn,r.configFile.data_visualization_method]])])]),u("tr",null,[Pdt,u("td",null,[u("div",Udt,[ne(u("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[129]||(e[129]=h=>r.configFile.data_vectorization_save_db=h),onChange:e[130]||(e[130]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.data_vectorization_save_db]])])])]),u("tr",null,[Fdt,u("td",null,[ne(u("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[131]||(e[131]=h=>r.configFile.data_vectorization_chunk_size=h),onChange:e[132]||(e[132]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.data_vectorization_chunk_size]]),ne(u("input",{"onUpdate:modelValue":e[133]||(e[133]=h=>r.configFile.data_vectorization_chunk_size=h),type:"number",onChange:e[134]||(e[134]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.data_vectorization_chunk_size]])])]),u("tr",null,[Bdt,u("td",null,[ne(u("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[135]||(e[135]=h=>r.configFile.data_vectorization_overlap_size=h),onChange:e[136]||(e[136]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.data_vectorization_overlap_size]]),ne(u("input",{"onUpdate:modelValue":e[137]||(e[137]=h=>r.configFile.data_vectorization_overlap_size=h),type:"number",onChange:e[138]||(e[138]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.data_vectorization_overlap_size]])])]),u("tr",null,[Gdt,u("td",null,[ne(u("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[139]||(e[139]=h=>r.configFile.data_vectorization_nb_chunks=h),onChange:e[140]||(e[140]=h=>s.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.data_vectorization_nb_chunks]]),ne(u("input",{"onUpdate:modelValue":e[141]||(e[141]=h=>r.configFile.data_vectorization_nb_chunks=h),type:"number",onChange:e[142]||(e[142]=h=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1})],2)]),u("div",zdt,[u("div",Vdt,[u("button",{onClick:e[143]||(e[143]=Te(h=>s.servers_conf_collapsed=!s.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ne(u("div",null,qdt,512),[[Ot,s.servers_conf_collapsed]]),ne(u("div",null,$dt,512),[[Ot,!s.servers_conf_collapsed]]),Wdt])]),u("div",{class:He([{hidden:s.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[Oe(o,{title:"Lollms service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Kdt,[u("tr",null,[jdt,u("td",Qdt,[ne(u("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[144]||(e[144]=h=>r.configFile.host=h),onChange:e[145]||(e[145]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.host]])])]),u("tr",null,[Xdt,u("td",Zdt,[ne(u("input",{type:"text",id:"lollms_access_keys",required:"","onUpdate:modelValue":e[146]||(e[146]=h=>r.configFile.lollms_access_keys=h),onChange:e[147]||(e[147]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.lollms_access_keys]])])]),u("tr",null,[Jdt,u("td",eut,[ne(u("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[148]||(e[148]=h=>r.configFile.port=h),onChange:e[149]||(e[149]=h=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Pe,r.configFile.port]])])]),u("tr",null,[tut,u("td",nut,[ne(u("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[150]||(e[150]=h=>r.configFile.headless_server_mode=h),onChange:e[151]||(e[151]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[lt,r.configFile.headless_server_mode]])])]),u("tr",null,[iut,u("td",sut,[ne(u("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[152]||(e[152]=h=>r.configFile.activate_lollms_server=h),onChange:e[153]||(e[153]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_lollms_server]])])]),u("tr",null,[rut,u("td",out,[ne(u("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[154]||(e[154]=h=>r.configFile.activate_ollama_emulator=h),onChange:e[155]||(e[155]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_ollama_emulator]])])]),u("tr",null,[aut,u("td",lut,[ne(u("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[156]||(e[156]=h=>r.configFile.activate_openai_emulator=h),onChange:e[157]||(e[157]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_openai_emulator]])])]),u("tr",null,[cut,u("td",dut,[ne(u("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[158]||(e[158]=h=>r.configFile.activate_mistralai_emulator=h),onChange:e[159]||(e[159]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[lt,r.configFile.activate_mistralai_emulator]])])])])]),_:1}),Oe(o,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",uut,[u("tr",null,[put,u("td",null,[u("div",_ut,[ne(u("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[160]||(e[160]=h=>r.configFile.enable_sd_service=h),onChange:e[161]||(e[161]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_sd_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[162]||(e[162]=h=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},fut)])]),u("tr",null,[mut,u("td",null,[u("div",gut,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[163]||(e[163]=(...h)=>r.reinstallSDService&&r.reinstallSDService(...h))},"install sd service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[164]||(e[164]=(...h)=>r.upgradeSDService&&r.upgradeSDService(...h))},"upgrade sd service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[165]||(e[165]=(...h)=>r.startSDService&&r.startSDService(...h))},"start sd service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[166]||(e[166]=(...h)=>r.showSD&&r.showSD(...h))},"show sd ui"),but])])]),u("tr",null,[Eut,u("td",null,[u("div",vut,[ne(u("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[167]||(e[167]=h=>r.configFile.sd_base_url=h),onChange:e[168]||(e[168]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.sd_base_url]])])])])])]),_:1}),Oe(o,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",yut,[u("tr",null,[Sut,u("td",null,[u("div",Tut,[ne(u("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[169]||(e[169]=h=>r.configFile.enable_comfyui_service=h),onChange:e[170]||(e[170]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_comfyui_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[171]||(e[171]=h=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Cut)])]),u("tr",null,[Rut,u("td",null,[u("div",Aut,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[172]||(e[172]=(...h)=>r.reinstallComfyUIService&&r.reinstallComfyUIService(...h))},"install comfyui service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[173]||(e[173]=(...h)=>r.upgradeComfyUIService&&r.upgradeComfyUIService(...h))},"upgrade comfyui service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[174]||(e[174]=(...h)=>r.startComfyUIService&&r.startComfyUIService(...h))},"start comfyui service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[175]||(e[175]=(...h)=>r.showComfyui&&r.showComfyui(...h))},"show comfyui"),wut])])]),u("tr",null,[Nut,u("td",null,[u("div",Out,[ne(u("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[176]||(e[176]=h=>r.configFile.comfyui_base_url=h),onChange:e[177]||(e[177]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.comfyui_base_url]])])])])])]),_:1}),Oe(o,{title:"Motion Ctrl service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Iut,[u("tr",null,[Mut,u("td",null,[u("div",Dut,[ne(u("input",{type:"checkbox",id:"enable_motion_ctrl_service",required:"","onUpdate:modelValue":e[178]||(e[178]=h=>r.configFile.enable_motion_ctrl_service=h),onChange:e[179]||(e[179]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_motion_ctrl_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[180]||(e[180]=h=>this.$store.state.messageBox.showMessage("Activates Motion ctrl service. The service will be automatically loaded at startup alowing you to use the motoin control endpoint to generate videos"))},Lut)])]),u("tr",null,[Put,u("td",null,[u("div",Uut,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[181]||(e[181]=(...h)=>r.reinstallMotionCtrlService&&r.reinstallMotionCtrlService(...h))},"install Motion Ctrl service")])])]),u("tr",null,[Fut,u("td",null,[u("div",But,[ne(u("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[182]||(e[182]=h=>r.configFile.sd_base_url=h),onChange:e[183]||(e[183]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.sd_base_url]])])])])])]),_:1}),Oe(o,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Gut,[u("tr",null,[zut,u("td",null,[u("div",Vut,[ne(u("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[184]||(e[184]=h=>r.configFile.enable_ollama_service=h),onChange:e[185]||(e[185]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_ollama_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[186]||(e[186]=h=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},Vut)])]),u("tr",null,[Hut,u("td",null,[u("div",qut,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[185]||(e[185]=(...h)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(...h))},"install ollama service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[186]||(e[186]=(...h)=>r.startollamaService&&r.startollamaService(...h))},"start ollama service")])])]),u("tr",null,[Yut,u("td",null,[u("div",$ut,[ne(u("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[187]||(e[187]=h=>r.configFile.ollama_base_url=h),onChange:e[188]||(e[188]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.ollama_base_url]])])])])])]),_:1}),Oe(o,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Wut,[u("tr",null,[Kut,u("td",null,[u("div",jut,[ne(u("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[189]||(e[189]=h=>r.configFile.enable_vllm_service=h),onChange:e[190]||(e[190]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_vllm_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[191]||(e[191]=h=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. +Here is how you can do that`))},qut)])]),u("tr",null,[Yut,u("td",null,[u("div",$ut,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[187]||(e[187]=(...h)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(...h))},"install ollama service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[188]||(e[188]=(...h)=>r.startollamaService&&r.startollamaService(...h))},"start ollama service")])])]),u("tr",null,[Wut,u("td",null,[u("div",Kut,[ne(u("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[189]||(e[189]=h=>r.configFile.ollama_base_url=h),onChange:e[190]||(e[190]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.ollama_base_url]])])])])])]),_:1}),Oe(o,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",jut,[u("tr",null,[Qut,u("td",null,[u("div",Xut,[ne(u("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[191]||(e[191]=h=>r.configFile.enable_vllm_service=h),onChange:e[192]||(e[192]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_vllm_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[193]||(e[193]=h=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},Xut)])]),u("tr",null,[Zut,u("td",null,[u("div",Jut,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[192]||(e[192]=(...h)=>r.reinstallvLLMService&&r.reinstallvLLMService(...h))},"install vLLM service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[193]||(e[193]=(...h)=>r.startvLLMService&&r.startvLLMService(...h))},"start vllm service")])])]),u("tr",null,[ept,u("td",null,[u("div",tpt,[ne(u("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[194]||(e[194]=h=>r.configFile.vllm_url=h),onChange:e[195]||(e[195]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.vllm_url]])])])]),u("tr",null,[npt,u("td",null,[u("div",ipt,[u("div",spt,[rpt,u("p",opt,[ne(u("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[196]||(e[196]=h=>r.configFile.vllm_gpu_memory_utilization=h),onChange:e[197]||(e[197]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.vllm_gpu_memory_utilization]])])]),ne(u("input",{id:"vllm_gpu_memory_utilization",onChange:e[198]||(e[198]=h=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[199]||(e[199]=h=>r.configFile.vllm_gpu_memory_utilization=h),min:"0.10",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.vllm_gpu_memory_utilization]])])])]),u("tr",null,[apt,u("td",null,[u("div",lpt,[ne(u("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[200]||(e[200]=h=>r.configFile.vllm_max_num_seqs=h),onChange:e[201]||(e[201]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.vllm_max_num_seqs]])])])]),u("tr",null,[cpt,u("td",null,[u("div",dpt,[ne(u("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[202]||(e[202]=h=>r.configFile.vllm_max_model_len=h),onChange:e[203]||(e[203]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.vllm_max_model_len]])])])]),u("tr",null,[upt,u("td",null,[u("div",ppt,[ne(u("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[204]||(e[204]=h=>r.configFile.vllm_model_path=h),onChange:e[205]||(e[205]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.vllm_model_path]])])])])])]),_:1}),Oe(o,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",_pt,[u("tr",null,[hpt,u("td",null,[u("div",fpt,[ne(u("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[206]||(e[206]=h=>r.configFile.enable_petals_service=h),onChange:e[207]||(e[207]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_petals_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[208]||(e[208]=h=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network. +Here is how you can do that`))},Jut)])]),u("tr",null,[ept,u("td",null,[u("div",tpt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[194]||(e[194]=(...h)=>r.reinstallvLLMService&&r.reinstallvLLMService(...h))},"install vLLM service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[195]||(e[195]=(...h)=>r.startvLLMService&&r.startvLLMService(...h))},"start vllm service")])])]),u("tr",null,[npt,u("td",null,[u("div",ipt,[ne(u("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[196]||(e[196]=h=>r.configFile.vllm_url=h),onChange:e[197]||(e[197]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.vllm_url]])])])]),u("tr",null,[spt,u("td",null,[u("div",rpt,[u("div",opt,[apt,u("p",lpt,[ne(u("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[198]||(e[198]=h=>r.configFile.vllm_gpu_memory_utilization=h),onChange:e[199]||(e[199]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.vllm_gpu_memory_utilization]])])]),ne(u("input",{id:"vllm_gpu_memory_utilization",onChange:e[200]||(e[200]=h=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[201]||(e[201]=h=>r.configFile.vllm_gpu_memory_utilization=h),min:"0.10",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.vllm_gpu_memory_utilization]])])])]),u("tr",null,[cpt,u("td",null,[u("div",dpt,[ne(u("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[202]||(e[202]=h=>r.configFile.vllm_max_num_seqs=h),onChange:e[203]||(e[203]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.vllm_max_num_seqs]])])])]),u("tr",null,[upt,u("td",null,[u("div",ppt,[ne(u("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[204]||(e[204]=h=>r.configFile.vllm_max_model_len=h),onChange:e[205]||(e[205]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.vllm_max_model_len]])])])]),u("tr",null,[_pt,u("td",null,[u("div",hpt,[ne(u("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[206]||(e[206]=h=>r.configFile.vllm_model_path=h),onChange:e[207]||(e[207]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.vllm_model_path]])])])])])]),_:1}),Oe(o,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",fpt,[u("tr",null,[mpt,u("td",null,[u("div",gpt,[ne(u("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[208]||(e[208]=h=>r.configFile.enable_petals_service=h),onChange:e[209]||(e[209]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_petals_service]])])]),u("td",null,[u("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[210]||(e[210]=h=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},gpt)])]),u("tr",null,[bpt,u("td",null,[u("div",Ept,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[209]||(e[209]=(...h)=>r.reinstallPetalsService&&r.reinstallPetalsService(...h))},"install petals service")])])]),u("tr",null,[vpt,u("td",null,[u("div",ypt,[ne(u("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[210]||(e[210]=h=>r.configFile.petals_base_url=h),onChange:e[211]||(e[211]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.petals_base_url]])])])])])]),_:1}),Oe(o,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Spt,[u("tr",null,[Tpt,u("td",null,[u("div",xpt,[ne(u("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[212]||(e[212]=h=>r.configFile.elastic_search_service=h),onChange:e[213]||(e[213]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.elastic_search_service]])])])]),u("tr",null,[Cpt,u("td",null,[u("div",Rpt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[214]||(e[214]=(...h)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(...h))},"install ElasticSearch service")])])]),u("tr",null,[Apt,u("td",null,[u("div",wpt,[ne(u("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[215]||(e[215]=h=>r.configFile.elastic_search_url=h),onChange:e[216]||(e[216]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.elastic_search_url]])])])])])]),_:1}),Oe(o,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Npt,[u("tr",null,[Opt,u("td",null,[u("div",Ipt,[ne(u("input",{type:"checkbox",id:"enable_voice_service",required:"","onUpdate:modelValue":e[217]||(e[217]=h=>r.configFile.enable_voice_service=h),onChange:e[218]||(e[218]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_voice_service]])])])]),u("tr",null,[Mpt,u("td",null,[u("div",Dpt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[219]||(e[219]=(...h)=>r.reinstallAudioService&&r.reinstallAudioService(...h))},"install xtts service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[220]||(e[220]=(...h)=>r.startAudioService&&r.startAudioService(...h))},"start xtts service")])])]),u("tr",null,[kpt,u("td",null,[u("div",Lpt,[ne(u("input",{type:"text",id:"xtts_base_url",required:"","onUpdate:modelValue":e[221]||(e[221]=h=>r.configFile.xtts_base_url=h),onChange:e[222]||(e[222]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.xtts_base_url]])])])]),u("tr",null,[Ppt,u("td",null,[u("div",Upt,[ne(u("select",{"onUpdate:modelValue":e[223]||(e[223]=h=>r.current_language=h),onChange:e[224]||(e[224]=h=>s.settingsChanged=!0),disabled:!r.enable_voice_service},[(w(!0),M($e,null,dt(s.voice_languages,(h,E)=>(w(),M("option",{key:E,value:h},fe(E),9,Bpt))),128))],40,Fpt),[[zn,r.current_language]])])])]),u("tr",null,[Gpt,u("td",null,[u("div",zpt,[ne(u("select",{"onUpdate:modelValue":e[225]||(e[225]=h=>r.current_voice=h),onChange:e[226]||(e[226]=h=>s.settingsChanged=!0),disabled:!r.enable_voice_service},[(w(!0),M($e,null,dt(s.voices,h=>(w(),M("option",{key:h,value:h},fe(h),9,Hpt))),128))],40,Vpt),[[zn,r.current_voice]])])])]),u("tr",null,[qpt,u("td",null,[u("div",Ypt,[ne(u("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[227]||(e[227]=h=>r.configFile.auto_read=h),onChange:e[228]||(e[228]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.enable_voice_service},null,40,$pt),[[lt,r.configFile.auto_read]])])])])])]),_:1})],2)]),u("div",Wpt,[u("div",Kpt,[u("button",{onClick:e[229]||(e[229]=Te(h=>s.bzc_collapsed=!s.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ne(u("div",null,Qpt,512),[[Ot,s.bzc_collapsed]]),ne(u("div",null,Zpt,512),[[Ot,!s.bzc_collapsed]]),Jpt,r.configFile.binding_name?q("",!0):(w(),M("div",e_t,[t_t,je(" No binding selected! ")])),r.configFile.binding_name?(w(),M("div",n_t,"|")):q("",!0),r.configFile.binding_name?(w(),M("div",i_t,[u("div",s_t,[u("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,r_t),u("h3",o_t,fe(r.binding_name),1)])])):q("",!0)])]),u("div",{class:He([{hidden:s.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(w(),M("div",a_t,[u("label",l_t," Bindings: ("+fe(r.bindingsZoo.length)+") ",1),u("div",{class:He(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.bzl_collapsed?"":"max-h-96"])},[Oe(rs,{name:"list"},{default:Je(()=>[(w(!0),M($e,null,dt(r.bindingsZoo,(h,E)=>(w(),Tt(a,{ref_for:!0,ref:"bindingZoo",key:"index-"+E+"-"+h.folder,binding:h,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:h.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):q("",!0),s.bzl_collapsed?(w(),M("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[230]||(e[230]=h=>s.bzl_collapsed=!s.bzl_collapsed)},d_t)):(w(),M("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[231]||(e[231]=h=>s.bzl_collapsed=!s.bzl_collapsed)},p_t))],2)]),u("div",__t,[u("div",h_t,[u("button",{onClick:e[232]||(e[232]=Te(h=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ne(u("div",null,m_t,512),[[Ot,s.mzc_collapsed]]),ne(u("div",null,b_t,512),[[Ot,!s.mzc_collapsed]]),E_t,u("div",v_t,[r.configFile.binding_name?q("",!0):(w(),M("div",y_t,[S_t,je(" Select binding first! ")])),!r.configFile.model_name&&r.configFile.binding_name?(w(),M("div",T_t,[x_t,je(" No model selected! ")])):q("",!0),r.configFile.model_name?(w(),M("div",C_t,"|")):q("",!0),r.configFile.model_name?(w(),M("div",R_t,[u("div",A_t,[u("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,w_t),u("h3",N_t,fe(r.configFile.model_name),1)])])):q("",!0)])])]),u("div",{class:He([{hidden:s.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",O_t,[u("div",I_t,[u("div",M_t,[s.searchModelInProgress?(w(),M("div",D_t,L_t)):q("",!0),s.searchModelInProgress?q("",!0):(w(),M("div",P_t,F_t))]),ne(u("input",{type:"search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search models...",required:"","onUpdate:modelValue":e[233]||(e[233]=h=>s.searchModel=h),onKeyup:e[234]||(e[234]=wr((...h)=>r.searchModel_func&&r.searchModel_func(...h),["enter"]))},null,544),[[Pe,s.searchModel]]),s.searchModel?(w(),M("button",{key:0,onClick:e[235]||(e[235]=Te(h=>s.searchModel="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):q("",!0)])]),u("div",null,[ne(u("input",{"onUpdate:modelValue":e[236]||(e[236]=h=>s.show_only_installed_models=h),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[lt,s.show_only_installed_models]]),B_t]),u("div",null,[Oe(l,{radioOptions:s.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),G_t,s.is_loading_zoo?(w(),M("div",z_t,q_t)):q("",!0),s.models_zoo&&s.models_zoo.length>0?(w(),M("div",Y_t,[u("label",$_t," Models: ("+fe(s.models_zoo.length)+") ",1),u("div",{class:He(["overflow-y-auto p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",s.mzl_collapsed?"":"max-h-96"])},[Oe(rs,{name:"list"},{default:Je(()=>[(w(!0),M($e,null,dt(r.rendered_models_zoo,(h,E)=>(w(),Tt(d,{ref_for:!0,ref:"modelZoo",key:"index-"+E+"-"+h.name,model:h,"is-installed":h.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:h.name===r.configFile.model_name,model_type:h.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),u("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[237]||(e[237]=(...h)=>r.load_more_models&&r.load_more_models(...h))},"Load more models",512)]),_:1})],2)])):q("",!0),s.mzl_collapsed?(w(),M("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[238]||(e[238]=(...h)=>r.open_mzl&&r.open_mzl(...h))},K_t)):(w(),M("button",{key:3,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[239]||(e[239]=(...h)=>r.open_mzl&&r.open_mzl(...h))},Q_t)),u("div",X_t,[u("div",Z_t,[u("div",null,[u("div",J_t,[eht,ne(u("input",{type:"text","onUpdate:modelValue":e[240]||(e[240]=h=>s.reference_path=h),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter Path ...",required:""},null,512),[[Pe,s.reference_path]])]),u("button",{type:"button",onClick:e[241]||(e[241]=Te(h=>r.onCreateReference(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Add reference")]),s.modelDownlaodInProgress?q("",!0):(w(),M("div",tht,[u("div",nht,[iht,ne(u("input",{type:"text","onUpdate:modelValue":e[242]||(e[242]=h=>s.addModel.url=h),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter URL ...",required:""},null,512),[[Pe,s.addModel.url]])]),u("button",{type:"button",onClick:e[243]||(e[243]=Te(h=>r.onInstallAddModel(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Download")])),s.modelDownlaodInProgress?(w(),M("div",sht,[rht,u("div",oht,[u("div",aht,[u("div",lht,[cht,u("span",dht,fe(Math.floor(s.addModel.progress))+"%",1)]),u("div",{class:"mx-1 opacity-80 line-clamp-1",title:s.addModel.url},fe(s.addModel.url),9,uht),u("div",pht,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en({width:s.addModel.progress+"%"})},null,4)]),u("div",_ht,[u("span",hht,"Download speed: "+fe(r.speed_computed)+"/s",1),u("span",fht,fe(r.downloaded_size_computed)+"/"+fe(r.total_size_computed),1)])])]),u("div",mht,[u("div",ght,[u("div",bht,[u("button",{onClick:e[244]||(e[244]=Te((...h)=>r.onCancelInstall&&r.onCancelInstall(...h),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])):q("",!0)])])],2)]),u("div",Eht,[u("div",vht,[u("button",{onClick:e[247]||(e[247]=Te(h=>s.pzc_collapsed=!s.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ne(u("div",null,Sht,512),[[Ot,s.pzc_collapsed]]),ne(u("div",null,xht,512),[[Ot,!s.pzc_collapsed]]),Cht,r.configFile.personalities?(w(),M("div",Rht,"|")):q("",!0),u("div",Aht,fe(r.active_pesonality),1),r.configFile.personalities?(w(),M("div",wht,"|")):q("",!0),r.configFile.personalities?(w(),M("div",Nht,[r.mountedPersArr.length>0?(w(),M("div",Oht,[(w(!0),M($e,null,dt(r.mountedPersArr,(h,E)=>(w(),M("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:E+"-"+h.name,ref_for:!0,ref:"mountedPersonalities"},[u("div",Iht,[u("button",{onClick:Te(b=>r.onPersonalitySelected(h),["stop"])},[u("img",{src:s.bUrl+h.avatar,onError:e[245]||(e[245]=(...b)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...b)),class:He(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(h.full_path)?"border-secondary":"border-transparent z-0"]),title:h.name},null,42,Dht)],8,Mht),u("button",{onClick:Te(b=>r.unmountPersonality(h),["stop"])},Pht,8,kht)])]))),128))])):q("",!0)])):q("",!0),u("button",{onClick:e[246]||(e[246]=Te(h=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},Fht)])]),u("div",{class:He([{hidden:s.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",Bht,[Ght,u("div",zht,[u("div",Vht,[s.searchPersonalityInProgress?(w(),M("div",Hht,Yht)):q("",!0),s.searchPersonalityInProgress?q("",!0):(w(),M("div",$ht,Kht))]),ne(u("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search personality...",required:"","onUpdate:modelValue":e[248]||(e[248]=h=>s.searchPersonality=h),onKeyup:e[249]||(e[249]=Te((...h)=>r.searchPersonality_func&&r.searchPersonality_func(...h),["stop"]))},null,544),[[Pe,s.searchPersonality]]),s.searchPersonality?(w(),M("button",{key:0,onClick:e[250]||(e[250]=Te(h=>s.searchPersonality="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):q("",!0)])]),s.searchPersonality?q("",!0):(w(),M("div",jht,[u("label",Qht," Personalities Category: ("+fe(s.persCatgArr.length)+") ",1),u("select",{id:"persCat",onChange:e[251]||(e[251]=h=>r.update_personality_category(h.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(w(!0),M($e,null,dt(s.persCatgArr,(h,E)=>(w(),M("option",{key:E,selected:h==this.configFile.personality_category},fe(h),9,Xht))),128))],32)])),u("div",null,[s.personalitiesFiltered.length>0?(w(),M("div",Zht,[u("label",Jht,fe(s.searchPersonality?"Search results":"Personalities")+": ("+fe(s.personalitiesFiltered.length)+") ",1),u("div",{class:He(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.pzl_collapsed?"":"max-h-96"])},[Oe(rs,{name:"bounce"},{default:Je(()=>[(w(!0),M($e,null,dt(s.personalitiesFiltered,(h,E)=>(w(),Tt(c,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+E+"-"+h.name,personality:h,select_language:!0,full_path:h.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(b=>b===h.full_path||b===h.full_path+":"+h.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name"]))),128))]),_:1})],2)])):q("",!0)]),s.pzl_collapsed?(w(),M("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[252]||(e[252]=h=>s.pzl_collapsed=!s.pzl_collapsed)},tft)):(w(),M("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[253]||(e[253]=h=>s.pzl_collapsed=!s.pzl_collapsed)},ift))],2)]),u("div",sft,[u("div",rft,[u("button",{onClick:e[255]||(e[255]=Te(h=>s.ezc_collapsed=!s.ezc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ne(u("div",null,aft,512),[[Ot,s.ezc_collapsed]]),ne(u("div",null,cft,512),[[Ot,!s.ezc_collapsed]]),dft,r.configFile.extensions?(w(),M("div",uft,"|")):q("",!0),r.configFile.extensions?(w(),M("div",pft,[r.mountedExtensions.length>0?(w(),M("div",_ft,[(w(!0),M($e,null,dt(r.mountedExtensions,(h,E)=>(w(),M("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:E+"-"+h.name,ref_for:!0,ref:"mountedExtensions"},[u("div",hft,[u("button",null,[u("img",{src:s.bUrl+h.avatar,onError:e[254]||(e[254]=(...b)=>r.extensionImgPlacehodler&&r.extensionImgPlacehodler(...b)),class:He(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary","border-transparent z-0"]),title:h.name},null,40,fft)]),u("button",{onClick:Te(b=>r.unmountExtension(h),["stop"])},bft,8,mft)])]))),128))])):q("",!0)])):q("",!0)])]),u("div",{class:He([{hidden:s.ezc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",Eft,[vft,u("div",yft,[u("div",Sft,[s.searchExtensionInProgress?(w(),M("div",Tft,Cft)):q("",!0),s.searchExtensionInProgress?q("",!0):(w(),M("div",Rft,wft))]),ne(u("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search extension...",required:"","onUpdate:modelValue":e[256]||(e[256]=h=>s.searchExtension=h),onKeyup:e[257]||(e[257]=Te((...h)=>n.searchExtension_func&&n.searchExtension_func(...h),["stop"]))},null,544),[[Pe,s.searchExtension]]),s.searchExtension?(w(),M("button",{key:0,onClick:e[258]||(e[258]=Te(h=>s.searchExtension="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):q("",!0)])]),s.searchExtension?q("",!0):(w(),M("div",Nft,[u("label",Oft," Extensions Category: ("+fe(s.extCatgArr.length)+") ",1),u("select",{id:"extCat",onChange:e[259]||(e[259]=h=>r.update_extension_category(h.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(w(!0),M($e,null,dt(s.extCatgArr,(h,E)=>(w(),M("option",{key:E,selected:h==this.extension_category},fe(h),9,Ift))),128))],32)])),u("div",null,[s.extensionsFiltered.length>0?(w(),M("div",Mft,[u("label",Dft,fe(s.searchExtension?"Search results":"Personalities")+": ("+fe(s.extensionsFiltered.length)+") ",1),u("div",{class:He(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.ezl_collapsed?"":"max-h-96"])},[(w(!0),M($e,null,dt(s.extensionsFiltered,(h,E)=>(w(),Tt(_,{ref_for:!0,ref:"extensionsZoo",key:"index-"+E+"-"+h.name,extension:h,select_language:!0,full_path:h.full_path,"on-mount":r.mountExtension,"on-un-mount":r.unmountExtension,"on-remount":r.remountExtension,"on-reinstall":r.onExtensionReinstall,"on-settings":r.onSettingsExtension},null,8,["extension","full_path","on-mount","on-un-mount","on-remount","on-reinstall","on-settings"]))),128))],2)])):q("",!0)]),s.ezc_collapsed?(w(),M("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[260]||(e[260]=h=>s.ezl_collapsed=!s.ezl_collapsed)},Lft)):(w(),M("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[261]||(e[261]=h=>s.ezl_collapsed=!s.ezl_collapsed)},Uft))],2)]),u("div",Fft,[u("div",Bft,[u("button",{onClick:e[262]||(e[262]=Te(h=>s.mep_collapsed=!s.mep_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ne(u("div",null,zft,512),[[Ot,s.mep_collapsed]]),ne(u("div",null,Hft,512),[[Ot,!s.mep_collapsed]]),qft])]),u("div",{class:He([{hidden:s.mep_collapsed},"flex flex-col mb-2 px-3 pb-0"])},null,2)]),u("div",Yft,[u("div",$ft,[u("button",{onClick:e[263]||(e[263]=Te(h=>s.mc_collapsed=!s.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ne(u("div",null,Kft,512),[[Ot,s.mc_collapsed]]),ne(u("div",null,Qft,512),[[Ot,!s.mc_collapsed]]),Xft])]),u("div",{class:He([{hidden:s.mc_collapsed},"flex flex-col mb-2 p-2"])},[u("div",Zft,[u("div",Jft,[ne(u("input",{id:"override-model-parameters",type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[264]||(e[264]=Te(()=>{},["stop"])),"onUpdate:modelValue":e[265]||(e[265]=h=>r.configFile.override_personality_model_parameters=h),onChange:e[266]||(e[266]=h=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[lt,r.configFile.override_personality_model_parameters]]),emt])]),u("div",{class:He(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[u("div",tmt,[nmt,ne(u("input",{type:"text",id:"seed","onUpdate:modelValue":e[267]||(e[267]=h=>r.configFile.seed=h),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Pe,r.configFile.seed]])]),u("div",imt,[u("div",smt,[u("div",rmt,[omt,u("p",amt,[ne(u("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[268]||(e[268]=h=>r.configFile.temperature=h),onChange:e[269]||(e[269]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.temperature]])])]),ne(u("input",{id:"temperature",onChange:e[270]||(e[270]=h=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[271]||(e[271]=h=>r.configFile.temperature=h),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.temperature]])])]),u("div",lmt,[u("div",cmt,[u("div",dmt,[umt,u("p",pmt,[ne(u("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[272]||(e[272]=h=>r.configFile.n_predict=h),onChange:e[273]||(e[273]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.n_predict]])])]),ne(u("input",{id:"predict",type:"range",onChange:e[274]||(e[274]=h=>s.settingsChanged=!0),"onUpdate:modelValue":e[275]||(e[275]=h=>r.configFile.n_predict=h),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.n_predict]])])]),u("div",_mt,[u("div",hmt,[u("div",fmt,[mmt,u("p",gmt,[ne(u("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[276]||(e[276]=h=>r.configFile.top_k=h),onChange:e[277]||(e[277]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_k]])])]),ne(u("input",{id:"top_k",type:"range",onChange:e[278]||(e[278]=h=>s.settingsChanged=!0),"onUpdate:modelValue":e[279]||(e[279]=h=>r.configFile.top_k=h),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_k]])])]),u("div",bmt,[u("div",Emt,[u("div",vmt,[ymt,u("p",Smt,[ne(u("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[280]||(e[280]=h=>r.configFile.top_p=h),onChange:e[281]||(e[281]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_p]])])]),ne(u("input",{id:"top_p",type:"range","onUpdate:modelValue":e[282]||(e[282]=h=>r.configFile.top_p=h),min:"0",max:"1",step:"0.01",onChange:e[283]||(e[283]=h=>s.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_p]])])]),u("div",Tmt,[u("div",xmt,[u("div",Cmt,[Rmt,u("p",Amt,[ne(u("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[284]||(e[284]=h=>r.configFile.repeat_penalty=h),onChange:e[285]||(e[285]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_penalty]])])]),ne(u("input",{id:"repeat_penalty",onChange:e[286]||(e[286]=h=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[287]||(e[287]=h=>r.configFile.repeat_penalty=h),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_penalty]])])]),u("div",wmt,[u("div",Nmt,[u("div",Omt,[Imt,u("p",Mmt,[ne(u("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[288]||(e[288]=h=>r.configFile.repeat_last_n=h),onChange:e[289]||(e[289]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_last_n]])])]),ne(u("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[290]||(e[290]=h=>r.configFile.repeat_last_n=h),min:"0",max:"100",step:"1",onChange:e[291]||(e[291]=h=>s.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),Oe(f,{ref:"addmodeldialog"},null,512),Oe(m,{class:"z-20",show:s.variantSelectionDialogVisible,choices:s.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const kmt=bt(Not,[["render",Dmt],["__scopeId","data-v-ef55939e"]]),Lmt={components:{ClipBoardTextInput:RE,Card:vc},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const n={model_name:this.selectedModel,dataset_file:this.selectedDataset,max_length:this.max_length,batch_size:this.batch_size,lr:this.lr,num_epochs:this.num_epochs,output_dir:this.selectedFolder};Me.post("/start_training",n).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(n){const e=n.target.files;e.length>0&&(this.selectedDataset=e[0])}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}}},watch:{model_name(n){console.log("watching model_name",n),this.$refs.clipboardInput.inputValue=n}}},Pmt={key:0,class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Umt={class:"mb-4"},Fmt=u("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),Bmt=["value"],Gmt={class:"mb-4"},zmt=u("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),Vmt={class:"mb-4"},Hmt=u("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),qmt={class:"mb-4"},Ymt=u("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),$mt={class:"mb-4"},Wmt=u("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),Kmt={class:"mb-4"},jmt=u("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),Qmt={class:"mb-4"},Xmt=u("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),Zmt=u("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),Jmt={key:1};function egt(n,e,t,i,s,r){const o=ht("Card"),a=ht("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(w(),M("div",Pmt,[u("form",{onSubmit:e[2]||(e[2]=Te((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:""},[Oe(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[Oe(o,{title:"Model",class:"",isHorizontal:!1},{default:Je(()=>[u("div",Umt,[Fmt,ne(u("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>r.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>n.setModel&&n.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(w(!0),M($e,null,dt(r.models,l=>(w(),M("option",{key:l,value:l},fe(l),9,Bmt))),128))],544),[[zn,r.selectedModel]])])]),_:1}),Oe(o,{title:"Data",isHorizontal:!1},{default:Je(()=>[u("div",Gmt,[zmt,Oe(a,{id:"model_path",inputType:"file",value:s.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),Oe(o,{title:"Training",isHorizontal:!1},{default:Je(()=>[u("div",Vmt,[Hmt,Oe(a,{id:"model_path",inputType:"integer",value:s.lr},null,8,["value"])]),u("div",qmt,[Ymt,Oe(a,{id:"model_path",inputType:"integer",value:s.num_epochs},null,8,["value"])]),u("div",$mt,[Wmt,Oe(a,{id:"model_path",inputType:"integer",value:s.max_length},null,8,["value"])]),u("div",Kmt,[jmt,Oe(a,{id:"model_path",inputType:"integer",value:s.batch_size},null,8,["value"])])]),_:1}),Oe(o,{title:"Output",isHorizontal:!1},{default:Je(()=>[u("div",Qmt,[Xmt,Oe(a,{id:"model_path",inputType:"text",value:n.output_dir},null,8,["value"])])]),_:1})]),_:1}),Oe(o,{disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[Zmt]),_:1})],32)])):(w(),M("div",Jmt,[Oe(o,{title:"Info",class:"",isHorizontal:!1},{default:Je(()=>[je(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const tgt=bt(Lmt,[["render",egt]]),ngt={components:{ClipBoardTextInput:RE,Card:vc},data(){return{model_name:"jondurbin/airoboros-7b-gpt4",tokenizer_name:"jondurbin/airoboros-7b-gpt4",dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDatasetPath:""}},methods:{submitForm(){this.model_name,this.tokenizer_name,this.selectedDatasetPath,this.max_length,this.batch_size,this.lr,this.num_epochs,this.selectedFolder},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(n){const e=n.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},igt={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},sgt={class:"mb-4"},rgt=u("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),ogt={class:"mb-4"},agt=u("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),lgt=u("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function cgt(n,e,t,i,s,r){const o=ht("ClipBoardTextInput"),a=ht("Card");return w(),M("div",igt,[u("form",{onSubmit:e[0]||(e[0]=Te((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[Oe(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[Oe(a,{title:"Model",class:"",isHorizontal:!1},{default:Je(()=>[u("div",sgt,[rgt,Oe(o,{id:"model_path",inputType:"text",value:s.model_name},null,8,["value"])]),u("div",ogt,[agt,Oe(o,{id:"model_path",inputType:"text",value:s.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),Oe(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[lgt]),_:1})],32)])}const dgt=bt(ngt,[["render",cgt]]),ugt={name:"Discussion",emits:["delete","select","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(n){this.newTitle=n},checkedChangeEvent(n,e){this.$emit("checked",n,e)}},mounted(){this.newTitle=this.title,Ve(()=>{Ye.replace()})},watch:{showConfirmation(){Ve(()=>{Ye.replace()})},editTitleMode(n){this.showConfirmation=n,this.editTitle=n,n&&Ve(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(n){this.showConfirmation=n,n&&Ve(()=>{this.$refs.titleBox.focus()})},makeTitleMode(n){this.showConfirmation=n},checkBoxValue(n,e){this.checkBoxValue_local=n}}},pgt=["id"],_gt={class:"flex flex-row items-center gap-2"},hgt={key:0},fgt=["title"],mgt=["value"],ggt={class:"flex items-center flex-1 max-h-6"},bgt={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},Egt=u("i",{"data-feather":"x"},null,-1),vgt=[Egt],ygt=u("i",{"data-feather":"check"},null,-1),Sgt=[ygt],Tgt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},xgt=u("i",{"data-feather":"type"},null,-1),Cgt=[xgt],Rgt=u("i",{"data-feather":"edit-2"},null,-1),Agt=[Rgt],wgt=u("i",{"data-feather":"trash"},null,-1),Ngt=[wgt];function Ogt(n,e,t,i,s,r){return w(),M("div",{class:He([t.selected?"bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md min-w-[23rem] max-w-[23rem]":" min-w-[23rem] max-w-[23rem]","flex flex-row sm:flex-row flex-wrap flex-shrink: 0 item-center shadow-sm gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"]),id:"dis-"+t.id,onClick:e[12]||(e[12]=Te(o=>r.selectEvent(),["stop"]))},[u("div",_gt,[t.isCheckbox?(w(),M("div",hgt,[ne(u("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[0]||(e[0]=Te(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>s.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,t.id))},null,544),[[lt,s.checkBoxValue_local]])])):q("",!0),t.selected?(w(),M("div",{key:1,class:He(["min-h-full w-2 rounded-xl self-stretch",t.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):q("",!0),t.selected?q("",!0):(w(),M("div",{key:2,class:He(["w-2",t.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),s.editTitle?q("",!0):(w(),M("p",{key:0,title:t.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},fe(t.title?t.title==="untitled"?"New discussion":t.title:"New discussion"),9,fgt)),s.editTitle?(w(),M("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:t.title,required:"",onKeydown:[e[3]||(e[3]=wr(Te(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=wr(Te(o=>s.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=Te(()=>{},["stop"]))},null,40,mgt)):q("",!0),u("div",ggt,[s.showConfirmation?(w(),M("div",bgt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=Te(o=>r.cancel(),["stop"]))},vgt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=Te(o=>s.editTitleMode?r.editTitleEvent():s.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},Sgt)])):q("",!0),s.showConfirmation?q("",!0):(w(),M("div",Tgt,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[9]||(e[9]=Te(o=>s.makeTitleMode=!0,["stop"]))},Cgt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[10]||(e[10]=Te(o=>s.editTitleMode=!0,["stop"]))},Agt),u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[11]||(e[11]=Te(o=>s.deleteMode=!0,["stop"]))},Ngt)]))])],10,pgt)}const wE=bt(ugt,[["render",Ogt]]),Igt={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(n){this.prompt=n}}},Mgt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},Dgt={class:"bg-white p-8 rounded"},kgt={class:"text-xl font-bold mb-4"};function Lgt(n,e,t,i,s,r){return w(),M("div",null,[s.show?(w(),M("div",Mgt,[u("div",Dgt,[u("h2",kgt,fe(t.promptText),1),ne(u("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>s.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[Pe,s.inputText]]),u("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),u("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):q("",!0)])}const EO=bt(Igt,[["render",Lgt]]),Pgt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:wE,MarkdownRenderer:ap},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){Me.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(n=>{this.categories=n.data.categories}).catch(n=>{console.error("Error fetching categories:",n)})},fetchTitles(){console.log("Fetching categories"),Me.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(n=>{this.titles=n.data.titles,console.log("titles recovered")}).catch(n=>{console.error("Error fetching titles:",n)})},fetchContent(n){Me.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:n}).then(e=>{const t=e.data.contents[0];this.id=t.id,this.content=t.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(n){console.log("Delete category")},editCategory(n){console.log("Edit category")},checkUncheckCategory(n){console.log("Unchecked category")},deleteSkill(n){console.log("Delete skill ",n),Me.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:n}).then(()=>{this.fetchTitles()})},editTitle(n){Me.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:n,title:n}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(n){console.log("Make title")},checkUncheckTitle(n){},searchSkills(){}}},Ugt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},Fgt={class:"min-w-[23rem] max-w-[23rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},Bgt={class:"search p-4"},Ggt={classclass:"absolute flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},zgt=u("h2",{class:"text-xl font-bold m-4"},"Titles",-1),Vgt={class:"z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},Hgt=u("h2",{class:"text-xl font-bold m-4"},"Content",-1);function qgt(n,e,t,i,s,r){const o=ht("Discussion"),a=ht("MarkdownRenderer");return w(),M("div",{class:He([{hidden:!s.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[u("div",Ugt,[u("div",Fgt,[u("div",Bgt,[ne(u("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=l=>s.searchQuery=l),placeholder:"Search skills",class:"border border-gray-300 rounded px-2 py-1 mr-2"},null,512),[[Pe,s.searchQuery]]),u("button",{onClick:e[1]||(e[1]=(...l)=>r.searchSkills&&r.searchSkills(...l)),class:"bg-blue-500 text-white rounded px-4 py-1"},"Search")]),u("div",Ggt,[zgt,s.titles.length>0?(w(),Tt(rs,{key:0,name:"list"},{default:Je(()=>[(w(!0),M($e,null,dt(s.titles,l=>(w(),Tt(o,{key:l.id,id:l.id,title:l.title,selected:r.fetchContent(l.id),loading:s.loading,isCheckbox:s.isCheckbox,checkBoxValue:!1,onSelect:d=>r.fetchContent(l.id),onDelete:d=>r.deleteSkill(l.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):q("",!0)])]),u("div",Vgt,[Hgt,Oe(a,{host:t.host,"markdown-text":s.content,message_id:s.id,discussion_id:s.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),u("button",{onClick:e[2]||(e[2]=(...l)=>r.closeComponent&&r.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const vO=bt(Pgt,[["render",qgt]]),Ygt={props:{htmlContent:{type:String,required:!0}}},$gt=["innerHTML"];function Wgt(n,e,t,i,s,r){return w(),M("div",null,[u("div",{innerHTML:t.htmlContent},null,8,$gt)])}const Kgt=bt(Ygt,[["render",Wgt]]);const jgt={props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Form"}},data(){return{collapsed:!0}},computed:{formattedJson(){return typeof this.jsonData=="string"?JSON.stringify(JSON.parse(this.jsonData),null," ").replace(/\n/g,"
"):JSON.stringify(this.jsonData,null," ").replace(/\n/g,"
")},isObject(){return typeof this.jsonData=="object"&&this.jsonData!==null},isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")}},methods:{toggleCollapsed(){this.collapsed=!this.collapsed},toggleCollapsible(){this.collapsed=!this.collapsed}}},Qgt={key:0},Xgt={class:"toggle-icon mr-1"},Zgt={key:0,class:"fas fa-plus-circle text-gray-600"},Jgt={key:1,class:"fas fa-minus-circle text-gray-600"},ebt={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},tbt={key:0,class:"fas fa-plus-circle text-gray-600"},nbt={key:1,class:"fas fa-minus-circle text-gray-600"},ibt=["innerHTML"];function sbt(n,e,t,i,s,r){return r.isContentPresent?(w(),M("div",Qgt,[u("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...o)=>r.toggleCollapsible&&r.toggleCollapsible(...o))},[u("span",Xgt,[s.collapsed?(w(),M("i",Zgt)):(w(),M("i",Jgt))]),je(" "+fe(t.jsonFormText),1)]),ne(u("div",null,[u("div",ebt,[r.isObject?(w(),M("span",{key:0,onClick:e[1]||(e[1]=(...o)=>r.toggleCollapsed&&r.toggleCollapsed(...o)),class:"toggle-icon cursor-pointer mr-1"},[s.collapsed?(w(),M("i",tbt)):(w(),M("i",nbt))])):q("",!0),u("pre",{innerHTML:r.formattedJson},null,8,ibt)])],512),[[Ot,!s.collapsed]])])):q("",!0)}const rbt=bt(jgt,[["render",sbt]]),obt={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0},step_type:{type:String,required:!1,default:"start_end"}}},abt={class:"flex items-start"},lbt={class:"step flex items-center mb-4"},cbt={key:0,class:"flex items-center justify-center w-6 h-6 mr-2"},dbt={key:0},ubt=u("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),pbt=[ubt],_bt={key:1},hbt=u("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),fbt=[hbt],mbt={key:2},gbt=u("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),bbt=[gbt],Ebt={key:1,role:"status",class:"m-15"},vbt=u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),ybt=[vbt],Sbt={class:"text-sm ml-6"};function Tbt(n,e,t,i,s,r){return w(),M("div",abt,[u("div",lbt,[t.step_type=="start_end"?(w(),M("div",cbt,[t.done?q("",!0):(w(),M("div",dbt,pbt)),t.done&&t.status?(w(),M("div",_bt,fbt)):q("",!0),t.done&&!t.status?(w(),M("div",mbt,bbt)):q("",!0)])):q("",!0),t.done?q("",!0):(w(),M("div",Ebt,ybt)),u("h3",Sbt,fe(t.message),1)])])}const xbt=bt(obt,[["render",Tbt]]),Cbt="/assets/process-61f7a21b.svg",Rbt="/assets/ok-a0b56451.svg",Abt="/assets/failed-183609e7.svg",yO="/assets/send_globe-305330b9.svg";const wbt="/",Nbt={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:ap,Step:xbt,RenderHTMLJS:Kgt,JsonViewer:rbt,DynamicUIRenderer:bO},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{isSynthesizingVoice:!1,cpp_block:uO,html5_block:pO,LaTeX_block:_O,json_block:dO,javascript_block:cO,process_svg:Cbt,ok_svg:Rbt,failed_svg:Abt,loading_svg:fO,sendGlobe:yO,code_block:aO,python_block:lO,bash_block:hO,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),Ve(()=>{Ye.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let n of this.message.metadata)Object.prototype.hasOwnProperty.call(n,"audio_url")&&n.audio_url!=null&&(this.audio_url=n.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{computeTimeDiff(n,e){let t=e.getTime()-n.getTime();const i=Math.floor(t/(1e3*60*60));t-=i*(1e3*60*60);const s=Math.floor(t/(1e3*60));t-=s*(1e3*60);const r=Math.floor(t/1e3);return t-=r*1e3,[i,s,r]},insertTab(n){const e=n.target,t=e.selectionStart,i=e.selectionEnd,s=n.shiftKey;if(t===i)if(s){if(e.value.substring(t-4,t)==" "){const r=e.value.substring(0,t-4),o=e.value.substring(i),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t-4})}}else{const r=e.value.substring(0,t),o=e.value.substring(i),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t+4})}else{const o=e.value.substring(t,i).split(` +Here is how you can do that`))},Ept)])]),u("tr",null,[vpt,u("td",null,[u("div",ypt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[211]||(e[211]=(...h)=>r.reinstallPetalsService&&r.reinstallPetalsService(...h))},"install petals service")])])]),u("tr",null,[Spt,u("td",null,[u("div",Tpt,[ne(u("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[212]||(e[212]=h=>r.configFile.petals_base_url=h),onChange:e[213]||(e[213]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.petals_base_url]])])])])])]),_:1}),Oe(o,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",xpt,[u("tr",null,[Cpt,u("td",null,[u("div",Rpt,[ne(u("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[214]||(e[214]=h=>r.configFile.elastic_search_service=h),onChange:e[215]||(e[215]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.elastic_search_service]])])])]),u("tr",null,[Apt,u("td",null,[u("div",wpt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[216]||(e[216]=(...h)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(...h))},"install ElasticSearch service")])])]),u("tr",null,[Npt,u("td",null,[u("div",Opt,[ne(u("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[217]||(e[217]=h=>r.configFile.elastic_search_url=h),onChange:e[218]||(e[218]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.elastic_search_url]])])])])])]),_:1}),Oe(o,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[u("table",Ipt,[u("tr",null,[Mpt,u("td",null,[u("div",Dpt,[ne(u("input",{type:"checkbox",id:"enable_voice_service",required:"","onUpdate:modelValue":e[219]||(e[219]=h=>r.configFile.enable_voice_service=h),onChange:e[220]||(e[220]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[lt,r.configFile.enable_voice_service]])])])]),u("tr",null,[kpt,u("td",null,[u("div",Lpt,[u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[221]||(e[221]=(...h)=>r.reinstallAudioService&&r.reinstallAudioService(...h))},"install xtts service"),u("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[222]||(e[222]=(...h)=>r.startAudioService&&r.startAudioService(...h))},"start xtts service")])])]),u("tr",null,[Ppt,u("td",null,[u("div",Upt,[ne(u("input",{type:"text",id:"xtts_base_url",required:"","onUpdate:modelValue":e[223]||(e[223]=h=>r.configFile.xtts_base_url=h),onChange:e[224]||(e[224]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.xtts_base_url]])])])]),u("tr",null,[Fpt,u("td",null,[u("div",Bpt,[ne(u("select",{"onUpdate:modelValue":e[225]||(e[225]=h=>r.current_language=h),onChange:e[226]||(e[226]=h=>s.settingsChanged=!0),disabled:!r.enable_voice_service},[(w(!0),M($e,null,dt(s.voice_languages,(h,E)=>(w(),M("option",{key:E,value:h},fe(E),9,zpt))),128))],40,Gpt),[[zn,r.current_language]])])])]),u("tr",null,[Vpt,u("td",null,[u("div",Hpt,[ne(u("select",{"onUpdate:modelValue":e[227]||(e[227]=h=>r.current_voice=h),onChange:e[228]||(e[228]=h=>s.settingsChanged=!0),disabled:!r.enable_voice_service},[(w(!0),M($e,null,dt(s.voices,h=>(w(),M("option",{key:h,value:h},fe(h),9,Ypt))),128))],40,qpt),[[zn,r.current_voice]])])])]),u("tr",null,[$pt,u("td",null,[u("div",Wpt,[ne(u("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[229]||(e[229]=h=>r.configFile.auto_read=h),onChange:e[230]||(e[230]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.enable_voice_service},null,40,Kpt),[[lt,r.configFile.auto_read]])])])])])]),_:1})],2)]),u("div",jpt,[u("div",Qpt,[u("button",{onClick:e[231]||(e[231]=Te(h=>s.bzc_collapsed=!s.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ne(u("div",null,Zpt,512),[[Ot,s.bzc_collapsed]]),ne(u("div",null,e_t,512),[[Ot,!s.bzc_collapsed]]),t_t,r.configFile.binding_name?q("",!0):(w(),M("div",n_t,[i_t,je(" No binding selected! ")])),r.configFile.binding_name?(w(),M("div",s_t,"|")):q("",!0),r.configFile.binding_name?(w(),M("div",r_t,[u("div",o_t,[u("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,a_t),u("h3",l_t,fe(r.binding_name),1)])])):q("",!0)])]),u("div",{class:He([{hidden:s.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(w(),M("div",c_t,[u("label",d_t," Bindings: ("+fe(r.bindingsZoo.length)+") ",1),u("div",{class:He(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.bzl_collapsed?"":"max-h-96"])},[Oe(rs,{name:"list"},{default:Je(()=>[(w(!0),M($e,null,dt(r.bindingsZoo,(h,E)=>(w(),Tt(a,{ref_for:!0,ref:"bindingZoo",key:"index-"+E+"-"+h.folder,binding:h,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:h.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):q("",!0),s.bzl_collapsed?(w(),M("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[232]||(e[232]=h=>s.bzl_collapsed=!s.bzl_collapsed)},p_t)):(w(),M("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[233]||(e[233]=h=>s.bzl_collapsed=!s.bzl_collapsed)},h_t))],2)]),u("div",f_t,[u("div",m_t,[u("button",{onClick:e[234]||(e[234]=Te(h=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ne(u("div",null,b_t,512),[[Ot,s.mzc_collapsed]]),ne(u("div",null,v_t,512),[[Ot,!s.mzc_collapsed]]),y_t,u("div",S_t,[r.configFile.binding_name?q("",!0):(w(),M("div",T_t,[x_t,je(" Select binding first! ")])),!r.configFile.model_name&&r.configFile.binding_name?(w(),M("div",C_t,[R_t,je(" No model selected! ")])):q("",!0),r.configFile.model_name?(w(),M("div",A_t,"|")):q("",!0),r.configFile.model_name?(w(),M("div",w_t,[u("div",N_t,[u("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,O_t),u("h3",I_t,fe(r.configFile.model_name),1)])])):q("",!0)])])]),u("div",{class:He([{hidden:s.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",M_t,[u("div",D_t,[u("div",k_t,[s.searchModelInProgress?(w(),M("div",L_t,U_t)):q("",!0),s.searchModelInProgress?q("",!0):(w(),M("div",F_t,G_t))]),ne(u("input",{type:"search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search models...",required:"","onUpdate:modelValue":e[235]||(e[235]=h=>s.searchModel=h),onKeyup:e[236]||(e[236]=wr((...h)=>r.searchModel_func&&r.searchModel_func(...h),["enter"]))},null,544),[[Pe,s.searchModel]]),s.searchModel?(w(),M("button",{key:0,onClick:e[237]||(e[237]=Te(h=>s.searchModel="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):q("",!0)])]),u("div",null,[ne(u("input",{"onUpdate:modelValue":e[238]||(e[238]=h=>s.show_only_installed_models=h),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[lt,s.show_only_installed_models]]),z_t]),u("div",null,[Oe(l,{radioOptions:s.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),V_t,s.is_loading_zoo?(w(),M("div",H_t,$_t)):q("",!0),s.models_zoo&&s.models_zoo.length>0?(w(),M("div",W_t,[u("label",K_t," Models: ("+fe(s.models_zoo.length)+") ",1),u("div",{class:He(["overflow-y-auto p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",s.mzl_collapsed?"":"max-h-96"])},[Oe(rs,{name:"list"},{default:Je(()=>[(w(!0),M($e,null,dt(r.rendered_models_zoo,(h,E)=>(w(),Tt(d,{ref_for:!0,ref:"modelZoo",key:"index-"+E+"-"+h.name,model:h,"is-installed":h.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:h.name===r.configFile.model_name,model_type:h.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),u("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[239]||(e[239]=(...h)=>r.load_more_models&&r.load_more_models(...h))},"Load more models",512)]),_:1})],2)])):q("",!0),s.mzl_collapsed?(w(),M("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[240]||(e[240]=(...h)=>r.open_mzl&&r.open_mzl(...h))},Q_t)):(w(),M("button",{key:3,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[241]||(e[241]=(...h)=>r.open_mzl&&r.open_mzl(...h))},Z_t)),u("div",J_t,[u("div",eht,[u("div",null,[u("div",tht,[nht,ne(u("input",{type:"text","onUpdate:modelValue":e[242]||(e[242]=h=>s.reference_path=h),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter Path ...",required:""},null,512),[[Pe,s.reference_path]])]),u("button",{type:"button",onClick:e[243]||(e[243]=Te(h=>r.onCreateReference(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Add reference")]),s.modelDownlaodInProgress?q("",!0):(w(),M("div",iht,[u("div",sht,[rht,ne(u("input",{type:"text","onUpdate:modelValue":e[244]||(e[244]=h=>s.addModel.url=h),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter URL ...",required:""},null,512),[[Pe,s.addModel.url]])]),u("button",{type:"button",onClick:e[245]||(e[245]=Te(h=>r.onInstallAddModel(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Download")])),s.modelDownlaodInProgress?(w(),M("div",oht,[aht,u("div",lht,[u("div",cht,[u("div",dht,[uht,u("span",pht,fe(Math.floor(s.addModel.progress))+"%",1)]),u("div",{class:"mx-1 opacity-80 line-clamp-1",title:s.addModel.url},fe(s.addModel.url),9,_ht),u("div",hht,[u("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en({width:s.addModel.progress+"%"})},null,4)]),u("div",fht,[u("span",mht,"Download speed: "+fe(r.speed_computed)+"/s",1),u("span",ght,fe(r.downloaded_size_computed)+"/"+fe(r.total_size_computed),1)])])]),u("div",bht,[u("div",Eht,[u("div",vht,[u("button",{onClick:e[246]||(e[246]=Te((...h)=>r.onCancelInstall&&r.onCancelInstall(...h),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])):q("",!0)])])],2)]),u("div",yht,[u("div",Sht,[u("button",{onClick:e[249]||(e[249]=Te(h=>s.pzc_collapsed=!s.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ne(u("div",null,xht,512),[[Ot,s.pzc_collapsed]]),ne(u("div",null,Rht,512),[[Ot,!s.pzc_collapsed]]),Aht,r.configFile.personalities?(w(),M("div",wht,"|")):q("",!0),u("div",Nht,fe(r.active_pesonality),1),r.configFile.personalities?(w(),M("div",Oht,"|")):q("",!0),r.configFile.personalities?(w(),M("div",Iht,[r.mountedPersArr.length>0?(w(),M("div",Mht,[(w(!0),M($e,null,dt(r.mountedPersArr,(h,E)=>(w(),M("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:E+"-"+h.name,ref_for:!0,ref:"mountedPersonalities"},[u("div",Dht,[u("button",{onClick:Te(b=>r.onPersonalitySelected(h),["stop"])},[u("img",{src:s.bUrl+h.avatar,onError:e[247]||(e[247]=(...b)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...b)),class:He(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(h.full_path)?"border-secondary":"border-transparent z-0"]),title:h.name},null,42,Lht)],8,kht),u("button",{onClick:Te(b=>r.unmountPersonality(h),["stop"])},Fht,8,Pht)])]))),128))])):q("",!0)])):q("",!0),u("button",{onClick:e[248]||(e[248]=Te(h=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},Ght)])]),u("div",{class:He([{hidden:s.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",zht,[Vht,u("div",Hht,[u("div",qht,[s.searchPersonalityInProgress?(w(),M("div",Yht,Wht)):q("",!0),s.searchPersonalityInProgress?q("",!0):(w(),M("div",Kht,Qht))]),ne(u("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search personality...",required:"","onUpdate:modelValue":e[250]||(e[250]=h=>s.searchPersonality=h),onKeyup:e[251]||(e[251]=Te((...h)=>r.searchPersonality_func&&r.searchPersonality_func(...h),["stop"]))},null,544),[[Pe,s.searchPersonality]]),s.searchPersonality?(w(),M("button",{key:0,onClick:e[252]||(e[252]=Te(h=>s.searchPersonality="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):q("",!0)])]),s.searchPersonality?q("",!0):(w(),M("div",Xht,[u("label",Zht," Personalities Category: ("+fe(s.persCatgArr.length)+") ",1),u("select",{id:"persCat",onChange:e[253]||(e[253]=h=>r.update_personality_category(h.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(w(!0),M($e,null,dt(s.persCatgArr,(h,E)=>(w(),M("option",{key:E,selected:h==this.configFile.personality_category},fe(h),9,Jht))),128))],32)])),u("div",null,[s.personalitiesFiltered.length>0?(w(),M("div",eft,[u("label",tft,fe(s.searchPersonality?"Search results":"Personalities")+": ("+fe(s.personalitiesFiltered.length)+") ",1),u("div",{class:He(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.pzl_collapsed?"":"max-h-96"])},[Oe(rs,{name:"bounce"},{default:Je(()=>[(w(!0),M($e,null,dt(s.personalitiesFiltered,(h,E)=>(w(),Tt(c,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+E+"-"+h.name,personality:h,select_language:!0,full_path:h.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(b=>b===h.full_path||b===h.full_path+":"+h.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name"]))),128))]),_:1})],2)])):q("",!0)]),s.pzl_collapsed?(w(),M("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[254]||(e[254]=h=>s.pzl_collapsed=!s.pzl_collapsed)},ift)):(w(),M("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[255]||(e[255]=h=>s.pzl_collapsed=!s.pzl_collapsed)},rft))],2)]),u("div",oft,[u("div",aft,[u("button",{onClick:e[257]||(e[257]=Te(h=>s.ezc_collapsed=!s.ezc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ne(u("div",null,cft,512),[[Ot,s.ezc_collapsed]]),ne(u("div",null,uft,512),[[Ot,!s.ezc_collapsed]]),pft,r.configFile.extensions?(w(),M("div",_ft,"|")):q("",!0),r.configFile.extensions?(w(),M("div",hft,[r.mountedExtensions.length>0?(w(),M("div",fft,[(w(!0),M($e,null,dt(r.mountedExtensions,(h,E)=>(w(),M("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:E+"-"+h.name,ref_for:!0,ref:"mountedExtensions"},[u("div",mft,[u("button",null,[u("img",{src:s.bUrl+h.avatar,onError:e[256]||(e[256]=(...b)=>r.extensionImgPlacehodler&&r.extensionImgPlacehodler(...b)),class:He(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary","border-transparent z-0"]),title:h.name},null,40,gft)]),u("button",{onClick:Te(b=>r.unmountExtension(h),["stop"])},vft,8,bft)])]))),128))])):q("",!0)])):q("",!0)])]),u("div",{class:He([{hidden:s.ezc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[u("div",yft,[Sft,u("div",Tft,[u("div",xft,[s.searchExtensionInProgress?(w(),M("div",Cft,Aft)):q("",!0),s.searchExtensionInProgress?q("",!0):(w(),M("div",wft,Oft))]),ne(u("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search extension...",required:"","onUpdate:modelValue":e[258]||(e[258]=h=>s.searchExtension=h),onKeyup:e[259]||(e[259]=Te((...h)=>n.searchExtension_func&&n.searchExtension_func(...h),["stop"]))},null,544),[[Pe,s.searchExtension]]),s.searchExtension?(w(),M("button",{key:0,onClick:e[260]||(e[260]=Te(h=>s.searchExtension="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):q("",!0)])]),s.searchExtension?q("",!0):(w(),M("div",Ift,[u("label",Mft," Extensions Category: ("+fe(s.extCatgArr.length)+") ",1),u("select",{id:"extCat",onChange:e[261]||(e[261]=h=>r.update_extension_category(h.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(w(!0),M($e,null,dt(s.extCatgArr,(h,E)=>(w(),M("option",{key:E,selected:h==this.extension_category},fe(h),9,Dft))),128))],32)])),u("div",null,[s.extensionsFiltered.length>0?(w(),M("div",kft,[u("label",Lft,fe(s.searchExtension?"Search results":"Personalities")+": ("+fe(s.extensionsFiltered.length)+") ",1),u("div",{class:He(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.ezl_collapsed?"":"max-h-96"])},[(w(!0),M($e,null,dt(s.extensionsFiltered,(h,E)=>(w(),Tt(_,{ref_for:!0,ref:"extensionsZoo",key:"index-"+E+"-"+h.name,extension:h,select_language:!0,full_path:h.full_path,"on-mount":r.mountExtension,"on-un-mount":r.unmountExtension,"on-remount":r.remountExtension,"on-reinstall":r.onExtensionReinstall,"on-settings":r.onSettingsExtension},null,8,["extension","full_path","on-mount","on-un-mount","on-remount","on-reinstall","on-settings"]))),128))],2)])):q("",!0)]),s.ezc_collapsed?(w(),M("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[262]||(e[262]=h=>s.ezl_collapsed=!s.ezl_collapsed)},Uft)):(w(),M("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[263]||(e[263]=h=>s.ezl_collapsed=!s.ezl_collapsed)},Bft))],2)]),u("div",Gft,[u("div",zft,[u("button",{onClick:e[264]||(e[264]=Te(h=>s.mep_collapsed=!s.mep_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ne(u("div",null,Hft,512),[[Ot,s.mep_collapsed]]),ne(u("div",null,Yft,512),[[Ot,!s.mep_collapsed]]),$ft])]),u("div",{class:He([{hidden:s.mep_collapsed},"flex flex-col mb-2 px-3 pb-0"])},null,2)]),u("div",Wft,[u("div",Kft,[u("button",{onClick:e[265]||(e[265]=Te(h=>s.mc_collapsed=!s.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ne(u("div",null,Qft,512),[[Ot,s.mc_collapsed]]),ne(u("div",null,Zft,512),[[Ot,!s.mc_collapsed]]),Jft])]),u("div",{class:He([{hidden:s.mc_collapsed},"flex flex-col mb-2 p-2"])},[u("div",emt,[u("div",tmt,[ne(u("input",{id:"override-model-parameters",type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[266]||(e[266]=Te(()=>{},["stop"])),"onUpdate:modelValue":e[267]||(e[267]=h=>r.configFile.override_personality_model_parameters=h),onChange:e[268]||(e[268]=h=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[lt,r.configFile.override_personality_model_parameters]]),nmt])]),u("div",{class:He(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[u("div",imt,[smt,ne(u("input",{type:"text",id:"seed","onUpdate:modelValue":e[269]||(e[269]=h=>r.configFile.seed=h),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Pe,r.configFile.seed]])]),u("div",rmt,[u("div",omt,[u("div",amt,[lmt,u("p",cmt,[ne(u("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[270]||(e[270]=h=>r.configFile.temperature=h),onChange:e[271]||(e[271]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.temperature]])])]),ne(u("input",{id:"temperature",onChange:e[272]||(e[272]=h=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[273]||(e[273]=h=>r.configFile.temperature=h),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.temperature]])])]),u("div",dmt,[u("div",umt,[u("div",pmt,[_mt,u("p",hmt,[ne(u("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[274]||(e[274]=h=>r.configFile.n_predict=h),onChange:e[275]||(e[275]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.n_predict]])])]),ne(u("input",{id:"predict",type:"range",onChange:e[276]||(e[276]=h=>s.settingsChanged=!0),"onUpdate:modelValue":e[277]||(e[277]=h=>r.configFile.n_predict=h),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.n_predict]])])]),u("div",fmt,[u("div",mmt,[u("div",gmt,[bmt,u("p",Emt,[ne(u("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[278]||(e[278]=h=>r.configFile.top_k=h),onChange:e[279]||(e[279]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_k]])])]),ne(u("input",{id:"top_k",type:"range",onChange:e[280]||(e[280]=h=>s.settingsChanged=!0),"onUpdate:modelValue":e[281]||(e[281]=h=>r.configFile.top_k=h),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_k]])])]),u("div",vmt,[u("div",ymt,[u("div",Smt,[Tmt,u("p",xmt,[ne(u("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[282]||(e[282]=h=>r.configFile.top_p=h),onChange:e[283]||(e[283]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_p]])])]),ne(u("input",{id:"top_p",type:"range","onUpdate:modelValue":e[284]||(e[284]=h=>r.configFile.top_p=h),min:"0",max:"1",step:"0.01",onChange:e[285]||(e[285]=h=>s.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_p]])])]),u("div",Cmt,[u("div",Rmt,[u("div",Amt,[wmt,u("p",Nmt,[ne(u("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[286]||(e[286]=h=>r.configFile.repeat_penalty=h),onChange:e[287]||(e[287]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_penalty]])])]),ne(u("input",{id:"repeat_penalty",onChange:e[288]||(e[288]=h=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[289]||(e[289]=h=>r.configFile.repeat_penalty=h),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_penalty]])])]),u("div",Omt,[u("div",Imt,[u("div",Mmt,[Dmt,u("p",kmt,[ne(u("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[290]||(e[290]=h=>r.configFile.repeat_last_n=h),onChange:e[291]||(e[291]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_last_n]])])]),ne(u("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[292]||(e[292]=h=>r.configFile.repeat_last_n=h),min:"0",max:"100",step:"1",onChange:e[293]||(e[293]=h=>s.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),Oe(f,{ref:"addmodeldialog"},null,512),Oe(m,{class:"z-20",show:s.variantSelectionDialogVisible,choices:s.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const Pmt=bt(Not,[["render",Lmt],["__scopeId","data-v-83865e3b"]]),Umt={components:{ClipBoardTextInput:RE,Card:vc},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const n={model_name:this.selectedModel,dataset_file:this.selectedDataset,max_length:this.max_length,batch_size:this.batch_size,lr:this.lr,num_epochs:this.num_epochs,output_dir:this.selectedFolder};Me.post("/start_training",n).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(n){const e=n.target.files;e.length>0&&(this.selectedDataset=e[0])}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}}},watch:{model_name(n){console.log("watching model_name",n),this.$refs.clipboardInput.inputValue=n}}},Fmt={key:0,class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Bmt={class:"mb-4"},Gmt=u("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),zmt=["value"],Vmt={class:"mb-4"},Hmt=u("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),qmt={class:"mb-4"},Ymt=u("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),$mt={class:"mb-4"},Wmt=u("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),Kmt={class:"mb-4"},jmt=u("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),Qmt={class:"mb-4"},Xmt=u("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),Zmt={class:"mb-4"},Jmt=u("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),egt=u("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),tgt={key:1};function ngt(n,e,t,i,s,r){const o=ht("Card"),a=ht("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(w(),M("div",Fmt,[u("form",{onSubmit:e[2]||(e[2]=Te((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:""},[Oe(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[Oe(o,{title:"Model",class:"",isHorizontal:!1},{default:Je(()=>[u("div",Bmt,[Gmt,ne(u("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>r.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>n.setModel&&n.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(w(!0),M($e,null,dt(r.models,l=>(w(),M("option",{key:l,value:l},fe(l),9,zmt))),128))],544),[[zn,r.selectedModel]])])]),_:1}),Oe(o,{title:"Data",isHorizontal:!1},{default:Je(()=>[u("div",Vmt,[Hmt,Oe(a,{id:"model_path",inputType:"file",value:s.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),Oe(o,{title:"Training",isHorizontal:!1},{default:Je(()=>[u("div",qmt,[Ymt,Oe(a,{id:"model_path",inputType:"integer",value:s.lr},null,8,["value"])]),u("div",$mt,[Wmt,Oe(a,{id:"model_path",inputType:"integer",value:s.num_epochs},null,8,["value"])]),u("div",Kmt,[jmt,Oe(a,{id:"model_path",inputType:"integer",value:s.max_length},null,8,["value"])]),u("div",Qmt,[Xmt,Oe(a,{id:"model_path",inputType:"integer",value:s.batch_size},null,8,["value"])])]),_:1}),Oe(o,{title:"Output",isHorizontal:!1},{default:Je(()=>[u("div",Zmt,[Jmt,Oe(a,{id:"model_path",inputType:"text",value:n.output_dir},null,8,["value"])])]),_:1})]),_:1}),Oe(o,{disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[egt]),_:1})],32)])):(w(),M("div",tgt,[Oe(o,{title:"Info",class:"",isHorizontal:!1},{default:Je(()=>[je(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const igt=bt(Umt,[["render",ngt]]),sgt={components:{ClipBoardTextInput:RE,Card:vc},data(){return{model_name:"jondurbin/airoboros-7b-gpt4",tokenizer_name:"jondurbin/airoboros-7b-gpt4",dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDatasetPath:""}},methods:{submitForm(){this.model_name,this.tokenizer_name,this.selectedDatasetPath,this.max_length,this.batch_size,this.lr,this.num_epochs,this.selectedFolder},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(n){const e=n.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},rgt={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},ogt={class:"mb-4"},agt=u("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),lgt={class:"mb-4"},cgt=u("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),dgt=u("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function ugt(n,e,t,i,s,r){const o=ht("ClipBoardTextInput"),a=ht("Card");return w(),M("div",rgt,[u("form",{onSubmit:e[0]||(e[0]=Te((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[Oe(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[Oe(a,{title:"Model",class:"",isHorizontal:!1},{default:Je(()=>[u("div",ogt,[agt,Oe(o,{id:"model_path",inputType:"text",value:s.model_name},null,8,["value"])]),u("div",lgt,[cgt,Oe(o,{id:"model_path",inputType:"text",value:s.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),Oe(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[dgt]),_:1})],32)])}const pgt=bt(sgt,[["render",ugt]]),_gt={name:"Discussion",emits:["delete","select","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(n){this.newTitle=n},checkedChangeEvent(n,e){this.$emit("checked",n,e)}},mounted(){this.newTitle=this.title,Ve(()=>{Ye.replace()})},watch:{showConfirmation(){Ve(()=>{Ye.replace()})},editTitleMode(n){this.showConfirmation=n,this.editTitle=n,n&&Ve(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(n){this.showConfirmation=n,n&&Ve(()=>{this.$refs.titleBox.focus()})},makeTitleMode(n){this.showConfirmation=n},checkBoxValue(n,e){this.checkBoxValue_local=n}}},hgt=["id"],fgt={class:"flex flex-row items-center gap-2"},mgt={key:0},ggt=["title"],bgt=["value"],Egt={class:"flex items-center flex-1 max-h-6"},vgt={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},ygt=u("i",{"data-feather":"x"},null,-1),Sgt=[ygt],Tgt=u("i",{"data-feather":"check"},null,-1),xgt=[Tgt],Cgt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},Rgt=u("i",{"data-feather":"type"},null,-1),Agt=[Rgt],wgt=u("i",{"data-feather":"edit-2"},null,-1),Ngt=[wgt],Ogt=u("i",{"data-feather":"trash"},null,-1),Igt=[Ogt];function Mgt(n,e,t,i,s,r){return w(),M("div",{class:He([t.selected?"bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md min-w-[23rem] max-w-[23rem]":" min-w-[23rem] max-w-[23rem]","flex flex-row sm:flex-row flex-wrap flex-shrink: 0 item-center shadow-sm gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"]),id:"dis-"+t.id,onClick:e[12]||(e[12]=Te(o=>r.selectEvent(),["stop"]))},[u("div",fgt,[t.isCheckbox?(w(),M("div",mgt,[ne(u("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[0]||(e[0]=Te(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>s.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,t.id))},null,544),[[lt,s.checkBoxValue_local]])])):q("",!0),t.selected?(w(),M("div",{key:1,class:He(["min-h-full w-2 rounded-xl self-stretch",t.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):q("",!0),t.selected?q("",!0):(w(),M("div",{key:2,class:He(["w-2",t.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),s.editTitle?q("",!0):(w(),M("p",{key:0,title:t.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},fe(t.title?t.title==="untitled"?"New discussion":t.title:"New discussion"),9,ggt)),s.editTitle?(w(),M("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:t.title,required:"",onKeydown:[e[3]||(e[3]=wr(Te(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=wr(Te(o=>s.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=Te(()=>{},["stop"]))},null,40,bgt)):q("",!0),u("div",Egt,[s.showConfirmation?(w(),M("div",vgt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=Te(o=>r.cancel(),["stop"]))},Sgt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=Te(o=>s.editTitleMode?r.editTitleEvent():s.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},xgt)])):q("",!0),s.showConfirmation?q("",!0):(w(),M("div",Cgt,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[9]||(e[9]=Te(o=>s.makeTitleMode=!0,["stop"]))},Agt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[10]||(e[10]=Te(o=>s.editTitleMode=!0,["stop"]))},Ngt),u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[11]||(e[11]=Te(o=>s.deleteMode=!0,["stop"]))},Igt)]))])],10,hgt)}const wE=bt(_gt,[["render",Mgt]]),Dgt={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(n){this.prompt=n}}},kgt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},Lgt={class:"bg-white p-8 rounded"},Pgt={class:"text-xl font-bold mb-4"};function Ugt(n,e,t,i,s,r){return w(),M("div",null,[s.show?(w(),M("div",kgt,[u("div",Lgt,[u("h2",Pgt,fe(t.promptText),1),ne(u("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>s.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[Pe,s.inputText]]),u("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),u("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):q("",!0)])}const EO=bt(Dgt,[["render",Ugt]]),Fgt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:wE,MarkdownRenderer:ap},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){Me.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(n=>{this.categories=n.data.categories}).catch(n=>{console.error("Error fetching categories:",n)})},fetchTitles(){console.log("Fetching categories"),Me.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(n=>{this.titles=n.data.titles,console.log("titles recovered")}).catch(n=>{console.error("Error fetching titles:",n)})},fetchContent(n){Me.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:n}).then(e=>{const t=e.data.contents[0];this.id=t.id,this.content=t.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(n){console.log("Delete category")},editCategory(n){console.log("Edit category")},checkUncheckCategory(n){console.log("Unchecked category")},deleteSkill(n){console.log("Delete skill ",n),Me.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:n}).then(()=>{this.fetchTitles()})},editTitle(n){Me.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:n,title:n}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(n){console.log("Make title")},checkUncheckTitle(n){},searchSkills(){}}},Bgt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},Ggt={class:"min-w-[23rem] max-w-[23rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},zgt={class:"search p-4"},Vgt={classclass:"absolute flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},Hgt=u("h2",{class:"text-xl font-bold m-4"},"Titles",-1),qgt={class:"z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},Ygt=u("h2",{class:"text-xl font-bold m-4"},"Content",-1);function $gt(n,e,t,i,s,r){const o=ht("Discussion"),a=ht("MarkdownRenderer");return w(),M("div",{class:He([{hidden:!s.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[u("div",Bgt,[u("div",Ggt,[u("div",zgt,[ne(u("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=l=>s.searchQuery=l),placeholder:"Search skills",class:"border border-gray-300 rounded px-2 py-1 mr-2"},null,512),[[Pe,s.searchQuery]]),u("button",{onClick:e[1]||(e[1]=(...l)=>r.searchSkills&&r.searchSkills(...l)),class:"bg-blue-500 text-white rounded px-4 py-1"},"Search")]),u("div",Vgt,[Hgt,s.titles.length>0?(w(),Tt(rs,{key:0,name:"list"},{default:Je(()=>[(w(!0),M($e,null,dt(s.titles,l=>(w(),Tt(o,{key:l.id,id:l.id,title:l.title,selected:r.fetchContent(l.id),loading:s.loading,isCheckbox:s.isCheckbox,checkBoxValue:!1,onSelect:d=>r.fetchContent(l.id),onDelete:d=>r.deleteSkill(l.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):q("",!0)])]),u("div",qgt,[Ygt,Oe(a,{host:t.host,"markdown-text":s.content,message_id:s.id,discussion_id:s.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),u("button",{onClick:e[2]||(e[2]=(...l)=>r.closeComponent&&r.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const vO=bt(Fgt,[["render",$gt]]),Wgt={props:{htmlContent:{type:String,required:!0}}},Kgt=["innerHTML"];function jgt(n,e,t,i,s,r){return w(),M("div",null,[u("div",{innerHTML:t.htmlContent},null,8,Kgt)])}const Qgt=bt(Wgt,[["render",jgt]]);const Xgt={props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Form"}},data(){return{collapsed:!0}},computed:{formattedJson(){return typeof this.jsonData=="string"?JSON.stringify(JSON.parse(this.jsonData),null," ").replace(/\n/g,"
"):JSON.stringify(this.jsonData,null," ").replace(/\n/g,"
")},isObject(){return typeof this.jsonData=="object"&&this.jsonData!==null},isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")}},methods:{toggleCollapsed(){this.collapsed=!this.collapsed},toggleCollapsible(){this.collapsed=!this.collapsed}}},Zgt={key:0},Jgt={class:"toggle-icon mr-1"},ebt={key:0,class:"fas fa-plus-circle text-gray-600"},tbt={key:1,class:"fas fa-minus-circle text-gray-600"},nbt={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},ibt={key:0,class:"fas fa-plus-circle text-gray-600"},sbt={key:1,class:"fas fa-minus-circle text-gray-600"},rbt=["innerHTML"];function obt(n,e,t,i,s,r){return r.isContentPresent?(w(),M("div",Zgt,[u("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...o)=>r.toggleCollapsible&&r.toggleCollapsible(...o))},[u("span",Jgt,[s.collapsed?(w(),M("i",ebt)):(w(),M("i",tbt))]),je(" "+fe(t.jsonFormText),1)]),ne(u("div",null,[u("div",nbt,[r.isObject?(w(),M("span",{key:0,onClick:e[1]||(e[1]=(...o)=>r.toggleCollapsed&&r.toggleCollapsed(...o)),class:"toggle-icon cursor-pointer mr-1"},[s.collapsed?(w(),M("i",ibt)):(w(),M("i",sbt))])):q("",!0),u("pre",{innerHTML:r.formattedJson},null,8,rbt)])],512),[[Ot,!s.collapsed]])])):q("",!0)}const abt=bt(Xgt,[["render",obt]]),lbt={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0},step_type:{type:String,required:!1,default:"start_end"}}},cbt={class:"flex items-start"},dbt={class:"step flex items-center mb-4"},ubt={key:0,class:"flex items-center justify-center w-6 h-6 mr-2"},pbt={key:0},_bt=u("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),hbt=[_bt],fbt={key:1},mbt=u("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),gbt=[mbt],bbt={key:2},Ebt=u("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),vbt=[Ebt],ybt={key:1,role:"status",class:"m-15"},Sbt=u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),Tbt=[Sbt],xbt={class:"text-sm ml-6"};function Cbt(n,e,t,i,s,r){return w(),M("div",cbt,[u("div",dbt,[t.step_type=="start_end"?(w(),M("div",ubt,[t.done?q("",!0):(w(),M("div",pbt,hbt)),t.done&&t.status?(w(),M("div",fbt,gbt)):q("",!0),t.done&&!t.status?(w(),M("div",bbt,vbt)):q("",!0)])):q("",!0),t.done?q("",!0):(w(),M("div",ybt,Tbt)),u("h3",xbt,fe(t.message),1)])])}const Rbt=bt(lbt,[["render",Cbt]]),Abt="/assets/process-61f7a21b.svg",wbt="/assets/ok-a0b56451.svg",Nbt="/assets/failed-183609e7.svg",yO="/assets/send_globe-305330b9.svg";const Obt="/",Ibt={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:ap,Step:Rbt,RenderHTMLJS:Qgt,JsonViewer:abt,DynamicUIRenderer:bO},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{isSynthesizingVoice:!1,cpp_block:uO,html5_block:pO,LaTeX_block:_O,json_block:dO,javascript_block:cO,process_svg:Abt,ok_svg:wbt,failed_svg:Nbt,loading_svg:fO,sendGlobe:yO,code_block:aO,python_block:lO,bash_block:hO,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),Ve(()=>{Ye.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let n of this.message.metadata)Object.prototype.hasOwnProperty.call(n,"audio_url")&&n.audio_url!=null&&(this.audio_url=n.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{computeTimeDiff(n,e){let t=e.getTime()-n.getTime();const i=Math.floor(t/(1e3*60*60));t-=i*(1e3*60*60);const s=Math.floor(t/(1e3*60));t-=s*(1e3*60);const r=Math.floor(t/1e3);return t-=r*1e3,[i,s,r]},insertTab(n){const e=n.target,t=e.selectionStart,i=e.selectionEnd,s=n.shiftKey;if(t===i)if(s){if(e.value.substring(t-4,t)==" "){const r=e.value.substring(0,t-4),o=e.value.substring(i),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t-4})}}else{const r=e.value.substring(0,t),o=e.value.substring(i),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t+4})}else{const o=e.value.substring(t,i).split(` `).map(c=>c.trim()===""?c:s?c.startsWith(" ")?c.substring(4):c:" "+c),a=e.value.substring(0,t),l=e.value.substring(i),d=a+o.join(` `)+l;this.message.content=d,this.$nextTick(()=>{e.selectionStart=t,e.selectionEnd=i+o.length*4})}n.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){this.isSynthesizingVoice?(this.isSynthesizingVoice=!1,this.$refs.audio_player.pause()):(this.isSynthesizingVoice=!0,Me.post("./text2Audio",{text:this.message.content}).then(n=>{this.isSynthesizingVoice=!1;let e=n.data.url;console.log(e),this.audio_url=e,this.message.metadata||(this.message.metadata=[]);let t=!1;for(let i of this.message.metadata)Object.prototype.hasOwnProperty.call(i,"audio_url")&&(i.audio_url=this.audio_url,t=!0);t||this.message.metadata.push({audio_url:this.audio_url}),this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url)}).catch(n=>{this.$store.state.toast.showToast(`Error: ${n}`,4,!1),this.isSynthesizingVoice=!1}))},speak(){if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let n=0;console.log("voice on"),this.isSpeaking=!0;const e=200;this.message.content,this.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(s=>s.name===this.$store.state.config.audio_out_voice)[0]);const t=s=>{let r=this.message.content.substring(s,s+e);const o=[".","!","?",` `];let a=-1;return o.forEach(l=>{const d=r.lastIndexOf(l);d>a&&(a=d)}),a==-1&&(a=r.length),console.log(a),a+s+1},i=()=>{if(this.message.content.includes(".")){const s=t(n),r=this.message.content.substring(n,s);this.msg.text=r,n=s+1,this.msg.onend=o=>{n{i()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",s))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{i()},1)};i()},toggleModel(){this.expanded=!this.expanded},addBlock(n){let e=this.$refs.mdTextarea.selectionStart,t=this.$refs.mdTextarea.selectionEnd;e==t?speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+n+"\n\n```\n"+this.message.content.slice(e),e=e+4+n.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+n+"\n\n```\n"+this.message.content.slice(e),e=e+3+n.length):speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+n+` `+this.message.content.slice(e,t)+"\n```\n"+this.message.content.slice(t),e=e+4+n.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+n+` -`+this.message.content.slice(e,t)+"\n```\n"+this.message.content.slice(t),p=p+3+n.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url),this.editMsgMode=!1},resendMessage(n){this.$emit("resendMessage",this.message.id,this.message.content,n)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?wbt+this.avatar:(console.log("No avatar found"),ga)},defaultImg(n){n.target.src=ga},parseDate(n){let e=new Date(Date.parse(n)),i=Math.floor((new Date-e)/1e3);return i<=1?"just now":i<20?i+" seconds ago":i<40?"half a minute ago":i<60?"less than a minute ago":i<=90?"one minute ago":i<=3540?Math.round(i/60)+" minutes ago":i<=5400?"1 hour ago":i<=86400?Math.round(i/3600)+" hours ago":i<=129600?"1 day ago":i<604800?Math.round(i/86400)+" days ago":i<=777600?"1 week ago":n},prettyDate(n){let e=new Date((n||"").replace(/-/g,"/").replace(/[TZ]/g," ")),t=(new Date().getTime()-e.getTime())/1e3,i=Math.floor(t/86400);if(!(isNaN(i)||i<0||i>=31))return i==0&&(t<60&&"just now"||t<120&&"1 minute ago"||t<3600&&Math.floor(t/60)+" minutes ago"||t<7200&&"1 hour ago"||t<86400&&Math.floor(t/3600)+" hours ago")||i==1&&"Yesterday"||i<7&&i+" days ago"||i<31&&Math.ceil(i/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(n){n&&(this.$refs.audio_player.src=n)},"message.content":function(n){this.$store.state.config.auto_speak&&(this.isSpeaking||this.checkForFullSentence())},"message.ui":function(n){console.log("ui changed"),console.log(this.message.ui)},showConfirmation(){Ve(()=>{Ye.replace()})},deleteMsgMode(){Ve(()=>{Ye.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(n){this.message.open=n,this.editMsgMode_=n,Ve(()=>{Ye.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const n=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(console.log("Computing the generation duration, ",n," -> ",e),e.getTime()===n.getTime()||!n.getTime()||!e.getTime())return;let[i,s,r]=this.computeTimeDiff(n,e);function o(l){return l<10&&(l="0"+l),l}return o(i)+"h:"+o(s)+"m:"+o(r)+"s"},warmup_duration(){const n=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",n," -> ",e),e.getTime()===n.getTime())return 0;if(!n.getTime()||!e.getTime())return;let i,s,r;[i,s,r]=this.computeTimeDiff(n,e);function o(l){return l<10&&(l="0"+l),l}return o(i)+"h:"+o(s)+"m:"+o(r)+"s"},generation_rate(){const n=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),t=this.message.nb_tokens;if(console.log("Computing the generation rate, ",t," in ",n," -> ",e),e.getTime()===n.getTime()||!t||!n.getTime()||!e.getTime())return;let s=e.getTime()-n.getTime();const r=Math.floor(s/1e3),o=t/r;return Math.round(o)+" t/s"}}},Obt={class:"relative w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col flex-grow flex-wrap overflow-visible p-4 pb-2"},Ibt={class:"flex flex-row gap-2"},Mbt={class:"flex-shrink-0"},Dbt={class:"group/avatar"},kbt=["src","data-popover-target"],Lbt={class:"flex flex-col w-full flex-grow-0"},Pbt={class:"flex flex-row flex-grow items-start"},Ubt={class:"flex flex-col mb-2"},Fbt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Bbt=["title"],Gbt=u("div",{class:"flex-grow"},null,-1),zbt={class:"flex-row justify-end mx-2"},Vbt={class:"invisible group-hover:visible flex flex-row"},Hbt={key:0,class:"flex items-center duration-75"},qbt=u("i",{"data-feather":"x"},null,-1),Ybt=[qbt],$bt=u("i",{"data-feather":"check"},null,-1),Wbt=[$bt],Kbt=u("i",{"data-feather":"edit"},null,-1),jbt=[Kbt],Qbt=["src"],Xbt=["src"],Zbt=["src"],Jbt=["src"],eEt=["src"],tEt=["src"],nEt=["src"],iEt=["src"],sEt=u("i",{"data-feather":"copy"},null,-1),rEt=[sEt],oEt=u("i",{"data-feather":"send"},null,-1),aEt=[oEt],lEt=["src"],cEt=u("i",{"data-feather":"send"},null,-1),dEt=[cEt],uEt=u("i",{"data-feather":"fast-forward"},null,-1),pEt=[uEt],_Et={key:14,class:"flex items-center duration-75"},hEt=u("i",{"data-feather":"x"},null,-1),fEt=[hEt],mEt=u("i",{"data-feather":"check"},null,-1),gEt=[mEt],bEt=u("i",{"data-feather":"trash"},null,-1),EEt=[bEt],vEt=u("i",{"data-feather":"thumbs-up"},null,-1),yEt=[vEt],SEt={class:"flex flex-row items-center"},TEt=u("i",{"data-feather":"thumbs-down"},null,-1),xEt=[TEt],CEt={class:"flex flex-row items-center"},REt=u("i",{"data-feather":"volume-2"},null,-1),AEt=[REt],wEt={class:"flex flex-row items-center"},NEt=u("i",{"data-feather":"voicemail"},null,-1),OEt=[NEt],IEt=["src"],MEt={class:"overflow-x-auto w-full"},DEt={class:"flex w-full cursor-pointer rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900 mb-3.5 max-w-full"},kEt={class:"grid min-w-72 select-none grid-cols-[40px,1fr] items-center gap-2.5 p-2"},LEt={class:"relative grid aspect-square place-content-center overflow-hidden rounded-lg bg-gray-300 dark:bg-gray-200"},PEt=["src"],UEt=["src"],FEt=["src"],BEt={class:"leading-4"},GEt=u("dd",{class:"text-sm"},"Processing infos",-1),zEt={class:"flex items-center gap-1 truncate whitespace-nowrap text-[.82rem] text-gray-400"},VEt={class:"content px-5 pb-5 pt-4"},HEt={class:"list-none"},qEt=u("div",{class:"flex flex-col items-start w-full"},null,-1),YEt={class:"flex flex-col items-start w-full"},$Et={key:1},WEt=["src"],KEt={class:"text-sm text-gray-400 mt-2"},jEt={class:"flex flex-row items-center gap-2"},QEt={key:0},XEt={class:"font-thin"},ZEt={key:1},JEt={class:"font-thin"},evt={key:2},tvt={class:"font-thin"},nvt={key:3},ivt=["title"],svt={key:4},rvt=["title"],ovt={key:5},avt=["title"],lvt={key:6},cvt=["title"];function dvt(n,e,t,i,s,r){var _;const o=ht("Step"),a=ht("RenderHTMLJS"),l=ht("MarkdownRenderer"),d=ht("JsonViewer"),c=ht("DynamicUIRenderer");return w(),M("div",Obt,[u("div",Ibt,[u("div",Mbt,[u("div",Dbt,[u("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=f=>r.defaultImg(f)),"data-popover-target":"avatar"+t.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,kbt)])]),u("div",Lbt,[u("div",Pbt,[u("div",Ubt,[u("div",Fbt,fe(t.message.sender)+" ",1),t.message.created_at?(w(),M("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},fe(r.created_at),9,Bbt)):q("",!0)]),Gbt,u("div",zbt,[u("div",Vbt,[r.editMsgMode?(w(),M("div",Hbt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel edit",type:"button",onClick:e[1]||(e[1]=Te(f=>r.editMsgMode=!1,["stop"]))},Ybt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Update message",type:"button",onClick:e[2]||(e[2]=Te((...f)=>r.updateMessage&&r.updateMessage(...f),["stop"]))},Wbt)])):q("",!0),r.editMsgMode?q("",!0):(w(),M("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Edit message",onClick:e[3]||(e[3]=Te(f=>r.editMsgMode=!0,["stop"]))},jbt)),r.editMsgMode?(w(),M("div",{key:2,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add generic block",onClick:e[4]||(e[4]=Te(f=>r.addBlock(""),["stop"]))},[u("img",{src:s.code_block,width:"25",height:"25"},null,8,Qbt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:3,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add python block",onClick:e[5]||(e[5]=Te(f=>r.addBlock("python"),["stop"]))},[u("img",{src:s.python_block,width:"25",height:"25"},null,8,Xbt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:4,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add javascript block",onClick:e[6]||(e[6]=Te(f=>r.addBlock("javascript"),["stop"]))},[u("img",{src:s.javascript_block,width:"25",height:"25"},null,8,Zbt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:5,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add json block",onClick:e[7]||(e[7]=Te(f=>r.addBlock("json"),["stop"]))},[u("img",{src:s.json_block,width:"25",height:"25"},null,8,Jbt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:6,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add c++ block",onClick:e[8]||(e[8]=Te(f=>r.addBlock("c++"),["stop"]))},[u("img",{src:s.cpp_block,width:"25",height:"25"},null,8,eEt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:7,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add html block",onClick:e[9]||(e[9]=Te(f=>r.addBlock("html"),["stop"]))},[u("img",{src:s.html5_block,width:"25",height:"25"},null,8,tEt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:8,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add LaTex block",onClick:e[10]||(e[10]=Te(f=>r.addBlock("latex"),["stop"]))},[u("img",{src:s.LaTeX_block,width:"25",height:"25"},null,8,nEt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:9,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add bash block",onClick:e[11]||(e[11]=Te(f=>r.addBlock("bash"),["stop"]))},[u("img",{src:s.bash_block,width:"25",height:"25"},null,8,iEt)])):q("",!0),u("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Copy message to clipboard",onClick:e[12]||(e[12]=Te(f=>r.copyContentToClipboard(),["stop"]))},rEt),!r.editMsgMode&&t.message.sender!=this.$store.state.mountedPers.name?(w(),M("div",{key:10,class:He(["text-lg text-red-500 hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message with full context",onClick:e[13]||(e[13]=Te(f=>r.resendMessage("full_context"),["stop"]))},aEt,2)):q("",!0),!r.editMsgMode&&t.message.sender!=this.$store.state.mountedPers.name?(w(),M("div",{key:11,class:He(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[14]||(e[14]=Te(f=>r.resendMessage("full_context_with_internet"),["stop"]))},[u("img",{src:s.sendGlobe,width:"25",height:"25"},null,8,lEt)],2)):q("",!0),!r.editMsgMode&&t.message.sender!=this.$store.state.mountedPers.name?(w(),M("div",{key:12,class:He(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[15]||(e[15]=Te(f=>r.resendMessage("simple_question"),["stop"]))},dEt,2)):q("",!0),!r.editMsgMode&&t.message.sender==this.$store.state.mountedPers.name?(w(),M("div",{key:13,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Resend message",onClick:e[16]||(e[16]=Te(f=>r.continueMessage(),["stop"]))},pEt)):q("",!0),s.deleteMsgMode?(w(),M("div",_Et,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[17]||(e[17]=Te(f=>s.deleteMsgMode=!1,["stop"]))},fEt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[18]||(e[18]=Te(f=>r.deleteMsg(),["stop"]))},gEt)])):q("",!0),!r.editMsgMode&&!s.deleteMsgMode?(w(),M("div",{key:15,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[19]||(e[19]=f=>s.deleteMsgMode=!0)},EEt)):q("",!0),u("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[20]||(e[20]=Te(f=>r.rankUp(),["stop"]))},yEt),u("div",SEt,[u("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[21]||(e[21]=Te(f=>r.rankDown(),["stop"]))},xEt),t.message.rank!=0?(w(),M("div",{key:0,class:He(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",t.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},fe(t.message.rank),3)):q("",!0)]),u("div",CEt,[u("div",{class:He(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[22]||(e[22]=Te(f=>r.speak(),["stop"]))},AEt,2)]),u("div",wEt,[s.isSynthesizingVoice?(w(),M("img",{key:1,src:s.loading_svg},null,8,IEt)):(w(),M("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"read",onClick:e[23]||(e[23]=Te(f=>r.read(),["stop"]))},OEt))])])])]),u("div",MEt,[ne(u("details",DEt,[u("summary",kEt,[u("div",LEt,[t.message.status_message!="Done"&t.message.status_message!="Generation canceled"?(w(),M("img",{key:0,src:s.loading_svg,class:"absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,PEt)):q("",!0),t.message.status_message=="Generation canceled"?(w(),M("img",{key:1,src:s.failed_svg,class:"absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,UEt)):q("",!0),t.message.status_message=="Done"?(w(),M("img",{key:2,src:s.ok_svg,class:"absolute m-2 w-6 inset-0 text-geen-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,FEt)):q("",!0)]),u("dl",BEt,[GEt,u("dt",zEt,fe(t.message==null?"":t.message.status_message),1)])]),u("div",VEt,[u("ol",HEt,[(w(!0),M($e,null,dt(t.message.steps,(f,m)=>(w(),M("div",{key:"step-"+t.message.id+"-"+m,class:"group border-l pb-6 last:!border-transparent last:pb-0 dark:border-gray-800",style:en({backgroundColor:f.done?"transparent":"inherit"})},[Oe(o,{done:f.done,message:f.message,status:f.status,step_type:f.type},null,8,["done","message","status","step_type"])],4))),128))])])],512),[[Ot,t.message!=null&&t.message.steps!=null&&t.message.steps.length>0]]),qEt,u("div",YEt,[(w(!0),M($e,null,dt(t.message.html_js_s,(f,m)=>(w(),M("div",{key:"htmljs-"+t.message.id+"-"+m,class:"htmljs font-bold",style:en({backgroundColor:n.step.done?"transparent":"inherit"})},[Oe(a,{htmlContent:f},null,8,["htmlContent"])],4))),128))]),r.editMsgMode?q("",!0):(w(),Tt(l,{key:0,ref:"mdRender",host:t.host,"markdown-text":t.message.content,message_id:t.message.id,discussion_id:t.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),u("div",null,[t.message.open?ne((w(),M("textarea",{key:0,ref:"mdTextarea",onKeydown:e[24]||(e[24]=wr(Te((...f)=>r.insertTab&&r.insertTab(...f),["prevent"]),["tab"])),class:"block min-h-[900px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,placeholder:"Enter message here...","onUpdate:modelValue":e[25]||(e[25]=f=>t.message.content=f)},`\r - `,544)),[[Pe,t.message.content]]):q("",!0)]),t.message.metadata!==null?(w(),M("div",$Et,[(w(!0),M($e,null,dt(((_=t.message.metadata)==null?void 0:_.filter(f=>f!=null&&f.hasOwnProperty("title")&&f.hasOwnProperty("content")))||[],(f,m)=>(w(),M("div",{key:"json-"+t.message.id+"-"+m,class:"json font-bold"},[Oe(d,{jsonFormText:f.title,jsonData:f.content},null,8,["jsonFormText","jsonData"])]))),128))])):q("",!0),t.message.ui!==null&&t.message.ui!==void 0&&t.message.ui!==""?(w(),Tt(c,{key:2,class:"w-full h-full",code:t.message.ui},null,8,["code"])):q("",!0),s.audio_url!=null?(w(),M("audio",{controls:"",autoplay:"",key:s.audio_url},[u("source",{src:s.audio_url,type:"audio/wav",ref:"audio_player"},null,8,WEt),je(" Your browser does not support the audio element. ")])):q("",!0)]),u("div",KEt,[u("div",jEt,[t.message.binding?(w(),M("p",QEt,[je("Binding: "),u("span",XEt,fe(t.message.binding),1)])):q("",!0),t.message.model?(w(),M("p",ZEt,[je("Model: "),u("span",JEt,fe(t.message.model),1)])):q("",!0),t.message.seed?(w(),M("p",evt,[je("Seed: "),u("span",tvt,fe(t.message.seed),1)])):q("",!0),t.message.nb_tokens?(w(),M("p",nvt,[je("Number of tokens: "),u("span",{class:"font-thin",title:"Number of Tokens: "+t.message.nb_tokens},fe(t.message.nb_tokens),9,ivt)])):q("",!0),r.warmup_duration?(w(),M("p",svt,[je("Warmup duration: "),u("span",{class:"font-thin",title:"Warmup duration: "+r.warmup_duration},fe(r.warmup_duration),9,rvt)])):q("",!0),r.time_spent?(w(),M("p",ovt,[je("Generation duration: "),u("span",{class:"font-thin",title:"Finished generating: "+r.time_spent},fe(r.time_spent),9,avt)])):q("",!0),r.generation_rate?(w(),M("p",lvt,[je("Rate: "),u("span",{class:"font-thin",title:"Generation rate: "+r.generation_rate},fe(r.generation_rate),9,cvt)])):q("",!0)])])])])])}const SO=bt(Nbt,[["render",dvt]]),uvt="/";Me.defaults.baseURL="/";const pvt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:fc,UniversalForm:Ec},data(){return{bUrl:uvt,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},mountedPers:{get(){return this.$store.state.mountedPers},set(n){this.$store.commit("setMountedPers",n)}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}}},methods:{onSettingsPersonality(n){try{Me.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Personality settings - "+n.name,"Save changes","Cancel").then(t=>{try{Me.post("/set_active_personality_settings",t).then(i=>{i&&i.data?(console.log("personality set with new settings",i.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. +`+this.message.content.slice(e,t)+"\n```\n"+this.message.content.slice(t),p=p+3+n.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url),this.editMsgMode=!1},resendMessage(n){this.$emit("resendMessage",this.message.id,this.message.content,n)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?Obt+this.avatar:(console.log("No avatar found"),ga)},defaultImg(n){n.target.src=ga},parseDate(n){let e=new Date(Date.parse(n)),i=Math.floor((new Date-e)/1e3);return i<=1?"just now":i<20?i+" seconds ago":i<40?"half a minute ago":i<60?"less than a minute ago":i<=90?"one minute ago":i<=3540?Math.round(i/60)+" minutes ago":i<=5400?"1 hour ago":i<=86400?Math.round(i/3600)+" hours ago":i<=129600?"1 day ago":i<604800?Math.round(i/86400)+" days ago":i<=777600?"1 week ago":n},prettyDate(n){let e=new Date((n||"").replace(/-/g,"/").replace(/[TZ]/g," ")),t=(new Date().getTime()-e.getTime())/1e3,i=Math.floor(t/86400);if(!(isNaN(i)||i<0||i>=31))return i==0&&(t<60&&"just now"||t<120&&"1 minute ago"||t<3600&&Math.floor(t/60)+" minutes ago"||t<7200&&"1 hour ago"||t<86400&&Math.floor(t/3600)+" hours ago")||i==1&&"Yesterday"||i<7&&i+" days ago"||i<31&&Math.ceil(i/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(n){n&&(this.$refs.audio_player.src=n)},"message.content":function(n){this.$store.state.config.auto_speak&&(this.isSpeaking||this.checkForFullSentence())},"message.ui":function(n){console.log("ui changed"),console.log(this.message.ui)},showConfirmation(){Ve(()=>{Ye.replace()})},deleteMsgMode(){Ve(()=>{Ye.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(n){this.message.open=n,this.editMsgMode_=n,Ve(()=>{Ye.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const n=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(console.log("Computing the generation duration, ",n," -> ",e),e.getTime()===n.getTime()||!n.getTime()||!e.getTime())return;let[i,s,r]=this.computeTimeDiff(n,e);function o(l){return l<10&&(l="0"+l),l}return o(i)+"h:"+o(s)+"m:"+o(r)+"s"},warmup_duration(){const n=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",n," -> ",e),e.getTime()===n.getTime())return 0;if(!n.getTime()||!e.getTime())return;let i,s,r;[i,s,r]=this.computeTimeDiff(n,e);function o(l){return l<10&&(l="0"+l),l}return o(i)+"h:"+o(s)+"m:"+o(r)+"s"},generation_rate(){const n=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),t=this.message.nb_tokens;if(console.log("Computing the generation rate, ",t," in ",n," -> ",e),e.getTime()===n.getTime()||!t||!n.getTime()||!e.getTime())return;let s=e.getTime()-n.getTime();const r=Math.floor(s/1e3),o=t/r;return Math.round(o)+" t/s"}}},Mbt={class:"relative w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col flex-grow flex-wrap overflow-visible p-4 pb-2"},Dbt={class:"flex flex-row gap-2"},kbt={class:"flex-shrink-0"},Lbt={class:"group/avatar"},Pbt=["src","data-popover-target"],Ubt={class:"flex flex-col w-full flex-grow-0"},Fbt={class:"flex flex-row flex-grow items-start"},Bbt={class:"flex flex-col mb-2"},Gbt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},zbt=["title"],Vbt=u("div",{class:"flex-grow"},null,-1),Hbt={class:"flex-row justify-end mx-2"},qbt={class:"invisible group-hover:visible flex flex-row"},Ybt={key:0,class:"flex items-center duration-75"},$bt=u("i",{"data-feather":"x"},null,-1),Wbt=[$bt],Kbt=u("i",{"data-feather":"check"},null,-1),jbt=[Kbt],Qbt=u("i",{"data-feather":"edit"},null,-1),Xbt=[Qbt],Zbt=["src"],Jbt=["src"],eEt=["src"],tEt=["src"],nEt=["src"],iEt=["src"],sEt=["src"],rEt=["src"],oEt=u("i",{"data-feather":"copy"},null,-1),aEt=[oEt],lEt=u("i",{"data-feather":"send"},null,-1),cEt=[lEt],dEt=["src"],uEt=u("i",{"data-feather":"send"},null,-1),pEt=[uEt],_Et=u("i",{"data-feather":"fast-forward"},null,-1),hEt=[_Et],fEt={key:14,class:"flex items-center duration-75"},mEt=u("i",{"data-feather":"x"},null,-1),gEt=[mEt],bEt=u("i",{"data-feather":"check"},null,-1),EEt=[bEt],vEt=u("i",{"data-feather":"trash"},null,-1),yEt=[vEt],SEt=u("i",{"data-feather":"thumbs-up"},null,-1),TEt=[SEt],xEt={class:"flex flex-row items-center"},CEt=u("i",{"data-feather":"thumbs-down"},null,-1),REt=[CEt],AEt={class:"flex flex-row items-center"},wEt=u("i",{"data-feather":"volume-2"},null,-1),NEt=[wEt],OEt={class:"flex flex-row items-center"},IEt=u("i",{"data-feather":"voicemail"},null,-1),MEt=[IEt],DEt=["src"],kEt={class:"overflow-x-auto w-full"},LEt={class:"flex w-full cursor-pointer rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900 mb-3.5 max-w-full"},PEt={class:"grid min-w-72 select-none grid-cols-[40px,1fr] items-center gap-2.5 p-2"},UEt={class:"relative grid aspect-square place-content-center overflow-hidden rounded-lg bg-gray-300 dark:bg-gray-200"},FEt=["src"],BEt=["src"],GEt=["src"],zEt={class:"leading-4"},VEt=u("dd",{class:"text-sm"},"Processing infos",-1),HEt={class:"flex items-center gap-1 truncate whitespace-nowrap text-[.82rem] text-gray-400"},qEt={class:"content px-5 pb-5 pt-4"},YEt={class:"list-none"},$Et=u("div",{class:"flex flex-col items-start w-full"},null,-1),WEt={class:"flex flex-col items-start w-full"},KEt={key:1},jEt=["src"],QEt={class:"text-sm text-gray-400 mt-2"},XEt={class:"flex flex-row items-center gap-2"},ZEt={key:0},JEt={class:"font-thin"},evt={key:1},tvt={class:"font-thin"},nvt={key:2},ivt={class:"font-thin"},svt={key:3},rvt=["title"],ovt={key:4},avt=["title"],lvt={key:5},cvt=["title"],dvt={key:6},uvt=["title"];function pvt(n,e,t,i,s,r){var _;const o=ht("Step"),a=ht("RenderHTMLJS"),l=ht("MarkdownRenderer"),d=ht("JsonViewer"),c=ht("DynamicUIRenderer");return w(),M("div",Mbt,[u("div",Dbt,[u("div",kbt,[u("div",Lbt,[u("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=f=>r.defaultImg(f)),"data-popover-target":"avatar"+t.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,Pbt)])]),u("div",Ubt,[u("div",Fbt,[u("div",Bbt,[u("div",Gbt,fe(t.message.sender)+" ",1),t.message.created_at?(w(),M("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},fe(r.created_at),9,zbt)):q("",!0)]),Vbt,u("div",Hbt,[u("div",qbt,[r.editMsgMode?(w(),M("div",Ybt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel edit",type:"button",onClick:e[1]||(e[1]=Te(f=>r.editMsgMode=!1,["stop"]))},Wbt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Update message",type:"button",onClick:e[2]||(e[2]=Te((...f)=>r.updateMessage&&r.updateMessage(...f),["stop"]))},jbt)])):q("",!0),r.editMsgMode?q("",!0):(w(),M("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Edit message",onClick:e[3]||(e[3]=Te(f=>r.editMsgMode=!0,["stop"]))},Xbt)),r.editMsgMode?(w(),M("div",{key:2,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add generic block",onClick:e[4]||(e[4]=Te(f=>r.addBlock(""),["stop"]))},[u("img",{src:s.code_block,width:"25",height:"25"},null,8,Zbt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:3,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add python block",onClick:e[5]||(e[5]=Te(f=>r.addBlock("python"),["stop"]))},[u("img",{src:s.python_block,width:"25",height:"25"},null,8,Jbt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:4,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add javascript block",onClick:e[6]||(e[6]=Te(f=>r.addBlock("javascript"),["stop"]))},[u("img",{src:s.javascript_block,width:"25",height:"25"},null,8,eEt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:5,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add json block",onClick:e[7]||(e[7]=Te(f=>r.addBlock("json"),["stop"]))},[u("img",{src:s.json_block,width:"25",height:"25"},null,8,tEt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:6,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add c++ block",onClick:e[8]||(e[8]=Te(f=>r.addBlock("c++"),["stop"]))},[u("img",{src:s.cpp_block,width:"25",height:"25"},null,8,nEt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:7,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add html block",onClick:e[9]||(e[9]=Te(f=>r.addBlock("html"),["stop"]))},[u("img",{src:s.html5_block,width:"25",height:"25"},null,8,iEt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:8,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add LaTex block",onClick:e[10]||(e[10]=Te(f=>r.addBlock("latex"),["stop"]))},[u("img",{src:s.LaTeX_block,width:"25",height:"25"},null,8,sEt)])):q("",!0),r.editMsgMode?(w(),M("div",{key:9,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add bash block",onClick:e[11]||(e[11]=Te(f=>r.addBlock("bash"),["stop"]))},[u("img",{src:s.bash_block,width:"25",height:"25"},null,8,rEt)])):q("",!0),u("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Copy message to clipboard",onClick:e[12]||(e[12]=Te(f=>r.copyContentToClipboard(),["stop"]))},aEt),!r.editMsgMode&&t.message.sender!=this.$store.state.mountedPers.name?(w(),M("div",{key:10,class:He(["text-lg text-red-500 hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message with full context",onClick:e[13]||(e[13]=Te(f=>r.resendMessage("full_context"),["stop"]))},cEt,2)):q("",!0),!r.editMsgMode&&t.message.sender!=this.$store.state.mountedPers.name?(w(),M("div",{key:11,class:He(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[14]||(e[14]=Te(f=>r.resendMessage("full_context_with_internet"),["stop"]))},[u("img",{src:s.sendGlobe,width:"25",height:"25"},null,8,dEt)],2)):q("",!0),!r.editMsgMode&&t.message.sender!=this.$store.state.mountedPers.name?(w(),M("div",{key:12,class:He(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[15]||(e[15]=Te(f=>r.resendMessage("simple_question"),["stop"]))},pEt,2)):q("",!0),!r.editMsgMode&&t.message.sender==this.$store.state.mountedPers.name?(w(),M("div",{key:13,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Resend message",onClick:e[16]||(e[16]=Te(f=>r.continueMessage(),["stop"]))},hEt)):q("",!0),s.deleteMsgMode?(w(),M("div",fEt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[17]||(e[17]=Te(f=>s.deleteMsgMode=!1,["stop"]))},gEt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[18]||(e[18]=Te(f=>r.deleteMsg(),["stop"]))},EEt)])):q("",!0),!r.editMsgMode&&!s.deleteMsgMode?(w(),M("div",{key:15,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[19]||(e[19]=f=>s.deleteMsgMode=!0)},yEt)):q("",!0),u("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[20]||(e[20]=Te(f=>r.rankUp(),["stop"]))},TEt),u("div",xEt,[u("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[21]||(e[21]=Te(f=>r.rankDown(),["stop"]))},REt),t.message.rank!=0?(w(),M("div",{key:0,class:He(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",t.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},fe(t.message.rank),3)):q("",!0)]),u("div",AEt,[u("div",{class:He(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[22]||(e[22]=Te(f=>r.speak(),["stop"]))},NEt,2)]),u("div",OEt,[s.isSynthesizingVoice?(w(),M("img",{key:1,src:s.loading_svg},null,8,DEt)):(w(),M("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"read",onClick:e[23]||(e[23]=Te(f=>r.read(),["stop"]))},MEt))])])])]),u("div",kEt,[ne(u("details",LEt,[u("summary",PEt,[u("div",UEt,[t.message.status_message!="Done"&t.message.status_message!="Generation canceled"?(w(),M("img",{key:0,src:s.loading_svg,class:"absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,FEt)):q("",!0),t.message.status_message=="Generation canceled"?(w(),M("img",{key:1,src:s.failed_svg,class:"absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,BEt)):q("",!0),t.message.status_message=="Done"?(w(),M("img",{key:2,src:s.ok_svg,class:"absolute m-2 w-6 inset-0 text-geen-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,GEt)):q("",!0)]),u("dl",zEt,[VEt,u("dt",HEt,fe(t.message==null?"":t.message.status_message),1)])]),u("div",qEt,[u("ol",YEt,[(w(!0),M($e,null,dt(t.message.steps,(f,m)=>(w(),M("div",{key:"step-"+t.message.id+"-"+m,class:"group border-l pb-6 last:!border-transparent last:pb-0 dark:border-gray-800",style:en({backgroundColor:f.done?"transparent":"inherit"})},[Oe(o,{done:f.done,message:f.message,status:f.status,step_type:f.type},null,8,["done","message","status","step_type"])],4))),128))])])],512),[[Ot,t.message!=null&&t.message.steps!=null&&t.message.steps.length>0]]),$Et,u("div",WEt,[(w(!0),M($e,null,dt(t.message.html_js_s,(f,m)=>(w(),M("div",{key:"htmljs-"+t.message.id+"-"+m,class:"htmljs font-bold",style:en({backgroundColor:n.step.done?"transparent":"inherit"})},[Oe(a,{htmlContent:f},null,8,["htmlContent"])],4))),128))]),r.editMsgMode?q("",!0):(w(),Tt(l,{key:0,ref:"mdRender",host:t.host,"markdown-text":t.message.content,message_id:t.message.id,discussion_id:t.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),u("div",null,[t.message.open?ne((w(),M("textarea",{key:0,ref:"mdTextarea",onKeydown:e[24]||(e[24]=wr(Te((...f)=>r.insertTab&&r.insertTab(...f),["prevent"]),["tab"])),class:"block min-h-[900px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,placeholder:"Enter message here...","onUpdate:modelValue":e[25]||(e[25]=f=>t.message.content=f)},`\r + `,544)),[[Pe,t.message.content]]):q("",!0)]),t.message.metadata!==null?(w(),M("div",KEt,[(w(!0),M($e,null,dt(((_=t.message.metadata)==null?void 0:_.filter(f=>f!=null&&f.hasOwnProperty("title")&&f.hasOwnProperty("content")))||[],(f,m)=>(w(),M("div",{key:"json-"+t.message.id+"-"+m,class:"json font-bold"},[Oe(d,{jsonFormText:f.title,jsonData:f.content},null,8,["jsonFormText","jsonData"])]))),128))])):q("",!0),t.message.ui!==null&&t.message.ui!==void 0&&t.message.ui!==""?(w(),Tt(c,{key:2,class:"w-full h-full",code:t.message.ui},null,8,["code"])):q("",!0),s.audio_url!=null?(w(),M("audio",{controls:"",autoplay:"",key:s.audio_url},[u("source",{src:s.audio_url,type:"audio/wav",ref:"audio_player"},null,8,jEt),je(" Your browser does not support the audio element. ")])):q("",!0)]),u("div",QEt,[u("div",XEt,[t.message.binding?(w(),M("p",ZEt,[je("Binding: "),u("span",JEt,fe(t.message.binding),1)])):q("",!0),t.message.model?(w(),M("p",evt,[je("Model: "),u("span",tvt,fe(t.message.model),1)])):q("",!0),t.message.seed?(w(),M("p",nvt,[je("Seed: "),u("span",ivt,fe(t.message.seed),1)])):q("",!0),t.message.nb_tokens?(w(),M("p",svt,[je("Number of tokens: "),u("span",{class:"font-thin",title:"Number of Tokens: "+t.message.nb_tokens},fe(t.message.nb_tokens),9,rvt)])):q("",!0),r.warmup_duration?(w(),M("p",ovt,[je("Warmup duration: "),u("span",{class:"font-thin",title:"Warmup duration: "+r.warmup_duration},fe(r.warmup_duration),9,avt)])):q("",!0),r.time_spent?(w(),M("p",lvt,[je("Generation duration: "),u("span",{class:"font-thin",title:"Finished generating: "+r.time_spent},fe(r.time_spent),9,cvt)])):q("",!0),r.generation_rate?(w(),M("p",dvt,[je("Rate: "),u("span",{class:"font-thin",title:"Generation rate: "+r.generation_rate},fe(r.generation_rate),9,uvt)])):q("",!0)])])])])])}const SO=bt(Ibt,[["render",pvt]]),_vt="/";Me.defaults.baseURL="/";const hvt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:fc,UniversalForm:Ec},data(){return{bUrl:_vt,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},mountedPers:{get(){return this.$store.state.mountedPers},set(n){this.$store.commit("setMountedPers",n)}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}}},methods:{onSettingsPersonality(n){try{Me.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Personality settings - "+n.name,"Save changes","Cancel").then(t=>{try{Me.post("/set_active_personality_settings",t).then(i=>{i&&i.data?(console.log("personality set with new settings",i.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. `+i,4,!1)})}catch(i){this.$refs.toast.showToast(`Did not get Personality settings responses. - Endpoint error: `+i.message,4,!1)}}):this.$refs.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},toggleShowPersList(){this.onShowPersList()},async constructor(){for(Ve(()=>{Ye.replace()});this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100));this.onReady()},async api_get_req(n){try{const e=await Me.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(n){n.target.src=yc}}},_vt={class:"w-fit select-none"},hvt={key:0,class:"flex -space-x-4"},fvt=["src","title"],mvt={key:1,class:"flex -space-x-4"},gvt=["src","title"],bvt={key:2,title:"Loading personalities"},Evt=u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1),vvt=[Evt];function yvt(n,e,t,i,s,r){const o=ht("UniversalForm");return w(),M($e,null,[u("div",_vt,[r.mountedPersArr.length>1?(w(),M("div",hvt,[u("img",{src:s.bUrl+r.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+r.mountedPers.name,onClick:e[1]||(e[1]=a=>r.onSettingsPersonality(r.mountedPers))},null,40,fvt),u("div",{class:"flex items-center justify-center w-8 h-8 cursor-pointer text-xs font-medium bg-bg-light dark:bg-bg-dark border-2 hover:border-secondary rounded-full hover:bg-bg-light-tone dark:hover:bg-bg-dark-tone dark:border-gray-800 hover:z-20 hover:-translate-y-2 duration-150 active:scale-90",onClick:e[2]||(e[2]=Te((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+fe(r.mountedPersArr.length-1),1)])):q("",!0),r.mountedPersArr.length==1?(w(),M("div",mvt,[u("img",{src:s.bUrl+this.$store.state.mountedPers.avatar,onError:e[3]||(e[3]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 cursor-pointer border-secondary",title:"Active personality: "+this.$store.state.mountedPers.name,onClick:e[4]||(e[4]=Te((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"]))},null,40,gvt)])):q("",!0),r.mountedPersArr.length==0?(w(),M("div",bvt,vvt)):q("",!0)]),Oe(o,{ref:"universalForm",class:"z-20"},null,512)],64)}const Svt=bt(pvt,[["render",yvt]]);const Tvt="/";Me.defaults.baseURL="/";const xvt={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:gO,Toast:fc,UniversalForm:Ec},name:"MountedPersonalitiesList",data(){return{bUrl:Tvt,isMounted:!1,isLoading:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}}},methods:{toggleShowPersList(){this.onShowPersList()},async constructor(){},async api_get_req(n){try{const e=await Me.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(n){n.target.src=yc},onPersonalityReinstall(n){console.log("on reinstall ",n),this.isLoading=!0,Me.post("/reinstall_personality",{name:n.personality.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$refs.toast.showToast("Personality reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality + Endpoint error: `+i.message,4,!1)}}):this.$refs.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},toggleShowPersList(){this.onShowPersList()},async constructor(){for(Ve(()=>{Ye.replace()});this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100));this.onReady()},async api_get_req(n){try{const e=await Me.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(n){n.target.src=yc}}},fvt={class:"w-fit select-none"},mvt={key:0,class:"flex -space-x-4"},gvt=["src","title"],bvt={key:1,class:"flex -space-x-4"},Evt=["src","title"],vvt={key:2,title:"Loading personalities"},yvt=u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1),Svt=[yvt];function Tvt(n,e,t,i,s,r){const o=ht("UniversalForm");return w(),M($e,null,[u("div",fvt,[r.mountedPersArr.length>1?(w(),M("div",mvt,[u("img",{src:s.bUrl+r.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+r.mountedPers.name,onClick:e[1]||(e[1]=a=>r.onSettingsPersonality(r.mountedPers))},null,40,gvt),u("div",{class:"flex items-center justify-center w-8 h-8 cursor-pointer text-xs font-medium bg-bg-light dark:bg-bg-dark border-2 hover:border-secondary rounded-full hover:bg-bg-light-tone dark:hover:bg-bg-dark-tone dark:border-gray-800 hover:z-20 hover:-translate-y-2 duration-150 active:scale-90",onClick:e[2]||(e[2]=Te((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+fe(r.mountedPersArr.length-1),1)])):q("",!0),r.mountedPersArr.length==1?(w(),M("div",bvt,[u("img",{src:s.bUrl+this.$store.state.mountedPers.avatar,onError:e[3]||(e[3]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 cursor-pointer border-secondary",title:"Active personality: "+this.$store.state.mountedPers.name,onClick:e[4]||(e[4]=Te((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"]))},null,40,Evt)])):q("",!0),r.mountedPersArr.length==0?(w(),M("div",vvt,Svt)):q("",!0)]),Oe(o,{ref:"universalForm",class:"z-20"},null,512)],64)}const xvt=bt(hvt,[["render",Tvt]]);const Cvt="/";Me.defaults.baseURL="/";const Rvt={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:gO,Toast:fc,UniversalForm:Ec},name:"MountedPersonalitiesList",data(){return{bUrl:Cvt,isMounted:!1,isLoading:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}}},methods:{toggleShowPersList(){this.onShowPersList()},async constructor(){},async api_get_req(n){try{const e=await Me.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(n){n.target.src=yc},onPersonalityReinstall(n){console.log("on reinstall ",n),this.isLoading=!0,Me.post("/reinstall_personality",{name:n.personality.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$refs.toast.showToast("Personality reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},editPersonality(n){n=n.personality,Me.post("/get_personality_config",{category:n.category,name:n.folder}).then(e=>{const t=e.data;console.log("Done"),t.status?(this.$store.state.currentPersonConfig=t.config,this.$store.state.showPersonalityEditor=!0,this.$store.state.personality_editor.showPanel(),this.$store.state.selectedPersonality=n):console.error(t.error)}).catch(e=>{console.error(e)})},onPersonalityMounted(n){this.mountPersonality(n)},onPersonalityUnMounted(n){this.unmountPersonality(n)},onPersonalityRemount(n){this.reMountPersonality(n)},async handleOnTalk(n){if(Ye.replace(),console.log("ppa",n),n){if(n.isMounted){const e=await this.select_personality(n);e&&e.status&&(await this.constructor(),this.$refs.toast.showToast(`Selected personality: `+n.name,4,!0))}else this.onPersonalityMounted(n);this.onTalk(n)}},async onPersonalitySelected(n){if(Ye.replace(),console.log("Selected personality : ",JSON.stringify(n.personality)),n){if(n.selected){this.$refs.toast.showToast("Personality already selected",4,!0);return}if(n.isMounted){const e=await this.select_personality(n);e&&e.status&&(await this.constructor(),this.$refs.toast.showToast(`Selected personality: `+n.name,4,!0))}else this.onPersonalityMounted(n)}},onSettingsPersonality(n){try{Me.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Personality settings - "+n.personality.name,"Save changes","Cancel").then(t=>{try{Me.post("/set_active_personality_settings",t).then(i=>{i&&i.data?(console.log("personality set with new settings",i.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. @@ -196,15 +196,15 @@ If You are using windows, this will install wsl so you need to activate it. Error: `+e.error,4,!1))},async reMountPersonality(n){if(console.log("remount pers",n),!n)return;if(!this.configFile.personalities.includes(n.personality.full_path)){this.$refs.toast.showToast("Personality not mounted",4,!1);return}const e=await this.remount_personality(n.personality);console.log("remount_personality res",e),e.status?(this.configFile.personalities=e.personalities,this.$refs.toast.showToast("Personality remounted",4,!0),n.isMounted=!0,this.onMounted(this),(await this.select_personality(n.personality)).status&&this.$refs.toast.showToast(`Selected personality: `+n.personality.name,4,!0),this.getMountedPersonalities()):(n.isMounted=!1,this.$refs.toast.showToast(`Could not mount personality Error: `+e.error,4,!1))},async unmountPersonality(n){if(!n)return;console.log(`Unmounting ${JSON.stringify(n.personality)}`);const e=await this.unmount_personality(n.personality);if(e.status){console.log("unmount response",e),this.configFile.active_personality_id=e.active_personality_id,this.configFile.personalities=e.personalities;const t=this.configFile.personalities[this.configFile.active_personality_id],i=this.personalities.findIndex(a=>a.full_path==t),s=this.$refs.personalitiesZoo.findIndex(a=>a.full_path==n.full_path),r=this.personalities[i];r.isMounted=!1,r.selected=!0,this.$refs.personalitiesZoo[s].isMounted=!1,this.getMountedPersonalities(),(await this.select_personality(r)).status&&Ye.replace(),this.$refs.toast.showToast("Personality unmounted",4,!0),this.onUnMounted(this)}else this.$refs.toast.showToast(`Could not unmount personality -Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let n=[];console.log(this.configFile.personalities.length);for(let e=0;er.full_path==t),s=this.personalities[i];if(s)console.log("adding from config"),n.push(s);else{console.log("adding default");const r=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),o=this.personalities[r];n.push(o)}}if(this.mountedPersArr=[],this.mountedPersArr=n,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;es.full_path==t);if(console.log("discussionPersonalities -includes",i),console.log("discussionPersonalities -mounted list",this.mountedPersArr),i==-1){const s=this.personalities.findIndex(o=>o.full_path==t),r=this.personalities[s];console.log("adding discucc121",r,t),r&&(this.mountedPersArr.push(r),console.log("adding discucc",r))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},NE=n=>(Nr("data-v-9c85e2c1"),n=n(),Or(),n),Cvt={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},Rvt={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},Avt=NE(()=>u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),wvt=NE(()=>u("span",{class:"sr-only"},"Loading...",-1)),Nvt=[Avt,wvt],Ovt=NE(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Ivt=[Ovt],Mvt={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},Dvt={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function kvt(n,e,t,i,s,r){const o=ht("personality-entry"),a=ht("Toast"),l=ht("UniversalForm");return w(),M("div",Cvt,[s.isLoading?(w(),M("div",Rvt,Nvt)):q("",!0),u("div",null,[r.mountedPersArr.length>0?(w(),M("div",{key:0,class:He(s.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[u("button",{class:"mt-0 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Close personality list",type:"button",onClick:e[0]||(e[0]=Te((...d)=>r.toggleShowPersList&&r.toggleShowPersList(...d),["stop"]))},Ivt),u("label",Mvt," Mounted Personalities: ("+fe(r.mountedPersArr.length)+") ",1),u("div",Dvt,[Oe(rs,{name:"bounce"},{default:Je(()=>[(w(!0),M($e,null,dt(this.$store.state.mountedPersArr,(d,c)=>(w(),Tt(o,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+c+"-"+d.name,personality:d,full_path:d.full_path,select_language:!1,selected:r.configFile.personalities[r.configFile.active_personality_id]===d.full_path||r.configFile.personalities[r.configFile.active_personality_id]===d.full_path+":"+d.language,"on-selected":r.onPersonalitySelected,"on-mount":r.onPersonalityMounted,"on-edit":r.editPersonality,"on-un-mount":r.onPersonalityUnMounted,"on-remount":r.onPersonalityRemount,"on-settings":r.onSettingsPersonality,"on-reinstall":r.onPersonalityReinstall,"on-talk":r.handleOnTalk},null,8,["personality","full_path","selected","on-selected","on-mount","on-edit","on-un-mount","on-remount","on-settings","on-reinstall","on-talk"]))),128))]),_:1})])],2)):q("",!0)]),Oe(a,{ref:"toast"},null,512),Oe(l,{ref:"universalForm",class:"z-20"},null,512)])}const Lvt=bt(xvt,[["render",kvt],["__scopeId","data-v-9c85e2c1"]]);const Pvt={components:{InteractiveMenu:cp},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){nextTick(()=>{Ye.replace()})},methods:{isHTML(n){const t=new DOMParser().parseFromString(n,"text/html");return Array.from(t.body.childNodes).some(i=>i.nodeType===Node.ELEMENT_NODE)},selectFile(n,e){const t=document.createElement("input");t.type="file",t.accept=n,t.onchange=i=>{this.selectedFile=i.target.files[0],console.log("File selected"),e()},t.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const t={filename:this.selectedFile.name,fileData:e.result};Ze.on("file_received",i=>{i.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file -`+i.error,4,!1),this.loading=!1,Ze.off("file_received")}),Ze.emit("send_file",t)},e.readAsDataURL(this.selectedFile)},async constructor(){nextTick(()=>{Ye.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(n){this.showMenu=!this.showMenu,n.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(n.hasOwnProperty("file_types")?n.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(n.value)},handleClickOutside(n){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(n.target)&&(this.showMenu=!1)}},mounted(){this.commands=this.commandsList,document.addEventListener("click",this.handleClickOutside)},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},Uvt=n=>(Nr("data-v-52cfa09c"),n=n(),Or(),n),Fvt={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},Bvt=Uvt(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),Gvt=[Bvt];function zvt(n,e,t,i,s,r){const o=ht("InteractiveMenu");return s.loading?(w(),M("div",Fvt,Gvt)):(w(),Tt(o,{key:1,commands:t.commandsList,execute_cmd:r.execute_cmd},null,8,["commands","execute_cmd"]))}const Vvt=bt(Pvt,[["render",zvt],["__scopeId","data-v-52cfa09c"]]),Hvt="/assets/loader_v0-16906488.svg";console.log("modelImgPlaceholder:",Li);const qvt="/",Yvt={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{UniversalForm:Ec,MountedPersonalities:Svt,MountedPersonalitiesList:Lvt,PersonalitiesCommands:Vvt},setup(){},data(){return{loader_v0:Hvt,sendGlobe:yO,modelImgPlaceholder:Li,bUrl:qvt,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isLesteningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},installedBindings(){return this.$store.state.installedBindings},installedModels(){return this.$store.state.installedModels},mountedPersonalities(){return this.$store.state.mountedPersArr},binding_name(){return this.$store.state.config.binding_name},model_name(){return this.$store.state.config.model_name},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let n=[];for(let e=0;e{this.isLoading=!1,n.data.status?(this.$store.state.config.activate_internet_search?this.$store.state.toast.showToast("Websearch activated.",4,!0):this.$store.state.toast.showToast("Websearch deactivated.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Ve(()=>{Ye.replace()})})},showModelConfig(){try{this.isLoading=!0,Me.get("/get_active_binding_settings").then(n=>{this.isLoading=!1,n&&(console.log("binding sett",n),n.data&&Object.keys(n.data).length>0?this.$refs.universalForm.showForm(n.data,"Binding settings ","Save changes","Cancel").then(e=>{try{Me.post("/set_active_binding_settings",e).then(t=>{t&&t.data?(console.log("binding set with new settings",t.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. +Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let n=[];console.log(this.configFile.personalities.length);for(let e=0;er.full_path==t),s=this.personalities[i];if(s)console.log("adding from config"),n.push(s);else{console.log("adding default");const r=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),o=this.personalities[r];n.push(o)}}if(this.mountedPersArr=[],this.mountedPersArr=n,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;es.full_path==t);if(console.log("discussionPersonalities -includes",i),console.log("discussionPersonalities -mounted list",this.mountedPersArr),i==-1){const s=this.personalities.findIndex(o=>o.full_path==t),r=this.personalities[s];console.log("adding discucc121",r,t),r&&(this.mountedPersArr.push(r),console.log("adding discucc",r))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},NE=n=>(Nr("data-v-9c85e2c1"),n=n(),Or(),n),Avt={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},wvt={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},Nvt=NE(()=>u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),Ovt=NE(()=>u("span",{class:"sr-only"},"Loading...",-1)),Ivt=[Nvt,Ovt],Mvt=NE(()=>u("i",{"data-feather":"chevron-down"},null,-1)),Dvt=[Mvt],kvt={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},Lvt={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function Pvt(n,e,t,i,s,r){const o=ht("personality-entry"),a=ht("Toast"),l=ht("UniversalForm");return w(),M("div",Avt,[s.isLoading?(w(),M("div",wvt,Ivt)):q("",!0),u("div",null,[r.mountedPersArr.length>0?(w(),M("div",{key:0,class:He(s.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[u("button",{class:"mt-0 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Close personality list",type:"button",onClick:e[0]||(e[0]=Te((...d)=>r.toggleShowPersList&&r.toggleShowPersList(...d),["stop"]))},Dvt),u("label",kvt," Mounted Personalities: ("+fe(r.mountedPersArr.length)+") ",1),u("div",Lvt,[Oe(rs,{name:"bounce"},{default:Je(()=>[(w(!0),M($e,null,dt(this.$store.state.mountedPersArr,(d,c)=>(w(),Tt(o,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+c+"-"+d.name,personality:d,full_path:d.full_path,select_language:!1,selected:r.configFile.personalities[r.configFile.active_personality_id]===d.full_path||r.configFile.personalities[r.configFile.active_personality_id]===d.full_path+":"+d.language,"on-selected":r.onPersonalitySelected,"on-mount":r.onPersonalityMounted,"on-edit":r.editPersonality,"on-un-mount":r.onPersonalityUnMounted,"on-remount":r.onPersonalityRemount,"on-settings":r.onSettingsPersonality,"on-reinstall":r.onPersonalityReinstall,"on-talk":r.handleOnTalk},null,8,["personality","full_path","selected","on-selected","on-mount","on-edit","on-un-mount","on-remount","on-settings","on-reinstall","on-talk"]))),128))]),_:1})])],2)):q("",!0)]),Oe(a,{ref:"toast"},null,512),Oe(l,{ref:"universalForm",class:"z-20"},null,512)])}const Uvt=bt(Rvt,[["render",Pvt],["__scopeId","data-v-9c85e2c1"]]);const Fvt={components:{InteractiveMenu:cp},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){nextTick(()=>{Ye.replace()})},methods:{isHTML(n){const t=new DOMParser().parseFromString(n,"text/html");return Array.from(t.body.childNodes).some(i=>i.nodeType===Node.ELEMENT_NODE)},selectFile(n,e){const t=document.createElement("input");t.type="file",t.accept=n,t.onchange=i=>{this.selectedFile=i.target.files[0],console.log("File selected"),e()},t.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const t={filename:this.selectedFile.name,fileData:e.result};Ze.on("file_received",i=>{i.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file +`+i.error,4,!1),this.loading=!1,Ze.off("file_received")}),Ze.emit("send_file",t)},e.readAsDataURL(this.selectedFile)},async constructor(){nextTick(()=>{Ye.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(n){this.showMenu=!this.showMenu,n.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(n.hasOwnProperty("file_types")?n.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(n.value)},handleClickOutside(n){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(n.target)&&(this.showMenu=!1)}},mounted(){this.commands=this.commandsList,document.addEventListener("click",this.handleClickOutside)},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},Bvt=n=>(Nr("data-v-52cfa09c"),n=n(),Or(),n),Gvt={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},zvt=Bvt(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),Vvt=[zvt];function Hvt(n,e,t,i,s,r){const o=ht("InteractiveMenu");return s.loading?(w(),M("div",Gvt,Vvt)):(w(),Tt(o,{key:1,commands:t.commandsList,execute_cmd:r.execute_cmd},null,8,["commands","execute_cmd"]))}const qvt=bt(Fvt,[["render",Hvt],["__scopeId","data-v-52cfa09c"]]),Yvt="/assets/loader_v0-16906488.svg";console.log("modelImgPlaceholder:",Li);const $vt="/",Wvt={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{UniversalForm:Ec,MountedPersonalities:xvt,MountedPersonalitiesList:Uvt,PersonalitiesCommands:qvt},setup(){},data(){return{loader_v0:Yvt,sendGlobe:yO,modelImgPlaceholder:Li,bUrl:$vt,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isLesteningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},installedBindings(){return this.$store.state.installedBindings},installedModels(){return this.$store.state.installedModels},mountedPersonalities(){return this.$store.state.mountedPersArr},binding_name(){return this.$store.state.config.binding_name},model_name(){return this.$store.state.config.model_name},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let n=[];for(let e=0;e{this.isLoading=!1,n.data.status?(this.$store.state.config.activate_internet_search?this.$store.state.toast.showToast("Websearch activated.",4,!0):this.$store.state.toast.showToast("Websearch deactivated.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Ve(()=>{Ye.replace()})})},showModelConfig(){try{this.isLoading=!0,Me.get("/get_active_binding_settings").then(n=>{this.isLoading=!1,n&&(console.log("binding sett",n),n.data&&Object.keys(n.data).length>0?this.$refs.universalForm.showForm(n.data,"Binding settings ","Save changes","Cancel").then(e=>{try{Me.post("/set_active_binding_settings",e).then(t=>{t&&t.data?(console.log("binding set with new settings",t.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+t,4,!1),this.isLoading=!1)})}catch(t){this.$store.state.toast.showToast(`Did not get binding settings responses. Endpoint error: `+t.message,4,!1),this.isLoading=!1}}):(this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(n){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+n.message,4,!1)}},async unmountPersonality(n){if(this.loading=!0,!n)return;const e=await this.unmount_personality(n.personality||n);if(e.status){this.$store.state.config.personalities=e.personalities,this.$store.state.toast.showToast("Personality unmounted",4,!0),this.$store.dispatch("refreshMountedPersonalities");const t=this.$store.state.mountedPersArr[this.$store.state.mountedPersArr.length-1];console.log(t,this.$store.state.mountedPersArr.length),(await this.select_personality(n.personality)).status&&this.$store.state.toast.showToast(`Selected personality: `+t.name,4,!0)}else this.$store.state.toast.showToast(`Could not unmount personality Error: `+e.error,4,!1);this.loading=!1},async unmount_personality(n){if(!n)return{status:!1,error:"no personality - unmount_personality"};const e={language:n.language,category:n.category,folder:n.folder};try{const t=await Me.post("/unmount_personality",e);if(t)return t.data}catch(t){console.log(t.message,"unmount_personality - settings");return}},async onPersonalitySelected(n){if(console.log("on pers",n),console.log("selecting ",n),n){if(n.selected){this.$store.state.toast.showToast("Personality already selected",4,!0);return}const e=n.language===null?n.full_path:n.full_path+":"+n.language;if(console.log("pers_path",e),console.log("this.$store.state.config.personalities",this.$store.state.config.personalities),this.$store.state.config.personalities.includes(e)){const t=await this.select_personality(n);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshMountedPersonalities"),await this.$store.dispatch("refreshConfig"),console.log("pers is mounted",t),t&&t.status&&t.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: `+n.name,4,!0):this.$store.state.toast.showToast(`Error on select personality: -`+n.name,4,!1)}else console.log("mounting pers");this.$emit("personalitySelected"),Ve(()=>{Ye.replace()})}},async select_personality(n){if(!n)return{status:!1,error:"no personality - select_personality"};const e=n.language===null?n.full_path:n.full_path+":"+n.language;console.log("Selecting personality ",e);const t=this.$store.state.config.personalities.findIndex(s=>s===e),i={client_id:this.$store.state.client_id,id:t};try{const s=await Me.post("/select_personality",i);if(s)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),s.data}catch(s){console.log(s.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(n){n.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const t=new MouseEvent("click");e.dispatchEvent(t)},setBinding(n){console.log("Setting binding to "+n.name),this.selecting_binding=!0,this.selectedBinding=n,this.$store.state.messageBox.showBlockingMessage("Loading binding"),Me.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:n.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,!0),this.selecting_binding=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_binding=!1})},setModel(n){console.log("Setting model to "+n.name),this.selecting_model=!0,this.selectedModel=n,this.$store.state.messageBox.showBlockingMessage("Loading model"),Me.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:n.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},download_files(){Me.get("/download_files")},remove_file(n){Me.get("/remove_file",{client_id:this.$store.state.client_id,name:n}).then(e=>{console.log(e)})},clear_files(){Me.get("/clear_personality_files_list").then(n=>{console.log(n),n.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(n,e){console.log("Send file triggered");const t=new FileReader,i=24*1024;let s=0,r=0;t.onloadend=()=>{if(t.error){console.error("Error reading file:",t.error);return}const a=t.result,l=s+a.byteLength>=n.size;Ze.emit("send_file_chunk",{filename:n.name,chunk:a,offset:s,isLastChunk:l,chunkIndex:r}),s+=a.byteLength,r++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):o()};function o(){const a=n.slice(s,s+i);t.readAsArrayBuffer(a)}console.log("Uploading file"),o()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=n=>{let e="";for(let t=n.resultIndex;t{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=n=>{console.error("Speech recognition error:",n.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(n){this.showPersonalities=!this.showPersonalities},handleOnTalk(n){this.showPersonalities=!1,this.onTalk(n)},onMountFun(n){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(n){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(n){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(n){return Ve(()=>{Ye.replace()}),ss(n)},removeItem(n){console.log("Réemoving ",n.name),Me.post("/remove_file",{client_id:this.$store.state.client_id,name:n.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=n)}),console.log(this.filesList)},sendMessageEvent(n,e="no_internet"){this.$emit("messageSentEvent",n,e)},sendCMDEvent(n){this.$emit("sendCMDEvent",n)},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const n=document.createElement("input");n.type="file",n.style.display="none",n.multiple=!0,document.body.appendChild(n),n.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(n.files),document.body.removeChild(n)}),n.click()},takePicture(){Ze.emit("take_picture"),Ze.on("picture_taken",()=>{Me.get("/get_current_personality_files_list").then(n=>{this.filesList=n.data.files,this.isFileSentList=n.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(n){this.loading||n.which===13&&(n.preventDefault(),n.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(n){console.log("Adding files");const e=[...n];let t=0;const i=()=>{if(t>=e.length){console.log(`Files_list: ${this.filesList}`);return}const s=e[t];this.filesList.push(s),this.isFileSentList.push(!1),this.send_file(s,()=>{t++,i()})};i()}},watch:{installedModels:{immediate:!0,handler(n){this.$nextTick(()=>{this.installedModels=n})}},model_name:{immediate:!0,handler(n){this.$nextTick(()=>{this.model_name=n})}},showfilesList(){Ve(()=>{Ye.replace()})},loading(n,e){Ve(()=>{Ye.replace()})},filesList:{handler(n,e){let t=0;if(n.length>0)for(let i=0;i{Ye.replace()})},activated(){Ve(()=>{Ye.replace()})}},Vt=n=>(Nr("data-v-5ab45082"),n=n(),Or(),n),$vt={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},Wvt={key:0,class:"items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},Kvt={class:"flex"},jvt=["title"],Qvt=Vt(()=>u("i",{"data-feather":"list"},null,-1)),Xvt=[Qvt],Zvt={key:0},Jvt={class:"flex flex-col max-h-64"},eyt=["title"],tyt={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},nyt={key:0,filesList:"",role:"status"},iyt=Vt(()=>u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),syt=Vt(()=>u("span",{class:"sr-only"},"Loading...",-1)),ryt=[iyt,syt],oyt=Vt(()=>u("div",null,[u("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),ayt=Vt(()=>u("div",{class:"grow"},null,-1)),lyt={class:"flex flex-row items-center"},cyt={class:"whitespace-nowrap"},dyt=["onClick"],uyt=Vt(()=>u("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),pyt=[uyt],_yt={key:1,class:"flex mx-1 w-500"},hyt={class:"whitespace-nowrap flex flex-row gap-2"},fyt=Vt(()=>u("p",{class:"font-bold"}," Total size: ",-1)),myt=Vt(()=>u("div",{class:"grow"},null,-1)),gyt=Vt(()=>u("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),byt=[gyt],Eyt=Vt(()=>u("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)),vyt=[Eyt],yyt={key:2,class:"mx-1"},Syt={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end bg-primary"},Tyt={role:"status"},xyt=["src"],Cyt=Vt(()=>u("span",{class:"sr-only"},"Selecting model...",-1)),Ryt={class:"flex w-fit relative grow w-full"},Ayt={class:"relative text-light-text-panel dark:text-dark-text-panel grow flex h-12.5 cursor-pointer select-none items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone p-1 shadow-sm hover:shadow-none dark:border-gray-800",tabindex:"0"},wyt={key:0,title:"Waiting for reply"},Nyt=["src"],Oyt=Vt(()=>u("div",{role:"status"},[u("span",{class:"sr-only"},"Loading...")],-1)),Iyt={key:1,class:"w-fit group relative"},Myt={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-12 group-hover:translate-x-15 transition-all duration-300"},Dyt={key:0,class:"group items-center flex flex-row"},kyt=["onClick"],Lyt=["src","title"],Pyt={class:"group items-center flex flex-row"},Uyt=["src","title"],Fyt={key:2,class:"w-fit group relative"},Byt={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-12 group-hover:translate-x-15 transition-all duration-300"},Gyt={key:0,class:"group items-center flex flex-row"},zyt=["onClick"],Vyt=["src","title"],Hyt={class:"group items-center flex flex-row"},qyt=["src","title"],Yyt={class:"w-fit group relative"},$yt={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-12 group-hover:translate-x-15 transition-all duration-300"},Wyt={key:0,class:"group items-center flex flex-row"},Kyt=["onClick"],jyt=["src","title"],Qyt=["onClick"],Xyt=Vt(()=>u("span",{class:"hidden hover:block top-3 left-9 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),Zyt=[Xyt],Jyt={class:"w-fit"},eSt={class:"relative grow"},tSt={class:"group relative w-max"},nSt=Vt(()=>u("i",{"data-feather":"send"},null,-1)),iSt=[nSt],sSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI.")],-1)),rSt={class:"group relative w-max"},oSt=["src"],aSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI with internet search.")],-1)),lSt={class:"group relative w-max"},cSt=Vt(()=>u("i",{"data-feather":"mic"},null,-1)),dSt=[cSt],uSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Press and talk.")],-1)),pSt={key:4,class:"group relative w-max"},_St=Vt(()=>u("i",{"data-feather":"file-plus"},null,-1)),hSt=[_St],fSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Send File to the AI.")],-1)),mSt={class:"group relative w-max"},gSt=Vt(()=>u("i",{"data-feather":"camera"},null,-1)),bSt=[gSt],ESt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Take a shot from webcam.")],-1)),vSt={class:"group relative w-max"},ySt=Vt(()=>u("i",{"data-feather":"globe"},null,-1)),SSt=[ySt],TSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Add a weblink to the discussion.")],-1)),xSt={class:"group relative w-max"},CSt=Vt(()=>u("i",{"data-feather":"message-square"},null,-1)),RSt=[CSt],ASt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty User message.")],-1)),wSt={class:"group relative w-max"},NSt=Vt(()=>u("i",{"data-feather":"message-square"},null,-1)),OSt=[NSt],ISt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty ai message.")],-1)),MSt=Vt(()=>u("div",{class:"ml-auto gap-2"},null,-1));function DSt(n,e,t,i,s,r){const o=ht("MountedPersonalitiesList"),a=ht("MountedPersonalities"),l=ht("PersonalitiesCommands"),d=ht("UniversalForm");return w(),M($e,null,[u("form",null,[u("div",$vt,[s.filesList.length>0||s.showPersonalities?(w(),M("div",Wvt,[u("div",Kvt,[u("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:s.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=Te(c=>s.showfilesList=!s.showfilesList,["stop"]))},Xvt,8,jvt)]),s.filesList.length>0&&s.showfilesList==!0?(w(),M("div",Zvt,[u("div",Jvt,[Oe(rs,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:Je(()=>[(w(!0),M($e,null,dt(s.filesList,(c,_)=>(w(),M("div",{key:_+"-"+c.name},[u("div",{class:"m-1",title:c.name},[u("div",tyt,[s.isFileSentList[_]?q("",!0):(w(),M("div",nyt,ryt)),oyt,u("div",{class:He(["line-clamp-1 w-3/5",s.isFileSentList[_]?"text-green-500":"text-red-200"])},fe(c.name),3),ayt,u("div",lyt,[u("p",cyt,fe(r.computedFileSize(c.size)),1),u("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:f=>r.removeItem(c)},pyt,8,dyt)])])],8,eyt)]))),128))]),_:1})])])):q("",!0),s.filesList.length>0?(w(),M("div",_yt,[u("div",hyt,[fyt,je(" "+fe(s.totalSize)+" ("+fe(s.filesList.length)+") ",1)]),myt,u("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...c)=>r.clear_files&&r.clear_files(...c))},byt),u("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...c)=>r.download_files&&r.download_files(...c))},vyt)])):q("",!0),s.showPersonalities?(w(),M("div",yyt,[Oe(o,{ref:"mountedPersList",onShowPersList:r.onShowPersListFun,"on-mounted":r.onMountFun,"on-un-mounted":r.onUnmountFun,"on-remounted":n.onRemountFun,"on-talk":r.handleOnTalk,discussionPersonalities:r.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):q("",!0)])):q("",!0),s.selecting_model||s.selecting_binding?(w(),M("div",Syt,[u("div",Tyt,[u("img",{src:s.loader_v0,class:"w-50 h-50"},null,8,xyt),Cyt])])):q("",!0),u("div",Ryt,[u("div",Ayt,[t.loading?(w(),M("div",wyt,[u("img",{src:s.loader_v0},null,8,Nyt),Oyt])):q("",!0),t.loading?q("",!0):(w(),M("div",Iyt,[u("div",Myt,[(w(!0),M($e,null,dt(r.installedBindings,(c,_)=>(w(),M("div",{class:"w-full",key:_+"-"+c.name,ref_for:!0,ref:"installedBindings"},[c.name!=r.binding_name?(w(),M("div",Dyt,[u("button",{onClick:Te(f=>r.setBinding(c),["prevent"]),class:"w-10 h-10"},[u("img",{src:c.icon?c.icon:s.modelImgPlaceholder,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:c.name},null,8,Lyt)],8,kyt)])):q("",!0)]))),128))]),u("div",Pyt,[u("button",{onClick:e[3]||(e[3]=Te(c=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[u("img",{src:r.currentBindingIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:r.currentBinding?r.currentBinding.name:"unknown"},null,8,Uyt)])])])),t.loading?q("",!0):(w(),M("div",Fyt,[u("div",Byt,[(w(!0),M($e,null,dt(r.installedModels,(c,_)=>(w(),M("div",{class:"w-full",key:_+"-"+c.name,ref_for:!0,ref:"installedModels"},[c.name!=r.model_name?(w(),M("div",Gyt,[u("button",{onClick:Te(f=>r.setModel(c),["prevent"]),class:"w-10 h-10"},[u("img",{src:c.icon?c.icon:s.modelImgPlaceholder,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:c.name},null,8,Vyt)],8,zyt)])):q("",!0)]))),128))]),u("div",Hyt,[u("button",{onClick:e[4]||(e[4]=Te(c=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[u("img",{src:r.currentModelIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:r.currentModel?r.currentModel.name:"unknown"},null,8,qyt)])])])),u("div",Yyt,[u("div",$yt,[(w(!0),M($e,null,dt(r.mountedPersonalities,(c,_)=>(w(),M("div",{class:"w-full",key:_+"-"+c.name,ref_for:!0,ref:"mountedPersonalities"},[_!=r.personality_name?(w(),M("div",Wyt,[u("button",{onClick:Te(f=>r.onPersonalitySelected(c),["prevent"]),class:"w-10 h-10"},[u("img",{src:s.bUrl+c.avatar,onError:e[5]||(e[5]=(...f)=>n.personalityImgPlacehodler&&n.personalityImgPlacehodler(...f)),class:He(["w-10 h-10 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(c.full_path)?"border-secondary":"border-transparent z-0"]),title:c.name},null,42,jyt)],8,Kyt),u("button",{onClick:Te(f=>r.unmountPersonality(c),["prevent"])},Zyt,8,Qyt)])):q("",!0)]))),128))]),Oe(a,{ref:"mountedPers",onShowPersList:r.onShowPersListFun,onReady:r.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])]),u("div",Jyt,[s.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(w(),Tt(l,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":t.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):q("",!0)]),u("div",eSt,[ne(u("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[6]||(e[6]=c=>s.message=c),title:"Hold SHIFT + ENTER to add new line",class:"inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:e[7]||(e[7]=wr(Te(c=>r.submitOnEnter(c),["exact"]),["enter"]))},`\r - `,544),[[Pe,s.message]])]),t.loading?(w(),M("button",{key:3,type:"button",class:"bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800",onClick:e[8]||(e[8]=Te((...c)=>r.stopGenerating&&r.stopGenerating(...c),["stop"]))}," Stop generating ")):q("",!0),u("div",tSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[9]||(e[9]=(...c)=>r.submit&&r.submit(...c)),title:"Send",class:"w-6 text-panel hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},iSt)),sSt]),u("div",rSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[10]||(e[10]=(...c)=>r.submitWithInternetSearch&&r.submitWithInternetSearch(...c)),title:"Send With internet",class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},[u("img",{src:s.sendGlobe,width:"50",height:"50",style:{stroke:"currentColor",fill:"currentColor"}},null,8,oSt)])),aSt]),u("div",lSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[11]||(e[11]=(...c)=>r.startSpeechRecognition&&r.startSpeechRecognition(...c)),class:He([{"text-red-500":s.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"])},dSt,2)),uSt]),t.loading?q("",!0):(w(),M("div",pSt,[u("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[12]||(e[12]=(...c)=>r.addFiles&&r.addFiles(...c)),multiple:""},null,544),u("button",{type:"button",onClick:e[13]||(e[13]=Te((...c)=>r.add_file&&r.add_file(...c),["prevent"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},hSt),fSt])),u("div",mSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[14]||(e[14]=Te((...c)=>r.takePicture&&r.takePicture(...c),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},bSt)),ESt]),u("div",vSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[15]||(e[15]=Te((...c)=>r.addWebLink&&r.addWebLink(...c),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},SSt)),TSt]),u("div",xSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[16]||(e[16]=Te((...c)=>r.makeAnEmptyUserMessage&&r.makeAnEmptyUserMessage(...c),["stop"])),class:"w-6 text-gray-800 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},RSt)),ASt]),u("div",wSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[17]||(e[17]=Te((...c)=>r.makeAnEmptyAIMessage&&r.makeAnEmptyAIMessage(...c),["stop"])),class:"w-6 text-red-400 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},OSt)),ISt])]),MSt])])]),Oe(d,{ref:"universalForm",class:"z-20"},null,512)],64)}const TO=bt(Yvt,[["render",DSt],["__scopeId","data-v-5ab45082"]]),kSt={name:"WelcomeComponent",setup(){return{}}},LSt={class:"flex flex-col text-center"},PSt=zu('
Logo

LoLLMS

One tool to rule them all


Welcome

Please create a new discussion or select existing one to start

',1),USt=[PSt];function FSt(n,e,t,i,s,r){return w(),M("div",LSt,USt)}const xO=bt(kSt,[["render",FSt]]);var BSt=function(){function n(e,t){t===void 0&&(t=[]),this._eventType=e,this._eventFunctions=t}return n.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(t){typeof window<"u"&&window.addEventListener(e._eventType,t)})},n}(),ou=globalThis&&globalThis.__assign||function(){return ou=Object.assign||function(n){for(var e,t=1,i=arguments.length;t"u")return!1;var e=ai(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function ZSt(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},s=e.attributes[t]||{},r=e.elements[t];!xi(r)||!ds(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function JSt(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],r=e.attributes[i]||{},o=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),a=o.reduce(function(l,d){return l[d]="",l},{});!xi(s)||!ds(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const e0t={name:"applyStyles",enabled:!0,phase:"write",fn:ZSt,effect:JSt,requires:["computeStyles"]};function os(n){return n.split("-")[0]}var ao=Math.max,du=Math.min,ya=Math.round;function ib(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function IO(){return!/^((?!chrome|android).)*safari/i.test(ib())}function Sa(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=n.getBoundingClientRect(),s=1,r=1;e&&xi(n)&&(s=n.offsetWidth>0&&ya(i.width)/n.offsetWidth||1,r=n.offsetHeight>0&&ya(i.height)/n.offsetHeight||1);var o=mo(n)?ai(n):window,a=o.visualViewport,l=!IO()&&t,d=(i.left+(l&&a?a.offsetLeft:0))/s,c=(i.top+(l&&a?a.offsetTop:0))/r,_=i.width/s,f=i.height/r;return{width:_,height:f,top:c,right:d+_,bottom:c+f,left:d,x:d,y:c}}function PE(n){var e=Sa(n),t=n.offsetWidth,i=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:i}}function MO(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&LE(t)){var i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function zs(n){return ai(n).getComputedStyle(n)}function t0t(n){return["table","td","th"].indexOf(ds(n))>=0}function Mr(n){return((mo(n)?n.ownerDocument:n.document)||window.document).documentElement}function dp(n){return ds(n)==="html"?n:n.assignedSlot||n.parentNode||(LE(n)?n.host:null)||Mr(n)}function kC(n){return!xi(n)||zs(n).position==="fixed"?null:n.offsetParent}function n0t(n){var e=/firefox/i.test(ib()),t=/Trident/i.test(ib());if(t&&xi(n)){var i=zs(n);if(i.position==="fixed")return null}var s=dp(n);for(LE(s)&&(s=s.host);xi(s)&&["html","body"].indexOf(ds(s))<0;){var r=zs(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function Tc(n){for(var e=ai(n),t=kC(n);t&&t0t(t)&&zs(t).position==="static";)t=kC(t);return t&&(ds(t)==="html"||ds(t)==="body"&&zs(t).position==="static")?e:t||n0t(n)||e}function UE(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Ll(n,e,t){return ao(n,du(e,t))}function i0t(n,e,t){var i=Ll(n,e,t);return i>t?t:i}function DO(){return{top:0,right:0,bottom:0,left:0}}function kO(n){return Object.assign({},DO(),n)}function LO(n,e){return e.reduce(function(t,i){return t[i]=n,t},{})}var s0t=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,kO(typeof e!="number"?e:LO(e,Sc))};function r0t(n){var e,t=n.state,i=n.name,s=n.options,r=t.elements.arrow,o=t.modifiersData.popperOffsets,a=os(t.placement),l=UE(a),d=[Xn,wi].indexOf(a)>=0,c=d?"height":"width";if(!(!r||!o)){var _=s0t(s.padding,t),f=PE(r),m=l==="y"?Qn:Xn,h=l==="y"?Ai:wi,E=t.rects.reference[c]+t.rects.reference[l]-o[l]-t.rects.popper[c],b=o[l]-t.rects.reference[l],g=Tc(r),v=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,y=E/2-b/2,T=_[m],C=v-f[c]-_[h],x=v/2-f[c]/2+y,O=Ll(T,x,C),R=l;t.modifiersData[i]=(e={},e[R]=O,e.centerOffset=O-x,e)}}function o0t(n){var e=n.state,t=n.options,i=t.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||MO(e.elements.popper,s)&&(e.elements.arrow=s))}const a0t={name:"arrow",enabled:!0,phase:"main",fn:r0t,effect:o0t,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ta(n){return n.split("-")[1]}var l0t={top:"auto",right:"auto",bottom:"auto",left:"auto"};function c0t(n,e){var t=n.x,i=n.y,s=e.devicePixelRatio||1;return{x:ya(t*s)/s||0,y:ya(i*s)/s||0}}function LC(n){var e,t=n.popper,i=n.popperRect,s=n.placement,r=n.variation,o=n.offsets,a=n.position,l=n.gpuAcceleration,d=n.adaptive,c=n.roundOffsets,_=n.isFixed,f=o.x,m=f===void 0?0:f,h=o.y,E=h===void 0?0:h,b=typeof c=="function"?c({x:m,y:E}):{x:m,y:E};m=b.x,E=b.y;var g=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),y=Xn,T=Qn,C=window;if(d){var x=Tc(t),O="clientHeight",R="clientWidth";if(x===ai(t)&&(x=Mr(t),zs(x).position!=="static"&&a==="absolute"&&(O="scrollHeight",R="scrollWidth")),x=x,s===Qn||(s===Xn||s===wi)&&r===sc){T=Ai;var S=_&&x===C&&C.visualViewport?C.visualViewport.height:x[O];E-=S-i.height,E*=l?1:-1}if(s===Xn||(s===Qn||s===Ai)&&r===sc){y=wi;var A=_&&x===C&&C.visualViewport?C.visualViewport.width:x[R];m-=A-i.width,m*=l?1:-1}}var U=Object.assign({position:a},d&&l0t),F=c===!0?c0t({x:m,y:E},ai(t)):{x:m,y:E};if(m=F.x,E=F.y,l){var K;return Object.assign({},U,(K={},K[T]=v?"0":"",K[y]=g?"0":"",K.transform=(C.devicePixelRatio||1)<=1?"translate("+m+"px, "+E+"px)":"translate3d("+m+"px, "+E+"px, 0)",K))}return Object.assign({},U,(e={},e[T]=v?E+"px":"",e[y]=g?m+"px":"",e.transform="",e))}function d0t(n){var e=n.state,t=n.options,i=t.gpuAcceleration,s=i===void 0?!0:i,r=t.adaptive,o=r===void 0?!0:r,a=t.roundOffsets,l=a===void 0?!0:a,d={placement:os(e.placement),variation:Ta(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,LC(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,LC(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const u0t={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:d0t,data:{}};var Wc={passive:!0};function p0t(n){var e=n.state,t=n.instance,i=n.options,s=i.scroll,r=s===void 0?!0:s,o=i.resize,a=o===void 0?!0:o,l=ai(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&d.forEach(function(c){c.addEventListener("scroll",t.update,Wc)}),a&&l.addEventListener("resize",t.update,Wc),function(){r&&d.forEach(function(c){c.removeEventListener("scroll",t.update,Wc)}),a&&l.removeEventListener("resize",t.update,Wc)}}const _0t={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:p0t,data:{}};var h0t={left:"right",right:"left",bottom:"top",top:"bottom"};function zd(n){return n.replace(/left|right|bottom|top/g,function(e){return h0t[e]})}var f0t={start:"end",end:"start"};function PC(n){return n.replace(/start|end/g,function(e){return f0t[e]})}function FE(n){var e=ai(n),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function BE(n){return Sa(Mr(n)).left+FE(n).scrollLeft}function m0t(n,e){var t=ai(n),i=Mr(n),s=t.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var d=IO();(d||!d&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+BE(n),y:l}}function g0t(n){var e,t=Mr(n),i=FE(n),s=(e=n.ownerDocument)==null?void 0:e.body,r=ao(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=ao(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+BE(n),l=-i.scrollTop;return zs(s||t).direction==="rtl"&&(a+=ao(t.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function GE(n){var e=zs(n),t=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+i)}function PO(n){return["html","body","#document"].indexOf(ds(n))>=0?n.ownerDocument.body:xi(n)&&GE(n)?n:PO(dp(n))}function Pl(n,e){var t;e===void 0&&(e=[]);var i=PO(n),s=i===((t=n.ownerDocument)==null?void 0:t.body),r=ai(i),o=s?[r].concat(r.visualViewport||[],GE(i)?i:[]):i,a=e.concat(o);return s?a:a.concat(Pl(dp(o)))}function sb(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function b0t(n,e){var t=Sa(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function UC(n,e,t){return e===NO?sb(m0t(n,t)):mo(e)?b0t(e,t):sb(g0t(Mr(n)))}function E0t(n){var e=Pl(dp(n)),t=["absolute","fixed"].indexOf(zs(n).position)>=0,i=t&&xi(n)?Tc(n):n;return mo(i)?e.filter(function(s){return mo(s)&&MO(s,i)&&ds(s)!=="body"}):[]}function v0t(n,e,t,i){var s=e==="clippingParents"?E0t(n):[].concat(e),r=[].concat(s,[t]),o=r[0],a=r.reduce(function(l,d){var c=UC(n,d,i);return l.top=ao(c.top,l.top),l.right=du(c.right,l.right),l.bottom=du(c.bottom,l.bottom),l.left=ao(c.left,l.left),l},UC(n,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function UO(n){var e=n.reference,t=n.element,i=n.placement,s=i?os(i):null,r=i?Ta(i):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,l;switch(s){case Qn:l={x:o,y:e.y-t.height};break;case Ai:l={x:o,y:e.y+e.height};break;case wi:l={x:e.x+e.width,y:a};break;case Xn:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var d=s?UE(s):null;if(d!=null){var c=d==="y"?"height":"width";switch(r){case va:l[d]=l[d]-(e[c]/2-t[c]/2);break;case sc:l[d]=l[d]+(e[c]/2-t[c]/2);break}}return l}function rc(n,e){e===void 0&&(e={});var t=e,i=t.placement,s=i===void 0?n.placement:i,r=t.strategy,o=r===void 0?n.strategy:r,a=t.boundary,l=a===void 0?GSt:a,d=t.rootBoundary,c=d===void 0?NO:d,_=t.elementContext,f=_===void 0?fl:_,m=t.altBoundary,h=m===void 0?!1:m,E=t.padding,b=E===void 0?0:E,g=kO(typeof b!="number"?b:LO(b,Sc)),v=f===fl?zSt:fl,y=n.rects.popper,T=n.elements[h?v:f],C=v0t(mo(T)?T:T.contextElement||Mr(n.elements.popper),l,c,o),x=Sa(n.elements.reference),O=UO({reference:x,element:y,strategy:"absolute",placement:s}),R=sb(Object.assign({},y,O)),S=f===fl?R:x,A={top:C.top-S.top+g.top,bottom:S.bottom-C.bottom+g.bottom,left:C.left-S.left+g.left,right:S.right-C.right+g.right},U=n.modifiersData.offset;if(f===fl&&U){var F=U[s];Object.keys(A).forEach(function(K){var L=[wi,Ai].indexOf(K)>=0?1:-1,H=[Qn,Ai].indexOf(K)>=0?"y":"x";A[K]+=F[H]*L})}return A}function y0t(n,e){e===void 0&&(e={});var t=e,i=t.placement,s=t.boundary,r=t.rootBoundary,o=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,d=l===void 0?OO:l,c=Ta(i),_=c?a?DC:DC.filter(function(h){return Ta(h)===c}):Sc,f=_.filter(function(h){return d.indexOf(h)>=0});f.length===0&&(f=_);var m=f.reduce(function(h,E){return h[E]=rc(n,{placement:E,boundary:s,rootBoundary:r,padding:o})[os(E)],h},{});return Object.keys(m).sort(function(h,E){return m[h]-m[E]})}function S0t(n){if(os(n)===kE)return[];var e=zd(n);return[PC(n),e,PC(e)]}function T0t(n){var e=n.state,t=n.options,i=n.name;if(!e.modifiersData[i]._skip){for(var s=t.mainAxis,r=s===void 0?!0:s,o=t.altAxis,a=o===void 0?!0:o,l=t.fallbackPlacements,d=t.padding,c=t.boundary,_=t.rootBoundary,f=t.altBoundary,m=t.flipVariations,h=m===void 0?!0:m,E=t.allowedAutoPlacements,b=e.options.placement,g=os(b),v=g===b,y=l||(v||!h?[zd(b)]:S0t(b)),T=[b].concat(y).reduce(function(me,ve){return me.concat(os(ve)===kE?y0t(e,{placement:ve,boundary:c,rootBoundary:_,padding:d,flipVariations:h,allowedAutoPlacements:E}):ve)},[]),C=e.rects.reference,x=e.rects.popper,O=new Map,R=!0,S=T[0],A=0;A=0,H=L?"width":"height",G=rc(e,{placement:U,boundary:c,rootBoundary:_,altBoundary:f,padding:d}),P=L?K?wi:Xn:K?Ai:Qn;C[H]>x[H]&&(P=zd(P));var j=zd(P),Y=[];if(r&&Y.push(G[F]<=0),a&&Y.push(G[P]<=0,G[j]<=0),Y.every(function(me){return me})){S=U,R=!1;break}O.set(U,Y)}if(R)for(var Q=h?3:1,ae=function(ve){var Ae=T.find(function(J){var ge=O.get(J);if(ge)return ge.slice(0,ve).every(function(ee){return ee})});if(Ae)return S=Ae,"break"},te=Q;te>0;te--){var Z=ae(te);if(Z==="break")break}e.placement!==S&&(e.modifiersData[i]._skip=!0,e.placement=S,e.reset=!0)}}const x0t={name:"flip",enabled:!0,phase:"main",fn:T0t,requiresIfExists:["offset"],data:{_skip:!1}};function FC(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function BC(n){return[Qn,wi,Ai,Xn].some(function(e){return n[e]>=0})}function C0t(n){var e=n.state,t=n.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=rc(e,{elementContext:"reference"}),a=rc(e,{altBoundary:!0}),l=FC(o,i),d=FC(a,s,r),c=BC(l),_=BC(d);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:_},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":_})}const R0t={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:C0t};function A0t(n,e,t){var i=os(n),s=[Xn,Qn].indexOf(i)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[Xn,wi].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function w0t(n){var e=n.state,t=n.options,i=n.name,s=t.offset,r=s===void 0?[0,0]:s,o=OO.reduce(function(c,_){return c[_]=A0t(_,e.rects,r),c},{}),a=o[e.placement],l=a.x,d=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=d),e.modifiersData[i]=o}const N0t={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:w0t};function O0t(n){var e=n.state,t=n.name;e.modifiersData[t]=UO({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const I0t={name:"popperOffsets",enabled:!0,phase:"read",fn:O0t,data:{}};function M0t(n){return n==="x"?"y":"x"}function D0t(n){var e=n.state,t=n.options,i=n.name,s=t.mainAxis,r=s===void 0?!0:s,o=t.altAxis,a=o===void 0?!1:o,l=t.boundary,d=t.rootBoundary,c=t.altBoundary,_=t.padding,f=t.tether,m=f===void 0?!0:f,h=t.tetherOffset,E=h===void 0?0:h,b=rc(e,{boundary:l,rootBoundary:d,padding:_,altBoundary:c}),g=os(e.placement),v=Ta(e.placement),y=!v,T=UE(g),C=M0t(T),x=e.modifiersData.popperOffsets,O=e.rects.reference,R=e.rects.popper,S=typeof E=="function"?E(Object.assign({},e.rects,{placement:e.placement})):E,A=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),U=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(x){if(r){var K,L=T==="y"?Qn:Xn,H=T==="y"?Ai:wi,G=T==="y"?"height":"width",P=x[T],j=P+b[L],Y=P-b[H],Q=m?-R[G]/2:0,ae=v===va?O[G]:R[G],te=v===va?-R[G]:-O[G],Z=e.elements.arrow,me=m&&Z?PE(Z):{width:0,height:0},ve=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:DO(),Ae=ve[L],J=ve[H],ge=Ll(0,O[G],me[G]),ee=y?O[G]/2-Q-ge-Ae-A.mainAxis:ae-ge-Ae-A.mainAxis,Se=y?-O[G]/2+Q+ge+J+A.mainAxis:te+ge+J+A.mainAxis,Ie=e.elements.arrow&&Tc(e.elements.arrow),k=Ie?T==="y"?Ie.clientTop||0:Ie.clientLeft||0:0,B=(K=U==null?void 0:U[T])!=null?K:0,$=P+ee-B-k,de=P+Se-B,se=Ll(m?du(j,$):j,P,m?ao(Y,de):Y);x[T]=se,F[T]=se-P}if(a){var Ce,we=T==="x"?Qn:Xn,V=T==="x"?Ai:wi,_e=x[C],re=C==="y"?"height":"width",ce=_e+b[we],D=_e-b[V],I=[Qn,Xn].indexOf(g)!==-1,z=(Ce=U==null?void 0:U[C])!=null?Ce:0,he=I?ce:_e-O[re]-R[re]-z+A.altAxis,X=I?_e+O[re]+R[re]-z-A.altAxis:D,oe=m&&I?i0t(he,_e,X):Ll(m?he:ce,_e,m?X:D);x[C]=oe,F[C]=oe-_e}e.modifiersData[i]=F}}const k0t={name:"preventOverflow",enabled:!0,phase:"main",fn:D0t,requiresIfExists:["offset"]};function L0t(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function P0t(n){return n===ai(n)||!xi(n)?FE(n):L0t(n)}function U0t(n){var e=n.getBoundingClientRect(),t=ya(e.width)/n.offsetWidth||1,i=ya(e.height)/n.offsetHeight||1;return t!==1||i!==1}function F0t(n,e,t){t===void 0&&(t=!1);var i=xi(e),s=xi(e)&&U0t(e),r=Mr(e),o=Sa(n,s,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((ds(e)!=="body"||GE(r))&&(a=P0t(e)),xi(e)?(l=Sa(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=BE(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function B0t(n){var e=new Map,t=new Set,i=[];n.forEach(function(r){e.set(r.name,r)});function s(r){t.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&s(l)}}),i.push(r)}return n.forEach(function(r){t.has(r.name)||s(r)}),i}function G0t(n){var e=B0t(n);return XSt.reduce(function(t,i){return t.concat(e.filter(function(s){return s.phase===i}))},[])}function z0t(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function V0t(n){var e=n.reduce(function(t,i){var s=t[i.name];return t[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var GC={placement:"bottom",modifiers:[],strategy:"absolute"};function zC(){for(var n=arguments.length,e=new Array(n),t=0;t(Nr("data-v-f5c78cc1"),n=n(),Or(),n),Q0t={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center"},X0t={class:"flex flex-col text-center"},Z0t={class:"flex flex-col text-center items-center"},J0t={class:"flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"},eTt=Ut(()=>u("img",{class:"w-24 animate-bounce",title:"LoLLMS WebUI",src:ga,alt:"Logo"},null,-1)),tTt={class:"flex flex-col items-start"},nTt={class:"text-2xl font-bold text-5xl drop-shadow-md align-middle"},iTt=Ut(()=>u("p",{class:"text-gray-400 text-base"},"One tool to rule them all",-1)),sTt=Ut(()=>u("p",{class:"text-gray-400 text-base"},"by ParisNeo",-1)),rTt=Ut(()=>u("hr",{class:"mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"},null,-1)),oTt=Ut(()=>u("p",{class:"text-2xl mb-10 font-bold drop-shadow-md"},"Welcome",-1)),aTt={role:"status",class:"text-center w-full display: flex; flex-row align-items: center;"},lTt={class:"text-2xl animate-pulse mt-2"},cTt=Ut(()=>u("i",{"data-feather":"chevron-right"},null,-1)),dTt=[cTt],uTt=Ut(()=>u("i",{"data-feather":"chevron-left"},null,-1)),pTt=[uTt],_Tt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},hTt={class:"text-light-text-panel dark:text-dark-text-panel bg-bg-light-panel sticky z-10 top-0 dark:bg-bg-dark-tone shadow-md"},fTt={class:"flex-row p-4 flex items-center gap-3 flex-0"},mTt=Ut(()=>u("i",{"data-feather":"plus"},null,-1)),gTt=[mTt],bTt=Ut(()=>u("i",{"data-feather":"check-square"},null,-1)),ETt=[bTt],vTt=Ut(()=>u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},[u("i",{"data-feather":"refresh-ccw"})],-1)),yTt=Ut(()=>u("i",{"data-feather":"database"},null,-1)),STt=[yTt],TTt=Ut(()=>u("i",{"data-feather":"log-in"},null,-1)),xTt=[TTt],CTt={key:0,class:"dropdown"},RTt=Ut(()=>u("i",{"data-feather":"search"},null,-1)),ATt=[RTt],wTt=Ut(()=>u("i",{"data-feather":"save"},null,-1)),NTt=[wTt],OTt={key:2,class:"flex gap-3 flex-1 items-center duration-75"},ITt=Ut(()=>u("i",{"data-feather":"x"},null,-1)),MTt=[ITt],DTt=Ut(()=>u("i",{"data-feather":"check"},null,-1)),kTt=[DTt],LTt=Ut(()=>u("i",{"data-feather":"hard-drive"},null,-1)),PTt=[LTt],UTt=Ut(()=>u("i",{"data-feather":"check-circle"},null,-1)),FTt=[UTt],BTt=Ut(()=>u("i",{"data-feather":"x-octagon"},null,-1)),GTt=[BTt],zTt=Ut(()=>u("i",{"data-feather":"book"},null,-1)),VTt=[zTt],HTt={key:7,title:"Loading..",class:"flex flex-row flex-grow justify-end"},qTt=Ut(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),YTt=[qTt],$Tt={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},WTt={class:"p-4 pt-2"},KTt={class:"relative"},jTt=Ut(()=>u("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[u("div",{class:"scale-75"},[u("i",{"data-feather":"search"})])],-1)),QTt={class:"absolute inset-y-0 right-0 flex items-center pr-3"},XTt=Ut(()=>u("i",{"data-feather":"x"},null,-1)),ZTt=[XTt],JTt={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},ext={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},txt={class:"flex flex-row flex-grow"},nxt={key:0},ixt={class:"flex flex-row"},sxt={key:0,class:"flex gap-3"},rxt=Ut(()=>u("i",{"data-feather":"trash"},null,-1)),oxt=[rxt],axt={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},lxt=Ut(()=>u("i",{"data-feather":"check"},null,-1)),cxt=[lxt],dxt=Ut(()=>u("i",{"data-feather":"x"},null,-1)),uxt=[dxt],pxt={class:"flex gap-3"},_xt=Ut(()=>u("i",{"data-feather":"log-out"},null,-1)),hxt=[_xt],fxt=Ut(()=>u("i",{"data-feather":"bookmark"},null,-1)),mxt=[fxt],gxt=Ut(()=>u("i",{"data-feather":"list"},null,-1)),bxt=[gxt],Ext={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},vxt={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},yxt=Ut(()=>u("p",{class:"px-3"},"No discussions are found",-1)),Sxt=[yxt],Txt=Ut(()=>u("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),xxt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},Cxt={key:1,class:"relative flex flex-col flex-grow w-full"},Rxt={class:"container pt-4 pb-50 mb-50 w-full"},Axt=Ut(()=>u("div",null,[u("br"),u("br"),u("br"),u("br"),u("br"),u("br"),u("br")],-1)),wxt=Ut(()=>u("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1)),Nxt={key:0,class:"flex flex-row items-center justify-center h-10"},Oxt={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},Ixt={class:"text-2xl animate-pulse mt-2 text-light-text-panel dark:text-dark-text-panel"},Mxt={setup(){},data(){return{memory_icon:$0t,active_skills:W0t,inactive_skills:K0t,skillsRegistry:j0t,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CHUNK:0,MSG_TYPE_FULL:1,MSG_TYPE_FULL_INVISIBLE_TO_AI:2,MSG_TYPE_FULL_INVISIBLE_TO_USER:3,MSG_TYPE_EXCEPTION:4,MSG_TYPE_WARNING:5,MSG_TYPE_INFO:6,MSG_TYPE_STEP:7,MSG_TYPE_STEP_START:8,MSG_TYPE_STEP_PROGRESS:9,MSG_TYPE_STEP_END:10,MSG_TYPE_JSON_INFOS:11,MSG_TYPE_REF:12,MSG_TYPE_CODE:13,MSG_TYPE_UI:14,MSG_TYPE_NEW_MESSAGE:15,MSG_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,panelCollapsed:!1,isOpen:!1,discussion_id:0}},methods:{add_webpage(){console.log("addWebLink received"),this.$refs.web_url_input_box.showPanel()},addWebpage(){Me.post("/add_webpage",{client_id:this.client_id,url:this.$refs.web_url_input_box.inputText},{headers:this.posts_headers}).then(n=>{n&&n.status&&(console.log("Done"),this.recoverFiles())})},show_progress(n){this.progress_visibility_val=!0},hide_progress(n){this.progress_visibility_val=!1},update_progress(n){console.log("Progress update"),this.progress_value=n.value},onSettingsBinding(){try{this.isLoading=!0,Me.get("/get_active_binding_settings").then(n=>{this.isLoading=!1,n&&(n.data&&Object.keys(n.data).length>0?this.$store.state.universalForm.showForm(n.data,"Binding settings - "+bindingEntry.binding.name,"Save changes","Cancel").then(e=>{try{Me.post("/set_active_binding_settings",e).then(t=>{t&&t.data?(console.log("binding set with new settings",t.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. +`+n.name,4,!1)}else console.log("mounting pers");this.$emit("personalitySelected"),Ve(()=>{Ye.replace()})}},async select_personality(n){if(!n)return{status:!1,error:"no personality - select_personality"};const e=n.language===null?n.full_path:n.full_path+":"+n.language;console.log("Selecting personality ",e);const t=this.$store.state.config.personalities.findIndex(s=>s===e),i={client_id:this.$store.state.client_id,id:t};try{const s=await Me.post("/select_personality",i);if(s)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),s.data}catch(s){console.log(s.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(n){n.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const t=new MouseEvent("click");e.dispatchEvent(t)},setBinding(n){console.log("Setting binding to "+n.name),this.selecting_binding=!0,this.selectedBinding=n,this.$store.state.messageBox.showBlockingMessage("Loading binding"),Me.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:n.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,!0),this.selecting_binding=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_binding=!1})},setModel(n){console.log("Setting model to "+n.name),this.selecting_model=!0,this.selectedModel=n,this.$store.state.messageBox.showBlockingMessage("Loading model"),Me.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:n.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},download_files(){Me.get("/download_files")},remove_file(n){Me.get("/remove_file",{client_id:this.$store.state.client_id,name:n}).then(e=>{console.log(e)})},clear_files(){Me.get("/clear_personality_files_list").then(n=>{console.log(n),n.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(n,e){console.log("Send file triggered");const t=new FileReader,i=24*1024;let s=0,r=0;t.onloadend=()=>{if(t.error){console.error("Error reading file:",t.error);return}const a=t.result,l=s+a.byteLength>=n.size;Ze.emit("send_file_chunk",{filename:n.name,chunk:a,offset:s,isLastChunk:l,chunkIndex:r}),s+=a.byteLength,r++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):o()};function o(){const a=n.slice(s,s+i);t.readAsArrayBuffer(a)}console.log("Uploading file"),o()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=n=>{let e="";for(let t=n.resultIndex;t{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=n=>{console.error("Speech recognition error:",n.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(n){this.showPersonalities=!this.showPersonalities},handleOnTalk(n){this.showPersonalities=!1,this.onTalk(n)},onMountFun(n){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(n){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(n){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(n){return Ve(()=>{Ye.replace()}),ss(n)},removeItem(n){console.log("Réemoving ",n.name),Me.post("/remove_file",{client_id:this.$store.state.client_id,name:n.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=n)}),console.log(this.filesList)},sendMessageEvent(n,e="no_internet"){this.$emit("messageSentEvent",n,e)},sendCMDEvent(n){this.$emit("sendCMDEvent",n)},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const n=document.createElement("input");n.type="file",n.style.display="none",n.multiple=!0,document.body.appendChild(n),n.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(n.files),document.body.removeChild(n)}),n.click()},takePicture(){Ze.emit("take_picture"),Ze.on("picture_taken",()=>{Me.get("/get_current_personality_files_list").then(n=>{this.filesList=n.data.files,this.isFileSentList=n.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(n){this.loading||n.which===13&&(n.preventDefault(),n.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(n){console.log("Adding files");const e=[...n];let t=0;const i=()=>{if(t>=e.length){console.log(`Files_list: ${this.filesList}`);return}const s=e[t];this.filesList.push(s),this.isFileSentList.push(!1),this.send_file(s,()=>{t++,i()})};i()}},watch:{installedModels:{immediate:!0,handler(n){this.$nextTick(()=>{this.installedModels=n})}},model_name:{immediate:!0,handler(n){this.$nextTick(()=>{this.model_name=n})}},showfilesList(){Ve(()=>{Ye.replace()})},loading(n,e){Ve(()=>{Ye.replace()})},filesList:{handler(n,e){let t=0;if(n.length>0)for(let i=0;i{Ye.replace()})},activated(){Ve(()=>{Ye.replace()})}},Vt=n=>(Nr("data-v-5ab45082"),n=n(),Or(),n),Kvt={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},jvt={key:0,class:"items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},Qvt={class:"flex"},Xvt=["title"],Zvt=Vt(()=>u("i",{"data-feather":"list"},null,-1)),Jvt=[Zvt],eyt={key:0},tyt={class:"flex flex-col max-h-64"},nyt=["title"],iyt={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},syt={key:0,filesList:"",role:"status"},ryt=Vt(()=>u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),oyt=Vt(()=>u("span",{class:"sr-only"},"Loading...",-1)),ayt=[ryt,oyt],lyt=Vt(()=>u("div",null,[u("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),cyt=Vt(()=>u("div",{class:"grow"},null,-1)),dyt={class:"flex flex-row items-center"},uyt={class:"whitespace-nowrap"},pyt=["onClick"],_yt=Vt(()=>u("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),hyt=[_yt],fyt={key:1,class:"flex mx-1 w-500"},myt={class:"whitespace-nowrap flex flex-row gap-2"},gyt=Vt(()=>u("p",{class:"font-bold"}," Total size: ",-1)),byt=Vt(()=>u("div",{class:"grow"},null,-1)),Eyt=Vt(()=>u("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),vyt=[Eyt],yyt=Vt(()=>u("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)),Syt=[yyt],Tyt={key:2,class:"mx-1"},xyt={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end bg-primary"},Cyt={role:"status"},Ryt=["src"],Ayt=Vt(()=>u("span",{class:"sr-only"},"Selecting model...",-1)),wyt={class:"flex w-fit relative grow w-full"},Nyt={class:"relative text-light-text-panel dark:text-dark-text-panel grow flex h-12.5 cursor-pointer select-none items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone p-1 shadow-sm hover:shadow-none dark:border-gray-800",tabindex:"0"},Oyt={key:0,title:"Waiting for reply"},Iyt=["src"],Myt=Vt(()=>u("div",{role:"status"},[u("span",{class:"sr-only"},"Loading...")],-1)),Dyt={key:1,class:"w-fit group relative"},kyt={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-12 group-hover:translate-x-15 transition-all duration-300"},Lyt={key:0,class:"group items-center flex flex-row"},Pyt=["onClick"],Uyt=["src","title"],Fyt={class:"group items-center flex flex-row"},Byt=["src","title"],Gyt={key:2,class:"w-fit group relative"},zyt={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-12 group-hover:translate-x-15 transition-all duration-300"},Vyt={key:0,class:"group items-center flex flex-row"},Hyt=["onClick"],qyt=["src","title"],Yyt={class:"group items-center flex flex-row"},$yt=["src","title"],Wyt={class:"w-fit group relative"},Kyt={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-12 group-hover:translate-x-15 transition-all duration-300"},jyt={key:0,class:"group items-center flex flex-row"},Qyt=["onClick"],Xyt=["src","title"],Zyt=["onClick"],Jyt=Vt(()=>u("span",{class:"hidden hover:block top-3 left-9 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[u("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[u("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),eSt=[Jyt],tSt={class:"w-fit"},nSt={class:"relative grow"},iSt={class:"group relative w-max"},sSt=Vt(()=>u("i",{"data-feather":"send"},null,-1)),rSt=[sSt],oSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI.")],-1)),aSt={class:"group relative w-max"},lSt=["src"],cSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI with internet search.")],-1)),dSt={class:"group relative w-max"},uSt=Vt(()=>u("i",{"data-feather":"mic"},null,-1)),pSt=[uSt],_St=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Press and talk.")],-1)),hSt={key:4,class:"group relative w-max"},fSt=Vt(()=>u("i",{"data-feather":"file-plus"},null,-1)),mSt=[fSt],gSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Send File to the AI.")],-1)),bSt={class:"group relative w-max"},ESt=Vt(()=>u("i",{"data-feather":"camera"},null,-1)),vSt=[ESt],ySt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Take a shot from webcam.")],-1)),SSt={class:"group relative w-max"},TSt=Vt(()=>u("i",{"data-feather":"globe"},null,-1)),xSt=[TSt],CSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Add a weblink to the discussion.")],-1)),RSt={class:"group relative w-max"},ASt=Vt(()=>u("i",{"data-feather":"message-square"},null,-1)),wSt=[ASt],NSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty User message.")],-1)),OSt={class:"group relative w-max"},ISt=Vt(()=>u("i",{"data-feather":"message-square"},null,-1)),MSt=[ISt],DSt=Vt(()=>u("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[u("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty ai message.")],-1)),kSt=Vt(()=>u("div",{class:"ml-auto gap-2"},null,-1));function LSt(n,e,t,i,s,r){const o=ht("MountedPersonalitiesList"),a=ht("MountedPersonalities"),l=ht("PersonalitiesCommands"),d=ht("UniversalForm");return w(),M($e,null,[u("form",null,[u("div",Kvt,[s.filesList.length>0||s.showPersonalities?(w(),M("div",jvt,[u("div",Qvt,[u("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:s.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=Te(c=>s.showfilesList=!s.showfilesList,["stop"]))},Jvt,8,Xvt)]),s.filesList.length>0&&s.showfilesList==!0?(w(),M("div",eyt,[u("div",tyt,[Oe(rs,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:Je(()=>[(w(!0),M($e,null,dt(s.filesList,(c,_)=>(w(),M("div",{key:_+"-"+c.name},[u("div",{class:"m-1",title:c.name},[u("div",iyt,[s.isFileSentList[_]?q("",!0):(w(),M("div",syt,ayt)),lyt,u("div",{class:He(["line-clamp-1 w-3/5",s.isFileSentList[_]?"text-green-500":"text-red-200"])},fe(c.name),3),cyt,u("div",dyt,[u("p",uyt,fe(r.computedFileSize(c.size)),1),u("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:f=>r.removeItem(c)},hyt,8,pyt)])])],8,nyt)]))),128))]),_:1})])])):q("",!0),s.filesList.length>0?(w(),M("div",fyt,[u("div",myt,[gyt,je(" "+fe(s.totalSize)+" ("+fe(s.filesList.length)+") ",1)]),byt,u("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...c)=>r.clear_files&&r.clear_files(...c))},vyt),u("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...c)=>r.download_files&&r.download_files(...c))},Syt)])):q("",!0),s.showPersonalities?(w(),M("div",Tyt,[Oe(o,{ref:"mountedPersList",onShowPersList:r.onShowPersListFun,"on-mounted":r.onMountFun,"on-un-mounted":r.onUnmountFun,"on-remounted":n.onRemountFun,"on-talk":r.handleOnTalk,discussionPersonalities:r.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):q("",!0)])):q("",!0),s.selecting_model||s.selecting_binding?(w(),M("div",xyt,[u("div",Cyt,[u("img",{src:s.loader_v0,class:"w-50 h-50"},null,8,Ryt),Ayt])])):q("",!0),u("div",wyt,[u("div",Nyt,[t.loading?(w(),M("div",Oyt,[u("img",{src:s.loader_v0},null,8,Iyt),Myt])):q("",!0),t.loading?q("",!0):(w(),M("div",Dyt,[u("div",kyt,[(w(!0),M($e,null,dt(r.installedBindings,(c,_)=>(w(),M("div",{class:"w-full",key:_+"-"+c.name,ref_for:!0,ref:"installedBindings"},[c.name!=r.binding_name?(w(),M("div",Lyt,[u("button",{onClick:Te(f=>r.setBinding(c),["prevent"]),class:"w-10 h-10"},[u("img",{src:c.icon?c.icon:s.modelImgPlaceholder,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:c.name},null,8,Uyt)],8,Pyt)])):q("",!0)]))),128))]),u("div",Fyt,[u("button",{onClick:e[3]||(e[3]=Te(c=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[u("img",{src:r.currentBindingIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:r.currentBinding?r.currentBinding.name:"unknown"},null,8,Byt)])])])),t.loading?q("",!0):(w(),M("div",Gyt,[u("div",zyt,[(w(!0),M($e,null,dt(r.installedModels,(c,_)=>(w(),M("div",{class:"w-full",key:_+"-"+c.name,ref_for:!0,ref:"installedModels"},[c.name!=r.model_name?(w(),M("div",Vyt,[u("button",{onClick:Te(f=>r.setModel(c),["prevent"]),class:"w-10 h-10"},[u("img",{src:c.icon?c.icon:s.modelImgPlaceholder,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:c.name},null,8,qyt)],8,Hyt)])):q("",!0)]))),128))]),u("div",Yyt,[u("button",{onClick:e[4]||(e[4]=Te(c=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[u("img",{src:r.currentModelIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:r.currentModel?r.currentModel.name:"unknown"},null,8,$yt)])])])),u("div",Wyt,[u("div",Kyt,[(w(!0),M($e,null,dt(r.mountedPersonalities,(c,_)=>(w(),M("div",{class:"w-full",key:_+"-"+c.name,ref_for:!0,ref:"mountedPersonalities"},[_!=r.personality_name?(w(),M("div",jyt,[u("button",{onClick:Te(f=>r.onPersonalitySelected(c),["prevent"]),class:"w-10 h-10"},[u("img",{src:s.bUrl+c.avatar,onError:e[5]||(e[5]=(...f)=>n.personalityImgPlacehodler&&n.personalityImgPlacehodler(...f)),class:He(["w-10 h-10 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(c.full_path)?"border-secondary":"border-transparent z-0"]),title:c.name},null,42,Xyt)],8,Qyt),u("button",{onClick:Te(f=>r.unmountPersonality(c),["prevent"])},eSt,8,Zyt)])):q("",!0)]))),128))]),Oe(a,{ref:"mountedPers",onShowPersList:r.onShowPersListFun,onReady:r.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])]),u("div",tSt,[s.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(w(),Tt(l,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":t.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):q("",!0)]),u("div",nSt,[ne(u("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[6]||(e[6]=c=>s.message=c),title:"Hold SHIFT + ENTER to add new line",class:"inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:e[7]||(e[7]=wr(Te(c=>r.submitOnEnter(c),["exact"]),["enter"]))},`\r + `,544),[[Pe,s.message]])]),t.loading?(w(),M("button",{key:3,type:"button",class:"bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800",onClick:e[8]||(e[8]=Te((...c)=>r.stopGenerating&&r.stopGenerating(...c),["stop"]))}," Stop generating ")):q("",!0),u("div",iSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[9]||(e[9]=(...c)=>r.submit&&r.submit(...c)),title:"Send",class:"w-6 text-panel hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},rSt)),oSt]),u("div",aSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[10]||(e[10]=(...c)=>r.submitWithInternetSearch&&r.submitWithInternetSearch(...c)),title:"Send With internet",class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},[u("img",{src:s.sendGlobe,width:"50",height:"50",style:{stroke:"currentColor",fill:"currentColor"}},null,8,lSt)])),cSt]),u("div",dSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[11]||(e[11]=(...c)=>r.startSpeechRecognition&&r.startSpeechRecognition(...c)),class:He([{"text-red-500":s.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"])},pSt,2)),_St]),t.loading?q("",!0):(w(),M("div",hSt,[u("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[12]||(e[12]=(...c)=>r.addFiles&&r.addFiles(...c)),multiple:""},null,544),u("button",{type:"button",onClick:e[13]||(e[13]=Te((...c)=>r.add_file&&r.add_file(...c),["prevent"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},mSt),gSt])),u("div",bSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[14]||(e[14]=Te((...c)=>r.takePicture&&r.takePicture(...c),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},vSt)),ySt]),u("div",SSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[15]||(e[15]=Te((...c)=>r.addWebLink&&r.addWebLink(...c),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},xSt)),CSt]),u("div",RSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[16]||(e[16]=Te((...c)=>r.makeAnEmptyUserMessage&&r.makeAnEmptyUserMessage(...c),["stop"])),class:"w-6 text-gray-800 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},wSt)),NSt]),u("div",OSt,[t.loading?q("",!0):(w(),M("button",{key:0,type:"button",onClick:e[17]||(e[17]=Te((...c)=>r.makeAnEmptyAIMessage&&r.makeAnEmptyAIMessage(...c),["stop"])),class:"w-6 text-red-400 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},MSt)),DSt])]),kSt])])]),Oe(d,{ref:"universalForm",class:"z-20"},null,512)],64)}const TO=bt(Wvt,[["render",LSt],["__scopeId","data-v-5ab45082"]]),PSt={name:"WelcomeComponent",setup(){return{}}},USt={class:"flex flex-col text-center"},FSt=zu('
Logo

LoLLMS

One tool to rule them all


Welcome

Please create a new discussion or select existing one to start

',1),BSt=[FSt];function GSt(n,e,t,i,s,r){return w(),M("div",USt,BSt)}const xO=bt(PSt,[["render",GSt]]);var zSt=function(){function n(e,t){t===void 0&&(t=[]),this._eventType=e,this._eventFunctions=t}return n.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(t){typeof window<"u"&&window.addEventListener(e._eventType,t)})},n}(),ou=globalThis&&globalThis.__assign||function(){return ou=Object.assign||function(n){for(var e,t=1,i=arguments.length;t"u")return!1;var e=ai(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function e0t(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},s=e.attributes[t]||{},r=e.elements[t];!xi(r)||!ds(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function t0t(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],r=e.attributes[i]||{},o=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),a=o.reduce(function(l,d){return l[d]="",l},{});!xi(s)||!ds(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const n0t={name:"applyStyles",enabled:!0,phase:"write",fn:e0t,effect:t0t,requires:["computeStyles"]};function os(n){return n.split("-")[0]}var ao=Math.max,du=Math.min,ya=Math.round;function ib(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function IO(){return!/^((?!chrome|android).)*safari/i.test(ib())}function Sa(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=n.getBoundingClientRect(),s=1,r=1;e&&xi(n)&&(s=n.offsetWidth>0&&ya(i.width)/n.offsetWidth||1,r=n.offsetHeight>0&&ya(i.height)/n.offsetHeight||1);var o=mo(n)?ai(n):window,a=o.visualViewport,l=!IO()&&t,d=(i.left+(l&&a?a.offsetLeft:0))/s,c=(i.top+(l&&a?a.offsetTop:0))/r,_=i.width/s,f=i.height/r;return{width:_,height:f,top:c,right:d+_,bottom:c+f,left:d,x:d,y:c}}function PE(n){var e=Sa(n),t=n.offsetWidth,i=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:i}}function MO(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&LE(t)){var i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function zs(n){return ai(n).getComputedStyle(n)}function i0t(n){return["table","td","th"].indexOf(ds(n))>=0}function Mr(n){return((mo(n)?n.ownerDocument:n.document)||window.document).documentElement}function dp(n){return ds(n)==="html"?n:n.assignedSlot||n.parentNode||(LE(n)?n.host:null)||Mr(n)}function kC(n){return!xi(n)||zs(n).position==="fixed"?null:n.offsetParent}function s0t(n){var e=/firefox/i.test(ib()),t=/Trident/i.test(ib());if(t&&xi(n)){var i=zs(n);if(i.position==="fixed")return null}var s=dp(n);for(LE(s)&&(s=s.host);xi(s)&&["html","body"].indexOf(ds(s))<0;){var r=zs(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function Tc(n){for(var e=ai(n),t=kC(n);t&&i0t(t)&&zs(t).position==="static";)t=kC(t);return t&&(ds(t)==="html"||ds(t)==="body"&&zs(t).position==="static")?e:t||s0t(n)||e}function UE(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Ll(n,e,t){return ao(n,du(e,t))}function r0t(n,e,t){var i=Ll(n,e,t);return i>t?t:i}function DO(){return{top:0,right:0,bottom:0,left:0}}function kO(n){return Object.assign({},DO(),n)}function LO(n,e){return e.reduce(function(t,i){return t[i]=n,t},{})}var o0t=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,kO(typeof e!="number"?e:LO(e,Sc))};function a0t(n){var e,t=n.state,i=n.name,s=n.options,r=t.elements.arrow,o=t.modifiersData.popperOffsets,a=os(t.placement),l=UE(a),d=[Xn,wi].indexOf(a)>=0,c=d?"height":"width";if(!(!r||!o)){var _=o0t(s.padding,t),f=PE(r),m=l==="y"?Qn:Xn,h=l==="y"?Ai:wi,E=t.rects.reference[c]+t.rects.reference[l]-o[l]-t.rects.popper[c],b=o[l]-t.rects.reference[l],g=Tc(r),v=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,y=E/2-b/2,T=_[m],C=v-f[c]-_[h],x=v/2-f[c]/2+y,O=Ll(T,x,C),R=l;t.modifiersData[i]=(e={},e[R]=O,e.centerOffset=O-x,e)}}function l0t(n){var e=n.state,t=n.options,i=t.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||MO(e.elements.popper,s)&&(e.elements.arrow=s))}const c0t={name:"arrow",enabled:!0,phase:"main",fn:a0t,effect:l0t,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ta(n){return n.split("-")[1]}var d0t={top:"auto",right:"auto",bottom:"auto",left:"auto"};function u0t(n,e){var t=n.x,i=n.y,s=e.devicePixelRatio||1;return{x:ya(t*s)/s||0,y:ya(i*s)/s||0}}function LC(n){var e,t=n.popper,i=n.popperRect,s=n.placement,r=n.variation,o=n.offsets,a=n.position,l=n.gpuAcceleration,d=n.adaptive,c=n.roundOffsets,_=n.isFixed,f=o.x,m=f===void 0?0:f,h=o.y,E=h===void 0?0:h,b=typeof c=="function"?c({x:m,y:E}):{x:m,y:E};m=b.x,E=b.y;var g=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),y=Xn,T=Qn,C=window;if(d){var x=Tc(t),O="clientHeight",R="clientWidth";if(x===ai(t)&&(x=Mr(t),zs(x).position!=="static"&&a==="absolute"&&(O="scrollHeight",R="scrollWidth")),x=x,s===Qn||(s===Xn||s===wi)&&r===sc){T=Ai;var S=_&&x===C&&C.visualViewport?C.visualViewport.height:x[O];E-=S-i.height,E*=l?1:-1}if(s===Xn||(s===Qn||s===Ai)&&r===sc){y=wi;var A=_&&x===C&&C.visualViewport?C.visualViewport.width:x[R];m-=A-i.width,m*=l?1:-1}}var U=Object.assign({position:a},d&&d0t),F=c===!0?u0t({x:m,y:E},ai(t)):{x:m,y:E};if(m=F.x,E=F.y,l){var K;return Object.assign({},U,(K={},K[T]=v?"0":"",K[y]=g?"0":"",K.transform=(C.devicePixelRatio||1)<=1?"translate("+m+"px, "+E+"px)":"translate3d("+m+"px, "+E+"px, 0)",K))}return Object.assign({},U,(e={},e[T]=v?E+"px":"",e[y]=g?m+"px":"",e.transform="",e))}function p0t(n){var e=n.state,t=n.options,i=t.gpuAcceleration,s=i===void 0?!0:i,r=t.adaptive,o=r===void 0?!0:r,a=t.roundOffsets,l=a===void 0?!0:a,d={placement:os(e.placement),variation:Ta(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,LC(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,LC(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const _0t={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:p0t,data:{}};var Wc={passive:!0};function h0t(n){var e=n.state,t=n.instance,i=n.options,s=i.scroll,r=s===void 0?!0:s,o=i.resize,a=o===void 0?!0:o,l=ai(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&d.forEach(function(c){c.addEventListener("scroll",t.update,Wc)}),a&&l.addEventListener("resize",t.update,Wc),function(){r&&d.forEach(function(c){c.removeEventListener("scroll",t.update,Wc)}),a&&l.removeEventListener("resize",t.update,Wc)}}const f0t={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:h0t,data:{}};var m0t={left:"right",right:"left",bottom:"top",top:"bottom"};function zd(n){return n.replace(/left|right|bottom|top/g,function(e){return m0t[e]})}var g0t={start:"end",end:"start"};function PC(n){return n.replace(/start|end/g,function(e){return g0t[e]})}function FE(n){var e=ai(n),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function BE(n){return Sa(Mr(n)).left+FE(n).scrollLeft}function b0t(n,e){var t=ai(n),i=Mr(n),s=t.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var d=IO();(d||!d&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+BE(n),y:l}}function E0t(n){var e,t=Mr(n),i=FE(n),s=(e=n.ownerDocument)==null?void 0:e.body,r=ao(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=ao(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+BE(n),l=-i.scrollTop;return zs(s||t).direction==="rtl"&&(a+=ao(t.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function GE(n){var e=zs(n),t=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+i)}function PO(n){return["html","body","#document"].indexOf(ds(n))>=0?n.ownerDocument.body:xi(n)&&GE(n)?n:PO(dp(n))}function Pl(n,e){var t;e===void 0&&(e=[]);var i=PO(n),s=i===((t=n.ownerDocument)==null?void 0:t.body),r=ai(i),o=s?[r].concat(r.visualViewport||[],GE(i)?i:[]):i,a=e.concat(o);return s?a:a.concat(Pl(dp(o)))}function sb(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function v0t(n,e){var t=Sa(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function UC(n,e,t){return e===NO?sb(b0t(n,t)):mo(e)?v0t(e,t):sb(E0t(Mr(n)))}function y0t(n){var e=Pl(dp(n)),t=["absolute","fixed"].indexOf(zs(n).position)>=0,i=t&&xi(n)?Tc(n):n;return mo(i)?e.filter(function(s){return mo(s)&&MO(s,i)&&ds(s)!=="body"}):[]}function S0t(n,e,t,i){var s=e==="clippingParents"?y0t(n):[].concat(e),r=[].concat(s,[t]),o=r[0],a=r.reduce(function(l,d){var c=UC(n,d,i);return l.top=ao(c.top,l.top),l.right=du(c.right,l.right),l.bottom=du(c.bottom,l.bottom),l.left=ao(c.left,l.left),l},UC(n,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function UO(n){var e=n.reference,t=n.element,i=n.placement,s=i?os(i):null,r=i?Ta(i):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,l;switch(s){case Qn:l={x:o,y:e.y-t.height};break;case Ai:l={x:o,y:e.y+e.height};break;case wi:l={x:e.x+e.width,y:a};break;case Xn:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var d=s?UE(s):null;if(d!=null){var c=d==="y"?"height":"width";switch(r){case va:l[d]=l[d]-(e[c]/2-t[c]/2);break;case sc:l[d]=l[d]+(e[c]/2-t[c]/2);break}}return l}function rc(n,e){e===void 0&&(e={});var t=e,i=t.placement,s=i===void 0?n.placement:i,r=t.strategy,o=r===void 0?n.strategy:r,a=t.boundary,l=a===void 0?VSt:a,d=t.rootBoundary,c=d===void 0?NO:d,_=t.elementContext,f=_===void 0?fl:_,m=t.altBoundary,h=m===void 0?!1:m,E=t.padding,b=E===void 0?0:E,g=kO(typeof b!="number"?b:LO(b,Sc)),v=f===fl?HSt:fl,y=n.rects.popper,T=n.elements[h?v:f],C=S0t(mo(T)?T:T.contextElement||Mr(n.elements.popper),l,c,o),x=Sa(n.elements.reference),O=UO({reference:x,element:y,strategy:"absolute",placement:s}),R=sb(Object.assign({},y,O)),S=f===fl?R:x,A={top:C.top-S.top+g.top,bottom:S.bottom-C.bottom+g.bottom,left:C.left-S.left+g.left,right:S.right-C.right+g.right},U=n.modifiersData.offset;if(f===fl&&U){var F=U[s];Object.keys(A).forEach(function(K){var L=[wi,Ai].indexOf(K)>=0?1:-1,H=[Qn,Ai].indexOf(K)>=0?"y":"x";A[K]+=F[H]*L})}return A}function T0t(n,e){e===void 0&&(e={});var t=e,i=t.placement,s=t.boundary,r=t.rootBoundary,o=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,d=l===void 0?OO:l,c=Ta(i),_=c?a?DC:DC.filter(function(h){return Ta(h)===c}):Sc,f=_.filter(function(h){return d.indexOf(h)>=0});f.length===0&&(f=_);var m=f.reduce(function(h,E){return h[E]=rc(n,{placement:E,boundary:s,rootBoundary:r,padding:o})[os(E)],h},{});return Object.keys(m).sort(function(h,E){return m[h]-m[E]})}function x0t(n){if(os(n)===kE)return[];var e=zd(n);return[PC(n),e,PC(e)]}function C0t(n){var e=n.state,t=n.options,i=n.name;if(!e.modifiersData[i]._skip){for(var s=t.mainAxis,r=s===void 0?!0:s,o=t.altAxis,a=o===void 0?!0:o,l=t.fallbackPlacements,d=t.padding,c=t.boundary,_=t.rootBoundary,f=t.altBoundary,m=t.flipVariations,h=m===void 0?!0:m,E=t.allowedAutoPlacements,b=e.options.placement,g=os(b),v=g===b,y=l||(v||!h?[zd(b)]:x0t(b)),T=[b].concat(y).reduce(function(me,ve){return me.concat(os(ve)===kE?T0t(e,{placement:ve,boundary:c,rootBoundary:_,padding:d,flipVariations:h,allowedAutoPlacements:E}):ve)},[]),C=e.rects.reference,x=e.rects.popper,O=new Map,R=!0,S=T[0],A=0;A=0,H=L?"width":"height",G=rc(e,{placement:U,boundary:c,rootBoundary:_,altBoundary:f,padding:d}),P=L?K?wi:Xn:K?Ai:Qn;C[H]>x[H]&&(P=zd(P));var j=zd(P),Y=[];if(r&&Y.push(G[F]<=0),a&&Y.push(G[P]<=0,G[j]<=0),Y.every(function(me){return me})){S=U,R=!1;break}O.set(U,Y)}if(R)for(var Q=h?3:1,ae=function(ve){var Ae=T.find(function(J){var ge=O.get(J);if(ge)return ge.slice(0,ve).every(function(ee){return ee})});if(Ae)return S=Ae,"break"},te=Q;te>0;te--){var Z=ae(te);if(Z==="break")break}e.placement!==S&&(e.modifiersData[i]._skip=!0,e.placement=S,e.reset=!0)}}const R0t={name:"flip",enabled:!0,phase:"main",fn:C0t,requiresIfExists:["offset"],data:{_skip:!1}};function FC(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function BC(n){return[Qn,wi,Ai,Xn].some(function(e){return n[e]>=0})}function A0t(n){var e=n.state,t=n.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=rc(e,{elementContext:"reference"}),a=rc(e,{altBoundary:!0}),l=FC(o,i),d=FC(a,s,r),c=BC(l),_=BC(d);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:_},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":_})}const w0t={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:A0t};function N0t(n,e,t){var i=os(n),s=[Xn,Qn].indexOf(i)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[Xn,wi].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function O0t(n){var e=n.state,t=n.options,i=n.name,s=t.offset,r=s===void 0?[0,0]:s,o=OO.reduce(function(c,_){return c[_]=N0t(_,e.rects,r),c},{}),a=o[e.placement],l=a.x,d=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=d),e.modifiersData[i]=o}const I0t={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:O0t};function M0t(n){var e=n.state,t=n.name;e.modifiersData[t]=UO({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const D0t={name:"popperOffsets",enabled:!0,phase:"read",fn:M0t,data:{}};function k0t(n){return n==="x"?"y":"x"}function L0t(n){var e=n.state,t=n.options,i=n.name,s=t.mainAxis,r=s===void 0?!0:s,o=t.altAxis,a=o===void 0?!1:o,l=t.boundary,d=t.rootBoundary,c=t.altBoundary,_=t.padding,f=t.tether,m=f===void 0?!0:f,h=t.tetherOffset,E=h===void 0?0:h,b=rc(e,{boundary:l,rootBoundary:d,padding:_,altBoundary:c}),g=os(e.placement),v=Ta(e.placement),y=!v,T=UE(g),C=k0t(T),x=e.modifiersData.popperOffsets,O=e.rects.reference,R=e.rects.popper,S=typeof E=="function"?E(Object.assign({},e.rects,{placement:e.placement})):E,A=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),U=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(x){if(r){var K,L=T==="y"?Qn:Xn,H=T==="y"?Ai:wi,G=T==="y"?"height":"width",P=x[T],j=P+b[L],Y=P-b[H],Q=m?-R[G]/2:0,ae=v===va?O[G]:R[G],te=v===va?-R[G]:-O[G],Z=e.elements.arrow,me=m&&Z?PE(Z):{width:0,height:0},ve=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:DO(),Ae=ve[L],J=ve[H],ge=Ll(0,O[G],me[G]),ee=y?O[G]/2-Q-ge-Ae-A.mainAxis:ae-ge-Ae-A.mainAxis,Se=y?-O[G]/2+Q+ge+J+A.mainAxis:te+ge+J+A.mainAxis,Ie=e.elements.arrow&&Tc(e.elements.arrow),k=Ie?T==="y"?Ie.clientTop||0:Ie.clientLeft||0:0,B=(K=U==null?void 0:U[T])!=null?K:0,$=P+ee-B-k,de=P+Se-B,se=Ll(m?du(j,$):j,P,m?ao(Y,de):Y);x[T]=se,F[T]=se-P}if(a){var Ce,we=T==="x"?Qn:Xn,V=T==="x"?Ai:wi,_e=x[C],re=C==="y"?"height":"width",ce=_e+b[we],D=_e-b[V],I=[Qn,Xn].indexOf(g)!==-1,z=(Ce=U==null?void 0:U[C])!=null?Ce:0,he=I?ce:_e-O[re]-R[re]-z+A.altAxis,X=I?_e+O[re]+R[re]-z-A.altAxis:D,oe=m&&I?r0t(he,_e,X):Ll(m?he:ce,_e,m?X:D);x[C]=oe,F[C]=oe-_e}e.modifiersData[i]=F}}const P0t={name:"preventOverflow",enabled:!0,phase:"main",fn:L0t,requiresIfExists:["offset"]};function U0t(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function F0t(n){return n===ai(n)||!xi(n)?FE(n):U0t(n)}function B0t(n){var e=n.getBoundingClientRect(),t=ya(e.width)/n.offsetWidth||1,i=ya(e.height)/n.offsetHeight||1;return t!==1||i!==1}function G0t(n,e,t){t===void 0&&(t=!1);var i=xi(e),s=xi(e)&&B0t(e),r=Mr(e),o=Sa(n,s,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((ds(e)!=="body"||GE(r))&&(a=F0t(e)),xi(e)?(l=Sa(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=BE(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function z0t(n){var e=new Map,t=new Set,i=[];n.forEach(function(r){e.set(r.name,r)});function s(r){t.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&s(l)}}),i.push(r)}return n.forEach(function(r){t.has(r.name)||s(r)}),i}function V0t(n){var e=z0t(n);return JSt.reduce(function(t,i){return t.concat(e.filter(function(s){return s.phase===i}))},[])}function H0t(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function q0t(n){var e=n.reduce(function(t,i){var s=t[i.name];return t[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var GC={placement:"bottom",modifiers:[],strategy:"absolute"};function zC(){for(var n=arguments.length,e=new Array(n),t=0;t(Nr("data-v-f5c78cc1"),n=n(),Or(),n),Z0t={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center"},J0t={class:"flex flex-col text-center"},eTt={class:"flex flex-col text-center items-center"},tTt={class:"flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"},nTt=Ut(()=>u("img",{class:"w-24 animate-bounce",title:"LoLLMS WebUI",src:ga,alt:"Logo"},null,-1)),iTt={class:"flex flex-col items-start"},sTt={class:"text-2xl font-bold text-5xl drop-shadow-md align-middle"},rTt=Ut(()=>u("p",{class:"text-gray-400 text-base"},"One tool to rule them all",-1)),oTt=Ut(()=>u("p",{class:"text-gray-400 text-base"},"by ParisNeo",-1)),aTt=Ut(()=>u("hr",{class:"mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"},null,-1)),lTt=Ut(()=>u("p",{class:"text-2xl mb-10 font-bold drop-shadow-md"},"Welcome",-1)),cTt={role:"status",class:"text-center w-full display: flex; flex-row align-items: center;"},dTt={class:"text-2xl animate-pulse mt-2"},uTt=Ut(()=>u("i",{"data-feather":"chevron-right"},null,-1)),pTt=[uTt],_Tt=Ut(()=>u("i",{"data-feather":"chevron-left"},null,-1)),hTt=[_Tt],fTt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},mTt={class:"text-light-text-panel dark:text-dark-text-panel bg-bg-light-panel sticky z-10 top-0 dark:bg-bg-dark-tone shadow-md"},gTt={class:"flex-row p-4 flex items-center gap-3 flex-0"},bTt=Ut(()=>u("i",{"data-feather":"plus"},null,-1)),ETt=[bTt],vTt=Ut(()=>u("i",{"data-feather":"check-square"},null,-1)),yTt=[vTt],STt=Ut(()=>u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},[u("i",{"data-feather":"refresh-ccw"})],-1)),TTt=Ut(()=>u("i",{"data-feather":"database"},null,-1)),xTt=[TTt],CTt=Ut(()=>u("i",{"data-feather":"log-in"},null,-1)),RTt=[CTt],ATt={key:0,class:"dropdown"},wTt=Ut(()=>u("i",{"data-feather":"search"},null,-1)),NTt=[wTt],OTt=Ut(()=>u("i",{"data-feather":"save"},null,-1)),ITt=[OTt],MTt={key:2,class:"flex gap-3 flex-1 items-center duration-75"},DTt=Ut(()=>u("i",{"data-feather":"x"},null,-1)),kTt=[DTt],LTt=Ut(()=>u("i",{"data-feather":"check"},null,-1)),PTt=[LTt],UTt=Ut(()=>u("i",{"data-feather":"hard-drive"},null,-1)),FTt=[UTt],BTt=Ut(()=>u("i",{"data-feather":"check-circle"},null,-1)),GTt=[BTt],zTt=Ut(()=>u("i",{"data-feather":"x-octagon"},null,-1)),VTt=[zTt],HTt=Ut(()=>u("i",{"data-feather":"book"},null,-1)),qTt=[HTt],YTt={key:7,title:"Loading..",class:"flex flex-row flex-grow justify-end"},$Tt=Ut(()=>u("div",{role:"status"},[u("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[u("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),u("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),u("span",{class:"sr-only"},"Loading...")],-1)),WTt=[$Tt],KTt={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},jTt={class:"p-4 pt-2"},QTt={class:"relative"},XTt=Ut(()=>u("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[u("div",{class:"scale-75"},[u("i",{"data-feather":"search"})])],-1)),ZTt={class:"absolute inset-y-0 right-0 flex items-center pr-3"},JTt=Ut(()=>u("i",{"data-feather":"x"},null,-1)),ext=[JTt],txt={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},nxt={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},ixt={class:"flex flex-row flex-grow"},sxt={key:0},rxt={class:"flex flex-row"},oxt={key:0,class:"flex gap-3"},axt=Ut(()=>u("i",{"data-feather":"trash"},null,-1)),lxt=[axt],cxt={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},dxt=Ut(()=>u("i",{"data-feather":"check"},null,-1)),uxt=[dxt],pxt=Ut(()=>u("i",{"data-feather":"x"},null,-1)),_xt=[pxt],hxt={class:"flex gap-3"},fxt=Ut(()=>u("i",{"data-feather":"log-out"},null,-1)),mxt=[fxt],gxt=Ut(()=>u("i",{"data-feather":"bookmark"},null,-1)),bxt=[gxt],Ext=Ut(()=>u("i",{"data-feather":"list"},null,-1)),vxt=[Ext],yxt={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},Sxt={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},Txt=Ut(()=>u("p",{class:"px-3"},"No discussions are found",-1)),xxt=[Txt],Cxt=Ut(()=>u("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),Rxt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},Axt={key:1,class:"relative flex flex-col flex-grow w-full"},wxt={class:"container pt-4 pb-50 mb-50 w-full"},Nxt=Ut(()=>u("div",null,[u("br"),u("br"),u("br"),u("br"),u("br"),u("br"),u("br")],-1)),Oxt=Ut(()=>u("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1)),Ixt={key:0,class:"flex flex-row items-center justify-center h-10"},Mxt={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},Dxt={class:"text-2xl animate-pulse mt-2 text-light-text-panel dark:text-dark-text-panel"},kxt={setup(){},data(){return{memory_icon:K0t,active_skills:j0t,inactive_skills:Q0t,skillsRegistry:X0t,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CHUNK:0,MSG_TYPE_FULL:1,MSG_TYPE_FULL_INVISIBLE_TO_AI:2,MSG_TYPE_FULL_INVISIBLE_TO_USER:3,MSG_TYPE_EXCEPTION:4,MSG_TYPE_WARNING:5,MSG_TYPE_INFO:6,MSG_TYPE_STEP:7,MSG_TYPE_STEP_START:8,MSG_TYPE_STEP_PROGRESS:9,MSG_TYPE_STEP_END:10,MSG_TYPE_JSON_INFOS:11,MSG_TYPE_REF:12,MSG_TYPE_CODE:13,MSG_TYPE_UI:14,MSG_TYPE_NEW_MESSAGE:15,MSG_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,panelCollapsed:!1,isOpen:!1,discussion_id:0}},methods:{add_webpage(){console.log("addWebLink received"),this.$refs.web_url_input_box.showPanel()},addWebpage(){Me.post("/add_webpage",{client_id:this.client_id,url:this.$refs.web_url_input_box.inputText},{headers:this.posts_headers}).then(n=>{n&&n.status&&(console.log("Done"),this.recoverFiles())})},show_progress(n){this.progress_visibility_val=!0},hide_progress(n){this.progress_visibility_val=!1},update_progress(n){console.log("Progress update"),this.progress_value=n.value},onSettingsBinding(){try{this.isLoading=!0,Me.get("/get_active_binding_settings").then(n=>{this.isLoading=!1,n&&(n.data&&Object.keys(n.data).length>0?this.$store.state.universalForm.showForm(n.data,"Binding settings - "+bindingEntry.binding.name,"Save changes","Cancel").then(e=>{try{Me.post("/set_active_binding_settings",e).then(t=>{t&&t.data?(console.log("binding set with new settings",t.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+t,4,!1),this.isLoading=!1)})}catch(t){this.$store.state.toast.showToast(`Did not get binding settings responses. Endpoint error: `+t.message,4,!1),this.isLoading=!1}}):(this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(n){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+n.message,4,!1)}},showDatabaseSelector(){this.database_selectorDialogVisible=!0},async ondatabase_selectorDialogSelected(n){console.log("Selected:",n)},onclosedatabase_selectorDialog(){this.database_selectorDialogVisible=!1},async onvalidatedatabase_selectorChoice(n){if(this.database_selectorDialogVisible=!1,(await Me.post("/select_database",{client_id:this.client_id,name:n},{headers:this.posts_headers})).status){console.log("Selected database"),this.$store.state.config=await Me.get("/get_config"),console.log("new config loaded :",this.$store.state.config);let t=await Me.get("/list_databases").data;console.log("New list of database: ",t),this.$store.state.databases=t,console.log("New list of database: ",this.$store.state.databases),location.reload()}},async addDiscussion2SkillsLibrary(){(await Me.post("/add_discussion_to_skills_library",{client_id:this.client_id},{headers:this.posts_headers})).status&&console.log("done")},async toggleSkillsLib(){this.$store.state.config.activate_skills_lib=!this.$store.state.config.activate_skills_lib,await this.applyConfiguration()},async showSkillsLib(){this.$refs.skills_lib.showSkillsLibrary()},async applyConfiguration(){this.loading=!0;const n=await Me.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config});this.loading=!1,n.data.status?this.$store.state.toast.showToast("Configuration changed successfully.",4,!0):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Ve(()=>{Ye.replace()})},save_configuration(){this.showConfirmation=!1,Me.post("/save_settings",{}).then(n=>{if(n)return n.status?this.$store.state.toast.showToast("Settings saved!",4,!0):this.$store.state.messageBox.showMessage("Error: Couldn't save settings!"),n.data}).catch(n=>(console.log(n.message,"save_configuration"),this.$store.state.messageBox.showMessage("Couldn't save settings!"),{status:!1}))},showToastMessage(n,e,t){console.log("sending",n),this.$store.state.toast.showToast(n,e,t)},togglePanel(){this.panelCollapsed=!this.panelCollapsed},toggleDropdown(){this.isOpen=!this.isOpen},importChatGPT(){},async api_get_req(n){try{const e=await Me.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req");return}},async list_discussions(){try{const n=await Me.get("/list_discussions");if(n)return this.createDiscussionList(n.data),n.data}catch(n){return console.log("Error: Could not list discussions",n.message),[]}},load_discussion(n,e){n&&(console.log("Loading discussion",n),this.loading=!0,this.discussionArr=[],this.setDiscussionLoading(n,this.loading),Ze.on("discussion",t=>{console.log("Discussion recovered"),this.loading=!1,this.setDiscussionLoading(n,this.loading),t&&(this.discussionArr=t.filter(i=>i.message_type==this.msgTypes.MSG_TYPE_CHUNK||i.message_type==this.msgTypes.MSG_TYPE_FULL||i.message_type==this.msgTypes.MSG_TYPE_FULL_INVISIBLE_TO_AI||i.message_type==this.msgTypes.MSG_TYPE_CODE||i.message_type==this.msgTypes.MSG_TYPE_JSON_INFOS||i.message_type==this.msgTypes.MSG_TYPE_UI),console.log("this.discussionArr"),console.log(this.discussionArr),e&&e()),Ze.off("discussion")}),Ze.emit("load_discussion",{id:n}),console.log("here"))},recoverFiles(){console.log("Recovering files"),Me.get("/get_current_personality_files_list").then(n=>{this.$refs.chatBox.filesList=n.data.files,this.$refs.chatBox.isFileSentList=n.data.files.map(e=>!0),console.log(`Files recovered: ${this.$refs.chatBox.filesList}`)})},new_discussion(n){try{this.loading=!0,Ze.on("discussion_created",e=>{Ze.off("discussion_created"),this.list_discussions().then(()=>{const t=this.list.findIndex(s=>s.id==e.id),i=this.list[t];this.selectDiscussion(i),this.load_discussion(e.id,()=>{this.loading=!1,this.recoverFiles(),Ve(()=>{const s=document.getElementById("dis-"+e.id);this.scrollToElement(s),console.log("Scrolling tp "+s)})})})}),console.log("new_discussion ",n),Ze.emit("new_discussion",{title:n})}catch(e){return console.log("Error: Could not create new discussion",e.message),{}}},async delete_discussion(n){try{n&&(this.loading=!0,this.setDiscussionLoading(n,this.loading),await Me.post("/delete_discussion",{client_id:this.client_id,id:n},{headers:this.posts_headers}),this.loading=!1,this.setDiscussionLoading(n,this.loading))}catch(e){console.log("Error: Could not delete discussion",e.message),this.loading=!1,this.setDiscussionLoading(n,this.loading)}},async edit_title(n,e){try{if(n){this.loading=!0,this.setDiscussionLoading(n,this.loading);const t=await Me.post("/edit_title",{client_id:this.client_id,id:n,title:e},{headers:this.posts_headers});if(this.loading=!1,this.setDiscussionLoading(n,this.loading),t.status==200){const i=this.list.findIndex(r=>r.id==n),s=this.list[i];s.title=e,this.tempList=this.list}}}catch(t){console.log("Error: Could not edit title",t.message),this.loading=!1,this.setDiscussionLoading(n,this.loading)}},async make_title(n){try{if(n){this.loading=!0,this.setDiscussionLoading(n,this.loading);const e=await Me.post("/make_title",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(console.log("Making title:",e),this.loading=!1,this.setDiscussionLoading(n,this.loading),e.status==200){const t=this.list.findIndex(s=>s.id==n),i=this.list[t];i.title=e.data.title,this.tempList=this.list}}}catch(e){console.log("Error: Could not edit title",e.message),this.loading=!1,this.setDiscussionLoading(n,this.loading)}},async delete_message(n){try{console.log(typeof n),console.log(typeof this.client_id),console.log(n),console.log(this.client_id);const e=await Me.post("/delete_message",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could delete message",e.message),{}}},async stop_gen(){try{if(this.discussionArr.length>0){const n=this.discussionArr[this.discussionArr.length-1];n.status_message="Generation canceled"}if(Ze.emit("cancel_generation"),res)return res.data}catch(n){return console.log("Error: Could not stop generating",n.message),{}}},async message_rank_up(n){try{const e=await Me.post("/message_rank_up",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank up message",e.message),{}}},async message_rank_down(n){try{const e=await Me.post("/message_rank_down",{client_id:this.client_id,id:n},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank down message",e.message),{}}},async edit_message(n,e,t){try{console.log(typeof this.client_id),console.log(typeof n),console.log(typeof e),console.log(typeof{audio_url:t});const i=await Me.post("/edit_message",{client_id:this.client_id,id:n,message:e,metadata:[{audio_url:t}]},{headers:this.posts_headers});if(i)return i.data}catch(i){return console.log("Error: Could not update message",i.message),{}}},async export_multiple_discussions(n,e){try{if(n.length>0){const t=await Me.post("/export_multiple_discussions",{client_id:this.$store.state.client_id,discussion_ids:n,export_format:e},{headers:this.posts_headers});if(t)return t.data}}catch(t){return console.log("Error: Could not export multiple discussions",t.message),{}}},async import_multiple_discussions(n){try{if(n.length>0){console.log("sending import",n);const e=await Me.post("/import_multiple_discussions",{client_id:this.$store.state.client_id,jArray:n},{headers:this.posts_headers});if(e)return console.log("import response",e.data),e.data}}catch(e){console.log("Error: Could not import multiple discussions",e.message);return}},filterDiscussions(){this.filterInProgress||(this.filterInProgress=!0,setTimeout(()=>{this.filterTitle?this.list=this.tempList.filter(n=>n.title&&n.title.includes(this.filterTitle)):this.list=this.tempList,this.filterInProgress=!1},100))},async selectDiscussion(n){if(this.isGenerating){this.$store.state.toast.showToast("You are currently generating a text. Please wait for text generation to finish or stop it before trying to select another discussion",4,!1);return}n&&(this.currentDiscussion===void 0?(this.currentDiscussion=n,this.setPageTitle(n),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(n.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)})):this.currentDiscussion.id!=n.id&&(console.log("item",n),console.log("this.currentDiscussion",this.currentDiscussion),this.currentDiscussion=n,console.log("this.currentDiscussion",this.currentDiscussion),this.setPageTitle(n),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(n.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)})),Ve(()=>{const e=document.getElementById("dis-"+this.currentDiscussion.id);this.scrollToElementInContainer(e,"leftPanel");const t=document.getElementById("messages-list");this.scrollBottom(t)}))},scrollToElement(n){n?n.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}):console.log("Error: scrollToElement")},scrollToElementInContainer(n,e){try{const t=n.offsetTop;document.getElementById(e).scrollTo({top:t,behavior:"smooth"})}catch{console.log("error")}},scrollBottom(n){n?n.scrollTo({top:n.scrollHeight,behavior:"smooth"}):console.log("Error: scrollBottom")},scrollTop(n){n?n.scrollTo({top:0,behavior:"smooth"}):console.log("Error: scrollTop")},createUserMsg(n){let e={content:n.message,id:n.id,rank:0,sender:n.user,created_at:n.created_at,steps:[],html_js_s:[],status_message:"Warming up"};this.discussionArr.push(e),Ve(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},updateLastUserMsg(n){const e=this.discussionArr.indexOf(i=>i.id=n.user_id),t={binding:n.binding,content:n.message,created_at:n.created_at,type:n.type,finished_generating_at:n.finished_generating_at,id:n.user_id,model:n.model,personality:n.personality,sender:n.user,steps:[]};e!==-1&&(this.discussionArr[e]=t)},socketIOConnected(){return console.log("socketIOConnected"),this.$store.state.isConnected=!0,this.$store.state.client_id=Ze.id,!0},socketIODisconnected(){return console.log("socketIOConnected"),this.currentDiscussion=null,this.$store.dispatch("refreshModels"),this.$store.state.isConnected=!1,!0},new_message(n){n.sender_type==this.SENDER_TYPES_AI&&(this.isGenerating=!0),console.log("Making a new message"),console.log("New message",n);let e={sender:n.sender,message_type:n.message_type,sender_type:n.sender_type,content:n.content,id:n.id,discussion_id:n.discussion_id,parent_id:n.parent_id,binding:n.binding,model:n.model,personality:n.personality,created_at:n.created_at,finished_generating_at:n.finished_generating_at,rank:0,ui:n.ui,steps:[],parameters:n.parameters,metadata:n.metadata,open:n.open};e.status_message="Warming up",console.log(e),this.discussionArr.push(e),(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,n.message),console.log("infos",n)},talk(n){this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Me.get("/get_generation_status",{}).then(e=>{e&&(e.data.status?console.log("Already generating"):(console.log("Generating message from ",e.data.status),Ze.emit("generate_msg_from",{id:-1}),this.discussionArr.length>0&&Number(this.discussionArr[this.discussionArr.length-1].id)+1))}).catch(e=>{console.log("Error: Could not get generation status",e)})},createEmptyUserMessage(n){Ze.emit("create_empty_message",{type:0,message:n})},createEmptyAIMessage(){Ze.emit("create_empty_message",{type:1})},sendMsg(n,e){if(!n){this.$store.state.toast.showToast("Message contains no content!",4,!1);return}this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Me.get("/get_generation_status",{}).then(t=>{if(t)if(t.data.status)console.log("Already generating");else{e=="internet"?Ze.emit("generate_msg_with_internet",{prompt:n}):Ze.emit("generate_msg",{prompt:n});let i=0;this.discussionArr.length>0&&(i=Number(this.discussionArr[this.discussionArr.length-1].id)+1);let s={message:n,id:i,rank:0,user:this.$store.state.config.user_name,created_at:new Date().toLocaleString(),sender:this.$store.state.config.user_name,message_type:this.msgTypes.MSG_TYPE_FULL,sender_type:this.senderTypes.SENDER_TYPES_USER,content:n,id:i,discussion_id:this.discussion_id,parent_id:i,binding:"",model:"",personality:"",created_at:new Date().toLocaleString(),finished_generating_at:new Date().toLocaleString(),rank:0,steps:[],parameters:null,metadata:[],ui:null};this.createUserMsg(s)}}).catch(t=>{console.log("Error: Could not get generation status",t)})},sendCmd(n){this.isGenerating=!0,Ze.emit("execute_command",{command:n,parameters:[]})},notify(n){self.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Ve(()=>{const e=document.getElementById("messages-list");this.scrollBottom(e)}),n.display_type==0?this.$store.state.toast.showToast(n.content,n.duration,n.notification_type):n.display_type==1?this.$store.state.messageBox.showMessage(n.content):n.display_type==2?(this.$store.state.messageBox.hideMessage(),this.$store.state.yesNoDialog.askQuestion(n.content,"Yes","No").then(e=>{Ze.emit("yesNoRes",{yesRes:e})})):n.display_type==3?this.$store.state.messageBox.showBlockingMessage(n.content):n.display_type==4&&this.$store.state.messageBox.hideMessage(),this.chime.play()},streamMessageContent(n){if(this.discussion_id=n.discussion_id,this.setDiscussionLoading(this.discussion_id,!0),this.currentDiscussion.id==this.discussion_id){const e=this.discussionArr.findIndex(i=>i.id==n.id),t=this.discussionArr[e];if(t&&(n.message_type==this.msgTypes.MSG_TYPE_FULL||n.message_type==this.msgTypes.MSG_TYPE_FULL_INVISIBLE_TO_AI))this.isGenerating=!0,t.content=n.content,t.created_at=n.created_at,t.started_generating_at=n.started_generating_at,t.nb_tokens=n.nb_tokens,t.finished_generating_at=n.finished_generating_at;else if(t&&n.message_type==this.msgTypes.MSG_TYPE_CHUNK)this.isGenerating=!0,t.content+=n.content,t.created_at=n.created_at,t.started_generating_at=n.started_generating_at,t.nb_tokens=n.nb_tokens,t.finished_generating_at=n.finished_generating_at;else if(n.message_type==this.msgTypes.MSG_TYPE_STEP)t.status_message=n.content,t.steps.push({message:n.content,done:!0,status:!0,type:"instantanious"});else if(n.message_type==this.msgTypes.MSG_TYPE_STEP_START)t.status_message=n.content,t.steps.push({message:n.content,done:!1,status:!0,type:"start_end"});else if(n.message_type==this.msgTypes.MSG_TYPE_STEP_END){console.log("received step end",n);try{const i=t.steps.find(s=>s.message===n.content);if(i){i.done=!0;try{console.log(n.parameters);const s=n.parameters;s!=null&&(i.status=s.status,console.log(s))}catch(s){console.error("Error parsing JSON:",s.message)}}}catch{console.log("error")}}else n.message_type==this.msgTypes.MSG_TYPE_JSON_INFOS?(console.log("JSON message"),console.log(n.metadata),t.metadata=n.metadata):n.message_type==this.msgTypes.MSG_TYPE_UI?(console.log("UI message"),t.ui=n.ui,console.log(t.ui)):n.message_type==this.msgTypes.MSG_TYPE_EXCEPTION&&this.$store.state.toast.showToast(n.content,5,!1)}this.$nextTick(()=>{Ye.replace()})},async changeTitleUsingUserMSG(n,e){const t=this.list.findIndex(s=>s.id==n),i=this.list[t];e&&(i.title=e,this.tempList=this.list,await this.edit_title(n,e))},async createNewDiscussion(){this.new_discussion(null)},loadLastUsedDiscussion(){console.log("Loading last discussion");const n=localStorage.getItem("selected_discussion");if(console.log("Last discussion id: ",n),n){const e=this.list.findIndex(i=>i.id==n),t=this.list[e];t&&this.selectDiscussion(t)}},onCopyPersonalityName(n){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(n.name)},async deleteDiscussion(n){await this.delete_discussion(n),this.currentDiscussion.id==n&&(this.currentDiscussion={},this.discussionArr=[],this.setPageTitle()),this.list.splice(this.list.findIndex(e=>e.id==n),1),this.createDiscussionList(this.list)},async deleteDiscussionMulti(){const n=this.selectedDiscussions;for(let e=0;ei.id==t.id),1)}this.tempList=this.list,this.isCheckbox=!1,this.$store.state.toast.showToast("Removed ("+n.length+") items",4,!0),this.showConfirmation=!1,console.log("Multi delete done")},async deleteMessage(n){await this.delete_message(n).then(()=>{this.discussionArr.splice(this.discussionArr.findIndex(e=>e.id==n),1)}).catch(()=>{this.$store.state.toast.showToast("Could not remove message",4,!1),console.log("Error: Could not delete message")})},async editTitle(n){const e=this.list.findIndex(i=>i.id==n.id),t=this.list[e];t.title=n.title,t.loading=!0,await this.edit_title(n.id,n.title),t.loading=!1},async makeTitle(n){this.list.findIndex(e=>e.id==n.id),await this.make_title(n.id)},checkUncheckDiscussion(n,e){const t=this.list.findIndex(s=>s.id==e),i=this.list[t];i.checkBoxValue=n.target.checked,this.tempList=this.list},selectAllDiscussions(){this.isSelectAll=!this.tempList.filter(n=>n.checkBoxValue==!1).length>0;for(let n=0;n({id:t.id,title:t.title,selected:!1,loading:!1,checkBoxValue:!1})).sort(function(t,i){return i.id-t.id});this.list=e,this.tempList=e}},setDiscussionLoading(n,e){try{const t=this.list.findIndex(s=>s.id==n),i=this.list[t];i.loading=e}catch{console.log("Error setting discussion loading")}},setPageTitle(n){if(n)if(n.id){const e=n.title?n.title==="untitled"?"New discussion":n.title:"New discussion";document.title="LoLLMS WebUI - "+e}else{const e=n||"Welcome";document.title="LoLLMS WebUI - "+e}else{const e=n||"Welcome";document.title="LoLLMS WebUI - "+e}},async rankUpMessage(n){await this.message_rank_up(n).then(e=>{const t=this.discussionArr[this.discussionArr.findIndex(i=>i.id==n)];t.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank up message",4,!1),console.log("Error: Could not rank up message")})},async rankDownMessage(n){await this.message_rank_down(n).then(e=>{const t=this.discussionArr[this.discussionArr.findIndex(i=>i.id==n)];t.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank down message",4,!1),console.log("Error: Could not rank down message")})},async updateMessage(n,e,t){await this.edit_message(n,e,t).then(()=>{const i=this.discussionArr[this.discussionArr.findIndex(s=>s.id==n)];i.content=e}).catch(()=>{this.$store.state.toast.showToast("Could not update message",4,!1),console.log("Error: Could not update message")})},resendMessage(n,e,t){Ve(()=>{Ye.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Me.get("/get_generation_status",{}).then(i=>{i&&(i.data.status?(this.$store.state.toast.showToast("The server is busy. Wait",4,!1),console.log("Already generating")):Ze.emit("generate_msg_from",{prompt:e,id:n,msg_type:t}))}).catch(i=>{console.log("Error: Could not get generation status",i)})},continueMessage(n,e){Ve(()=>{Ye.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Me.get("/get_generation_status",{}).then(t=>{t&&(t.data.status?console.log("Already generating"):Ze.emit("continue_generate_msg_from",{prompt:e,id:n}))}).catch(t=>{console.log("Error: Could not get generation status",t)})},stopGenerating(){this.stop_gen(),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),console.log("Stopped generating"),Ve(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)})},finalMsgEvent(n){if(console.log("final",n),this.discussion_id=n.discussion_id,this.currentDiscussion.id==this.discussion_id){const i=this.discussionArr.findIndex(s=>s.id==n.id);this.discussionArr[i].content=n.content,this.discussionArr[i].finished_generating_at=n.finished_generating_at}Ve(()=>{const i=document.getElementById("messages-list");this.scrollBottom(i)}),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),this.chime.play();const e=this.discussionArr.findIndex(i=>i.id==n.id),t=this.discussionArr[e];t.status_message="Done"},copyToClipBoard(n){let e="";if(n.message.content&&(e=n.message.content),this.$store.state.config.copy_to_clipboard_add_all_details){let t="";n.message.binding&&(t=`Binding: ${n.message.binding}`);let i="";n.message.personality&&(i=` Personality: ${n.message.personality}`);let s="";n.created_at_parsed&&(s=` @@ -215,15 +215,15 @@ ${e} ${l}`;navigator.clipboard.writeText(d)}else navigator.clipboard.writeText(e);this.$store.state.toast.showToast("Copied to clipboard successfully",4,!0),Ve(()=>{Ye.replace()})},closeToast(){this.showToast=!1},saveJSONtoFile(n,e){e=e||"data.json";const t=document.createElement("a");t.href=URL.createObjectURL(new Blob([JSON.stringify(n,null,2)],{type:"text/plain"})),t.setAttribute("download",e),document.body.appendChild(t),t.click(),document.body.removeChild(t)},saveMarkdowntoFile(n,e){e=e||"data.md";const t=document.createElement("a");t.href=URL.createObjectURL(new Blob([n],{type:"text/plain"})),t.setAttribute("download",e),document.body.appendChild(t),t.click(),document.body.removeChild(t)},parseJsonObj(n){try{return JSON.parse(n)}catch(e){return this.$store.state.toast.showToast(`Could not parse JSON. `+e.message,4,!1),null}},async parseJsonFile(n){return new Promise((e,t)=>{const i=new FileReader;i.onload=s=>e(this.parseJsonObj(s.target.result)),i.onerror=s=>t(s),i.readAsText(n)})},async exportDiscussionsAsMarkdown(){const n=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(n.length>0){console.log("export",n);let e=new Date;const t=e.getFullYear(),i=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),d="discussions_export_"+(t+"."+i+"."+s+"."+r+o+a)+".md";this.loading=!0;const c=await this.export_multiple_discussions(n,"markdown");c?(this.saveMarkdowntoFile(c,d),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async exportDiscussionsAsJson(){const n=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(n.length>0){console.log("export",n);let e=new Date;const t=e.getFullYear(),i=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),d="discussions_export_"+(t+"."+i+"."+s+"."+r+o+a)+".json";this.loading=!0;const c=await this.export_multiple_discussions(n,"json");c?(this.saveJSONtoFile(c,d),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async importDiscussions(n){const e=await this.parseJsonFile(n.target.files[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1)},async getPersonalityAvatars(){for(;this.$store.state.personalities===null;)await new Promise(e=>setTimeout(e,100));let n=this.$store.state.personalities;this.personalityAvatars=n.map(e=>({name:e.name,avatar:e.avatar}))},getAvatar(n){if(n.toLowerCase().trim()==this.$store.state.config.user_name.toLowerCase().trim())return"user_infos/"+this.$store.state.config.user_avatar;const e=this.personalityAvatars.findIndex(i=>i.name===n),t=this.personalityAvatars[e];if(t)return console.log("Avatar",t.avatar),t.avatar},setFileListChat(n){try{this.$refs.chatBox.fileList=this.$refs.chatBox.fileList.concat(n)}catch(e){this.$store.state.toast.showToast(`Failed to set filelist in chatbox -`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(n){if(n.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(n[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){const e=(await Me.get("/get_versionID")).data.versionId;for(this.versionId!==e&&(this.$store.commit("updateVersionId",e),window.location.reload(!0)),this.$nextTick(()=>{Ye.replace()}),Ze.on("disucssion_renamed",t=>{console.log("Received new title",t.discussion_id,t.title);const i=this.list.findIndex(r=>r.id==t.discussion_id),s=this.list[i];s.title=t.title}),Ze.onclose=t=>{console.log("WebSocket connection closed:",t.code,t.reason),this.socketIODisconnected()},Ze.on("connect_error",t=>{t.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",t),this.$store.state.isConnected=!1}),Ze.onerror=t=>{console.log("WebSocket connection error:",t.code,t.reason),this.socketIODisconnected(),Ze.disconnect()},Ze.on("connected",this.socketIOConnected),Ze.on("disconnected",this.socketIODisconnected),console.log("Added events"),console.log("Waiting to be ready");this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100)),console.log(this.$store.state.ready);console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),Ze.on("show_progress",this.show_progress),Ze.on("hide_progress",this.hide_progress),Ze.on("update_progress",this.update_progress),Ze.on("notification",this.notify),Ze.on("new_message",this.new_message),Ze.on("update_message",this.streamMessageContent),Ze.on("close_message",this.finalMsgEvent),Ze.onopen=()=>{console.log("WebSocket connection established."),this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.isCreated=!0},async mounted(){Ze.on("refresh_files",()=>{this.recoverFiles()}),this.$nextTick(()=>{Ye.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(n=>setTimeout(n,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&Ve(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:wE,Message:SO,ChatBox:TO,WelcomeComponent:xO,ChoiceDialog:AE,ProgressBar:ic,InputBox:EO,SkillsLibraryViewer:vO},watch:{progress_visibility_val(n){console.log("progress_visibility changed")},filterTitle(n){n==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(n){Ve(()=>{Ye.replace()}),n||(this.isSelectAll=!1)},socketConnected(n){console.log("Websocket connected (watch)",n)},showConfirmation(){Ve(()=>{Ye.replace()})},isSearch(){Ve(()=>{Ye.replace()})}},computed:{...xk({versionId:n=>n.versionId}),progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?" v"+this.$store.state.version:""}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(n){this.$store.state.isModelOk=n}},isGenerating:{get(){return this.$store.state.isGenerating},set(n){this.$store.state.isGenerating=n}},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady:{get(){return this.$store.state.ready}},databases(){return this.$store.state.databases},client_id(){return Ze.id},isReady(){return console.log("verify ready",this.isCreated),this.isCreated},showPanel(){return this.$store.state.ready&&!this.panelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return Ve(()=>{Ye.replace()}),this.list.filter(n=>n.checkBoxValue==!0)}}},Dxt=Object.assign(Mxt,{__name:"DiscussionsView",setup(n){return qs(()=>{qO()}),Me.defaults.baseURL="/",(e,t)=>(w(),M($e,null,[Oe(ls,{name:"fade-and-fly"},{default:Je(()=>[e.isReady?q("",!0):(w(),M("div",Q0t,[u("div",X0t,[u("div",Z0t,[u("div",J0t,[eTt,u("div",tTt,[u("p",nTt,"LoLLMS "+fe(e.version_info),1),iTt,sTt])]),rTt,oTt,u("div",aTt,[Oe(ic,{ref:"loading_progress",progress:e.loading_progress},null,8,["progress"]),u("p",lTt,fe(e.loading_infos)+" ...",1)])])])]))]),_:1}),e.isReady?(w(),M("button",{key:0,onClick:t[0]||(t[0]=(...i)=>e.togglePanel&&e.togglePanel(...i)),class:"absolute top-0 left-0 z-50 p-2 m-2 bg-white rounded-full shadow-md bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-primary-light dark:hover:bg-primary"},[ne(u("div",null,dTt,512),[[Ot,e.panelCollapsed]]),ne(u("div",null,pTt,512),[[Ot,!e.panelCollapsed]])])):q("",!0),Oe(ls,{name:"slide-right"},{default:Je(()=>[e.showPanel?(w(),M("div",_Tt,[u("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:t[25]||(t[25]=Te(i=>e.setDropZoneDiscussion(),["stop","prevent"]))},[u("div",hTt,[u("div",fTt,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:t[1]||(t[1]=i=>e.createNewDiscussion())},gTt),u("button",{class:He(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:t[2]||(t[2]=i=>e.isCheckbox=!e.isCheckbox)},ETt,2),vTt,u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Export database",type:"button",onClick:t[3]||(t[3]=Te(i=>e.database_selectorDialogVisible=!0,["stop"]))},STt),u("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:t[4]||(t[4]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},null,544),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:t[5]||(t[5]=Te(i=>e.$refs.fileDialog.click(),["stop"]))},xTt),e.isOpen?(w(),M("div",CTt,[u("button",{onClick:t[6]||(t[6]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},"LOLLMS"),u("button",{onClick:t[7]||(t[7]=(...i)=>e.importChatGPT&&e.importChatGPT(...i))},"ChatGPT")])):q("",!0),u("button",{class:He(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:t[8]||(t[8]=i=>e.isSearch=!e.isSearch)},ATt,2),e.showSaveConfirmation?q("",!0):(w(),M("button",{key:1,title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:t[9]||(t[9]=i=>e.showSaveConfirmation=!0)},NTt)),e.showSaveConfirmation?(w(),M("div",OTt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:t[10]||(t[10]=Te(i=>e.showSaveConfirmation=!1,["stop"]))},MTt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:t[11]||(t[11]=Te(i=>e.save_configuration(),["stop"]))},kTt)])):q("",!0),e.loading?q("",!0):(w(),M("button",{key:3,type:"button",onClick:t[12]||(t[12]=Te((...i)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...i),["stop"])),title:"Add this discussion content to skills database",class:"w-6 hover:text-secondary duration-75 active:scale-90"},PTt)),!e.loading&&e.$store.state.config.activate_skills_lib?(w(),M("button",{key:4,type:"button",onClick:t[13]||(t[13]=Te((...i)=>e.toggleSkillsLib&&e.toggleSkillsLib(...i),["stop"])),title:"Skills database is activated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},FTt)):q("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(w(),M("button",{key:5,type:"button",onClick:t[14]||(t[14]=Te((...i)=>e.toggleSkillsLib&&e.toggleSkillsLib(...i),["stop"])),title:"Skills database is deactivated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},GTt)):q("",!0),e.loading?q("",!0):(w(),M("button",{key:6,type:"button",onClick:t[15]||(t[15]=Te((...i)=>e.showSkillsLib&&e.showSkillsLib(...i),["stop"])),title:"Skills database is deactivated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},VTt)),e.loading?(w(),M("div",HTt,YTt)):q("",!0)]),e.isSearch?(w(),M("div",$Tt,[u("div",WTt,[u("div",KTt,[jTt,u("div",QTt,[u("div",{class:He(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:t[16]||(t[16]=i=>e.filterTitle="")},ZTt,2)]),ne(u("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":t[17]||(t[17]=i=>e.filterTitle=i),onInput:t[18]||(t[18]=i=>e.filterDiscussions())},null,544),[[Pe,e.filterTitle]])])])])):q("",!0),e.isCheckbox?(w(),M("hr",JTt)):q("",!0),e.isCheckbox?(w(),M("div",ext,[u("div",txt,[e.selectedDiscussions.length>0?(w(),M("p",nxt,"Selected: "+fe(e.selectedDiscussions.length),1)):q("",!0)]),u("div",ixt,[e.selectedDiscussions.length>0?(w(),M("div",sxt,[e.showConfirmation?q("",!0):(w(),M("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:t[19]||(t[19]=Te(i=>e.showConfirmation=!0,["stop"]))},oxt)),e.showConfirmation?(w(),M("div",axt,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:t[20]||(t[20]=Te((...i)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...i),["stop"]))},cxt),u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:t[21]||(t[21]=Te(i=>e.showConfirmation=!1,["stop"]))},uxt)])):q("",!0)])):q("",!0),u("div",pxt,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:t[22]||(t[22]=Te((...i)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...i),["stop"]))},hxt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:t[23]||(t[23]=Te((...i)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...i),["stop"]))},mxt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:t[24]||(t[24]=Te((...i)=>e.selectAllDiscussions&&e.selectAllDiscussions(...i),["stop"]))},bxt)])])])):q("",!0)]),u("div",Ext,[u("div",{class:He(["mx-4 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[u("div",{id:"dis-list",class:He([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full"])},[e.list.length>0?(w(),Tt(rs,{key:0,name:"list"},{default:Je(()=>[(w(!0),M($e,null,dt(e.list,(i,s)=>(w(),Tt(wE,{key:i.id,id:i.id,title:i.title,selected:e.currentDiscussion.id==i.id,loading:i.loading,isCheckbox:e.isCheckbox,checkBoxValue:i.checkBoxValue,onSelect:r=>e.selectDiscussion(i),onDelete:r=>e.deleteDiscussion(i.id),onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):q("",!0),e.list.length<1?(w(),M("div",vxt,Sxt)):q("",!0),Txt],2)],2)])],32),u("div",{class:"absolute h-15 bottom-0 left-0 w-full bg-bg-light-panel dark:bg-bg-dark-tone light-text-panel py-4 cursor-pointer text-light-text-panel dark:text-dark-text-panel hover:text-secondary",onClick:t[26]||(t[26]=(...i)=>e.showDatabaseSelector&&e.showDatabaseSelector(...i))},[u("p",xxt,fe(e.formatted_database_name.replace("_"," ")),1)])])):q("",!0)]),_:1}),e.isReady?(w(),M("div",Cxt,[u("div",{id:"messages-list",class:He(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",e.isDragOverChat?"pointer-events-none":""])},[u("div",Rxt,[e.discussionArr.length>0?(w(),Tt(rs,{key:0,name:"list"},{default:Je(()=>[(w(!0),M($e,null,dt(e.discussionArr,(i,s)=>(w(),Tt(SO,{key:i.id,message:i,id:"msg-"+i.id,host:e.host,ref_for:!0,ref:"messages",onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(i.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128))]),_:1})):q("",!0),e.currentDiscussion.id?q("",!0):(w(),Tt(xO,{key:1})),Axt]),wxt],2),e.currentDiscussion.id?(w(),M("div",Nxt,[Oe(TO,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):q("",!0)])):q("",!0),Oe(AE,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"]),ne(u("div",Oxt,[Oe(ic,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),u("p",Ixt,fe(e.loading_infos)+" ...",1)],512),[[Ot,e.progress_visibility]]),Oe(EO,{"prompt-text":"Enter the url to the page to use as discussion support",onOk:e.addWebpage,ref:"web_url_input_box"},null,8,["onOk"]),Oe(vO,{ref:"skills_lib"},null,512)],64))}}),kxt=bt(Dxt,[["__scopeId","data-v-f5c78cc1"]]);/** +`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(n){if(n.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(n[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){const e=(await Me.get("/get_versionID")).data.versionId;for(this.versionId!==e&&(this.$store.commit("updateVersionId",e),window.location.reload(!0)),this.$nextTick(()=>{Ye.replace()}),Ze.on("disucssion_renamed",t=>{console.log("Received new title",t.discussion_id,t.title);const i=this.list.findIndex(r=>r.id==t.discussion_id),s=this.list[i];s.title=t.title}),Ze.onclose=t=>{console.log("WebSocket connection closed:",t.code,t.reason),this.socketIODisconnected()},Ze.on("connect_error",t=>{t.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",t),this.$store.state.isConnected=!1}),Ze.onerror=t=>{console.log("WebSocket connection error:",t.code,t.reason),this.socketIODisconnected(),Ze.disconnect()},Ze.on("connected",this.socketIOConnected),Ze.on("disconnected",this.socketIODisconnected),console.log("Added events"),console.log("Waiting to be ready");this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100)),console.log(this.$store.state.ready);console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),Ze.on("show_progress",this.show_progress),Ze.on("hide_progress",this.hide_progress),Ze.on("update_progress",this.update_progress),Ze.on("notification",this.notify),Ze.on("new_message",this.new_message),Ze.on("update_message",this.streamMessageContent),Ze.on("close_message",this.finalMsgEvent),Ze.onopen=()=>{console.log("WebSocket connection established."),this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.isCreated=!0},async mounted(){Ze.on("refresh_files",()=>{this.recoverFiles()}),this.$nextTick(()=>{Ye.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(n=>setTimeout(n,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&Ve(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:wE,Message:SO,ChatBox:TO,WelcomeComponent:xO,ChoiceDialog:AE,ProgressBar:ic,InputBox:EO,SkillsLibraryViewer:vO},watch:{progress_visibility_val(n){console.log("progress_visibility changed")},filterTitle(n){n==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(n){Ve(()=>{Ye.replace()}),n||(this.isSelectAll=!1)},socketConnected(n){console.log("Websocket connected (watch)",n)},showConfirmation(){Ve(()=>{Ye.replace()})},isSearch(){Ve(()=>{Ye.replace()})}},computed:{...xk({versionId:n=>n.versionId}),progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?" v"+this.$store.state.version:""}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(n){this.$store.state.isModelOk=n}},isGenerating:{get(){return this.$store.state.isGenerating},set(n){this.$store.state.isGenerating=n}},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady:{get(){return this.$store.state.ready}},databases(){return this.$store.state.databases},client_id(){return Ze.id},isReady(){return console.log("verify ready",this.isCreated),this.isCreated},showPanel(){return this.$store.state.ready&&!this.panelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return Ve(()=>{Ye.replace()}),this.list.filter(n=>n.checkBoxValue==!0)}}},Lxt=Object.assign(kxt,{__name:"DiscussionsView",setup(n){return qs(()=>{qO()}),Me.defaults.baseURL="/",(e,t)=>(w(),M($e,null,[Oe(ls,{name:"fade-and-fly"},{default:Je(()=>[e.isReady?q("",!0):(w(),M("div",Z0t,[u("div",J0t,[u("div",eTt,[u("div",tTt,[nTt,u("div",iTt,[u("p",sTt,"LoLLMS "+fe(e.version_info),1),rTt,oTt])]),aTt,lTt,u("div",cTt,[Oe(ic,{ref:"loading_progress",progress:e.loading_progress},null,8,["progress"]),u("p",dTt,fe(e.loading_infos)+" ...",1)])])])]))]),_:1}),e.isReady?(w(),M("button",{key:0,onClick:t[0]||(t[0]=(...i)=>e.togglePanel&&e.togglePanel(...i)),class:"absolute top-0 left-0 z-50 p-2 m-2 bg-white rounded-full shadow-md bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-primary-light dark:hover:bg-primary"},[ne(u("div",null,pTt,512),[[Ot,e.panelCollapsed]]),ne(u("div",null,hTt,512),[[Ot,!e.panelCollapsed]])])):q("",!0),Oe(ls,{name:"slide-right"},{default:Je(()=>[e.showPanel?(w(),M("div",fTt,[u("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:t[25]||(t[25]=Te(i=>e.setDropZoneDiscussion(),["stop","prevent"]))},[u("div",mTt,[u("div",gTt,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:t[1]||(t[1]=i=>e.createNewDiscussion())},ETt),u("button",{class:He(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:t[2]||(t[2]=i=>e.isCheckbox=!e.isCheckbox)},yTt,2),STt,u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Export database",type:"button",onClick:t[3]||(t[3]=Te(i=>e.database_selectorDialogVisible=!0,["stop"]))},xTt),u("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:t[4]||(t[4]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},null,544),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:t[5]||(t[5]=Te(i=>e.$refs.fileDialog.click(),["stop"]))},RTt),e.isOpen?(w(),M("div",ATt,[u("button",{onClick:t[6]||(t[6]=(...i)=>e.importDiscussions&&e.importDiscussions(...i))},"LOLLMS"),u("button",{onClick:t[7]||(t[7]=(...i)=>e.importChatGPT&&e.importChatGPT(...i))},"ChatGPT")])):q("",!0),u("button",{class:He(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:t[8]||(t[8]=i=>e.isSearch=!e.isSearch)},NTt,2),e.showSaveConfirmation?q("",!0):(w(),M("button",{key:1,title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:t[9]||(t[9]=i=>e.showSaveConfirmation=!0)},ITt)),e.showSaveConfirmation?(w(),M("div",MTt,[u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:t[10]||(t[10]=Te(i=>e.showSaveConfirmation=!1,["stop"]))},kTt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:t[11]||(t[11]=Te(i=>e.save_configuration(),["stop"]))},PTt)])):q("",!0),e.loading?q("",!0):(w(),M("button",{key:3,type:"button",onClick:t[12]||(t[12]=Te((...i)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...i),["stop"])),title:"Add this discussion content to skills database",class:"w-6 hover:text-secondary duration-75 active:scale-90"},FTt)),!e.loading&&e.$store.state.config.activate_skills_lib?(w(),M("button",{key:4,type:"button",onClick:t[13]||(t[13]=Te((...i)=>e.toggleSkillsLib&&e.toggleSkillsLib(...i),["stop"])),title:"Skills database is activated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},GTt)):q("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(w(),M("button",{key:5,type:"button",onClick:t[14]||(t[14]=Te((...i)=>e.toggleSkillsLib&&e.toggleSkillsLib(...i),["stop"])),title:"Skills database is deactivated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},VTt)):q("",!0),e.loading?q("",!0):(w(),M("button",{key:6,type:"button",onClick:t[15]||(t[15]=Te((...i)=>e.showSkillsLib&&e.showSkillsLib(...i),["stop"])),title:"Skills database is deactivated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},qTt)),e.loading?(w(),M("div",YTt,WTt)):q("",!0)]),e.isSearch?(w(),M("div",KTt,[u("div",jTt,[u("div",QTt,[XTt,u("div",ZTt,[u("div",{class:He(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:t[16]||(t[16]=i=>e.filterTitle="")},ext,2)]),ne(u("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":t[17]||(t[17]=i=>e.filterTitle=i),onInput:t[18]||(t[18]=i=>e.filterDiscussions())},null,544),[[Pe,e.filterTitle]])])])])):q("",!0),e.isCheckbox?(w(),M("hr",txt)):q("",!0),e.isCheckbox?(w(),M("div",nxt,[u("div",ixt,[e.selectedDiscussions.length>0?(w(),M("p",sxt,"Selected: "+fe(e.selectedDiscussions.length),1)):q("",!0)]),u("div",rxt,[e.selectedDiscussions.length>0?(w(),M("div",oxt,[e.showConfirmation?q("",!0):(w(),M("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:t[19]||(t[19]=Te(i=>e.showConfirmation=!0,["stop"]))},lxt)),e.showConfirmation?(w(),M("div",cxt,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:t[20]||(t[20]=Te((...i)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...i),["stop"]))},uxt),u("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:t[21]||(t[21]=Te(i=>e.showConfirmation=!1,["stop"]))},_xt)])):q("",!0)])):q("",!0),u("div",hxt,[u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:t[22]||(t[22]=Te((...i)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...i),["stop"]))},mxt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:t[23]||(t[23]=Te((...i)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...i),["stop"]))},bxt),u("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:t[24]||(t[24]=Te((...i)=>e.selectAllDiscussions&&e.selectAllDiscussions(...i),["stop"]))},vxt)])])])):q("",!0)]),u("div",yxt,[u("div",{class:He(["mx-4 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[u("div",{id:"dis-list",class:He([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full"])},[e.list.length>0?(w(),Tt(rs,{key:0,name:"list"},{default:Je(()=>[(w(!0),M($e,null,dt(e.list,(i,s)=>(w(),Tt(wE,{key:i.id,id:i.id,title:i.title,selected:e.currentDiscussion.id==i.id,loading:i.loading,isCheckbox:e.isCheckbox,checkBoxValue:i.checkBoxValue,onSelect:r=>e.selectDiscussion(i),onDelete:r=>e.deleteDiscussion(i.id),onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):q("",!0),e.list.length<1?(w(),M("div",Sxt,xxt)):q("",!0),Cxt],2)],2)])],32),u("div",{class:"absolute h-15 bottom-0 left-0 w-full bg-bg-light-panel dark:bg-bg-dark-tone light-text-panel py-4 cursor-pointer text-light-text-panel dark:text-dark-text-panel hover:text-secondary",onClick:t[26]||(t[26]=(...i)=>e.showDatabaseSelector&&e.showDatabaseSelector(...i))},[u("p",Rxt,fe(e.formatted_database_name.replace("_"," ")),1)])])):q("",!0)]),_:1}),e.isReady?(w(),M("div",Axt,[u("div",{id:"messages-list",class:He(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",e.isDragOverChat?"pointer-events-none":""])},[u("div",wxt,[e.discussionArr.length>0?(w(),Tt(rs,{key:0,name:"list"},{default:Je(()=>[(w(!0),M($e,null,dt(e.discussionArr,(i,s)=>(w(),Tt(SO,{key:i.id,message:i,id:"msg-"+i.id,host:e.host,ref_for:!0,ref:"messages",onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(i.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128))]),_:1})):q("",!0),e.currentDiscussion.id?q("",!0):(w(),Tt(xO,{key:1})),Nxt]),Oxt],2),e.currentDiscussion.id?(w(),M("div",Ixt,[Oe(TO,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):q("",!0)])):q("",!0),Oe(AE,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"]),ne(u("div",Mxt,[Oe(ic,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),u("p",Dxt,fe(e.loading_infos)+" ...",1)],512),[[Ot,e.progress_visibility]]),Oe(EO,{"prompt-text":"Enter the url to the page to use as discussion support",onOk:e.addWebpage,ref:"web_url_input_box"},null,8,["onOk"]),Oe(vO,{ref:"skills_lib"},null,512)],64))}}),Pxt=bt(Lxt,[["__scopeId","data-v-f5c78cc1"]]);/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const jE="159",Lxt=0,HC=1,Pxt=2,YO=1,Uxt=2,Is=3,Vs=0,Zn=1,Ji=2,Sr=0,aa=1,qC=2,YC=3,$C=4,Fxt=5,Jr=100,Bxt=101,Gxt=102,WC=103,KC=104,zxt=200,Vxt=201,Hxt=202,qxt=203,ab=204,lb=205,Yxt=206,$xt=207,Wxt=208,Kxt=209,jxt=210,Qxt=211,Xxt=212,Zxt=213,Jxt=214,eCt=0,tCt=1,nCt=2,mu=3,iCt=4,sCt=5,rCt=6,oCt=7,QE=0,aCt=1,lCt=2,Tr=0,cCt=1,dCt=2,uCt=3,pCt=4,_Ct=5,jC="attached",hCt="detached",$O=300,xa=301,Ca=302,cb=303,db=304,up=306,Ra=1e3,gi=1001,gu=1002,En=1003,ub=1004,Vd=1005,jn=1006,WO=1007,go=1008,xr=1009,fCt=1010,mCt=1011,XE=1012,KO=1013,br=1014,ks=1015,oc=1016,jO=1017,QO=1018,lo=1020,gCt=1021,bi=1023,bCt=1024,ECt=1025,co=1026,Aa=1027,vCt=1028,XO=1029,yCt=1030,ZO=1031,JO=1033,Bm=33776,Gm=33777,zm=33778,Vm=33779,QC=35840,XC=35841,ZC=35842,JC=35843,eI=36196,e1=37492,t1=37496,n1=37808,i1=37809,s1=37810,r1=37811,o1=37812,a1=37813,l1=37814,c1=37815,d1=37816,u1=37817,p1=37818,_1=37819,h1=37820,f1=37821,Hm=36492,m1=36494,g1=36495,SCt=36283,b1=36284,E1=36285,v1=36286,ac=2300,wa=2301,qm=2302,y1=2400,S1=2401,T1=2402,TCt=2500,xCt=0,tI=1,pb=2,nI=3e3,uo=3001,CCt=3200,RCt=3201,ZE=0,ACt=1,Ei="",rn="srgb",Nn="srgb-linear",JE="display-p3",pp="display-p3-linear",bu="linear",Xt="srgb",Eu="rec709",vu="p3",Oo=7680,x1=519,wCt=512,NCt=513,OCt=514,iI=515,ICt=516,MCt=517,DCt=518,kCt=519,_b=35044,C1="300 es",hb=1035,Ls=2e3,yu=2001;class ja{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const s=this._listeners[e];if(s!==void 0){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const s=i.slice(0);for(let r=0,o=s.length;r>8&255]+In[n>>16&255]+In[n>>24&255]+"-"+In[e&255]+In[e>>8&255]+"-"+In[e>>16&15|64]+In[e>>24&255]+"-"+In[t&63|128]+In[t>>8&255]+"-"+In[t>>16&255]+In[t>>24&255]+In[i&255]+In[i>>8&255]+In[i>>16&255]+In[i>>24&255]).toLowerCase()}function kn(n,e,t){return Math.max(e,Math.min(t,n))}function ev(n,e){return(n%e+e)%e}function LCt(n,e,t,i,s){return i+(n-e)*(s-i)/(t-e)}function PCt(n,e,t){return n!==e?(t-n)/(e-n):0}function Bl(n,e,t){return(1-t)*n+t*e}function UCt(n,e,t,i){return Bl(n,e,1-Math.exp(-t*i))}function FCt(n,e=1){return e-Math.abs(ev(n,e*2)-e)}function BCt(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function GCt(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function zCt(n,e){return n+Math.floor(Math.random()*(e-n+1))}function VCt(n,e){return n+Math.random()*(e-n)}function HCt(n){return n*(.5-Math.random())}function qCt(n){n!==void 0&&(R1=n);let e=R1+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function YCt(n){return n*Fl}function $Ct(n){return n*Na}function fb(n){return(n&n-1)===0&&n!==0}function WCt(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function Su(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function KCt(n,e,t,i,s){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),d=r((e+i)/2),c=o((e+i)/2),_=r((e-i)/2),f=o((e-i)/2),m=r((i-e)/2),h=o((i-e)/2);switch(s){case"XYX":n.set(a*c,l*_,l*f,a*d);break;case"YZY":n.set(l*f,a*c,l*_,a*d);break;case"ZXZ":n.set(l*_,l*f,a*c,a*d);break;case"XZX":n.set(a*c,l*h,l*m,a*d);break;case"YXY":n.set(l*m,a*c,l*h,a*d);break;case"ZYZ":n.set(l*h,l*m,a*c,a*d);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function es(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Ht(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const jCt={DEG2RAD:Fl,RAD2DEG:Na,generateUUID:zi,clamp:kn,euclideanModulo:ev,mapLinear:LCt,inverseLerp:PCt,lerp:Bl,damp:UCt,pingpong:FCt,smoothstep:BCt,smootherstep:GCt,randInt:zCt,randFloat:VCt,randFloatSpread:HCt,seededRandom:qCt,degToRad:YCt,radToDeg:$Ct,isPowerOfTwo:fb,ceilPowerOfTwo:WCt,floorPowerOfTwo:Su,setQuaternionFromProperEuler:KCt,normalize:Ht,denormalize:es};class Mt{constructor(e=0,t=0){Mt.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6],this.y=s[1]*t+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(kn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),s=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Rt{constructor(e,t,i,s,r,o,a,l,d){Rt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,d)}set(e,t,i,s,r,o,a,l,d){const c=this.elements;return c[0]=e,c[1]=s,c[2]=a,c[3]=t,c[4]=r,c[5]=l,c[6]=i,c[7]=o,c[8]=d,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[3],l=i[6],d=i[1],c=i[4],_=i[7],f=i[2],m=i[5],h=i[8],E=s[0],b=s[3],g=s[6],v=s[1],y=s[4],T=s[7],C=s[2],x=s[5],O=s[8];return r[0]=o*E+a*v+l*C,r[3]=o*b+a*y+l*x,r[6]=o*g+a*T+l*O,r[1]=d*E+c*v+_*C,r[4]=d*b+c*y+_*x,r[7]=d*g+c*T+_*O,r[2]=f*E+m*v+h*C,r[5]=f*b+m*y+h*x,r[8]=f*g+m*T+h*O,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],d=e[7],c=e[8];return t*o*c-t*a*d-i*r*c+i*a*l+s*r*d-s*o*l}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],d=e[7],c=e[8],_=c*o-a*d,f=a*l-c*r,m=d*r-o*l,h=t*_+i*f+s*m;if(h===0)return this.set(0,0,0,0,0,0,0,0,0);const E=1/h;return e[0]=_*E,e[1]=(s*d-c*i)*E,e[2]=(a*i-s*o)*E,e[3]=f*E,e[4]=(c*t-s*l)*E,e[5]=(s*r-a*t)*E,e[6]=m*E,e[7]=(i*l-d*t)*E,e[8]=(o*t-i*r)*E,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,s,r,o,a){const l=Math.cos(r),d=Math.sin(r);return this.set(i*l,i*d,-i*(l*o+d*a)+o+e,-s*d,s*l,-s*(-d*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Ym.makeScale(e,t)),this}rotate(e){return this.premultiply(Ym.makeRotation(-e)),this}translate(e,t){return this.premultiply(Ym.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<9;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Ym=new Rt;function sI(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function lc(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function QCt(){const n=lc("canvas");return n.style.display="block",n}const A1={};function Gl(n){n in A1||(A1[n]=!0,console.warn(n))}const w1=new Rt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),N1=new Rt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Jc={[Nn]:{transfer:bu,primaries:Eu,toReference:n=>n,fromReference:n=>n},[rn]:{transfer:Xt,primaries:Eu,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[pp]:{transfer:bu,primaries:vu,toReference:n=>n.applyMatrix3(N1),fromReference:n=>n.applyMatrix3(w1)},[JE]:{transfer:Xt,primaries:vu,toReference:n=>n.convertSRGBToLinear().applyMatrix3(N1),fromReference:n=>n.applyMatrix3(w1).convertLinearToSRGB()}},XCt=new Set([Nn,pp]),Bt={enabled:!0,_workingColorSpace:Nn,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(n){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!n},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!XCt.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=Jc[e].toReference,s=Jc[t].fromReference;return s(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return Jc[n].primaries},getTransfer:function(n){return n===Ei?bu:Jc[n].transfer}};function la(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function $m(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Io;class rI{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Io===void 0&&(Io=lc("canvas")),Io.width=e.width,Io.height=e.height;const i=Io.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Io}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=lc("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),r=s.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==$O)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Ra:e.x=e.x-Math.floor(e.x);break;case gi:e.x=e.x<0?0:1;break;case gu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Ra:e.y=e.y-Math.floor(e.y);break;case gi:e.y=e.y<0?0:1;break;case gu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Gl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===rn?uo:nI}set encoding(e){Gl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===uo?rn:Ei}}wn.DEFAULT_IMAGE=null;wn.DEFAULT_MAPPING=$O;wn.DEFAULT_ANISOTROPY=1;class Wt{constructor(e=0,t=0,i=0,s=1){Wt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,s){return this.x=e,this.y=t,this.z=i,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*t+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*t+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*t+o[7]*i+o[11]*s+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,s,r;const l=e.elements,d=l[0],c=l[4],_=l[8],f=l[1],m=l[5],h=l[9],E=l[2],b=l[6],g=l[10];if(Math.abs(c-f)<.01&&Math.abs(_-E)<.01&&Math.abs(h-b)<.01){if(Math.abs(c+f)<.1&&Math.abs(_+E)<.1&&Math.abs(h+b)<.1&&Math.abs(d+m+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const y=(d+1)/2,T=(m+1)/2,C=(g+1)/2,x=(c+f)/4,O=(_+E)/4,R=(h+b)/4;return y>T&&y>C?y<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(y),s=x/i,r=O/i):T>C?T<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(T),i=x/s,r=R/s):C<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(C),i=O/r,s=R/r),this.set(i,s,r,t),this}let v=Math.sqrt((b-h)*(b-h)+(_-E)*(_-E)+(f-c)*(f-c));return Math.abs(v)<.001&&(v=1),this.x=(b-h)/v,this.y=(_-E)/v,this.z=(f-c)/v,this.w=Math.acos((d+m+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class e1t extends ja{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Wt(0,0,e,t),this.scissorTest=!1,this.viewport=new Wt(0,0,e,t);const s={width:e,height:t,depth:1};i.encoding!==void 0&&(Gl("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===uo?rn:Ei),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new wn(s,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new oI(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class bo extends e1t{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class aI extends wn{constructor(e=null,t=1,i=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:s},this.magFilter=En,this.minFilter=En,this.wrapR=gi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class t1t extends wn{constructor(e=null,t=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:s},this.magFilter=En,this.minFilter=En,this.wrapR=gi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Dr{constructor(e=0,t=0,i=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=s}static slerpFlat(e,t,i,s,r,o,a){let l=i[s+0],d=i[s+1],c=i[s+2],_=i[s+3];const f=r[o+0],m=r[o+1],h=r[o+2],E=r[o+3];if(a===0){e[t+0]=l,e[t+1]=d,e[t+2]=c,e[t+3]=_;return}if(a===1){e[t+0]=f,e[t+1]=m,e[t+2]=h,e[t+3]=E;return}if(_!==E||l!==f||d!==m||c!==h){let b=1-a;const g=l*f+d*m+c*h+_*E,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){const C=Math.sqrt(y),x=Math.atan2(C,g*v);b=Math.sin(b*x)/C,a=Math.sin(a*x)/C}const T=a*v;if(l=l*b+f*T,d=d*b+m*T,c=c*b+h*T,_=_*b+E*T,b===1-a){const C=1/Math.sqrt(l*l+d*d+c*c+_*_);l*=C,d*=C,c*=C,_*=C}}e[t]=l,e[t+1]=d,e[t+2]=c,e[t+3]=_}static multiplyQuaternionsFlat(e,t,i,s,r,o){const a=i[s],l=i[s+1],d=i[s+2],c=i[s+3],_=r[o],f=r[o+1],m=r[o+2],h=r[o+3];return e[t]=a*h+c*_+l*m-d*f,e[t+1]=l*h+c*f+d*_-a*m,e[t+2]=d*h+c*m+a*f-l*_,e[t+3]=c*h-a*_-l*f-d*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,s){return this._x=e,this._y=t,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const i=e._x,s=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,d=a(i/2),c=a(s/2),_=a(r/2),f=l(i/2),m=l(s/2),h=l(r/2);switch(o){case"XYZ":this._x=f*c*_+d*m*h,this._y=d*m*_-f*c*h,this._z=d*c*h+f*m*_,this._w=d*c*_-f*m*h;break;case"YXZ":this._x=f*c*_+d*m*h,this._y=d*m*_-f*c*h,this._z=d*c*h-f*m*_,this._w=d*c*_+f*m*h;break;case"ZXY":this._x=f*c*_-d*m*h,this._y=d*m*_+f*c*h,this._z=d*c*h+f*m*_,this._w=d*c*_-f*m*h;break;case"ZYX":this._x=f*c*_-d*m*h,this._y=d*m*_+f*c*h,this._z=d*c*h-f*m*_,this._w=d*c*_+f*m*h;break;case"YZX":this._x=f*c*_+d*m*h,this._y=d*m*_+f*c*h,this._z=d*c*h-f*m*_,this._w=d*c*_-f*m*h;break;case"XZY":this._x=f*c*_-d*m*h,this._y=d*m*_-f*c*h,this._z=d*c*h+f*m*_,this._w=d*c*_+f*m*h;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],s=t[4],r=t[8],o=t[1],a=t[5],l=t[9],d=t[2],c=t[6],_=t[10],f=i+a+_;if(f>0){const m=.5/Math.sqrt(f+1);this._w=.25/m,this._x=(c-l)*m,this._y=(r-d)*m,this._z=(o-s)*m}else if(i>a&&i>_){const m=2*Math.sqrt(1+i-a-_);this._w=(c-l)/m,this._x=.25*m,this._y=(s+o)/m,this._z=(r+d)/m}else if(a>_){const m=2*Math.sqrt(1+a-i-_);this._w=(r-d)/m,this._x=(s+o)/m,this._y=.25*m,this._z=(l+c)/m}else{const m=2*Math.sqrt(1+_-i-a);this._w=(o-s)/m,this._x=(r+d)/m,this._y=(l+c)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(kn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,t/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,s=e._y,r=e._z,o=e._w,a=t._x,l=t._y,d=t._z,c=t._w;return this._x=i*c+o*a+s*d-r*l,this._y=s*c+o*l+r*a-i*d,this._z=r*c+o*d+i*l-s*a,this._w=o*c-i*a-s*l-r*d,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-t;return this._w=m*o+t*this._w,this._x=m*i+t*this._x,this._y=m*s+t*this._y,this._z=m*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const d=Math.sqrt(l),c=Math.atan2(d,a),_=Math.sin((1-t)*c)/d,f=Math.sin(t*c)/d;return this._w=o*_+this._w*f,this._x=i*_+this._x*f,this._y=s*_+this._y*f,this._z=r*_+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),s=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(s),i*Math.sin(r),i*Math.cos(r),t*Math.sin(s))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class be{constructor(e=0,t=0,i=0){be.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(O1.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(O1.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*s,this.y=r[1]*t+r[4]*i+r[7]*s,this.z=r[2]*t+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*t+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*t+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*t+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,d=2*(o*s-a*i),c=2*(a*t-r*s),_=2*(r*i-o*t);return this.x=t+l*d+o*_-a*c,this.y=i+l*c+a*d-r*_,this.z=s+l*_+r*c-o*d,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*s,this.y=r[1]*t+r[5]*i+r[9]*s,this.z=r[2]*t+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,s=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Km.copy(this).projectOnVector(e),this.sub(Km)}reflect(e){return this.sub(Km.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(kn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return t*t+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const s=Math.sin(t)*e;return this.x=s*Math.sin(i),this.y=Math.cos(t)*e,this.z=s*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Km=new be,O1=new Dr;class Ks{constructor(e=new be(1/0,1/0,1/0),t=new be(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Ii),Ii.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ml),td.subVectors(this.max,ml),Mo.subVectors(e.a,ml),Do.subVectors(e.b,ml),ko.subVectors(e.c,ml),er.subVectors(Do,Mo),tr.subVectors(ko,Do),Gr.subVectors(Mo,ko);let t=[0,-er.z,er.y,0,-tr.z,tr.y,0,-Gr.z,Gr.y,er.z,0,-er.x,tr.z,0,-tr.x,Gr.z,0,-Gr.x,-er.y,er.x,0,-tr.y,tr.x,0,-Gr.y,Gr.x,0];return!jm(t,Mo,Do,ko,td)||(t=[1,0,0,0,1,0,0,0,1],!jm(t,Mo,Do,ko,td))?!1:(nd.crossVectors(er,tr),t=[nd.x,nd.y,nd.z],jm(t,Mo,Do,ko,td))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ii).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ii).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(xs[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),xs[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),xs[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),xs[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),xs[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),xs[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),xs[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),xs[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(xs),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const xs=[new be,new be,new be,new be,new be,new be,new be,new be],Ii=new be,ed=new Ks,Mo=new be,Do=new be,ko=new be,er=new be,tr=new be,Gr=new be,ml=new be,td=new be,nd=new be,zr=new be;function jm(n,e,t,i,s){for(let r=0,o=n.length-3;r<=o;r+=3){zr.fromArray(n,r);const a=s.x*Math.abs(zr.x)+s.y*Math.abs(zr.y)+s.z*Math.abs(zr.z),l=e.dot(zr),d=t.dot(zr),c=i.dot(zr);if(Math.max(-Math.max(l,d,c),Math.min(l,d,c))>a)return!1}return!0}const n1t=new Ks,gl=new be,Qm=new be;class hs{constructor(e=new be,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):n1t.setFromPoints(e).getCenter(i);let s=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;gl.subVectors(e,this.center);const t=gl.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),s=(i-this.radius)*.5;this.center.addScaledVector(gl,s/i),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Qm.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(gl.copy(e.center).add(Qm)),this.expandByPoint(gl.copy(e.center).sub(Qm))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Cs=new be,Xm=new be,id=new be,nr=new be,Zm=new be,sd=new be,Jm=new be;class _p{constructor(e=new be,t=new be(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Cs)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Cs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Cs.copy(this.origin).addScaledVector(this.direction,t),Cs.distanceToSquared(e))}distanceSqToSegment(e,t,i,s){Xm.copy(e).add(t).multiplyScalar(.5),id.copy(t).sub(e).normalize(),nr.copy(this.origin).sub(Xm);const r=e.distanceTo(t)*.5,o=-this.direction.dot(id),a=nr.dot(this.direction),l=-nr.dot(id),d=nr.lengthSq(),c=Math.abs(1-o*o);let _,f,m,h;if(c>0)if(_=o*l-a,f=o*a-l,h=r*c,_>=0)if(f>=-h)if(f<=h){const E=1/c;_*=E,f*=E,m=_*(_+o*f+2*a)+f*(o*_+f+2*l)+d}else f=r,_=Math.max(0,-(o*f+a)),m=-_*_+f*(f+2*l)+d;else f=-r,_=Math.max(0,-(o*f+a)),m=-_*_+f*(f+2*l)+d;else f<=-h?(_=Math.max(0,-(-o*r+a)),f=_>0?-r:Math.min(Math.max(-r,-l),r),m=-_*_+f*(f+2*l)+d):f<=h?(_=0,f=Math.min(Math.max(-r,-l),r),m=f*(f+2*l)+d):(_=Math.max(0,-(o*r+a)),f=_>0?r:Math.min(Math.max(-r,-l),r),m=-_*_+f*(f+2*l)+d);else f=o>0?-r:r,_=Math.max(0,-(o*f+a)),m=-_*_+f*(f+2*l)+d;return i&&i.copy(this.origin).addScaledVector(this.direction,_),s&&s.copy(Xm).addScaledVector(id,f),m}intersectSphere(e,t){Cs.subVectors(e.center,this.origin);const i=Cs.dot(this.direction),s=Cs.dot(Cs)-i*i,r=e.radius*e.radius;if(s>r)return null;const o=Math.sqrt(r-s),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,s,r,o,a,l;const d=1/this.direction.x,c=1/this.direction.y,_=1/this.direction.z,f=this.origin;return d>=0?(i=(e.min.x-f.x)*d,s=(e.max.x-f.x)*d):(i=(e.max.x-f.x)*d,s=(e.min.x-f.x)*d),c>=0?(r=(e.min.y-f.y)*c,o=(e.max.y-f.y)*c):(r=(e.max.y-f.y)*c,o=(e.min.y-f.y)*c),i>o||r>s||((r>i||isNaN(i))&&(i=r),(o=0?(a=(e.min.z-f.z)*_,l=(e.max.z-f.z)*_):(a=(e.max.z-f.z)*_,l=(e.min.z-f.z)*_),i>l||a>s)||((a>i||i!==i)&&(i=a),(l=0?i:s,t)}intersectsBox(e){return this.intersectBox(e,Cs)!==null}intersectTriangle(e,t,i,s,r){Zm.subVectors(t,e),sd.subVectors(i,e),Jm.crossVectors(Zm,sd);let o=this.direction.dot(Jm),a;if(o>0){if(s)return null;a=1}else if(o<0)a=-1,o=-o;else return null;nr.subVectors(this.origin,e);const l=a*this.direction.dot(sd.crossVectors(nr,sd));if(l<0)return null;const d=a*this.direction.dot(Zm.cross(nr));if(d<0||l+d>o)return null;const c=-a*nr.dot(Jm);return c<0?null:this.at(c/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class At{constructor(e,t,i,s,r,o,a,l,d,c,_,f,m,h,E,b){At.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,d,c,_,f,m,h,E,b)}set(e,t,i,s,r,o,a,l,d,c,_,f,m,h,E,b){const g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=s,g[1]=r,g[5]=o,g[9]=a,g[13]=l,g[2]=d,g[6]=c,g[10]=_,g[14]=f,g[3]=m,g[7]=h,g[11]=E,g[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new At().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,s=1/Lo.setFromMatrixColumn(e,0).length(),r=1/Lo.setFromMatrixColumn(e,1).length(),o=1/Lo.setFromMatrixColumn(e,2).length();return t[0]=i[0]*s,t[1]=i[1]*s,t[2]=i[2]*s,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,s=e.y,r=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),d=Math.sin(s),c=Math.cos(r),_=Math.sin(r);if(e.order==="XYZ"){const f=o*c,m=o*_,h=a*c,E=a*_;t[0]=l*c,t[4]=-l*_,t[8]=d,t[1]=m+h*d,t[5]=f-E*d,t[9]=-a*l,t[2]=E-f*d,t[6]=h+m*d,t[10]=o*l}else if(e.order==="YXZ"){const f=l*c,m=l*_,h=d*c,E=d*_;t[0]=f+E*a,t[4]=h*a-m,t[8]=o*d,t[1]=o*_,t[5]=o*c,t[9]=-a,t[2]=m*a-h,t[6]=E+f*a,t[10]=o*l}else if(e.order==="ZXY"){const f=l*c,m=l*_,h=d*c,E=d*_;t[0]=f-E*a,t[4]=-o*_,t[8]=h+m*a,t[1]=m+h*a,t[5]=o*c,t[9]=E-f*a,t[2]=-o*d,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const f=o*c,m=o*_,h=a*c,E=a*_;t[0]=l*c,t[4]=h*d-m,t[8]=f*d+E,t[1]=l*_,t[5]=E*d+f,t[9]=m*d-h,t[2]=-d,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const f=o*l,m=o*d,h=a*l,E=a*d;t[0]=l*c,t[4]=E-f*_,t[8]=h*_+m,t[1]=_,t[5]=o*c,t[9]=-a*c,t[2]=-d*c,t[6]=m*_+h,t[10]=f-E*_}else if(e.order==="XZY"){const f=o*l,m=o*d,h=a*l,E=a*d;t[0]=l*c,t[4]=-_,t[8]=d*c,t[1]=f*_+E,t[5]=o*c,t[9]=m*_-h,t[2]=h*_-m,t[6]=a*c,t[10]=E*_+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(i1t,e,s1t)}lookAt(e,t,i){const s=this.elements;return ii.subVectors(e,t),ii.lengthSq()===0&&(ii.z=1),ii.normalize(),ir.crossVectors(i,ii),ir.lengthSq()===0&&(Math.abs(i.z)===1?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),ir.crossVectors(i,ii)),ir.normalize(),rd.crossVectors(ii,ir),s[0]=ir.x,s[4]=rd.x,s[8]=ii.x,s[1]=ir.y,s[5]=rd.y,s[9]=ii.y,s[2]=ir.z,s[6]=rd.z,s[10]=ii.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[4],l=i[8],d=i[12],c=i[1],_=i[5],f=i[9],m=i[13],h=i[2],E=i[6],b=i[10],g=i[14],v=i[3],y=i[7],T=i[11],C=i[15],x=s[0],O=s[4],R=s[8],S=s[12],A=s[1],U=s[5],F=s[9],K=s[13],L=s[2],H=s[6],G=s[10],P=s[14],j=s[3],Y=s[7],Q=s[11],ae=s[15];return r[0]=o*x+a*A+l*L+d*j,r[4]=o*O+a*U+l*H+d*Y,r[8]=o*R+a*F+l*G+d*Q,r[12]=o*S+a*K+l*P+d*ae,r[1]=c*x+_*A+f*L+m*j,r[5]=c*O+_*U+f*H+m*Y,r[9]=c*R+_*F+f*G+m*Q,r[13]=c*S+_*K+f*P+m*ae,r[2]=h*x+E*A+b*L+g*j,r[6]=h*O+E*U+b*H+g*Y,r[10]=h*R+E*F+b*G+g*Q,r[14]=h*S+E*K+b*P+g*ae,r[3]=v*x+y*A+T*L+C*j,r[7]=v*O+y*U+T*H+C*Y,r[11]=v*R+y*F+T*G+C*Q,r[15]=v*S+y*K+T*P+C*ae,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],d=e[13],c=e[2],_=e[6],f=e[10],m=e[14],h=e[3],E=e[7],b=e[11],g=e[15];return h*(+r*l*_-s*d*_-r*a*f+i*d*f+s*a*m-i*l*m)+E*(+t*l*m-t*d*f+r*o*f-s*o*m+s*d*c-r*l*c)+b*(+t*d*_-t*a*m-r*o*_+i*o*m+r*a*c-i*d*c)+g*(-s*a*c-t*l*_+t*a*f+s*o*_-i*o*f+i*l*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],d=e[7],c=e[8],_=e[9],f=e[10],m=e[11],h=e[12],E=e[13],b=e[14],g=e[15],v=_*b*d-E*f*d+E*l*m-a*b*m-_*l*g+a*f*g,y=h*f*d-c*b*d-h*l*m+o*b*m+c*l*g-o*f*g,T=c*E*d-h*_*d+h*a*m-o*E*m-c*a*g+o*_*g,C=h*_*l-c*E*l-h*a*f+o*E*f+c*a*b-o*_*b,x=t*v+i*y+s*T+r*C;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const O=1/x;return e[0]=v*O,e[1]=(E*f*r-_*b*r-E*s*m+i*b*m+_*s*g-i*f*g)*O,e[2]=(a*b*r-E*l*r+E*s*d-i*b*d-a*s*g+i*l*g)*O,e[3]=(_*l*r-a*f*r-_*s*d+i*f*d+a*s*m-i*l*m)*O,e[4]=y*O,e[5]=(c*b*r-h*f*r+h*s*m-t*b*m-c*s*g+t*f*g)*O,e[6]=(h*l*r-o*b*r-h*s*d+t*b*d+o*s*g-t*l*g)*O,e[7]=(o*f*r-c*l*r+c*s*d-t*f*d-o*s*m+t*l*m)*O,e[8]=T*O,e[9]=(h*_*r-c*E*r-h*i*m+t*E*m+c*i*g-t*_*g)*O,e[10]=(o*E*r-h*a*r+h*i*d-t*E*d-o*i*g+t*a*g)*O,e[11]=(c*a*r-o*_*r-c*i*d+t*_*d+o*i*m-t*a*m)*O,e[12]=C*O,e[13]=(c*E*s-h*_*s+h*i*f-t*E*f-c*i*b+t*_*b)*O,e[14]=(h*a*s-o*E*s-h*i*l+t*E*l+o*i*b-t*a*b)*O,e[15]=(o*_*s-c*a*s+c*i*l-t*_*l-o*i*f+t*a*f)*O,this}scale(e){const t=this.elements,i=e.x,s=e.y,r=e.z;return t[0]*=i,t[4]*=s,t[8]*=r,t[1]*=i,t[5]*=s,t[9]*=r,t[2]*=i,t[6]*=s,t[10]*=r,t[3]*=i,t[7]*=s,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,s))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),s=Math.sin(t),r=1-i,o=e.x,a=e.y,l=e.z,d=r*o,c=r*a;return this.set(d*o+i,d*a-s*l,d*l+s*a,0,d*a+s*l,c*a+i,c*l-s*o,0,d*l-s*a,c*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,t,s,1,0,0,0,0,1),this}compose(e,t,i){const s=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,d=r+r,c=o+o,_=a+a,f=r*d,m=r*c,h=r*_,E=o*c,b=o*_,g=a*_,v=l*d,y=l*c,T=l*_,C=i.x,x=i.y,O=i.z;return s[0]=(1-(E+g))*C,s[1]=(m+T)*C,s[2]=(h-y)*C,s[3]=0,s[4]=(m-T)*x,s[5]=(1-(f+g))*x,s[6]=(b+v)*x,s[7]=0,s[8]=(h+y)*O,s[9]=(b-v)*O,s[10]=(1-(f+E))*O,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,i){const s=this.elements;let r=Lo.set(s[0],s[1],s[2]).length();const o=Lo.set(s[4],s[5],s[6]).length(),a=Lo.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],Mi.copy(this);const d=1/r,c=1/o,_=1/a;return Mi.elements[0]*=d,Mi.elements[1]*=d,Mi.elements[2]*=d,Mi.elements[4]*=c,Mi.elements[5]*=c,Mi.elements[6]*=c,Mi.elements[8]*=_,Mi.elements[9]*=_,Mi.elements[10]*=_,t.setFromRotationMatrix(Mi),i.x=r,i.y=o,i.z=a,this}makePerspective(e,t,i,s,r,o,a=Ls){const l=this.elements,d=2*r/(t-e),c=2*r/(i-s),_=(t+e)/(t-e),f=(i+s)/(i-s);let m,h;if(a===Ls)m=-(o+r)/(o-r),h=-2*o*r/(o-r);else if(a===yu)m=-o/(o-r),h=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=d,l[4]=0,l[8]=_,l[12]=0,l[1]=0,l[5]=c,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=h,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,s,r,o,a=Ls){const l=this.elements,d=1/(t-e),c=1/(i-s),_=1/(o-r),f=(t+e)*d,m=(i+s)*c;let h,E;if(a===Ls)h=(o+r)*_,E=-2*_;else if(a===yu)h=r*_,E=-1*_;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*d,l[4]=0,l[8]=0,l[12]=-f,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=E,l[14]=-h,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<16;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Lo=new be,Mi=new At,i1t=new be(0,0,0),s1t=new be(1,1,1),ir=new be,rd=new be,ii=new be,I1=new At,M1=new Dr;class hp{constructor(e=0,t=0,i=0,s=hp.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,s=this._order){return this._x=e,this._y=t,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],d=s[5],c=s[9],_=s[2],f=s[6],m=s[10];switch(t){case"XYZ":this._y=Math.asin(kn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,m),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(f,d),this._z=0);break;case"YXZ":this._x=Math.asin(-kn(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,d)):(this._y=Math.atan2(-_,r),this._z=0);break;case"ZXY":this._x=Math.asin(kn(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-_,m),this._z=Math.atan2(-o,d)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-kn(_,-1,1)),Math.abs(_)<.9999999?(this._x=Math.atan2(f,m),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,d));break;case"YZX":this._z=Math.asin(kn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,d),this._y=Math.atan2(-_,r)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-kn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,d),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-c,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return I1.makeRotationFromQuaternion(e),this.setFromRotationMatrix(I1,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return M1.setFromEuler(this),this.setFromQuaternion(M1,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}hp.DEFAULT_ORDER="XYZ";class lI{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),s.maxGeometryCount=this._maxGeometryCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),this.boundingBox!==null&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()}));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let d=0,c=l.length;d0){s.children=[];for(let a=0;a0){s.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),d.length>0&&(i.textures=d),c.length>0&&(i.images=c),_.length>0&&(i.shapes=_),f.length>0&&(i.skeletons=f),m.length>0&&(i.animations=m),h.length>0&&(i.nodes=h)}return i.object=s,i;function o(a){const l=[];for(const d in a){const c=a[d];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,t,i,s,r){Di.subVectors(s,t),As.subVectors(i,t),eg.subVectors(e,t);const o=Di.dot(Di),a=Di.dot(As),l=Di.dot(eg),d=As.dot(As),c=As.dot(eg),_=o*d-a*a;if(_===0)return r.set(-2,-1,-1);const f=1/_,m=(d*l-a*c)*f,h=(o*c-a*l)*f;return r.set(1-m-h,h,m)}static containsPoint(e,t,i,s){return this.getBarycoord(e,t,i,s,ws),ws.x>=0&&ws.y>=0&&ws.x+ws.y<=1}static getUV(e,t,i,s,r,o,a,l){return ad===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),ad=!0),this.getInterpolation(e,t,i,s,r,o,a,l)}static getInterpolation(e,t,i,s,r,o,a,l){return this.getBarycoord(e,t,i,s,ws),l.setScalar(0),l.addScaledVector(r,ws.x),l.addScaledVector(o,ws.y),l.addScaledVector(a,ws.z),l}static isFrontFacing(e,t,i,s){return Di.subVectors(i,t),As.subVectors(e,t),Di.cross(As).dot(s)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,s){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,i,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Di.subVectors(this.c,this.b),As.subVectors(this.a,this.b),Di.cross(As).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Pi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Pi.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,s,r){return ad===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),ad=!0),Pi.getInterpolation(e,this.a,this.b,this.c,t,i,s,r)}getInterpolation(e,t,i,s,r){return Pi.getInterpolation(e,this.a,this.b,this.c,t,i,s,r)}containsPoint(e){return Pi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Pi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,s=this.b,r=this.c;let o,a;Uo.subVectors(s,i),Fo.subVectors(r,i),tg.subVectors(e,i);const l=Uo.dot(tg),d=Fo.dot(tg);if(l<=0&&d<=0)return t.copy(i);ng.subVectors(e,s);const c=Uo.dot(ng),_=Fo.dot(ng);if(c>=0&&_<=c)return t.copy(s);const f=l*_-c*d;if(f<=0&&l>=0&&c<=0)return o=l/(l-c),t.copy(i).addScaledVector(Uo,o);ig.subVectors(e,r);const m=Uo.dot(ig),h=Fo.dot(ig);if(h>=0&&m<=h)return t.copy(r);const E=m*d-l*h;if(E<=0&&d>=0&&h<=0)return a=d/(d-h),t.copy(i).addScaledVector(Fo,a);const b=c*h-m*_;if(b<=0&&_-c>=0&&m-h>=0)return U1.subVectors(r,s),a=(_-c)/(_-c+(m-h)),t.copy(s).addScaledVector(U1,a);const g=1/(b+E+f);return o=E*g,a=f*g,t.copy(i).addScaledVector(Uo,o).addScaledVector(Fo,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const cI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},sr={h:0,s:0,l:0},ld={h:0,s:0,l:0};function sg(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class gt{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=rn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Bt.toWorkingColorSpace(this,t),this}setRGB(e,t,i,s=Bt.workingColorSpace){return this.r=e,this.g=t,this.b=i,Bt.toWorkingColorSpace(this,s),this}setHSL(e,t,i,s=Bt.workingColorSpace){if(e=ev(e,1),t=kn(t,0,1),i=kn(i,0,1),t===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+t):i+t-i*t,o=2*i-r;this.r=sg(o,r,e+1/3),this.g=sg(o,r,e),this.b=sg(o,r,e-1/3)}return Bt.toWorkingColorSpace(this,s),this}setStyle(e,t=rn){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=s[1],a=s[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=rn){const i=cI[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=la(e.r),this.g=la(e.g),this.b=la(e.b),this}copyLinearToSRGB(e){return this.r=$m(e.r),this.g=$m(e.g),this.b=$m(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=rn){return Bt.fromWorkingColorSpace(Mn.copy(this),e),Math.round(kn(Mn.r*255,0,255))*65536+Math.round(kn(Mn.g*255,0,255))*256+Math.round(kn(Mn.b*255,0,255))}getHexString(e=rn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Bt.workingColorSpace){Bt.fromWorkingColorSpace(Mn.copy(this),t);const i=Mn.r,s=Mn.g,r=Mn.b,o=Math.max(i,s,r),a=Math.min(i,s,r);let l,d;const c=(a+o)/2;if(a===o)l=0,d=0;else{const _=o-a;switch(d=c<=.5?_/(o+a):_/(2-o-a),o){case i:l=(s-r)/_+(s0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==aa&&(i.blending=this.blending),this.side!==Vs&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==ab&&(i.blendSrc=this.blendSrc),this.blendDst!==lb&&(i.blendDst=this.blendDst),this.blendEquation!==Jr&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==mu&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==x1&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Oo&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Oo&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Oo&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=s(e.textures),o=s(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const s=t.length;i=new Array(s);for(let r=0;r!==s;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Er extends Vi{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new gt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=QE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const cn=new be,cd=new Mt;class Yn{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=_b,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=ks,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let s=0,r=this.itemSize;s0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const d in l)l[d]!==void 0&&(e[d]=l[d]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const d=i[l];e.data.attributes[l]=d.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const d=this.morphAttributes[l],c=[];for(let _=0,f=d.length;_0&&(s[l]=c,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const s=e.attributes;for(const d in s){const c=s[d];this.setAttribute(d,c.clone(t))}const r=e.morphAttributes;for(const d in r){const c=[],_=r[d];for(let f=0,m=_.length;f0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r(e.far-e.near)**2))&&(F1.copy(r).invert(),Vr.copy(e.ray).applyMatrix4(F1),!(i.boundingBox!==null&&Vr.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Vr)))}_computeIntersections(e,t,i){let s;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,d=r.attributes.uv,c=r.attributes.uv1,_=r.attributes.normal,f=r.groups,m=r.drawRange;if(a!==null)if(Array.isArray(o))for(let h=0,E=f.length;ht.far?null:{distance:d,point:md.clone(),object:n}}function gd(n,e,t,i,s,r,o,a,l,d){n.getVertexPosition(a,Go),n.getVertexPosition(l,zo),n.getVertexPosition(d,Vo);const c=p1t(n,e,t,i,Go,zo,Vo,fd);if(c){s&&(pd.fromBufferAttribute(s,a),_d.fromBufferAttribute(s,l),hd.fromBufferAttribute(s,d),c.uv=Pi.getInterpolation(fd,Go,zo,Vo,pd,_d,hd,new Mt)),r&&(pd.fromBufferAttribute(r,a),_d.fromBufferAttribute(r,l),hd.fromBufferAttribute(r,d),c.uv1=Pi.getInterpolation(fd,Go,zo,Vo,pd,_d,hd,new Mt),c.uv2=c.uv1),o&&(G1.fromBufferAttribute(o,a),z1.fromBufferAttribute(o,l),V1.fromBufferAttribute(o,d),c.normal=Pi.getInterpolation(fd,Go,zo,Vo,G1,z1,V1,new be),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));const _={a,b:l,c:d,normal:new be,materialIndex:0};Pi.getNormal(Go,zo,Vo,_.normal),c.face=_}return c}class Cr extends fs{constructor(e=1,t=1,i=1,s=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:s,heightSegments:r,depthSegments:o};const a=this;s=Math.floor(s),r=Math.floor(r),o=Math.floor(o);const l=[],d=[],c=[],_=[];let f=0,m=0;h("z","y","x",-1,-1,i,t,e,o,r,0),h("z","y","x",1,-1,i,t,-e,o,r,1),h("x","z","y",1,1,e,i,t,s,o,2),h("x","z","y",1,-1,e,i,-t,s,o,3),h("x","y","z",1,-1,e,t,i,s,r,4),h("x","y","z",-1,-1,e,t,-i,s,r,5),this.setIndex(l),this.setAttribute("position",new Us(d,3)),this.setAttribute("normal",new Us(c,3)),this.setAttribute("uv",new Us(_,2));function h(E,b,g,v,y,T,C,x,O,R,S){const A=T/O,U=C/R,F=T/2,K=C/2,L=x/2,H=O+1,G=R+1;let P=0,j=0;const Y=new be;for(let Q=0;Q0?1:-1,c.push(Y.x,Y.y,Y.z),_.push(te/O),_.push(1-Q/R),P+=1}}for(let Q=0;Q>8&255]+In[n>>16&255]+In[n>>24&255]+"-"+In[e&255]+In[e>>8&255]+"-"+In[e>>16&15|64]+In[e>>24&255]+"-"+In[t&63|128]+In[t>>8&255]+"-"+In[t>>16&255]+In[t>>24&255]+In[i&255]+In[i>>8&255]+In[i>>16&255]+In[i>>24&255]).toLowerCase()}function kn(n,e,t){return Math.max(e,Math.min(t,n))}function ev(n,e){return(n%e+e)%e}function UCt(n,e,t,i,s){return i+(n-e)*(s-i)/(t-e)}function FCt(n,e,t){return n!==e?(t-n)/(e-n):0}function Bl(n,e,t){return(1-t)*n+t*e}function BCt(n,e,t,i){return Bl(n,e,1-Math.exp(-t*i))}function GCt(n,e=1){return e-Math.abs(ev(n,e*2)-e)}function zCt(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function VCt(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function HCt(n,e){return n+Math.floor(Math.random()*(e-n+1))}function qCt(n,e){return n+Math.random()*(e-n)}function YCt(n){return n*(.5-Math.random())}function $Ct(n){n!==void 0&&(R1=n);let e=R1+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function WCt(n){return n*Fl}function KCt(n){return n*Na}function fb(n){return(n&n-1)===0&&n!==0}function jCt(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function Su(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function QCt(n,e,t,i,s){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),d=r((e+i)/2),c=o((e+i)/2),_=r((e-i)/2),f=o((e-i)/2),m=r((i-e)/2),h=o((i-e)/2);switch(s){case"XYX":n.set(a*c,l*_,l*f,a*d);break;case"YZY":n.set(l*f,a*c,l*_,a*d);break;case"ZXZ":n.set(l*_,l*f,a*c,a*d);break;case"XZX":n.set(a*c,l*h,l*m,a*d);break;case"YXY":n.set(l*m,a*c,l*h,a*d);break;case"ZYZ":n.set(l*h,l*m,a*c,a*d);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function es(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Ht(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const XCt={DEG2RAD:Fl,RAD2DEG:Na,generateUUID:zi,clamp:kn,euclideanModulo:ev,mapLinear:UCt,inverseLerp:FCt,lerp:Bl,damp:BCt,pingpong:GCt,smoothstep:zCt,smootherstep:VCt,randInt:HCt,randFloat:qCt,randFloatSpread:YCt,seededRandom:$Ct,degToRad:WCt,radToDeg:KCt,isPowerOfTwo:fb,ceilPowerOfTwo:jCt,floorPowerOfTwo:Su,setQuaternionFromProperEuler:QCt,normalize:Ht,denormalize:es};class Mt{constructor(e=0,t=0){Mt.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6],this.y=s[1]*t+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(kn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),s=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Rt{constructor(e,t,i,s,r,o,a,l,d){Rt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,d)}set(e,t,i,s,r,o,a,l,d){const c=this.elements;return c[0]=e,c[1]=s,c[2]=a,c[3]=t,c[4]=r,c[5]=l,c[6]=i,c[7]=o,c[8]=d,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[3],l=i[6],d=i[1],c=i[4],_=i[7],f=i[2],m=i[5],h=i[8],E=s[0],b=s[3],g=s[6],v=s[1],y=s[4],T=s[7],C=s[2],x=s[5],O=s[8];return r[0]=o*E+a*v+l*C,r[3]=o*b+a*y+l*x,r[6]=o*g+a*T+l*O,r[1]=d*E+c*v+_*C,r[4]=d*b+c*y+_*x,r[7]=d*g+c*T+_*O,r[2]=f*E+m*v+h*C,r[5]=f*b+m*y+h*x,r[8]=f*g+m*T+h*O,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],d=e[7],c=e[8];return t*o*c-t*a*d-i*r*c+i*a*l+s*r*d-s*o*l}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],d=e[7],c=e[8],_=c*o-a*d,f=a*l-c*r,m=d*r-o*l,h=t*_+i*f+s*m;if(h===0)return this.set(0,0,0,0,0,0,0,0,0);const E=1/h;return e[0]=_*E,e[1]=(s*d-c*i)*E,e[2]=(a*i-s*o)*E,e[3]=f*E,e[4]=(c*t-s*l)*E,e[5]=(s*r-a*t)*E,e[6]=m*E,e[7]=(i*l-d*t)*E,e[8]=(o*t-i*r)*E,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,s,r,o,a){const l=Math.cos(r),d=Math.sin(r);return this.set(i*l,i*d,-i*(l*o+d*a)+o+e,-s*d,s*l,-s*(-d*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Ym.makeScale(e,t)),this}rotate(e){return this.premultiply(Ym.makeRotation(-e)),this}translate(e,t){return this.premultiply(Ym.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<9;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Ym=new Rt;function sI(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function lc(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function ZCt(){const n=lc("canvas");return n.style.display="block",n}const A1={};function Gl(n){n in A1||(A1[n]=!0,console.warn(n))}const w1=new Rt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),N1=new Rt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Jc={[Nn]:{transfer:bu,primaries:Eu,toReference:n=>n,fromReference:n=>n},[rn]:{transfer:Xt,primaries:Eu,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[pp]:{transfer:bu,primaries:vu,toReference:n=>n.applyMatrix3(N1),fromReference:n=>n.applyMatrix3(w1)},[JE]:{transfer:Xt,primaries:vu,toReference:n=>n.convertSRGBToLinear().applyMatrix3(N1),fromReference:n=>n.applyMatrix3(w1).convertLinearToSRGB()}},JCt=new Set([Nn,pp]),Bt={enabled:!0,_workingColorSpace:Nn,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(n){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!n},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!JCt.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=Jc[e].toReference,s=Jc[t].fromReference;return s(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return Jc[n].primaries},getTransfer:function(n){return n===Ei?bu:Jc[n].transfer}};function la(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function $m(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Io;class rI{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Io===void 0&&(Io=lc("canvas")),Io.width=e.width,Io.height=e.height;const i=Io.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Io}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=lc("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),r=s.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==$O)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Ra:e.x=e.x-Math.floor(e.x);break;case gi:e.x=e.x<0?0:1;break;case gu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Ra:e.y=e.y-Math.floor(e.y);break;case gi:e.y=e.y<0?0:1;break;case gu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Gl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===rn?uo:nI}set encoding(e){Gl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===uo?rn:Ei}}wn.DEFAULT_IMAGE=null;wn.DEFAULT_MAPPING=$O;wn.DEFAULT_ANISOTROPY=1;class Wt{constructor(e=0,t=0,i=0,s=1){Wt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,s){return this.x=e,this.y=t,this.z=i,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*t+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*t+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*t+o[7]*i+o[11]*s+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,s,r;const l=e.elements,d=l[0],c=l[4],_=l[8],f=l[1],m=l[5],h=l[9],E=l[2],b=l[6],g=l[10];if(Math.abs(c-f)<.01&&Math.abs(_-E)<.01&&Math.abs(h-b)<.01){if(Math.abs(c+f)<.1&&Math.abs(_+E)<.1&&Math.abs(h+b)<.1&&Math.abs(d+m+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const y=(d+1)/2,T=(m+1)/2,C=(g+1)/2,x=(c+f)/4,O=(_+E)/4,R=(h+b)/4;return y>T&&y>C?y<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(y),s=x/i,r=O/i):T>C?T<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(T),i=x/s,r=R/s):C<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(C),i=O/r,s=R/r),this.set(i,s,r,t),this}let v=Math.sqrt((b-h)*(b-h)+(_-E)*(_-E)+(f-c)*(f-c));return Math.abs(v)<.001&&(v=1),this.x=(b-h)/v,this.y=(_-E)/v,this.z=(f-c)/v,this.w=Math.acos((d+m+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class n1t extends ja{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Wt(0,0,e,t),this.scissorTest=!1,this.viewport=new Wt(0,0,e,t);const s={width:e,height:t,depth:1};i.encoding!==void 0&&(Gl("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===uo?rn:Ei),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new wn(s,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new oI(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class bo extends n1t{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class aI extends wn{constructor(e=null,t=1,i=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:s},this.magFilter=En,this.minFilter=En,this.wrapR=gi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class i1t extends wn{constructor(e=null,t=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:s},this.magFilter=En,this.minFilter=En,this.wrapR=gi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Dr{constructor(e=0,t=0,i=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=s}static slerpFlat(e,t,i,s,r,o,a){let l=i[s+0],d=i[s+1],c=i[s+2],_=i[s+3];const f=r[o+0],m=r[o+1],h=r[o+2],E=r[o+3];if(a===0){e[t+0]=l,e[t+1]=d,e[t+2]=c,e[t+3]=_;return}if(a===1){e[t+0]=f,e[t+1]=m,e[t+2]=h,e[t+3]=E;return}if(_!==E||l!==f||d!==m||c!==h){let b=1-a;const g=l*f+d*m+c*h+_*E,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){const C=Math.sqrt(y),x=Math.atan2(C,g*v);b=Math.sin(b*x)/C,a=Math.sin(a*x)/C}const T=a*v;if(l=l*b+f*T,d=d*b+m*T,c=c*b+h*T,_=_*b+E*T,b===1-a){const C=1/Math.sqrt(l*l+d*d+c*c+_*_);l*=C,d*=C,c*=C,_*=C}}e[t]=l,e[t+1]=d,e[t+2]=c,e[t+3]=_}static multiplyQuaternionsFlat(e,t,i,s,r,o){const a=i[s],l=i[s+1],d=i[s+2],c=i[s+3],_=r[o],f=r[o+1],m=r[o+2],h=r[o+3];return e[t]=a*h+c*_+l*m-d*f,e[t+1]=l*h+c*f+d*_-a*m,e[t+2]=d*h+c*m+a*f-l*_,e[t+3]=c*h-a*_-l*f-d*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,s){return this._x=e,this._y=t,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const i=e._x,s=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,d=a(i/2),c=a(s/2),_=a(r/2),f=l(i/2),m=l(s/2),h=l(r/2);switch(o){case"XYZ":this._x=f*c*_+d*m*h,this._y=d*m*_-f*c*h,this._z=d*c*h+f*m*_,this._w=d*c*_-f*m*h;break;case"YXZ":this._x=f*c*_+d*m*h,this._y=d*m*_-f*c*h,this._z=d*c*h-f*m*_,this._w=d*c*_+f*m*h;break;case"ZXY":this._x=f*c*_-d*m*h,this._y=d*m*_+f*c*h,this._z=d*c*h+f*m*_,this._w=d*c*_-f*m*h;break;case"ZYX":this._x=f*c*_-d*m*h,this._y=d*m*_+f*c*h,this._z=d*c*h-f*m*_,this._w=d*c*_+f*m*h;break;case"YZX":this._x=f*c*_+d*m*h,this._y=d*m*_+f*c*h,this._z=d*c*h-f*m*_,this._w=d*c*_-f*m*h;break;case"XZY":this._x=f*c*_-d*m*h,this._y=d*m*_-f*c*h,this._z=d*c*h+f*m*_,this._w=d*c*_+f*m*h;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],s=t[4],r=t[8],o=t[1],a=t[5],l=t[9],d=t[2],c=t[6],_=t[10],f=i+a+_;if(f>0){const m=.5/Math.sqrt(f+1);this._w=.25/m,this._x=(c-l)*m,this._y=(r-d)*m,this._z=(o-s)*m}else if(i>a&&i>_){const m=2*Math.sqrt(1+i-a-_);this._w=(c-l)/m,this._x=.25*m,this._y=(s+o)/m,this._z=(r+d)/m}else if(a>_){const m=2*Math.sqrt(1+a-i-_);this._w=(r-d)/m,this._x=(s+o)/m,this._y=.25*m,this._z=(l+c)/m}else{const m=2*Math.sqrt(1+_-i-a);this._w=(o-s)/m,this._x=(r+d)/m,this._y=(l+c)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(kn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,t/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,s=e._y,r=e._z,o=e._w,a=t._x,l=t._y,d=t._z,c=t._w;return this._x=i*c+o*a+s*d-r*l,this._y=s*c+o*l+r*a-i*d,this._z=r*c+o*d+i*l-s*a,this._w=o*c-i*a-s*l-r*d,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-t;return this._w=m*o+t*this._w,this._x=m*i+t*this._x,this._y=m*s+t*this._y,this._z=m*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const d=Math.sqrt(l),c=Math.atan2(d,a),_=Math.sin((1-t)*c)/d,f=Math.sin(t*c)/d;return this._w=o*_+this._w*f,this._x=i*_+this._x*f,this._y=s*_+this._y*f,this._z=r*_+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),s=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(s),i*Math.sin(r),i*Math.cos(r),t*Math.sin(s))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class be{constructor(e=0,t=0,i=0){be.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(O1.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(O1.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*s,this.y=r[1]*t+r[4]*i+r[7]*s,this.z=r[2]*t+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*t+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*t+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*t+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,d=2*(o*s-a*i),c=2*(a*t-r*s),_=2*(r*i-o*t);return this.x=t+l*d+o*_-a*c,this.y=i+l*c+a*d-r*_,this.z=s+l*_+r*c-o*d,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*s,this.y=r[1]*t+r[5]*i+r[9]*s,this.z=r[2]*t+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,s=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Km.copy(this).projectOnVector(e),this.sub(Km)}reflect(e){return this.sub(Km.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(kn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return t*t+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const s=Math.sin(t)*e;return this.x=s*Math.sin(i),this.y=Math.cos(t)*e,this.z=s*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Km=new be,O1=new Dr;class Ks{constructor(e=new be(1/0,1/0,1/0),t=new be(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Ii),Ii.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ml),td.subVectors(this.max,ml),Mo.subVectors(e.a,ml),Do.subVectors(e.b,ml),ko.subVectors(e.c,ml),er.subVectors(Do,Mo),tr.subVectors(ko,Do),Gr.subVectors(Mo,ko);let t=[0,-er.z,er.y,0,-tr.z,tr.y,0,-Gr.z,Gr.y,er.z,0,-er.x,tr.z,0,-tr.x,Gr.z,0,-Gr.x,-er.y,er.x,0,-tr.y,tr.x,0,-Gr.y,Gr.x,0];return!jm(t,Mo,Do,ko,td)||(t=[1,0,0,0,1,0,0,0,1],!jm(t,Mo,Do,ko,td))?!1:(nd.crossVectors(er,tr),t=[nd.x,nd.y,nd.z],jm(t,Mo,Do,ko,td))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ii).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ii).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(xs[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),xs[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),xs[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),xs[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),xs[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),xs[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),xs[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),xs[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(xs),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const xs=[new be,new be,new be,new be,new be,new be,new be,new be],Ii=new be,ed=new Ks,Mo=new be,Do=new be,ko=new be,er=new be,tr=new be,Gr=new be,ml=new be,td=new be,nd=new be,zr=new be;function jm(n,e,t,i,s){for(let r=0,o=n.length-3;r<=o;r+=3){zr.fromArray(n,r);const a=s.x*Math.abs(zr.x)+s.y*Math.abs(zr.y)+s.z*Math.abs(zr.z),l=e.dot(zr),d=t.dot(zr),c=i.dot(zr);if(Math.max(-Math.max(l,d,c),Math.min(l,d,c))>a)return!1}return!0}const s1t=new Ks,gl=new be,Qm=new be;class hs{constructor(e=new be,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):s1t.setFromPoints(e).getCenter(i);let s=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;gl.subVectors(e,this.center);const t=gl.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),s=(i-this.radius)*.5;this.center.addScaledVector(gl,s/i),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Qm.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(gl.copy(e.center).add(Qm)),this.expandByPoint(gl.copy(e.center).sub(Qm))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Cs=new be,Xm=new be,id=new be,nr=new be,Zm=new be,sd=new be,Jm=new be;class _p{constructor(e=new be,t=new be(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Cs)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Cs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Cs.copy(this.origin).addScaledVector(this.direction,t),Cs.distanceToSquared(e))}distanceSqToSegment(e,t,i,s){Xm.copy(e).add(t).multiplyScalar(.5),id.copy(t).sub(e).normalize(),nr.copy(this.origin).sub(Xm);const r=e.distanceTo(t)*.5,o=-this.direction.dot(id),a=nr.dot(this.direction),l=-nr.dot(id),d=nr.lengthSq(),c=Math.abs(1-o*o);let _,f,m,h;if(c>0)if(_=o*l-a,f=o*a-l,h=r*c,_>=0)if(f>=-h)if(f<=h){const E=1/c;_*=E,f*=E,m=_*(_+o*f+2*a)+f*(o*_+f+2*l)+d}else f=r,_=Math.max(0,-(o*f+a)),m=-_*_+f*(f+2*l)+d;else f=-r,_=Math.max(0,-(o*f+a)),m=-_*_+f*(f+2*l)+d;else f<=-h?(_=Math.max(0,-(-o*r+a)),f=_>0?-r:Math.min(Math.max(-r,-l),r),m=-_*_+f*(f+2*l)+d):f<=h?(_=0,f=Math.min(Math.max(-r,-l),r),m=f*(f+2*l)+d):(_=Math.max(0,-(o*r+a)),f=_>0?r:Math.min(Math.max(-r,-l),r),m=-_*_+f*(f+2*l)+d);else f=o>0?-r:r,_=Math.max(0,-(o*f+a)),m=-_*_+f*(f+2*l)+d;return i&&i.copy(this.origin).addScaledVector(this.direction,_),s&&s.copy(Xm).addScaledVector(id,f),m}intersectSphere(e,t){Cs.subVectors(e.center,this.origin);const i=Cs.dot(this.direction),s=Cs.dot(Cs)-i*i,r=e.radius*e.radius;if(s>r)return null;const o=Math.sqrt(r-s),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,s,r,o,a,l;const d=1/this.direction.x,c=1/this.direction.y,_=1/this.direction.z,f=this.origin;return d>=0?(i=(e.min.x-f.x)*d,s=(e.max.x-f.x)*d):(i=(e.max.x-f.x)*d,s=(e.min.x-f.x)*d),c>=0?(r=(e.min.y-f.y)*c,o=(e.max.y-f.y)*c):(r=(e.max.y-f.y)*c,o=(e.min.y-f.y)*c),i>o||r>s||((r>i||isNaN(i))&&(i=r),(o=0?(a=(e.min.z-f.z)*_,l=(e.max.z-f.z)*_):(a=(e.max.z-f.z)*_,l=(e.min.z-f.z)*_),i>l||a>s)||((a>i||i!==i)&&(i=a),(l=0?i:s,t)}intersectsBox(e){return this.intersectBox(e,Cs)!==null}intersectTriangle(e,t,i,s,r){Zm.subVectors(t,e),sd.subVectors(i,e),Jm.crossVectors(Zm,sd);let o=this.direction.dot(Jm),a;if(o>0){if(s)return null;a=1}else if(o<0)a=-1,o=-o;else return null;nr.subVectors(this.origin,e);const l=a*this.direction.dot(sd.crossVectors(nr,sd));if(l<0)return null;const d=a*this.direction.dot(Zm.cross(nr));if(d<0||l+d>o)return null;const c=-a*nr.dot(Jm);return c<0?null:this.at(c/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class At{constructor(e,t,i,s,r,o,a,l,d,c,_,f,m,h,E,b){At.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,d,c,_,f,m,h,E,b)}set(e,t,i,s,r,o,a,l,d,c,_,f,m,h,E,b){const g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=s,g[1]=r,g[5]=o,g[9]=a,g[13]=l,g[2]=d,g[6]=c,g[10]=_,g[14]=f,g[3]=m,g[7]=h,g[11]=E,g[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new At().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,s=1/Lo.setFromMatrixColumn(e,0).length(),r=1/Lo.setFromMatrixColumn(e,1).length(),o=1/Lo.setFromMatrixColumn(e,2).length();return t[0]=i[0]*s,t[1]=i[1]*s,t[2]=i[2]*s,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,s=e.y,r=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),d=Math.sin(s),c=Math.cos(r),_=Math.sin(r);if(e.order==="XYZ"){const f=o*c,m=o*_,h=a*c,E=a*_;t[0]=l*c,t[4]=-l*_,t[8]=d,t[1]=m+h*d,t[5]=f-E*d,t[9]=-a*l,t[2]=E-f*d,t[6]=h+m*d,t[10]=o*l}else if(e.order==="YXZ"){const f=l*c,m=l*_,h=d*c,E=d*_;t[0]=f+E*a,t[4]=h*a-m,t[8]=o*d,t[1]=o*_,t[5]=o*c,t[9]=-a,t[2]=m*a-h,t[6]=E+f*a,t[10]=o*l}else if(e.order==="ZXY"){const f=l*c,m=l*_,h=d*c,E=d*_;t[0]=f-E*a,t[4]=-o*_,t[8]=h+m*a,t[1]=m+h*a,t[5]=o*c,t[9]=E-f*a,t[2]=-o*d,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const f=o*c,m=o*_,h=a*c,E=a*_;t[0]=l*c,t[4]=h*d-m,t[8]=f*d+E,t[1]=l*_,t[5]=E*d+f,t[9]=m*d-h,t[2]=-d,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const f=o*l,m=o*d,h=a*l,E=a*d;t[0]=l*c,t[4]=E-f*_,t[8]=h*_+m,t[1]=_,t[5]=o*c,t[9]=-a*c,t[2]=-d*c,t[6]=m*_+h,t[10]=f-E*_}else if(e.order==="XZY"){const f=o*l,m=o*d,h=a*l,E=a*d;t[0]=l*c,t[4]=-_,t[8]=d*c,t[1]=f*_+E,t[5]=o*c,t[9]=m*_-h,t[2]=h*_-m,t[6]=a*c,t[10]=E*_+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(r1t,e,o1t)}lookAt(e,t,i){const s=this.elements;return ii.subVectors(e,t),ii.lengthSq()===0&&(ii.z=1),ii.normalize(),ir.crossVectors(i,ii),ir.lengthSq()===0&&(Math.abs(i.z)===1?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),ir.crossVectors(i,ii)),ir.normalize(),rd.crossVectors(ii,ir),s[0]=ir.x,s[4]=rd.x,s[8]=ii.x,s[1]=ir.y,s[5]=rd.y,s[9]=ii.y,s[2]=ir.z,s[6]=rd.z,s[10]=ii.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[4],l=i[8],d=i[12],c=i[1],_=i[5],f=i[9],m=i[13],h=i[2],E=i[6],b=i[10],g=i[14],v=i[3],y=i[7],T=i[11],C=i[15],x=s[0],O=s[4],R=s[8],S=s[12],A=s[1],U=s[5],F=s[9],K=s[13],L=s[2],H=s[6],G=s[10],P=s[14],j=s[3],Y=s[7],Q=s[11],ae=s[15];return r[0]=o*x+a*A+l*L+d*j,r[4]=o*O+a*U+l*H+d*Y,r[8]=o*R+a*F+l*G+d*Q,r[12]=o*S+a*K+l*P+d*ae,r[1]=c*x+_*A+f*L+m*j,r[5]=c*O+_*U+f*H+m*Y,r[9]=c*R+_*F+f*G+m*Q,r[13]=c*S+_*K+f*P+m*ae,r[2]=h*x+E*A+b*L+g*j,r[6]=h*O+E*U+b*H+g*Y,r[10]=h*R+E*F+b*G+g*Q,r[14]=h*S+E*K+b*P+g*ae,r[3]=v*x+y*A+T*L+C*j,r[7]=v*O+y*U+T*H+C*Y,r[11]=v*R+y*F+T*G+C*Q,r[15]=v*S+y*K+T*P+C*ae,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],d=e[13],c=e[2],_=e[6],f=e[10],m=e[14],h=e[3],E=e[7],b=e[11],g=e[15];return h*(+r*l*_-s*d*_-r*a*f+i*d*f+s*a*m-i*l*m)+E*(+t*l*m-t*d*f+r*o*f-s*o*m+s*d*c-r*l*c)+b*(+t*d*_-t*a*m-r*o*_+i*o*m+r*a*c-i*d*c)+g*(-s*a*c-t*l*_+t*a*f+s*o*_-i*o*f+i*l*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],d=e[7],c=e[8],_=e[9],f=e[10],m=e[11],h=e[12],E=e[13],b=e[14],g=e[15],v=_*b*d-E*f*d+E*l*m-a*b*m-_*l*g+a*f*g,y=h*f*d-c*b*d-h*l*m+o*b*m+c*l*g-o*f*g,T=c*E*d-h*_*d+h*a*m-o*E*m-c*a*g+o*_*g,C=h*_*l-c*E*l-h*a*f+o*E*f+c*a*b-o*_*b,x=t*v+i*y+s*T+r*C;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const O=1/x;return e[0]=v*O,e[1]=(E*f*r-_*b*r-E*s*m+i*b*m+_*s*g-i*f*g)*O,e[2]=(a*b*r-E*l*r+E*s*d-i*b*d-a*s*g+i*l*g)*O,e[3]=(_*l*r-a*f*r-_*s*d+i*f*d+a*s*m-i*l*m)*O,e[4]=y*O,e[5]=(c*b*r-h*f*r+h*s*m-t*b*m-c*s*g+t*f*g)*O,e[6]=(h*l*r-o*b*r-h*s*d+t*b*d+o*s*g-t*l*g)*O,e[7]=(o*f*r-c*l*r+c*s*d-t*f*d-o*s*m+t*l*m)*O,e[8]=T*O,e[9]=(h*_*r-c*E*r-h*i*m+t*E*m+c*i*g-t*_*g)*O,e[10]=(o*E*r-h*a*r+h*i*d-t*E*d-o*i*g+t*a*g)*O,e[11]=(c*a*r-o*_*r-c*i*d+t*_*d+o*i*m-t*a*m)*O,e[12]=C*O,e[13]=(c*E*s-h*_*s+h*i*f-t*E*f-c*i*b+t*_*b)*O,e[14]=(h*a*s-o*E*s-h*i*l+t*E*l+o*i*b-t*a*b)*O,e[15]=(o*_*s-c*a*s+c*i*l-t*_*l-o*i*f+t*a*f)*O,this}scale(e){const t=this.elements,i=e.x,s=e.y,r=e.z;return t[0]*=i,t[4]*=s,t[8]*=r,t[1]*=i,t[5]*=s,t[9]*=r,t[2]*=i,t[6]*=s,t[10]*=r,t[3]*=i,t[7]*=s,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,s))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),s=Math.sin(t),r=1-i,o=e.x,a=e.y,l=e.z,d=r*o,c=r*a;return this.set(d*o+i,d*a-s*l,d*l+s*a,0,d*a+s*l,c*a+i,c*l-s*o,0,d*l-s*a,c*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,t,s,1,0,0,0,0,1),this}compose(e,t,i){const s=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,d=r+r,c=o+o,_=a+a,f=r*d,m=r*c,h=r*_,E=o*c,b=o*_,g=a*_,v=l*d,y=l*c,T=l*_,C=i.x,x=i.y,O=i.z;return s[0]=(1-(E+g))*C,s[1]=(m+T)*C,s[2]=(h-y)*C,s[3]=0,s[4]=(m-T)*x,s[5]=(1-(f+g))*x,s[6]=(b+v)*x,s[7]=0,s[8]=(h+y)*O,s[9]=(b-v)*O,s[10]=(1-(f+E))*O,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,i){const s=this.elements;let r=Lo.set(s[0],s[1],s[2]).length();const o=Lo.set(s[4],s[5],s[6]).length(),a=Lo.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],Mi.copy(this);const d=1/r,c=1/o,_=1/a;return Mi.elements[0]*=d,Mi.elements[1]*=d,Mi.elements[2]*=d,Mi.elements[4]*=c,Mi.elements[5]*=c,Mi.elements[6]*=c,Mi.elements[8]*=_,Mi.elements[9]*=_,Mi.elements[10]*=_,t.setFromRotationMatrix(Mi),i.x=r,i.y=o,i.z=a,this}makePerspective(e,t,i,s,r,o,a=Ls){const l=this.elements,d=2*r/(t-e),c=2*r/(i-s),_=(t+e)/(t-e),f=(i+s)/(i-s);let m,h;if(a===Ls)m=-(o+r)/(o-r),h=-2*o*r/(o-r);else if(a===yu)m=-o/(o-r),h=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=d,l[4]=0,l[8]=_,l[12]=0,l[1]=0,l[5]=c,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=h,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,s,r,o,a=Ls){const l=this.elements,d=1/(t-e),c=1/(i-s),_=1/(o-r),f=(t+e)*d,m=(i+s)*c;let h,E;if(a===Ls)h=(o+r)*_,E=-2*_;else if(a===yu)h=r*_,E=-1*_;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*d,l[4]=0,l[8]=0,l[12]=-f,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=E,l[14]=-h,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<16;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Lo=new be,Mi=new At,r1t=new be(0,0,0),o1t=new be(1,1,1),ir=new be,rd=new be,ii=new be,I1=new At,M1=new Dr;class hp{constructor(e=0,t=0,i=0,s=hp.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,s=this._order){return this._x=e,this._y=t,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],d=s[5],c=s[9],_=s[2],f=s[6],m=s[10];switch(t){case"XYZ":this._y=Math.asin(kn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,m),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(f,d),this._z=0);break;case"YXZ":this._x=Math.asin(-kn(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,d)):(this._y=Math.atan2(-_,r),this._z=0);break;case"ZXY":this._x=Math.asin(kn(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-_,m),this._z=Math.atan2(-o,d)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-kn(_,-1,1)),Math.abs(_)<.9999999?(this._x=Math.atan2(f,m),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,d));break;case"YZX":this._z=Math.asin(kn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,d),this._y=Math.atan2(-_,r)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-kn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,d),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-c,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return I1.makeRotationFromQuaternion(e),this.setFromRotationMatrix(I1,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return M1.setFromEuler(this),this.setFromQuaternion(M1,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}hp.DEFAULT_ORDER="XYZ";class lI{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),s.maxGeometryCount=this._maxGeometryCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),this.boundingBox!==null&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()}));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let d=0,c=l.length;d0){s.children=[];for(let a=0;a0){s.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),d.length>0&&(i.textures=d),c.length>0&&(i.images=c),_.length>0&&(i.shapes=_),f.length>0&&(i.skeletons=f),m.length>0&&(i.animations=m),h.length>0&&(i.nodes=h)}return i.object=s,i;function o(a){const l=[];for(const d in a){const c=a[d];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,t,i,s,r){Di.subVectors(s,t),As.subVectors(i,t),eg.subVectors(e,t);const o=Di.dot(Di),a=Di.dot(As),l=Di.dot(eg),d=As.dot(As),c=As.dot(eg),_=o*d-a*a;if(_===0)return r.set(-2,-1,-1);const f=1/_,m=(d*l-a*c)*f,h=(o*c-a*l)*f;return r.set(1-m-h,h,m)}static containsPoint(e,t,i,s){return this.getBarycoord(e,t,i,s,ws),ws.x>=0&&ws.y>=0&&ws.x+ws.y<=1}static getUV(e,t,i,s,r,o,a,l){return ad===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),ad=!0),this.getInterpolation(e,t,i,s,r,o,a,l)}static getInterpolation(e,t,i,s,r,o,a,l){return this.getBarycoord(e,t,i,s,ws),l.setScalar(0),l.addScaledVector(r,ws.x),l.addScaledVector(o,ws.y),l.addScaledVector(a,ws.z),l}static isFrontFacing(e,t,i,s){return Di.subVectors(i,t),As.subVectors(e,t),Di.cross(As).dot(s)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,s){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,i,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Di.subVectors(this.c,this.b),As.subVectors(this.a,this.b),Di.cross(As).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Pi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Pi.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,s,r){return ad===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),ad=!0),Pi.getInterpolation(e,this.a,this.b,this.c,t,i,s,r)}getInterpolation(e,t,i,s,r){return Pi.getInterpolation(e,this.a,this.b,this.c,t,i,s,r)}containsPoint(e){return Pi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Pi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,s=this.b,r=this.c;let o,a;Uo.subVectors(s,i),Fo.subVectors(r,i),tg.subVectors(e,i);const l=Uo.dot(tg),d=Fo.dot(tg);if(l<=0&&d<=0)return t.copy(i);ng.subVectors(e,s);const c=Uo.dot(ng),_=Fo.dot(ng);if(c>=0&&_<=c)return t.copy(s);const f=l*_-c*d;if(f<=0&&l>=0&&c<=0)return o=l/(l-c),t.copy(i).addScaledVector(Uo,o);ig.subVectors(e,r);const m=Uo.dot(ig),h=Fo.dot(ig);if(h>=0&&m<=h)return t.copy(r);const E=m*d-l*h;if(E<=0&&d>=0&&h<=0)return a=d/(d-h),t.copy(i).addScaledVector(Fo,a);const b=c*h-m*_;if(b<=0&&_-c>=0&&m-h>=0)return U1.subVectors(r,s),a=(_-c)/(_-c+(m-h)),t.copy(s).addScaledVector(U1,a);const g=1/(b+E+f);return o=E*g,a=f*g,t.copy(i).addScaledVector(Uo,o).addScaledVector(Fo,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const cI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},sr={h:0,s:0,l:0},ld={h:0,s:0,l:0};function sg(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class gt{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=rn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Bt.toWorkingColorSpace(this,t),this}setRGB(e,t,i,s=Bt.workingColorSpace){return this.r=e,this.g=t,this.b=i,Bt.toWorkingColorSpace(this,s),this}setHSL(e,t,i,s=Bt.workingColorSpace){if(e=ev(e,1),t=kn(t,0,1),i=kn(i,0,1),t===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+t):i+t-i*t,o=2*i-r;this.r=sg(o,r,e+1/3),this.g=sg(o,r,e),this.b=sg(o,r,e-1/3)}return Bt.toWorkingColorSpace(this,s),this}setStyle(e,t=rn){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=s[1],a=s[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=rn){const i=cI[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=la(e.r),this.g=la(e.g),this.b=la(e.b),this}copyLinearToSRGB(e){return this.r=$m(e.r),this.g=$m(e.g),this.b=$m(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=rn){return Bt.fromWorkingColorSpace(Mn.copy(this),e),Math.round(kn(Mn.r*255,0,255))*65536+Math.round(kn(Mn.g*255,0,255))*256+Math.round(kn(Mn.b*255,0,255))}getHexString(e=rn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Bt.workingColorSpace){Bt.fromWorkingColorSpace(Mn.copy(this),t);const i=Mn.r,s=Mn.g,r=Mn.b,o=Math.max(i,s,r),a=Math.min(i,s,r);let l,d;const c=(a+o)/2;if(a===o)l=0,d=0;else{const _=o-a;switch(d=c<=.5?_/(o+a):_/(2-o-a),o){case i:l=(s-r)/_+(s0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==aa&&(i.blending=this.blending),this.side!==Vs&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==ab&&(i.blendSrc=this.blendSrc),this.blendDst!==lb&&(i.blendDst=this.blendDst),this.blendEquation!==Jr&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==mu&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==x1&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Oo&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Oo&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Oo&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=s(e.textures),o=s(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const s=t.length;i=new Array(s);for(let r=0;r!==s;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Er extends Vi{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new gt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=QE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const cn=new be,cd=new Mt;class Yn{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=_b,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=ks,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let s=0,r=this.itemSize;s0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const d in l)l[d]!==void 0&&(e[d]=l[d]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const d=i[l];e.data.attributes[l]=d.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const d=this.morphAttributes[l],c=[];for(let _=0,f=d.length;_0&&(s[l]=c,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const s=e.attributes;for(const d in s){const c=s[d];this.setAttribute(d,c.clone(t))}const r=e.morphAttributes;for(const d in r){const c=[],_=r[d];for(let f=0,m=_.length;f0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r(e.far-e.near)**2))&&(F1.copy(r).invert(),Vr.copy(e.ray).applyMatrix4(F1),!(i.boundingBox!==null&&Vr.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Vr)))}_computeIntersections(e,t,i){let s;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,d=r.attributes.uv,c=r.attributes.uv1,_=r.attributes.normal,f=r.groups,m=r.drawRange;if(a!==null)if(Array.isArray(o))for(let h=0,E=f.length;ht.far?null:{distance:d,point:md.clone(),object:n}}function gd(n,e,t,i,s,r,o,a,l,d){n.getVertexPosition(a,Go),n.getVertexPosition(l,zo),n.getVertexPosition(d,Vo);const c=h1t(n,e,t,i,Go,zo,Vo,fd);if(c){s&&(pd.fromBufferAttribute(s,a),_d.fromBufferAttribute(s,l),hd.fromBufferAttribute(s,d),c.uv=Pi.getInterpolation(fd,Go,zo,Vo,pd,_d,hd,new Mt)),r&&(pd.fromBufferAttribute(r,a),_d.fromBufferAttribute(r,l),hd.fromBufferAttribute(r,d),c.uv1=Pi.getInterpolation(fd,Go,zo,Vo,pd,_d,hd,new Mt),c.uv2=c.uv1),o&&(G1.fromBufferAttribute(o,a),z1.fromBufferAttribute(o,l),V1.fromBufferAttribute(o,d),c.normal=Pi.getInterpolation(fd,Go,zo,Vo,G1,z1,V1,new be),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));const _={a,b:l,c:d,normal:new be,materialIndex:0};Pi.getNormal(Go,zo,Vo,_.normal),c.face=_}return c}class Cr extends fs{constructor(e=1,t=1,i=1,s=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:s,heightSegments:r,depthSegments:o};const a=this;s=Math.floor(s),r=Math.floor(r),o=Math.floor(o);const l=[],d=[],c=[],_=[];let f=0,m=0;h("z","y","x",-1,-1,i,t,e,o,r,0),h("z","y","x",1,-1,i,t,-e,o,r,1),h("x","z","y",1,1,e,i,t,s,o,2),h("x","z","y",1,-1,e,i,-t,s,o,3),h("x","y","z",1,-1,e,t,i,s,r,4),h("x","y","z",-1,-1,e,t,-i,s,r,5),this.setIndex(l),this.setAttribute("position",new Us(d,3)),this.setAttribute("normal",new Us(c,3)),this.setAttribute("uv",new Us(_,2));function h(E,b,g,v,y,T,C,x,O,R,S){const A=T/O,U=C/R,F=T/2,K=C/2,L=x/2,H=O+1,G=R+1;let P=0,j=0;const Y=new be;for(let Q=0;Q0?1:-1,c.push(Y.x,Y.y,Y.z),_.push(te/O),_.push(1-Q/R),P+=1}}for(let Q=0;Q0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class _I extends sn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new At,this.projectionMatrix=new At,this.projectionMatrixInverse=new At,this.coordinateSystem=Ls}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Vn extends _I{constructor(e=50,t=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Na*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Fl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Na*2*Math.atan(Math.tan(Fl*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,s,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Fl*.5*this.fov)/this.zoom,i=2*t,s=this.aspect*i,r=-.5*s;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,d=o.fullHeight;r+=o.offsetX*s/l,t-=o.offsetY*i/d,s*=o.width/l,i*=o.height/d}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+s,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Ho=-90,qo=1;class g1t extends sn{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new Vn(Ho,qo,e,t);s.layers=this.layers,this.add(s);const r=new Vn(Ho,qo,e,t);r.layers=this.layers,this.add(r);const o=new Vn(Ho,qo,e,t);o.layers=this.layers,this.add(o);const a=new Vn(Ho,qo,e,t);a.layers=this.layers,this.add(a);const l=new Vn(Ho,qo,e,t);l.layers=this.layers,this.add(l);const d=new Vn(Ho,qo,e,t);d.layers=this.layers,this.add(d)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,s,r,o,a,l]=t;for(const d of t)this.remove(d);if(e===Ls)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===yu)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const d of t)this.add(d),d.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,l,d,c]=this.children,_=e.getRenderTarget(),f=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),h=e.xr.enabled;e.xr.enabled=!1;const E=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,s),e.render(t,r),e.setRenderTarget(i,1,s),e.render(t,o),e.setRenderTarget(i,2,s),e.render(t,a),e.setRenderTarget(i,3,s),e.render(t,l),e.setRenderTarget(i,4,s),e.render(t,d),i.texture.generateMipmaps=E,e.setRenderTarget(i,5,s),e.render(t,c),e.setRenderTarget(_,f,m),e.xr.enabled=h,i.texture.needsPMREMUpdate=!0}}class hI extends wn{constructor(e,t,i,s,r,o,a,l,d,c){e=e!==void 0?e:[],t=t!==void 0?t:xa,super(e,t,i,s,r,o,a,l,d,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class b1t extends bo{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},s=[i,i,i,i,i,i];t.encoding!==void 0&&(Gl("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===uo?rn:Ei),this.texture=new hI(s,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:jn}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class Eo extends Vi{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=g1t,this.fragmentShader=b1t,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Oa(e.uniforms),this.uniformsGroups=f1t(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const s in this.uniforms){const o=this.uniforms[s].value;o&&o.isTexture?t.uniforms[s]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[s]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[s]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[s]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[s]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[s]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[s]={type:"m4",value:o.toArray()}:t.uniforms[s]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class _I extends sn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new At,this.projectionMatrix=new At,this.projectionMatrixInverse=new At,this.coordinateSystem=Ls}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Vn extends _I{constructor(e=50,t=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Na*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Fl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Na*2*Math.atan(Math.tan(Fl*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,s,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Fl*.5*this.fov)/this.zoom,i=2*t,s=this.aspect*i,r=-.5*s;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,d=o.fullHeight;r+=o.offsetX*s/l,t-=o.offsetY*i/d,s*=o.width/l,i*=o.height/d}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+s,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Ho=-90,qo=1;class E1t extends sn{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new Vn(Ho,qo,e,t);s.layers=this.layers,this.add(s);const r=new Vn(Ho,qo,e,t);r.layers=this.layers,this.add(r);const o=new Vn(Ho,qo,e,t);o.layers=this.layers,this.add(o);const a=new Vn(Ho,qo,e,t);a.layers=this.layers,this.add(a);const l=new Vn(Ho,qo,e,t);l.layers=this.layers,this.add(l);const d=new Vn(Ho,qo,e,t);d.layers=this.layers,this.add(d)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,s,r,o,a,l]=t;for(const d of t)this.remove(d);if(e===Ls)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===yu)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const d of t)this.add(d),d.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,l,d,c]=this.children,_=e.getRenderTarget(),f=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),h=e.xr.enabled;e.xr.enabled=!1;const E=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,s),e.render(t,r),e.setRenderTarget(i,1,s),e.render(t,o),e.setRenderTarget(i,2,s),e.render(t,a),e.setRenderTarget(i,3,s),e.render(t,l),e.setRenderTarget(i,4,s),e.render(t,d),i.texture.generateMipmaps=E,e.setRenderTarget(i,5,s),e.render(t,c),e.setRenderTarget(_,f,m),e.xr.enabled=h,i.texture.needsPMREMUpdate=!0}}class hI extends wn{constructor(e,t,i,s,r,o,a,l,d,c){e=e!==void 0?e:[],t=t!==void 0?t:xa,super(e,t,i,s,r,o,a,l,d,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class v1t extends bo{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},s=[i,i,i,i,i,i];t.encoding!==void 0&&(Gl("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===uo?rn:Ei),this.texture=new hI(s,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:jn}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -258,9 +258,9 @@ ${l}`;navigator.clipboard.writeText(d)}else navigator.clipboard.writeText(e);thi gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},s=new Cr(5,5,5),r=new Eo({name:"CubemapFromEquirect",uniforms:Oa(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Zn,blending:Sr});r.uniforms.tEquirect.value=t;const o=new Hn(s,r),a=t.minFilter;return t.minFilter===go&&(t.minFilter=jn),new g1t(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,s){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,s);e.setRenderTarget(r)}}const ag=new be,E1t=new be,v1t=new Rt;class Wr{constructor(e=new be(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,s){return this.normal.set(e,t,i),this.constant=s,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const s=ag.subVectors(i,t).cross(E1t.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(s,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(ag),s=this.normal.dot(i);if(s===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/s;return r<0||r>1?null:t.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||v1t.getNormalMatrix(e),s=this.coplanarPoint(ag).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Hr=new hs,bd=new be;class tv{constructor(e=new Wr,t=new Wr,i=new Wr,s=new Wr,r=new Wr,o=new Wr){this.planes=[e,t,i,s,r,o]}set(e,t,i,s,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Ls){const i=this.planes,s=e.elements,r=s[0],o=s[1],a=s[2],l=s[3],d=s[4],c=s[5],_=s[6],f=s[7],m=s[8],h=s[9],E=s[10],b=s[11],g=s[12],v=s[13],y=s[14],T=s[15];if(i[0].setComponents(l-r,f-d,b-m,T-g).normalize(),i[1].setComponents(l+r,f+d,b+m,T+g).normalize(),i[2].setComponents(l+o,f+c,b+h,T+v).normalize(),i[3].setComponents(l-o,f-c,b-h,T-v).normalize(),i[4].setComponents(l-a,f-_,b-E,T-y).normalize(),t===Ls)i[5].setComponents(l+a,f+_,b+E,T+y).normalize();else if(t===yu)i[5].setComponents(a,_,E,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Hr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Hr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Hr)}intersectsSprite(e){return Hr.center.set(0,0,0),Hr.radius=.7071067811865476,Hr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Hr)}intersectsSphere(e){const t=this.planes,i=e.center,s=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,bd.y=s.normal.y>0?e.max.y:e.min.y,bd.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(bd)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function fI(){let n=null,e=!1,t=null,i=null;function s(r,o){t(r,o),i=n.requestAnimationFrame(s)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(s),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){n=r}}}function y1t(n,e){const t=e.isWebGL2,i=new WeakMap;function s(d,c){const _=d.array,f=d.usage,m=_.byteLength,h=n.createBuffer();n.bindBuffer(c,h),n.bufferData(c,_,f),d.onUploadCallback();let E;if(_ instanceof Float32Array)E=n.FLOAT;else if(_ instanceof Uint16Array)if(d.isFloat16BufferAttribute)if(t)E=n.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else E=n.UNSIGNED_SHORT;else if(_ instanceof Int16Array)E=n.SHORT;else if(_ instanceof Uint32Array)E=n.UNSIGNED_INT;else if(_ instanceof Int32Array)E=n.INT;else if(_ instanceof Int8Array)E=n.BYTE;else if(_ instanceof Uint8Array)E=n.UNSIGNED_BYTE;else if(_ instanceof Uint8ClampedArray)E=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+_);return{buffer:h,type:E,bytesPerElement:_.BYTES_PER_ELEMENT,version:d.version,size:m}}function r(d,c,_){const f=c.array,m=c._updateRange,h=c.updateRanges;if(n.bindBuffer(_,d),m.count===-1&&h.length===0&&n.bufferSubData(_,0,f),h.length!==0){for(let E=0,b=h.length;E1?null:t.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||S1t.getNormalMatrix(e),s=this.coplanarPoint(ag).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Hr=new hs,bd=new be;class tv{constructor(e=new Wr,t=new Wr,i=new Wr,s=new Wr,r=new Wr,o=new Wr){this.planes=[e,t,i,s,r,o]}set(e,t,i,s,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Ls){const i=this.planes,s=e.elements,r=s[0],o=s[1],a=s[2],l=s[3],d=s[4],c=s[5],_=s[6],f=s[7],m=s[8],h=s[9],E=s[10],b=s[11],g=s[12],v=s[13],y=s[14],T=s[15];if(i[0].setComponents(l-r,f-d,b-m,T-g).normalize(),i[1].setComponents(l+r,f+d,b+m,T+g).normalize(),i[2].setComponents(l+o,f+c,b+h,T+v).normalize(),i[3].setComponents(l-o,f-c,b-h,T-v).normalize(),i[4].setComponents(l-a,f-_,b-E,T-y).normalize(),t===Ls)i[5].setComponents(l+a,f+_,b+E,T+y).normalize();else if(t===yu)i[5].setComponents(a,_,E,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Hr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Hr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Hr)}intersectsSprite(e){return Hr.center.set(0,0,0),Hr.radius=.7071067811865476,Hr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Hr)}intersectsSphere(e){const t=this.planes,i=e.center,s=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,bd.y=s.normal.y>0?e.max.y:e.min.y,bd.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(bd)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function fI(){let n=null,e=!1,t=null,i=null;function s(r,o){t(r,o),i=n.requestAnimationFrame(s)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(s),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){n=r}}}function T1t(n,e){const t=e.isWebGL2,i=new WeakMap;function s(d,c){const _=d.array,f=d.usage,m=_.byteLength,h=n.createBuffer();n.bindBuffer(c,h),n.bufferData(c,_,f),d.onUploadCallback();let E;if(_ instanceof Float32Array)E=n.FLOAT;else if(_ instanceof Uint16Array)if(d.isFloat16BufferAttribute)if(t)E=n.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else E=n.UNSIGNED_SHORT;else if(_ instanceof Int16Array)E=n.SHORT;else if(_ instanceof Uint32Array)E=n.UNSIGNED_INT;else if(_ instanceof Int32Array)E=n.INT;else if(_ instanceof Int8Array)E=n.BYTE;else if(_ instanceof Uint8Array)E=n.UNSIGNED_BYTE;else if(_ instanceof Uint8ClampedArray)E=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+_);return{buffer:h,type:E,bytesPerElement:_.BYTES_PER_ELEMENT,version:d.version,size:m}}function r(d,c,_){const f=c.array,m=c._updateRange,h=c.updateRanges;if(n.bindBuffer(_,d),m.count===-1&&h.length===0&&n.bufferSubData(_,0,f),h.length!==0){for(let E=0,b=h.length;E 0 +#endif`,B1t=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -457,26 +457,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,F1t=`#if NUM_CLIPPING_PLANES > 0 +#endif`,G1t=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,B1t=`#if NUM_CLIPPING_PLANES > 0 +#endif`,z1t=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,G1t=`#if NUM_CLIPPING_PLANES > 0 +#endif`,V1t=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,z1t=`#if defined( USE_COLOR_ALPHA ) +#endif`,H1t=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,V1t=`#if defined( USE_COLOR_ALPHA ) +#endif`,q1t=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,H1t=`#if defined( USE_COLOR_ALPHA ) +#endif`,Y1t=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,q1t=`#if defined( USE_COLOR_ALPHA ) +#endif`,$1t=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -486,7 +486,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,Y1t=`#define PI 3.141592653589793 +#endif`,W1t=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -564,7 +564,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,$1t=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,K1t=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -662,7 +662,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,W1t=`vec3 transformedNormal = objectNormal; +#endif`,j1t=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -691,18 +691,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,K1t=`#ifdef USE_DISPLACEMENTMAP +#endif`,Q1t=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,j1t=`#ifdef USE_DISPLACEMENTMAP +#endif`,X1t=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,Q1t=`#ifdef USE_EMISSIVEMAP +#endif`,Z1t=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,X1t=`#ifdef USE_EMISSIVEMAP +#endif`,J1t=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,Z1t="gl_FragColor = linearToOutputTexel( gl_FragColor );",J1t=` +#endif`,eRt="gl_FragColor = linearToOutputTexel( gl_FragColor );",tRt=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -730,7 +730,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,eRt=`#ifdef USE_ENVMAP +}`,nRt=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -759,7 +759,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,tRt=`#ifdef USE_ENVMAP +#endif`,iRt=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -768,7 +768,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,nRt=`#ifdef USE_ENVMAP +#endif`,sRt=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -779,7 +779,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,iRt=`#ifdef USE_ENVMAP +#endif`,rRt=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -790,7 +790,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,sRt=`#ifdef USE_ENVMAP +#endif`,oRt=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -807,18 +807,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,rRt=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; -#endif`,oRt=`#ifdef USE_FOG - varying float vFogDepth; #endif`,aRt=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,lRt=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,cRt=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,lRt=`#ifdef USE_FOG +#endif`,dRt=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -827,7 +827,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,cRt=`#ifdef USE_GRADIENTMAP +#endif`,uRt=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -839,16 +839,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,dRt=`#ifdef USE_LIGHTMAP +}`,pRt=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,uRt=`#ifdef USE_LIGHTMAP +#endif`,_Rt=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,pRt=`LambertMaterial material; +#endif`,hRt=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,_Rt=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,fRt=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -862,7 +862,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,hRt=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,mRt=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -985,7 +985,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,fRt=`#ifdef USE_ENVMAP +#endif`,gRt=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -1018,8 +1018,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,mRt=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,gRt=`varying vec3 vViewPosition; +#endif`,bRt=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,ERt=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -1031,11 +1031,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,bRt=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,vRt=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,ERt=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,yRt=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1052,7 +1052,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,vRt=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,SRt=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -1135,7 +1135,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,yRt=`struct PhysicalMaterial { +#endif`,TRt=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1435,7 +1435,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,SRt=` +}`,xRt=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1550,7 +1550,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,TRt=`#if defined( RE_IndirectDiffuse ) +#endif`,CRt=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1569,25 +1569,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,xRt=`#if defined( RE_IndirectDiffuse ) +#endif`,RRt=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,CRt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,ARt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,RRt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,wRt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,ARt=`#ifdef USE_LOGDEPTHBUF +#endif`,NRt=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,wRt=`#ifdef USE_LOGDEPTHBUF +#endif`,ORt=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1597,16 +1597,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,NRt=`#ifdef USE_MAP +#endif`,IRt=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,ORt=`#ifdef USE_MAP +#endif`,MRt=`#ifdef USE_MAP uniform sampler2D map; -#endif`,IRt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,DRt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1618,7 +1618,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,MRt=`#if defined( USE_POINTS_UV ) +#endif`,kRt=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1630,13 +1630,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,DRt=`float metalnessFactor = metalness; +#endif`,LRt=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,kRt=`#ifdef USE_METALNESSMAP +#endif`,PRt=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,LRt=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,URt=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1645,7 +1645,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,PRt=`#ifdef USE_MORPHNORMALS +#endif`,FRt=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1657,7 +1657,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,URt=`#ifdef USE_MORPHTARGETS +#endif`,BRt=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1677,7 +1677,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,FRt=`#ifdef USE_MORPHTARGETS +#endif`,GRt=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1695,7 +1695,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,BRt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,zRt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1736,7 +1736,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,GRt=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,VRt=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1751,25 +1751,25 @@ vec3 nonPerturbedNormal = normal;`,GRt=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,zRt=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,VRt=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif #endif`,HRt=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,qRt=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,YRt=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,qRt=`#ifdef USE_NORMALMAP +#endif`,$Rt=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1791,13 +1791,13 @@ vec3 nonPerturbedNormal = normal;`,GRt=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,YRt=`#ifdef USE_CLEARCOAT +#endif`,WRt=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,$Rt=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,KRt=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,WRt=`#ifdef USE_CLEARCOATMAP +#endif`,jRt=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1806,18 +1806,18 @@ vec3 nonPerturbedNormal = normal;`,GRt=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,KRt=`#ifdef USE_IRIDESCENCEMAP +#endif`,QRt=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,jRt=`#ifdef OPAQUE +#endif`,XRt=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,QRt=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,ZRt=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1858,9 +1858,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,XRt=`#ifdef PREMULTIPLIED_ALPHA +}`,JRt=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,ZRt=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,eAt=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1868,22 +1868,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,JRt=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,tAt=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,eAt=`#ifdef DITHERING +#endif`,nAt=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,tAt=`float roughnessFactor = roughness; +#endif`,iAt=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,nAt=`#ifdef USE_ROUGHNESSMAP +#endif`,sAt=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,iAt=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,rAt=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -2060,7 +2060,7 @@ gl_Position = projectionMatrix * mvPosition;`,JRt=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,sAt=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,oAt=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -2098,7 +2098,7 @@ gl_Position = projectionMatrix * mvPosition;`,JRt=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,rAt=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,aAt=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -2130,7 +2130,7 @@ gl_Position = projectionMatrix * mvPosition;`,JRt=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,oAt=`float getShadowMask() { +#endif`,lAt=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2162,12 +2162,12 @@ gl_Position = projectionMatrix * mvPosition;`,JRt=`#ifdef DITHERING #endif #endif return shadow; -}`,aAt=`#ifdef USE_SKINNING +}`,cAt=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,lAt=`#ifdef USE_SKINNING +#endif`,dAt=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2182,7 +2182,7 @@ gl_Position = projectionMatrix * mvPosition;`,JRt=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,cAt=`#ifdef USE_SKINNING +#endif`,uAt=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2190,7 +2190,7 @@ gl_Position = projectionMatrix * mvPosition;`,JRt=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,dAt=`#ifdef USE_SKINNING +#endif`,pAt=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2201,17 +2201,17 @@ gl_Position = projectionMatrix * mvPosition;`,JRt=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,uAt=`float specularStrength; +#endif`,_At=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,pAt=`#ifdef USE_SPECULARMAP +#endif`,hAt=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,_At=`#if defined( TONE_MAPPING ) +#endif`,fAt=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,hAt=`#ifndef saturate +#endif`,mAt=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2247,7 +2247,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,fAt=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,gAt=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2268,7 +2268,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,fAt=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,mAt=`#ifdef USE_TRANSMISSION +#endif`,bAt=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2374,7 +2374,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,fAt=`#ifdef USE_TRANSMIS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,gAt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,EAt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2444,7 +2444,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,fAt=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,bAt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,vAt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2538,7 +2538,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,fAt=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,EAt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,yAt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2609,7 +2609,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,fAt=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,vAt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,SAt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2618,12 +2618,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,fAt=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const yAt=`varying vec2 vUv; +#endif`;const TAt=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,SAt=`uniform sampler2D t2D; +}`,xAt=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2635,14 +2635,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,TAt=`varying vec3 vWorldDirection; +}`,CAt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,xAt=`#ifdef ENVMAP_TYPE_CUBE +}`,RAt=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2664,14 +2664,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,CAt=`varying vec3 vWorldDirection; +}`,AAt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,RAt=`uniform samplerCube tCube; +}`,wAt=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2681,7 +2681,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,AAt=`#include +}`,NAt=`#include #include #include #include @@ -2707,7 +2707,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,wAt=`#if DEPTH_PACKING == 3200 +}`,OAt=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2737,7 +2737,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,NAt=`#define DISTANCE +}`,IAt=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2763,7 +2763,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,OAt=`#define DISTANCE +}`,MAt=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2787,13 +2787,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,IAt=`varying vec3 vWorldDirection; +}`,DAt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,MAt=`uniform sampler2D tEquirect; +}`,kAt=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2802,7 +2802,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,DAt=`uniform float scale; +}`,LAt=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2823,7 +2823,7 @@ void main() { #include #include #include -}`,kAt=`uniform vec3 diffuse; +}`,PAt=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2851,7 +2851,7 @@ void main() { #include #include #include -}`,LAt=`#include +}`,UAt=`#include #include #include #include @@ -2882,7 +2882,7 @@ void main() { #include #include #include -}`,PAt=`uniform vec3 diffuse; +}`,FAt=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2930,7 +2930,7 @@ void main() { #include #include #include -}`,UAt=`#define LAMBERT +}`,BAt=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2968,7 +2968,7 @@ void main() { #include #include #include -}`,FAt=`#define LAMBERT +}`,GAt=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3025,7 +3025,7 @@ void main() { #include #include #include -}`,BAt=`#define MATCAP +}`,zAt=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -3058,7 +3058,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,GAt=`#define MATCAP +}`,VAt=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3104,7 +3104,7 @@ void main() { #include #include #include -}`,zAt=`#define NORMAL +}`,HAt=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3136,7 +3136,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,VAt=`#define NORMAL +}`,qAt=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3157,7 +3157,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,HAt=`#define PHONG +}`,YAt=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3195,7 +3195,7 @@ void main() { #include #include #include -}`,qAt=`#define PHONG +}`,$At=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3254,7 +3254,7 @@ void main() { #include #include #include -}`,YAt=`#define STANDARD +}`,WAt=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3296,7 +3296,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,$At=`#define STANDARD +}`,KAt=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3418,7 +3418,7 @@ void main() { #include #include #include -}`,WAt=`#define TOON +}`,jAt=`#define TOON varying vec3 vViewPosition; #include #include @@ -3454,7 +3454,7 @@ void main() { #include #include #include -}`,KAt=`#define TOON +}`,QAt=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3507,7 +3507,7 @@ void main() { #include #include #include -}`,jAt=`uniform float size; +}`,XAt=`uniform float size; uniform float scale; #include #include @@ -3537,7 +3537,7 @@ void main() { #include #include #include -}`,QAt=`uniform vec3 diffuse; +}`,ZAt=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3562,7 +3562,7 @@ void main() { #include #include #include -}`,XAt=`#include +}`,JAt=`#include #include #include #include @@ -3584,7 +3584,7 @@ void main() { #include #include #include -}`,ZAt=`uniform vec3 color; +}`,ewt=`uniform vec3 color; uniform float opacity; #include #include @@ -3600,7 +3600,7 @@ void main() { #include #include #include -}`,JAt=`uniform float rotation; +}`,twt=`uniform float rotation; uniform vec2 center; #include #include @@ -3626,7 +3626,7 @@ void main() { #include #include #include -}`,ewt=`uniform vec3 diffuse; +}`,nwt=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3651,7 +3651,7 @@ void main() { #include #include #include -}`,St={alphahash_fragment:S1t,alphahash_pars_fragment:T1t,alphamap_fragment:x1t,alphamap_pars_fragment:C1t,alphatest_fragment:R1t,alphatest_pars_fragment:A1t,aomap_fragment:w1t,aomap_pars_fragment:N1t,batching_pars_vertex:O1t,batching_vertex:I1t,begin_vertex:M1t,beginnormal_vertex:D1t,bsdfs:k1t,iridescence_fragment:L1t,bumpmap_pars_fragment:P1t,clipping_planes_fragment:U1t,clipping_planes_pars_fragment:F1t,clipping_planes_pars_vertex:B1t,clipping_planes_vertex:G1t,color_fragment:z1t,color_pars_fragment:V1t,color_pars_vertex:H1t,color_vertex:q1t,common:Y1t,cube_uv_reflection_fragment:$1t,defaultnormal_vertex:W1t,displacementmap_pars_vertex:K1t,displacementmap_vertex:j1t,emissivemap_fragment:Q1t,emissivemap_pars_fragment:X1t,colorspace_fragment:Z1t,colorspace_pars_fragment:J1t,envmap_fragment:eRt,envmap_common_pars_fragment:tRt,envmap_pars_fragment:nRt,envmap_pars_vertex:iRt,envmap_physical_pars_fragment:fRt,envmap_vertex:sRt,fog_vertex:rRt,fog_pars_vertex:oRt,fog_fragment:aRt,fog_pars_fragment:lRt,gradientmap_pars_fragment:cRt,lightmap_fragment:dRt,lightmap_pars_fragment:uRt,lights_lambert_fragment:pRt,lights_lambert_pars_fragment:_Rt,lights_pars_begin:hRt,lights_toon_fragment:mRt,lights_toon_pars_fragment:gRt,lights_phong_fragment:bRt,lights_phong_pars_fragment:ERt,lights_physical_fragment:vRt,lights_physical_pars_fragment:yRt,lights_fragment_begin:SRt,lights_fragment_maps:TRt,lights_fragment_end:xRt,logdepthbuf_fragment:CRt,logdepthbuf_pars_fragment:RRt,logdepthbuf_pars_vertex:ARt,logdepthbuf_vertex:wRt,map_fragment:NRt,map_pars_fragment:ORt,map_particle_fragment:IRt,map_particle_pars_fragment:MRt,metalnessmap_fragment:DRt,metalnessmap_pars_fragment:kRt,morphcolor_vertex:LRt,morphnormal_vertex:PRt,morphtarget_pars_vertex:URt,morphtarget_vertex:FRt,normal_fragment_begin:BRt,normal_fragment_maps:GRt,normal_pars_fragment:zRt,normal_pars_vertex:VRt,normal_vertex:HRt,normalmap_pars_fragment:qRt,clearcoat_normal_fragment_begin:YRt,clearcoat_normal_fragment_maps:$Rt,clearcoat_pars_fragment:WRt,iridescence_pars_fragment:KRt,opaque_fragment:jRt,packing:QRt,premultiplied_alpha_fragment:XRt,project_vertex:ZRt,dithering_fragment:JRt,dithering_pars_fragment:eAt,roughnessmap_fragment:tAt,roughnessmap_pars_fragment:nAt,shadowmap_pars_fragment:iAt,shadowmap_pars_vertex:sAt,shadowmap_vertex:rAt,shadowmask_pars_fragment:oAt,skinbase_vertex:aAt,skinning_pars_vertex:lAt,skinning_vertex:cAt,skinnormal_vertex:dAt,specularmap_fragment:uAt,specularmap_pars_fragment:pAt,tonemapping_fragment:_At,tonemapping_pars_fragment:hAt,transmission_fragment:fAt,transmission_pars_fragment:mAt,uv_pars_fragment:gAt,uv_pars_vertex:bAt,uv_vertex:EAt,worldpos_vertex:vAt,background_vert:yAt,background_frag:SAt,backgroundCube_vert:TAt,backgroundCube_frag:xAt,cube_vert:CAt,cube_frag:RAt,depth_vert:AAt,depth_frag:wAt,distanceRGBA_vert:NAt,distanceRGBA_frag:OAt,equirect_vert:IAt,equirect_frag:MAt,linedashed_vert:DAt,linedashed_frag:kAt,meshbasic_vert:LAt,meshbasic_frag:PAt,meshlambert_vert:UAt,meshlambert_frag:FAt,meshmatcap_vert:BAt,meshmatcap_frag:GAt,meshnormal_vert:zAt,meshnormal_frag:VAt,meshphong_vert:HAt,meshphong_frag:qAt,meshphysical_vert:YAt,meshphysical_frag:$At,meshtoon_vert:WAt,meshtoon_frag:KAt,points_vert:jAt,points_frag:QAt,shadow_vert:XAt,shadow_frag:ZAt,sprite_vert:JAt,sprite_frag:ewt},Ke={common:{diffuse:{value:new gt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Rt},alphaMap:{value:null},alphaMapTransform:{value:new Rt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Rt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Rt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Rt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Rt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Rt},normalScale:{value:new Mt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Rt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Rt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Rt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Rt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new gt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Rt},alphaTest:{value:0},uvTransform:{value:new Rt}},sprite:{diffuse:{value:new gt(16777215)},opacity:{value:1},center:{value:new Mt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Rt},alphaMap:{value:null},alphaMapTransform:{value:new Rt},alphaTest:{value:0}}},Xi={basic:{uniforms:Gn([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.fog]),vertexShader:St.meshbasic_vert,fragmentShader:St.meshbasic_frag},lambert:{uniforms:Gn([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,Ke.lights,{emissive:{value:new gt(0)}}]),vertexShader:St.meshlambert_vert,fragmentShader:St.meshlambert_frag},phong:{uniforms:Gn([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,Ke.lights,{emissive:{value:new gt(0)},specular:{value:new gt(1118481)},shininess:{value:30}}]),vertexShader:St.meshphong_vert,fragmentShader:St.meshphong_frag},standard:{uniforms:Gn([Ke.common,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.roughnessmap,Ke.metalnessmap,Ke.fog,Ke.lights,{emissive:{value:new gt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:St.meshphysical_vert,fragmentShader:St.meshphysical_frag},toon:{uniforms:Gn([Ke.common,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.gradientmap,Ke.fog,Ke.lights,{emissive:{value:new gt(0)}}]),vertexShader:St.meshtoon_vert,fragmentShader:St.meshtoon_frag},matcap:{uniforms:Gn([Ke.common,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,{matcap:{value:null}}]),vertexShader:St.meshmatcap_vert,fragmentShader:St.meshmatcap_frag},points:{uniforms:Gn([Ke.points,Ke.fog]),vertexShader:St.points_vert,fragmentShader:St.points_frag},dashed:{uniforms:Gn([Ke.common,Ke.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:St.linedashed_vert,fragmentShader:St.linedashed_frag},depth:{uniforms:Gn([Ke.common,Ke.displacementmap]),vertexShader:St.depth_vert,fragmentShader:St.depth_frag},normal:{uniforms:Gn([Ke.common,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,{opacity:{value:1}}]),vertexShader:St.meshnormal_vert,fragmentShader:St.meshnormal_frag},sprite:{uniforms:Gn([Ke.sprite,Ke.fog]),vertexShader:St.sprite_vert,fragmentShader:St.sprite_frag},background:{uniforms:{uvTransform:{value:new Rt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:St.background_vert,fragmentShader:St.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:St.backgroundCube_vert,fragmentShader:St.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:St.cube_vert,fragmentShader:St.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:St.equirect_vert,fragmentShader:St.equirect_frag},distanceRGBA:{uniforms:Gn([Ke.common,Ke.displacementmap,{referencePosition:{value:new be},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:St.distanceRGBA_vert,fragmentShader:St.distanceRGBA_frag},shadow:{uniforms:Gn([Ke.lights,Ke.fog,{color:{value:new gt(0)},opacity:{value:1}}]),vertexShader:St.shadow_vert,fragmentShader:St.shadow_frag}};Xi.physical={uniforms:Gn([Xi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Rt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Rt},clearcoatNormalScale:{value:new Mt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Rt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Rt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Rt},sheen:{value:0},sheenColor:{value:new gt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Rt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Rt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Rt},transmissionSamplerSize:{value:new Mt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Rt},attenuationDistance:{value:0},attenuationColor:{value:new gt(0)},specularColor:{value:new gt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Rt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Rt},anisotropyVector:{value:new Mt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Rt}}]),vertexShader:St.meshphysical_vert,fragmentShader:St.meshphysical_frag};const Ed={r:0,b:0,g:0};function twt(n,e,t,i,s,r,o){const a=new gt(0);let l=r===!0?0:1,d,c,_=null,f=0,m=null;function h(b,g){let v=!1,y=g.isScene===!0?g.background:null;y&&y.isTexture&&(y=(g.backgroundBlurriness>0?t:e).get(y)),y===null?E(a,l):y&&y.isColor&&(E(y,1),v=!0);const T=n.xr.getEnvironmentBlendMode();T==="additive"?i.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||v)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),y&&(y.isCubeTexture||y.mapping===up)?(c===void 0&&(c=new Hn(new Cr(1,1,1),new Eo({name:"BackgroundCubeMaterial",uniforms:Oa(Xi.backgroundCube.uniforms),vertexShader:Xi.backgroundCube.vertexShader,fragmentShader:Xi.backgroundCube.fragmentShader,side:Zn,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(C,x,O){this.matrixWorld.copyPosition(O.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(c)),c.material.uniforms.envMap.value=y,c.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,c.material.toneMapped=Bt.getTransfer(y.colorSpace)!==Xt,(_!==y||f!==y.version||m!==n.toneMapping)&&(c.material.needsUpdate=!0,_=y,f=y.version,m=n.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null)):y&&y.isTexture&&(d===void 0&&(d=new Hn(new nv(2,2),new Eo({name:"BackgroundMaterial",uniforms:Oa(Xi.background.uniforms),vertexShader:Xi.background.vertexShader,fragmentShader:Xi.background.fragmentShader,side:Vs,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),Object.defineProperty(d.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(d)),d.material.uniforms.t2D.value=y,d.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,d.material.toneMapped=Bt.getTransfer(y.colorSpace)!==Xt,y.matrixAutoUpdate===!0&&y.updateMatrix(),d.material.uniforms.uvTransform.value.copy(y.matrix),(_!==y||f!==y.version||m!==n.toneMapping)&&(d.material.needsUpdate=!0,_=y,f=y.version,m=n.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null))}function E(b,g){b.getRGB(Ed,pI(n)),i.buffers.color.setClear(Ed.r,Ed.g,Ed.b,g,o)}return{getClearColor:function(){return a},setClearColor:function(b,g=1){a.set(b),l=g,E(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,E(a,l)},render:h}}function nwt(n,e,t,i){const s=n.getParameter(n.MAX_VERTEX_ATTRIBS),r=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||r!==null,a={},l=b(null);let d=l,c=!1;function _(L,H,G,P,j){let Y=!1;if(o){const Q=E(P,G,H);d!==Q&&(d=Q,m(d.object)),Y=g(L,P,G,j),Y&&v(L,P,G,j)}else{const Q=H.wireframe===!0;(d.geometry!==P.id||d.program!==G.id||d.wireframe!==Q)&&(d.geometry=P.id,d.program=G.id,d.wireframe=Q,Y=!0)}j!==null&&t.update(j,n.ELEMENT_ARRAY_BUFFER),(Y||c)&&(c=!1,R(L,H,G,P),j!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(j).buffer))}function f(){return i.isWebGL2?n.createVertexArray():r.createVertexArrayOES()}function m(L){return i.isWebGL2?n.bindVertexArray(L):r.bindVertexArrayOES(L)}function h(L){return i.isWebGL2?n.deleteVertexArray(L):r.deleteVertexArrayOES(L)}function E(L,H,G){const P=G.wireframe===!0;let j=a[L.id];j===void 0&&(j={},a[L.id]=j);let Y=j[H.id];Y===void 0&&(Y={},j[H.id]=Y);let Q=Y[P];return Q===void 0&&(Q=b(f()),Y[P]=Q),Q}function b(L){const H=[],G=[],P=[];for(let j=0;j=0){const me=j[te];let ve=Y[te];if(ve===void 0&&(te==="instanceMatrix"&&L.instanceMatrix&&(ve=L.instanceMatrix),te==="instanceColor"&&L.instanceColor&&(ve=L.instanceColor)),me===void 0||me.attribute!==ve||ve&&me.data!==ve.data)return!0;Q++}return d.attributesNum!==Q||d.index!==P}function v(L,H,G,P){const j={},Y=H.attributes;let Q=0;const ae=G.getAttributes();for(const te in ae)if(ae[te].location>=0){let me=Y[te];me===void 0&&(te==="instanceMatrix"&&L.instanceMatrix&&(me=L.instanceMatrix),te==="instanceColor"&&L.instanceColor&&(me=L.instanceColor));const ve={};ve.attribute=me,me&&me.data&&(ve.data=me.data),j[te]=ve,Q++}d.attributes=j,d.attributesNum=Q,d.index=P}function y(){const L=d.newAttributes;for(let H=0,G=L.length;H=0){let Z=j[ae];if(Z===void 0&&(ae==="instanceMatrix"&&L.instanceMatrix&&(Z=L.instanceMatrix),ae==="instanceColor"&&L.instanceColor&&(Z=L.instanceColor)),Z!==void 0){const me=Z.normalized,ve=Z.itemSize,Ae=t.get(Z);if(Ae===void 0)continue;const J=Ae.buffer,ge=Ae.type,ee=Ae.bytesPerElement,Se=i.isWebGL2===!0&&(ge===n.INT||ge===n.UNSIGNED_INT||Z.gpuType===KO);if(Z.isInterleavedBufferAttribute){const Ie=Z.data,k=Ie.stride,B=Z.offset;if(Ie.isInstancedInterleavedBuffer){for(let $=0;$0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";O="mediump"}return O==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const l=r(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const d=o||e.has("WEBGL_draw_buffers"),c=t.logarithmicDepthBuffer===!0,_=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),f=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_TEXTURE_SIZE),h=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),E=n.getParameter(n.MAX_VERTEX_ATTRIBS),b=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),g=n.getParameter(n.MAX_VARYING_VECTORS),v=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),y=f>0,T=o||e.has("OES_texture_float"),C=y&&T,x=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:d,getMaxAnisotropy:s,getMaxPrecision:r,precision:a,logarithmicDepthBuffer:c,maxTextures:_,maxVertexTextures:f,maxTextureSize:m,maxCubemapSize:h,maxAttributes:E,maxVertexUniforms:b,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:T,floatVertexTextures:C,maxSamples:x}}function rwt(n){const e=this;let t=null,i=0,s=!1,r=!1;const o=new Wr,a=new Rt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(_,f){const m=_.length!==0||f||i!==0||s;return s=f,i=_.length,m},this.beginShadows=function(){r=!0,c(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(_,f){t=c(_,f,0)},this.setState=function(_,f,m){const h=_.clippingPlanes,E=_.clipIntersection,b=_.clipShadows,g=n.get(_);if(!s||h===null||h.length===0||r&&!b)r?c(null):d();else{const v=r?0:i,y=v*4;let T=g.clippingState||null;l.value=T,T=c(h,f,y,m);for(let C=0;C!==y;++C)T[C]=t[C];g.clippingState=T,this.numIntersection=E?this.numPlanes:0,this.numPlanes+=v}};function d(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function c(_,f,m,h){const E=_!==null?_.length:0;let b=null;if(E!==0){if(b=l.value,h!==!0||b===null){const g=m+E*4,v=f.matrixWorldInverse;a.getNormalMatrix(v),(b===null||b.length0){const d=new b1t(l.height/2);return d.fromEquirectangularTexture(n,o),e.set(o,d),o.addEventListener("dispose",s),t(d.texture,o.mapping)}else return null}}return o}function s(o){const a=o.target;a.removeEventListener("dispose",s);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}class iv extends _I{constructor(e=-1,t=1,i=1,s=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=s,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,s,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let r=i-e,o=i+e,a=s+t,l=s-t;if(this.view!==null&&this.view.enabled){const d=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=d*this.view.offsetX,o=r+d*this.view.width,a-=c*this.view.offsetY,l=a-c*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const Xo=4,H1=[.125,.215,.35,.446,.526,.582],eo=20,lg=new iv,q1=new gt;let cg=null,dg=0,ug=0;const Kr=(1+Math.sqrt(5))/2,Yo=1/Kr,Y1=[new be(1,1,1),new be(-1,1,1),new be(1,1,-1),new be(-1,1,-1),new be(0,Kr,Yo),new be(0,Kr,-Yo),new be(Yo,0,Kr),new be(-Yo,0,Kr),new be(Kr,Yo,0),new be(-Kr,Yo,0)];class $1{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,s=100){cg=this._renderer.getRenderTarget(),dg=this._renderer.getActiveCubeFace(),ug=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,i,s,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=j1(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=K1(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),c.setRenderTarget(s),E&&c.render(h,a),c.render(e,a)}h.geometry.dispose(),h.material.dispose(),c.toneMapping=f,c.autoClear=_,e.background=b}_textureToCubeUV(e,t){const i=this._renderer,s=e.mapping===xa||e.mapping===Ca;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=j1()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=K1());const r=s?this._cubemapMaterial:this._equirectMaterial,o=new Hn(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;vd(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,lg)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let s=1;seo&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${eo}`);const g=[];let v=0;for(let O=0;Oy-Xo?s-y+Xo:0),x=4*(this._cubeSize-T);vd(t,C,x,3*T,2*T),l.setRenderTarget(t),l.render(_,lg)}}function awt(n){const e=[],t=[],i=[];let s=n;const r=n-Xo+1+H1.length;for(let o=0;on-Xo?l=H1[o-n+Xo-1]:o===0&&(l=0),i.push(l);const d=1/(a-2),c=-d,_=1+d,f=[c,c,_,c,_,_,c,c,_,_,c,_],m=6,h=6,E=3,b=2,g=1,v=new Float32Array(E*h*m),y=new Float32Array(b*h*m),T=new Float32Array(g*h*m);for(let x=0;x2?0:-1,S=[O,R,0,O+2/3,R,0,O+2/3,R+1,0,O,R,0,O+2/3,R+1,0,O,R+1,0];v.set(S,E*h*x),y.set(f,b*h*x);const A=[x,x,x,x,x,x];T.set(A,g*h*x)}const C=new fs;C.setAttribute("position",new Yn(v,E)),C.setAttribute("uv",new Yn(y,b)),C.setAttribute("faceIndex",new Yn(T,g)),e.push(C),s>Xo&&s--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function W1(n,e,t){const i=new bo(n,e,t);return i.texture.mapping=up,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function vd(n,e,t,i,s){n.viewport.set(e,t,i,s),n.scissor.set(e,t,i,s)}function lwt(n,e,t){const i=new Float32Array(eo),s=new be(0,1,0);return new Eo({name:"SphericalGaussianBlur",defines:{n:eo,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:sv(),fragmentShader:` +}`,St={alphahash_fragment:x1t,alphahash_pars_fragment:C1t,alphamap_fragment:R1t,alphamap_pars_fragment:A1t,alphatest_fragment:w1t,alphatest_pars_fragment:N1t,aomap_fragment:O1t,aomap_pars_fragment:I1t,batching_pars_vertex:M1t,batching_vertex:D1t,begin_vertex:k1t,beginnormal_vertex:L1t,bsdfs:P1t,iridescence_fragment:U1t,bumpmap_pars_fragment:F1t,clipping_planes_fragment:B1t,clipping_planes_pars_fragment:G1t,clipping_planes_pars_vertex:z1t,clipping_planes_vertex:V1t,color_fragment:H1t,color_pars_fragment:q1t,color_pars_vertex:Y1t,color_vertex:$1t,common:W1t,cube_uv_reflection_fragment:K1t,defaultnormal_vertex:j1t,displacementmap_pars_vertex:Q1t,displacementmap_vertex:X1t,emissivemap_fragment:Z1t,emissivemap_pars_fragment:J1t,colorspace_fragment:eRt,colorspace_pars_fragment:tRt,envmap_fragment:nRt,envmap_common_pars_fragment:iRt,envmap_pars_fragment:sRt,envmap_pars_vertex:rRt,envmap_physical_pars_fragment:gRt,envmap_vertex:oRt,fog_vertex:aRt,fog_pars_vertex:lRt,fog_fragment:cRt,fog_pars_fragment:dRt,gradientmap_pars_fragment:uRt,lightmap_fragment:pRt,lightmap_pars_fragment:_Rt,lights_lambert_fragment:hRt,lights_lambert_pars_fragment:fRt,lights_pars_begin:mRt,lights_toon_fragment:bRt,lights_toon_pars_fragment:ERt,lights_phong_fragment:vRt,lights_phong_pars_fragment:yRt,lights_physical_fragment:SRt,lights_physical_pars_fragment:TRt,lights_fragment_begin:xRt,lights_fragment_maps:CRt,lights_fragment_end:RRt,logdepthbuf_fragment:ARt,logdepthbuf_pars_fragment:wRt,logdepthbuf_pars_vertex:NRt,logdepthbuf_vertex:ORt,map_fragment:IRt,map_pars_fragment:MRt,map_particle_fragment:DRt,map_particle_pars_fragment:kRt,metalnessmap_fragment:LRt,metalnessmap_pars_fragment:PRt,morphcolor_vertex:URt,morphnormal_vertex:FRt,morphtarget_pars_vertex:BRt,morphtarget_vertex:GRt,normal_fragment_begin:zRt,normal_fragment_maps:VRt,normal_pars_fragment:HRt,normal_pars_vertex:qRt,normal_vertex:YRt,normalmap_pars_fragment:$Rt,clearcoat_normal_fragment_begin:WRt,clearcoat_normal_fragment_maps:KRt,clearcoat_pars_fragment:jRt,iridescence_pars_fragment:QRt,opaque_fragment:XRt,packing:ZRt,premultiplied_alpha_fragment:JRt,project_vertex:eAt,dithering_fragment:tAt,dithering_pars_fragment:nAt,roughnessmap_fragment:iAt,roughnessmap_pars_fragment:sAt,shadowmap_pars_fragment:rAt,shadowmap_pars_vertex:oAt,shadowmap_vertex:aAt,shadowmask_pars_fragment:lAt,skinbase_vertex:cAt,skinning_pars_vertex:dAt,skinning_vertex:uAt,skinnormal_vertex:pAt,specularmap_fragment:_At,specularmap_pars_fragment:hAt,tonemapping_fragment:fAt,tonemapping_pars_fragment:mAt,transmission_fragment:gAt,transmission_pars_fragment:bAt,uv_pars_fragment:EAt,uv_pars_vertex:vAt,uv_vertex:yAt,worldpos_vertex:SAt,background_vert:TAt,background_frag:xAt,backgroundCube_vert:CAt,backgroundCube_frag:RAt,cube_vert:AAt,cube_frag:wAt,depth_vert:NAt,depth_frag:OAt,distanceRGBA_vert:IAt,distanceRGBA_frag:MAt,equirect_vert:DAt,equirect_frag:kAt,linedashed_vert:LAt,linedashed_frag:PAt,meshbasic_vert:UAt,meshbasic_frag:FAt,meshlambert_vert:BAt,meshlambert_frag:GAt,meshmatcap_vert:zAt,meshmatcap_frag:VAt,meshnormal_vert:HAt,meshnormal_frag:qAt,meshphong_vert:YAt,meshphong_frag:$At,meshphysical_vert:WAt,meshphysical_frag:KAt,meshtoon_vert:jAt,meshtoon_frag:QAt,points_vert:XAt,points_frag:ZAt,shadow_vert:JAt,shadow_frag:ewt,sprite_vert:twt,sprite_frag:nwt},Ke={common:{diffuse:{value:new gt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Rt},alphaMap:{value:null},alphaMapTransform:{value:new Rt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Rt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Rt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Rt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Rt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Rt},normalScale:{value:new Mt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Rt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Rt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Rt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Rt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new gt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Rt},alphaTest:{value:0},uvTransform:{value:new Rt}},sprite:{diffuse:{value:new gt(16777215)},opacity:{value:1},center:{value:new Mt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Rt},alphaMap:{value:null},alphaMapTransform:{value:new Rt},alphaTest:{value:0}}},Xi={basic:{uniforms:Gn([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.fog]),vertexShader:St.meshbasic_vert,fragmentShader:St.meshbasic_frag},lambert:{uniforms:Gn([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,Ke.lights,{emissive:{value:new gt(0)}}]),vertexShader:St.meshlambert_vert,fragmentShader:St.meshlambert_frag},phong:{uniforms:Gn([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,Ke.lights,{emissive:{value:new gt(0)},specular:{value:new gt(1118481)},shininess:{value:30}}]),vertexShader:St.meshphong_vert,fragmentShader:St.meshphong_frag},standard:{uniforms:Gn([Ke.common,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.roughnessmap,Ke.metalnessmap,Ke.fog,Ke.lights,{emissive:{value:new gt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:St.meshphysical_vert,fragmentShader:St.meshphysical_frag},toon:{uniforms:Gn([Ke.common,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.gradientmap,Ke.fog,Ke.lights,{emissive:{value:new gt(0)}}]),vertexShader:St.meshtoon_vert,fragmentShader:St.meshtoon_frag},matcap:{uniforms:Gn([Ke.common,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,{matcap:{value:null}}]),vertexShader:St.meshmatcap_vert,fragmentShader:St.meshmatcap_frag},points:{uniforms:Gn([Ke.points,Ke.fog]),vertexShader:St.points_vert,fragmentShader:St.points_frag},dashed:{uniforms:Gn([Ke.common,Ke.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:St.linedashed_vert,fragmentShader:St.linedashed_frag},depth:{uniforms:Gn([Ke.common,Ke.displacementmap]),vertexShader:St.depth_vert,fragmentShader:St.depth_frag},normal:{uniforms:Gn([Ke.common,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,{opacity:{value:1}}]),vertexShader:St.meshnormal_vert,fragmentShader:St.meshnormal_frag},sprite:{uniforms:Gn([Ke.sprite,Ke.fog]),vertexShader:St.sprite_vert,fragmentShader:St.sprite_frag},background:{uniforms:{uvTransform:{value:new Rt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:St.background_vert,fragmentShader:St.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:St.backgroundCube_vert,fragmentShader:St.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:St.cube_vert,fragmentShader:St.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:St.equirect_vert,fragmentShader:St.equirect_frag},distanceRGBA:{uniforms:Gn([Ke.common,Ke.displacementmap,{referencePosition:{value:new be},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:St.distanceRGBA_vert,fragmentShader:St.distanceRGBA_frag},shadow:{uniforms:Gn([Ke.lights,Ke.fog,{color:{value:new gt(0)},opacity:{value:1}}]),vertexShader:St.shadow_vert,fragmentShader:St.shadow_frag}};Xi.physical={uniforms:Gn([Xi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Rt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Rt},clearcoatNormalScale:{value:new Mt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Rt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Rt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Rt},sheen:{value:0},sheenColor:{value:new gt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Rt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Rt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Rt},transmissionSamplerSize:{value:new Mt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Rt},attenuationDistance:{value:0},attenuationColor:{value:new gt(0)},specularColor:{value:new gt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Rt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Rt},anisotropyVector:{value:new Mt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Rt}}]),vertexShader:St.meshphysical_vert,fragmentShader:St.meshphysical_frag};const Ed={r:0,b:0,g:0};function iwt(n,e,t,i,s,r,o){const a=new gt(0);let l=r===!0?0:1,d,c,_=null,f=0,m=null;function h(b,g){let v=!1,y=g.isScene===!0?g.background:null;y&&y.isTexture&&(y=(g.backgroundBlurriness>0?t:e).get(y)),y===null?E(a,l):y&&y.isColor&&(E(y,1),v=!0);const T=n.xr.getEnvironmentBlendMode();T==="additive"?i.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||v)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),y&&(y.isCubeTexture||y.mapping===up)?(c===void 0&&(c=new Hn(new Cr(1,1,1),new Eo({name:"BackgroundCubeMaterial",uniforms:Oa(Xi.backgroundCube.uniforms),vertexShader:Xi.backgroundCube.vertexShader,fragmentShader:Xi.backgroundCube.fragmentShader,side:Zn,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(C,x,O){this.matrixWorld.copyPosition(O.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(c)),c.material.uniforms.envMap.value=y,c.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,c.material.toneMapped=Bt.getTransfer(y.colorSpace)!==Xt,(_!==y||f!==y.version||m!==n.toneMapping)&&(c.material.needsUpdate=!0,_=y,f=y.version,m=n.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null)):y&&y.isTexture&&(d===void 0&&(d=new Hn(new nv(2,2),new Eo({name:"BackgroundMaterial",uniforms:Oa(Xi.background.uniforms),vertexShader:Xi.background.vertexShader,fragmentShader:Xi.background.fragmentShader,side:Vs,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),Object.defineProperty(d.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(d)),d.material.uniforms.t2D.value=y,d.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,d.material.toneMapped=Bt.getTransfer(y.colorSpace)!==Xt,y.matrixAutoUpdate===!0&&y.updateMatrix(),d.material.uniforms.uvTransform.value.copy(y.matrix),(_!==y||f!==y.version||m!==n.toneMapping)&&(d.material.needsUpdate=!0,_=y,f=y.version,m=n.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null))}function E(b,g){b.getRGB(Ed,pI(n)),i.buffers.color.setClear(Ed.r,Ed.g,Ed.b,g,o)}return{getClearColor:function(){return a},setClearColor:function(b,g=1){a.set(b),l=g,E(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,E(a,l)},render:h}}function swt(n,e,t,i){const s=n.getParameter(n.MAX_VERTEX_ATTRIBS),r=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||r!==null,a={},l=b(null);let d=l,c=!1;function _(L,H,G,P,j){let Y=!1;if(o){const Q=E(P,G,H);d!==Q&&(d=Q,m(d.object)),Y=g(L,P,G,j),Y&&v(L,P,G,j)}else{const Q=H.wireframe===!0;(d.geometry!==P.id||d.program!==G.id||d.wireframe!==Q)&&(d.geometry=P.id,d.program=G.id,d.wireframe=Q,Y=!0)}j!==null&&t.update(j,n.ELEMENT_ARRAY_BUFFER),(Y||c)&&(c=!1,R(L,H,G,P),j!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(j).buffer))}function f(){return i.isWebGL2?n.createVertexArray():r.createVertexArrayOES()}function m(L){return i.isWebGL2?n.bindVertexArray(L):r.bindVertexArrayOES(L)}function h(L){return i.isWebGL2?n.deleteVertexArray(L):r.deleteVertexArrayOES(L)}function E(L,H,G){const P=G.wireframe===!0;let j=a[L.id];j===void 0&&(j={},a[L.id]=j);let Y=j[H.id];Y===void 0&&(Y={},j[H.id]=Y);let Q=Y[P];return Q===void 0&&(Q=b(f()),Y[P]=Q),Q}function b(L){const H=[],G=[],P=[];for(let j=0;j=0){const me=j[te];let ve=Y[te];if(ve===void 0&&(te==="instanceMatrix"&&L.instanceMatrix&&(ve=L.instanceMatrix),te==="instanceColor"&&L.instanceColor&&(ve=L.instanceColor)),me===void 0||me.attribute!==ve||ve&&me.data!==ve.data)return!0;Q++}return d.attributesNum!==Q||d.index!==P}function v(L,H,G,P){const j={},Y=H.attributes;let Q=0;const ae=G.getAttributes();for(const te in ae)if(ae[te].location>=0){let me=Y[te];me===void 0&&(te==="instanceMatrix"&&L.instanceMatrix&&(me=L.instanceMatrix),te==="instanceColor"&&L.instanceColor&&(me=L.instanceColor));const ve={};ve.attribute=me,me&&me.data&&(ve.data=me.data),j[te]=ve,Q++}d.attributes=j,d.attributesNum=Q,d.index=P}function y(){const L=d.newAttributes;for(let H=0,G=L.length;H=0){let Z=j[ae];if(Z===void 0&&(ae==="instanceMatrix"&&L.instanceMatrix&&(Z=L.instanceMatrix),ae==="instanceColor"&&L.instanceColor&&(Z=L.instanceColor)),Z!==void 0){const me=Z.normalized,ve=Z.itemSize,Ae=t.get(Z);if(Ae===void 0)continue;const J=Ae.buffer,ge=Ae.type,ee=Ae.bytesPerElement,Se=i.isWebGL2===!0&&(ge===n.INT||ge===n.UNSIGNED_INT||Z.gpuType===KO);if(Z.isInterleavedBufferAttribute){const Ie=Z.data,k=Ie.stride,B=Z.offset;if(Ie.isInstancedInterleavedBuffer){for(let $=0;$0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";O="mediump"}return O==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const l=r(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const d=o||e.has("WEBGL_draw_buffers"),c=t.logarithmicDepthBuffer===!0,_=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),f=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_TEXTURE_SIZE),h=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),E=n.getParameter(n.MAX_VERTEX_ATTRIBS),b=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),g=n.getParameter(n.MAX_VARYING_VECTORS),v=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),y=f>0,T=o||e.has("OES_texture_float"),C=y&&T,x=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:d,getMaxAnisotropy:s,getMaxPrecision:r,precision:a,logarithmicDepthBuffer:c,maxTextures:_,maxVertexTextures:f,maxTextureSize:m,maxCubemapSize:h,maxAttributes:E,maxVertexUniforms:b,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:T,floatVertexTextures:C,maxSamples:x}}function awt(n){const e=this;let t=null,i=0,s=!1,r=!1;const o=new Wr,a=new Rt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(_,f){const m=_.length!==0||f||i!==0||s;return s=f,i=_.length,m},this.beginShadows=function(){r=!0,c(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(_,f){t=c(_,f,0)},this.setState=function(_,f,m){const h=_.clippingPlanes,E=_.clipIntersection,b=_.clipShadows,g=n.get(_);if(!s||h===null||h.length===0||r&&!b)r?c(null):d();else{const v=r?0:i,y=v*4;let T=g.clippingState||null;l.value=T,T=c(h,f,y,m);for(let C=0;C!==y;++C)T[C]=t[C];g.clippingState=T,this.numIntersection=E?this.numPlanes:0,this.numPlanes+=v}};function d(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function c(_,f,m,h){const E=_!==null?_.length:0;let b=null;if(E!==0){if(b=l.value,h!==!0||b===null){const g=m+E*4,v=f.matrixWorldInverse;a.getNormalMatrix(v),(b===null||b.length0){const d=new v1t(l.height/2);return d.fromEquirectangularTexture(n,o),e.set(o,d),o.addEventListener("dispose",s),t(d.texture,o.mapping)}else return null}}return o}function s(o){const a=o.target;a.removeEventListener("dispose",s);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}class iv extends _I{constructor(e=-1,t=1,i=1,s=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=s,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,s,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let r=i-e,o=i+e,a=s+t,l=s-t;if(this.view!==null&&this.view.enabled){const d=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=d*this.view.offsetX,o=r+d*this.view.width,a-=c*this.view.offsetY,l=a-c*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const Xo=4,H1=[.125,.215,.35,.446,.526,.582],eo=20,lg=new iv,q1=new gt;let cg=null,dg=0,ug=0;const Kr=(1+Math.sqrt(5))/2,Yo=1/Kr,Y1=[new be(1,1,1),new be(-1,1,1),new be(1,1,-1),new be(-1,1,-1),new be(0,Kr,Yo),new be(0,Kr,-Yo),new be(Yo,0,Kr),new be(-Yo,0,Kr),new be(Kr,Yo,0),new be(-Kr,Yo,0)];class $1{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,s=100){cg=this._renderer.getRenderTarget(),dg=this._renderer.getActiveCubeFace(),ug=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,i,s,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=j1(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=K1(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),c.setRenderTarget(s),E&&c.render(h,a),c.render(e,a)}h.geometry.dispose(),h.material.dispose(),c.toneMapping=f,c.autoClear=_,e.background=b}_textureToCubeUV(e,t){const i=this._renderer,s=e.mapping===xa||e.mapping===Ca;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=j1()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=K1());const r=s?this._cubemapMaterial:this._equirectMaterial,o=new Hn(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;vd(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,lg)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let s=1;seo&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${eo}`);const g=[];let v=0;for(let O=0;Oy-Xo?s-y+Xo:0),x=4*(this._cubeSize-T);vd(t,C,x,3*T,2*T),l.setRenderTarget(t),l.render(_,lg)}}function cwt(n){const e=[],t=[],i=[];let s=n;const r=n-Xo+1+H1.length;for(let o=0;on-Xo?l=H1[o-n+Xo-1]:o===0&&(l=0),i.push(l);const d=1/(a-2),c=-d,_=1+d,f=[c,c,_,c,_,_,c,c,_,_,c,_],m=6,h=6,E=3,b=2,g=1,v=new Float32Array(E*h*m),y=new Float32Array(b*h*m),T=new Float32Array(g*h*m);for(let x=0;x2?0:-1,S=[O,R,0,O+2/3,R,0,O+2/3,R+1,0,O,R,0,O+2/3,R+1,0,O,R+1,0];v.set(S,E*h*x),y.set(f,b*h*x);const A=[x,x,x,x,x,x];T.set(A,g*h*x)}const C=new fs;C.setAttribute("position",new Yn(v,E)),C.setAttribute("uv",new Yn(y,b)),C.setAttribute("faceIndex",new Yn(T,g)),e.push(C),s>Xo&&s--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function W1(n,e,t){const i=new bo(n,e,t);return i.texture.mapping=up,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function vd(n,e,t,i,s){n.viewport.set(e,t,i,s),n.scissor.set(e,t,i,s)}function dwt(n,e,t){const i=new Float32Array(eo),s=new be(0,1,0);return new Eo({name:"SphericalGaussianBlur",defines:{n:eo,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:sv(),fragmentShader:` precision mediump float; precision mediump int; @@ -3801,26 +3801,26 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function cwt(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,d=l===cb||l===db,c=l===xa||l===Ca;if(d||c)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let _=e.get(a);return t===null&&(t=new $1(n)),_=d?t.fromEquirectangular(a,_):t.fromCubemap(a,_),e.set(a,_),_.texture}else{if(e.has(a))return e.get(a).texture;{const _=a.image;if(d&&_&&_.height>0||c&&_&&s(_)){t===null&&(t=new $1(n));const f=d?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,f),a.addEventListener("dispose",r),f.texture}else return null}}}return a}function s(a){let l=0;const d=6;for(let c=0;ce.maxTextureSize&&(U=Math.ceil(A/e.maxTextureSize),A=e.maxTextureSize);const F=new Float32Array(A*U*4*E),K=new aI(F,A,U,E);K.type=ks,K.needsUpdate=!0;const L=S*4;for(let G=0;G0)return n;const s=e*t;let r=Q1[s];if(r===void 0&&(r=new Float32Array(s),Q1[s]=r),e!==0){i.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(r,a)}return r}function fn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t0||c&&_&&s(_)){t===null&&(t=new $1(n));const f=d?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,f),a.addEventListener("dispose",r),f.texture}else return null}}}return a}function s(a){let l=0;const d=6;for(let c=0;ce.maxTextureSize&&(U=Math.ceil(A/e.maxTextureSize),A=e.maxTextureSize);const F=new Float32Array(A*U*4*E),K=new aI(F,A,U,E);K.type=ks,K.needsUpdate=!0;const L=S*4;for(let G=0;G0)return n;const s=e*t;let r=Q1[s];if(r===void 0&&(r=new Float32Array(s),Q1[s]=r),e!==0){i.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(r,a)}return r}function fn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` -`)}function uNt(n){const e=Bt.getPrimaries(Bt.workingColorSpace),t=Bt.getPrimaries(n);let i;switch(e===t?i="":e===vu&&t===Eu?i="LinearDisplayP3ToLinearSRGB":e===Eu&&t===vu&&(i="LinearSRGBToLinearDisplayP3"),n){case Nn:case pp:return[i,"LinearTransferOETF"];case rn:case JE:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}function iR(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),s=n.getShaderInfoLog(e).trim();if(i&&s==="")return"";const r=/ERROR: 0:(\d+)/.exec(s);if(r){const o=parseInt(r[1]);return t.toUpperCase()+` +`)}function _Nt(n){const e=Bt.getPrimaries(Bt.workingColorSpace),t=Bt.getPrimaries(n);let i;switch(e===t?i="":e===vu&&t===Eu?i="LinearDisplayP3ToLinearSRGB":e===Eu&&t===vu&&(i="LinearSRGBToLinearDisplayP3"),n){case Nn:case pp:return[i,"LinearTransferOETF"];case rn:case JE:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}function iR(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),s=n.getShaderInfoLog(e).trim();if(i&&s==="")return"";const r=/ERROR: 0:(\d+)/.exec(s);if(r){const o=parseInt(r[1]);return t.toUpperCase()+` `+s+` -`+dNt(n.getShaderSource(e),o)}else return s}function pNt(n,e){const t=uNt(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function _Nt(n,e){let t;switch(e){case cCt:t="Linear";break;case dCt:t="Reinhard";break;case uCt:t="OptimizedCineon";break;case pCt:t="ACESFilmic";break;case _Ct:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function hNt(n){return[n.extensionDerivatives||n.envMapCubeUVHeight||n.bumpMap||n.normalMapTangentSpace||n.clearcoatNormalMap||n.flatShading||n.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(wl).join(` -`)}function fNt(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` -`)}function mNt(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let s=0;s/gm;function mb(n){return n.replace(gNt,ENt)}const bNt=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function ENt(n,e){let t=St[e];if(t===void 0){const i=bNt.get(e);if(i!==void 0)t=St[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return mb(t)}const vNt=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function oR(n){return n.replace(vNt,yNt)}function yNt(n,e,t,i){let s="";for(let r=parseInt(e);r/gm;function mb(n){return n.replace(ENt,yNt)}const vNt=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function yNt(n,e){let t=St[e];if(t===void 0){const i=vNt.get(e);if(i!==void 0)t=St[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return mb(t)}const SNt=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function oR(n){return n.replace(SNt,TNt)}function TNt(n,e,t,i){let s="";for(let r=parseInt(e);r0&&(b+=` `),g=[m,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,h].filter(wl).join(` `),g.length>0&&(g+=` `)):(b=[aR(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,h,t.batching?"#define USE_BATCHING":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(wl).join(` -`),g=[m,aR(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,h,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+d:"",t.envMap?"#define "+c:"",t.envMap?"#define "+_:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Tr?"#define TONE_MAPPING":"",t.toneMapping!==Tr?St.tonemapping_pars_fragment:"",t.toneMapping!==Tr?_Nt("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",St.colorspace_pars_fragment,pNt("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`),g=[m,aR(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,h,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+d:"",t.envMap?"#define "+c:"",t.envMap?"#define "+_:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Tr?"#define TONE_MAPPING":"",t.toneMapping!==Tr?St.tonemapping_pars_fragment:"",t.toneMapping!==Tr?fNt("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",St.colorspace_pars_fragment,hNt("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` `].filter(wl).join(` `)),o=mb(o),o=sR(o,t),o=rR(o,t),a=mb(a),a=sR(a,t),a=rR(a,t),o=oR(o),a=oR(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(v=`#version 300 es `,b=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` @@ -3831,9 +3831,9 @@ precision `+n.precision+" int;";return n.precision==="highp"?e+=` Program Info Log: `+F+` `+P+` -`+j)}else F!==""?console.warn("THREE.WebGLProgram: Program Info Log:",F):(K===""||L==="")&&(G=!1);G&&(U.diagnostics={runnable:H,programLog:F,vertexShader:{log:K,prefix:b},fragmentShader:{log:L,prefix:g}})}s.deleteShader(C),s.deleteShader(x),R=new Hd(s,E),S=mNt(s,E)}let R;this.getUniforms=function(){return R===void 0&&O(this),R};let S;this.getAttributes=function(){return S===void 0&&O(this),S};let A=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return A===!1&&(A=s.getProgramParameter(E,lNt)),A},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(E),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=cNt++,this.cacheKey=e,this.usedTimes=1,this.program=E,this.vertexShader=C,this.fragmentShader=x,this}let wNt=0;class NNt{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(t),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(s)===!1&&(o.add(s),s.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new ONt(e),t.set(e,i)),i}}class ONt{constructor(e){this.id=wNt++,this.code=e,this.usedTimes=0}}function INt(n,e,t,i,s,r,o){const a=new lI,l=new NNt,d=[],c=s.isWebGL2,_=s.logarithmicDepthBuffer,f=s.vertexTextures;let m=s.precision;const h={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function E(S){return S===0?"uv":`uv${S}`}function b(S,A,U,F,K){const L=F.fog,H=K.geometry,G=S.isMeshStandardMaterial?F.environment:null,P=(S.isMeshStandardMaterial?t:e).get(S.envMap||G),j=P&&P.mapping===up?P.image.height:null,Y=h[S.type];S.precision!==null&&(m=s.getMaxPrecision(S.precision),m!==S.precision&&console.warn("THREE.WebGLProgram.getParameters:",S.precision,"not supported, using",m,"instead."));const Q=H.morphAttributes.position||H.morphAttributes.normal||H.morphAttributes.color,ae=Q!==void 0?Q.length:0;let te=0;H.morphAttributes.position!==void 0&&(te=1),H.morphAttributes.normal!==void 0&&(te=2),H.morphAttributes.color!==void 0&&(te=3);let Z,me,ve,Ae;if(Y){const ln=Xi[Y];Z=ln.vertexShader,me=ln.fragmentShader}else Z=S.vertexShader,me=S.fragmentShader,l.update(S),ve=l.getVertexShaderID(S),Ae=l.getFragmentShaderID(S);const J=n.getRenderTarget(),ge=K.isInstancedMesh===!0,ee=K.isBatchedMesh===!0,Se=!!S.map,Ie=!!S.matcap,k=!!P,B=!!S.aoMap,$=!!S.lightMap,de=!!S.bumpMap,se=!!S.normalMap,Ce=!!S.displacementMap,we=!!S.emissiveMap,V=!!S.metalnessMap,_e=!!S.roughnessMap,re=S.anisotropy>0,ce=S.clearcoat>0,D=S.iridescence>0,I=S.sheen>0,z=S.transmission>0,he=re&&!!S.anisotropyMap,X=ce&&!!S.clearcoatMap,oe=ce&&!!S.clearcoatNormalMap,Re=ce&&!!S.clearcoatRoughnessMap,xe=D&&!!S.iridescenceMap,De=D&&!!S.iridescenceThicknessMap,ze=I&&!!S.sheenColorMap,st=I&&!!S.sheenRoughnessMap,ke=!!S.specularMap,ct=!!S.specularColorMap,Qe=!!S.specularIntensityMap,qe=z&&!!S.transmissionMap,et=z&&!!S.thicknessMap,Fe=!!S.gradientMap,pt=!!S.alphaMap,pe=S.alphaTest>0,We=!!S.alphaHash,Ue=!!S.extensions,Ne=!!H.attributes.uv1,Be=!!H.attributes.uv2,ut=!!H.attributes.uv3;let Et=Tr;return S.toneMapped&&(J===null||J.isXRRenderTarget===!0)&&(Et=n.toneMapping),{isWebGL2:c,shaderID:Y,shaderType:S.type,shaderName:S.name,vertexShader:Z,fragmentShader:me,defines:S.defines,customVertexShaderID:ve,customFragmentShaderID:Ae,isRawShaderMaterial:S.isRawShaderMaterial===!0,glslVersion:S.glslVersion,precision:m,batching:ee,instancing:ge,instancingColor:ge&&K.instanceColor!==null,supportsVertexTextures:f,outputColorSpace:J===null?n.outputColorSpace:J.isXRRenderTarget===!0?J.texture.colorSpace:Nn,map:Se,matcap:Ie,envMap:k,envMapMode:k&&P.mapping,envMapCubeUVHeight:j,aoMap:B,lightMap:$,bumpMap:de,normalMap:se,displacementMap:f&&Ce,emissiveMap:we,normalMapObjectSpace:se&&S.normalMapType===ACt,normalMapTangentSpace:se&&S.normalMapType===ZE,metalnessMap:V,roughnessMap:_e,anisotropy:re,anisotropyMap:he,clearcoat:ce,clearcoatMap:X,clearcoatNormalMap:oe,clearcoatRoughnessMap:Re,iridescence:D,iridescenceMap:xe,iridescenceThicknessMap:De,sheen:I,sheenColorMap:ze,sheenRoughnessMap:st,specularMap:ke,specularColorMap:ct,specularIntensityMap:Qe,transmission:z,transmissionMap:qe,thicknessMap:et,gradientMap:Fe,opaque:S.transparent===!1&&S.blending===aa,alphaMap:pt,alphaTest:pe,alphaHash:We,combine:S.combine,mapUv:Se&&E(S.map.channel),aoMapUv:B&&E(S.aoMap.channel),lightMapUv:$&&E(S.lightMap.channel),bumpMapUv:de&&E(S.bumpMap.channel),normalMapUv:se&&E(S.normalMap.channel),displacementMapUv:Ce&&E(S.displacementMap.channel),emissiveMapUv:we&&E(S.emissiveMap.channel),metalnessMapUv:V&&E(S.metalnessMap.channel),roughnessMapUv:_e&&E(S.roughnessMap.channel),anisotropyMapUv:he&&E(S.anisotropyMap.channel),clearcoatMapUv:X&&E(S.clearcoatMap.channel),clearcoatNormalMapUv:oe&&E(S.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Re&&E(S.clearcoatRoughnessMap.channel),iridescenceMapUv:xe&&E(S.iridescenceMap.channel),iridescenceThicknessMapUv:De&&E(S.iridescenceThicknessMap.channel),sheenColorMapUv:ze&&E(S.sheenColorMap.channel),sheenRoughnessMapUv:st&&E(S.sheenRoughnessMap.channel),specularMapUv:ke&&E(S.specularMap.channel),specularColorMapUv:ct&&E(S.specularColorMap.channel),specularIntensityMapUv:Qe&&E(S.specularIntensityMap.channel),transmissionMapUv:qe&&E(S.transmissionMap.channel),thicknessMapUv:et&&E(S.thicknessMap.channel),alphaMapUv:pt&&E(S.alphaMap.channel),vertexTangents:!!H.attributes.tangent&&(se||re),vertexColors:S.vertexColors,vertexAlphas:S.vertexColors===!0&&!!H.attributes.color&&H.attributes.color.itemSize===4,vertexUv1s:Ne,vertexUv2s:Be,vertexUv3s:ut,pointsUvs:K.isPoints===!0&&!!H.attributes.uv&&(Se||pt),fog:!!L,useFog:S.fog===!0,fogExp2:L&&L.isFogExp2,flatShading:S.flatShading===!0,sizeAttenuation:S.sizeAttenuation===!0,logarithmicDepthBuffer:_,skinning:K.isSkinnedMesh===!0,morphTargets:H.morphAttributes.position!==void 0,morphNormals:H.morphAttributes.normal!==void 0,morphColors:H.morphAttributes.color!==void 0,morphTargetsCount:ae,morphTextureStride:te,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:S.dithering,shadowMapEnabled:n.shadowMap.enabled&&U.length>0,shadowMapType:n.shadowMap.type,toneMapping:Et,useLegacyLights:n._useLegacyLights,decodeVideoTexture:Se&&S.map.isVideoTexture===!0&&Bt.getTransfer(S.map.colorSpace)===Xt,premultipliedAlpha:S.premultipliedAlpha,doubleSided:S.side===Ji,flipSided:S.side===Zn,useDepthPacking:S.depthPacking>=0,depthPacking:S.depthPacking||0,index0AttributeName:S.index0AttributeName,extensionDerivatives:Ue&&S.extensions.derivatives===!0,extensionFragDepth:Ue&&S.extensions.fragDepth===!0,extensionDrawBuffers:Ue&&S.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ue&&S.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:c||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:c||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:c||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:S.customProgramCacheKey()}}function g(S){const A=[];if(S.shaderID?A.push(S.shaderID):(A.push(S.customVertexShaderID),A.push(S.customFragmentShaderID)),S.defines!==void 0)for(const U in S.defines)A.push(U),A.push(S.defines[U]);return S.isRawShaderMaterial===!1&&(v(A,S),y(A,S),A.push(n.outputColorSpace)),A.push(S.customProgramCacheKey),A.join()}function v(S,A){S.push(A.precision),S.push(A.outputColorSpace),S.push(A.envMapMode),S.push(A.envMapCubeUVHeight),S.push(A.mapUv),S.push(A.alphaMapUv),S.push(A.lightMapUv),S.push(A.aoMapUv),S.push(A.bumpMapUv),S.push(A.normalMapUv),S.push(A.displacementMapUv),S.push(A.emissiveMapUv),S.push(A.metalnessMapUv),S.push(A.roughnessMapUv),S.push(A.anisotropyMapUv),S.push(A.clearcoatMapUv),S.push(A.clearcoatNormalMapUv),S.push(A.clearcoatRoughnessMapUv),S.push(A.iridescenceMapUv),S.push(A.iridescenceThicknessMapUv),S.push(A.sheenColorMapUv),S.push(A.sheenRoughnessMapUv),S.push(A.specularMapUv),S.push(A.specularColorMapUv),S.push(A.specularIntensityMapUv),S.push(A.transmissionMapUv),S.push(A.thicknessMapUv),S.push(A.combine),S.push(A.fogExp2),S.push(A.sizeAttenuation),S.push(A.morphTargetsCount),S.push(A.morphAttributeCount),S.push(A.numDirLights),S.push(A.numPointLights),S.push(A.numSpotLights),S.push(A.numSpotLightMaps),S.push(A.numHemiLights),S.push(A.numRectAreaLights),S.push(A.numDirLightShadows),S.push(A.numPointLightShadows),S.push(A.numSpotLightShadows),S.push(A.numSpotLightShadowsWithMaps),S.push(A.numLightProbes),S.push(A.shadowMapType),S.push(A.toneMapping),S.push(A.numClippingPlanes),S.push(A.numClipIntersection),S.push(A.depthPacking)}function y(S,A){a.disableAll(),A.isWebGL2&&a.enable(0),A.supportsVertexTextures&&a.enable(1),A.instancing&&a.enable(2),A.instancingColor&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),S.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.useLegacyLights&&a.enable(10),A.doubleSided&&a.enable(11),A.flipSided&&a.enable(12),A.useDepthPacking&&a.enable(13),A.dithering&&a.enable(14),A.transmission&&a.enable(15),A.sheen&&a.enable(16),A.opaque&&a.enable(17),A.pointsUvs&&a.enable(18),A.decodeVideoTexture&&a.enable(19),S.push(a.mask)}function T(S){const A=h[S.type];let U;if(A){const F=Xi[A];U=h1t.clone(F.uniforms)}else U=S.uniforms;return U}function C(S,A){let U;for(let F=0,K=d.length;F0?i.push(g):m.transparent===!0?s.push(g):t.push(g)}function l(_,f,m,h,E,b){const g=o(_,f,m,h,E,b);m.transmission>0?i.unshift(g):m.transparent===!0?s.unshift(g):t.unshift(g)}function d(_,f){t.length>1&&t.sort(_||DNt),i.length>1&&i.sort(f||lR),s.length>1&&s.sort(f||lR)}function c(){for(let _=e,f=n.length;_=r.length?(o=new cR,r.push(o)):o=r[s],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function LNt(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new be,color:new gt};break;case"SpotLight":t={position:new be,direction:new be,color:new gt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new be,color:new gt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new be,skyColor:new gt,groundColor:new gt};break;case"RectAreaLight":t={color:new gt,position:new be,halfWidth:new be,halfHeight:new be};break}return n[e.id]=t,t}}}function PNt(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Mt};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Mt};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Mt,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let UNt=0;function FNt(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function BNt(n,e){const t=new LNt,i=PNt(),s={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)s.probe.push(new be);const r=new be,o=new At,a=new At;function l(c,_){let f=0,m=0,h=0;for(let F=0;F<9;F++)s.probe[F].set(0,0,0);let E=0,b=0,g=0,v=0,y=0,T=0,C=0,x=0,O=0,R=0,S=0;c.sort(FNt);const A=_===!0?Math.PI:1;for(let F=0,K=c.length;F0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(s.rectAreaLTC1=Ke.LTC_FLOAT_1,s.rectAreaLTC2=Ke.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(s.rectAreaLTC1=Ke.LTC_HALF_1,s.rectAreaLTC2=Ke.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),s.ambient[0]=f,s.ambient[1]=m,s.ambient[2]=h;const U=s.hash;(U.directionalLength!==E||U.pointLength!==b||U.spotLength!==g||U.rectAreaLength!==v||U.hemiLength!==y||U.numDirectionalShadows!==T||U.numPointShadows!==C||U.numSpotShadows!==x||U.numSpotMaps!==O||U.numLightProbes!==S)&&(s.directional.length=E,s.spot.length=g,s.rectArea.length=v,s.point.length=b,s.hemi.length=y,s.directionalShadow.length=T,s.directionalShadowMap.length=T,s.pointShadow.length=C,s.pointShadowMap.length=C,s.spotShadow.length=x,s.spotShadowMap.length=x,s.directionalShadowMatrix.length=T,s.pointShadowMatrix.length=C,s.spotLightMatrix.length=x+O-R,s.spotLightMap.length=O,s.numSpotLightShadowsWithMaps=R,s.numLightProbes=S,U.directionalLength=E,U.pointLength=b,U.spotLength=g,U.rectAreaLength=v,U.hemiLength=y,U.numDirectionalShadows=T,U.numPointShadows=C,U.numSpotShadows=x,U.numSpotMaps=O,U.numLightProbes=S,s.version=UNt++)}function d(c,_){let f=0,m=0,h=0,E=0,b=0;const g=_.matrixWorldInverse;for(let v=0,y=c.length;v=a.length?(l=new dR(n,e),a.push(l)):l=a[o],l}function s(){t=new WeakMap}return{get:i,dispose:s}}class zNt extends Vi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=CCt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class VNt extends Vi{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const HNt=`void main() { +`+j)}else F!==""?console.warn("THREE.WebGLProgram: Program Info Log:",F):(K===""||L==="")&&(G=!1);G&&(U.diagnostics={runnable:H,programLog:F,vertexShader:{log:K,prefix:b},fragmentShader:{log:L,prefix:g}})}s.deleteShader(C),s.deleteShader(x),R=new Hd(s,E),S=bNt(s,E)}let R;this.getUniforms=function(){return R===void 0&&O(this),R};let S;this.getAttributes=function(){return S===void 0&&O(this),S};let A=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return A===!1&&(A=s.getProgramParameter(E,dNt)),A},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(E),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=uNt++,this.cacheKey=e,this.usedTimes=1,this.program=E,this.vertexShader=C,this.fragmentShader=x,this}let ONt=0;class INt{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(t),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(s)===!1&&(o.add(s),s.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new MNt(e),t.set(e,i)),i}}class MNt{constructor(e){this.id=ONt++,this.code=e,this.usedTimes=0}}function DNt(n,e,t,i,s,r,o){const a=new lI,l=new INt,d=[],c=s.isWebGL2,_=s.logarithmicDepthBuffer,f=s.vertexTextures;let m=s.precision;const h={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function E(S){return S===0?"uv":`uv${S}`}function b(S,A,U,F,K){const L=F.fog,H=K.geometry,G=S.isMeshStandardMaterial?F.environment:null,P=(S.isMeshStandardMaterial?t:e).get(S.envMap||G),j=P&&P.mapping===up?P.image.height:null,Y=h[S.type];S.precision!==null&&(m=s.getMaxPrecision(S.precision),m!==S.precision&&console.warn("THREE.WebGLProgram.getParameters:",S.precision,"not supported, using",m,"instead."));const Q=H.morphAttributes.position||H.morphAttributes.normal||H.morphAttributes.color,ae=Q!==void 0?Q.length:0;let te=0;H.morphAttributes.position!==void 0&&(te=1),H.morphAttributes.normal!==void 0&&(te=2),H.morphAttributes.color!==void 0&&(te=3);let Z,me,ve,Ae;if(Y){const ln=Xi[Y];Z=ln.vertexShader,me=ln.fragmentShader}else Z=S.vertexShader,me=S.fragmentShader,l.update(S),ve=l.getVertexShaderID(S),Ae=l.getFragmentShaderID(S);const J=n.getRenderTarget(),ge=K.isInstancedMesh===!0,ee=K.isBatchedMesh===!0,Se=!!S.map,Ie=!!S.matcap,k=!!P,B=!!S.aoMap,$=!!S.lightMap,de=!!S.bumpMap,se=!!S.normalMap,Ce=!!S.displacementMap,we=!!S.emissiveMap,V=!!S.metalnessMap,_e=!!S.roughnessMap,re=S.anisotropy>0,ce=S.clearcoat>0,D=S.iridescence>0,I=S.sheen>0,z=S.transmission>0,he=re&&!!S.anisotropyMap,X=ce&&!!S.clearcoatMap,oe=ce&&!!S.clearcoatNormalMap,Re=ce&&!!S.clearcoatRoughnessMap,xe=D&&!!S.iridescenceMap,De=D&&!!S.iridescenceThicknessMap,ze=I&&!!S.sheenColorMap,st=I&&!!S.sheenRoughnessMap,ke=!!S.specularMap,ct=!!S.specularColorMap,Qe=!!S.specularIntensityMap,qe=z&&!!S.transmissionMap,et=z&&!!S.thicknessMap,Fe=!!S.gradientMap,pt=!!S.alphaMap,pe=S.alphaTest>0,We=!!S.alphaHash,Ue=!!S.extensions,Ne=!!H.attributes.uv1,Be=!!H.attributes.uv2,ut=!!H.attributes.uv3;let Et=Tr;return S.toneMapped&&(J===null||J.isXRRenderTarget===!0)&&(Et=n.toneMapping),{isWebGL2:c,shaderID:Y,shaderType:S.type,shaderName:S.name,vertexShader:Z,fragmentShader:me,defines:S.defines,customVertexShaderID:ve,customFragmentShaderID:Ae,isRawShaderMaterial:S.isRawShaderMaterial===!0,glslVersion:S.glslVersion,precision:m,batching:ee,instancing:ge,instancingColor:ge&&K.instanceColor!==null,supportsVertexTextures:f,outputColorSpace:J===null?n.outputColorSpace:J.isXRRenderTarget===!0?J.texture.colorSpace:Nn,map:Se,matcap:Ie,envMap:k,envMapMode:k&&P.mapping,envMapCubeUVHeight:j,aoMap:B,lightMap:$,bumpMap:de,normalMap:se,displacementMap:f&&Ce,emissiveMap:we,normalMapObjectSpace:se&&S.normalMapType===NCt,normalMapTangentSpace:se&&S.normalMapType===ZE,metalnessMap:V,roughnessMap:_e,anisotropy:re,anisotropyMap:he,clearcoat:ce,clearcoatMap:X,clearcoatNormalMap:oe,clearcoatRoughnessMap:Re,iridescence:D,iridescenceMap:xe,iridescenceThicknessMap:De,sheen:I,sheenColorMap:ze,sheenRoughnessMap:st,specularMap:ke,specularColorMap:ct,specularIntensityMap:Qe,transmission:z,transmissionMap:qe,thicknessMap:et,gradientMap:Fe,opaque:S.transparent===!1&&S.blending===aa,alphaMap:pt,alphaTest:pe,alphaHash:We,combine:S.combine,mapUv:Se&&E(S.map.channel),aoMapUv:B&&E(S.aoMap.channel),lightMapUv:$&&E(S.lightMap.channel),bumpMapUv:de&&E(S.bumpMap.channel),normalMapUv:se&&E(S.normalMap.channel),displacementMapUv:Ce&&E(S.displacementMap.channel),emissiveMapUv:we&&E(S.emissiveMap.channel),metalnessMapUv:V&&E(S.metalnessMap.channel),roughnessMapUv:_e&&E(S.roughnessMap.channel),anisotropyMapUv:he&&E(S.anisotropyMap.channel),clearcoatMapUv:X&&E(S.clearcoatMap.channel),clearcoatNormalMapUv:oe&&E(S.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Re&&E(S.clearcoatRoughnessMap.channel),iridescenceMapUv:xe&&E(S.iridescenceMap.channel),iridescenceThicknessMapUv:De&&E(S.iridescenceThicknessMap.channel),sheenColorMapUv:ze&&E(S.sheenColorMap.channel),sheenRoughnessMapUv:st&&E(S.sheenRoughnessMap.channel),specularMapUv:ke&&E(S.specularMap.channel),specularColorMapUv:ct&&E(S.specularColorMap.channel),specularIntensityMapUv:Qe&&E(S.specularIntensityMap.channel),transmissionMapUv:qe&&E(S.transmissionMap.channel),thicknessMapUv:et&&E(S.thicknessMap.channel),alphaMapUv:pt&&E(S.alphaMap.channel),vertexTangents:!!H.attributes.tangent&&(se||re),vertexColors:S.vertexColors,vertexAlphas:S.vertexColors===!0&&!!H.attributes.color&&H.attributes.color.itemSize===4,vertexUv1s:Ne,vertexUv2s:Be,vertexUv3s:ut,pointsUvs:K.isPoints===!0&&!!H.attributes.uv&&(Se||pt),fog:!!L,useFog:S.fog===!0,fogExp2:L&&L.isFogExp2,flatShading:S.flatShading===!0,sizeAttenuation:S.sizeAttenuation===!0,logarithmicDepthBuffer:_,skinning:K.isSkinnedMesh===!0,morphTargets:H.morphAttributes.position!==void 0,morphNormals:H.morphAttributes.normal!==void 0,morphColors:H.morphAttributes.color!==void 0,morphTargetsCount:ae,morphTextureStride:te,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:S.dithering,shadowMapEnabled:n.shadowMap.enabled&&U.length>0,shadowMapType:n.shadowMap.type,toneMapping:Et,useLegacyLights:n._useLegacyLights,decodeVideoTexture:Se&&S.map.isVideoTexture===!0&&Bt.getTransfer(S.map.colorSpace)===Xt,premultipliedAlpha:S.premultipliedAlpha,doubleSided:S.side===Ji,flipSided:S.side===Zn,useDepthPacking:S.depthPacking>=0,depthPacking:S.depthPacking||0,index0AttributeName:S.index0AttributeName,extensionDerivatives:Ue&&S.extensions.derivatives===!0,extensionFragDepth:Ue&&S.extensions.fragDepth===!0,extensionDrawBuffers:Ue&&S.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ue&&S.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:c||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:c||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:c||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:S.customProgramCacheKey()}}function g(S){const A=[];if(S.shaderID?A.push(S.shaderID):(A.push(S.customVertexShaderID),A.push(S.customFragmentShaderID)),S.defines!==void 0)for(const U in S.defines)A.push(U),A.push(S.defines[U]);return S.isRawShaderMaterial===!1&&(v(A,S),y(A,S),A.push(n.outputColorSpace)),A.push(S.customProgramCacheKey),A.join()}function v(S,A){S.push(A.precision),S.push(A.outputColorSpace),S.push(A.envMapMode),S.push(A.envMapCubeUVHeight),S.push(A.mapUv),S.push(A.alphaMapUv),S.push(A.lightMapUv),S.push(A.aoMapUv),S.push(A.bumpMapUv),S.push(A.normalMapUv),S.push(A.displacementMapUv),S.push(A.emissiveMapUv),S.push(A.metalnessMapUv),S.push(A.roughnessMapUv),S.push(A.anisotropyMapUv),S.push(A.clearcoatMapUv),S.push(A.clearcoatNormalMapUv),S.push(A.clearcoatRoughnessMapUv),S.push(A.iridescenceMapUv),S.push(A.iridescenceThicknessMapUv),S.push(A.sheenColorMapUv),S.push(A.sheenRoughnessMapUv),S.push(A.specularMapUv),S.push(A.specularColorMapUv),S.push(A.specularIntensityMapUv),S.push(A.transmissionMapUv),S.push(A.thicknessMapUv),S.push(A.combine),S.push(A.fogExp2),S.push(A.sizeAttenuation),S.push(A.morphTargetsCount),S.push(A.morphAttributeCount),S.push(A.numDirLights),S.push(A.numPointLights),S.push(A.numSpotLights),S.push(A.numSpotLightMaps),S.push(A.numHemiLights),S.push(A.numRectAreaLights),S.push(A.numDirLightShadows),S.push(A.numPointLightShadows),S.push(A.numSpotLightShadows),S.push(A.numSpotLightShadowsWithMaps),S.push(A.numLightProbes),S.push(A.shadowMapType),S.push(A.toneMapping),S.push(A.numClippingPlanes),S.push(A.numClipIntersection),S.push(A.depthPacking)}function y(S,A){a.disableAll(),A.isWebGL2&&a.enable(0),A.supportsVertexTextures&&a.enable(1),A.instancing&&a.enable(2),A.instancingColor&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),S.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.useLegacyLights&&a.enable(10),A.doubleSided&&a.enable(11),A.flipSided&&a.enable(12),A.useDepthPacking&&a.enable(13),A.dithering&&a.enable(14),A.transmission&&a.enable(15),A.sheen&&a.enable(16),A.opaque&&a.enable(17),A.pointsUvs&&a.enable(18),A.decodeVideoTexture&&a.enable(19),S.push(a.mask)}function T(S){const A=h[S.type];let U;if(A){const F=Xi[A];U=m1t.clone(F.uniforms)}else U=S.uniforms;return U}function C(S,A){let U;for(let F=0,K=d.length;F0?i.push(g):m.transparent===!0?s.push(g):t.push(g)}function l(_,f,m,h,E,b){const g=o(_,f,m,h,E,b);m.transmission>0?i.unshift(g):m.transparent===!0?s.unshift(g):t.unshift(g)}function d(_,f){t.length>1&&t.sort(_||LNt),i.length>1&&i.sort(f||lR),s.length>1&&s.sort(f||lR)}function c(){for(let _=e,f=n.length;_=r.length?(o=new cR,r.push(o)):o=r[s],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function UNt(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new be,color:new gt};break;case"SpotLight":t={position:new be,direction:new be,color:new gt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new be,color:new gt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new be,skyColor:new gt,groundColor:new gt};break;case"RectAreaLight":t={color:new gt,position:new be,halfWidth:new be,halfHeight:new be};break}return n[e.id]=t,t}}}function FNt(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Mt};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Mt};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Mt,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let BNt=0;function GNt(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function zNt(n,e){const t=new UNt,i=FNt(),s={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)s.probe.push(new be);const r=new be,o=new At,a=new At;function l(c,_){let f=0,m=0,h=0;for(let F=0;F<9;F++)s.probe[F].set(0,0,0);let E=0,b=0,g=0,v=0,y=0,T=0,C=0,x=0,O=0,R=0,S=0;c.sort(GNt);const A=_===!0?Math.PI:1;for(let F=0,K=c.length;F0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(s.rectAreaLTC1=Ke.LTC_FLOAT_1,s.rectAreaLTC2=Ke.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(s.rectAreaLTC1=Ke.LTC_HALF_1,s.rectAreaLTC2=Ke.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),s.ambient[0]=f,s.ambient[1]=m,s.ambient[2]=h;const U=s.hash;(U.directionalLength!==E||U.pointLength!==b||U.spotLength!==g||U.rectAreaLength!==v||U.hemiLength!==y||U.numDirectionalShadows!==T||U.numPointShadows!==C||U.numSpotShadows!==x||U.numSpotMaps!==O||U.numLightProbes!==S)&&(s.directional.length=E,s.spot.length=g,s.rectArea.length=v,s.point.length=b,s.hemi.length=y,s.directionalShadow.length=T,s.directionalShadowMap.length=T,s.pointShadow.length=C,s.pointShadowMap.length=C,s.spotShadow.length=x,s.spotShadowMap.length=x,s.directionalShadowMatrix.length=T,s.pointShadowMatrix.length=C,s.spotLightMatrix.length=x+O-R,s.spotLightMap.length=O,s.numSpotLightShadowsWithMaps=R,s.numLightProbes=S,U.directionalLength=E,U.pointLength=b,U.spotLength=g,U.rectAreaLength=v,U.hemiLength=y,U.numDirectionalShadows=T,U.numPointShadows=C,U.numSpotShadows=x,U.numSpotMaps=O,U.numLightProbes=S,s.version=BNt++)}function d(c,_){let f=0,m=0,h=0,E=0,b=0;const g=_.matrixWorldInverse;for(let v=0,y=c.length;v=a.length?(l=new dR(n,e),a.push(l)):l=a[o],l}function s(){t=new WeakMap}return{get:i,dispose:s}}class HNt extends Vi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=ACt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class qNt extends Vi{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const YNt=`void main() { gl_Position = vec4( position, 1.0 ); -}`,qNt=`uniform sampler2D shadow_pass; +}`,$Nt=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3859,8 +3859,8 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function YNt(n,e,t){let i=new tv;const s=new Mt,r=new Mt,o=new Wt,a=new zNt({depthPacking:RCt}),l=new VNt,d={},c=t.maxTextureSize,_={[Vs]:Zn,[Zn]:Vs,[Ji]:Ji},f=new Eo({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Mt},radius:{value:4}},vertexShader:HNt,fragmentShader:qNt}),m=f.clone();m.defines.HORIZONTAL_PASS=1;const h=new fs;h.setAttribute("position",new Yn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new Hn(h,f),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=YO;let g=this.type;this.render=function(C,x,O){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||C.length===0)return;const R=n.getRenderTarget(),S=n.getActiveCubeFace(),A=n.getActiveMipmapLevel(),U=n.state;U.setBlending(Sr),U.buffers.color.setClear(1,1,1,1),U.buffers.depth.setTest(!0),U.setScissorTest(!1);const F=g!==Is&&this.type===Is,K=g===Is&&this.type!==Is;for(let L=0,H=C.length;Lc||s.y>c)&&(s.x>c&&(r.x=Math.floor(c/j.x),s.x=r.x*j.x,P.mapSize.x=r.x),s.y>c&&(r.y=Math.floor(c/j.y),s.y=r.y*j.y,P.mapSize.y=r.y)),P.map===null||F===!0||K===!0){const Q=this.type!==Is?{minFilter:En,magFilter:En}:{};P.map!==null&&P.map.dispose(),P.map=new bo(s.x,s.y,Q),P.map.texture.name=G.name+".shadowMap",P.camera.updateProjectionMatrix()}n.setRenderTarget(P.map),n.clear();const Y=P.getViewportCount();for(let Q=0;Q0||x.map&&x.alphaTest>0){const U=S.uuid,F=x.uuid;let K=d[U];K===void 0&&(K={},d[U]=K);let L=K[F];L===void 0&&(L=S.clone(),K[F]=L),S=L}if(S.visible=x.visible,S.wireframe=x.wireframe,R===Is?S.side=x.shadowSide!==null?x.shadowSide:x.side:S.side=x.shadowSide!==null?x.shadowSide:_[x.side],S.alphaMap=x.alphaMap,S.alphaTest=x.alphaTest,S.map=x.map,S.clipShadows=x.clipShadows,S.clippingPlanes=x.clippingPlanes,S.clipIntersection=x.clipIntersection,S.displacementMap=x.displacementMap,S.displacementScale=x.displacementScale,S.displacementBias=x.displacementBias,S.wireframeLinewidth=x.wireframeLinewidth,S.linewidth=x.linewidth,O.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const U=n.properties.get(S);U.light=O}return S}function T(C,x,O,R,S){if(C.visible===!1)return;if(C.layers.test(x.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&S===Is)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(O.matrixWorldInverse,C.matrixWorld);const F=e.update(C),K=C.material;if(Array.isArray(K)){const L=F.groups;for(let H=0,G=L.length;H=1):Q.indexOf("OpenGL ES")!==-1&&(Y=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),j=Y>=2);let ae=null,te={};const Z=n.getParameter(n.SCISSOR_BOX),me=n.getParameter(n.VIEWPORT),ve=new Wt().fromArray(Z),Ae=new Wt().fromArray(me);function J(pe,We,Ue,Ne){const Be=new Uint8Array(4),ut=n.createTexture();n.bindTexture(pe,ut),n.texParameteri(pe,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(pe,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let Et=0;Et"u"?!1:/OculusBrowser/g.test(navigator.userAgent),h=new WeakMap;let E;const b=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(D,I){return g?new OffscreenCanvas(D,I):lc("canvas")}function y(D,I,z,he){let X=1;if((D.width>he||D.height>he)&&(X=he/Math.max(D.width,D.height)),X<1||I===!0)if(typeof HTMLImageElement<"u"&&D instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&D instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&D instanceof ImageBitmap){const oe=I?Su:Math.floor,Re=oe(X*D.width),xe=oe(X*D.height);E===void 0&&(E=v(Re,xe));const De=z?v(Re,xe):E;return De.width=Re,De.height=xe,De.getContext("2d").drawImage(D,0,0,Re,xe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+D.width+"x"+D.height+") to ("+Re+"x"+xe+")."),De}else return"data"in D&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+D.width+"x"+D.height+")."),D;return D}function T(D){return fb(D.width)&&fb(D.height)}function C(D){return a?!1:D.wrapS!==gi||D.wrapT!==gi||D.minFilter!==En&&D.minFilter!==jn}function x(D,I){return D.generateMipmaps&&I&&D.minFilter!==En&&D.minFilter!==jn}function O(D){n.generateMipmap(D)}function R(D,I,z,he,X=!1){if(a===!1)return I;if(D!==null){if(n[D]!==void 0)return n[D];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+D+"'")}let oe=I;if(I===n.RED&&(z===n.FLOAT&&(oe=n.R32F),z===n.HALF_FLOAT&&(oe=n.R16F),z===n.UNSIGNED_BYTE&&(oe=n.R8)),I===n.RED_INTEGER&&(z===n.UNSIGNED_BYTE&&(oe=n.R8UI),z===n.UNSIGNED_SHORT&&(oe=n.R16UI),z===n.UNSIGNED_INT&&(oe=n.R32UI),z===n.BYTE&&(oe=n.R8I),z===n.SHORT&&(oe=n.R16I),z===n.INT&&(oe=n.R32I)),I===n.RG&&(z===n.FLOAT&&(oe=n.RG32F),z===n.HALF_FLOAT&&(oe=n.RG16F),z===n.UNSIGNED_BYTE&&(oe=n.RG8)),I===n.RGBA){const Re=X?bu:Bt.getTransfer(he);z===n.FLOAT&&(oe=n.RGBA32F),z===n.HALF_FLOAT&&(oe=n.RGBA16F),z===n.UNSIGNED_BYTE&&(oe=Re===Xt?n.SRGB8_ALPHA8:n.RGBA8),z===n.UNSIGNED_SHORT_4_4_4_4&&(oe=n.RGBA4),z===n.UNSIGNED_SHORT_5_5_5_1&&(oe=n.RGB5_A1)}return(oe===n.R16F||oe===n.R32F||oe===n.RG16F||oe===n.RG32F||oe===n.RGBA16F||oe===n.RGBA32F)&&e.get("EXT_color_buffer_float"),oe}function S(D,I,z){return x(D,z)===!0||D.isFramebufferTexture&&D.minFilter!==En&&D.minFilter!==jn?Math.log2(Math.max(I.width,I.height))+1:D.mipmaps!==void 0&&D.mipmaps.length>0?D.mipmaps.length:D.isCompressedTexture&&Array.isArray(D.image)?I.mipmaps.length:1}function A(D){return D===En||D===ub||D===Vd?n.NEAREST:n.LINEAR}function U(D){const I=D.target;I.removeEventListener("dispose",U),K(I),I.isVideoTexture&&h.delete(I)}function F(D){const I=D.target;I.removeEventListener("dispose",F),H(I)}function K(D){const I=i.get(D);if(I.__webglInit===void 0)return;const z=D.source,he=b.get(z);if(he){const X=he[I.__cacheKey];X.usedTimes--,X.usedTimes===0&&L(D),Object.keys(he).length===0&&b.delete(z)}i.remove(D)}function L(D){const I=i.get(D);n.deleteTexture(I.__webglTexture);const z=D.source,he=b.get(z);delete he[I.__cacheKey],o.memory.textures--}function H(D){const I=D.texture,z=i.get(D),he=i.get(I);if(he.__webglTexture!==void 0&&(n.deleteTexture(he.__webglTexture),o.memory.textures--),D.depthTexture&&D.depthTexture.dispose(),D.isWebGLCubeRenderTarget)for(let X=0;X<6;X++){if(Array.isArray(z.__webglFramebuffer[X]))for(let oe=0;oe=l&&console.warn("THREE.WebGLTextures: Trying to use "+D+" texture units while this GPU supports only "+l),G+=1,D}function Y(D){const I=[];return I.push(D.wrapS),I.push(D.wrapT),I.push(D.wrapR||0),I.push(D.magFilter),I.push(D.minFilter),I.push(D.anisotropy),I.push(D.internalFormat),I.push(D.format),I.push(D.type),I.push(D.generateMipmaps),I.push(D.premultiplyAlpha),I.push(D.flipY),I.push(D.unpackAlignment),I.push(D.colorSpace),I.join()}function Q(D,I){const z=i.get(D);if(D.isVideoTexture&&re(D),D.isRenderTargetTexture===!1&&D.version>0&&z.__version!==D.version){const he=D.image;if(he===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(he.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ee(z,D,I);return}}t.bindTexture(n.TEXTURE_2D,z.__webglTexture,n.TEXTURE0+I)}function ae(D,I){const z=i.get(D);if(D.version>0&&z.__version!==D.version){ee(z,D,I);return}t.bindTexture(n.TEXTURE_2D_ARRAY,z.__webglTexture,n.TEXTURE0+I)}function te(D,I){const z=i.get(D);if(D.version>0&&z.__version!==D.version){ee(z,D,I);return}t.bindTexture(n.TEXTURE_3D,z.__webglTexture,n.TEXTURE0+I)}function Z(D,I){const z=i.get(D);if(D.version>0&&z.__version!==D.version){Se(z,D,I);return}t.bindTexture(n.TEXTURE_CUBE_MAP,z.__webglTexture,n.TEXTURE0+I)}const me={[Ra]:n.REPEAT,[gi]:n.CLAMP_TO_EDGE,[gu]:n.MIRRORED_REPEAT},ve={[En]:n.NEAREST,[ub]:n.NEAREST_MIPMAP_NEAREST,[Vd]:n.NEAREST_MIPMAP_LINEAR,[jn]:n.LINEAR,[WO]:n.LINEAR_MIPMAP_NEAREST,[go]:n.LINEAR_MIPMAP_LINEAR},Ae={[wCt]:n.NEVER,[kCt]:n.ALWAYS,[NCt]:n.LESS,[iI]:n.LEQUAL,[OCt]:n.EQUAL,[DCt]:n.GEQUAL,[ICt]:n.GREATER,[MCt]:n.NOTEQUAL};function J(D,I,z){if(z?(n.texParameteri(D,n.TEXTURE_WRAP_S,me[I.wrapS]),n.texParameteri(D,n.TEXTURE_WRAP_T,me[I.wrapT]),(D===n.TEXTURE_3D||D===n.TEXTURE_2D_ARRAY)&&n.texParameteri(D,n.TEXTURE_WRAP_R,me[I.wrapR]),n.texParameteri(D,n.TEXTURE_MAG_FILTER,ve[I.magFilter]),n.texParameteri(D,n.TEXTURE_MIN_FILTER,ve[I.minFilter])):(n.texParameteri(D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(D===n.TEXTURE_3D||D===n.TEXTURE_2D_ARRAY)&&n.texParameteri(D,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(I.wrapS!==gi||I.wrapT!==gi)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(D,n.TEXTURE_MAG_FILTER,A(I.magFilter)),n.texParameteri(D,n.TEXTURE_MIN_FILTER,A(I.minFilter)),I.minFilter!==En&&I.minFilter!==jn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),I.compareFunction&&(n.texParameteri(D,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(D,n.TEXTURE_COMPARE_FUNC,Ae[I.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const he=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===En||I.minFilter!==Vd&&I.minFilter!==go||I.type===ks&&e.has("OES_texture_float_linear")===!1||a===!1&&I.type===oc&&e.has("OES_texture_half_float_linear")===!1)return;(I.anisotropy>1||i.get(I).__currentAnisotropy)&&(n.texParameterf(D,he.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,s.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function ge(D,I){let z=!1;D.__webglInit===void 0&&(D.__webglInit=!0,I.addEventListener("dispose",U));const he=I.source;let X=b.get(he);X===void 0&&(X={},b.set(he,X));const oe=Y(I);if(oe!==D.__cacheKey){X[oe]===void 0&&(X[oe]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,z=!0),X[oe].usedTimes++;const Re=X[D.__cacheKey];Re!==void 0&&(X[D.__cacheKey].usedTimes--,Re.usedTimes===0&&L(I)),D.__cacheKey=oe,D.__webglTexture=X[oe].texture}return z}function ee(D,I,z){let he=n.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(he=n.TEXTURE_2D_ARRAY),I.isData3DTexture&&(he=n.TEXTURE_3D);const X=ge(D,I),oe=I.source;t.bindTexture(he,D.__webglTexture,n.TEXTURE0+z);const Re=i.get(oe);if(oe.version!==Re.__version||X===!0){t.activeTexture(n.TEXTURE0+z);const xe=Bt.getPrimaries(Bt.workingColorSpace),De=I.colorSpace===Ei?null:Bt.getPrimaries(I.colorSpace),ze=I.colorSpace===Ei||xe===De?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,I.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,ze);const st=C(I)&&T(I.image)===!1;let ke=y(I.image,st,!1,c);ke=ce(I,ke);const ct=T(ke)||a,Qe=r.convert(I.format,I.colorSpace);let qe=r.convert(I.type),et=R(I.internalFormat,Qe,qe,I.colorSpace,I.isVideoTexture);J(he,I,ct);let Fe;const pt=I.mipmaps,pe=a&&I.isVideoTexture!==!0&&et!==eI,We=Re.__version===void 0||X===!0,Ue=S(I,ke,ct);if(I.isDepthTexture)et=n.DEPTH_COMPONENT,a?I.type===ks?et=n.DEPTH_COMPONENT32F:I.type===br?et=n.DEPTH_COMPONENT24:I.type===lo?et=n.DEPTH24_STENCIL8:et=n.DEPTH_COMPONENT16:I.type===ks&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===co&&et===n.DEPTH_COMPONENT&&I.type!==XE&&I.type!==br&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=br,qe=r.convert(I.type)),I.format===Aa&&et===n.DEPTH_COMPONENT&&(et=n.DEPTH_STENCIL,I.type!==lo&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=lo,qe=r.convert(I.type))),We&&(pe?t.texStorage2D(n.TEXTURE_2D,1,et,ke.width,ke.height):t.texImage2D(n.TEXTURE_2D,0,et,ke.width,ke.height,0,Qe,qe,null));else if(I.isDataTexture)if(pt.length>0&&ct){pe&&We&&t.texStorage2D(n.TEXTURE_2D,Ue,et,pt[0].width,pt[0].height);for(let Ne=0,Be=pt.length;Ne>=1,Be>>=1}}else if(pt.length>0&&ct){pe&&We&&t.texStorage2D(n.TEXTURE_2D,Ue,et,pt[0].width,pt[0].height);for(let Ne=0,Be=pt.length;Ne0&&We++,t.texStorage2D(n.TEXTURE_CUBE_MAP,We,Fe,ke[0].width,ke[0].height));for(let Ne=0;Ne<6;Ne++)if(st){pt?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,0,0,ke[Ne].width,ke[Ne].height,qe,et,ke[Ne].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,Fe,ke[Ne].width,ke[Ne].height,0,qe,et,ke[Ne].data);for(let Be=0;Be>oe),ke=Math.max(1,I.height>>oe);X===n.TEXTURE_3D||X===n.TEXTURE_2D_ARRAY?t.texImage3D(X,oe,De,st,ke,I.depth,0,Re,xe,null):t.texImage2D(X,oe,De,st,ke,0,Re,xe,null)}t.bindFramebuffer(n.FRAMEBUFFER,D),_e(I)?f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,he,X,i.get(z).__webglTexture,0,V(I)):(X===n.TEXTURE_2D||X>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&X<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,he,X,i.get(z).__webglTexture,oe),t.bindFramebuffer(n.FRAMEBUFFER,null)}function k(D,I,z){if(n.bindRenderbuffer(n.RENDERBUFFER,D),I.depthBuffer&&!I.stencilBuffer){let he=a===!0?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(z||_e(I)){const X=I.depthTexture;X&&X.isDepthTexture&&(X.type===ks?he=n.DEPTH_COMPONENT32F:X.type===br&&(he=n.DEPTH_COMPONENT24));const oe=V(I);_e(I)?f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,oe,he,I.width,I.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,oe,he,I.width,I.height)}else n.renderbufferStorage(n.RENDERBUFFER,he,I.width,I.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,D)}else if(I.depthBuffer&&I.stencilBuffer){const he=V(I);z&&_e(I)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,he,n.DEPTH24_STENCIL8,I.width,I.height):_e(I)?f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,he,n.DEPTH24_STENCIL8,I.width,I.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,I.width,I.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,D)}else{const he=I.isWebGLMultipleRenderTargets===!0?I.texture:[I.texture];for(let X=0;X0){z.__webglFramebuffer[xe]=[];for(let De=0;De0){z.__webglFramebuffer=[];for(let xe=0;xe0&&_e(D)===!1){const xe=oe?I:[I];z.__webglMultisampledFramebuffer=n.createFramebuffer(),z.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,z.__webglMultisampledFramebuffer);for(let De=0;De0)for(let De=0;De0)for(let De=0;De0&&_e(D)===!1){const I=D.isWebGLMultipleRenderTargets?D.texture:[D.texture],z=D.width,he=D.height;let X=n.COLOR_BUFFER_BIT;const oe=[],Re=D.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,xe=i.get(D),De=D.isWebGLMultipleRenderTargets===!0;if(De)for(let ze=0;ze0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function re(D){const I=o.render.frame;h.get(D)!==I&&(h.set(D,I),D.update())}function ce(D,I){const z=D.colorSpace,he=D.format,X=D.type;return D.isCompressedTexture===!0||D.isVideoTexture===!0||D.format===hb||z!==Nn&&z!==Ei&&(Bt.getTransfer(z)===Xt?a===!1?e.has("EXT_sRGB")===!0&&he===bi?(D.format=hb,D.minFilter=jn,D.generateMipmaps=!1):I=rI.sRGBToLinear(I):(he!==bi||X!==xr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",z)),I}this.allocateTextureUnit=j,this.resetTextureUnits=P,this.setTexture2D=Q,this.setTexture2DArray=ae,this.setTexture3D=te,this.setTextureCube=Z,this.rebindTextures=de,this.setupRenderTarget=se,this.updateRenderTargetMipmap=Ce,this.updateMultisampleRenderTarget=we,this.setupDepthRenderbuffer=$,this.setupFrameBufferTexture=Ie,this.useMultisampledRTT=_e}function KNt(n,e,t){const i=t.isWebGL2;function s(r,o=Ei){let a;const l=Bt.getTransfer(o);if(r===xr)return n.UNSIGNED_BYTE;if(r===jO)return n.UNSIGNED_SHORT_4_4_4_4;if(r===QO)return n.UNSIGNED_SHORT_5_5_5_1;if(r===fCt)return n.BYTE;if(r===mCt)return n.SHORT;if(r===XE)return n.UNSIGNED_SHORT;if(r===KO)return n.INT;if(r===br)return n.UNSIGNED_INT;if(r===ks)return n.FLOAT;if(r===oc)return i?n.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(r===gCt)return n.ALPHA;if(r===bi)return n.RGBA;if(r===bCt)return n.LUMINANCE;if(r===ECt)return n.LUMINANCE_ALPHA;if(r===co)return n.DEPTH_COMPONENT;if(r===Aa)return n.DEPTH_STENCIL;if(r===hb)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(r===vCt)return n.RED;if(r===XO)return n.RED_INTEGER;if(r===yCt)return n.RG;if(r===ZO)return n.RG_INTEGER;if(r===JO)return n.RGBA_INTEGER;if(r===Bm||r===Gm||r===zm||r===Vm)if(l===Xt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(r===Bm)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Gm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===zm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===Vm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(r===Bm)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Gm)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===zm)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===Vm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===QC||r===XC||r===ZC||r===JC)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(r===QC)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===XC)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===ZC)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===JC)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===eI)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(r===e1||r===t1)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(r===e1)return l===Xt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(r===t1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===n1||r===i1||r===s1||r===r1||r===o1||r===a1||r===l1||r===c1||r===d1||r===u1||r===p1||r===_1||r===h1||r===f1)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(r===n1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===i1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===s1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===r1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===o1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===a1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===l1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===c1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===d1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===u1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===p1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===_1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===h1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===f1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Hm||r===m1||r===g1)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(r===Hm)return l===Xt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===m1)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===g1)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===SCt||r===b1||r===E1||r===v1)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(r===Hm)return a.COMPRESSED_RED_RGTC1_EXT;if(r===b1)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===E1)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===v1)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===lo?i?n.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[r]!==void 0?n[r]:null}return{convert:s}}class jNt extends Vn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class io extends sn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const QNt={type:"move"};class _g{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new io,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new io,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new be,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new be),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new io,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new be,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new be),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let s=null,r=null,o=null;const a=this._targetRay,l=this._grip,d=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(d&&e.hand){o=!0;for(const E of e.hand.values()){const b=t.getJointPose(E,i),g=this._getHandJoint(d,E);b!==null&&(g.matrix.fromArray(b.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=b.radius),g.visible=b!==null}const c=d.joints["index-finger-tip"],_=d.joints["thumb-tip"],f=c.position.distanceTo(_.position),m=.02,h=.005;d.inputState.pinching&&f>m+h?(d.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!d.inputState.pinching&&f<=m-h&&(d.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(s=t.getPose(e.targetRaySpace,i),s===null&&r!==null&&(s=r),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(QNt)))}return a!==null&&(a.visible=s!==null),l!==null&&(l.visible=r!==null),d!==null&&(d.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new io;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class XNt extends ja{constructor(e,t){super();const i=this;let s=null,r=1,o=null,a="local-floor",l=1,d=null,c=null,_=null,f=null,m=null,h=null;const E=t.getContextAttributes();let b=null,g=null;const v=[],y=[],T=new Mt;let C=null;const x=new Vn;x.layers.enable(1),x.viewport=new Wt;const O=new Vn;O.layers.enable(2),O.viewport=new Wt;const R=[x,O],S=new jNt;S.layers.enable(1),S.layers.enable(2);let A=null,U=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Z){let me=v[Z];return me===void 0&&(me=new _g,v[Z]=me),me.getTargetRaySpace()},this.getControllerGrip=function(Z){let me=v[Z];return me===void 0&&(me=new _g,v[Z]=me),me.getGripSpace()},this.getHand=function(Z){let me=v[Z];return me===void 0&&(me=new _g,v[Z]=me),me.getHandSpace()};function F(Z){const me=y.indexOf(Z.inputSource);if(me===-1)return;const ve=v[me];ve!==void 0&&(ve.update(Z.inputSource,Z.frame,d||o),ve.dispatchEvent({type:Z.type,data:Z.inputSource}))}function K(){s.removeEventListener("select",F),s.removeEventListener("selectstart",F),s.removeEventListener("selectend",F),s.removeEventListener("squeeze",F),s.removeEventListener("squeezestart",F),s.removeEventListener("squeezeend",F),s.removeEventListener("end",K),s.removeEventListener("inputsourceschange",L);for(let Z=0;Z=0&&(y[Ae]=null,v[Ae].disconnect(ve))}for(let me=0;me=y.length){y.push(ve),Ae=ge;break}else if(y[ge]===null){y[ge]=ve,Ae=ge;break}if(Ae===-1)break}const J=v[Ae];J&&J.connect(ve)}}const H=new be,G=new be;function P(Z,me,ve){H.setFromMatrixPosition(me.matrixWorld),G.setFromMatrixPosition(ve.matrixWorld);const Ae=H.distanceTo(G),J=me.projectionMatrix.elements,ge=ve.projectionMatrix.elements,ee=J[14]/(J[10]-1),Se=J[14]/(J[10]+1),Ie=(J[9]+1)/J[5],k=(J[9]-1)/J[5],B=(J[8]-1)/J[0],$=(ge[8]+1)/ge[0],de=ee*B,se=ee*$,Ce=Ae/(-B+$),we=Ce*-B;me.matrixWorld.decompose(Z.position,Z.quaternion,Z.scale),Z.translateX(we),Z.translateZ(Ce),Z.matrixWorld.compose(Z.position,Z.quaternion,Z.scale),Z.matrixWorldInverse.copy(Z.matrixWorld).invert();const V=ee+Ce,_e=Se+Ce,re=de-we,ce=se+(Ae-we),D=Ie*Se/_e*V,I=k*Se/_e*V;Z.projectionMatrix.makePerspective(re,ce,D,I,V,_e),Z.projectionMatrixInverse.copy(Z.projectionMatrix).invert()}function j(Z,me){me===null?Z.matrixWorld.copy(Z.matrix):Z.matrixWorld.multiplyMatrices(me.matrixWorld,Z.matrix),Z.matrixWorldInverse.copy(Z.matrixWorld).invert()}this.updateCamera=function(Z){if(s===null)return;S.near=O.near=x.near=Z.near,S.far=O.far=x.far=Z.far,(A!==S.near||U!==S.far)&&(s.updateRenderState({depthNear:S.near,depthFar:S.far}),A=S.near,U=S.far);const me=Z.parent,ve=S.cameras;j(S,me);for(let Ae=0;Ae0&&(b.alphaTest.value=g.alphaTest);const v=e.get(g).envMap;if(v&&(b.envMap.value=v,b.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,b.reflectivity.value=g.reflectivity,b.ior.value=g.ior,b.refractionRatio.value=g.refractionRatio),g.lightMap){b.lightMap.value=g.lightMap;const y=n._useLegacyLights===!0?Math.PI:1;b.lightMapIntensity.value=g.lightMapIntensity*y,t(g.lightMap,b.lightMapTransform)}g.aoMap&&(b.aoMap.value=g.aoMap,b.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,b.aoMapTransform))}function o(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,g.map&&(b.map.value=g.map,t(g.map,b.mapTransform))}function a(b,g){b.dashSize.value=g.dashSize,b.totalSize.value=g.dashSize+g.gapSize,b.scale.value=g.scale}function l(b,g,v,y){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.size.value=g.size*v,b.scale.value=y*.5,g.map&&(b.map.value=g.map,t(g.map,b.uvTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,t(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function d(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.rotation.value=g.rotation,g.map&&(b.map.value=g.map,t(g.map,b.mapTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,t(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function c(b,g){b.specular.value.copy(g.specular),b.shininess.value=Math.max(g.shininess,1e-4)}function _(b,g){g.gradientMap&&(b.gradientMap.value=g.gradientMap)}function f(b,g){b.metalness.value=g.metalness,g.metalnessMap&&(b.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,b.metalnessMapTransform)),b.roughness.value=g.roughness,g.roughnessMap&&(b.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,b.roughnessMapTransform)),e.get(g).envMap&&(b.envMapIntensity.value=g.envMapIntensity)}function m(b,g,v){b.ior.value=g.ior,g.sheen>0&&(b.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),b.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(b.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,b.sheenColorMapTransform)),g.sheenRoughnessMap&&(b.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,b.sheenRoughnessMapTransform))),g.clearcoat>0&&(b.clearcoat.value=g.clearcoat,b.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(b.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,b.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(b.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,b.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(b.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,b.clearcoatNormalMapTransform),b.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Zn&&b.clearcoatNormalScale.value.negate())),g.iridescence>0&&(b.iridescence.value=g.iridescence,b.iridescenceIOR.value=g.iridescenceIOR,b.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],b.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(b.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,b.iridescenceMapTransform)),g.iridescenceThicknessMap&&(b.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,b.iridescenceThicknessMapTransform))),g.transmission>0&&(b.transmission.value=g.transmission,b.transmissionSamplerMap.value=v.texture,b.transmissionSamplerSize.value.set(v.width,v.height),g.transmissionMap&&(b.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,b.transmissionMapTransform)),b.thickness.value=g.thickness,g.thicknessMap&&(b.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,b.thicknessMapTransform)),b.attenuationDistance.value=g.attenuationDistance,b.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(b.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(b.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,b.anisotropyMapTransform))),b.specularIntensity.value=g.specularIntensity,b.specularColor.value.copy(g.specularColor),g.specularColorMap&&(b.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,b.specularColorMapTransform)),g.specularIntensityMap&&(b.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,b.specularIntensityMapTransform))}function h(b,g){g.matcap&&(b.matcap.value=g.matcap)}function E(b,g){const v=e.get(g).light;b.referencePosition.value.setFromMatrixPosition(v.matrixWorld),b.nearDistance.value=v.shadow.camera.near,b.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function JNt(n,e,t,i){let s={},r={},o=[];const a=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(v,y){const T=y.program;i.uniformBlockBinding(v,T)}function d(v,y){let T=s[v.id];T===void 0&&(h(v),T=c(v),s[v.id]=T,v.addEventListener("dispose",b));const C=y.program;i.updateUBOMapping(v,C);const x=e.render.frame;r[v.id]!==x&&(f(v),r[v.id]=x)}function c(v){const y=_();v.__bindingPointIndex=y;const T=n.createBuffer(),C=v.__size,x=v.usage;return n.bindBuffer(n.UNIFORM_BUFFER,T),n.bufferData(n.UNIFORM_BUFFER,C,x),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,y,T),T}function _(){for(let v=0;v0){x=T%C;const F=C-x;x!==0&&F-A.boundary<0&&(T+=C-x,S.__offset=T)}T+=A.storage}return x=T%C,x>0&&(T+=C-x),v.__size=T,v.__cache={},this}function E(v){const y={boundary:0,storage:0};return typeof v=="number"?(y.boundary=4,y.storage=4):v.isVector2?(y.boundary=8,y.storage=8):v.isVector3||v.isColor?(y.boundary=16,y.storage=12):v.isVector4?(y.boundary=16,y.storage=16):v.isMatrix3?(y.boundary=48,y.storage=48):v.isMatrix4?(y.boundary=64,y.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),y}function b(v){const y=v.target;y.removeEventListener("dispose",b);const T=o.indexOf(y.__bindingPointIndex);o.splice(T,1),n.deleteBuffer(s[y.id]),delete s[y.id],delete r[y.id]}function g(){for(const v in s)n.deleteBuffer(s[v]);o=[],s={},r={}}return{bind:l,update:d,dispose:g}}class SI{constructor(e={}){const{canvas:t=QCt(),context:i=null,depth:s=!0,stencil:r=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:d=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:_=!1}=e;this.isWebGLRenderer=!0;let f;i!==null?f=i.getContextAttributes().alpha:f=o;const m=new Uint32Array(4),h=new Int32Array(4);let E=null,b=null;const g=[],v=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=rn,this._useLegacyLights=!1,this.toneMapping=Tr,this.toneMappingExposure=1;const y=this;let T=!1,C=0,x=0,O=null,R=-1,S=null;const A=new Wt,U=new Wt;let F=null;const K=new gt(0);let L=0,H=t.width,G=t.height,P=1,j=null,Y=null;const Q=new Wt(0,0,H,G),ae=new Wt(0,0,H,G);let te=!1;const Z=new tv;let me=!1,ve=!1,Ae=null;const J=new At,ge=new Mt,ee=new be,Se={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Ie(){return O===null?P:1}let k=i;function B(N,W){for(let le=0;le{function Ge(){if(ye.forEach(function(Xe){we.get(Xe).currentProgram.isReady()&&ye.delete(Xe)}),ye.size===0){Ee(N);return}setTimeout(Ge,10)}$.get("KHR_parallel_shader_compile")!==null?Ge():setTimeout(Ge,10)})};let Et=null;function jt(N){Et&&Et(N)}function ln(){$t.stop()}function xt(){$t.start()}const $t=new fI;$t.setAnimationLoop(jt),typeof self<"u"&&$t.setContext(self),this.setAnimationLoop=function(N){Et=N,Fe.setAnimationLoop(N),N===null?$t.stop():$t.start()},Fe.addEventListener("sessionstart",ln),Fe.addEventListener("sessionend",xt),this.render=function(N,W){if(W!==void 0&&W.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;N.matrixWorldAutoUpdate===!0&&N.updateMatrixWorld(),W.parent===null&&W.matrixWorldAutoUpdate===!0&&W.updateMatrixWorld(),Fe.enabled===!0&&Fe.isPresenting===!0&&(Fe.cameraAutoUpdate===!0&&Fe.updateCamera(W),W=Fe.getCamera()),N.isScene===!0&&N.onBeforeRender(y,N,W,O),b=oe.get(N,v.length),b.init(),v.push(b),J.multiplyMatrices(W.projectionMatrix,W.matrixWorldInverse),Z.setFromProjectionMatrix(J),ve=this.localClippingEnabled,me=Re.init(this.clippingPlanes,ve),E=X.get(N,g.length),E.init(),g.push(E),yn(N,W,0,y.sortObjects),E.finish(),y.sortObjects===!0&&E.sort(j,Y),this.info.render.frame++,me===!0&&Re.beginShadows();const le=b.state.shadowsArray;if(xe.render(le,N,W),me===!0&&Re.endShadows(),this.info.autoReset===!0&&this.info.reset(),De.render(E,N),b.setupLights(y._useLegacyLights),W.isArrayCamera){const ye=W.cameras;for(let Ee=0,Ge=ye.length;Ee0?b=v[v.length-1]:b=null,g.pop(),g.length>0?E=g[g.length-1]:E=null};function yn(N,W,le,ye){if(N.visible===!1)return;if(N.layers.test(W.layers)){if(N.isGroup)le=N.renderOrder;else if(N.isLOD)N.autoUpdate===!0&&N.update(W);else if(N.isLight)b.pushLight(N),N.castShadow&&b.pushShadow(N);else if(N.isSprite){if(!N.frustumCulled||Z.intersectsSprite(N)){ye&&ee.setFromMatrixPosition(N.matrixWorld).applyMatrix4(J);const Xe=I.update(N),nt=N.material;nt.visible&&E.push(N,Xe,nt,le,ee.z,null)}}else if((N.isMesh||N.isLine||N.isPoints)&&(!N.frustumCulled||Z.intersectsObject(N))){const Xe=I.update(N),nt=N.material;if(ye&&(N.boundingSphere!==void 0?(N.boundingSphere===null&&N.computeBoundingSphere(),ee.copy(N.boundingSphere.center)):(Xe.boundingSphere===null&&Xe.computeBoundingSphere(),ee.copy(Xe.boundingSphere.center)),ee.applyMatrix4(N.matrixWorld).applyMatrix4(J)),Array.isArray(nt)){const at=Xe.groups;for(let rt=0,_t=at.length;rt<_t;rt++){const ft=at[rt],Kt=nt[ft.materialIndex];Kt&&Kt.visible&&E.push(N,Xe,Kt,le,ee.z,ft)}}else nt.visible&&E.push(N,Xe,nt,le,ee.z,null)}}const Ge=N.children;for(let Xe=0,nt=Ge.length;Xe0&&kr(Ee,Ge,W,le),ye&&se.viewport(A.copy(ye)),Ee.length>0&&ci(Ee,W,le),Ge.length>0&&ci(Ge,W,le),Xe.length>0&&ci(Xe,W,le),se.buffers.depth.setTest(!0),se.buffers.depth.setMask(!0),se.buffers.color.setMask(!0),se.setPolygonOffset(!1)}function kr(N,W,le,ye){if((le.isScene===!0?le.overrideMaterial:null)!==null)return;const Ge=de.isWebGL2;Ae===null&&(Ae=new bo(1,1,{generateMipmaps:!0,type:$.has("EXT_color_buffer_half_float")?oc:xr,minFilter:go,samples:Ge?4:0})),y.getDrawingBufferSize(ge),Ge?Ae.setSize(ge.x,ge.y):Ae.setSize(Su(ge.x),Su(ge.y));const Xe=y.getRenderTarget();y.setRenderTarget(Ae),y.getClearColor(K),L=y.getClearAlpha(),L<1&&y.setClearColor(16777215,.5),y.clear();const nt=y.toneMapping;y.toneMapping=Tr,ci(N,le,ye),V.updateMultisampleRenderTarget(Ae),V.updateRenderTargetMipmap(Ae);let at=!1;for(let rt=0,_t=W.length;rt<_t;rt++){const ft=W[rt],Kt=ft.object,Tn=ft.geometry,nn=ft.material,On=ft.group;if(nn.side===Ji&&Kt.layers.test(ye.layers)){const Qt=nn.side;nn.side=Zn,nn.needsUpdate=!0,Sn(Kt,le,ye,Tn,nn,On),nn.side=Qt,nn.needsUpdate=!0,at=!0}}at===!0&&(V.updateMultisampleRenderTarget(Ae),V.updateRenderTargetMipmap(Ae)),y.setRenderTarget(Xe),y.setClearColor(K,L),y.toneMapping=nt}function ci(N,W,le){const ye=W.isScene===!0?W.overrideMaterial:null;for(let Ee=0,Ge=N.length;Ee0),ft=!!le.morphAttributes.position,Kt=!!le.morphAttributes.normal,Tn=!!le.morphAttributes.color;let nn=Tr;ye.toneMapped&&(O===null||O.isXRRenderTarget===!0)&&(nn=y.toneMapping);const On=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,Qt=On!==void 0?On.length:0,yt=we.get(ye),tl=b.state.lights;if(me===!0&&(ve===!0||N!==S)){const Wn=N===S&&ye.id===R;Re.setState(ye,N,Wn)}let Jt=!1;ye.version===yt.__version?(yt.needsLights&&yt.lightsStateVersion!==tl.state.version||yt.outputColorSpace!==nt||Ee.isBatchedMesh&&yt.batching===!1||!Ee.isBatchedMesh&&yt.batching===!0||Ee.isInstancedMesh&&yt.instancing===!1||!Ee.isInstancedMesh&&yt.instancing===!0||Ee.isSkinnedMesh&&yt.skinning===!1||!Ee.isSkinnedMesh&&yt.skinning===!0||Ee.isInstancedMesh&&yt.instancingColor===!0&&Ee.instanceColor===null||Ee.isInstancedMesh&&yt.instancingColor===!1&&Ee.instanceColor!==null||yt.envMap!==at||ye.fog===!0&&yt.fog!==Ge||yt.numClippingPlanes!==void 0&&(yt.numClippingPlanes!==Re.numPlanes||yt.numIntersection!==Re.numIntersection)||yt.vertexAlphas!==rt||yt.vertexTangents!==_t||yt.morphTargets!==ft||yt.morphNormals!==Kt||yt.morphColors!==Tn||yt.toneMapping!==nn||de.isWebGL2===!0&&yt.morphTargetsCount!==Qt)&&(Jt=!0):(Jt=!0,yt.__version=ye.version);let ys=yt.currentProgram;Jt===!0&&(ys=di(ye,W,Ee));let Ac=!1,Lr=!1,nl=!1;const gn=ys.getUniforms(),Ss=yt.uniforms;if(se.useProgram(ys.program)&&(Ac=!0,Lr=!0,nl=!0),ye.id!==R&&(R=ye.id,Lr=!0),Ac||S!==N){gn.setValue(k,"projectionMatrix",N.projectionMatrix),gn.setValue(k,"viewMatrix",N.matrixWorldInverse);const Wn=gn.map.cameraPosition;Wn!==void 0&&Wn.setValue(k,ee.setFromMatrixPosition(N.matrixWorld)),de.logarithmicDepthBuffer&&gn.setValue(k,"logDepthBufFC",2/(Math.log(N.far+1)/Math.LN2)),(ye.isMeshPhongMaterial||ye.isMeshToonMaterial||ye.isMeshLambertMaterial||ye.isMeshBasicMaterial||ye.isMeshStandardMaterial||ye.isShaderMaterial)&&gn.setValue(k,"isOrthographic",N.isOrthographicCamera===!0),S!==N&&(S=N,Lr=!0,nl=!0)}if(Ee.isSkinnedMesh){gn.setOptional(k,Ee,"bindMatrix"),gn.setOptional(k,Ee,"bindMatrixInverse");const Wn=Ee.skeleton;Wn&&(de.floatVertexTextures?(Wn.boneTexture===null&&Wn.computeBoneTexture(),gn.setValue(k,"boneTexture",Wn.boneTexture,V)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Ee.isBatchedMesh&&(gn.setOptional(k,Ee,"batchingTexture"),gn.setValue(k,"batchingTexture",Ee._matricesTexture,V));const il=le.morphAttributes;if((il.position!==void 0||il.normal!==void 0||il.color!==void 0&&de.isWebGL2===!0)&&ze.update(Ee,le,ys),(Lr||yt.receiveShadow!==Ee.receiveShadow)&&(yt.receiveShadow=Ee.receiveShadow,gn.setValue(k,"receiveShadow",Ee.receiveShadow)),ye.isMeshGouraudMaterial&&ye.envMap!==null&&(Ss.envMap.value=at,Ss.flipEnvMap.value=at.isCubeTexture&&at.isRenderTargetTexture===!1?-1:1),Lr&&(gn.setValue(k,"toneMappingExposure",y.toneMappingExposure),yt.needsLights&&vs(Ss,nl),Ge&&ye.fog===!0&&he.refreshFogUniforms(Ss,Ge),he.refreshMaterialUniforms(Ss,ye,P,G,Ae),Hd.upload(k,Ki(yt),Ss,V)),ye.isShaderMaterial&&ye.uniformsNeedUpdate===!0&&(Hd.upload(k,Ki(yt),Ss,V),ye.uniformsNeedUpdate=!1),ye.isSpriteMaterial&&gn.setValue(k,"center",Ee.center),gn.setValue(k,"modelViewMatrix",Ee.modelViewMatrix),gn.setValue(k,"normalMatrix",Ee.normalMatrix),gn.setValue(k,"modelMatrix",Ee.matrixWorld),ye.isShaderMaterial||ye.isRawShaderMaterial){const Wn=ye.uniformsGroups;for(let sl=0,Ep=Wn.length;sl0&&V.useMultisampledRTT(N)===!1?Ee=we.get(N).__webglMultisampledFramebuffer:Array.isArray(_t)?Ee=_t[le]:Ee=_t,A.copy(N.viewport),U.copy(N.scissor),F=N.scissorTest}else A.copy(Q).multiplyScalar(P).floor(),U.copy(ae).multiplyScalar(P).floor(),F=te;if(se.bindFramebuffer(k.FRAMEBUFFER,Ee)&&de.drawBuffers&&ye&&se.drawBuffers(N,Ee),se.viewport(A),se.scissor(U),se.setScissorTest(F),Ge){const at=we.get(N.texture);k.framebufferTexture2D(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,k.TEXTURE_CUBE_MAP_POSITIVE_X+W,at.__webglTexture,le)}else if(Xe){const at=we.get(N.texture),rt=W||0;k.framebufferTextureLayer(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,at.__webglTexture,le||0,rt)}R=-1},this.readRenderTargetPixels=function(N,W,le,ye,Ee,Ge,Xe){if(!(N&&N.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let nt=we.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&Xe!==void 0&&(nt=nt[Xe]),nt){se.bindFramebuffer(k.FRAMEBUFFER,nt);try{const at=N.texture,rt=at.format,_t=at.type;if(rt!==bi&&ct.convert(rt)!==k.getParameter(k.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ft=_t===oc&&($.has("EXT_color_buffer_half_float")||de.isWebGL2&&$.has("EXT_color_buffer_float"));if(_t!==xr&&ct.convert(_t)!==k.getParameter(k.IMPLEMENTATION_COLOR_READ_TYPE)&&!(_t===ks&&(de.isWebGL2||$.has("OES_texture_float")||$.has("WEBGL_color_buffer_float")))&&!ft){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}W>=0&&W<=N.width-ye&&le>=0&&le<=N.height-Ee&&k.readPixels(W,le,ye,Ee,ct.convert(rt),ct.convert(_t),Ge)}finally{const at=O!==null?we.get(O).__webglFramebuffer:null;se.bindFramebuffer(k.FRAMEBUFFER,at)}}},this.copyFramebufferToTexture=function(N,W,le=0){const ye=Math.pow(2,-le),Ee=Math.floor(W.image.width*ye),Ge=Math.floor(W.image.height*ye);V.setTexture2D(W,0),k.copyTexSubImage2D(k.TEXTURE_2D,le,0,0,N.x,N.y,Ee,Ge),se.unbindTexture()},this.copyTextureToTexture=function(N,W,le,ye=0){const Ee=W.image.width,Ge=W.image.height,Xe=ct.convert(le.format),nt=ct.convert(le.type);V.setTexture2D(le,0),k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,le.flipY),k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,le.premultiplyAlpha),k.pixelStorei(k.UNPACK_ALIGNMENT,le.unpackAlignment),W.isDataTexture?k.texSubImage2D(k.TEXTURE_2D,ye,N.x,N.y,Ee,Ge,Xe,nt,W.image.data):W.isCompressedTexture?k.compressedTexSubImage2D(k.TEXTURE_2D,ye,N.x,N.y,W.mipmaps[0].width,W.mipmaps[0].height,Xe,W.mipmaps[0].data):k.texSubImage2D(k.TEXTURE_2D,ye,N.x,N.y,Xe,nt,W.image),ye===0&&le.generateMipmaps&&k.generateMipmap(k.TEXTURE_2D),se.unbindTexture()},this.copyTextureToTexture3D=function(N,W,le,ye,Ee=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Ge=N.max.x-N.min.x+1,Xe=N.max.y-N.min.y+1,nt=N.max.z-N.min.z+1,at=ct.convert(ye.format),rt=ct.convert(ye.type);let _t;if(ye.isData3DTexture)V.setTexture3D(ye,0),_t=k.TEXTURE_3D;else if(ye.isDataArrayTexture)V.setTexture2DArray(ye,0),_t=k.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,ye.flipY),k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ye.premultiplyAlpha),k.pixelStorei(k.UNPACK_ALIGNMENT,ye.unpackAlignment);const ft=k.getParameter(k.UNPACK_ROW_LENGTH),Kt=k.getParameter(k.UNPACK_IMAGE_HEIGHT),Tn=k.getParameter(k.UNPACK_SKIP_PIXELS),nn=k.getParameter(k.UNPACK_SKIP_ROWS),On=k.getParameter(k.UNPACK_SKIP_IMAGES),Qt=le.isCompressedTexture?le.mipmaps[0]:le.image;k.pixelStorei(k.UNPACK_ROW_LENGTH,Qt.width),k.pixelStorei(k.UNPACK_IMAGE_HEIGHT,Qt.height),k.pixelStorei(k.UNPACK_SKIP_PIXELS,N.min.x),k.pixelStorei(k.UNPACK_SKIP_ROWS,N.min.y),k.pixelStorei(k.UNPACK_SKIP_IMAGES,N.min.z),le.isDataTexture||le.isData3DTexture?k.texSubImage3D(_t,Ee,W.x,W.y,W.z,Ge,Xe,nt,at,rt,Qt.data):le.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),k.compressedTexSubImage3D(_t,Ee,W.x,W.y,W.z,Ge,Xe,nt,at,Qt.data)):k.texSubImage3D(_t,Ee,W.x,W.y,W.z,Ge,Xe,nt,at,rt,Qt),k.pixelStorei(k.UNPACK_ROW_LENGTH,ft),k.pixelStorei(k.UNPACK_IMAGE_HEIGHT,Kt),k.pixelStorei(k.UNPACK_SKIP_PIXELS,Tn),k.pixelStorei(k.UNPACK_SKIP_ROWS,nn),k.pixelStorei(k.UNPACK_SKIP_IMAGES,On),Ee===0&&ye.generateMipmaps&&k.generateMipmap(_t),se.unbindTexture()},this.initTexture=function(N){N.isCubeTexture?V.setTextureCube(N,0):N.isData3DTexture?V.setTexture3D(N,0):N.isDataArrayTexture||N.isCompressedArrayTexture?V.setTexture2DArray(N,0):V.setTexture2D(N,0),se.unbindTexture()},this.resetState=function(){C=0,x=0,O=null,se.reset(),Qe.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ls}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===JE?"display-p3":"srgb",t.unpackColorSpace=Bt.workingColorSpace===pp?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===rn?uo:nI}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===uo?rn:Nn}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class eOt extends SI{}eOt.prototype.isWebGL1Renderer=!0;class tOt extends sn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class nOt{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=_b,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=zi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let s=0,r=this.stride;sl)continue;f.applyMatrix4(this.matrixWorld);const R=e.ray.origin.distanceTo(f);Re.far||t.push({distance:R,point:_.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),v=Math.min(b.count,o.start+o.count);for(let y=g,T=v-1;yl)continue;f.applyMatrix4(this.matrixWorld);const x=e.ray.origin.distanceTo(f);xe.far||t.push({distance:x,point:_.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;rs.far)return;r.push({distance:d,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class lv extends Vi{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ZE,this.normalScale=new Mt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class js extends lv{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Mt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return kn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new gt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new gt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new gt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class RR extends Vi{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new gt(16777215),this.specular=new gt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ZE,this.normalScale=new Mt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=QE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function Rd(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function pOt(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function _Ot(n){function e(s,r){return n[s]-n[r]}const t=n.length,i=new Array(t);for(let s=0;s!==t;++s)i[s]=s;return i.sort(e),i}function AR(n,e,t){const i=n.length,s=new n.constructor(i);for(let r=0,o=0;o!==i;++r){const a=t[r]*e;for(let l=0;l!==e;++l)s[o++]=n[a+l]}return s}function RI(n,e,t,i){let s=1,r=n[0];for(;r!==void 0&&r[i]===void 0;)r=n[s++];if(r===void 0)return;let o=r[i];if(o!==void 0)if(Array.isArray(o))do o=r[i],o!==void 0&&(e.push(r.time),t.push.apply(t,o)),r=n[s++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[i],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=n[s++];while(r!==void 0);else do o=r[i],o!==void 0&&(e.push(r.time),t.push(o)),r=n[s++];while(r!==void 0)}class xc{constructor(e,t,i,s){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,s=t[i],r=t[i-1];e:{t:{let o;n:{i:if(!(e=r)){const a=t[1];e=r)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,r!==0||o!==s){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=i.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,s=this.values,r=i.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(s!==void 0&&pOt(s))for(let a=0,l=s.length;a!==l;++a){const d=s[a];if(isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,d),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===qm,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*i,l=o*i,d=0;d!==i;++d)t[l+d]=t[a+d];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,s=new i(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}ms.prototype.TimeBufferType=Float32Array;ms.prototype.ValueBufferType=Float32Array;ms.prototype.DefaultInterpolation=wa;class Xa extends ms{}Xa.prototype.ValueTypeName="bool";Xa.prototype.ValueBufferType=Array;Xa.prototype.DefaultInterpolation=ac;Xa.prototype.InterpolantFactoryMethodLinear=void 0;Xa.prototype.InterpolantFactoryMethodSmooth=void 0;class AI extends ms{}AI.prototype.ValueTypeName="color";class Ia extends ms{}Ia.prototype.ValueTypeName="number";class gOt extends xc{constructor(e,t,i,s){super(e,t,i,s)}interpolate_(e,t,i,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(s-t);let d=e*a;for(let c=d+a;d!==c;d+=4)Dr.slerpFlat(r,0,o,d-a,o,d,l);return r}}class vo extends ms{InterpolantFactoryMethodLinear(e){return new gOt(this.times,this.values,this.getValueSize(),e)}}vo.prototype.ValueTypeName="quaternion";vo.prototype.DefaultInterpolation=wa;vo.prototype.InterpolantFactoryMethodSmooth=void 0;class Za extends ms{}Za.prototype.ValueTypeName="string";Za.prototype.ValueBufferType=Array;Za.prototype.DefaultInterpolation=ac;Za.prototype.InterpolantFactoryMethodLinear=void 0;Za.prototype.InterpolantFactoryMethodSmooth=void 0;class Ma extends ms{}Ma.prototype.ValueTypeName="vector";class bOt{constructor(e,t=-1,i,s=TCt){this.name=e,this.tracks=i,this.duration=t,this.blendMode=s,this.uuid=zi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,s=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(vOt(i[o]).scale(s));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],i=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=i.length;r!==o;++r)t.push(ms.toJSON(i[r]));return s}static CreateFromMorphTargetSequence(e,t,i,s){const r=t.length,o=[];for(let a=0;a1){const _=c[1];let f=s[_];f||(s[_]=f=[]),f.push(d)}}const o=[];for(const a in s)o.push(this.CreateFromMorphTargetSequence(a,s[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(_,f,m,h,E){if(m.length!==0){const b=[],g=[];RI(m,b,g,h),b.length!==0&&E.push(new _(f,b,g))}},s=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const d=e.hierarchy||[];for(let _=0;_{t&&t(r),this.manager.itemEnd(e)},0),r;if(Ns[e]!==void 0){Ns[e].push({onLoad:t,onProgress:i,onError:s});return}Ns[e]=[],Ns[e].push({onLoad:t,onProgress:i,onError:s});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(d=>{if(d.status===200||d.status===0){if(d.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||d.body===void 0||d.body.getReader===void 0)return d;const c=Ns[e],_=d.body.getReader(),f=d.headers.get("Content-Length")||d.headers.get("X-File-Size"),m=f?parseInt(f):0,h=m!==0;let E=0;const b=new ReadableStream({start(g){v();function v(){_.read().then(({done:y,value:T})=>{if(y)g.close();else{E+=T.byteLength;const C=new ProgressEvent("progress",{lengthComputable:h,loaded:E,total:m});for(let x=0,O=c.length;x{switch(l){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"document":return d.text().then(c=>new DOMParser().parseFromString(c,a));case"json":return d.json();default:if(a===void 0)return d.text();{const _=/charset="?([^;"\s]*)"?/i.exec(a),f=_&&_[1]?_[1].toLowerCase():void 0,m=new TextDecoder(f);return d.arrayBuffer().then(h=>m.decode(h))}}}).then(d=>{Da.add(e,d);const c=Ns[e];delete Ns[e];for(let _=0,f=c.length;_{const c=Ns[e];if(c===void 0)throw this.manager.itemError(e),d;delete Ns[e];for(let _=0,f=c.length;_{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class xOt extends Ja{constructor(e){super(e)}load(e,t,i,s){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Da.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a=lc("img");function l(){c(),Da.add(e,this),t&&t(this),r.manager.itemEnd(e)}function d(_){c(),s&&s(_),r.manager.itemError(e),r.manager.itemEnd(e)}function c(){a.removeEventListener("load",l,!1),a.removeEventListener("error",d,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",d,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class NI extends Ja{constructor(e){super(e)}load(e,t,i,s){const r=new wn,o=new xOt(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,t!==void 0&&t(r)},i,s),r}}class mp extends sn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new gt(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}const gg=new At,wR=new be,NR=new be;class cv{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Mt(512,512),this.map=null,this.mapPass=null,this.matrix=new At,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new tv,this._frameExtents=new Mt(1,1),this._viewportCount=1,this._viewports=[new Wt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;wR.setFromMatrixPosition(e.matrixWorld),t.position.copy(wR),NR.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(NR),t.updateMatrixWorld(),gg.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(gg),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(gg)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class COt extends cv{constructor(){super(new Vn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=Na*2*e.angle*this.focus,s=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;(i!==t.fov||s!==t.aspect||r!==t.far)&&(t.fov=i,t.aspect=s,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class ROt extends mp{constructor(e,t,i=0,s=Math.PI/3,r=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(sn.DEFAULT_UP),this.updateMatrix(),this.target=new sn,this.distance=i,this.angle=s,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new COt}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const OR=new At,Sl=new be,bg=new be;class AOt extends cv{constructor(){super(new Vn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Mt(4,2),this._viewportCount=6,this._viewports=[new Wt(2,1,1,1),new Wt(0,1,1,1),new Wt(3,1,1,1),new Wt(1,1,1,1),new Wt(3,0,1,1),new Wt(1,0,1,1)],this._cubeDirections=[new be(1,0,0),new be(-1,0,0),new be(0,0,1),new be(0,0,-1),new be(0,1,0),new be(0,-1,0)],this._cubeUps=[new be(0,1,0),new be(0,1,0),new be(0,1,0),new be(0,1,0),new be(0,0,1),new be(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,s=this.matrix,r=e.distance||i.far;r!==i.far&&(i.far=r,i.updateProjectionMatrix()),Sl.setFromMatrixPosition(e.matrixWorld),i.position.copy(Sl),bg.copy(i.position),bg.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(bg),i.updateMatrixWorld(),s.makeTranslation(-Sl.x,-Sl.y,-Sl.z),OR.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(OR)}}class wOt extends mp{constructor(e,t,i=0,s=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=s,this.shadow=new AOt}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class NOt extends cv{constructor(){super(new iv(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class OI extends mp{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(sn.DEFAULT_UP),this.updateMatrix(),this.target=new sn,this.shadow=new NOt}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class OOt extends mp{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class zl{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,s=e.length;i"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Da.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(l){Da.add(e,l),t&&t(l),r.manager.itemEnd(e)}).catch(function(l){s&&s(l),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}const dv="\\[\\]\\.:\\/",MOt=new RegExp("["+dv+"]","g"),uv="[^"+dv+"]",DOt="[^"+dv.replace("\\.","")+"]",kOt=/((?:WC+[\/:])*)/.source.replace("WC",uv),LOt=/(WCOD+)?/.source.replace("WCOD",DOt),POt=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",uv),UOt=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",uv),FOt=new RegExp("^"+kOt+LOt+POt+UOt+"$"),BOt=["material","materials","bones","map"];class GOt{constructor(e,t,i){const s=i||zt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=i.length;s!==r;++s)i[s].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class zt{constructor(e,t,i){this.path=t,this.parsedPath=i||zt.parseTrackName(t),this.node=zt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new zt.Composite(e,t,i):new zt(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(MOt,"")}static parseTrackName(e){const t=FOt.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const r=i.nodeName.substring(s+1);BOt.indexOf(r)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=r)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(r){for(let o=0;o=2.0 are supported."));return}const d=new EIt(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});d.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c=0&&a[_]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+_+'".')}}d.setExtensions(o),d.setPlugins(a),d.parse(i,s)}parseAsync(e,t){const i=this;return new Promise(function(s,r){i.parse(e,t,s,r)})}}function VOt(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const It={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class HOt{constructor(e){this.parser=e,this.name=It.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,s=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,o)}}class nIt{constructor(e){this.parser=e,this.name=It.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,s=i.json,r=s.textures[e];if(!r.extensions||!r.extensions[t])return null;const o=r.extensions[t],a=s.images[o.source];let l=i.textureLoader;if(a.uri){const d=i.options.manager.getHandler(a.uri);d!==null&&(l=d)}return this.detectSupport().then(function(d){if(d)return i.loadTextureImage(e,o.source,l);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class iIt{constructor(e){this.parser=e,this.name=It.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,s=i.json,r=s.textures[e];if(!r.extensions||!r.extensions[t])return null;const o=r.extensions[t],a=s.images[o.source];let l=i.textureLoader;if(a.uri){const d=i.options.manager.getHandler(a.uri);d!==null&&(l=d)}return this.detectSupport().then(function(d){if(d)return i.loadTextureImage(e,o.source,l);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class sIt{constructor(e){this.name=It.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const s=i.extensions[this.name],r=this.parser.getDependency("buffer",s.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const l=s.byteOffset||0,d=s.byteLength||0,c=s.count,_=s.byteStride,f=new Uint8Array(a,l,d);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(c,_,f,s.mode,s.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(c*_);return o.decodeGltfBuffer(new Uint8Array(m),c,_,f,s.mode,s.filter),m})})}else return null}}class rIt{constructor(e){this.name=It.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const s=t.meshes[i.mesh];for(const d of s.primitives)if(d.mode!==fi.TRIANGLES&&d.mode!==fi.TRIANGLE_STRIP&&d.mode!==fi.TRIANGLE_FAN&&d.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const d in o)a.push(this.parser.getDependency("accessor",o[d]).then(c=>(l[d]=c,l[d])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(d=>{const c=d.pop(),_=c.isGroup?c.children:[c],f=d[0].count,m=[];for(const h of _){const E=new At,b=new be,g=new Dr,v=new be(1,1,1),y=new lOt(h.geometry,h.material,f);for(let T=0;T0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const bIt=new At;class EIt{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new VOt,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,s=!1,r=-1;typeof navigator<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,s=navigator.userAgent.indexOf("Firefox")>-1,r=s?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||s&&r<98?this.textureLoader=new NI(this.options.manager):this.textureLoader=new IOt(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new wI(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,s=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][s.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:s.asset,parser:i,userData:{}};return qr(r,a,s),fr(a,s),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let s=0,r=t.length;s{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[d,c]of o.children.entries())r(c,a.children[d])};return r(i,s),s.name+="_instance_"+e.uses[t]++,s}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&b.setY(S,x[O*l+1]),l>=3&&b.setZ(S,x[O*l+2]),l>=4&&b.setW(S,x[O*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return b})}loadTexture(e){const t=this.json,i=this.options,r=t.textures[e].source,o=t.images[r];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,t,i){const s=this,r=this.json,o=r.textures[e],a=r.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const d=this.loadImageSource(t,i).then(function(c){c.flipY=!1,c.name=o.name||a.name||"",c.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(c.name=a.uri);const f=(r.samplers||{})[o.sampler]||{};return c.magFilter=DR[f.magFilter]||jn,c.minFilter=DR[f.minFilter]||go,c.wrapS=kR[f.wrapS]||Ra,c.wrapT=kR[f.wrapT]||Ra,s.associations.set(c,{textures:e}),c}).catch(function(){return null});return this.textureCache[l]=d,d}loadImageSource(e,t){const i=this,s=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(_=>_.clone());const o=s.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",d=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(_){d=!0;const f=new Blob([_],{type:o.mimeType});return l=a.createObjectURL(f),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(l).then(function(_){return new Promise(function(f,m){let h=f;t.isImageBitmapLoader===!0&&(h=function(E){const b=new wn(E);b.needsUpdate=!0,f(b)}),t.load(zl.resolveURL(_,r.path),h,void 0,m)})}).then(function(_){return d===!0&&a.revokeObjectURL(l),_.userData.mimeType=o.mimeType||gIt(o.uri),_}).catch(function(_){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),_});return this.sourceCache[e]=c,c}assignTexture(e,t,i,s){const r=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),r.extensions[It.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[It.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=r.associations.get(o);o=r.extensions[It.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,l)}}return s!==void 0&&(o.colorSpace=s),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const s=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new CI,Vi.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new xI,Vi.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(s||r||o){let a="ClonedMaterial:"+i.uuid+":";s&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),r&&(l.vertexColors=!0),o&&(l.flatShading=!0),s&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return lv}loadMaterial(e){const t=this,i=this.json,s=this.extensions,r=i.materials[e];let o;const a={},l=r.extensions||{},d=[];if(l[It.KHR_MATERIALS_UNLIT]){const _=s[It.KHR_MATERIALS_UNLIT];o=_.getMaterialType(),d.push(_.extendParams(a,r,t))}else{const _=r.pbrMetallicRoughness||{};if(a.color=new gt(1,1,1),a.opacity=1,Array.isArray(_.baseColorFactor)){const f=_.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],Nn),a.opacity=f[3]}_.baseColorTexture!==void 0&&d.push(t.assignTexture(a,"map",_.baseColorTexture,rn)),a.metalness=_.metallicFactor!==void 0?_.metallicFactor:1,a.roughness=_.roughnessFactor!==void 0?_.roughnessFactor:1,_.metallicRoughnessTexture!==void 0&&(d.push(t.assignTexture(a,"metalnessMap",_.metallicRoughnessTexture)),d.push(t.assignTexture(a,"roughnessMap",_.metallicRoughnessTexture))),o=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),d.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=Ji);const c=r.alphaMode||vg.OPAQUE;if(c===vg.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,c===vg.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==Er&&(d.push(t.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new Mt(1,1),r.normalTexture.scale!==void 0)){const _=r.normalTexture.scale;a.normalScale.set(_,_)}if(r.occlusionTexture!==void 0&&o!==Er&&(d.push(t.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==Er){const _=r.emissiveFactor;a.emissive=new gt().setRGB(_[0],_[1],_[2],Nn)}return r.emissiveTexture!==void 0&&o!==Er&&d.push(t.assignTexture(a,"emissiveMap",r.emissiveTexture,rn)),Promise.all(d).then(function(){const _=new o(a);return r.name&&(_.name=r.name),fr(_,r),t.associations.set(_,{materials:e}),r.extensions&&qr(s,_,r),_})}createUniqueName(e){const t=zt.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,s=this.primitiveCache;function r(a){return i[It.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return LR(l,a,t)})}const o=[];for(let a=0,l=e.length;a0&&fIt(g,r),g.name=t.createUniqueName(r.name||"mesh_"+e),fr(g,r),b.extensions&&qr(s,g,b),t.assignFinalMaterial(g),_.push(g)}for(let m=0,h=_.length;m1?c=new io:d.length===1?c=d[0]:c=new sn,c!==d[0])for(let _=0,f=d.length;_{const _=new Map;for(const[f,m]of s.associations)(f instanceof Vi||f instanceof wn)&&_.set(f,m);return c.traverse(f=>{const m=s.associations.get(f);m!=null&&_.set(f,m)}),_};return s.associations=d(r),r})}_createAnimationTracks(e,t,i,s,r){const o=[],a=e.name?e.name:e.uuid,l=[];rr[r.path]===rr.weights?e.traverse(function(f){f.morphTargetInfluences&&l.push(f.name?f.name:f.uuid)}):l.push(a);let d;switch(rr[r.path]){case rr.weights:d=Ia;break;case rr.rotation:d=vo;break;case rr.position:case rr.scale:d=Ma;break;default:switch(i.itemSize){case 1:d=Ia;break;case 2:case 3:default:d=Ma;break}break}const c=s.interpolation!==void 0?pIt[s.interpolation]:wa,_=this._getArrayFromAccessor(i);for(let f=0,m=l.length;f{Ye.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,Ze.emit("stop_webcam_video_stream"),Ve(()=>{Ye.replace()})},startDrag(n){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(n){if(this.isDragging){const e=n.clientX-this.dragStart.x,t=n.clientY-this.dragStart.y;this.position.bottom-=t,this.position.right-=e,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ye.replace(),Ze.on("video_stream_image",n=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+n,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},SIt=["src"],TIt=["src"],xIt={class:"controls"},CIt=u("i",{"data-feather":"video"},null,-1),RIt=[CIt],AIt=u("i",{"data-feather":"video"},null,-1),wIt=[AIt],NIt={key:2};function OIt(n,e,t,i,s,r){return w(),M("div",{class:"floating-frame bg-white",style:en({bottom:s.position.bottom+"px",right:s.position.right+"px","z-index":s.zIndex}),onMousedown:e[4]||(e[4]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[u("div",{class:"handle",onMousedown:e[0]||(e[0]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),s.isVideoActive&&s.imageDataUrl!=null?(w(),M("img",{key:0,src:s.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,SIt)):q("",!0),s.isVideoActive&&s.imageDataUrl==null?(w(),M("p",{key:1,src:s.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,TIt)):q("",!0),u("div",xIt,[s.isVideoActive?q("",!0):(w(),M("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startVideoStream&&r.startVideoStream(...o))},RIt)),s.isVideoActive?(w(),M("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopVideoStream&&r.stopVideoStream(...o))},wIt)):q("",!0),s.isVideoActive?(w(),M("span",NIt,"FPS: "+fe(s.frameRate),1)):q("",!0)])],36)}const IIt=bt(yIt,[["render",OIt]]);const MIt={data(){return{isAudioActive:!1,imageDataUrl:null,isDragging:!1,position:{bottom:0,right:0},dragStart:{x:0,y:0},zIndex:0,frameRate:0,frameCount:0,lastFrameTime:Date.now()}},methods:{startAudioStream(){Ze.emit("start_audio_stream",()=>{this.isAudioActive=!0}),Ve(()=>{Ye.replace()})},stopAudioStream(){Ze.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),Ve(()=>{Ye.replace()})},startDrag(n){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(n){if(this.isDragging){const e=n.clientX-this.dragStart.x,t=n.clientY-this.dragStart.y;this.position.bottom-=t,this.position.right-=e,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ye.replace(),Ze.on("update_spectrogram",n=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+n,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},DIt=["src"],kIt={class:"controls"},LIt=u("i",{"data-feather":"mic"},null,-1),PIt=[LIt],UIt=u("i",{"data-feather":"mic"},null,-1),FIt=[UIt],BIt={key:2};function GIt(n,e,t,i,s,r){return w(),M("div",{class:"floating-frame bg-white",style:en({bottom:s.position.bottom+"px",right:s.position.right+"px","z-index":s.zIndex}),onMousedown:e[4]||(e[4]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[u("div",{class:"handle",onMousedown:e[0]||(e[0]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),s.isAudioActive&&s.imageDataUrl!=null?(w(),M("img",{key:0,src:s.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,DIt)):q("",!0),u("div",kIt,[s.isAudioActive?q("",!0):(w(),M("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startAudioStream&&r.startAudioStream(...o))},PIt)),s.isAudioActive?(w(),M("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopAudioStream&&r.stopAudioStream(...o))},FIt)):q("",!0),s.isAudioActive?(w(),M("span",BIt,"FPS: "+fe(s.frameRate),1)):q("",!0)])],36)}const zIt=bt(MIt,[["render",GIt]]);const VIt={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:IIt,AudioFrame:zIt},computed:{isReady:{get(){return this.$store.state.ready}}},watch:{"$store.state.mountedPersArr":"updatePersonality","$store.state.config.active_personality_id":"updatePersonality"},async mounted(){for(;this.isReady===!1;)await new Promise(n=>setTimeout(n,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),Ve(()=>{Ye.replace()}),this.$refs.video_frame.position={bottom:0,right:0},this.$refs.audio_frame.position={bottom:0,right:100}},beforeDestroy(){},methods:{initWebGLScene(){this.scene=new tOt,this.camera=new Vn(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new SI,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const n=new Cr,e=new RR({color:65280});this.cube=new Hn(n,e),this.scene.add(this.cube);const t=new OOt(4210752),i=new OI(16777215,.5);i.position.set(0,1,0),this.scene.add(t),this.scene.add(i),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:n,config:e}=this.$store.state;this.activePersonality=n[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(n){new zOt().load(n,t=>{this.scene.remove(this.cube),this.cube=t.scene,this.scene.add(this.cube)})},showBoxWithAvatar(n){this.cube&&this.scene.remove(this.cube);const e=new Cr,t=new NI().load(n),i=new Er({map:t});this.cube=new Hn(e,i),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const n=new Cr,e=new RR({color:65280});this.cube=new Hn(n,e),this.scene.add(this.cube)},animate(){requestAnimationFrame(this.animate),this.cube&&(this.cube.rotation.x+=.01,this.cube.rotation.y+=.01),this.renderer.render(this.scene,this.camera)}}},HIt={ref:"webglContainer"},qIt={class:"flex-col y-overflow scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},YIt={key:0,class:"text-center"},$It={key:1,class:"text-center"},WIt={class:"floating-frame2"},KIt=["innerHTML"];function jIt(n,e,t,i,s,r){const o=ht("VideoFrame"),a=ht("AudioFrame");return w(),M($e,null,[u("div",HIt,null,512),u("div",qIt,[!s.activePersonality||!s.activePersonality.scene_path?(w(),M("div",YIt," Personality does not have a 3d avatar. ")):q("",!0),!s.activePersonality||!s.activePersonality.avatar||s.activePersonality.avatar===""?(w(),M("div",$It," Personality does not have an avatar. ")):q("",!0),u("div",WIt,[u("div",{innerHTML:n.htmlContent},null,8,KIt)])]),Oe(o,{ref:"video_frame"},null,512),Oe(a,{ref:"audio_frame"},null,512)],64)}const QIt=bt(VIt,[["render",jIt]]);let Ad;const XIt=new Uint8Array(16);function ZIt(){if(!Ad&&(Ad=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ad))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ad(XIt)}const xn=[];for(let n=0;n<256;++n)xn.push((n+256).toString(16).slice(1));function JIt(n,e=0){return xn[n[e+0]]+xn[n[e+1]]+xn[n[e+2]]+xn[n[e+3]]+"-"+xn[n[e+4]]+xn[n[e+5]]+"-"+xn[n[e+6]]+xn[n[e+7]]+"-"+xn[n[e+8]]+xn[n[e+9]]+"-"+xn[n[e+10]]+xn[n[e+11]]+xn[n[e+12]]+xn[n[e+13]]+xn[n[e+14]]+xn[n[e+15]]}const eMt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PR={randomUUID:eMt};function Fs(n,e,t){if(PR.randomUUID&&!e&&!n)return PR.randomUUID();n=n||{};const i=n.random||(n.rng||ZIt)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(let s=0;s<16;++s)e[t+s]=i[s];return e}return JIt(i)}class po{constructor(){this.listenerMap=new Map,this._listeners=[],this.proxyMap=new Map,this.proxies=[]}get listeners(){return this._listeners.concat(this.proxies.flatMap(e=>e()))}subscribe(e,t){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. +}`;function WNt(n,e,t){let i=new tv;const s=new Mt,r=new Mt,o=new Wt,a=new HNt({depthPacking:wCt}),l=new qNt,d={},c=t.maxTextureSize,_={[Vs]:Zn,[Zn]:Vs,[Ji]:Ji},f=new Eo({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Mt},radius:{value:4}},vertexShader:YNt,fragmentShader:$Nt}),m=f.clone();m.defines.HORIZONTAL_PASS=1;const h=new fs;h.setAttribute("position",new Yn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new Hn(h,f),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=YO;let g=this.type;this.render=function(C,x,O){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||C.length===0)return;const R=n.getRenderTarget(),S=n.getActiveCubeFace(),A=n.getActiveMipmapLevel(),U=n.state;U.setBlending(Sr),U.buffers.color.setClear(1,1,1,1),U.buffers.depth.setTest(!0),U.setScissorTest(!1);const F=g!==Is&&this.type===Is,K=g===Is&&this.type!==Is;for(let L=0,H=C.length;Lc||s.y>c)&&(s.x>c&&(r.x=Math.floor(c/j.x),s.x=r.x*j.x,P.mapSize.x=r.x),s.y>c&&(r.y=Math.floor(c/j.y),s.y=r.y*j.y,P.mapSize.y=r.y)),P.map===null||F===!0||K===!0){const Q=this.type!==Is?{minFilter:En,magFilter:En}:{};P.map!==null&&P.map.dispose(),P.map=new bo(s.x,s.y,Q),P.map.texture.name=G.name+".shadowMap",P.camera.updateProjectionMatrix()}n.setRenderTarget(P.map),n.clear();const Y=P.getViewportCount();for(let Q=0;Q0||x.map&&x.alphaTest>0){const U=S.uuid,F=x.uuid;let K=d[U];K===void 0&&(K={},d[U]=K);let L=K[F];L===void 0&&(L=S.clone(),K[F]=L),S=L}if(S.visible=x.visible,S.wireframe=x.wireframe,R===Is?S.side=x.shadowSide!==null?x.shadowSide:x.side:S.side=x.shadowSide!==null?x.shadowSide:_[x.side],S.alphaMap=x.alphaMap,S.alphaTest=x.alphaTest,S.map=x.map,S.clipShadows=x.clipShadows,S.clippingPlanes=x.clippingPlanes,S.clipIntersection=x.clipIntersection,S.displacementMap=x.displacementMap,S.displacementScale=x.displacementScale,S.displacementBias=x.displacementBias,S.wireframeLinewidth=x.wireframeLinewidth,S.linewidth=x.linewidth,O.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const U=n.properties.get(S);U.light=O}return S}function T(C,x,O,R,S){if(C.visible===!1)return;if(C.layers.test(x.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&S===Is)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(O.matrixWorldInverse,C.matrixWorld);const F=e.update(C),K=C.material;if(Array.isArray(K)){const L=F.groups;for(let H=0,G=L.length;H=1):Q.indexOf("OpenGL ES")!==-1&&(Y=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),j=Y>=2);let ae=null,te={};const Z=n.getParameter(n.SCISSOR_BOX),me=n.getParameter(n.VIEWPORT),ve=new Wt().fromArray(Z),Ae=new Wt().fromArray(me);function J(pe,We,Ue,Ne){const Be=new Uint8Array(4),ut=n.createTexture();n.bindTexture(pe,ut),n.texParameteri(pe,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(pe,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let Et=0;Et"u"?!1:/OculusBrowser/g.test(navigator.userAgent),h=new WeakMap;let E;const b=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(D,I){return g?new OffscreenCanvas(D,I):lc("canvas")}function y(D,I,z,he){let X=1;if((D.width>he||D.height>he)&&(X=he/Math.max(D.width,D.height)),X<1||I===!0)if(typeof HTMLImageElement<"u"&&D instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&D instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&D instanceof ImageBitmap){const oe=I?Su:Math.floor,Re=oe(X*D.width),xe=oe(X*D.height);E===void 0&&(E=v(Re,xe));const De=z?v(Re,xe):E;return De.width=Re,De.height=xe,De.getContext("2d").drawImage(D,0,0,Re,xe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+D.width+"x"+D.height+") to ("+Re+"x"+xe+")."),De}else return"data"in D&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+D.width+"x"+D.height+")."),D;return D}function T(D){return fb(D.width)&&fb(D.height)}function C(D){return a?!1:D.wrapS!==gi||D.wrapT!==gi||D.minFilter!==En&&D.minFilter!==jn}function x(D,I){return D.generateMipmaps&&I&&D.minFilter!==En&&D.minFilter!==jn}function O(D){n.generateMipmap(D)}function R(D,I,z,he,X=!1){if(a===!1)return I;if(D!==null){if(n[D]!==void 0)return n[D];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+D+"'")}let oe=I;if(I===n.RED&&(z===n.FLOAT&&(oe=n.R32F),z===n.HALF_FLOAT&&(oe=n.R16F),z===n.UNSIGNED_BYTE&&(oe=n.R8)),I===n.RED_INTEGER&&(z===n.UNSIGNED_BYTE&&(oe=n.R8UI),z===n.UNSIGNED_SHORT&&(oe=n.R16UI),z===n.UNSIGNED_INT&&(oe=n.R32UI),z===n.BYTE&&(oe=n.R8I),z===n.SHORT&&(oe=n.R16I),z===n.INT&&(oe=n.R32I)),I===n.RG&&(z===n.FLOAT&&(oe=n.RG32F),z===n.HALF_FLOAT&&(oe=n.RG16F),z===n.UNSIGNED_BYTE&&(oe=n.RG8)),I===n.RGBA){const Re=X?bu:Bt.getTransfer(he);z===n.FLOAT&&(oe=n.RGBA32F),z===n.HALF_FLOAT&&(oe=n.RGBA16F),z===n.UNSIGNED_BYTE&&(oe=Re===Xt?n.SRGB8_ALPHA8:n.RGBA8),z===n.UNSIGNED_SHORT_4_4_4_4&&(oe=n.RGBA4),z===n.UNSIGNED_SHORT_5_5_5_1&&(oe=n.RGB5_A1)}return(oe===n.R16F||oe===n.R32F||oe===n.RG16F||oe===n.RG32F||oe===n.RGBA16F||oe===n.RGBA32F)&&e.get("EXT_color_buffer_float"),oe}function S(D,I,z){return x(D,z)===!0||D.isFramebufferTexture&&D.minFilter!==En&&D.minFilter!==jn?Math.log2(Math.max(I.width,I.height))+1:D.mipmaps!==void 0&&D.mipmaps.length>0?D.mipmaps.length:D.isCompressedTexture&&Array.isArray(D.image)?I.mipmaps.length:1}function A(D){return D===En||D===ub||D===Vd?n.NEAREST:n.LINEAR}function U(D){const I=D.target;I.removeEventListener("dispose",U),K(I),I.isVideoTexture&&h.delete(I)}function F(D){const I=D.target;I.removeEventListener("dispose",F),H(I)}function K(D){const I=i.get(D);if(I.__webglInit===void 0)return;const z=D.source,he=b.get(z);if(he){const X=he[I.__cacheKey];X.usedTimes--,X.usedTimes===0&&L(D),Object.keys(he).length===0&&b.delete(z)}i.remove(D)}function L(D){const I=i.get(D);n.deleteTexture(I.__webglTexture);const z=D.source,he=b.get(z);delete he[I.__cacheKey],o.memory.textures--}function H(D){const I=D.texture,z=i.get(D),he=i.get(I);if(he.__webglTexture!==void 0&&(n.deleteTexture(he.__webglTexture),o.memory.textures--),D.depthTexture&&D.depthTexture.dispose(),D.isWebGLCubeRenderTarget)for(let X=0;X<6;X++){if(Array.isArray(z.__webglFramebuffer[X]))for(let oe=0;oe=l&&console.warn("THREE.WebGLTextures: Trying to use "+D+" texture units while this GPU supports only "+l),G+=1,D}function Y(D){const I=[];return I.push(D.wrapS),I.push(D.wrapT),I.push(D.wrapR||0),I.push(D.magFilter),I.push(D.minFilter),I.push(D.anisotropy),I.push(D.internalFormat),I.push(D.format),I.push(D.type),I.push(D.generateMipmaps),I.push(D.premultiplyAlpha),I.push(D.flipY),I.push(D.unpackAlignment),I.push(D.colorSpace),I.join()}function Q(D,I){const z=i.get(D);if(D.isVideoTexture&&re(D),D.isRenderTargetTexture===!1&&D.version>0&&z.__version!==D.version){const he=D.image;if(he===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(he.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ee(z,D,I);return}}t.bindTexture(n.TEXTURE_2D,z.__webglTexture,n.TEXTURE0+I)}function ae(D,I){const z=i.get(D);if(D.version>0&&z.__version!==D.version){ee(z,D,I);return}t.bindTexture(n.TEXTURE_2D_ARRAY,z.__webglTexture,n.TEXTURE0+I)}function te(D,I){const z=i.get(D);if(D.version>0&&z.__version!==D.version){ee(z,D,I);return}t.bindTexture(n.TEXTURE_3D,z.__webglTexture,n.TEXTURE0+I)}function Z(D,I){const z=i.get(D);if(D.version>0&&z.__version!==D.version){Se(z,D,I);return}t.bindTexture(n.TEXTURE_CUBE_MAP,z.__webglTexture,n.TEXTURE0+I)}const me={[Ra]:n.REPEAT,[gi]:n.CLAMP_TO_EDGE,[gu]:n.MIRRORED_REPEAT},ve={[En]:n.NEAREST,[ub]:n.NEAREST_MIPMAP_NEAREST,[Vd]:n.NEAREST_MIPMAP_LINEAR,[jn]:n.LINEAR,[WO]:n.LINEAR_MIPMAP_NEAREST,[go]:n.LINEAR_MIPMAP_LINEAR},Ae={[OCt]:n.NEVER,[PCt]:n.ALWAYS,[ICt]:n.LESS,[iI]:n.LEQUAL,[MCt]:n.EQUAL,[LCt]:n.GEQUAL,[DCt]:n.GREATER,[kCt]:n.NOTEQUAL};function J(D,I,z){if(z?(n.texParameteri(D,n.TEXTURE_WRAP_S,me[I.wrapS]),n.texParameteri(D,n.TEXTURE_WRAP_T,me[I.wrapT]),(D===n.TEXTURE_3D||D===n.TEXTURE_2D_ARRAY)&&n.texParameteri(D,n.TEXTURE_WRAP_R,me[I.wrapR]),n.texParameteri(D,n.TEXTURE_MAG_FILTER,ve[I.magFilter]),n.texParameteri(D,n.TEXTURE_MIN_FILTER,ve[I.minFilter])):(n.texParameteri(D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(D===n.TEXTURE_3D||D===n.TEXTURE_2D_ARRAY)&&n.texParameteri(D,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(I.wrapS!==gi||I.wrapT!==gi)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(D,n.TEXTURE_MAG_FILTER,A(I.magFilter)),n.texParameteri(D,n.TEXTURE_MIN_FILTER,A(I.minFilter)),I.minFilter!==En&&I.minFilter!==jn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),I.compareFunction&&(n.texParameteri(D,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(D,n.TEXTURE_COMPARE_FUNC,Ae[I.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const he=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===En||I.minFilter!==Vd&&I.minFilter!==go||I.type===ks&&e.has("OES_texture_float_linear")===!1||a===!1&&I.type===oc&&e.has("OES_texture_half_float_linear")===!1)return;(I.anisotropy>1||i.get(I).__currentAnisotropy)&&(n.texParameterf(D,he.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,s.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function ge(D,I){let z=!1;D.__webglInit===void 0&&(D.__webglInit=!0,I.addEventListener("dispose",U));const he=I.source;let X=b.get(he);X===void 0&&(X={},b.set(he,X));const oe=Y(I);if(oe!==D.__cacheKey){X[oe]===void 0&&(X[oe]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,z=!0),X[oe].usedTimes++;const Re=X[D.__cacheKey];Re!==void 0&&(X[D.__cacheKey].usedTimes--,Re.usedTimes===0&&L(I)),D.__cacheKey=oe,D.__webglTexture=X[oe].texture}return z}function ee(D,I,z){let he=n.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(he=n.TEXTURE_2D_ARRAY),I.isData3DTexture&&(he=n.TEXTURE_3D);const X=ge(D,I),oe=I.source;t.bindTexture(he,D.__webglTexture,n.TEXTURE0+z);const Re=i.get(oe);if(oe.version!==Re.__version||X===!0){t.activeTexture(n.TEXTURE0+z);const xe=Bt.getPrimaries(Bt.workingColorSpace),De=I.colorSpace===Ei?null:Bt.getPrimaries(I.colorSpace),ze=I.colorSpace===Ei||xe===De?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,I.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,ze);const st=C(I)&&T(I.image)===!1;let ke=y(I.image,st,!1,c);ke=ce(I,ke);const ct=T(ke)||a,Qe=r.convert(I.format,I.colorSpace);let qe=r.convert(I.type),et=R(I.internalFormat,Qe,qe,I.colorSpace,I.isVideoTexture);J(he,I,ct);let Fe;const pt=I.mipmaps,pe=a&&I.isVideoTexture!==!0&&et!==eI,We=Re.__version===void 0||X===!0,Ue=S(I,ke,ct);if(I.isDepthTexture)et=n.DEPTH_COMPONENT,a?I.type===ks?et=n.DEPTH_COMPONENT32F:I.type===br?et=n.DEPTH_COMPONENT24:I.type===lo?et=n.DEPTH24_STENCIL8:et=n.DEPTH_COMPONENT16:I.type===ks&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===co&&et===n.DEPTH_COMPONENT&&I.type!==XE&&I.type!==br&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=br,qe=r.convert(I.type)),I.format===Aa&&et===n.DEPTH_COMPONENT&&(et=n.DEPTH_STENCIL,I.type!==lo&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=lo,qe=r.convert(I.type))),We&&(pe?t.texStorage2D(n.TEXTURE_2D,1,et,ke.width,ke.height):t.texImage2D(n.TEXTURE_2D,0,et,ke.width,ke.height,0,Qe,qe,null));else if(I.isDataTexture)if(pt.length>0&&ct){pe&&We&&t.texStorage2D(n.TEXTURE_2D,Ue,et,pt[0].width,pt[0].height);for(let Ne=0,Be=pt.length;Ne>=1,Be>>=1}}else if(pt.length>0&&ct){pe&&We&&t.texStorage2D(n.TEXTURE_2D,Ue,et,pt[0].width,pt[0].height);for(let Ne=0,Be=pt.length;Ne0&&We++,t.texStorage2D(n.TEXTURE_CUBE_MAP,We,Fe,ke[0].width,ke[0].height));for(let Ne=0;Ne<6;Ne++)if(st){pt?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,0,0,ke[Ne].width,ke[Ne].height,qe,et,ke[Ne].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,Fe,ke[Ne].width,ke[Ne].height,0,qe,et,ke[Ne].data);for(let Be=0;Be>oe),ke=Math.max(1,I.height>>oe);X===n.TEXTURE_3D||X===n.TEXTURE_2D_ARRAY?t.texImage3D(X,oe,De,st,ke,I.depth,0,Re,xe,null):t.texImage2D(X,oe,De,st,ke,0,Re,xe,null)}t.bindFramebuffer(n.FRAMEBUFFER,D),_e(I)?f.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,he,X,i.get(z).__webglTexture,0,V(I)):(X===n.TEXTURE_2D||X>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&X<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,he,X,i.get(z).__webglTexture,oe),t.bindFramebuffer(n.FRAMEBUFFER,null)}function k(D,I,z){if(n.bindRenderbuffer(n.RENDERBUFFER,D),I.depthBuffer&&!I.stencilBuffer){let he=a===!0?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(z||_e(I)){const X=I.depthTexture;X&&X.isDepthTexture&&(X.type===ks?he=n.DEPTH_COMPONENT32F:X.type===br&&(he=n.DEPTH_COMPONENT24));const oe=V(I);_e(I)?f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,oe,he,I.width,I.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,oe,he,I.width,I.height)}else n.renderbufferStorage(n.RENDERBUFFER,he,I.width,I.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,D)}else if(I.depthBuffer&&I.stencilBuffer){const he=V(I);z&&_e(I)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,he,n.DEPTH24_STENCIL8,I.width,I.height):_e(I)?f.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,he,n.DEPTH24_STENCIL8,I.width,I.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,I.width,I.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,D)}else{const he=I.isWebGLMultipleRenderTargets===!0?I.texture:[I.texture];for(let X=0;X0){z.__webglFramebuffer[xe]=[];for(let De=0;De0){z.__webglFramebuffer=[];for(let xe=0;xe0&&_e(D)===!1){const xe=oe?I:[I];z.__webglMultisampledFramebuffer=n.createFramebuffer(),z.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,z.__webglMultisampledFramebuffer);for(let De=0;De0)for(let De=0;De0)for(let De=0;De0&&_e(D)===!1){const I=D.isWebGLMultipleRenderTargets?D.texture:[D.texture],z=D.width,he=D.height;let X=n.COLOR_BUFFER_BIT;const oe=[],Re=D.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,xe=i.get(D),De=D.isWebGLMultipleRenderTargets===!0;if(De)for(let ze=0;ze0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function re(D){const I=o.render.frame;h.get(D)!==I&&(h.set(D,I),D.update())}function ce(D,I){const z=D.colorSpace,he=D.format,X=D.type;return D.isCompressedTexture===!0||D.isVideoTexture===!0||D.format===hb||z!==Nn&&z!==Ei&&(Bt.getTransfer(z)===Xt?a===!1?e.has("EXT_sRGB")===!0&&he===bi?(D.format=hb,D.minFilter=jn,D.generateMipmaps=!1):I=rI.sRGBToLinear(I):(he!==bi||X!==xr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",z)),I}this.allocateTextureUnit=j,this.resetTextureUnits=P,this.setTexture2D=Q,this.setTexture2DArray=ae,this.setTexture3D=te,this.setTextureCube=Z,this.rebindTextures=de,this.setupRenderTarget=se,this.updateRenderTargetMipmap=Ce,this.updateMultisampleRenderTarget=we,this.setupDepthRenderbuffer=$,this.setupFrameBufferTexture=Ie,this.useMultisampledRTT=_e}function QNt(n,e,t){const i=t.isWebGL2;function s(r,o=Ei){let a;const l=Bt.getTransfer(o);if(r===xr)return n.UNSIGNED_BYTE;if(r===jO)return n.UNSIGNED_SHORT_4_4_4_4;if(r===QO)return n.UNSIGNED_SHORT_5_5_5_1;if(r===gCt)return n.BYTE;if(r===bCt)return n.SHORT;if(r===XE)return n.UNSIGNED_SHORT;if(r===KO)return n.INT;if(r===br)return n.UNSIGNED_INT;if(r===ks)return n.FLOAT;if(r===oc)return i?n.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(r===ECt)return n.ALPHA;if(r===bi)return n.RGBA;if(r===vCt)return n.LUMINANCE;if(r===yCt)return n.LUMINANCE_ALPHA;if(r===co)return n.DEPTH_COMPONENT;if(r===Aa)return n.DEPTH_STENCIL;if(r===hb)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(r===SCt)return n.RED;if(r===XO)return n.RED_INTEGER;if(r===TCt)return n.RG;if(r===ZO)return n.RG_INTEGER;if(r===JO)return n.RGBA_INTEGER;if(r===Bm||r===Gm||r===zm||r===Vm)if(l===Xt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(r===Bm)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Gm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===zm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===Vm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(r===Bm)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Gm)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===zm)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===Vm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===QC||r===XC||r===ZC||r===JC)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(r===QC)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===XC)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===ZC)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===JC)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===eI)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(r===e1||r===t1)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(r===e1)return l===Xt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(r===t1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===n1||r===i1||r===s1||r===r1||r===o1||r===a1||r===l1||r===c1||r===d1||r===u1||r===p1||r===_1||r===h1||r===f1)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(r===n1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===i1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===s1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===r1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===o1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===a1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===l1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===c1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===d1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===u1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===p1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===_1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===h1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===f1)return l===Xt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Hm||r===m1||r===g1)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(r===Hm)return l===Xt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===m1)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===g1)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===xCt||r===b1||r===E1||r===v1)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(r===Hm)return a.COMPRESSED_RED_RGTC1_EXT;if(r===b1)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===E1)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===v1)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===lo?i?n.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[r]!==void 0?n[r]:null}return{convert:s}}class XNt extends Vn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class io extends sn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const ZNt={type:"move"};class _g{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new io,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new io,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new be,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new be),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new io,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new be,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new be),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let s=null,r=null,o=null;const a=this._targetRay,l=this._grip,d=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(d&&e.hand){o=!0;for(const E of e.hand.values()){const b=t.getJointPose(E,i),g=this._getHandJoint(d,E);b!==null&&(g.matrix.fromArray(b.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=b.radius),g.visible=b!==null}const c=d.joints["index-finger-tip"],_=d.joints["thumb-tip"],f=c.position.distanceTo(_.position),m=.02,h=.005;d.inputState.pinching&&f>m+h?(d.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!d.inputState.pinching&&f<=m-h&&(d.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(s=t.getPose(e.targetRaySpace,i),s===null&&r!==null&&(s=r),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(ZNt)))}return a!==null&&(a.visible=s!==null),l!==null&&(l.visible=r!==null),d!==null&&(d.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new io;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class JNt extends ja{constructor(e,t){super();const i=this;let s=null,r=1,o=null,a="local-floor",l=1,d=null,c=null,_=null,f=null,m=null,h=null;const E=t.getContextAttributes();let b=null,g=null;const v=[],y=[],T=new Mt;let C=null;const x=new Vn;x.layers.enable(1),x.viewport=new Wt;const O=new Vn;O.layers.enable(2),O.viewport=new Wt;const R=[x,O],S=new XNt;S.layers.enable(1),S.layers.enable(2);let A=null,U=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Z){let me=v[Z];return me===void 0&&(me=new _g,v[Z]=me),me.getTargetRaySpace()},this.getControllerGrip=function(Z){let me=v[Z];return me===void 0&&(me=new _g,v[Z]=me),me.getGripSpace()},this.getHand=function(Z){let me=v[Z];return me===void 0&&(me=new _g,v[Z]=me),me.getHandSpace()};function F(Z){const me=y.indexOf(Z.inputSource);if(me===-1)return;const ve=v[me];ve!==void 0&&(ve.update(Z.inputSource,Z.frame,d||o),ve.dispatchEvent({type:Z.type,data:Z.inputSource}))}function K(){s.removeEventListener("select",F),s.removeEventListener("selectstart",F),s.removeEventListener("selectend",F),s.removeEventListener("squeeze",F),s.removeEventListener("squeezestart",F),s.removeEventListener("squeezeend",F),s.removeEventListener("end",K),s.removeEventListener("inputsourceschange",L);for(let Z=0;Z=0&&(y[Ae]=null,v[Ae].disconnect(ve))}for(let me=0;me=y.length){y.push(ve),Ae=ge;break}else if(y[ge]===null){y[ge]=ve,Ae=ge;break}if(Ae===-1)break}const J=v[Ae];J&&J.connect(ve)}}const H=new be,G=new be;function P(Z,me,ve){H.setFromMatrixPosition(me.matrixWorld),G.setFromMatrixPosition(ve.matrixWorld);const Ae=H.distanceTo(G),J=me.projectionMatrix.elements,ge=ve.projectionMatrix.elements,ee=J[14]/(J[10]-1),Se=J[14]/(J[10]+1),Ie=(J[9]+1)/J[5],k=(J[9]-1)/J[5],B=(J[8]-1)/J[0],$=(ge[8]+1)/ge[0],de=ee*B,se=ee*$,Ce=Ae/(-B+$),we=Ce*-B;me.matrixWorld.decompose(Z.position,Z.quaternion,Z.scale),Z.translateX(we),Z.translateZ(Ce),Z.matrixWorld.compose(Z.position,Z.quaternion,Z.scale),Z.matrixWorldInverse.copy(Z.matrixWorld).invert();const V=ee+Ce,_e=Se+Ce,re=de-we,ce=se+(Ae-we),D=Ie*Se/_e*V,I=k*Se/_e*V;Z.projectionMatrix.makePerspective(re,ce,D,I,V,_e),Z.projectionMatrixInverse.copy(Z.projectionMatrix).invert()}function j(Z,me){me===null?Z.matrixWorld.copy(Z.matrix):Z.matrixWorld.multiplyMatrices(me.matrixWorld,Z.matrix),Z.matrixWorldInverse.copy(Z.matrixWorld).invert()}this.updateCamera=function(Z){if(s===null)return;S.near=O.near=x.near=Z.near,S.far=O.far=x.far=Z.far,(A!==S.near||U!==S.far)&&(s.updateRenderState({depthNear:S.near,depthFar:S.far}),A=S.near,U=S.far);const me=Z.parent,ve=S.cameras;j(S,me);for(let Ae=0;Ae0&&(b.alphaTest.value=g.alphaTest);const v=e.get(g).envMap;if(v&&(b.envMap.value=v,b.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,b.reflectivity.value=g.reflectivity,b.ior.value=g.ior,b.refractionRatio.value=g.refractionRatio),g.lightMap){b.lightMap.value=g.lightMap;const y=n._useLegacyLights===!0?Math.PI:1;b.lightMapIntensity.value=g.lightMapIntensity*y,t(g.lightMap,b.lightMapTransform)}g.aoMap&&(b.aoMap.value=g.aoMap,b.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,b.aoMapTransform))}function o(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,g.map&&(b.map.value=g.map,t(g.map,b.mapTransform))}function a(b,g){b.dashSize.value=g.dashSize,b.totalSize.value=g.dashSize+g.gapSize,b.scale.value=g.scale}function l(b,g,v,y){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.size.value=g.size*v,b.scale.value=y*.5,g.map&&(b.map.value=g.map,t(g.map,b.uvTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,t(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function d(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.rotation.value=g.rotation,g.map&&(b.map.value=g.map,t(g.map,b.mapTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,t(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function c(b,g){b.specular.value.copy(g.specular),b.shininess.value=Math.max(g.shininess,1e-4)}function _(b,g){g.gradientMap&&(b.gradientMap.value=g.gradientMap)}function f(b,g){b.metalness.value=g.metalness,g.metalnessMap&&(b.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,b.metalnessMapTransform)),b.roughness.value=g.roughness,g.roughnessMap&&(b.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,b.roughnessMapTransform)),e.get(g).envMap&&(b.envMapIntensity.value=g.envMapIntensity)}function m(b,g,v){b.ior.value=g.ior,g.sheen>0&&(b.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),b.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(b.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,b.sheenColorMapTransform)),g.sheenRoughnessMap&&(b.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,b.sheenRoughnessMapTransform))),g.clearcoat>0&&(b.clearcoat.value=g.clearcoat,b.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(b.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,b.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(b.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,b.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(b.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,b.clearcoatNormalMapTransform),b.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Zn&&b.clearcoatNormalScale.value.negate())),g.iridescence>0&&(b.iridescence.value=g.iridescence,b.iridescenceIOR.value=g.iridescenceIOR,b.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],b.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(b.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,b.iridescenceMapTransform)),g.iridescenceThicknessMap&&(b.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,b.iridescenceThicknessMapTransform))),g.transmission>0&&(b.transmission.value=g.transmission,b.transmissionSamplerMap.value=v.texture,b.transmissionSamplerSize.value.set(v.width,v.height),g.transmissionMap&&(b.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,b.transmissionMapTransform)),b.thickness.value=g.thickness,g.thicknessMap&&(b.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,b.thicknessMapTransform)),b.attenuationDistance.value=g.attenuationDistance,b.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(b.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(b.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,b.anisotropyMapTransform))),b.specularIntensity.value=g.specularIntensity,b.specularColor.value.copy(g.specularColor),g.specularColorMap&&(b.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,b.specularColorMapTransform)),g.specularIntensityMap&&(b.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,b.specularIntensityMapTransform))}function h(b,g){g.matcap&&(b.matcap.value=g.matcap)}function E(b,g){const v=e.get(g).light;b.referencePosition.value.setFromMatrixPosition(v.matrixWorld),b.nearDistance.value=v.shadow.camera.near,b.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function tOt(n,e,t,i){let s={},r={},o=[];const a=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(v,y){const T=y.program;i.uniformBlockBinding(v,T)}function d(v,y){let T=s[v.id];T===void 0&&(h(v),T=c(v),s[v.id]=T,v.addEventListener("dispose",b));const C=y.program;i.updateUBOMapping(v,C);const x=e.render.frame;r[v.id]!==x&&(f(v),r[v.id]=x)}function c(v){const y=_();v.__bindingPointIndex=y;const T=n.createBuffer(),C=v.__size,x=v.usage;return n.bindBuffer(n.UNIFORM_BUFFER,T),n.bufferData(n.UNIFORM_BUFFER,C,x),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,y,T),T}function _(){for(let v=0;v0){x=T%C;const F=C-x;x!==0&&F-A.boundary<0&&(T+=C-x,S.__offset=T)}T+=A.storage}return x=T%C,x>0&&(T+=C-x),v.__size=T,v.__cache={},this}function E(v){const y={boundary:0,storage:0};return typeof v=="number"?(y.boundary=4,y.storage=4):v.isVector2?(y.boundary=8,y.storage=8):v.isVector3||v.isColor?(y.boundary=16,y.storage=12):v.isVector4?(y.boundary=16,y.storage=16):v.isMatrix3?(y.boundary=48,y.storage=48):v.isMatrix4?(y.boundary=64,y.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),y}function b(v){const y=v.target;y.removeEventListener("dispose",b);const T=o.indexOf(y.__bindingPointIndex);o.splice(T,1),n.deleteBuffer(s[y.id]),delete s[y.id],delete r[y.id]}function g(){for(const v in s)n.deleteBuffer(s[v]);o=[],s={},r={}}return{bind:l,update:d,dispose:g}}class SI{constructor(e={}){const{canvas:t=ZCt(),context:i=null,depth:s=!0,stencil:r=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:d=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:_=!1}=e;this.isWebGLRenderer=!0;let f;i!==null?f=i.getContextAttributes().alpha:f=o;const m=new Uint32Array(4),h=new Int32Array(4);let E=null,b=null;const g=[],v=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=rn,this._useLegacyLights=!1,this.toneMapping=Tr,this.toneMappingExposure=1;const y=this;let T=!1,C=0,x=0,O=null,R=-1,S=null;const A=new Wt,U=new Wt;let F=null;const K=new gt(0);let L=0,H=t.width,G=t.height,P=1,j=null,Y=null;const Q=new Wt(0,0,H,G),ae=new Wt(0,0,H,G);let te=!1;const Z=new tv;let me=!1,ve=!1,Ae=null;const J=new At,ge=new Mt,ee=new be,Se={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Ie(){return O===null?P:1}let k=i;function B(N,W){for(let le=0;le{function Ge(){if(ye.forEach(function(Xe){we.get(Xe).currentProgram.isReady()&&ye.delete(Xe)}),ye.size===0){Ee(N);return}setTimeout(Ge,10)}$.get("KHR_parallel_shader_compile")!==null?Ge():setTimeout(Ge,10)})};let Et=null;function jt(N){Et&&Et(N)}function ln(){$t.stop()}function xt(){$t.start()}const $t=new fI;$t.setAnimationLoop(jt),typeof self<"u"&&$t.setContext(self),this.setAnimationLoop=function(N){Et=N,Fe.setAnimationLoop(N),N===null?$t.stop():$t.start()},Fe.addEventListener("sessionstart",ln),Fe.addEventListener("sessionend",xt),this.render=function(N,W){if(W!==void 0&&W.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;N.matrixWorldAutoUpdate===!0&&N.updateMatrixWorld(),W.parent===null&&W.matrixWorldAutoUpdate===!0&&W.updateMatrixWorld(),Fe.enabled===!0&&Fe.isPresenting===!0&&(Fe.cameraAutoUpdate===!0&&Fe.updateCamera(W),W=Fe.getCamera()),N.isScene===!0&&N.onBeforeRender(y,N,W,O),b=oe.get(N,v.length),b.init(),v.push(b),J.multiplyMatrices(W.projectionMatrix,W.matrixWorldInverse),Z.setFromProjectionMatrix(J),ve=this.localClippingEnabled,me=Re.init(this.clippingPlanes,ve),E=X.get(N,g.length),E.init(),g.push(E),yn(N,W,0,y.sortObjects),E.finish(),y.sortObjects===!0&&E.sort(j,Y),this.info.render.frame++,me===!0&&Re.beginShadows();const le=b.state.shadowsArray;if(xe.render(le,N,W),me===!0&&Re.endShadows(),this.info.autoReset===!0&&this.info.reset(),De.render(E,N),b.setupLights(y._useLegacyLights),W.isArrayCamera){const ye=W.cameras;for(let Ee=0,Ge=ye.length;Ee0?b=v[v.length-1]:b=null,g.pop(),g.length>0?E=g[g.length-1]:E=null};function yn(N,W,le,ye){if(N.visible===!1)return;if(N.layers.test(W.layers)){if(N.isGroup)le=N.renderOrder;else if(N.isLOD)N.autoUpdate===!0&&N.update(W);else if(N.isLight)b.pushLight(N),N.castShadow&&b.pushShadow(N);else if(N.isSprite){if(!N.frustumCulled||Z.intersectsSprite(N)){ye&&ee.setFromMatrixPosition(N.matrixWorld).applyMatrix4(J);const Xe=I.update(N),nt=N.material;nt.visible&&E.push(N,Xe,nt,le,ee.z,null)}}else if((N.isMesh||N.isLine||N.isPoints)&&(!N.frustumCulled||Z.intersectsObject(N))){const Xe=I.update(N),nt=N.material;if(ye&&(N.boundingSphere!==void 0?(N.boundingSphere===null&&N.computeBoundingSphere(),ee.copy(N.boundingSphere.center)):(Xe.boundingSphere===null&&Xe.computeBoundingSphere(),ee.copy(Xe.boundingSphere.center)),ee.applyMatrix4(N.matrixWorld).applyMatrix4(J)),Array.isArray(nt)){const at=Xe.groups;for(let rt=0,_t=at.length;rt<_t;rt++){const ft=at[rt],Kt=nt[ft.materialIndex];Kt&&Kt.visible&&E.push(N,Xe,Kt,le,ee.z,ft)}}else nt.visible&&E.push(N,Xe,nt,le,ee.z,null)}}const Ge=N.children;for(let Xe=0,nt=Ge.length;Xe0&&kr(Ee,Ge,W,le),ye&&se.viewport(A.copy(ye)),Ee.length>0&&ci(Ee,W,le),Ge.length>0&&ci(Ge,W,le),Xe.length>0&&ci(Xe,W,le),se.buffers.depth.setTest(!0),se.buffers.depth.setMask(!0),se.buffers.color.setMask(!0),se.setPolygonOffset(!1)}function kr(N,W,le,ye){if((le.isScene===!0?le.overrideMaterial:null)!==null)return;const Ge=de.isWebGL2;Ae===null&&(Ae=new bo(1,1,{generateMipmaps:!0,type:$.has("EXT_color_buffer_half_float")?oc:xr,minFilter:go,samples:Ge?4:0})),y.getDrawingBufferSize(ge),Ge?Ae.setSize(ge.x,ge.y):Ae.setSize(Su(ge.x),Su(ge.y));const Xe=y.getRenderTarget();y.setRenderTarget(Ae),y.getClearColor(K),L=y.getClearAlpha(),L<1&&y.setClearColor(16777215,.5),y.clear();const nt=y.toneMapping;y.toneMapping=Tr,ci(N,le,ye),V.updateMultisampleRenderTarget(Ae),V.updateRenderTargetMipmap(Ae);let at=!1;for(let rt=0,_t=W.length;rt<_t;rt++){const ft=W[rt],Kt=ft.object,Tn=ft.geometry,nn=ft.material,On=ft.group;if(nn.side===Ji&&Kt.layers.test(ye.layers)){const Qt=nn.side;nn.side=Zn,nn.needsUpdate=!0,Sn(Kt,le,ye,Tn,nn,On),nn.side=Qt,nn.needsUpdate=!0,at=!0}}at===!0&&(V.updateMultisampleRenderTarget(Ae),V.updateRenderTargetMipmap(Ae)),y.setRenderTarget(Xe),y.setClearColor(K,L),y.toneMapping=nt}function ci(N,W,le){const ye=W.isScene===!0?W.overrideMaterial:null;for(let Ee=0,Ge=N.length;Ee0),ft=!!le.morphAttributes.position,Kt=!!le.morphAttributes.normal,Tn=!!le.morphAttributes.color;let nn=Tr;ye.toneMapped&&(O===null||O.isXRRenderTarget===!0)&&(nn=y.toneMapping);const On=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,Qt=On!==void 0?On.length:0,yt=we.get(ye),tl=b.state.lights;if(me===!0&&(ve===!0||N!==S)){const Wn=N===S&&ye.id===R;Re.setState(ye,N,Wn)}let Jt=!1;ye.version===yt.__version?(yt.needsLights&&yt.lightsStateVersion!==tl.state.version||yt.outputColorSpace!==nt||Ee.isBatchedMesh&&yt.batching===!1||!Ee.isBatchedMesh&&yt.batching===!0||Ee.isInstancedMesh&&yt.instancing===!1||!Ee.isInstancedMesh&&yt.instancing===!0||Ee.isSkinnedMesh&&yt.skinning===!1||!Ee.isSkinnedMesh&&yt.skinning===!0||Ee.isInstancedMesh&&yt.instancingColor===!0&&Ee.instanceColor===null||Ee.isInstancedMesh&&yt.instancingColor===!1&&Ee.instanceColor!==null||yt.envMap!==at||ye.fog===!0&&yt.fog!==Ge||yt.numClippingPlanes!==void 0&&(yt.numClippingPlanes!==Re.numPlanes||yt.numIntersection!==Re.numIntersection)||yt.vertexAlphas!==rt||yt.vertexTangents!==_t||yt.morphTargets!==ft||yt.morphNormals!==Kt||yt.morphColors!==Tn||yt.toneMapping!==nn||de.isWebGL2===!0&&yt.morphTargetsCount!==Qt)&&(Jt=!0):(Jt=!0,yt.__version=ye.version);let ys=yt.currentProgram;Jt===!0&&(ys=di(ye,W,Ee));let Ac=!1,Lr=!1,nl=!1;const gn=ys.getUniforms(),Ss=yt.uniforms;if(se.useProgram(ys.program)&&(Ac=!0,Lr=!0,nl=!0),ye.id!==R&&(R=ye.id,Lr=!0),Ac||S!==N){gn.setValue(k,"projectionMatrix",N.projectionMatrix),gn.setValue(k,"viewMatrix",N.matrixWorldInverse);const Wn=gn.map.cameraPosition;Wn!==void 0&&Wn.setValue(k,ee.setFromMatrixPosition(N.matrixWorld)),de.logarithmicDepthBuffer&&gn.setValue(k,"logDepthBufFC",2/(Math.log(N.far+1)/Math.LN2)),(ye.isMeshPhongMaterial||ye.isMeshToonMaterial||ye.isMeshLambertMaterial||ye.isMeshBasicMaterial||ye.isMeshStandardMaterial||ye.isShaderMaterial)&&gn.setValue(k,"isOrthographic",N.isOrthographicCamera===!0),S!==N&&(S=N,Lr=!0,nl=!0)}if(Ee.isSkinnedMesh){gn.setOptional(k,Ee,"bindMatrix"),gn.setOptional(k,Ee,"bindMatrixInverse");const Wn=Ee.skeleton;Wn&&(de.floatVertexTextures?(Wn.boneTexture===null&&Wn.computeBoneTexture(),gn.setValue(k,"boneTexture",Wn.boneTexture,V)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Ee.isBatchedMesh&&(gn.setOptional(k,Ee,"batchingTexture"),gn.setValue(k,"batchingTexture",Ee._matricesTexture,V));const il=le.morphAttributes;if((il.position!==void 0||il.normal!==void 0||il.color!==void 0&&de.isWebGL2===!0)&&ze.update(Ee,le,ys),(Lr||yt.receiveShadow!==Ee.receiveShadow)&&(yt.receiveShadow=Ee.receiveShadow,gn.setValue(k,"receiveShadow",Ee.receiveShadow)),ye.isMeshGouraudMaterial&&ye.envMap!==null&&(Ss.envMap.value=at,Ss.flipEnvMap.value=at.isCubeTexture&&at.isRenderTargetTexture===!1?-1:1),Lr&&(gn.setValue(k,"toneMappingExposure",y.toneMappingExposure),yt.needsLights&&vs(Ss,nl),Ge&&ye.fog===!0&&he.refreshFogUniforms(Ss,Ge),he.refreshMaterialUniforms(Ss,ye,P,G,Ae),Hd.upload(k,Ki(yt),Ss,V)),ye.isShaderMaterial&&ye.uniformsNeedUpdate===!0&&(Hd.upload(k,Ki(yt),Ss,V),ye.uniformsNeedUpdate=!1),ye.isSpriteMaterial&&gn.setValue(k,"center",Ee.center),gn.setValue(k,"modelViewMatrix",Ee.modelViewMatrix),gn.setValue(k,"normalMatrix",Ee.normalMatrix),gn.setValue(k,"modelMatrix",Ee.matrixWorld),ye.isShaderMaterial||ye.isRawShaderMaterial){const Wn=ye.uniformsGroups;for(let sl=0,Ep=Wn.length;sl0&&V.useMultisampledRTT(N)===!1?Ee=we.get(N).__webglMultisampledFramebuffer:Array.isArray(_t)?Ee=_t[le]:Ee=_t,A.copy(N.viewport),U.copy(N.scissor),F=N.scissorTest}else A.copy(Q).multiplyScalar(P).floor(),U.copy(ae).multiplyScalar(P).floor(),F=te;if(se.bindFramebuffer(k.FRAMEBUFFER,Ee)&&de.drawBuffers&&ye&&se.drawBuffers(N,Ee),se.viewport(A),se.scissor(U),se.setScissorTest(F),Ge){const at=we.get(N.texture);k.framebufferTexture2D(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,k.TEXTURE_CUBE_MAP_POSITIVE_X+W,at.__webglTexture,le)}else if(Xe){const at=we.get(N.texture),rt=W||0;k.framebufferTextureLayer(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,at.__webglTexture,le||0,rt)}R=-1},this.readRenderTargetPixels=function(N,W,le,ye,Ee,Ge,Xe){if(!(N&&N.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let nt=we.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&Xe!==void 0&&(nt=nt[Xe]),nt){se.bindFramebuffer(k.FRAMEBUFFER,nt);try{const at=N.texture,rt=at.format,_t=at.type;if(rt!==bi&&ct.convert(rt)!==k.getParameter(k.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ft=_t===oc&&($.has("EXT_color_buffer_half_float")||de.isWebGL2&&$.has("EXT_color_buffer_float"));if(_t!==xr&&ct.convert(_t)!==k.getParameter(k.IMPLEMENTATION_COLOR_READ_TYPE)&&!(_t===ks&&(de.isWebGL2||$.has("OES_texture_float")||$.has("WEBGL_color_buffer_float")))&&!ft){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}W>=0&&W<=N.width-ye&&le>=0&&le<=N.height-Ee&&k.readPixels(W,le,ye,Ee,ct.convert(rt),ct.convert(_t),Ge)}finally{const at=O!==null?we.get(O).__webglFramebuffer:null;se.bindFramebuffer(k.FRAMEBUFFER,at)}}},this.copyFramebufferToTexture=function(N,W,le=0){const ye=Math.pow(2,-le),Ee=Math.floor(W.image.width*ye),Ge=Math.floor(W.image.height*ye);V.setTexture2D(W,0),k.copyTexSubImage2D(k.TEXTURE_2D,le,0,0,N.x,N.y,Ee,Ge),se.unbindTexture()},this.copyTextureToTexture=function(N,W,le,ye=0){const Ee=W.image.width,Ge=W.image.height,Xe=ct.convert(le.format),nt=ct.convert(le.type);V.setTexture2D(le,0),k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,le.flipY),k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,le.premultiplyAlpha),k.pixelStorei(k.UNPACK_ALIGNMENT,le.unpackAlignment),W.isDataTexture?k.texSubImage2D(k.TEXTURE_2D,ye,N.x,N.y,Ee,Ge,Xe,nt,W.image.data):W.isCompressedTexture?k.compressedTexSubImage2D(k.TEXTURE_2D,ye,N.x,N.y,W.mipmaps[0].width,W.mipmaps[0].height,Xe,W.mipmaps[0].data):k.texSubImage2D(k.TEXTURE_2D,ye,N.x,N.y,Xe,nt,W.image),ye===0&&le.generateMipmaps&&k.generateMipmap(k.TEXTURE_2D),se.unbindTexture()},this.copyTextureToTexture3D=function(N,W,le,ye,Ee=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Ge=N.max.x-N.min.x+1,Xe=N.max.y-N.min.y+1,nt=N.max.z-N.min.z+1,at=ct.convert(ye.format),rt=ct.convert(ye.type);let _t;if(ye.isData3DTexture)V.setTexture3D(ye,0),_t=k.TEXTURE_3D;else if(ye.isDataArrayTexture)V.setTexture2DArray(ye,0),_t=k.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,ye.flipY),k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ye.premultiplyAlpha),k.pixelStorei(k.UNPACK_ALIGNMENT,ye.unpackAlignment);const ft=k.getParameter(k.UNPACK_ROW_LENGTH),Kt=k.getParameter(k.UNPACK_IMAGE_HEIGHT),Tn=k.getParameter(k.UNPACK_SKIP_PIXELS),nn=k.getParameter(k.UNPACK_SKIP_ROWS),On=k.getParameter(k.UNPACK_SKIP_IMAGES),Qt=le.isCompressedTexture?le.mipmaps[0]:le.image;k.pixelStorei(k.UNPACK_ROW_LENGTH,Qt.width),k.pixelStorei(k.UNPACK_IMAGE_HEIGHT,Qt.height),k.pixelStorei(k.UNPACK_SKIP_PIXELS,N.min.x),k.pixelStorei(k.UNPACK_SKIP_ROWS,N.min.y),k.pixelStorei(k.UNPACK_SKIP_IMAGES,N.min.z),le.isDataTexture||le.isData3DTexture?k.texSubImage3D(_t,Ee,W.x,W.y,W.z,Ge,Xe,nt,at,rt,Qt.data):le.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),k.compressedTexSubImage3D(_t,Ee,W.x,W.y,W.z,Ge,Xe,nt,at,Qt.data)):k.texSubImage3D(_t,Ee,W.x,W.y,W.z,Ge,Xe,nt,at,rt,Qt),k.pixelStorei(k.UNPACK_ROW_LENGTH,ft),k.pixelStorei(k.UNPACK_IMAGE_HEIGHT,Kt),k.pixelStorei(k.UNPACK_SKIP_PIXELS,Tn),k.pixelStorei(k.UNPACK_SKIP_ROWS,nn),k.pixelStorei(k.UNPACK_SKIP_IMAGES,On),Ee===0&&ye.generateMipmaps&&k.generateMipmap(_t),se.unbindTexture()},this.initTexture=function(N){N.isCubeTexture?V.setTextureCube(N,0):N.isData3DTexture?V.setTexture3D(N,0):N.isDataArrayTexture||N.isCompressedArrayTexture?V.setTexture2DArray(N,0):V.setTexture2D(N,0),se.unbindTexture()},this.resetState=function(){C=0,x=0,O=null,se.reset(),Qe.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ls}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===JE?"display-p3":"srgb",t.unpackColorSpace=Bt.workingColorSpace===pp?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===rn?uo:nI}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===uo?rn:Nn}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class nOt extends SI{}nOt.prototype.isWebGL1Renderer=!0;class iOt extends sn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class sOt{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=_b,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=zi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let s=0,r=this.stride;sl)continue;f.applyMatrix4(this.matrixWorld);const R=e.ray.origin.distanceTo(f);Re.far||t.push({distance:R,point:_.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),v=Math.min(b.count,o.start+o.count);for(let y=g,T=v-1;yl)continue;f.applyMatrix4(this.matrixWorld);const x=e.ray.origin.distanceTo(f);xe.far||t.push({distance:x,point:_.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;rs.far)return;r.push({distance:d,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class lv extends Vi{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ZE,this.normalScale=new Mt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class js extends lv{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Mt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return kn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new gt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new gt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new gt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class RR extends Vi{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new gt(16777215),this.specular=new gt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ZE,this.normalScale=new Mt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=QE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function Rd(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function hOt(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function fOt(n){function e(s,r){return n[s]-n[r]}const t=n.length,i=new Array(t);for(let s=0;s!==t;++s)i[s]=s;return i.sort(e),i}function AR(n,e,t){const i=n.length,s=new n.constructor(i);for(let r=0,o=0;o!==i;++r){const a=t[r]*e;for(let l=0;l!==e;++l)s[o++]=n[a+l]}return s}function RI(n,e,t,i){let s=1,r=n[0];for(;r!==void 0&&r[i]===void 0;)r=n[s++];if(r===void 0)return;let o=r[i];if(o!==void 0)if(Array.isArray(o))do o=r[i],o!==void 0&&(e.push(r.time),t.push.apply(t,o)),r=n[s++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[i],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=n[s++];while(r!==void 0);else do o=r[i],o!==void 0&&(e.push(r.time),t.push(o)),r=n[s++];while(r!==void 0)}class xc{constructor(e,t,i,s){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,s=t[i],r=t[i-1];e:{t:{let o;n:{i:if(!(e=r)){const a=t[1];e=r)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,r!==0||o!==s){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=i.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,s=this.values,r=i.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(s!==void 0&&hOt(s))for(let a=0,l=s.length;a!==l;++a){const d=s[a];if(isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,d),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===qm,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*i,l=o*i,d=0;d!==i;++d)t[l+d]=t[a+d];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,s=new i(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}ms.prototype.TimeBufferType=Float32Array;ms.prototype.ValueBufferType=Float32Array;ms.prototype.DefaultInterpolation=wa;class Xa extends ms{}Xa.prototype.ValueTypeName="bool";Xa.prototype.ValueBufferType=Array;Xa.prototype.DefaultInterpolation=ac;Xa.prototype.InterpolantFactoryMethodLinear=void 0;Xa.prototype.InterpolantFactoryMethodSmooth=void 0;class AI extends ms{}AI.prototype.ValueTypeName="color";class Ia extends ms{}Ia.prototype.ValueTypeName="number";class EOt extends xc{constructor(e,t,i,s){super(e,t,i,s)}interpolate_(e,t,i,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(s-t);let d=e*a;for(let c=d+a;d!==c;d+=4)Dr.slerpFlat(r,0,o,d-a,o,d,l);return r}}class vo extends ms{InterpolantFactoryMethodLinear(e){return new EOt(this.times,this.values,this.getValueSize(),e)}}vo.prototype.ValueTypeName="quaternion";vo.prototype.DefaultInterpolation=wa;vo.prototype.InterpolantFactoryMethodSmooth=void 0;class Za extends ms{}Za.prototype.ValueTypeName="string";Za.prototype.ValueBufferType=Array;Za.prototype.DefaultInterpolation=ac;Za.prototype.InterpolantFactoryMethodLinear=void 0;Za.prototype.InterpolantFactoryMethodSmooth=void 0;class Ma extends ms{}Ma.prototype.ValueTypeName="vector";class vOt{constructor(e,t=-1,i,s=CCt){this.name=e,this.tracks=i,this.duration=t,this.blendMode=s,this.uuid=zi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,s=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(SOt(i[o]).scale(s));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],i=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=i.length;r!==o;++r)t.push(ms.toJSON(i[r]));return s}static CreateFromMorphTargetSequence(e,t,i,s){const r=t.length,o=[];for(let a=0;a1){const _=c[1];let f=s[_];f||(s[_]=f=[]),f.push(d)}}const o=[];for(const a in s)o.push(this.CreateFromMorphTargetSequence(a,s[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(_,f,m,h,E){if(m.length!==0){const b=[],g=[];RI(m,b,g,h),b.length!==0&&E.push(new _(f,b,g))}},s=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const d=e.hierarchy||[];for(let _=0;_{t&&t(r),this.manager.itemEnd(e)},0),r;if(Ns[e]!==void 0){Ns[e].push({onLoad:t,onProgress:i,onError:s});return}Ns[e]=[],Ns[e].push({onLoad:t,onProgress:i,onError:s});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(d=>{if(d.status===200||d.status===0){if(d.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||d.body===void 0||d.body.getReader===void 0)return d;const c=Ns[e],_=d.body.getReader(),f=d.headers.get("Content-Length")||d.headers.get("X-File-Size"),m=f?parseInt(f):0,h=m!==0;let E=0;const b=new ReadableStream({start(g){v();function v(){_.read().then(({done:y,value:T})=>{if(y)g.close();else{E+=T.byteLength;const C=new ProgressEvent("progress",{lengthComputable:h,loaded:E,total:m});for(let x=0,O=c.length;x{switch(l){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"document":return d.text().then(c=>new DOMParser().parseFromString(c,a));case"json":return d.json();default:if(a===void 0)return d.text();{const _=/charset="?([^;"\s]*)"?/i.exec(a),f=_&&_[1]?_[1].toLowerCase():void 0,m=new TextDecoder(f);return d.arrayBuffer().then(h=>m.decode(h))}}}).then(d=>{Da.add(e,d);const c=Ns[e];delete Ns[e];for(let _=0,f=c.length;_{const c=Ns[e];if(c===void 0)throw this.manager.itemError(e),d;delete Ns[e];for(let _=0,f=c.length;_{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class ROt extends Ja{constructor(e){super(e)}load(e,t,i,s){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Da.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a=lc("img");function l(){c(),Da.add(e,this),t&&t(this),r.manager.itemEnd(e)}function d(_){c(),s&&s(_),r.manager.itemError(e),r.manager.itemEnd(e)}function c(){a.removeEventListener("load",l,!1),a.removeEventListener("error",d,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",d,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class NI extends Ja{constructor(e){super(e)}load(e,t,i,s){const r=new wn,o=new ROt(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,t!==void 0&&t(r)},i,s),r}}class mp extends sn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new gt(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}const gg=new At,wR=new be,NR=new be;class cv{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Mt(512,512),this.map=null,this.mapPass=null,this.matrix=new At,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new tv,this._frameExtents=new Mt(1,1),this._viewportCount=1,this._viewports=[new Wt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;wR.setFromMatrixPosition(e.matrixWorld),t.position.copy(wR),NR.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(NR),t.updateMatrixWorld(),gg.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(gg),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(gg)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class AOt extends cv{constructor(){super(new Vn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=Na*2*e.angle*this.focus,s=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;(i!==t.fov||s!==t.aspect||r!==t.far)&&(t.fov=i,t.aspect=s,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class wOt extends mp{constructor(e,t,i=0,s=Math.PI/3,r=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(sn.DEFAULT_UP),this.updateMatrix(),this.target=new sn,this.distance=i,this.angle=s,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new AOt}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const OR=new At,Sl=new be,bg=new be;class NOt extends cv{constructor(){super(new Vn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Mt(4,2),this._viewportCount=6,this._viewports=[new Wt(2,1,1,1),new Wt(0,1,1,1),new Wt(3,1,1,1),new Wt(1,1,1,1),new Wt(3,0,1,1),new Wt(1,0,1,1)],this._cubeDirections=[new be(1,0,0),new be(-1,0,0),new be(0,0,1),new be(0,0,-1),new be(0,1,0),new be(0,-1,0)],this._cubeUps=[new be(0,1,0),new be(0,1,0),new be(0,1,0),new be(0,1,0),new be(0,0,1),new be(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,s=this.matrix,r=e.distance||i.far;r!==i.far&&(i.far=r,i.updateProjectionMatrix()),Sl.setFromMatrixPosition(e.matrixWorld),i.position.copy(Sl),bg.copy(i.position),bg.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(bg),i.updateMatrixWorld(),s.makeTranslation(-Sl.x,-Sl.y,-Sl.z),OR.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(OR)}}class OOt extends mp{constructor(e,t,i=0,s=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=s,this.shadow=new NOt}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class IOt extends cv{constructor(){super(new iv(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class OI extends mp{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(sn.DEFAULT_UP),this.updateMatrix(),this.target=new sn,this.shadow=new IOt}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class MOt extends mp{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class zl{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,s=e.length;i"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Da.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(l){Da.add(e,l),t&&t(l),r.manager.itemEnd(e)}).catch(function(l){s&&s(l),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}const dv="\\[\\]\\.:\\/",kOt=new RegExp("["+dv+"]","g"),uv="[^"+dv+"]",LOt="[^"+dv.replace("\\.","")+"]",POt=/((?:WC+[\/:])*)/.source.replace("WC",uv),UOt=/(WCOD+)?/.source.replace("WCOD",LOt),FOt=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",uv),BOt=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",uv),GOt=new RegExp("^"+POt+UOt+FOt+BOt+"$"),zOt=["material","materials","bones","map"];class VOt{constructor(e,t,i){const s=i||zt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=i.length;s!==r;++s)i[s].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class zt{constructor(e,t,i){this.path=t,this.parsedPath=i||zt.parseTrackName(t),this.node=zt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new zt.Composite(e,t,i):new zt(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(kOt,"")}static parseTrackName(e){const t=GOt.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const r=i.nodeName.substring(s+1);zOt.indexOf(r)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=r)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(r){for(let o=0;o=2.0 are supported."));return}const d=new yIt(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});d.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c=0&&a[_]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+_+'".')}}d.setExtensions(o),d.setPlugins(a),d.parse(i,s)}parseAsync(e,t){const i=this;return new Promise(function(s,r){i.parse(e,t,s,r)})}}function qOt(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const It={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class YOt{constructor(e){this.parser=e,this.name=It.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,s=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,o)}}class sIt{constructor(e){this.parser=e,this.name=It.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,s=i.json,r=s.textures[e];if(!r.extensions||!r.extensions[t])return null;const o=r.extensions[t],a=s.images[o.source];let l=i.textureLoader;if(a.uri){const d=i.options.manager.getHandler(a.uri);d!==null&&(l=d)}return this.detectSupport().then(function(d){if(d)return i.loadTextureImage(e,o.source,l);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class rIt{constructor(e){this.parser=e,this.name=It.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,s=i.json,r=s.textures[e];if(!r.extensions||!r.extensions[t])return null;const o=r.extensions[t],a=s.images[o.source];let l=i.textureLoader;if(a.uri){const d=i.options.manager.getHandler(a.uri);d!==null&&(l=d)}return this.detectSupport().then(function(d){if(d)return i.loadTextureImage(e,o.source,l);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class oIt{constructor(e){this.name=It.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const s=i.extensions[this.name],r=this.parser.getDependency("buffer",s.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const l=s.byteOffset||0,d=s.byteLength||0,c=s.count,_=s.byteStride,f=new Uint8Array(a,l,d);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(c,_,f,s.mode,s.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(c*_);return o.decodeGltfBuffer(new Uint8Array(m),c,_,f,s.mode,s.filter),m})})}else return null}}class aIt{constructor(e){this.name=It.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const s=t.meshes[i.mesh];for(const d of s.primitives)if(d.mode!==fi.TRIANGLES&&d.mode!==fi.TRIANGLE_STRIP&&d.mode!==fi.TRIANGLE_FAN&&d.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const d in o)a.push(this.parser.getDependency("accessor",o[d]).then(c=>(l[d]=c,l[d])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(d=>{const c=d.pop(),_=c.isGroup?c.children:[c],f=d[0].count,m=[];for(const h of _){const E=new At,b=new be,g=new Dr,v=new be(1,1,1),y=new dOt(h.geometry,h.material,f);for(let T=0;T0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const vIt=new At;class yIt{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new qOt,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,s=!1,r=-1;typeof navigator<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,s=navigator.userAgent.indexOf("Firefox")>-1,r=s?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||s&&r<98?this.textureLoader=new NI(this.options.manager):this.textureLoader=new DOt(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new wI(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,s=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][s.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:s.asset,parser:i,userData:{}};return qr(r,a,s),fr(a,s),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let s=0,r=t.length;s{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[d,c]of o.children.entries())r(c,a.children[d])};return r(i,s),s.name+="_instance_"+e.uses[t]++,s}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&b.setY(S,x[O*l+1]),l>=3&&b.setZ(S,x[O*l+2]),l>=4&&b.setW(S,x[O*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return b})}loadTexture(e){const t=this.json,i=this.options,r=t.textures[e].source,o=t.images[r];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,t,i){const s=this,r=this.json,o=r.textures[e],a=r.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const d=this.loadImageSource(t,i).then(function(c){c.flipY=!1,c.name=o.name||a.name||"",c.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(c.name=a.uri);const f=(r.samplers||{})[o.sampler]||{};return c.magFilter=DR[f.magFilter]||jn,c.minFilter=DR[f.minFilter]||go,c.wrapS=kR[f.wrapS]||Ra,c.wrapT=kR[f.wrapT]||Ra,s.associations.set(c,{textures:e}),c}).catch(function(){return null});return this.textureCache[l]=d,d}loadImageSource(e,t){const i=this,s=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(_=>_.clone());const o=s.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",d=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(_){d=!0;const f=new Blob([_],{type:o.mimeType});return l=a.createObjectURL(f),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(l).then(function(_){return new Promise(function(f,m){let h=f;t.isImageBitmapLoader===!0&&(h=function(E){const b=new wn(E);b.needsUpdate=!0,f(b)}),t.load(zl.resolveURL(_,r.path),h,void 0,m)})}).then(function(_){return d===!0&&a.revokeObjectURL(l),_.userData.mimeType=o.mimeType||EIt(o.uri),_}).catch(function(_){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),_});return this.sourceCache[e]=c,c}assignTexture(e,t,i,s){const r=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),r.extensions[It.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[It.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=r.associations.get(o);o=r.extensions[It.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,l)}}return s!==void 0&&(o.colorSpace=s),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const s=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new CI,Vi.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new xI,Vi.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(s||r||o){let a="ClonedMaterial:"+i.uuid+":";s&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),r&&(l.vertexColors=!0),o&&(l.flatShading=!0),s&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return lv}loadMaterial(e){const t=this,i=this.json,s=this.extensions,r=i.materials[e];let o;const a={},l=r.extensions||{},d=[];if(l[It.KHR_MATERIALS_UNLIT]){const _=s[It.KHR_MATERIALS_UNLIT];o=_.getMaterialType(),d.push(_.extendParams(a,r,t))}else{const _=r.pbrMetallicRoughness||{};if(a.color=new gt(1,1,1),a.opacity=1,Array.isArray(_.baseColorFactor)){const f=_.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],Nn),a.opacity=f[3]}_.baseColorTexture!==void 0&&d.push(t.assignTexture(a,"map",_.baseColorTexture,rn)),a.metalness=_.metallicFactor!==void 0?_.metallicFactor:1,a.roughness=_.roughnessFactor!==void 0?_.roughnessFactor:1,_.metallicRoughnessTexture!==void 0&&(d.push(t.assignTexture(a,"metalnessMap",_.metallicRoughnessTexture)),d.push(t.assignTexture(a,"roughnessMap",_.metallicRoughnessTexture))),o=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),d.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=Ji);const c=r.alphaMode||vg.OPAQUE;if(c===vg.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,c===vg.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==Er&&(d.push(t.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new Mt(1,1),r.normalTexture.scale!==void 0)){const _=r.normalTexture.scale;a.normalScale.set(_,_)}if(r.occlusionTexture!==void 0&&o!==Er&&(d.push(t.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==Er){const _=r.emissiveFactor;a.emissive=new gt().setRGB(_[0],_[1],_[2],Nn)}return r.emissiveTexture!==void 0&&o!==Er&&d.push(t.assignTexture(a,"emissiveMap",r.emissiveTexture,rn)),Promise.all(d).then(function(){const _=new o(a);return r.name&&(_.name=r.name),fr(_,r),t.associations.set(_,{materials:e}),r.extensions&&qr(s,_,r),_})}createUniqueName(e){const t=zt.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,s=this.primitiveCache;function r(a){return i[It.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return LR(l,a,t)})}const o=[];for(let a=0,l=e.length;a0&&gIt(g,r),g.name=t.createUniqueName(r.name||"mesh_"+e),fr(g,r),b.extensions&&qr(s,g,b),t.assignFinalMaterial(g),_.push(g)}for(let m=0,h=_.length;m1?c=new io:d.length===1?c=d[0]:c=new sn,c!==d[0])for(let _=0,f=d.length;_{const _=new Map;for(const[f,m]of s.associations)(f instanceof Vi||f instanceof wn)&&_.set(f,m);return c.traverse(f=>{const m=s.associations.get(f);m!=null&&_.set(f,m)}),_};return s.associations=d(r),r})}_createAnimationTracks(e,t,i,s,r){const o=[],a=e.name?e.name:e.uuid,l=[];rr[r.path]===rr.weights?e.traverse(function(f){f.morphTargetInfluences&&l.push(f.name?f.name:f.uuid)}):l.push(a);let d;switch(rr[r.path]){case rr.weights:d=Ia;break;case rr.rotation:d=vo;break;case rr.position:case rr.scale:d=Ma;break;default:switch(i.itemSize){case 1:d=Ia;break;case 2:case 3:default:d=Ma;break}break}const c=s.interpolation!==void 0?hIt[s.interpolation]:wa,_=this._getArrayFromAccessor(i);for(let f=0,m=l.length;f{Ye.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,Ze.emit("stop_webcam_video_stream"),Ve(()=>{Ye.replace()})},startDrag(n){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(n){if(this.isDragging){const e=n.clientX-this.dragStart.x,t=n.clientY-this.dragStart.y;this.position.bottom-=t,this.position.right-=e,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ye.replace(),Ze.on("video_stream_image",n=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+n,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},xIt=["src"],CIt=["src"],RIt={class:"controls"},AIt=u("i",{"data-feather":"video"},null,-1),wIt=[AIt],NIt=u("i",{"data-feather":"video"},null,-1),OIt=[NIt],IIt={key:2};function MIt(n,e,t,i,s,r){return w(),M("div",{class:"floating-frame bg-white",style:en({bottom:s.position.bottom+"px",right:s.position.right+"px","z-index":s.zIndex}),onMousedown:e[4]||(e[4]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[u("div",{class:"handle",onMousedown:e[0]||(e[0]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),s.isVideoActive&&s.imageDataUrl!=null?(w(),M("img",{key:0,src:s.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,xIt)):q("",!0),s.isVideoActive&&s.imageDataUrl==null?(w(),M("p",{key:1,src:s.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,CIt)):q("",!0),u("div",RIt,[s.isVideoActive?q("",!0):(w(),M("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startVideoStream&&r.startVideoStream(...o))},wIt)),s.isVideoActive?(w(),M("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopVideoStream&&r.stopVideoStream(...o))},OIt)):q("",!0),s.isVideoActive?(w(),M("span",IIt,"FPS: "+fe(s.frameRate),1)):q("",!0)])],36)}const DIt=bt(TIt,[["render",MIt]]);const kIt={data(){return{isAudioActive:!1,imageDataUrl:null,isDragging:!1,position:{bottom:0,right:0},dragStart:{x:0,y:0},zIndex:0,frameRate:0,frameCount:0,lastFrameTime:Date.now()}},methods:{startAudioStream(){Ze.emit("start_audio_stream",()=>{this.isAudioActive=!0}),Ve(()=>{Ye.replace()})},stopAudioStream(){Ze.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),Ve(()=>{Ye.replace()})},startDrag(n){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(n){if(this.isDragging){const e=n.clientX-this.dragStart.x,t=n.clientY-this.dragStart.y;this.position.bottom-=t,this.position.right-=e,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ye.replace(),Ze.on("update_spectrogram",n=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+n,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},LIt=["src"],PIt={class:"controls"},UIt=u("i",{"data-feather":"mic"},null,-1),FIt=[UIt],BIt=u("i",{"data-feather":"mic"},null,-1),GIt=[BIt],zIt={key:2};function VIt(n,e,t,i,s,r){return w(),M("div",{class:"floating-frame bg-white",style:en({bottom:s.position.bottom+"px",right:s.position.right+"px","z-index":s.zIndex}),onMousedown:e[4]||(e[4]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[u("div",{class:"handle",onMousedown:e[0]||(e[0]=Te((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=Te((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),s.isAudioActive&&s.imageDataUrl!=null?(w(),M("img",{key:0,src:s.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,LIt)):q("",!0),u("div",PIt,[s.isAudioActive?q("",!0):(w(),M("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startAudioStream&&r.startAudioStream(...o))},FIt)),s.isAudioActive?(w(),M("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopAudioStream&&r.stopAudioStream(...o))},GIt)):q("",!0),s.isAudioActive?(w(),M("span",zIt,"FPS: "+fe(s.frameRate),1)):q("",!0)])],36)}const HIt=bt(kIt,[["render",VIt]]);const qIt={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:DIt,AudioFrame:HIt},computed:{isReady:{get(){return this.$store.state.ready}}},watch:{"$store.state.mountedPersArr":"updatePersonality","$store.state.config.active_personality_id":"updatePersonality"},async mounted(){for(;this.isReady===!1;)await new Promise(n=>setTimeout(n,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),Ve(()=>{Ye.replace()}),this.$refs.video_frame.position={bottom:0,right:0},this.$refs.audio_frame.position={bottom:0,right:100}},beforeDestroy(){},methods:{initWebGLScene(){this.scene=new iOt,this.camera=new Vn(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new SI,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const n=new Cr,e=new RR({color:65280});this.cube=new Hn(n,e),this.scene.add(this.cube);const t=new MOt(4210752),i=new OI(16777215,.5);i.position.set(0,1,0),this.scene.add(t),this.scene.add(i),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:n,config:e}=this.$store.state;this.activePersonality=n[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(n){new HOt().load(n,t=>{this.scene.remove(this.cube),this.cube=t.scene,this.scene.add(this.cube)})},showBoxWithAvatar(n){this.cube&&this.scene.remove(this.cube);const e=new Cr,t=new NI().load(n),i=new Er({map:t});this.cube=new Hn(e,i),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const n=new Cr,e=new RR({color:65280});this.cube=new Hn(n,e),this.scene.add(this.cube)},animate(){requestAnimationFrame(this.animate),this.cube&&(this.cube.rotation.x+=.01,this.cube.rotation.y+=.01),this.renderer.render(this.scene,this.camera)}}},YIt={ref:"webglContainer"},$It={class:"flex-col y-overflow scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},WIt={key:0,class:"text-center"},KIt={key:1,class:"text-center"},jIt={class:"floating-frame2"},QIt=["innerHTML"];function XIt(n,e,t,i,s,r){const o=ht("VideoFrame"),a=ht("AudioFrame");return w(),M($e,null,[u("div",YIt,null,512),u("div",$It,[!s.activePersonality||!s.activePersonality.scene_path?(w(),M("div",WIt," Personality does not have a 3d avatar. ")):q("",!0),!s.activePersonality||!s.activePersonality.avatar||s.activePersonality.avatar===""?(w(),M("div",KIt," Personality does not have an avatar. ")):q("",!0),u("div",jIt,[u("div",{innerHTML:n.htmlContent},null,8,QIt)])]),Oe(o,{ref:"video_frame"},null,512),Oe(a,{ref:"audio_frame"},null,512)],64)}const ZIt=bt(qIt,[["render",XIt]]);let Ad;const JIt=new Uint8Array(16);function eMt(){if(!Ad&&(Ad=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ad))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ad(JIt)}const xn=[];for(let n=0;n<256;++n)xn.push((n+256).toString(16).slice(1));function tMt(n,e=0){return xn[n[e+0]]+xn[n[e+1]]+xn[n[e+2]]+xn[n[e+3]]+"-"+xn[n[e+4]]+xn[n[e+5]]+"-"+xn[n[e+6]]+xn[n[e+7]]+"-"+xn[n[e+8]]+xn[n[e+9]]+"-"+xn[n[e+10]]+xn[n[e+11]]+xn[n[e+12]]+xn[n[e+13]]+xn[n[e+14]]+xn[n[e+15]]}const nMt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PR={randomUUID:nMt};function Fs(n,e,t){if(PR.randomUUID&&!e&&!n)return PR.randomUUID();n=n||{};const i=n.random||(n.rng||eMt)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(let s=0;s<16;++s)e[t+s]=i[s];return e}return tMt(i)}class po{constructor(){this.listenerMap=new Map,this._listeners=[],this.proxyMap=new Map,this.proxies=[]}get listeners(){return this._listeners.concat(this.proxies.flatMap(e=>e()))}subscribe(e,t){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. Please check that you don't accidentally use the same token twice to register two different handlers for the same event/hook.`),this.unsubscribe(e)),this.listenerMap.set(e,t),this._listeners.push(t)}unsubscribe(e){if(this.listenerMap.has(e)){const t=this.listenerMap.get(e);this.listenerMap.delete(e);const i=this._listeners.indexOf(t);i>=0&&this._listeners.splice(i,1)}}registerProxy(e,t){this.proxyMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. -Please check that you don't accidentally use the same token twice to register two different proxies for the same event/hook.`),this.unregisterProxy(e)),this.proxyMap.set(e,t),this.proxies.push(t)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const t=this.proxyMap.get(e);this.proxyMap.delete(e);const i=this.proxies.indexOf(t);i>=0&&this.proxies.splice(i,1)}}class qt extends po{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(t=>t(e,this.entity))}}class Pn extends po{constructor(e){super(),this.entity=e}emit(e){let t=!1;const i=()=>[t=!0];for(const s of Array.from(this.listeners.values()))if(s(e,i,this.entity),t)return{prevented:!0};return{prevented:!1}}}class DI extends po{execute(e,t){let i=e;for(const s of this.listeners)i=s(i,t);return i}}class li extends DI{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class tMt extends po{constructor(e){super(),this.entity=e}execute(e){const t=[];for(const i of this.listeners)t.push(i(e,this.entity));return t}}function ji(){const n=Symbol(),e=new Map,t=new Set,i=(l,d)=>{d instanceof po&&d.registerProxy(n,()=>{var c,_;return(_=(c=e.get(l))===null||c===void 0?void 0:c.listeners)!==null&&_!==void 0?_:[]})},s=l=>{const d=new po;e.set(l,d),t.forEach(c=>i(l,c[l]))},r=l=>{t.add(l);for(const d of e.keys())i(d,l[d])},o=l=>{for(const d of e.keys())l[d]instanceof po&&l[d].unregisterProxy(n);t.delete(l)},a=()=>{t.forEach(l=>o(l)),e.clear()};return new Proxy({},{get(l,d){return d==="addTarget"?r:d==="removeTarget"?o:d==="destroy"?a:typeof d!="string"||d.startsWith("_")?l[d]:(e.has(d)||s(d),e.get(d))}})}class UR{constructor(e,t){if(this.destructed=!1,this.events={destruct:new qt(this)},!e||!t)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Fs(),this.from=e,this.to=t,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class kI{constructor(e,t){if(!e||!t)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Fs(),this.from=e,this.to=t}}function yb(n,e){return Object.fromEntries(Object.entries(n).map(([t,i])=>[t,e(i)]))}class LI{constructor(){this._title="",this.id=Fs(),this.events={loaded:new qt(this),beforeAddInput:new Pn(this),addInput:new qt(this),beforeRemoveInput:new Pn(this),removeInput:new qt(this),beforeAddOutput:new Pn(this),addOutput:new qt(this),beforeRemoveOutput:new Pn(this),removeOutput:new qt(this),beforeTitleChanged:new Pn(this),titleChanged:new qt(this),update:new qt(this)},this.hooks={beforeLoad:new li(this),afterSave:new li(this)}}get graph(){return this.graphInstance}get title(){return this._title}set title(e){this.events.beforeTitleChanged.emit(e).prevented||(this._title=e,this.events.titleChanged.emit(e))}addInput(e,t){return this.addInterface("input",e,t)}addOutput(e,t){return this.addInterface("output",e,t)}removeInput(e){return this.removeInterface("input",e)}removeOutput(e){return this.removeInterface("output",e)}registerGraph(e){this.graphInstance=e}load(e){this.hooks.beforeLoad.execute(e),this.id=e.id,this._title=e.title,Object.entries(e.inputs).forEach(([t,i])=>{this.inputs[t]&&(this.inputs[t].load(i),this.inputs[t].nodeId=this.id)}),Object.entries(e.outputs).forEach(([t,i])=>{this.outputs[t]&&(this.outputs[t].load(i),this.outputs[t].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=yb(this.inputs,s=>s.save()),t=yb(this.outputs,s=>s.save()),i={type:this.type,id:this.id,title:this.title,inputs:e,outputs:t};return this.hooks.afterSave.execute(i)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,t])=>this.initializeIntf("input",e,t)),Object.entries(this.outputs).forEach(([e,t])=>this.initializeIntf("output",e,t))}initializeIntf(e,t,i){i.isInput=e==="input",i.nodeId=this.id,i.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:t,intf:i}))}addInterface(e,t,i){const s=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,r=e==="input"?this.events.addInput:this.events.addOutput,o=e==="input"?this.inputs:this.outputs;return s.emit(i).prevented?!1:(o[t]=i,this.initializeIntf(e,t,i),r.emit(i),!0)}removeInterface(e,t){const i=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,s=e==="input"?this.events.removeInput:this.events.removeOutput,r=e==="input"?this.inputs[t]:this.outputs[t];if(!r||i.emit(r).prevented)return!1;if(r.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===r||a.to===r).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return r.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[t]:delete this.outputs[t],s.emit(r),!0}}let PI=class extends LI{load(e){super.load(e)}save(){return super.save()}};function el(n){return class extends PI{constructor(){var e,t;super(),this.type=n.type,this.inputs={},this.outputs={},this.calculate=n.calculate?(i,s)=>n.calculate.call(this,i,s):void 0,this._title=(e=n.title)!==null&&e!==void 0?e:n.type,this.executeFactory("input",n.inputs),this.executeFactory("output",n.outputs),(t=n.onCreate)===null||t===void 0||t.call(this)}onPlaced(){var e;(e=n.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=n.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,t){Object.keys(t||{}).forEach(i=>{const s=t[i]();e==="input"?this.addInput(i,s):this.addOutput(i,s)})}}}class tn{set connectionCount(e){this._connectionCount=e,this.events.setConnectionCount.emit(e)}get connectionCount(){return this._connectionCount}set value(e){this.events.beforeSetValue.emit(e).prevented||(this._value=e,this.events.setValue.emit(e))}get value(){return this._value}constructor(e,t){this.id=Fs(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new qt(this),beforeSetValue:new Pn(this),setValue:new qt(this),updated:new qt(this)},this.hooks={load:new li(this),save:new li(this)},this._connectionCount=0,this.name=e,this._value=t}load(e){this.id=e.id,this.templateId=e.templateId,this.value=e.value,this.hooks.load.execute(e)}save(){const e={id:this.id,templateId:this.templateId,value:this.value};return this.hooks.save.execute(e)}setComponent(e){return this.component=e,this}setPort(e){return this.port=e,this}setHidden(e){return this.hidden=e,this}use(e,...t){return e(this,...t),this}}const ka="__baklava_SubgraphInputNode",La="__baklava_SubgraphOutputNode";class UI extends PI{constructor(){super(),this.graphInterfaceId=Fs()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class FI extends UI{constructor(){super(...arguments),this.type=ka,this.inputs={name:new tn("Name","Input")},this.outputs={placeholder:new tn("Value",void 0)}}static isGraphInputNode(e){return e.type===ka}}class BI extends UI{constructor(){super(...arguments),this.type=La,this.inputs={name:new tn("Name","Output"),placeholder:new tn("Value",void 0)},this.outputs={output:new tn("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===La}}class Cc{get nodes(){return this._nodes}get connections(){return this._connections}get loading(){return this._loading}get destroying(){return this._destroying}get inputs(){return this.nodes.filter(t=>t.type===ka).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(t=>t.type===La).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.output.id}))}constructor(e,t){this.id=Fs(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new Pn(this),addNode:new qt(this),beforeRemoveNode:new Pn(this),removeNode:new qt(this),beforeAddConnection:new Pn(this),addConnection:new qt(this),checkConnection:new Pn(this),beforeRemoveConnection:new Pn(this),removeConnection:new qt(this)},this.hooks={save:new li(this),load:new li(this),checkConnection:new tMt(this)},this.nodeEvents=ji(),this.nodeHooks=ji(),this.connectionEvents=ji(),this.editor=e,this.template=t,e.registerGraph(this)}addNode(e){if(!this.events.beforeAddNode.emit(e).prevented)return this.nodeEvents.addTarget(e.events),this.nodeHooks.addTarget(e.hooks),e.registerGraph(this),this._nodes.push(e),e=this.nodes.find(t=>t.id===e.id),e.onPlaced(),this.events.addNode.emit(e),e}removeNode(e){if(this.nodes.includes(e)){if(this.events.beforeRemoveNode.emit(e).prevented)return;const t=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(i=>t.includes(i.from)||t.includes(i.to)).forEach(i=>this.removeConnection(i)),this._nodes.splice(this.nodes.indexOf(e),1),this.events.removeNode.emit(e),e.onDestroy(),this.nodeEvents.removeTarget(e.events),this.nodeHooks.removeTarget(e.hooks)}}addConnection(e,t){const i=this.checkConnection(e,t);if(!i.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:t}).prevented)return;for(const r of i.connectionsInDanger){const o=this.connections.find(a=>a.id===r.id);o&&this.removeConnection(o)}const s=new UR(i.dummyConnection.from,i.dummyConnection.to);return this.internalAddConnection(s),s}removeConnection(e){if(this.connections.includes(e)){if(this.events.beforeRemoveConnection.emit(e).prevented)return;e.destruct(),this._connections.splice(this.connections.indexOf(e),1),this.events.removeConnection.emit(e),this.connectionEvents.removeTarget(e.events)}}checkConnection(e,t){if(!e||!t)return{connectionAllowed:!1};const i=this.findNodeById(e.nodeId),s=this.findNodeById(t.nodeId);if(i&&s&&i===s)return{connectionAllowed:!1};if(e.isInput&&!t.isInput){const a=e;e=t,t=a}if(e.isInput||!t.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===t))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:t}).prevented)return{connectionAllowed:!1};const r=this.hooks.checkConnection.execute({from:e,to:t});if(r.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const o=Array.from(new Set(r.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new kI(e,t),connectionsInDanger:o}}findNodeInterface(e){for(const t of this.nodes){for(const i in t.inputs){const s=t.inputs[i];if(s.id===e)return s}for(const i in t.outputs){const s=t.outputs[i];if(s.id===e)return s}}}findNodeById(e){return this.nodes.find(t=>t.id===e)}load(e){try{this._loading=!0;const t=[];for(let i=this.connections.length-1;i>=0;i--)this.removeConnection(this.connections[i]);for(let i=this.nodes.length-1;i>=0;i--)this.removeNode(this.nodes[i]);this.id=e.id;for(const i of e.nodes){const s=this.editor.nodeTypes.get(i.type);if(!s){t.push(`Node type ${i.type} is not registered`);continue}const r=new s.type;this.addNode(r),r.load(i)}for(const i of e.connections){const s=this.findNodeInterface(i.from),r=this.findNodeInterface(i.to);if(s)if(r){const o=new UR(s,r);o.id=i.id,this.internalAddConnection(o)}else{t.push(`Could not find interface with id ${i.to}`);continue}else{t.push(`Could not find interface with id ${i.from}`);continue}}return this.hooks.load.execute(e),t}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(t=>t.save()),connections:this.connections.map(t=>({id:t.id,from:t.from.id,to:t.to.id})),inputs:this.inputs,outputs:this.outputs};return this.hooks.save.execute(e)}destroy(){this._destroying=!0;for(const e of this.nodes)this.removeNode(e);this.editor.unregisterGraph(this)}internalAddConnection(e){this.connectionEvents.addTarget(e.events),this._connections.push(e),this.events.addConnection.emit(e)}}const cc="__baklava_GraphNode-";function Pa(n){return cc+n.id}function nMt(n){return class extends LI{constructor(){super(...arguments),this.type=Pa(n),this.inputs={},this.outputs={},this.template=n,this.calculate=async(t,i)=>{var s;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!i.engine||typeof i.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const r=i.engine.getInputValues(this.subgraph);for(const l of this.subgraph.inputs)r.set(l.nodeInterfaceId,t[l.id]);const o=await i.engine.runGraph(this.subgraph,r,i.globalValues),a={};for(const l of this.subgraph.outputs)a[l.id]=(s=o.get(l.nodeId))===null||s===void 0?void 0:s.get("output");return a._calculationResults=o,a}}get title(){return this._title}set title(t){this.template.name=t}load(t){if(!this.subgraph)throw new Error("Cannot load a graph node without a graph");if(!this.template)throw new Error("Unable to load graph node without graph template");this.subgraph.load(t.graphState),super.load(t)}save(){if(!this.subgraph)throw new Error("Cannot save a graph node without a graph");return{...super.save(),graphState:this.subgraph.save()}}onPlaced(){this.template.events.updated.subscribe(this,()=>this.initialize()),this.template.events.nameChanged.subscribe(this,t=>{this._title=t}),this.initialize()}onDestroy(){var t;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(t=this.subgraph)===null||t===void 0||t.destroy()}initialize(){this.subgraph&&this.subgraph.destroy(),this.subgraph=this.template.createGraph(),this._title=this.template.name,this.updateInterfaces(),this.events.update.emit(null)}updateInterfaces(){if(!this.subgraph)throw new Error("Trying to update interfaces without graph instance");for(const t of this.subgraph.inputs)t.id in this.inputs?this.inputs[t.id].name=t.name:this.addInput(t.id,new tn(t.name,void 0));for(const t of Object.keys(this.inputs))this.subgraph.inputs.some(i=>i.id===t)||this.removeInput(t);for(const t of this.subgraph.outputs)t.id in this.outputs?this.outputs[t.id].name=t.name:this.addOutput(t.id,new tn(t.name,void 0));for(const t of Object.keys(this.outputs))this.subgraph.outputs.some(i=>i.id===t)||this.removeOutput(t);this.addOutput("_calculationResults",new tn("_calculationResults",void 0).setHidden(!0))}}}class gp{static fromGraph(e,t){return new gp(e.save(),t)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const t=this.editor.nodeTypes.get(Pa(this));t&&(t.title=e)}get inputs(){return this.nodes.filter(t=>t.type===ka).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(t=>t.type===La).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.output.id}))}constructor(e,t){this.id=Fs(),this._name="Subgraph",this.events={nameChanged:new qt(this),updated:new qt(this)},this.hooks={beforeLoad:new li(this),afterSave:new li(this)},this.editor=t,e.id&&(this.id=e.id),e.name&&(this._name=e.name),this.update(e)}update(e){this.nodes=e.nodes,this.connections=e.connections,this.events.updated.emit()}save(){return{id:this.id,name:this.name,nodes:this.nodes,connections:this.connections,inputs:this.inputs,outputs:this.outputs}}createGraph(e){const t=new Map,i=f=>{const m=Fs();return t.set(f,m),m},s=f=>{const m=t.get(f);if(!m)throw new Error(`Unable to create graph from template: Could not map old id ${f} to new id`);return m},r=f=>yb(f,m=>({id:i(m.id),templateId:m.id,value:m.value})),o=this.nodes.map(f=>({...f,id:i(f.id),inputs:r(f.inputs),outputs:r(f.outputs)})),a=this.connections.map(f=>({id:i(f.id),from:s(f.from),to:s(f.to)})),l=this.inputs.map(f=>({id:f.id,name:f.name,nodeId:s(f.nodeId),nodeInterfaceId:s(f.nodeInterfaceId)})),d=this.outputs.map(f=>({id:f.id,name:f.name,nodeId:s(f.nodeId),nodeInterfaceId:s(f.nodeInterfaceId)})),c={id:Fs(),nodes:o,connections:a,inputs:l,outputs:d};return e||(e=new Cc(this.editor)),e.load(c).forEach(f=>console.warn(f)),e.template=this,e}}class iMt{get nodeTypes(){return this._nodeTypes}get graph(){return this._graph}get graphTemplates(){return this._graphTemplates}get graphs(){return this._graphs}get loading(){return this._loading}constructor(){this.events={loaded:new qt(this),beforeRegisterNodeType:new Pn(this),registerNodeType:new qt(this),beforeUnregisterNodeType:new Pn(this),unregisterNodeType:new qt(this),beforeAddGraphTemplate:new Pn(this),addGraphTemplate:new qt(this),beforeRemoveGraphTemplate:new Pn(this),removeGraphTemplate:new qt(this),registerGraph:new qt(this),unregisterGraph:new qt(this)},this.hooks={save:new li(this),load:new li(this)},this.graphTemplateEvents=ji(),this.graphTemplateHooks=ji(),this.graphEvents=ji(),this.graphHooks=ji(),this.nodeEvents=ji(),this.nodeHooks=ji(),this.connectionEvents=ji(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new Cc(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(FI),this.registerNodeType(BI)}registerNodeType(e,t){var i,s;if(this.events.beforeRegisterNodeType.emit({type:e,options:t}).prevented)return;const r=new e;this._nodeTypes.set(r.type,{type:e,category:(i=t==null?void 0:t.category)!==null&&i!==void 0?i:"default",title:(s=t==null?void 0:t.title)!==null&&s!==void 0?s:r.title}),this.events.registerNodeType.emit({type:e,options:t})}unregisterNodeType(e){const t=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(t)){if(this.events.beforeUnregisterNodeType.emit(t).prevented)return;this._nodeTypes.delete(t),this.events.unregisterNodeType.emit(t)}}addGraphTemplate(e){if(this.events.beforeAddGraphTemplate.emit(e).prevented)return;this._graphTemplates.push(e),this.graphTemplateEvents.addTarget(e.events),this.graphTemplateHooks.addTarget(e.hooks);const t=nMt(e);this.registerNodeType(t,{category:"Subgraphs",title:e.name}),this.events.addGraphTemplate.emit(e)}removeGraphTemplate(e){if(this.graphTemplates.includes(e)){if(this.events.beforeRemoveGraphTemplate.emit(e).prevented)return;const t=Pa(e);for(const i of[this.graph,...this.graphs.values()]){const s=i.nodes.filter(r=>r.type===t);for(const r of s)i.removeNode(r)}this.unregisterNodeType(t),this._graphTemplates.splice(this._graphTemplates.indexOf(e),1),this.graphTemplateEvents.removeTarget(e.events),this.graphTemplateHooks.removeTarget(e.hooks),this.events.removeGraphTemplate.emit(e)}}registerGraph(e){this.graphEvents.addTarget(e.events),this.graphHooks.addTarget(e.hooks),this.nodeEvents.addTarget(e.nodeEvents),this.nodeHooks.addTarget(e.nodeHooks),this.connectionEvents.addTarget(e.connectionEvents),this.events.registerGraph.emit(e),this._graphs.add(e)}unregisterGraph(e){this.graphEvents.removeTarget(e.events),this.graphHooks.removeTarget(e.hooks),this.nodeEvents.removeTarget(e.nodeEvents),this.nodeHooks.removeTarget(e.nodeHooks),this.connectionEvents.removeTarget(e.connectionEvents),this.events.unregisterGraph.emit(e),this._graphs.delete(e)}load(e){try{this._loading=!0,e=this.hooks.load.execute(e),e.graphTemplates.forEach(i=>{const s=new gp(i,this);this.addGraphTemplate(s)});const t=this._graph.load(e.graph);return this.events.loaded.emit(),t.forEach(i=>console.warn(i)),t}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(t=>t.save())};return this.hooks.save.execute(e)}}function sMt(n,e){const t=new Map;e.graphs.forEach(i=>{i.nodes.forEach(s=>t.set(s.id,s))}),n.forEach((i,s)=>{const r=t.get(s);r&&i.forEach((o,a)=>{const l=r.outputs[a];l&&(l.value=o)})})}class GI extends Error{constructor(){super("Cycle detected")}}function rMt(n){return typeof n=="string"}function zI(n,e){const t=new Map,i=new Map,s=new Map;let r,o;if(n instanceof Cc)r=n.nodes,o=n.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");r=n,o=e}r.forEach(d=>{Object.values(d.inputs).forEach(c=>t.set(c.id,d.id)),Object.values(d.outputs).forEach(c=>t.set(c.id,d.id))}),r.forEach(d=>{const c=o.filter(f=>f.from&&t.get(f.from.id)===d.id),_=new Set(c.map(f=>t.get(f.to.id)).filter(rMt));i.set(d.id,_),s.set(d,c)});const a=r.slice();o.forEach(d=>{const c=a.findIndex(_=>t.get(d.to.id)===_.id);c>=0&&a.splice(c,1)});const l=[];for(;a.length>0;){const d=a.pop();l.push(d);const c=i.get(d.id);for(;c.size>0;){const _=c.values().next().value;if(c.delete(_),Array.from(i.values()).every(f=>!f.has(_))){const f=r.find(m=>m.id===_);a.push(f)}}}if(Array.from(i.values()).some(d=>d.size>0))throw new GI;return{calculationOrder:l,connectionsFromNode:s,interfaceIdToNodeId:t}}function oMt(n,e){try{return zI(n,e),!1}catch(t){if(t instanceof GI)return!0;throw t}}var Kn;(function(n){n.Running="Running",n.Idle="Idle",n.Paused="Paused",n.Stopped="Stopped"})(Kn||(Kn={}));class aMt{get status(){return this.isRunning?Kn.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new Pn(this),afterRun:new qt(this),statusChange:new qt(this),beforeNodeCalculation:new qt(this),afterNodeCalculation:new qt(this)},this.hooks={gatherCalculationData:new li(this),transferData:new DI},this.recalculateOrder=!0,this.internalStatus=Kn.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(t,i)=>{i.graph&&!i.graph.loading&&i.graph.activeTransactions===0&&this.internalOnChange(i,t??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(t,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(t,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(t,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(t,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,t=>this.checkConnection(t.from,t.to))}start(){this.internalStatus===Kn.Stopped&&(this.internalStatus=Kn.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===Kn.Idle&&(this.internalStatus=Kn.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===Kn.Paused&&(this.internalStatus=Kn.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===Kn.Idle||this.internalStatus===Kn.Paused)&&(this.internalStatus=Kn.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...t){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const i=await this.execute(e,...t);return this.events.afterRun.emit(i),i}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,t){if(e.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};e=r}if(t.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,t.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};t=r}const i=new kI(e,t);let s=this.editor.graph.connections.slice();return t.allowMultipleConnections||(s=s.filter(r=>r.to!==t)),s.push(i),oMt(this.editor.graph.nodes,s)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:t.allowMultipleConnections?[]:this.editor.graph.connections.filter(r=>r.to===t)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const t=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(t,...e)}validateNodeCalculationOutput(e,t){if(typeof t!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(i=>{if(!(i in t))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${i}"`)})}internalOnChange(e,t){this.internalStatus===Kn.Idle&&this.onChange(this.recalculateOrder,e,t)}findInterfaceByTemplateId(e,t){for(const i of e)for(const s of[...Object.values(i.inputs),...Object.values(i.outputs)])if(s.templateId===t)return s;return null}}class lMt extends aMt{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,t,i){this.order.has(e.id)||this.order.set(e.id,zI(e));const{calculationOrder:s,connectionsFromNode:r}=this.order.get(e.id),o=new Map;for(const a of s){const l={};Object.entries(a.inputs).forEach(([c,_])=>{l[c]=this.getInterfaceValue(t,_.id)}),this.events.beforeNodeCalculation.emit({inputValues:l,node:a});let d;if(a.calculate)d=await a.calculate(l,{globalValues:i,engine:this});else{d={};for(const[c,_]of Object.entries(a.outputs))d[c]=this.getInterfaceValue(t,_.id)}this.validateNodeCalculationOutput(a,d),this.events.afterNodeCalculation.emit({outputValues:d,node:a}),o.set(a.id,new Map(Object.entries(d))),r.has(a)&&r.get(a).forEach(c=>{var _;const f=(_=Object.entries(a.outputs).find(([,h])=>h.id===c.from.id))===null||_===void 0?void 0:_[0];if(!f)throw new Error(`Could not find key for interface ${c.from.id} +Please check that you don't accidentally use the same token twice to register two different proxies for the same event/hook.`),this.unregisterProxy(e)),this.proxyMap.set(e,t),this.proxies.push(t)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const t=this.proxyMap.get(e);this.proxyMap.delete(e);const i=this.proxies.indexOf(t);i>=0&&this.proxies.splice(i,1)}}class qt extends po{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(t=>t(e,this.entity))}}class Pn extends po{constructor(e){super(),this.entity=e}emit(e){let t=!1;const i=()=>[t=!0];for(const s of Array.from(this.listeners.values()))if(s(e,i,this.entity),t)return{prevented:!0};return{prevented:!1}}}class DI extends po{execute(e,t){let i=e;for(const s of this.listeners)i=s(i,t);return i}}class li extends DI{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class iMt extends po{constructor(e){super(),this.entity=e}execute(e){const t=[];for(const i of this.listeners)t.push(i(e,this.entity));return t}}function ji(){const n=Symbol(),e=new Map,t=new Set,i=(l,d)=>{d instanceof po&&d.registerProxy(n,()=>{var c,_;return(_=(c=e.get(l))===null||c===void 0?void 0:c.listeners)!==null&&_!==void 0?_:[]})},s=l=>{const d=new po;e.set(l,d),t.forEach(c=>i(l,c[l]))},r=l=>{t.add(l);for(const d of e.keys())i(d,l[d])},o=l=>{for(const d of e.keys())l[d]instanceof po&&l[d].unregisterProxy(n);t.delete(l)},a=()=>{t.forEach(l=>o(l)),e.clear()};return new Proxy({},{get(l,d){return d==="addTarget"?r:d==="removeTarget"?o:d==="destroy"?a:typeof d!="string"||d.startsWith("_")?l[d]:(e.has(d)||s(d),e.get(d))}})}class UR{constructor(e,t){if(this.destructed=!1,this.events={destruct:new qt(this)},!e||!t)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Fs(),this.from=e,this.to=t,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class kI{constructor(e,t){if(!e||!t)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Fs(),this.from=e,this.to=t}}function yb(n,e){return Object.fromEntries(Object.entries(n).map(([t,i])=>[t,e(i)]))}class LI{constructor(){this._title="",this.id=Fs(),this.events={loaded:new qt(this),beforeAddInput:new Pn(this),addInput:new qt(this),beforeRemoveInput:new Pn(this),removeInput:new qt(this),beforeAddOutput:new Pn(this),addOutput:new qt(this),beforeRemoveOutput:new Pn(this),removeOutput:new qt(this),beforeTitleChanged:new Pn(this),titleChanged:new qt(this),update:new qt(this)},this.hooks={beforeLoad:new li(this),afterSave:new li(this)}}get graph(){return this.graphInstance}get title(){return this._title}set title(e){this.events.beforeTitleChanged.emit(e).prevented||(this._title=e,this.events.titleChanged.emit(e))}addInput(e,t){return this.addInterface("input",e,t)}addOutput(e,t){return this.addInterface("output",e,t)}removeInput(e){return this.removeInterface("input",e)}removeOutput(e){return this.removeInterface("output",e)}registerGraph(e){this.graphInstance=e}load(e){this.hooks.beforeLoad.execute(e),this.id=e.id,this._title=e.title,Object.entries(e.inputs).forEach(([t,i])=>{this.inputs[t]&&(this.inputs[t].load(i),this.inputs[t].nodeId=this.id)}),Object.entries(e.outputs).forEach(([t,i])=>{this.outputs[t]&&(this.outputs[t].load(i),this.outputs[t].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=yb(this.inputs,s=>s.save()),t=yb(this.outputs,s=>s.save()),i={type:this.type,id:this.id,title:this.title,inputs:e,outputs:t};return this.hooks.afterSave.execute(i)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,t])=>this.initializeIntf("input",e,t)),Object.entries(this.outputs).forEach(([e,t])=>this.initializeIntf("output",e,t))}initializeIntf(e,t,i){i.isInput=e==="input",i.nodeId=this.id,i.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:t,intf:i}))}addInterface(e,t,i){const s=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,r=e==="input"?this.events.addInput:this.events.addOutput,o=e==="input"?this.inputs:this.outputs;return s.emit(i).prevented?!1:(o[t]=i,this.initializeIntf(e,t,i),r.emit(i),!0)}removeInterface(e,t){const i=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,s=e==="input"?this.events.removeInput:this.events.removeOutput,r=e==="input"?this.inputs[t]:this.outputs[t];if(!r||i.emit(r).prevented)return!1;if(r.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===r||a.to===r).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return r.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[t]:delete this.outputs[t],s.emit(r),!0}}let PI=class extends LI{load(e){super.load(e)}save(){return super.save()}};function el(n){return class extends PI{constructor(){var e,t;super(),this.type=n.type,this.inputs={},this.outputs={},this.calculate=n.calculate?(i,s)=>n.calculate.call(this,i,s):void 0,this._title=(e=n.title)!==null&&e!==void 0?e:n.type,this.executeFactory("input",n.inputs),this.executeFactory("output",n.outputs),(t=n.onCreate)===null||t===void 0||t.call(this)}onPlaced(){var e;(e=n.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=n.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,t){Object.keys(t||{}).forEach(i=>{const s=t[i]();e==="input"?this.addInput(i,s):this.addOutput(i,s)})}}}class tn{set connectionCount(e){this._connectionCount=e,this.events.setConnectionCount.emit(e)}get connectionCount(){return this._connectionCount}set value(e){this.events.beforeSetValue.emit(e).prevented||(this._value=e,this.events.setValue.emit(e))}get value(){return this._value}constructor(e,t){this.id=Fs(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new qt(this),beforeSetValue:new Pn(this),setValue:new qt(this),updated:new qt(this)},this.hooks={load:new li(this),save:new li(this)},this._connectionCount=0,this.name=e,this._value=t}load(e){this.id=e.id,this.templateId=e.templateId,this.value=e.value,this.hooks.load.execute(e)}save(){const e={id:this.id,templateId:this.templateId,value:this.value};return this.hooks.save.execute(e)}setComponent(e){return this.component=e,this}setPort(e){return this.port=e,this}setHidden(e){return this.hidden=e,this}use(e,...t){return e(this,...t),this}}const ka="__baklava_SubgraphInputNode",La="__baklava_SubgraphOutputNode";class UI extends PI{constructor(){super(),this.graphInterfaceId=Fs()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class FI extends UI{constructor(){super(...arguments),this.type=ka,this.inputs={name:new tn("Name","Input")},this.outputs={placeholder:new tn("Value",void 0)}}static isGraphInputNode(e){return e.type===ka}}class BI extends UI{constructor(){super(...arguments),this.type=La,this.inputs={name:new tn("Name","Output"),placeholder:new tn("Value",void 0)},this.outputs={output:new tn("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===La}}class Cc{get nodes(){return this._nodes}get connections(){return this._connections}get loading(){return this._loading}get destroying(){return this._destroying}get inputs(){return this.nodes.filter(t=>t.type===ka).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(t=>t.type===La).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.output.id}))}constructor(e,t){this.id=Fs(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new Pn(this),addNode:new qt(this),beforeRemoveNode:new Pn(this),removeNode:new qt(this),beforeAddConnection:new Pn(this),addConnection:new qt(this),checkConnection:new Pn(this),beforeRemoveConnection:new Pn(this),removeConnection:new qt(this)},this.hooks={save:new li(this),load:new li(this),checkConnection:new iMt(this)},this.nodeEvents=ji(),this.nodeHooks=ji(),this.connectionEvents=ji(),this.editor=e,this.template=t,e.registerGraph(this)}addNode(e){if(!this.events.beforeAddNode.emit(e).prevented)return this.nodeEvents.addTarget(e.events),this.nodeHooks.addTarget(e.hooks),e.registerGraph(this),this._nodes.push(e),e=this.nodes.find(t=>t.id===e.id),e.onPlaced(),this.events.addNode.emit(e),e}removeNode(e){if(this.nodes.includes(e)){if(this.events.beforeRemoveNode.emit(e).prevented)return;const t=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(i=>t.includes(i.from)||t.includes(i.to)).forEach(i=>this.removeConnection(i)),this._nodes.splice(this.nodes.indexOf(e),1),this.events.removeNode.emit(e),e.onDestroy(),this.nodeEvents.removeTarget(e.events),this.nodeHooks.removeTarget(e.hooks)}}addConnection(e,t){const i=this.checkConnection(e,t);if(!i.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:t}).prevented)return;for(const r of i.connectionsInDanger){const o=this.connections.find(a=>a.id===r.id);o&&this.removeConnection(o)}const s=new UR(i.dummyConnection.from,i.dummyConnection.to);return this.internalAddConnection(s),s}removeConnection(e){if(this.connections.includes(e)){if(this.events.beforeRemoveConnection.emit(e).prevented)return;e.destruct(),this._connections.splice(this.connections.indexOf(e),1),this.events.removeConnection.emit(e),this.connectionEvents.removeTarget(e.events)}}checkConnection(e,t){if(!e||!t)return{connectionAllowed:!1};const i=this.findNodeById(e.nodeId),s=this.findNodeById(t.nodeId);if(i&&s&&i===s)return{connectionAllowed:!1};if(e.isInput&&!t.isInput){const a=e;e=t,t=a}if(e.isInput||!t.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===t))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:t}).prevented)return{connectionAllowed:!1};const r=this.hooks.checkConnection.execute({from:e,to:t});if(r.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const o=Array.from(new Set(r.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new kI(e,t),connectionsInDanger:o}}findNodeInterface(e){for(const t of this.nodes){for(const i in t.inputs){const s=t.inputs[i];if(s.id===e)return s}for(const i in t.outputs){const s=t.outputs[i];if(s.id===e)return s}}}findNodeById(e){return this.nodes.find(t=>t.id===e)}load(e){try{this._loading=!0;const t=[];for(let i=this.connections.length-1;i>=0;i--)this.removeConnection(this.connections[i]);for(let i=this.nodes.length-1;i>=0;i--)this.removeNode(this.nodes[i]);this.id=e.id;for(const i of e.nodes){const s=this.editor.nodeTypes.get(i.type);if(!s){t.push(`Node type ${i.type} is not registered`);continue}const r=new s.type;this.addNode(r),r.load(i)}for(const i of e.connections){const s=this.findNodeInterface(i.from),r=this.findNodeInterface(i.to);if(s)if(r){const o=new UR(s,r);o.id=i.id,this.internalAddConnection(o)}else{t.push(`Could not find interface with id ${i.to}`);continue}else{t.push(`Could not find interface with id ${i.from}`);continue}}return this.hooks.load.execute(e),t}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(t=>t.save()),connections:this.connections.map(t=>({id:t.id,from:t.from.id,to:t.to.id})),inputs:this.inputs,outputs:this.outputs};return this.hooks.save.execute(e)}destroy(){this._destroying=!0;for(const e of this.nodes)this.removeNode(e);this.editor.unregisterGraph(this)}internalAddConnection(e){this.connectionEvents.addTarget(e.events),this._connections.push(e),this.events.addConnection.emit(e)}}const cc="__baklava_GraphNode-";function Pa(n){return cc+n.id}function sMt(n){return class extends LI{constructor(){super(...arguments),this.type=Pa(n),this.inputs={},this.outputs={},this.template=n,this.calculate=async(t,i)=>{var s;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!i.engine||typeof i.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const r=i.engine.getInputValues(this.subgraph);for(const l of this.subgraph.inputs)r.set(l.nodeInterfaceId,t[l.id]);const o=await i.engine.runGraph(this.subgraph,r,i.globalValues),a={};for(const l of this.subgraph.outputs)a[l.id]=(s=o.get(l.nodeId))===null||s===void 0?void 0:s.get("output");return a._calculationResults=o,a}}get title(){return this._title}set title(t){this.template.name=t}load(t){if(!this.subgraph)throw new Error("Cannot load a graph node without a graph");if(!this.template)throw new Error("Unable to load graph node without graph template");this.subgraph.load(t.graphState),super.load(t)}save(){if(!this.subgraph)throw new Error("Cannot save a graph node without a graph");return{...super.save(),graphState:this.subgraph.save()}}onPlaced(){this.template.events.updated.subscribe(this,()=>this.initialize()),this.template.events.nameChanged.subscribe(this,t=>{this._title=t}),this.initialize()}onDestroy(){var t;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(t=this.subgraph)===null||t===void 0||t.destroy()}initialize(){this.subgraph&&this.subgraph.destroy(),this.subgraph=this.template.createGraph(),this._title=this.template.name,this.updateInterfaces(),this.events.update.emit(null)}updateInterfaces(){if(!this.subgraph)throw new Error("Trying to update interfaces without graph instance");for(const t of this.subgraph.inputs)t.id in this.inputs?this.inputs[t.id].name=t.name:this.addInput(t.id,new tn(t.name,void 0));for(const t of Object.keys(this.inputs))this.subgraph.inputs.some(i=>i.id===t)||this.removeInput(t);for(const t of this.subgraph.outputs)t.id in this.outputs?this.outputs[t.id].name=t.name:this.addOutput(t.id,new tn(t.name,void 0));for(const t of Object.keys(this.outputs))this.subgraph.outputs.some(i=>i.id===t)||this.removeOutput(t);this.addOutput("_calculationResults",new tn("_calculationResults",void 0).setHidden(!0))}}}class gp{static fromGraph(e,t){return new gp(e.save(),t)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const t=this.editor.nodeTypes.get(Pa(this));t&&(t.title=e)}get inputs(){return this.nodes.filter(t=>t.type===ka).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(t=>t.type===La).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.output.id}))}constructor(e,t){this.id=Fs(),this._name="Subgraph",this.events={nameChanged:new qt(this),updated:new qt(this)},this.hooks={beforeLoad:new li(this),afterSave:new li(this)},this.editor=t,e.id&&(this.id=e.id),e.name&&(this._name=e.name),this.update(e)}update(e){this.nodes=e.nodes,this.connections=e.connections,this.events.updated.emit()}save(){return{id:this.id,name:this.name,nodes:this.nodes,connections:this.connections,inputs:this.inputs,outputs:this.outputs}}createGraph(e){const t=new Map,i=f=>{const m=Fs();return t.set(f,m),m},s=f=>{const m=t.get(f);if(!m)throw new Error(`Unable to create graph from template: Could not map old id ${f} to new id`);return m},r=f=>yb(f,m=>({id:i(m.id),templateId:m.id,value:m.value})),o=this.nodes.map(f=>({...f,id:i(f.id),inputs:r(f.inputs),outputs:r(f.outputs)})),a=this.connections.map(f=>({id:i(f.id),from:s(f.from),to:s(f.to)})),l=this.inputs.map(f=>({id:f.id,name:f.name,nodeId:s(f.nodeId),nodeInterfaceId:s(f.nodeInterfaceId)})),d=this.outputs.map(f=>({id:f.id,name:f.name,nodeId:s(f.nodeId),nodeInterfaceId:s(f.nodeInterfaceId)})),c={id:Fs(),nodes:o,connections:a,inputs:l,outputs:d};return e||(e=new Cc(this.editor)),e.load(c).forEach(f=>console.warn(f)),e.template=this,e}}class rMt{get nodeTypes(){return this._nodeTypes}get graph(){return this._graph}get graphTemplates(){return this._graphTemplates}get graphs(){return this._graphs}get loading(){return this._loading}constructor(){this.events={loaded:new qt(this),beforeRegisterNodeType:new Pn(this),registerNodeType:new qt(this),beforeUnregisterNodeType:new Pn(this),unregisterNodeType:new qt(this),beforeAddGraphTemplate:new Pn(this),addGraphTemplate:new qt(this),beforeRemoveGraphTemplate:new Pn(this),removeGraphTemplate:new qt(this),registerGraph:new qt(this),unregisterGraph:new qt(this)},this.hooks={save:new li(this),load:new li(this)},this.graphTemplateEvents=ji(),this.graphTemplateHooks=ji(),this.graphEvents=ji(),this.graphHooks=ji(),this.nodeEvents=ji(),this.nodeHooks=ji(),this.connectionEvents=ji(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new Cc(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(FI),this.registerNodeType(BI)}registerNodeType(e,t){var i,s;if(this.events.beforeRegisterNodeType.emit({type:e,options:t}).prevented)return;const r=new e;this._nodeTypes.set(r.type,{type:e,category:(i=t==null?void 0:t.category)!==null&&i!==void 0?i:"default",title:(s=t==null?void 0:t.title)!==null&&s!==void 0?s:r.title}),this.events.registerNodeType.emit({type:e,options:t})}unregisterNodeType(e){const t=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(t)){if(this.events.beforeUnregisterNodeType.emit(t).prevented)return;this._nodeTypes.delete(t),this.events.unregisterNodeType.emit(t)}}addGraphTemplate(e){if(this.events.beforeAddGraphTemplate.emit(e).prevented)return;this._graphTemplates.push(e),this.graphTemplateEvents.addTarget(e.events),this.graphTemplateHooks.addTarget(e.hooks);const t=sMt(e);this.registerNodeType(t,{category:"Subgraphs",title:e.name}),this.events.addGraphTemplate.emit(e)}removeGraphTemplate(e){if(this.graphTemplates.includes(e)){if(this.events.beforeRemoveGraphTemplate.emit(e).prevented)return;const t=Pa(e);for(const i of[this.graph,...this.graphs.values()]){const s=i.nodes.filter(r=>r.type===t);for(const r of s)i.removeNode(r)}this.unregisterNodeType(t),this._graphTemplates.splice(this._graphTemplates.indexOf(e),1),this.graphTemplateEvents.removeTarget(e.events),this.graphTemplateHooks.removeTarget(e.hooks),this.events.removeGraphTemplate.emit(e)}}registerGraph(e){this.graphEvents.addTarget(e.events),this.graphHooks.addTarget(e.hooks),this.nodeEvents.addTarget(e.nodeEvents),this.nodeHooks.addTarget(e.nodeHooks),this.connectionEvents.addTarget(e.connectionEvents),this.events.registerGraph.emit(e),this._graphs.add(e)}unregisterGraph(e){this.graphEvents.removeTarget(e.events),this.graphHooks.removeTarget(e.hooks),this.nodeEvents.removeTarget(e.nodeEvents),this.nodeHooks.removeTarget(e.nodeHooks),this.connectionEvents.removeTarget(e.connectionEvents),this.events.unregisterGraph.emit(e),this._graphs.delete(e)}load(e){try{this._loading=!0,e=this.hooks.load.execute(e),e.graphTemplates.forEach(i=>{const s=new gp(i,this);this.addGraphTemplate(s)});const t=this._graph.load(e.graph);return this.events.loaded.emit(),t.forEach(i=>console.warn(i)),t}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(t=>t.save())};return this.hooks.save.execute(e)}}function oMt(n,e){const t=new Map;e.graphs.forEach(i=>{i.nodes.forEach(s=>t.set(s.id,s))}),n.forEach((i,s)=>{const r=t.get(s);r&&i.forEach((o,a)=>{const l=r.outputs[a];l&&(l.value=o)})})}class GI extends Error{constructor(){super("Cycle detected")}}function aMt(n){return typeof n=="string"}function zI(n,e){const t=new Map,i=new Map,s=new Map;let r,o;if(n instanceof Cc)r=n.nodes,o=n.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");r=n,o=e}r.forEach(d=>{Object.values(d.inputs).forEach(c=>t.set(c.id,d.id)),Object.values(d.outputs).forEach(c=>t.set(c.id,d.id))}),r.forEach(d=>{const c=o.filter(f=>f.from&&t.get(f.from.id)===d.id),_=new Set(c.map(f=>t.get(f.to.id)).filter(aMt));i.set(d.id,_),s.set(d,c)});const a=r.slice();o.forEach(d=>{const c=a.findIndex(_=>t.get(d.to.id)===_.id);c>=0&&a.splice(c,1)});const l=[];for(;a.length>0;){const d=a.pop();l.push(d);const c=i.get(d.id);for(;c.size>0;){const _=c.values().next().value;if(c.delete(_),Array.from(i.values()).every(f=>!f.has(_))){const f=r.find(m=>m.id===_);a.push(f)}}}if(Array.from(i.values()).some(d=>d.size>0))throw new GI;return{calculationOrder:l,connectionsFromNode:s,interfaceIdToNodeId:t}}function lMt(n,e){try{return zI(n,e),!1}catch(t){if(t instanceof GI)return!0;throw t}}var Kn;(function(n){n.Running="Running",n.Idle="Idle",n.Paused="Paused",n.Stopped="Stopped"})(Kn||(Kn={}));class cMt{get status(){return this.isRunning?Kn.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new Pn(this),afterRun:new qt(this),statusChange:new qt(this),beforeNodeCalculation:new qt(this),afterNodeCalculation:new qt(this)},this.hooks={gatherCalculationData:new li(this),transferData:new DI},this.recalculateOrder=!0,this.internalStatus=Kn.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(t,i)=>{i.graph&&!i.graph.loading&&i.graph.activeTransactions===0&&this.internalOnChange(i,t??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(t,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(t,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(t,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(t,i)=>{this.recalculateOrder=!0,!i.loading&&i.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,t=>this.checkConnection(t.from,t.to))}start(){this.internalStatus===Kn.Stopped&&(this.internalStatus=Kn.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===Kn.Idle&&(this.internalStatus=Kn.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===Kn.Paused&&(this.internalStatus=Kn.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===Kn.Idle||this.internalStatus===Kn.Paused)&&(this.internalStatus=Kn.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...t){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const i=await this.execute(e,...t);return this.events.afterRun.emit(i),i}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,t){if(e.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};e=r}if(t.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,t.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};t=r}const i=new kI(e,t);let s=this.editor.graph.connections.slice();return t.allowMultipleConnections||(s=s.filter(r=>r.to!==t)),s.push(i),lMt(this.editor.graph.nodes,s)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:t.allowMultipleConnections?[]:this.editor.graph.connections.filter(r=>r.to===t)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const t=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(t,...e)}validateNodeCalculationOutput(e,t){if(typeof t!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(i=>{if(!(i in t))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${i}"`)})}internalOnChange(e,t){this.internalStatus===Kn.Idle&&this.onChange(this.recalculateOrder,e,t)}findInterfaceByTemplateId(e,t){for(const i of e)for(const s of[...Object.values(i.inputs),...Object.values(i.outputs)])if(s.templateId===t)return s;return null}}class dMt extends cMt{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,t,i){this.order.has(e.id)||this.order.set(e.id,zI(e));const{calculationOrder:s,connectionsFromNode:r}=this.order.get(e.id),o=new Map;for(const a of s){const l={};Object.entries(a.inputs).forEach(([c,_])=>{l[c]=this.getInterfaceValue(t,_.id)}),this.events.beforeNodeCalculation.emit({inputValues:l,node:a});let d;if(a.calculate)d=await a.calculate(l,{globalValues:i,engine:this});else{d={};for(const[c,_]of Object.entries(a.outputs))d[c]=this.getInterfaceValue(t,_.id)}this.validateNodeCalculationOutput(a,d),this.events.afterNodeCalculation.emit({outputValues:d,node:a}),o.set(a.id,new Map(Object.entries(d))),r.has(a)&&r.get(a).forEach(c=>{var _;const f=(_=Object.entries(a.outputs).find(([,h])=>h.id===c.from.id))===null||_===void 0?void 0:_[0];if(!f)throw new Error(`Could not find key for interface ${c.from.id} This is likely a Baklava internal issue. Please report it on GitHub.`);const m=this.hooks.transferData.execute(d[f],c);c.to.allowMultipleConnections?t.has(c.to.id)?t.get(c.to.id).push(m):t.set(c.to.id,[m]):t.set(c.to.id,m)})}return o}async execute(e){this.recalculateOrder&&(this.order.clear(),this.recalculateOrder=!1);const t=this.getInputValues(this.editor.graph);return await this.runGraph(this.editor.graph,t,e)}getInputValues(e){const t=new Map;for(const i of e.nodes)Object.values(i.inputs).forEach(s=>{s.connectionCount===0&&t.set(s.id,s.value)}),i.calculate||Object.values(i.outputs).forEach(s=>{t.set(s.id,s.value)});return t}onChange(e){this.recalculateOrder=e||this.recalculateOrder,this.calculateWithoutData()}getInterfaceValue(e,t){if(!e.has(t))throw new Error(`Could not find value for interface ${t} -This is likely a Baklava internal issue. Please report it on GitHub.`);return e.get(t)}}let Sb=null;function cMt(n){Sb=n}function Oi(){if(!Sb)throw new Error("providePlugin() must be called before usePlugin()");return{viewModel:Sb}}function Wi(){const{viewModel:n}=Oi();return{graph:jd(n.value,"displayedGraph"),switchGraph:n.value.switchGraph}}function VI(n){const{graph:e}=Wi(),t=mt(null),i=mt(null);return{dragging:it(()=>!!t.value),onPointerDown:l=>{t.value={x:l.pageX,y:l.pageY},i.value={x:n.value.x,y:n.value.y}},onPointerMove:l=>{if(t.value){const d=l.pageX-t.value.x,c=l.pageY-t.value.y;n.value.x=i.value.x+d/e.value.scaling,n.value.y=i.value.y+c/e.value.scaling}},onPointerUp:()=>{t.value=null,i.value=null}}}function HI(n,e,t){if(!e.template)return!1;if(Pa(e.template)===t)return!0;const i=n.graphTemplates.find(r=>Pa(r)===t);return i?i.nodes.filter(r=>r.type.startsWith(cc)).some(r=>HI(n,e,r.type)):!1}function qI(n){return it(()=>{const e=Array.from(n.value.editor.nodeTypes.entries()),t=new Set(e.map(([,s])=>s.category)),i=[];for(const s of t.values()){let r=e.filter(([,o])=>o.category===s);n.value.displayedGraph.template?r=r.filter(([o])=>!HI(n.value.editor,n.value.displayedGraph,o)):r=r.filter(([o])=>![ka,La].includes(o)),r.length>0&&i.push({name:s,nodeTypes:Object.fromEntries(r)})}return i.sort((s,r)=>s.name==="default"?-1:r.name==="default"||s.name>r.name?1:-1),i})}function YI(){const{graph:n}=Wi();return{transform:(t,i)=>{const s=t/n.value.scaling-n.value.panning.x,r=i/n.value.scaling-n.value.panning.y;return[s,r]}}}function dMt(){const{graph:n}=Wi();let e=[],t=-1,i={x:0,y:0};const s=it(()=>n.value.panning),r=VI(s),o=it(()=>({"transform-origin":"0 0",transform:`scale(${n.value.scaling}) translate(${n.value.panning.x}px, ${n.value.panning.y}px)`})),a=(m,h,E)=>{const b=[m/n.value.scaling-n.value.panning.x,h/n.value.scaling-n.value.panning.y],g=[m/E-n.value.panning.x,h/E-n.value.panning.y],v=[g[0]-b[0],g[1]-b[1]];n.value.panning.x+=v[0],n.value.panning.y+=v[1],n.value.scaling=E},l=m=>{m.preventDefault();let h=m.deltaY;m.deltaMode===1&&(h*=32);const E=n.value.scaling*(1-h/3e3);a(m.offsetX,m.offsetY,E)},d=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:o,...r,onPointerDown:m=>{if(e.push(m),r.onPointerDown(m),e.length===2){const{ax:h,ay:E,bx:b,by:g}=d();i={x:h+(b-h)/2,y:E+(g-E)/2}}},onPointerMove:m=>{for(let h=0;h0){const C=n.value.scaling*(1+(T-t)/500);a(i.x,i.y,C)}t=T}else r.onPointerMove(m)},onPointerUp:m=>{e=e.filter(h=>h.pointerId!==m.pointerId),t=-1,r.onPointerUp()},onMouseWheel:l}}var vi=(n=>(n[n.NONE=0]="NONE",n[n.ALLOWED=1]="ALLOWED",n[n.FORBIDDEN=2]="FORBIDDEN",n))(vi||{});const $I=Symbol();function uMt(){const{graph:n}=Wi(),e=mt(null),t=mt(null),i=a=>{e.value&&(e.value.mx=a.offsetX/n.value.scaling-n.value.panning.x,e.value.my=a.offsetY/n.value.scaling-n.value.panning.y)},s=()=>{if(t.value){if(e.value)return;const a=n.value.connections.find(l=>l.to===t.value);t.value.isInput&&a?(e.value={status:vi.NONE,from:a.from},n.value.removeConnection(a)):e.value={status:vi.NONE,from:t.value},e.value.mx=void 0,e.value.my=void 0}},r=()=>{if(e.value&&t.value){if(e.value.from===t.value)return;n.value.addConnection(e.value.from,e.value.to)}e.value=null},o=a=>{if(t.value=a??null,a&&e.value){e.value.to=a;const l=n.value.checkConnection(e.value.from,e.value.to);if(e.value.status=l.connectionAllowed?vi.ALLOWED:vi.FORBIDDEN,l.connectionAllowed){const d=l.connectionsInDanger.map(c=>c.id);n.value.connections.forEach(c=>{d.includes(c.id)&&(c.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=vi.NONE,n.value.connections.forEach(l=>{l.isInDanger=!1}))};return sa($I,{temporaryConnection:e,hoveredOver:o}),{temporaryConnection:e,onMouseMove:i,onMouseDown:s,onMouseUp:r,hoveredOver:o}}function pMt(n){const e=mt(!1),t=mt(0),i=mt(0),s=qI(n),{transform:r}=YI(),o=it(()=>{let c=[];const _={};for(const m of s.value){const h=Object.entries(m.nodeTypes).map(([E,b])=>({label:b.title,value:"addNode:"+E}));m.name==="default"?c=h:_[m.name]=h}const f=[...Object.entries(_).map(([m,h])=>({label:m,submenu:h}))];return f.length>0&&c.length>0&&f.push({isDivider:!0}),f.push(...c),f}),a=it(()=>n.value.settings.contextMenu.additionalItems.length===0?o.value:[{label:"Add node",submenu:o.value},...n.value.settings.contextMenu.additionalItems.map(c=>"isDivider"in c||"submenu"in c?c:{label:c.label,value:"command:"+c.command,disabled:!n.value.commandHandler.canExecuteCommand(c.command)})]);function l(c){e.value=!0,t.value=c.offsetX,i.value=c.offsetY}function d(c){if(c.startsWith("addNode:")){const _=c.substring(8),f=n.value.editor.nodeTypes.get(_);if(!f)return;const m=ei(new f.type);n.value.displayedGraph.addNode(m);const[h,E]=r(t.value,i.value);m.position.x=h,m.position.y=E}else if(c.startsWith("command:")){const _=c.substring(8);n.value.commandHandler.canExecuteCommand(_)&&n.value.commandHandler.executeCommand(_)}}return{show:e,x:t,y:i,items:a,open:l,onClick:d}}const _Mt=pn({setup(){const{viewModel:n}=Oi(),{graph:e}=Wi();return{styles:it(()=>{const i=n.value.settings.background,s=e.value.panning.x*e.value.scaling,r=e.value.panning.y*e.value.scaling,o=e.value.scaling*i.gridSize,a=o/i.gridDivision,l=`${o}px ${o}px, ${o}px ${o}px`,d=e.value.scaling>i.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${s}px top ${r}px`,backgroundSize:`${l} ${d}`}})}}}),_n=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t};function hMt(n,e,t,i,s,r){return w(),M("div",{class:"background",style:en(n.styles)},null,4)}const fMt=_n(_Mt,[["render",hMt]]);function mMt(n){return iA()?(IM(n),!0):!1}function pv(n){return typeof n=="function"?n():Ct(n)}const WI=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const gMt=Object.prototype.toString,bMt=n=>gMt.call(n)==="[object Object]",qd=()=>{},EMt=vMt();function vMt(){var n,e;return WI&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function yMt(n,e,t=!1){return e.reduce((i,s)=>(s in n&&(!t||n[s]!==void 0)&&(i[s]=n[s]),i),{})}function SMt(n,e={}){if(!hn(n))return p2(n);const t=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const i in n.value)t[i]=u2(()=>({get(){return n.value[i]},set(s){var r;if((r=pv(e.replaceRef))!=null?r:!0)if(Array.isArray(n.value)){const a=[...n.value];a[i]=s,n.value=a}else{const a={...n.value,[i]:s};Object.setPrototypeOf(a,Object.getPrototypeOf(n.value)),n.value=a}else n.value[i]=s}}));return t}function Nl(n){var e;const t=pv(n);return(e=t==null?void 0:t.$el)!=null?e:t}const _v=WI?window:void 0;function Vl(...n){let e,t,i,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,s]=n,e=_v):[e,t,i,s]=n,!e)return qd;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const r=[],o=()=>{r.forEach(c=>c()),r.length=0},a=(c,_,f,m)=>(c.addEventListener(_,f,m),()=>c.removeEventListener(_,f,m)),l=qn(()=>[Nl(e),pv(s)],([c,_])=>{if(o(),!c)return;const f=bMt(_)?{..._}:_;r.push(...t.flatMap(m=>i.map(h=>a(c,m,h,f))))},{immediate:!0,flush:"post"}),d=()=>{l(),o()};return mMt(d),d}let FR=!1;function KI(n,e,t={}){const{window:i=_v,ignore:s=[],capture:r=!0,detectIframe:o=!1}=t;if(!i)return qd;EMt&&!FR&&(FR=!0,Array.from(i.document.body.children).forEach(f=>f.addEventListener("click",qd)),i.document.documentElement.addEventListener("click",qd));let a=!0;const l=f=>s.some(m=>{if(typeof m=="string")return Array.from(i.document.querySelectorAll(m)).some(h=>h===f.target||f.composedPath().includes(h));{const h=Nl(m);return h&&(f.target===h||f.composedPath().includes(h))}}),c=[Vl(i,"click",f=>{const m=Nl(n);if(!(!m||m===f.target||f.composedPath().includes(m))){if(f.detail===0&&(a=!l(f)),!a){a=!0;return}e(f)}},{passive:!0,capture:r}),Vl(i,"pointerdown",f=>{const m=Nl(n);a=!l(f)&&!!(m&&!f.composedPath().includes(m))},{passive:!0}),o&&Vl(i,"blur",f=>{setTimeout(()=>{var m;const h=Nl(n);((m=i.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(h!=null&&h.contains(i.document.activeElement))&&e(f)},0)})].filter(Boolean);return()=>c.forEach(f=>f())}const jI={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},TMt=Object.keys(jI);function xMt(n={}){const{target:e=_v}=n,t=mt(!1),i=mt(n.initialValue||{});Object.assign(i.value,jI,i.value);const s=r=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(r.pointerType))&&(i.value=yMt(r,TMt,!1))};if(e){const r={passive:!0};Vl(e,["pointerdown","pointermove","pointerup"],s,r),Vl(e,"pointerleave",()=>t.value=!1,r)}return{...SMt(i),isInside:t}}const CMt=["onMouseenter","onMouseleave","onClick"],RMt={class:"flex-fill"},AMt={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},wMt=u("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[u("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),NMt=[wMt],hv=pn({__name:"ContextMenu",props:{modelValue:{type:Boolean},items:{},x:{default:0},y:{default:0},isNested:{type:Boolean,default:!1},isFlipped:{default:()=>({x:!1,y:!1})},flippable:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(n,{emit:e}){const t=n,i=e;let s=null;const r=mt(null),o=mt(-1),a=mt(0),l=mt({x:!1,y:!1}),d=it(()=>t.flippable&&(l.value.x||t.isFlipped.x)),c=it(()=>t.flippable&&(l.value.y||t.isFlipped.y)),_=it(()=>{const v={};return t.isNested||(v.top=(c.value?t.y-a.value:t.y)+"px",v.left=t.x+"px"),v}),f=it(()=>({"--flipped-x":d.value,"--flipped-y":c.value,"--nested":t.isNested})),m=it(()=>t.items.map(v=>({...v,hover:!1})));qn([()=>t.y,()=>t.items],()=>{var v,y,T,C;a.value=t.items.length*30;const x=((y=(v=r.value)==null?void 0:v.parentElement)==null?void 0:y.offsetWidth)??0,O=((C=(T=r.value)==null?void 0:T.parentElement)==null?void 0:C.offsetHeight)??0;l.value.x=!t.isNested&&t.x>x*.75,l.value.y=!t.isNested&&t.y+a.value>O-20}),KI(r,()=>{t.modelValue&&i("update:modelValue",!1)});const h=v=>{!v.submenu&&v.value&&(i("click",v.value),i("update:modelValue",!1))},E=v=>{i("click",v),o.value=-1,t.isNested||i("update:modelValue",!1)},b=(v,y)=>{t.items[y].submenu&&(o.value=y,s!==null&&(clearTimeout(s),s=null))},g=(v,y)=>{t.items[y].submenu&&(s=window.setTimeout(()=>{o.value=-1,s=null},200))};return(v,y)=>{const T=ht("ContextMenu",!0);return w(),Tt(ls,{name:"slide-fade"},{default:Je(()=>[ne(u("div",{ref_key:"el",ref:r,class:He(["baklava-context-menu",f.value]),style:en(_.value)},[(w(!0),M($e,null,dt(m.value,(C,x)=>(w(),M($e,null,[C.isDivider?(w(),M("div",{key:`d-${x}`,class:"divider"})):(w(),M("div",{key:`i-${x}`,class:He(["item",{submenu:!!C.submenu,"--disabled":!!C.disabled}]),onMouseenter:O=>b(O,x),onMouseleave:O=>g(O,x),onClick:Te(O=>h(C),["stop","prevent"])},[u("div",RMt,fe(C.label),1),C.submenu?(w(),M("div",AMt,NMt)):q("",!0),C.submenu?(w(),Tt(T,{key:1,"model-value":o.value===x,items:C.submenu,"is-nested":!0,"is-flipped":{x:d.value,y:c.value},flippable:v.flippable,onClick:E},null,8,["model-value","items","is-flipped","flippable"])):q("",!0)],42,CMt))],64))),256))],6),[[Ot,v.modelValue]])]),_:1})}}}),OMt={},IMt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},MMt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),DMt=u("circle",{cx:"12",cy:"12",r:"1"},null,-1),kMt=u("circle",{cx:"12",cy:"19",r:"1"},null,-1),LMt=u("circle",{cx:"12",cy:"5",r:"1"},null,-1),PMt=[MMt,DMt,kMt,LMt];function UMt(n,e){return w(),M("svg",IMt,PMt)}const QI=_n(OMt,[["render",UMt]]),FMt=["id"],BMt={key:0,class:"__tooltip"},GMt={key:2,class:"align-middle"},BR=pn({__name:"NodeInterface",props:{node:{},intf:{}},setup(n){const e=(b,g=100)=>{const v=b!=null&&b.toString?b.toString():"";return v.length>g?v.slice(0,g)+"...":v},t=n,{viewModel:i}=Oi(),{hoveredOver:s,temporaryConnection:r}=Gi($I),o=mt(null),a=it(()=>t.intf.connectionCount>0),l=mt(!1),d=it(()=>i.value.settings.displayValueOnHover&&l.value),c=it(()=>({"--input":t.intf.isInput,"--output":!t.intf.isInput,"--connected":a.value})),_=it(()=>t.intf.component&&(!t.intf.isInput||!t.intf.port||t.intf.connectionCount===0)),f=()=>{l.value=!0,s(t.intf)},m=()=>{l.value=!1,s(void 0)},h=()=>{o.value&&i.value.hooks.renderInterface.execute({intf:t.intf,el:o.value})},E=()=>{const b=i.value.displayedGraph.sidebar;b.nodeId=t.node.id,b.optionName=t.intf.name,b.visible=!0};return qs(h),pc(h),(b,g)=>{var v;return w(),M("div",{id:b.intf.id,ref_key:"el",ref:o,class:He(["baklava-node-interface",c.value])},[b.intf.port?(w(),M("div",{key:0,class:He(["__port",{"--selected":((v=Ct(r))==null?void 0:v.from)===b.intf}]),onPointerover:f,onPointerout:m},[Dn(b.$slots,"portTooltip",{showTooltip:d.value},()=>[d.value===!0?(w(),M("span",BMt,fe(e(b.intf.value)),1)):q("",!0)])],34)):q("",!0),_.value?(w(),Tt(Fu(b.intf.component),{key:1,modelValue:b.intf.value,"onUpdate:modelValue":g[0]||(g[0]=y=>b.intf.value=y),node:b.node,intf:b.intf,onOpenSidebar:E},null,40,["modelValue","node","intf"])):(w(),M("span",GMt,fe(b.intf.name),1))],10,FMt)}}}),zMt=["id","data-node-type"],VMt={class:"__title-label"},HMt={class:"__menu"},qMt={class:"__outputs"},YMt={class:"__inputs"},$Mt=pn({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(n,{emit:e}){const t=n,i=e,{viewModel:s}=Oi(),{graph:r,switchGraph:o}=Wi(),a=mt(null),l=mt(!1),d=mt(""),c=mt(null),_=mt(!1),f=mt(!1),m=it(()=>{const U=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return t.node.type.startsWith(cc)&&U.push({value:"editSubgraph",label:"Edit Subgraph"}),U}),h=it(()=>({"--selected":t.selected,"--dragging":t.dragging,"--two-column":!!t.node.twoColumn})),E=it(()=>{var U,F;return{top:`${((U=t.node.position)==null?void 0:U.y)??0}px`,left:`${((F=t.node.position)==null?void 0:F.x)??0}px`,"--width":`${t.node.width??s.value.settings.nodes.defaultWidth}px`}}),b=it(()=>Object.values(t.node.inputs).filter(U=>!U.hidden)),g=it(()=>Object.values(t.node.outputs).filter(U=>!U.hidden)),v=()=>{i("select")},y=U=>{t.selected||v(),i("start-drag",U)},T=()=>{f.value=!0},C=async U=>{var F;switch(U){case"delete":r.value.removeNode(t.node);break;case"rename":d.value=t.node.title,l.value=!0,await Ve(),(F=c.value)==null||F.focus();break;case"editSubgraph":o(t.node.template);break}},x=()=>{t.node.title=d.value,l.value=!1},O=()=>{a.value&&s.value.hooks.renderNode.execute({node:t.node,el:a.value})},R=U=>{_.value=!0,U.preventDefault()},S=U=>{if(!_.value)return;const F=t.node.width+U.movementX/r.value.scaling,K=s.value.settings.nodes.minWidth,L=s.value.settings.nodes.maxWidth;t.node.width=Math.max(K,Math.min(L,F))},A=()=>{_.value=!1};return qs(()=>{O(),window.addEventListener("mousemove",S),window.addEventListener("mouseup",A)}),pc(O),Va(()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",A)}),(U,F)=>(w(),M("div",{id:U.node.id,ref_key:"el",ref:a,class:He(["baklava-node",h.value]),style:en(E.value),"data-node-type":U.node.type,onPointerdown:v},[Ct(s).settings.nodes.resizable?(w(),M("div",{key:0,class:"__resize-handle",onMousedown:R},null,32)):q("",!0),Dn(U.$slots,"title",{},()=>[u("div",{class:"__title",onPointerdown:Te(y,["self","stop"])},[l.value?ne((w(),M("input",{key:1,ref_key:"renameInputEl",ref:c,"onUpdate:modelValue":F[1]||(F[1]=K=>d.value=K),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:x,onKeydown:wr(x,["enter"])},null,544)),[[Pe,d.value]]):(w(),M($e,{key:0},[u("div",VMt,fe(U.node.title),1),u("div",HMt,[Oe(QI,{class:"--clickable",onClick:T}),Oe(hv,{modelValue:f.value,"onUpdate:modelValue":F[0]||(F[0]=K=>f.value=K),x:0,y:0,items:m.value,onClick:C},null,8,["modelValue","items"])])],64))],32)]),Dn(U.$slots,"content",{},()=>[u("div",{class:"__content",onKeydown:F[2]||(F[2]=wr(Te(()=>{},["stop"]),["delete"]))},[u("div",qMt,[(w(!0),M($e,null,dt(g.value,K=>Dn(U.$slots,"nodeInterface",{key:K.id,type:"output",node:U.node,intf:K},()=>[Oe(BR,{node:U.node,intf:K},null,8,["node","intf"])])),128))]),u("div",YMt,[(w(!0),M($e,null,dt(b.value,K=>Dn(U.$slots,"nodeInterface",{key:K.id,type:"input",node:U.node,intf:K},()=>[Oe(BR,{node:U.node,intf:K},null,8,["node","intf"])])),128))])],32)])],46,zMt))}}),WMt=pn({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},state:{type:Number,default:vi.NONE},isTemporary:{type:Boolean,default:!1}},setup(n){const{viewModel:e}=Oi(),{graph:t}=Wi(),i=(o,a)=>{const l=(o+t.value.panning.x)*t.value.scaling,d=(a+t.value.panning.y)*t.value.scaling;return[l,d]},s=it(()=>{const[o,a]=i(n.x1,n.y1),[l,d]=i(n.x2,n.y2);if(e.value.settings.useStraightConnections)return`M ${o} ${a} L ${l} ${d}`;{const c=.3*Math.abs(o-l);return`M ${o} ${a} C ${o+c} ${a}, ${l-c} ${d}, ${l} ${d}`}}),r=it(()=>({"--temporary":n.isTemporary,"--allowed":n.state===vi.ALLOWED,"--forbidden":n.state===vi.FORBIDDEN}));return{d:s,classes:r}}}),KMt=["d"];function jMt(n,e,t,i,s,r){return w(),M("path",{class:He(["baklava-connection",n.classes]),d:n.d},null,10,KMt)}const XI=_n(WMt,[["render",jMt]]);function QMt(n){return document.getElementById(n.id)}function Ua(n){const e=document.getElementById(n.id),t=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:t&&t.length>0?t[0]:null}}const XMt=pn({components:{"connection-view":XI},props:{connection:{type:Object,required:!0}},setup(n){const{graph:e}=Wi();let t;const i=mt({x1:0,y1:0,x2:0,y2:0}),s=it(()=>n.connection.isInDanger?vi.FORBIDDEN:vi.NONE),r=it(()=>{var d;return(d=e.value.findNodeById(n.connection.from.nodeId))==null?void 0:d.position}),o=it(()=>{var d;return(d=e.value.findNodeById(n.connection.to.nodeId))==null?void 0:d.position}),a=d=>d.node&&d.interface&&d.port?[d.node.offsetLeft+d.interface.offsetLeft+d.port.offsetLeft+d.port.clientWidth/2,d.node.offsetTop+d.interface.offsetTop+d.port.offsetTop+d.port.clientHeight/2]:[0,0],l=()=>{const d=Ua(n.connection.from),c=Ua(n.connection.to);d.node&&c.node&&(t||(t=new ResizeObserver(()=>{l()}),t.observe(d.node),t.observe(c.node)));const[_,f]=a(d),[m,h]=a(c);i.value={x1:_,y1:f,x2:m,y2:h}};return qs(async()=>{await Ve(),l()}),Va(()=>{t&&t.disconnect()}),qn([r,o],()=>l(),{deep:!0}),{d:i,state:s}}});function ZMt(n,e,t,i,s,r){const o=ht("connection-view");return w(),Tt(o,{x1:n.d.x1,y1:n.d.y1,x2:n.d.x2,y2:n.d.y2,state:n.state},null,8,["x1","y1","x2","y2","state"])}const JMt=_n(XMt,[["render",ZMt]]);function Tu(n){return n.node&&n.interface&&n.port?[n.node.offsetLeft+n.interface.offsetLeft+n.port.offsetLeft+n.port.clientWidth/2,n.node.offsetTop+n.interface.offsetTop+n.port.offsetTop+n.port.clientHeight/2]:[0,0]}const e2t=pn({components:{"connection-view":XI},props:{connection:{type:Object,required:!0}},setup(n){const e=it(()=>n.connection?n.connection.status:vi.NONE);return{d:it(()=>{if(!n.connection)return{input:[0,0],output:[0,0]};const i=Tu(Ua(n.connection.from)),s=n.connection.to?Tu(Ua(n.connection.to)):[n.connection.mx||i[0],n.connection.my||i[1]];return n.connection.from.isInput?{input:s,output:i}:{input:i,output:s}}),status:e}}});function t2t(n,e,t,i,s,r){const o=ht("connection-view");return w(),Tt(o,{x1:n.d.input[0],y1:n.d.input[1],x2:n.d.output[0],y2:n.d.output[1],state:n.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const n2t=_n(e2t,[["render",t2t]]),i2t=pn({setup(){const{viewModel:n}=Oi(),{graph:e}=Wi(),t=mt(null),i=jd(n.value.settings.sidebar,"width"),s=it(()=>n.value.settings.sidebar.resizable),r=it(()=>{const _=e.value.sidebar.nodeId;return e.value.nodes.find(f=>f.id===_)}),o=it(()=>({width:`${i.value}px`})),a=it(()=>r.value?[...Object.values(r.value.inputs),...Object.values(r.value.outputs)].filter(f=>f.displayInSidebar&&f.component):[]),l=()=>{e.value.sidebar.visible=!1},d=()=>{window.addEventListener("mousemove",c),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",c)},{once:!0})},c=_=>{var f,m;const h=((m=(f=t.value)==null?void 0:f.parentElement)==null?void 0:m.getBoundingClientRect().width)??500;let E=i.value-_.movementX;E<300?E=300:E>.9*h&&(E=.9*h),i.value=E};return{el:t,graph:e,resizable:s,node:r,styles:o,displayedInterfaces:a,startResize:d,close:l}}}),s2t={class:"__header"},r2t={class:"__node-name"};function o2t(n,e,t,i,s,r){return w(),M("div",{ref:"el",class:He(["baklava-sidebar",{"--open":n.graph.sidebar.visible}]),style:en(n.styles)},[n.resizable?(w(),M("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...o)=>n.startResize&&n.startResize(...o))},null,32)):q("",!0),u("div",s2t,[u("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...o)=>n.close&&n.close(...o))},"×"),u("div",r2t,[u("b",null,fe(n.node?n.node.title:""),1)])]),(w(!0),M($e,null,dt(n.displayedInterfaces,o=>(w(),M("div",{key:o.id,class:"__interface"},[(w(),Tt(Fu(o.component),{modelValue:o.value,"onUpdate:modelValue":a=>o.value=a,node:n.node,intf:o},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const a2t=_n(i2t,[["render",o2t]]),l2t=pn({__name:"Minimap",setup(n){const{viewModel:e}=Oi(),{graph:t}=Wi(),i=mt(null),s=mt(!1);let r,o=!1,a={x1:0,y1:0,x2:0,y2:0},l;const d=()=>{var x,O;if(!r)return;r.canvas.width=i.value.offsetWidth,r.canvas.height=i.value.offsetHeight;const R=new Map,S=new Map;for(const L of t.value.nodes){const H=QMt(L),G=(H==null?void 0:H.offsetWidth)??0,P=(H==null?void 0:H.offsetHeight)??0,j=((x=L.position)==null?void 0:x.x)??0,Y=((O=L.position)==null?void 0:O.y)??0;R.set(L,{x1:j,y1:Y,x2:j+G,y2:Y+P}),S.set(L,H)}const A={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const L of R.values())L.x1A.x2&&(A.x2=L.x2),L.y2>A.y2&&(A.y2=L.y2);const U=50;A.x1-=U,A.y1-=U,A.x2+=U,A.y2+=U,a=A;const F=r.canvas.width/r.canvas.height,K=(a.x2-a.x1)/(a.y2-a.y1);if(F>K){const L=(F-K)*(a.y2-a.y1)*.5;a.x1-=L,a.x2+=L}else{const L=a.x2-a.x1,H=a.y2-a.y1,G=(L-F*H)/F*.5;a.y1-=G,a.y2+=G}r.clearRect(0,0,r.canvas.width,r.canvas.height),r.strokeStyle="white";for(const L of t.value.connections){const[H,G]=Tu(Ua(L.from)),[P,j]=Tu(Ua(L.to)),[Y,Q]=c(H,G),[ae,te]=c(P,j);if(r.beginPath(),r.moveTo(Y,Q),e.value.settings.useStraightConnections)r.lineTo(ae,te);else{const Z=.3*Math.abs(Y-ae);r.bezierCurveTo(Y+Z,Q,ae-Z,te,ae,te)}r.stroke()}r.strokeStyle="lightgray";for(const[L,H]of R.entries()){const[G,P]=c(H.x1,H.y1),[j,Y]=c(H.x2,H.y2);r.fillStyle=f(S.get(L)),r.beginPath(),r.rect(G,P,j-G,Y-P),r.fill(),r.stroke()}if(s.value){const L=h(),[H,G]=c(L.x1,L.y1),[P,j]=c(L.x2,L.y2);r.fillStyle="rgba(255, 255, 255, 0.2)",r.fillRect(H,G,P-H,j-G)}},c=(x,O)=>[(x-a.x1)/(a.x2-a.x1)*r.canvas.width,(O-a.y1)/(a.y2-a.y1)*r.canvas.height],_=(x,O)=>[x*(a.x2-a.x1)/r.canvas.width+a.x1,O*(a.y2-a.y1)/r.canvas.height+a.y1],f=x=>{if(x){const O=x.querySelector(".__content");if(O){const S=m(O);if(S)return S}const R=m(x);if(R)return R}return"gray"},m=x=>{const O=getComputedStyle(x).backgroundColor;if(O&&O!=="rgba(0, 0, 0, 0)")return O},h=()=>{const x=i.value.parentElement.offsetWidth,O=i.value.parentElement.offsetHeight,R=x/t.value.scaling-t.value.panning.x,S=O/t.value.scaling-t.value.panning.y;return{x1:-t.value.panning.x,y1:-t.value.panning.y,x2:R,y2:S}},E=x=>{x.button===0&&(o=!0,b(x))},b=x=>{if(o){const[O,R]=_(x.offsetX,x.offsetY),S=h(),A=(S.x2-S.x1)/2,U=(S.y2-S.y1)/2;t.value.panning.x=-(O-A),t.value.panning.y=-(R-U)}},g=()=>{o=!1},v=()=>{s.value=!0},y=()=>{s.value=!1,g()};qn([s,t.value.panning,()=>t.value.scaling,()=>t.value.connections.length],()=>{d()});const T=it(()=>t.value.nodes.map(x=>x.position)),C=it(()=>t.value.nodes.map(x=>x.width));return qn([T,C],()=>{d()},{deep:!0}),qs(()=>{r=i.value.getContext("2d"),r.imageSmoothingQuality="high",d(),l=setInterval(d,500)}),Va(()=>{clearInterval(l)}),(x,O)=>(w(),M("canvas",{ref_key:"canvas",ref:i,class:"baklava-minimap",onMouseenter:v,onMouseleave:y,onMousedown:Te(E,["self"]),onMousemove:Te(b,["self"]),onMouseup:g},null,544))}}),c2t=pn({components:{ContextMenu:hv,VerticalDots:QI},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(n){const{viewModel:e}=Oi(),{switchGraph:t}=Wi(),i=mt(!1),s=it(()=>n.type.startsWith(cc));return{showContextMenu:i,hasContextMenu:s,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{i.value=!0},onContextMenuClick:l=>{const d=n.type.substring(cc.length),c=e.value.editor.graphTemplates.find(_=>_.id===d);if(c)switch(l){case"editSubgraph":t(c);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(c);break}}}}}),d2t=["data-node-type"],u2t={class:"__title"},p2t={class:"__title-label"},_2t={key:0,class:"__menu"};function h2t(n,e,t,i,s,r){const o=ht("vertical-dots"),a=ht("context-menu");return w(),M("div",{class:"baklava-node --palette","data-node-type":n.type},[u("div",u2t,[u("div",p2t,fe(n.title),1),n.hasContextMenu?(w(),M("div",_2t,[Oe(o,{class:"--clickable",onPointerdown:e[0]||(e[0]=Te(()=>{},["stop","prevent"])),onClick:Te(n.openContextMenu,["stop","prevent"])},null,8,["onClick"]),Oe(a,{modelValue:n.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=l=>n.showContextMenu=l),x:-100,y:0,items:n.contextMenuItems,onClick:n.onContextMenuClick,onPointerdown:e[2]||(e[2]=Te(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):q("",!0)])],8,d2t)}const GR=_n(c2t,[["render",h2t]]),f2t={class:"baklava-node-palette"},m2t={key:0},g2t=pn({__name:"NodePalette",setup(n){const{viewModel:e}=Oi(),{x:t,y:i}=xMt(),{transform:s}=YI(),r=qI(e),o=Gi("editorEl"),a=mt(null),l=it(()=>{if(!a.value||!(o!=null&&o.value))return{};const{left:c,top:_}=o.value.getBoundingClientRect();return{top:`${i.value-_}px`,left:`${t.value-c}px`}}),d=(c,_)=>{a.value={type:c,nodeInformation:_};const f=()=>{const m=ei(new _.type);e.value.displayedGraph.addNode(m);const h=o.value.getBoundingClientRect(),[E,b]=s(t.value-h.left,i.value-h.top);m.position.x=E,m.position.y=b,a.value=null,document.removeEventListener("pointerup",f)};document.addEventListener("pointerup",f)};return(c,_)=>(w(),M($e,null,[u("div",f2t,[(w(!0),M($e,null,dt(Ct(r),f=>(w(),M("section",{key:f.name},[f.name!=="default"?(w(),M("h1",m2t,fe(f.name),1)):q("",!0),(w(!0),M($e,null,dt(f.nodeTypes,(m,h)=>(w(),Tt(GR,{key:h,type:h,title:m.title,onPointerdown:E=>d(h,m)},null,8,["type","title","onPointerdown"]))),128))]))),128))]),Oe(ls,{name:"fade"},{default:Je(()=>[a.value?(w(),M("div",{key:0,class:"baklava-dragged-node",style:en(l.value)},[Oe(GR,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):q("",!0)]),_:1})],64))}});let wd;const b2t=new Uint8Array(16);function E2t(){if(!wd&&(wd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!wd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wd(b2t)}const Cn=[];for(let n=0;n<256;++n)Cn.push((n+256).toString(16).slice(1));function v2t(n,e=0){return Cn[n[e+0]]+Cn[n[e+1]]+Cn[n[e+2]]+Cn[n[e+3]]+"-"+Cn[n[e+4]]+Cn[n[e+5]]+"-"+Cn[n[e+6]]+Cn[n[e+7]]+"-"+Cn[n[e+8]]+Cn[n[e+9]]+"-"+Cn[n[e+10]]+Cn[n[e+11]]+Cn[n[e+12]]+Cn[n[e+13]]+Cn[n[e+14]]+Cn[n[e+15]]}const y2t=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zR={randomUUID:y2t};function xu(n,e,t){if(zR.randomUUID&&!e&&!n)return zR.randomUUID();n=n||{};const i=n.random||(n.rng||E2t)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(let s=0;s<16;++s)e[t+s]=i[s];return e}return v2t(i)}const dc="SAVE_SUBGRAPH";function S2t(n,e){const t=()=>{const i=n.value;if(!i.template)throw new Error("Graph template property not set");i.template.update(i.save()),i.template.panning=i.panning,i.template.scaling=i.scaling};e.registerCommand(dc,{canExecute:()=>{var i;return n.value!==((i=n.value.editor)==null?void 0:i.graph)},execute:t})}const T2t={},x2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},C2t=u("polyline",{points:"6 9 12 15 18 9"},null,-1),R2t=[C2t];function A2t(n,e){return w(),M("svg",x2t,R2t)}const w2t=_n(T2t,[["render",A2t]]),N2t=pn({components:{"i-arrow":w2t},props:{intf:{type:Object,required:!0}},setup(n){const e=mt(null),t=mt(!1),i=it(()=>n.intf.items.find(o=>typeof o=="string"?o===n.intf.value:o.value===n.intf.value)),s=it(()=>i.value?typeof i.value=="string"?i.value:i.value.text:""),r=o=>{n.intf.value=typeof o=="string"?o:o.value};return KI(e,()=>{t.value=!1}),{el:e,open:t,selectedItem:i,selectedText:s,setSelected:r}}}),O2t=["title"],I2t={class:"__selected"},M2t={class:"__text"},D2t={class:"__icon"},k2t={class:"__dropdown"},L2t={class:"item --header"},P2t=["onClick"];function U2t(n,e,t,i,s,r){const o=ht("i-arrow");return w(),M("div",{ref:"el",class:He(["baklava-select",{"--open":n.open}]),title:n.intf.name,onClick:e[0]||(e[0]=a=>n.open=!n.open)},[u("div",I2t,[u("div",M2t,fe(n.selectedText),1),u("div",D2t,[Oe(o)])]),Oe(ls,{name:"slide-fade"},{default:Je(()=>[ne(u("div",k2t,[u("div",L2t,fe(n.intf.name),1),(w(!0),M($e,null,dt(n.intf.items,(a,l)=>(w(),M("div",{key:l,class:He(["item",{"--active":a===n.selectedItem}]),onClick:d=>n.setSelected(a)},fe(typeof a=="string"?a:a.text),11,P2t))),128))],512),[[Ot,n.open]])]),_:1})],10,O2t)}const F2t=_n(N2t,[["render",U2t]]);class B2t extends tn{constructor(e,t,i){super(e,t),this.component=uc(F2t),this.items=i}}const G2t=pn({props:{intf:{type:Object,required:!0}}});function z2t(n,e,t,i,s,r){return w(),M("div",null,fe(n.intf.value),1)}const V2t=_n(G2t,[["render",z2t]]);class H2t extends tn{constructor(e,t){super(e,t),this.component=uc(V2t),this.setPort(!1)}}const q2t=pn({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(n,{emit:e}){return{v:it({get:()=>n.modelValue,set:i=>{e("update:modelValue",i)}})}}}),Y2t=["placeholder","title"];function $2t(n,e,t,i,s,r){return w(),M("div",null,[ne(u("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>n.v=o),type:"text",class:"baklava-input",placeholder:n.intf.name,title:n.intf.name},null,8,Y2t),[[Pe,n.v]])])}const W2t=_n(q2t,[["render",$2t]]);class Rc extends tn{constructor(){super(...arguments),this.component=uc(W2t)}}class ZI extends FI{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new Rc("Name","Input").setPort(!1)},this.outputs={placeholder:new tn("Connection",void 0)}}}class JI extends BI{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new Rc("Name","Output").setPort(!1),placeholder:new tn("Connection",void 0)},this.outputs={output:new tn("Output",void 0).setHidden(!0)}}}const eM="CREATE_SUBGRAPH",VR=[ka,La];function K2t(n,e,t){const i=()=>n.value.selectedNodes.filter(r=>!VR.includes(r.type)).length>0,s=()=>{const{viewModel:r}=Oi(),o=n.value,a=n.value.editor;if(o.selectedNodes.length===0)return;const l=o.selectedNodes.filter(S=>!VR.includes(S.type)),d=l.flatMap(S=>Object.values(S.inputs)),c=l.flatMap(S=>Object.values(S.outputs)),_=o.connections.filter(S=>!c.includes(S.from)&&d.includes(S.to)),f=o.connections.filter(S=>c.includes(S.from)&&!d.includes(S.to)),m=o.connections.filter(S=>c.includes(S.from)&&d.includes(S.to)),h=l.map(S=>S.save()),E=m.map(S=>({id:S.id,from:S.from.id,to:S.to.id})),b=new Map,{xLeft:g,xRight:v,yTop:y}=j2t(l);console.log(g,v,y);for(const[S,A]of _.entries()){const U=new ZI;U.inputs.name.value=A.to.name,h.push({...U.save(),position:{x:v-r.value.settings.nodes.defaultWidth-100,y:y+S*200}}),E.push({id:xu(),from:U.outputs.placeholder.id,to:A.to.id}),b.set(A.to.id,U.graphInterfaceId)}for(const[S,A]of f.entries()){const U=new JI;U.inputs.name.value=A.from.name,h.push({...U.save(),position:{x:g+100,y:y+S*200}}),E.push({id:xu(),from:A.from.id,to:U.inputs.placeholder.id}),b.set(A.from.id,U.graphInterfaceId)}const T=ei(new gp({connections:E,nodes:h,inputs:[],outputs:[]},a));a.addGraphTemplate(T);const C=a.nodeTypes.get(Pa(T));if(!C)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");const x=ei(new C.type);o.addNode(x);const O=Math.round(l.map(S=>S.position.x).reduce((S,A)=>S+A,0)/l.length),R=Math.round(l.map(S=>S.position.y).reduce((S,A)=>S+A,0)/l.length);x.position.x=O,x.position.y=R,_.forEach(S=>{o.removeConnection(S),o.addConnection(S.from,x.inputs[b.get(S.to.id)])}),f.forEach(S=>{o.removeConnection(S),o.addConnection(x.outputs[b.get(S.from.id)],S.to)}),l.forEach(S=>o.removeNode(S)),e.canExecuteCommand(dc)&&e.executeCommand(dc),t(T),n.value.panning={...o.panning},n.value.scaling=o.scaling};e.registerCommand(eM,{canExecute:i,execute:s})}function j2t(n){const e=n.reduce((s,r)=>{const o=r.position.x;return o{const o=r.position.y;return o{const o=r.position.x+r.width;return o>s?o:s},-1/0),xRight:e,yTop:t}}const HR="DELETE_NODES";function Q2t(n,e){e.registerCommand(HR,{canExecute:()=>n.value.selectedNodes.length>0,execute(){n.value.selectedNodes.forEach(t=>n.value.removeNode(t))}}),e.registerHotkey(["Delete"],HR)}const tM="SWITCH_TO_MAIN_GRAPH";function X2t(n,e,t){e.registerCommand(tM,{canExecute:()=>n.value!==n.value.editor.graph,execute:()=>{e.executeCommand(dc),t(n.value.editor.graph)}})}function Z2t(n,e,t){Q2t(n,e),K2t(n,e,t),S2t(n,e),X2t(n,e,t)}class qR{constructor(e,t){this.type=e,e==="addNode"?this.nodeId=t:this.nodeState=t}undo(e){this.type==="addNode"?this.removeNode(e):this.addNode(e)}redo(e){this.type==="addNode"&&this.nodeState?this.addNode(e):this.type==="removeNode"&&this.nodeId&&this.removeNode(e)}addNode(e){const t=e.editor.nodeTypes.get(this.nodeState.type);if(!t)return;const i=new t.type;e.addNode(i),i.load(this.nodeState),this.nodeId=i.id}removeNode(e){const t=e.nodes.find(i=>i.id===this.nodeId);t&&(this.nodeState=t.save(),e.removeNode(t))}}class YR{constructor(e,t){if(this.type=e,e==="addConnection")this.connectionId=t;else{const i=t;this.connectionState={id:i.id,from:i.from.id,to:i.to.id}}}undo(e){this.type==="addConnection"?this.removeConnection(e):this.addConnection(e)}redo(e){this.type==="addConnection"&&this.connectionState?this.addConnection(e):this.type==="removeConnection"&&this.connectionId&&this.removeConnection(e)}addConnection(e){const t=e.findNodeInterface(this.connectionState.from),i=e.findNodeInterface(this.connectionState.to);!t||!i||e.addConnection(t,i)}removeConnection(e){const t=e.connections.find(i=>i.id===this.connectionId);t&&(this.connectionState={id:t.id,from:t.from.id,to:t.to.id},e.removeConnection(t))}}class J2t{constructor(e){if(this.type="transaction",e.length===0)throw new Error("Can't create a transaction with no steps");this.steps=e}undo(e){for(let t=this.steps.length-1;t>=0;t--)this.steps[t].undo(e)}redo(e){for(let t=0;t{if(!r.value)if(a.value)l.value.push(b);else for(o.value!==s.value.length-1&&(s.value=s.value.slice(0,o.value+1)),s.value.push(b),o.value++;s.value.length>i.value;)s.value.shift()},c=()=>{a.value=!0},_=()=>{a.value=!1,l.value.length>0&&(d(new J2t(l.value)),l.value=[])},f=()=>s.value.length!==0&&o.value!==-1,m=()=>{f()&&(r.value=!0,s.value[o.value--].undo(n.value),r.value=!1)},h=()=>s.value.length!==0&&o.value{h()&&(r.value=!0,s.value[++o.value].redo(n.value),r.value=!1)};return qn(n,(b,g)=>{g&&(g.events.addNode.unsubscribe(t),g.events.removeNode.unsubscribe(t),g.events.addConnection.unsubscribe(t),g.events.removeConnection.unsubscribe(t)),b&&(b.events.addNode.subscribe(t,v=>{d(new qR("addNode",v.id))}),b.events.removeNode.subscribe(t,v=>{d(new qR("removeNode",v.save()))}),b.events.addConnection.subscribe(t,v=>{d(new YR("addConnection",v.id))}),b.events.removeConnection.subscribe(t,v=>{d(new YR("removeConnection",v))}))},{immediate:!0}),e.registerCommand(Tb,{canExecute:f,execute:m}),e.registerCommand(xb,{canExecute:h,execute:E}),e.registerCommand(nM,{canExecute:()=>!a.value,execute:c}),e.registerCommand(iM,{canExecute:()=>a.value,execute:_}),e.registerHotkey(["Control","z"],Tb),e.registerHotkey(["Control","y"],xb),ei({maxSteps:i})}const Cb="COPY",Rb="PASTE",tDt="CLEAR_CLIPBOARD";function nDt(n,e,t){const i=Symbol("ClipboardToken"),s=mt(""),r=mt(""),o=it(()=>!s.value),a=()=>{s.value="",r.value=""},l=()=>{const _=n.value.selectedNodes.flatMap(m=>[...Object.values(m.inputs),...Object.values(m.outputs)]),f=n.value.connections.filter(m=>_.includes(m.from)||_.includes(m.to)).map(m=>({from:m.from.id,to:m.to.id}));r.value=JSON.stringify(f),s.value=JSON.stringify(n.value.selectedNodes.map(m=>m.save()))},d=(_,f,m)=>{for(const h of _){let E;if((!m||m==="input")&&(E=Object.values(h.inputs).find(b=>b.id===f)),!E&&(!m||m==="output")&&(E=Object.values(h.outputs).find(b=>b.id===f)),E)return E}},c=()=>{if(o.value)return;const _=new Map,f=JSON.parse(s.value),m=JSON.parse(r.value),h=[],E=[],b=n.value;t.executeCommand(nM);for(const g of f){const v=e.value.nodeTypes.get(g.type);if(!v){console.warn(`Node type ${g.type} not registered`);return}const y=new v.type,T=y.id;h.push(y),y.hooks.beforeLoad.subscribe(i,C=>{const x=C;return x.position&&(x.position.x+=100,x.position.y+=100),y.hooks.beforeLoad.unsubscribe(i),x}),b.addNode(y),y.load({...g,id:T}),y.id=T,_.set(g.id,T);for(const C of Object.values(y.inputs)){const x=xu();_.set(C.id,x),C.id=x}for(const C of Object.values(y.outputs)){const x=xu();_.set(C.id,x),C.id=x}}for(const g of m){const v=d(h,_.get(g.from),"output"),y=d(h,_.get(g.to),"input");if(!v||!y)continue;const T=b.addConnection(v,y);T&&E.push(T)}return n.value.selectedNodes=h,t.executeCommand(iM),{newNodes:h,newConnections:E}};return t.registerCommand(Cb,{canExecute:()=>n.value.selectedNodes.length>0,execute:l}),t.registerHotkey(["Control","c"],Cb),t.registerCommand(Rb,{canExecute:()=>!o.value,execute:c}),t.registerHotkey(["Control","v"],Rb),t.registerCommand(tDt,{canExecute:()=>!0,execute:a}),ei({isEmpty:o})}const iDt="OPEN_SIDEBAR";function sDt(n,e){e.registerCommand(iDt,{execute:t=>{n.value.sidebar.nodeId=t,n.value.sidebar.visible=!0},canExecute:()=>!0})}function rDt(n,e){sDt(n,e)}const oDt={},aDt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},lDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),cDt=u("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),dDt=[lDt,cDt];function uDt(n,e){return w(),M("svg",aDt,dDt)}const pDt=_n(oDt,[["render",uDt]]),_Dt={},hDt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},fDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),mDt=u("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),gDt=[fDt,mDt];function bDt(n,e){return w(),M("svg",hDt,gDt)}const EDt=_n(_Dt,[["render",bDt]]),vDt={},yDt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},SDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),TDt=u("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),xDt=u("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),CDt=u("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),RDt=[SDt,TDt,xDt,CDt];function ADt(n,e){return w(),M("svg",yDt,RDt)}const wDt=_n(vDt,[["render",ADt]]),NDt={},ODt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},IDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),MDt=u("path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},null,-1),DDt=u("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),kDt=[IDt,MDt,DDt];function LDt(n,e){return w(),M("svg",ODt,kDt)}const PDt=_n(NDt,[["render",LDt]]),UDt={},FDt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},BDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),GDt=u("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),zDt=u("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"},null,-1),VDt=[BDt,GDt,zDt];function HDt(n,e){return w(),M("svg",FDt,VDt)}const qDt=_n(UDt,[["render",HDt]]),YDt={},$Dt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},WDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),KDt=u("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},null,-1),jDt=u("circle",{cx:"12",cy:"14",r:"2"},null,-1),QDt=u("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),XDt=[WDt,KDt,jDt,QDt];function ZDt(n,e){return w(),M("svg",$Dt,XDt)}const JDt=_n(YDt,[["render",ZDt]]),ekt={},tkt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},nkt=zu('',6),ikt=[nkt];function skt(n,e){return w(),M("svg",tkt,ikt)}const rkt=_n(ekt,[["render",skt]]),okt=pn({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:n}=Oi();return{viewModel:n}}}),akt=["disabled","title"];function lkt(n,e,t,i,s,r){return w(),M("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!n.viewModel.commandHandler.canExecuteCommand(n.command),title:n.title,onClick:e[0]||(e[0]=o=>n.viewModel.commandHandler.executeCommand(n.command))},[n.icon?(w(),Tt(Fu(n.icon),{key:0})):(w(),M($e,{key:1},[je(fe(n.title),1)],64))],8,akt)}const ckt=_n(okt,[["render",lkt]]),dkt=pn({components:{ToolbarButton:ckt},setup(){const{viewModel:n}=Oi();return{isSubgraph:it(()=>n.value.displayedGraph!==n.value.editor.graph),commands:[{command:Cb,title:"Copy",icon:qDt},{command:Rb,title:"Paste",icon:PDt},{command:Tb,title:"Undo",icon:pDt},{command:xb,title:"Redo",icon:EDt},{command:eM,title:"Create Subgraph",icon:rkt}],subgraphCommands:[{command:dc,title:"Save Subgraph",icon:JDt},{command:tM,title:"Back to Main Graph",icon:wDt}]}}}),ukt={class:"baklava-toolbar"};function pkt(n,e,t,i,s,r){const o=ht("toolbar-button");return w(),M("div",ukt,[(w(!0),M($e,null,dt(n.commands,a=>(w(),Tt(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),n.isSubgraph?(w(!0),M($e,{key:0},dt(n.subgraphCommands,a=>(w(),Tt(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):q("",!0)])}const _kt=_n(dkt,[["render",pkt]]),hkt={class:"connections-container"},fkt=pn({__name:"Editor",props:{viewModel:{}},setup(n){const e=n,t=Symbol("EditorToken"),i=jd(e,"viewModel");cMt(i);const s=mt(null);sa("editorEl",s);const r=it(()=>e.viewModel.displayedGraph.nodes),o=it(()=>e.viewModel.displayedGraph.nodes.map(O=>VI(jd(O,"position")))),a=it(()=>e.viewModel.displayedGraph.connections),l=it(()=>e.viewModel.displayedGraph.selectedNodes),d=dMt(),c=uMt(),_=pMt(i),f=it(()=>({...d.styles.value})),m=mt(0);e.viewModel.editor.hooks.load.subscribe(t,O=>(m.value++,O));const h=O=>{d.onPointerMove(O),c.onMouseMove(O)},E=O=>{O.button===0&&(O.target===s.value&&(T(),d.onPointerDown(O)),c.onMouseDown())},b=O=>{d.onPointerUp(O),c.onMouseUp()},g=O=>{O.key==="Tab"&&O.preventDefault(),e.viewModel.commandHandler.handleKeyDown(O)},v=O=>{e.viewModel.commandHandler.handleKeyUp(O)},y=O=>{["Control","Shift"].some(R=>e.viewModel.commandHandler.pressedKeys.includes(R))||T(),e.viewModel.displayedGraph.selectedNodes.push(O)},T=()=>{e.viewModel.displayedGraph.selectedNodes=[]},C=O=>{for(const R of e.viewModel.displayedGraph.selectedNodes){const S=r.value.indexOf(R),A=o.value[S];A.onPointerDown(O),document.addEventListener("pointermove",A.onPointerMove)}document.addEventListener("pointerup",x)},x=()=>{for(const O of e.viewModel.displayedGraph.selectedNodes){const R=r.value.indexOf(O),S=o.value[R];S.onPointerUp(),document.removeEventListener("pointermove",S.onPointerMove)}document.removeEventListener("pointerup",x)};return(O,R)=>(w(),M("div",{ref_key:"el",ref:s,tabindex:"-1",class:He(["baklava-editor",{"baklava-ignore-mouse":!!Ct(c).temporaryConnection.value||Ct(d).dragging.value,"--temporary-connection":!!Ct(c).temporaryConnection.value}]),onPointermove:Te(h,["self"]),onPointerdown:E,onPointerup:b,onWheel:R[1]||(R[1]=Te((...S)=>Ct(d).onMouseWheel&&Ct(d).onMouseWheel(...S),["self"])),onKeydown:g,onKeyup:v,onContextmenu:R[2]||(R[2]=Te((...S)=>Ct(_).open&&Ct(_).open(...S),["self","prevent"]))},[Dn(O.$slots,"background",{},()=>[Oe(fMt)]),Dn(O.$slots,"toolbar",{},()=>[Oe(_kt)]),Dn(O.$slots,"palette",{},()=>[Oe(g2t)]),(w(),M("svg",hkt,[(w(!0),M($e,null,dt(a.value,S=>(w(),M("g",{key:S.id+m.value.toString()},[Dn(O.$slots,"connection",{connection:S},()=>[Oe(JMt,{connection:S},null,8,["connection"])])]))),128)),Dn(O.$slots,"temporaryConnection",{temporaryConnection:Ct(c).temporaryConnection.value},()=>[Ct(c).temporaryConnection.value?(w(),Tt(n2t,{key:0,connection:Ct(c).temporaryConnection.value},null,8,["connection"])):q("",!0)])])),u("div",{class:"node-container",style:en(f.value)},[Oe(rs,{name:"fade"},{default:Je(()=>[(w(!0),M($e,null,dt(r.value,(S,A)=>Dn(O.$slots,"node",{key:S.id+m.value.toString(),node:S,selected:l.value.includes(S),dragging:o.value[A].dragging.value,onSelect:U=>y(S),onStartDrag:C},()=>[Oe($Mt,{node:S,selected:l.value.includes(S),dragging:o.value[A].dragging.value,onSelect:U=>y(S),onStartDrag:C},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),Dn(O.$slots,"sidebar",{},()=>[Oe(a2t)]),Dn(O.$slots,"minimap",{},()=>[O.viewModel.settings.enableMinimap?(w(),Tt(l2t,{key:0})):q("",!0)]),Dn(O.$slots,"contextMenu",{contextMenu:Ct(_)},()=>[O.viewModel.settings.contextMenu.enabled?(w(),Tt(hv,{key:0,modelValue:Ct(_).show.value,"onUpdate:modelValue":R[0]||(R[0]=S=>Ct(_).show.value=S),items:Ct(_).items.value,x:Ct(_).x.value,y:Ct(_).y.value,onClick:Ct(_).onClick},null,8,["modelValue","items","x","y","onClick"])):q("",!0)])],34))}}),mkt=["INPUT","TEXTAREA","SELECT"];function gkt(n){const e=mt([]),t=mt([]);return{pressedKeys:e,handleKeyDown:o=>{var a;e.value.includes(o.key)||e.value.push(o.key),!mkt.includes(((a=document.activeElement)==null?void 0:a.tagName)??"")&&t.value.forEach(l=>{l.keys.every(d=>e.value.includes(d))&&n(l.commandName)})},handleKeyUp:o=>{const a=e.value.indexOf(o.key);a>=0&&e.value.splice(a,1)},registerHotkey:(o,a)=>{t.value.push({keys:o,commandName:a})}}}const bkt=()=>{const n=mt(new Map),e=(r,o)=>{if(n.value.has(r))throw new Error(`Command "${r}" already exists`);n.value.set(r,o)},t=(r,o=!1,...a)=>{if(!n.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return}return n.value.get(r).execute(...a)},i=(r,o=!1,...a)=>{if(!n.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return!1}return n.value.get(r).canExecute(a)},s=gkt(t);return ei({registerCommand:e,executeCommand:t,canExecuteCommand:i,...s})},Ekt=n=>!(n instanceof Cc);function vkt(n,e){return{switchGraph:i=>{let s;if(Ekt(i))s=new Cc(n.value),i.createGraph(s);else{if(i!==n.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");s=i}e.value&&e.value!==n.value.graph&&e.value.destroy(),s.panning=s.panning??i.panning??{x:0,y:0},s.scaling=s.scaling??i.scaling??1,s.selectedNodes=s.selectedNodes??[],s.sidebar=s.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=s}}}function ykt(n,e){n.position=n.position??{x:0,y:0},n.disablePointerEvents=!1,n.twoColumn=n.twoColumn??!1,n.width=n.width??e.defaultWidth}const Skt=()=>({useStraightConnections:!1,enableMinimap:!1,background:{gridSize:100,gridDivision:5,subGridVisibleThreshold:.6},sidebar:{width:300,resizable:!0},displayValueOnHover:!1,nodes:{defaultWidth:200,maxWidth:320,minWidth:150,resizable:!1},contextMenu:{enabled:!0,additionalItems:[]}});function Tkt(n){const e=mt(n??new iMt),t=Symbol("ViewModelToken"),i=mt(null),s=o2(i),{switchGraph:r}=vkt(e,i),o=it(()=>s.value&&s.value!==e.value.graph),a=ei(Skt()),l=bkt(),d=eDt(s,l),c=nDt(s,e,l),_={renderNode:new li(null),renderInterface:new li(null)};return Z2t(s,l,r),rDt(s,l),qn(e,(f,m)=>{m&&(m.events.registerGraph.unsubscribe(t),m.graphEvents.beforeAddNode.unsubscribe(t),f.nodeHooks.beforeLoad.unsubscribe(t),f.nodeHooks.afterSave.unsubscribe(t),f.graphTemplateHooks.beforeLoad.unsubscribe(t),f.graphTemplateHooks.afterSave.unsubscribe(t),f.graph.hooks.load.unsubscribe(t),f.graph.hooks.save.unsubscribe(t)),f&&(f.nodeHooks.beforeLoad.subscribe(t,(h,E)=>(E.position=h.position??{x:0,y:0},E.width=h.width??a.nodes.defaultWidth,E.twoColumn=h.twoColumn??!1,h)),f.nodeHooks.afterSave.subscribe(t,(h,E)=>(h.position=E.position,h.width=E.width,h.twoColumn=E.twoColumn,h)),f.graphTemplateHooks.beforeLoad.subscribe(t,(h,E)=>(E.panning=h.panning,E.scaling=h.scaling,h)),f.graphTemplateHooks.afterSave.subscribe(t,(h,E)=>(h.panning=E.panning,h.scaling=E.scaling,h)),f.graph.hooks.load.subscribe(t,(h,E)=>(E.panning=h.panning,E.scaling=h.scaling,h)),f.graph.hooks.save.subscribe(t,(h,E)=>(h.panning=E.panning,h.scaling=E.scaling,h)),f.graphEvents.beforeAddNode.subscribe(t,h=>ykt(h,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(ZI,{category:"Subgraphs"}),e.value.registerNodeType(JI,{category:"Subgraphs"}),r(f.graph))},{immediate:!0}),ei({editor:e,displayedGraph:s,isSubgraph:o,settings:a,commandHandler:l,history:d,clipboard:c,hooks:_,switchGraph:r})}const xkt=el({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new tn("Request",""),agent_name:()=>new B2t("Personality","",Cu.state.config.personalities).setPort(!1)},outputs:{response:()=>new tn("Response","")},async calculate({request:n}){console.log(Cu.state.config.personalities);let e="";try{e=(await Me.post("/generate",{params:{text:n}})).data}catch(t){console.error(t)}return{display:e,response:e}}}),Ckt=el({type:"RAGNode",title:"RAG",inputs:{request:()=>new tn("Prompt",""),document_path:()=>new Rc("Document path","").setPort(!1)},outputs:{prompt:()=>new tn("Prompt with Data","")},async calculate({request:n,document_path:e}){let t="";try{t=(await Me.get("/rag",{params:{text:n,doc_path:e}})).data}catch(i){console.error(i)}return{response:t}}}),$R=el({type:"Task",title:"Task",inputs:{description:()=>new Rc("Task description","").setPort(!1)},outputs:{prompt:()=>new tn("Prompt")},calculate({description:n}){return{prompt:n}}}),WR=el({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new tn("Input","")},outputs:{response:()=>new H2t("Text","")},async calculate({request:n}){}}),KR=el({type:"LLMNode",title:"LLM",inputs:{request:()=>new tn("Request","")},outputs:{response:()=>new tn("Response","")},async calculate({request:n}){console.log(Cu.state.config.personalities);let e="";try{e=(await Me.post("/generate",{params:{text:n}})).data}catch(t){console.error(t)}return{display:e,response:e}}}),Rkt=el({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new tn("Question",""),outputs:()=>new Rc("choices, one per line","","").setPort(!1)},outputs:{response:()=>new tn("Response","")}}),Akt=pn({components:{"baklava-editor":fkt},setup(){const n=Tkt(),e=new lMt(n.editor);n.editor.registerNodeType(xkt),n.editor.registerNodeType($R),n.editor.registerNodeType(Ckt),n.editor.registerNodeType(WR),n.editor.registerNodeType(KR),n.editor.registerNodeType(Rkt);const t=Symbol();e.events.afterRun.subscribe(t,a=>{e.pause(),sMt(a,n.editor),e.resume()}),e.start();function i(a,l,d){const c=new a;return n.displayedGraph.addNode(c),c.position.x=l,c.position.y=d,c}const s=i($R,300,140),r=i(KR,550,140),o=i(WR,850,140);return n.displayedGraph.addConnection(s.outputs.prompt,r.inputs.request),n.displayedGraph.addConnection(r.outputs.response,o.inputs.text2display),{baklava:n,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),wkt={style:{width:"100vw",height:"100vh"}};function Nkt(n,e,t,i,s,r){const o=ht("baklava-editor");return w(),M("div",wkt,[Oe(o,{"view-model":n.baklava},null,8,["view-model"]),u("button",{onClick:e[0]||(e[0]=(...a)=>n.saveGraph&&n.saveGraph(...a))},"Save Graph"),u("button",{onClick:e[1]||(e[1]=(...a)=>n.loadGraph&&n.loadGraph(...a))},"Load Graph")])}const Okt=bt(Akt,[["render",Nkt]]),Ikt={},Mkt={style:{width:"100vw",height:"100vh"}},Dkt=["src"];function kkt(n,e,t,i,s,r){return w(),M("div",Mkt,[u("iframe",{src:n.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,Dkt)])}const Lkt=bt(Ikt,[["render",kkt]]),Pkt=YP({history:cP("/"),routes:[{path:"/comfyui_view/",name:"ComfyUI",component:Lkt},{path:"/playground/",name:"playground",component:vtt},{path:"/extensions/",name:"extensions",component:Itt},{path:"/help/",name:"help",component:Xtt},{path:"/settings/",name:"settings",component:kmt},{path:"/training/",name:"training",component:tgt},{path:"/quantizing/",name:"quantizing",component:dgt},{path:"/",name:"discussions",component:kxt},{path:"/",name:"interactive",component:QIt},{path:"/",name:"nodes",component:Okt}]});const bp=XD(vZe);console.log("Loaded main.js");function jR(n){const e={};for(const t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}const Cu=Tk({state(){return{currentTheme:"",personality_editor:null,showPersonalityEditor:!1,selectedPersonality:null,currentPersonConfig:{ai_name:"",ai_author:"",ai_category:"",ai_language:"",ai_description:"",ai_conditionning:"",ai_disclaimer:"",ai_icon:null},client_id:"",yesNoDialog:null,universalForm:null,toast:null,news:null,messageBox:null,api_get_req:null,startSpeechRecognition:null,ready:!1,loading_infos:"",loading_progress:0,version:"unknown",settingsChanged:!1,isConnected:!1,isModelOk:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],mountedExtensions:[],bindingsZoo:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],installedBindings:[],currentModel:null,currentBinding:null,extensionsZoo:[],databases:[]}},mutations:{setIsReady(n,e){n.ready=e},setIsConnected(n,e){n.isConnected=e},setIsModelOk(n,e){n.isModelOk=e},setIsGenerating(n,e){n.isGenerating=e},setConfig(n,e){n.config=e},setPersonalities(n,e){n.personalities=e},setMountedPers(n,e){n.mountedPers=e},setMountedPersArr(n,e){n.mountedPersArr=e},setMountedExtensions(n,e){n.mountedExtensions=e},setbindingsZoo(n,e){n.bindingsZoo=e},setModelsArr(n,e){n.modelsArr=e},setselectedModel(n,e){n.selectedModel=e},setDiskUsage(n,e){n.diskUsage=e},setRamUsage(n,e){n.ramUsage=e},setVramUsage(n,e){n.vramUsage=e},setModelsZoo(n,e){n.modelsZoo=e},setCurrentBinding(n,e){n.currentBinding=e},setCurrentModel(n,e){n.currentModel=e},setExtensionsZoo(n,e){n.extensionsZoo=e},setDatabases(n,e){n.databases=e},setTheme(n){this.currentTheme=n}},getters:{getIsConnected(n){return n.isConnected},getIsModelOk(n){return n.isModelOk},getIsGenerating(n){return n.isGenerating},getConfig(n){return n.config},getPersonalities(n){return n.personalities},getMountedPersArr(n){return n.mountedPersArr},getmmountedExtensions(n){return n.mountedExtensions},getMountedPers(n){return n.mountedPers},getbindingsZoo(n){return n.bindingsZoo},getModelsArr(n){return n.modelsArr},getDiskUsage(n){return n.diskUsage},getRamUsage(n){return n.ramUsage},getVramUsage(n){return n.vramUsage},getDatabasesList(n){return n.databases},getModelsZoo(n){return n.modelsZoo},getCyrrentBinding(n){return n.currentBinding},getCurrentModel(n){return n.currentModel},getExtensionsZoo(n){return n.extensionsZoo}},actions:{async getVersion(){try{let n=await Me.get("/get_lollms_webui_version",{});n&&(this.state.version=n.data,console.log("version res:",n),console.log("version :",this.state.version))}catch{console.log("Coudln't get version")}},async refreshConfig({commit:n}){console.log("Fetching configuration");try{const e=await _i("get_config");e.active_personality_id<0&&(e.active_personality_id=0);let t=e.personalities[e.active_personality_id].split("/");e.personality_category=t[0],e.personality_folder=t[1],e.extensions.length>0?e.extension_category=e.extensions[-1]:e.extension_category="ai_sensors",console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),n("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:n}){let e=await _i("list_databases");console.log("databases:",e),n("setDatabases",e)},async refreshPersonalitiesZoo({commit:n}){let e=[];const t=await _i("get_all_personalities"),i=Object.keys(t);console.log("Personalities recovered:"+this.state.config.personalities);for(let s=0;s{let d=!1;for(const _ of this.state.config.personalities)if(_.includes(r+"/"+l.folder))if(d=!0,_.includes(":")){const f=_.split(":");l.language=f[1]}else l.language=null;let c={};return c=l,c.category=r,c.full_path=r+"/"+l.folder,c.isMounted=d,c});e.length==0?e=a:e=e.concat(a)}e.sort((s,r)=>s.name.localeCompare(r.name)),n("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:n}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const t=[];for(let i=0;ia.full_path==s||a.full_path==r[0]);if(o>=0){let a=jR(this.state.personalities[o]);r.length>1&&(a.language=r[1]),a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(l=>l.full_path=="generic/lollms")])}else t.push(i),console.log("Couldn't load personality : ",s)}for(let i=t.length-1;i>=0;i--)console.log("Removing personality : ",this.state.config.personalities[t[i]]),this.state.config.personalities.splice(t[i],1),this.state.config.active_personality_id>t[i]&&(this.state.config.active_personality_id-=1);n("setMountedPersArr",e),this.state.mountedPers=this.state.personalities[this.state.personalities.findIndex(i=>i.full_path==this.state.config.personalities[this.state.config.active_personality_id]||i.full_path+":"+i.language==this.state.config.personalities[this.state.config.active_personality_id])]},async refreshBindings({commit:n}){let e=await _i("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(i=>i.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),n("setbindingsZoo",e);const t=e.findIndex(i=>i.name==this.state.config.binding_name);t!=-1&&n("setCurrentBinding",e[t])},async refreshModelsZoo({commit:n}){console.log("Fetching models");const t=(await Me.get("/get_available_models")).data.filter(i=>i.variants&&i.variants.length>0);console.log(`get_available_models: ${t}`),n("setModelsZoo",t)},async refreshModelStatus({commit:n}){let e=await _i("get_model_status");n("setIsModelOk",e.status)},async refreshModels({commit:n}){console.log("Fetching models");let e=await _i("list_models");console.log(`Found ${e}`);let t=await _i("get_active_model");console.log("Selected model ",t),t!=null&&n("setselectedModel",t.model),n("setModelsArr",e),console.log("setModelsArr",e),console.log("this.state.modelsZoo",this.state.modelsZoo),this.state.modelsZoo.map(s=>{s.isInstalled=e.includes(s.name)}),this.state.installedModels=this.state.modelsZoo.filter(s=>s.isInstalled);const i=this.state.modelsZoo.findIndex(s=>s.name==this.state.config.model_name);i!=-1&&n("setCurrentModel",this.state.modelsZoo[i])},async refreshExtensionsZoo({commit:n}){let e=[],t=await _i("list_extensions");const i=Object.keys(t);console.log("Extensions recovered:"+t);for(let s=0;s{let d=!1;for(const _ of this.state.config.extensions)_.includes(r+"/"+l.folder)&&(d=!0);let c={};return c=l,c.category=r,c.full_path=r+"/"+l.folder,c.isMounted=d,c});e.length==0?e=a:e=e.concat(a)}e.sort((s,r)=>s.name.localeCompare(r.name)),console.log("Done loading extensions"),n("setExtensionsZoo",e)},refreshmountedExtensions({commit:n}){console.log("Mounting extensions");let e=[];const t=[];for(let i=0;io.full_path==s);if(r>=0){let o=jR(this.state.config.extensions[r]);o&&e.push(o)}else t.push(i),console.log("Couldn't load extension : ",s)}for(let i=t.length-1;i>=0;i--)console.log("Removing extensions : ",this.state.config.extensions[t[i]]),this.state.config.extensions.splice(t[i],1);n("setMountedExtensions",e)},async refreshDiskUsage({commit:n}){this.state.diskUsage=await _i("disk_usage")},async refreshRamUsage({commit:n}){this.state.ramUsage=await _i("ram_usage")},async refreshVramUsage({commit:n}){const e=await _i("vram_usage"),t=[];if(e.nb_gpus>0){for(let s=0;s!!t.value),onPointerDown:l=>{t.value={x:l.pageX,y:l.pageY},i.value={x:n.value.x,y:n.value.y}},onPointerMove:l=>{if(t.value){const d=l.pageX-t.value.x,c=l.pageY-t.value.y;n.value.x=i.value.x+d/e.value.scaling,n.value.y=i.value.y+c/e.value.scaling}},onPointerUp:()=>{t.value=null,i.value=null}}}function HI(n,e,t){if(!e.template)return!1;if(Pa(e.template)===t)return!0;const i=n.graphTemplates.find(r=>Pa(r)===t);return i?i.nodes.filter(r=>r.type.startsWith(cc)).some(r=>HI(n,e,r.type)):!1}function qI(n){return it(()=>{const e=Array.from(n.value.editor.nodeTypes.entries()),t=new Set(e.map(([,s])=>s.category)),i=[];for(const s of t.values()){let r=e.filter(([,o])=>o.category===s);n.value.displayedGraph.template?r=r.filter(([o])=>!HI(n.value.editor,n.value.displayedGraph,o)):r=r.filter(([o])=>![ka,La].includes(o)),r.length>0&&i.push({name:s,nodeTypes:Object.fromEntries(r)})}return i.sort((s,r)=>s.name==="default"?-1:r.name==="default"||s.name>r.name?1:-1),i})}function YI(){const{graph:n}=Wi();return{transform:(t,i)=>{const s=t/n.value.scaling-n.value.panning.x,r=i/n.value.scaling-n.value.panning.y;return[s,r]}}}function pMt(){const{graph:n}=Wi();let e=[],t=-1,i={x:0,y:0};const s=it(()=>n.value.panning),r=VI(s),o=it(()=>({"transform-origin":"0 0",transform:`scale(${n.value.scaling}) translate(${n.value.panning.x}px, ${n.value.panning.y}px)`})),a=(m,h,E)=>{const b=[m/n.value.scaling-n.value.panning.x,h/n.value.scaling-n.value.panning.y],g=[m/E-n.value.panning.x,h/E-n.value.panning.y],v=[g[0]-b[0],g[1]-b[1]];n.value.panning.x+=v[0],n.value.panning.y+=v[1],n.value.scaling=E},l=m=>{m.preventDefault();let h=m.deltaY;m.deltaMode===1&&(h*=32);const E=n.value.scaling*(1-h/3e3);a(m.offsetX,m.offsetY,E)},d=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:o,...r,onPointerDown:m=>{if(e.push(m),r.onPointerDown(m),e.length===2){const{ax:h,ay:E,bx:b,by:g}=d();i={x:h+(b-h)/2,y:E+(g-E)/2}}},onPointerMove:m=>{for(let h=0;h0){const C=n.value.scaling*(1+(T-t)/500);a(i.x,i.y,C)}t=T}else r.onPointerMove(m)},onPointerUp:m=>{e=e.filter(h=>h.pointerId!==m.pointerId),t=-1,r.onPointerUp()},onMouseWheel:l}}var vi=(n=>(n[n.NONE=0]="NONE",n[n.ALLOWED=1]="ALLOWED",n[n.FORBIDDEN=2]="FORBIDDEN",n))(vi||{});const $I=Symbol();function _Mt(){const{graph:n}=Wi(),e=mt(null),t=mt(null),i=a=>{e.value&&(e.value.mx=a.offsetX/n.value.scaling-n.value.panning.x,e.value.my=a.offsetY/n.value.scaling-n.value.panning.y)},s=()=>{if(t.value){if(e.value)return;const a=n.value.connections.find(l=>l.to===t.value);t.value.isInput&&a?(e.value={status:vi.NONE,from:a.from},n.value.removeConnection(a)):e.value={status:vi.NONE,from:t.value},e.value.mx=void 0,e.value.my=void 0}},r=()=>{if(e.value&&t.value){if(e.value.from===t.value)return;n.value.addConnection(e.value.from,e.value.to)}e.value=null},o=a=>{if(t.value=a??null,a&&e.value){e.value.to=a;const l=n.value.checkConnection(e.value.from,e.value.to);if(e.value.status=l.connectionAllowed?vi.ALLOWED:vi.FORBIDDEN,l.connectionAllowed){const d=l.connectionsInDanger.map(c=>c.id);n.value.connections.forEach(c=>{d.includes(c.id)&&(c.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=vi.NONE,n.value.connections.forEach(l=>{l.isInDanger=!1}))};return sa($I,{temporaryConnection:e,hoveredOver:o}),{temporaryConnection:e,onMouseMove:i,onMouseDown:s,onMouseUp:r,hoveredOver:o}}function hMt(n){const e=mt(!1),t=mt(0),i=mt(0),s=qI(n),{transform:r}=YI(),o=it(()=>{let c=[];const _={};for(const m of s.value){const h=Object.entries(m.nodeTypes).map(([E,b])=>({label:b.title,value:"addNode:"+E}));m.name==="default"?c=h:_[m.name]=h}const f=[...Object.entries(_).map(([m,h])=>({label:m,submenu:h}))];return f.length>0&&c.length>0&&f.push({isDivider:!0}),f.push(...c),f}),a=it(()=>n.value.settings.contextMenu.additionalItems.length===0?o.value:[{label:"Add node",submenu:o.value},...n.value.settings.contextMenu.additionalItems.map(c=>"isDivider"in c||"submenu"in c?c:{label:c.label,value:"command:"+c.command,disabled:!n.value.commandHandler.canExecuteCommand(c.command)})]);function l(c){e.value=!0,t.value=c.offsetX,i.value=c.offsetY}function d(c){if(c.startsWith("addNode:")){const _=c.substring(8),f=n.value.editor.nodeTypes.get(_);if(!f)return;const m=ei(new f.type);n.value.displayedGraph.addNode(m);const[h,E]=r(t.value,i.value);m.position.x=h,m.position.y=E}else if(c.startsWith("command:")){const _=c.substring(8);n.value.commandHandler.canExecuteCommand(_)&&n.value.commandHandler.executeCommand(_)}}return{show:e,x:t,y:i,items:a,open:l,onClick:d}}const fMt=pn({setup(){const{viewModel:n}=Oi(),{graph:e}=Wi();return{styles:it(()=>{const i=n.value.settings.background,s=e.value.panning.x*e.value.scaling,r=e.value.panning.y*e.value.scaling,o=e.value.scaling*i.gridSize,a=o/i.gridDivision,l=`${o}px ${o}px, ${o}px ${o}px`,d=e.value.scaling>i.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${s}px top ${r}px`,backgroundSize:`${l} ${d}`}})}}}),_n=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t};function mMt(n,e,t,i,s,r){return w(),M("div",{class:"background",style:en(n.styles)},null,4)}const gMt=_n(fMt,[["render",mMt]]);function bMt(n){return iA()?(IM(n),!0):!1}function pv(n){return typeof n=="function"?n():Ct(n)}const WI=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const EMt=Object.prototype.toString,vMt=n=>EMt.call(n)==="[object Object]",qd=()=>{},yMt=SMt();function SMt(){var n,e;return WI&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function TMt(n,e,t=!1){return e.reduce((i,s)=>(s in n&&(!t||n[s]!==void 0)&&(i[s]=n[s]),i),{})}function xMt(n,e={}){if(!hn(n))return p2(n);const t=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const i in n.value)t[i]=u2(()=>({get(){return n.value[i]},set(s){var r;if((r=pv(e.replaceRef))!=null?r:!0)if(Array.isArray(n.value)){const a=[...n.value];a[i]=s,n.value=a}else{const a={...n.value,[i]:s};Object.setPrototypeOf(a,Object.getPrototypeOf(n.value)),n.value=a}else n.value[i]=s}}));return t}function Nl(n){var e;const t=pv(n);return(e=t==null?void 0:t.$el)!=null?e:t}const _v=WI?window:void 0;function Vl(...n){let e,t,i,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,s]=n,e=_v):[e,t,i,s]=n,!e)return qd;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const r=[],o=()=>{r.forEach(c=>c()),r.length=0},a=(c,_,f,m)=>(c.addEventListener(_,f,m),()=>c.removeEventListener(_,f,m)),l=qn(()=>[Nl(e),pv(s)],([c,_])=>{if(o(),!c)return;const f=vMt(_)?{..._}:_;r.push(...t.flatMap(m=>i.map(h=>a(c,m,h,f))))},{immediate:!0,flush:"post"}),d=()=>{l(),o()};return bMt(d),d}let FR=!1;function KI(n,e,t={}){const{window:i=_v,ignore:s=[],capture:r=!0,detectIframe:o=!1}=t;if(!i)return qd;yMt&&!FR&&(FR=!0,Array.from(i.document.body.children).forEach(f=>f.addEventListener("click",qd)),i.document.documentElement.addEventListener("click",qd));let a=!0;const l=f=>s.some(m=>{if(typeof m=="string")return Array.from(i.document.querySelectorAll(m)).some(h=>h===f.target||f.composedPath().includes(h));{const h=Nl(m);return h&&(f.target===h||f.composedPath().includes(h))}}),c=[Vl(i,"click",f=>{const m=Nl(n);if(!(!m||m===f.target||f.composedPath().includes(m))){if(f.detail===0&&(a=!l(f)),!a){a=!0;return}e(f)}},{passive:!0,capture:r}),Vl(i,"pointerdown",f=>{const m=Nl(n);a=!l(f)&&!!(m&&!f.composedPath().includes(m))},{passive:!0}),o&&Vl(i,"blur",f=>{setTimeout(()=>{var m;const h=Nl(n);((m=i.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(h!=null&&h.contains(i.document.activeElement))&&e(f)},0)})].filter(Boolean);return()=>c.forEach(f=>f())}const jI={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},CMt=Object.keys(jI);function RMt(n={}){const{target:e=_v}=n,t=mt(!1),i=mt(n.initialValue||{});Object.assign(i.value,jI,i.value);const s=r=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(r.pointerType))&&(i.value=TMt(r,CMt,!1))};if(e){const r={passive:!0};Vl(e,["pointerdown","pointermove","pointerup"],s,r),Vl(e,"pointerleave",()=>t.value=!1,r)}return{...xMt(i),isInside:t}}const AMt=["onMouseenter","onMouseleave","onClick"],wMt={class:"flex-fill"},NMt={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},OMt=u("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[u("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),IMt=[OMt],hv=pn({__name:"ContextMenu",props:{modelValue:{type:Boolean},items:{},x:{default:0},y:{default:0},isNested:{type:Boolean,default:!1},isFlipped:{default:()=>({x:!1,y:!1})},flippable:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(n,{emit:e}){const t=n,i=e;let s=null;const r=mt(null),o=mt(-1),a=mt(0),l=mt({x:!1,y:!1}),d=it(()=>t.flippable&&(l.value.x||t.isFlipped.x)),c=it(()=>t.flippable&&(l.value.y||t.isFlipped.y)),_=it(()=>{const v={};return t.isNested||(v.top=(c.value?t.y-a.value:t.y)+"px",v.left=t.x+"px"),v}),f=it(()=>({"--flipped-x":d.value,"--flipped-y":c.value,"--nested":t.isNested})),m=it(()=>t.items.map(v=>({...v,hover:!1})));qn([()=>t.y,()=>t.items],()=>{var v,y,T,C;a.value=t.items.length*30;const x=((y=(v=r.value)==null?void 0:v.parentElement)==null?void 0:y.offsetWidth)??0,O=((C=(T=r.value)==null?void 0:T.parentElement)==null?void 0:C.offsetHeight)??0;l.value.x=!t.isNested&&t.x>x*.75,l.value.y=!t.isNested&&t.y+a.value>O-20}),KI(r,()=>{t.modelValue&&i("update:modelValue",!1)});const h=v=>{!v.submenu&&v.value&&(i("click",v.value),i("update:modelValue",!1))},E=v=>{i("click",v),o.value=-1,t.isNested||i("update:modelValue",!1)},b=(v,y)=>{t.items[y].submenu&&(o.value=y,s!==null&&(clearTimeout(s),s=null))},g=(v,y)=>{t.items[y].submenu&&(s=window.setTimeout(()=>{o.value=-1,s=null},200))};return(v,y)=>{const T=ht("ContextMenu",!0);return w(),Tt(ls,{name:"slide-fade"},{default:Je(()=>[ne(u("div",{ref_key:"el",ref:r,class:He(["baklava-context-menu",f.value]),style:en(_.value)},[(w(!0),M($e,null,dt(m.value,(C,x)=>(w(),M($e,null,[C.isDivider?(w(),M("div",{key:`d-${x}`,class:"divider"})):(w(),M("div",{key:`i-${x}`,class:He(["item",{submenu:!!C.submenu,"--disabled":!!C.disabled}]),onMouseenter:O=>b(O,x),onMouseleave:O=>g(O,x),onClick:Te(O=>h(C),["stop","prevent"])},[u("div",wMt,fe(C.label),1),C.submenu?(w(),M("div",NMt,IMt)):q("",!0),C.submenu?(w(),Tt(T,{key:1,"model-value":o.value===x,items:C.submenu,"is-nested":!0,"is-flipped":{x:d.value,y:c.value},flippable:v.flippable,onClick:E},null,8,["model-value","items","is-flipped","flippable"])):q("",!0)],42,AMt))],64))),256))],6),[[Ot,v.modelValue]])]),_:1})}}}),MMt={},DMt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},kMt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),LMt=u("circle",{cx:"12",cy:"12",r:"1"},null,-1),PMt=u("circle",{cx:"12",cy:"19",r:"1"},null,-1),UMt=u("circle",{cx:"12",cy:"5",r:"1"},null,-1),FMt=[kMt,LMt,PMt,UMt];function BMt(n,e){return w(),M("svg",DMt,FMt)}const QI=_n(MMt,[["render",BMt]]),GMt=["id"],zMt={key:0,class:"__tooltip"},VMt={key:2,class:"align-middle"},BR=pn({__name:"NodeInterface",props:{node:{},intf:{}},setup(n){const e=(b,g=100)=>{const v=b!=null&&b.toString?b.toString():"";return v.length>g?v.slice(0,g)+"...":v},t=n,{viewModel:i}=Oi(),{hoveredOver:s,temporaryConnection:r}=Gi($I),o=mt(null),a=it(()=>t.intf.connectionCount>0),l=mt(!1),d=it(()=>i.value.settings.displayValueOnHover&&l.value),c=it(()=>({"--input":t.intf.isInput,"--output":!t.intf.isInput,"--connected":a.value})),_=it(()=>t.intf.component&&(!t.intf.isInput||!t.intf.port||t.intf.connectionCount===0)),f=()=>{l.value=!0,s(t.intf)},m=()=>{l.value=!1,s(void 0)},h=()=>{o.value&&i.value.hooks.renderInterface.execute({intf:t.intf,el:o.value})},E=()=>{const b=i.value.displayedGraph.sidebar;b.nodeId=t.node.id,b.optionName=t.intf.name,b.visible=!0};return qs(h),pc(h),(b,g)=>{var v;return w(),M("div",{id:b.intf.id,ref_key:"el",ref:o,class:He(["baklava-node-interface",c.value])},[b.intf.port?(w(),M("div",{key:0,class:He(["__port",{"--selected":((v=Ct(r))==null?void 0:v.from)===b.intf}]),onPointerover:f,onPointerout:m},[Dn(b.$slots,"portTooltip",{showTooltip:d.value},()=>[d.value===!0?(w(),M("span",zMt,fe(e(b.intf.value)),1)):q("",!0)])],34)):q("",!0),_.value?(w(),Tt(Fu(b.intf.component),{key:1,modelValue:b.intf.value,"onUpdate:modelValue":g[0]||(g[0]=y=>b.intf.value=y),node:b.node,intf:b.intf,onOpenSidebar:E},null,40,["modelValue","node","intf"])):(w(),M("span",VMt,fe(b.intf.name),1))],10,GMt)}}}),HMt=["id","data-node-type"],qMt={class:"__title-label"},YMt={class:"__menu"},$Mt={class:"__outputs"},WMt={class:"__inputs"},KMt=pn({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(n,{emit:e}){const t=n,i=e,{viewModel:s}=Oi(),{graph:r,switchGraph:o}=Wi(),a=mt(null),l=mt(!1),d=mt(""),c=mt(null),_=mt(!1),f=mt(!1),m=it(()=>{const U=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return t.node.type.startsWith(cc)&&U.push({value:"editSubgraph",label:"Edit Subgraph"}),U}),h=it(()=>({"--selected":t.selected,"--dragging":t.dragging,"--two-column":!!t.node.twoColumn})),E=it(()=>{var U,F;return{top:`${((U=t.node.position)==null?void 0:U.y)??0}px`,left:`${((F=t.node.position)==null?void 0:F.x)??0}px`,"--width":`${t.node.width??s.value.settings.nodes.defaultWidth}px`}}),b=it(()=>Object.values(t.node.inputs).filter(U=>!U.hidden)),g=it(()=>Object.values(t.node.outputs).filter(U=>!U.hidden)),v=()=>{i("select")},y=U=>{t.selected||v(),i("start-drag",U)},T=()=>{f.value=!0},C=async U=>{var F;switch(U){case"delete":r.value.removeNode(t.node);break;case"rename":d.value=t.node.title,l.value=!0,await Ve(),(F=c.value)==null||F.focus();break;case"editSubgraph":o(t.node.template);break}},x=()=>{t.node.title=d.value,l.value=!1},O=()=>{a.value&&s.value.hooks.renderNode.execute({node:t.node,el:a.value})},R=U=>{_.value=!0,U.preventDefault()},S=U=>{if(!_.value)return;const F=t.node.width+U.movementX/r.value.scaling,K=s.value.settings.nodes.minWidth,L=s.value.settings.nodes.maxWidth;t.node.width=Math.max(K,Math.min(L,F))},A=()=>{_.value=!1};return qs(()=>{O(),window.addEventListener("mousemove",S),window.addEventListener("mouseup",A)}),pc(O),Va(()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",A)}),(U,F)=>(w(),M("div",{id:U.node.id,ref_key:"el",ref:a,class:He(["baklava-node",h.value]),style:en(E.value),"data-node-type":U.node.type,onPointerdown:v},[Ct(s).settings.nodes.resizable?(w(),M("div",{key:0,class:"__resize-handle",onMousedown:R},null,32)):q("",!0),Dn(U.$slots,"title",{},()=>[u("div",{class:"__title",onPointerdown:Te(y,["self","stop"])},[l.value?ne((w(),M("input",{key:1,ref_key:"renameInputEl",ref:c,"onUpdate:modelValue":F[1]||(F[1]=K=>d.value=K),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:x,onKeydown:wr(x,["enter"])},null,544)),[[Pe,d.value]]):(w(),M($e,{key:0},[u("div",qMt,fe(U.node.title),1),u("div",YMt,[Oe(QI,{class:"--clickable",onClick:T}),Oe(hv,{modelValue:f.value,"onUpdate:modelValue":F[0]||(F[0]=K=>f.value=K),x:0,y:0,items:m.value,onClick:C},null,8,["modelValue","items"])])],64))],32)]),Dn(U.$slots,"content",{},()=>[u("div",{class:"__content",onKeydown:F[2]||(F[2]=wr(Te(()=>{},["stop"]),["delete"]))},[u("div",$Mt,[(w(!0),M($e,null,dt(g.value,K=>Dn(U.$slots,"nodeInterface",{key:K.id,type:"output",node:U.node,intf:K},()=>[Oe(BR,{node:U.node,intf:K},null,8,["node","intf"])])),128))]),u("div",WMt,[(w(!0),M($e,null,dt(b.value,K=>Dn(U.$slots,"nodeInterface",{key:K.id,type:"input",node:U.node,intf:K},()=>[Oe(BR,{node:U.node,intf:K},null,8,["node","intf"])])),128))])],32)])],46,HMt))}}),jMt=pn({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},state:{type:Number,default:vi.NONE},isTemporary:{type:Boolean,default:!1}},setup(n){const{viewModel:e}=Oi(),{graph:t}=Wi(),i=(o,a)=>{const l=(o+t.value.panning.x)*t.value.scaling,d=(a+t.value.panning.y)*t.value.scaling;return[l,d]},s=it(()=>{const[o,a]=i(n.x1,n.y1),[l,d]=i(n.x2,n.y2);if(e.value.settings.useStraightConnections)return`M ${o} ${a} L ${l} ${d}`;{const c=.3*Math.abs(o-l);return`M ${o} ${a} C ${o+c} ${a}, ${l-c} ${d}, ${l} ${d}`}}),r=it(()=>({"--temporary":n.isTemporary,"--allowed":n.state===vi.ALLOWED,"--forbidden":n.state===vi.FORBIDDEN}));return{d:s,classes:r}}}),QMt=["d"];function XMt(n,e,t,i,s,r){return w(),M("path",{class:He(["baklava-connection",n.classes]),d:n.d},null,10,QMt)}const XI=_n(jMt,[["render",XMt]]);function ZMt(n){return document.getElementById(n.id)}function Ua(n){const e=document.getElementById(n.id),t=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:t&&t.length>0?t[0]:null}}const JMt=pn({components:{"connection-view":XI},props:{connection:{type:Object,required:!0}},setup(n){const{graph:e}=Wi();let t;const i=mt({x1:0,y1:0,x2:0,y2:0}),s=it(()=>n.connection.isInDanger?vi.FORBIDDEN:vi.NONE),r=it(()=>{var d;return(d=e.value.findNodeById(n.connection.from.nodeId))==null?void 0:d.position}),o=it(()=>{var d;return(d=e.value.findNodeById(n.connection.to.nodeId))==null?void 0:d.position}),a=d=>d.node&&d.interface&&d.port?[d.node.offsetLeft+d.interface.offsetLeft+d.port.offsetLeft+d.port.clientWidth/2,d.node.offsetTop+d.interface.offsetTop+d.port.offsetTop+d.port.clientHeight/2]:[0,0],l=()=>{const d=Ua(n.connection.from),c=Ua(n.connection.to);d.node&&c.node&&(t||(t=new ResizeObserver(()=>{l()}),t.observe(d.node),t.observe(c.node)));const[_,f]=a(d),[m,h]=a(c);i.value={x1:_,y1:f,x2:m,y2:h}};return qs(async()=>{await Ve(),l()}),Va(()=>{t&&t.disconnect()}),qn([r,o],()=>l(),{deep:!0}),{d:i,state:s}}});function e2t(n,e,t,i,s,r){const o=ht("connection-view");return w(),Tt(o,{x1:n.d.x1,y1:n.d.y1,x2:n.d.x2,y2:n.d.y2,state:n.state},null,8,["x1","y1","x2","y2","state"])}const t2t=_n(JMt,[["render",e2t]]);function Tu(n){return n.node&&n.interface&&n.port?[n.node.offsetLeft+n.interface.offsetLeft+n.port.offsetLeft+n.port.clientWidth/2,n.node.offsetTop+n.interface.offsetTop+n.port.offsetTop+n.port.clientHeight/2]:[0,0]}const n2t=pn({components:{"connection-view":XI},props:{connection:{type:Object,required:!0}},setup(n){const e=it(()=>n.connection?n.connection.status:vi.NONE);return{d:it(()=>{if(!n.connection)return{input:[0,0],output:[0,0]};const i=Tu(Ua(n.connection.from)),s=n.connection.to?Tu(Ua(n.connection.to)):[n.connection.mx||i[0],n.connection.my||i[1]];return n.connection.from.isInput?{input:s,output:i}:{input:i,output:s}}),status:e}}});function i2t(n,e,t,i,s,r){const o=ht("connection-view");return w(),Tt(o,{x1:n.d.input[0],y1:n.d.input[1],x2:n.d.output[0],y2:n.d.output[1],state:n.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const s2t=_n(n2t,[["render",i2t]]),r2t=pn({setup(){const{viewModel:n}=Oi(),{graph:e}=Wi(),t=mt(null),i=jd(n.value.settings.sidebar,"width"),s=it(()=>n.value.settings.sidebar.resizable),r=it(()=>{const _=e.value.sidebar.nodeId;return e.value.nodes.find(f=>f.id===_)}),o=it(()=>({width:`${i.value}px`})),a=it(()=>r.value?[...Object.values(r.value.inputs),...Object.values(r.value.outputs)].filter(f=>f.displayInSidebar&&f.component):[]),l=()=>{e.value.sidebar.visible=!1},d=()=>{window.addEventListener("mousemove",c),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",c)},{once:!0})},c=_=>{var f,m;const h=((m=(f=t.value)==null?void 0:f.parentElement)==null?void 0:m.getBoundingClientRect().width)??500;let E=i.value-_.movementX;E<300?E=300:E>.9*h&&(E=.9*h),i.value=E};return{el:t,graph:e,resizable:s,node:r,styles:o,displayedInterfaces:a,startResize:d,close:l}}}),o2t={class:"__header"},a2t={class:"__node-name"};function l2t(n,e,t,i,s,r){return w(),M("div",{ref:"el",class:He(["baklava-sidebar",{"--open":n.graph.sidebar.visible}]),style:en(n.styles)},[n.resizable?(w(),M("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...o)=>n.startResize&&n.startResize(...o))},null,32)):q("",!0),u("div",o2t,[u("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...o)=>n.close&&n.close(...o))},"×"),u("div",a2t,[u("b",null,fe(n.node?n.node.title:""),1)])]),(w(!0),M($e,null,dt(n.displayedInterfaces,o=>(w(),M("div",{key:o.id,class:"__interface"},[(w(),Tt(Fu(o.component),{modelValue:o.value,"onUpdate:modelValue":a=>o.value=a,node:n.node,intf:o},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const c2t=_n(r2t,[["render",l2t]]),d2t=pn({__name:"Minimap",setup(n){const{viewModel:e}=Oi(),{graph:t}=Wi(),i=mt(null),s=mt(!1);let r,o=!1,a={x1:0,y1:0,x2:0,y2:0},l;const d=()=>{var x,O;if(!r)return;r.canvas.width=i.value.offsetWidth,r.canvas.height=i.value.offsetHeight;const R=new Map,S=new Map;for(const L of t.value.nodes){const H=ZMt(L),G=(H==null?void 0:H.offsetWidth)??0,P=(H==null?void 0:H.offsetHeight)??0,j=((x=L.position)==null?void 0:x.x)??0,Y=((O=L.position)==null?void 0:O.y)??0;R.set(L,{x1:j,y1:Y,x2:j+G,y2:Y+P}),S.set(L,H)}const A={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const L of R.values())L.x1A.x2&&(A.x2=L.x2),L.y2>A.y2&&(A.y2=L.y2);const U=50;A.x1-=U,A.y1-=U,A.x2+=U,A.y2+=U,a=A;const F=r.canvas.width/r.canvas.height,K=(a.x2-a.x1)/(a.y2-a.y1);if(F>K){const L=(F-K)*(a.y2-a.y1)*.5;a.x1-=L,a.x2+=L}else{const L=a.x2-a.x1,H=a.y2-a.y1,G=(L-F*H)/F*.5;a.y1-=G,a.y2+=G}r.clearRect(0,0,r.canvas.width,r.canvas.height),r.strokeStyle="white";for(const L of t.value.connections){const[H,G]=Tu(Ua(L.from)),[P,j]=Tu(Ua(L.to)),[Y,Q]=c(H,G),[ae,te]=c(P,j);if(r.beginPath(),r.moveTo(Y,Q),e.value.settings.useStraightConnections)r.lineTo(ae,te);else{const Z=.3*Math.abs(Y-ae);r.bezierCurveTo(Y+Z,Q,ae-Z,te,ae,te)}r.stroke()}r.strokeStyle="lightgray";for(const[L,H]of R.entries()){const[G,P]=c(H.x1,H.y1),[j,Y]=c(H.x2,H.y2);r.fillStyle=f(S.get(L)),r.beginPath(),r.rect(G,P,j-G,Y-P),r.fill(),r.stroke()}if(s.value){const L=h(),[H,G]=c(L.x1,L.y1),[P,j]=c(L.x2,L.y2);r.fillStyle="rgba(255, 255, 255, 0.2)",r.fillRect(H,G,P-H,j-G)}},c=(x,O)=>[(x-a.x1)/(a.x2-a.x1)*r.canvas.width,(O-a.y1)/(a.y2-a.y1)*r.canvas.height],_=(x,O)=>[x*(a.x2-a.x1)/r.canvas.width+a.x1,O*(a.y2-a.y1)/r.canvas.height+a.y1],f=x=>{if(x){const O=x.querySelector(".__content");if(O){const S=m(O);if(S)return S}const R=m(x);if(R)return R}return"gray"},m=x=>{const O=getComputedStyle(x).backgroundColor;if(O&&O!=="rgba(0, 0, 0, 0)")return O},h=()=>{const x=i.value.parentElement.offsetWidth,O=i.value.parentElement.offsetHeight,R=x/t.value.scaling-t.value.panning.x,S=O/t.value.scaling-t.value.panning.y;return{x1:-t.value.panning.x,y1:-t.value.panning.y,x2:R,y2:S}},E=x=>{x.button===0&&(o=!0,b(x))},b=x=>{if(o){const[O,R]=_(x.offsetX,x.offsetY),S=h(),A=(S.x2-S.x1)/2,U=(S.y2-S.y1)/2;t.value.panning.x=-(O-A),t.value.panning.y=-(R-U)}},g=()=>{o=!1},v=()=>{s.value=!0},y=()=>{s.value=!1,g()};qn([s,t.value.panning,()=>t.value.scaling,()=>t.value.connections.length],()=>{d()});const T=it(()=>t.value.nodes.map(x=>x.position)),C=it(()=>t.value.nodes.map(x=>x.width));return qn([T,C],()=>{d()},{deep:!0}),qs(()=>{r=i.value.getContext("2d"),r.imageSmoothingQuality="high",d(),l=setInterval(d,500)}),Va(()=>{clearInterval(l)}),(x,O)=>(w(),M("canvas",{ref_key:"canvas",ref:i,class:"baklava-minimap",onMouseenter:v,onMouseleave:y,onMousedown:Te(E,["self"]),onMousemove:Te(b,["self"]),onMouseup:g},null,544))}}),u2t=pn({components:{ContextMenu:hv,VerticalDots:QI},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(n){const{viewModel:e}=Oi(),{switchGraph:t}=Wi(),i=mt(!1),s=it(()=>n.type.startsWith(cc));return{showContextMenu:i,hasContextMenu:s,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{i.value=!0},onContextMenuClick:l=>{const d=n.type.substring(cc.length),c=e.value.editor.graphTemplates.find(_=>_.id===d);if(c)switch(l){case"editSubgraph":t(c);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(c);break}}}}}),p2t=["data-node-type"],_2t={class:"__title"},h2t={class:"__title-label"},f2t={key:0,class:"__menu"};function m2t(n,e,t,i,s,r){const o=ht("vertical-dots"),a=ht("context-menu");return w(),M("div",{class:"baklava-node --palette","data-node-type":n.type},[u("div",_2t,[u("div",h2t,fe(n.title),1),n.hasContextMenu?(w(),M("div",f2t,[Oe(o,{class:"--clickable",onPointerdown:e[0]||(e[0]=Te(()=>{},["stop","prevent"])),onClick:Te(n.openContextMenu,["stop","prevent"])},null,8,["onClick"]),Oe(a,{modelValue:n.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=l=>n.showContextMenu=l),x:-100,y:0,items:n.contextMenuItems,onClick:n.onContextMenuClick,onPointerdown:e[2]||(e[2]=Te(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):q("",!0)])],8,p2t)}const GR=_n(u2t,[["render",m2t]]),g2t={class:"baklava-node-palette"},b2t={key:0},E2t=pn({__name:"NodePalette",setup(n){const{viewModel:e}=Oi(),{x:t,y:i}=RMt(),{transform:s}=YI(),r=qI(e),o=Gi("editorEl"),a=mt(null),l=it(()=>{if(!a.value||!(o!=null&&o.value))return{};const{left:c,top:_}=o.value.getBoundingClientRect();return{top:`${i.value-_}px`,left:`${t.value-c}px`}}),d=(c,_)=>{a.value={type:c,nodeInformation:_};const f=()=>{const m=ei(new _.type);e.value.displayedGraph.addNode(m);const h=o.value.getBoundingClientRect(),[E,b]=s(t.value-h.left,i.value-h.top);m.position.x=E,m.position.y=b,a.value=null,document.removeEventListener("pointerup",f)};document.addEventListener("pointerup",f)};return(c,_)=>(w(),M($e,null,[u("div",g2t,[(w(!0),M($e,null,dt(Ct(r),f=>(w(),M("section",{key:f.name},[f.name!=="default"?(w(),M("h1",b2t,fe(f.name),1)):q("",!0),(w(!0),M($e,null,dt(f.nodeTypes,(m,h)=>(w(),Tt(GR,{key:h,type:h,title:m.title,onPointerdown:E=>d(h,m)},null,8,["type","title","onPointerdown"]))),128))]))),128))]),Oe(ls,{name:"fade"},{default:Je(()=>[a.value?(w(),M("div",{key:0,class:"baklava-dragged-node",style:en(l.value)},[Oe(GR,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):q("",!0)]),_:1})],64))}});let wd;const v2t=new Uint8Array(16);function y2t(){if(!wd&&(wd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!wd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wd(v2t)}const Cn=[];for(let n=0;n<256;++n)Cn.push((n+256).toString(16).slice(1));function S2t(n,e=0){return Cn[n[e+0]]+Cn[n[e+1]]+Cn[n[e+2]]+Cn[n[e+3]]+"-"+Cn[n[e+4]]+Cn[n[e+5]]+"-"+Cn[n[e+6]]+Cn[n[e+7]]+"-"+Cn[n[e+8]]+Cn[n[e+9]]+"-"+Cn[n[e+10]]+Cn[n[e+11]]+Cn[n[e+12]]+Cn[n[e+13]]+Cn[n[e+14]]+Cn[n[e+15]]}const T2t=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zR={randomUUID:T2t};function xu(n,e,t){if(zR.randomUUID&&!e&&!n)return zR.randomUUID();n=n||{};const i=n.random||(n.rng||y2t)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(let s=0;s<16;++s)e[t+s]=i[s];return e}return S2t(i)}const dc="SAVE_SUBGRAPH";function x2t(n,e){const t=()=>{const i=n.value;if(!i.template)throw new Error("Graph template property not set");i.template.update(i.save()),i.template.panning=i.panning,i.template.scaling=i.scaling};e.registerCommand(dc,{canExecute:()=>{var i;return n.value!==((i=n.value.editor)==null?void 0:i.graph)},execute:t})}const C2t={},R2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},A2t=u("polyline",{points:"6 9 12 15 18 9"},null,-1),w2t=[A2t];function N2t(n,e){return w(),M("svg",R2t,w2t)}const O2t=_n(C2t,[["render",N2t]]),I2t=pn({components:{"i-arrow":O2t},props:{intf:{type:Object,required:!0}},setup(n){const e=mt(null),t=mt(!1),i=it(()=>n.intf.items.find(o=>typeof o=="string"?o===n.intf.value:o.value===n.intf.value)),s=it(()=>i.value?typeof i.value=="string"?i.value:i.value.text:""),r=o=>{n.intf.value=typeof o=="string"?o:o.value};return KI(e,()=>{t.value=!1}),{el:e,open:t,selectedItem:i,selectedText:s,setSelected:r}}}),M2t=["title"],D2t={class:"__selected"},k2t={class:"__text"},L2t={class:"__icon"},P2t={class:"__dropdown"},U2t={class:"item --header"},F2t=["onClick"];function B2t(n,e,t,i,s,r){const o=ht("i-arrow");return w(),M("div",{ref:"el",class:He(["baklava-select",{"--open":n.open}]),title:n.intf.name,onClick:e[0]||(e[0]=a=>n.open=!n.open)},[u("div",D2t,[u("div",k2t,fe(n.selectedText),1),u("div",L2t,[Oe(o)])]),Oe(ls,{name:"slide-fade"},{default:Je(()=>[ne(u("div",P2t,[u("div",U2t,fe(n.intf.name),1),(w(!0),M($e,null,dt(n.intf.items,(a,l)=>(w(),M("div",{key:l,class:He(["item",{"--active":a===n.selectedItem}]),onClick:d=>n.setSelected(a)},fe(typeof a=="string"?a:a.text),11,F2t))),128))],512),[[Ot,n.open]])]),_:1})],10,M2t)}const G2t=_n(I2t,[["render",B2t]]);class z2t extends tn{constructor(e,t,i){super(e,t),this.component=uc(G2t),this.items=i}}const V2t=pn({props:{intf:{type:Object,required:!0}}});function H2t(n,e,t,i,s,r){return w(),M("div",null,fe(n.intf.value),1)}const q2t=_n(V2t,[["render",H2t]]);class Y2t extends tn{constructor(e,t){super(e,t),this.component=uc(q2t),this.setPort(!1)}}const $2t=pn({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(n,{emit:e}){return{v:it({get:()=>n.modelValue,set:i=>{e("update:modelValue",i)}})}}}),W2t=["placeholder","title"];function K2t(n,e,t,i,s,r){return w(),M("div",null,[ne(u("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>n.v=o),type:"text",class:"baklava-input",placeholder:n.intf.name,title:n.intf.name},null,8,W2t),[[Pe,n.v]])])}const j2t=_n($2t,[["render",K2t]]);class Rc extends tn{constructor(){super(...arguments),this.component=uc(j2t)}}class ZI extends FI{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new Rc("Name","Input").setPort(!1)},this.outputs={placeholder:new tn("Connection",void 0)}}}class JI extends BI{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new Rc("Name","Output").setPort(!1),placeholder:new tn("Connection",void 0)},this.outputs={output:new tn("Output",void 0).setHidden(!0)}}}const eM="CREATE_SUBGRAPH",VR=[ka,La];function Q2t(n,e,t){const i=()=>n.value.selectedNodes.filter(r=>!VR.includes(r.type)).length>0,s=()=>{const{viewModel:r}=Oi(),o=n.value,a=n.value.editor;if(o.selectedNodes.length===0)return;const l=o.selectedNodes.filter(S=>!VR.includes(S.type)),d=l.flatMap(S=>Object.values(S.inputs)),c=l.flatMap(S=>Object.values(S.outputs)),_=o.connections.filter(S=>!c.includes(S.from)&&d.includes(S.to)),f=o.connections.filter(S=>c.includes(S.from)&&!d.includes(S.to)),m=o.connections.filter(S=>c.includes(S.from)&&d.includes(S.to)),h=l.map(S=>S.save()),E=m.map(S=>({id:S.id,from:S.from.id,to:S.to.id})),b=new Map,{xLeft:g,xRight:v,yTop:y}=X2t(l);console.log(g,v,y);for(const[S,A]of _.entries()){const U=new ZI;U.inputs.name.value=A.to.name,h.push({...U.save(),position:{x:v-r.value.settings.nodes.defaultWidth-100,y:y+S*200}}),E.push({id:xu(),from:U.outputs.placeholder.id,to:A.to.id}),b.set(A.to.id,U.graphInterfaceId)}for(const[S,A]of f.entries()){const U=new JI;U.inputs.name.value=A.from.name,h.push({...U.save(),position:{x:g+100,y:y+S*200}}),E.push({id:xu(),from:A.from.id,to:U.inputs.placeholder.id}),b.set(A.from.id,U.graphInterfaceId)}const T=ei(new gp({connections:E,nodes:h,inputs:[],outputs:[]},a));a.addGraphTemplate(T);const C=a.nodeTypes.get(Pa(T));if(!C)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");const x=ei(new C.type);o.addNode(x);const O=Math.round(l.map(S=>S.position.x).reduce((S,A)=>S+A,0)/l.length),R=Math.round(l.map(S=>S.position.y).reduce((S,A)=>S+A,0)/l.length);x.position.x=O,x.position.y=R,_.forEach(S=>{o.removeConnection(S),o.addConnection(S.from,x.inputs[b.get(S.to.id)])}),f.forEach(S=>{o.removeConnection(S),o.addConnection(x.outputs[b.get(S.from.id)],S.to)}),l.forEach(S=>o.removeNode(S)),e.canExecuteCommand(dc)&&e.executeCommand(dc),t(T),n.value.panning={...o.panning},n.value.scaling=o.scaling};e.registerCommand(eM,{canExecute:i,execute:s})}function X2t(n){const e=n.reduce((s,r)=>{const o=r.position.x;return o{const o=r.position.y;return o{const o=r.position.x+r.width;return o>s?o:s},-1/0),xRight:e,yTop:t}}const HR="DELETE_NODES";function Z2t(n,e){e.registerCommand(HR,{canExecute:()=>n.value.selectedNodes.length>0,execute(){n.value.selectedNodes.forEach(t=>n.value.removeNode(t))}}),e.registerHotkey(["Delete"],HR)}const tM="SWITCH_TO_MAIN_GRAPH";function J2t(n,e,t){e.registerCommand(tM,{canExecute:()=>n.value!==n.value.editor.graph,execute:()=>{e.executeCommand(dc),t(n.value.editor.graph)}})}function eDt(n,e,t){Z2t(n,e),Q2t(n,e,t),x2t(n,e),J2t(n,e,t)}class qR{constructor(e,t){this.type=e,e==="addNode"?this.nodeId=t:this.nodeState=t}undo(e){this.type==="addNode"?this.removeNode(e):this.addNode(e)}redo(e){this.type==="addNode"&&this.nodeState?this.addNode(e):this.type==="removeNode"&&this.nodeId&&this.removeNode(e)}addNode(e){const t=e.editor.nodeTypes.get(this.nodeState.type);if(!t)return;const i=new t.type;e.addNode(i),i.load(this.nodeState),this.nodeId=i.id}removeNode(e){const t=e.nodes.find(i=>i.id===this.nodeId);t&&(this.nodeState=t.save(),e.removeNode(t))}}class YR{constructor(e,t){if(this.type=e,e==="addConnection")this.connectionId=t;else{const i=t;this.connectionState={id:i.id,from:i.from.id,to:i.to.id}}}undo(e){this.type==="addConnection"?this.removeConnection(e):this.addConnection(e)}redo(e){this.type==="addConnection"&&this.connectionState?this.addConnection(e):this.type==="removeConnection"&&this.connectionId&&this.removeConnection(e)}addConnection(e){const t=e.findNodeInterface(this.connectionState.from),i=e.findNodeInterface(this.connectionState.to);!t||!i||e.addConnection(t,i)}removeConnection(e){const t=e.connections.find(i=>i.id===this.connectionId);t&&(this.connectionState={id:t.id,from:t.from.id,to:t.to.id},e.removeConnection(t))}}class tDt{constructor(e){if(this.type="transaction",e.length===0)throw new Error("Can't create a transaction with no steps");this.steps=e}undo(e){for(let t=this.steps.length-1;t>=0;t--)this.steps[t].undo(e)}redo(e){for(let t=0;t{if(!r.value)if(a.value)l.value.push(b);else for(o.value!==s.value.length-1&&(s.value=s.value.slice(0,o.value+1)),s.value.push(b),o.value++;s.value.length>i.value;)s.value.shift()},c=()=>{a.value=!0},_=()=>{a.value=!1,l.value.length>0&&(d(new tDt(l.value)),l.value=[])},f=()=>s.value.length!==0&&o.value!==-1,m=()=>{f()&&(r.value=!0,s.value[o.value--].undo(n.value),r.value=!1)},h=()=>s.value.length!==0&&o.value{h()&&(r.value=!0,s.value[++o.value].redo(n.value),r.value=!1)};return qn(n,(b,g)=>{g&&(g.events.addNode.unsubscribe(t),g.events.removeNode.unsubscribe(t),g.events.addConnection.unsubscribe(t),g.events.removeConnection.unsubscribe(t)),b&&(b.events.addNode.subscribe(t,v=>{d(new qR("addNode",v.id))}),b.events.removeNode.subscribe(t,v=>{d(new qR("removeNode",v.save()))}),b.events.addConnection.subscribe(t,v=>{d(new YR("addConnection",v.id))}),b.events.removeConnection.subscribe(t,v=>{d(new YR("removeConnection",v))}))},{immediate:!0}),e.registerCommand(Tb,{canExecute:f,execute:m}),e.registerCommand(xb,{canExecute:h,execute:E}),e.registerCommand(nM,{canExecute:()=>!a.value,execute:c}),e.registerCommand(iM,{canExecute:()=>a.value,execute:_}),e.registerHotkey(["Control","z"],Tb),e.registerHotkey(["Control","y"],xb),ei({maxSteps:i})}const Cb="COPY",Rb="PASTE",iDt="CLEAR_CLIPBOARD";function sDt(n,e,t){const i=Symbol("ClipboardToken"),s=mt(""),r=mt(""),o=it(()=>!s.value),a=()=>{s.value="",r.value=""},l=()=>{const _=n.value.selectedNodes.flatMap(m=>[...Object.values(m.inputs),...Object.values(m.outputs)]),f=n.value.connections.filter(m=>_.includes(m.from)||_.includes(m.to)).map(m=>({from:m.from.id,to:m.to.id}));r.value=JSON.stringify(f),s.value=JSON.stringify(n.value.selectedNodes.map(m=>m.save()))},d=(_,f,m)=>{for(const h of _){let E;if((!m||m==="input")&&(E=Object.values(h.inputs).find(b=>b.id===f)),!E&&(!m||m==="output")&&(E=Object.values(h.outputs).find(b=>b.id===f)),E)return E}},c=()=>{if(o.value)return;const _=new Map,f=JSON.parse(s.value),m=JSON.parse(r.value),h=[],E=[],b=n.value;t.executeCommand(nM);for(const g of f){const v=e.value.nodeTypes.get(g.type);if(!v){console.warn(`Node type ${g.type} not registered`);return}const y=new v.type,T=y.id;h.push(y),y.hooks.beforeLoad.subscribe(i,C=>{const x=C;return x.position&&(x.position.x+=100,x.position.y+=100),y.hooks.beforeLoad.unsubscribe(i),x}),b.addNode(y),y.load({...g,id:T}),y.id=T,_.set(g.id,T);for(const C of Object.values(y.inputs)){const x=xu();_.set(C.id,x),C.id=x}for(const C of Object.values(y.outputs)){const x=xu();_.set(C.id,x),C.id=x}}for(const g of m){const v=d(h,_.get(g.from),"output"),y=d(h,_.get(g.to),"input");if(!v||!y)continue;const T=b.addConnection(v,y);T&&E.push(T)}return n.value.selectedNodes=h,t.executeCommand(iM),{newNodes:h,newConnections:E}};return t.registerCommand(Cb,{canExecute:()=>n.value.selectedNodes.length>0,execute:l}),t.registerHotkey(["Control","c"],Cb),t.registerCommand(Rb,{canExecute:()=>!o.value,execute:c}),t.registerHotkey(["Control","v"],Rb),t.registerCommand(iDt,{canExecute:()=>!0,execute:a}),ei({isEmpty:o})}const rDt="OPEN_SIDEBAR";function oDt(n,e){e.registerCommand(rDt,{execute:t=>{n.value.sidebar.nodeId=t,n.value.sidebar.visible=!0},canExecute:()=>!0})}function aDt(n,e){oDt(n,e)}const lDt={},cDt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},dDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),uDt=u("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),pDt=[dDt,uDt];function _Dt(n,e){return w(),M("svg",cDt,pDt)}const hDt=_n(lDt,[["render",_Dt]]),fDt={},mDt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},gDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),bDt=u("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),EDt=[gDt,bDt];function vDt(n,e){return w(),M("svg",mDt,EDt)}const yDt=_n(fDt,[["render",vDt]]),SDt={},TDt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},xDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),CDt=u("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),RDt=u("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),ADt=u("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),wDt=[xDt,CDt,RDt,ADt];function NDt(n,e){return w(),M("svg",TDt,wDt)}const ODt=_n(SDt,[["render",NDt]]),IDt={},MDt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},DDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),kDt=u("path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},null,-1),LDt=u("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),PDt=[DDt,kDt,LDt];function UDt(n,e){return w(),M("svg",MDt,PDt)}const FDt=_n(IDt,[["render",UDt]]),BDt={},GDt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},zDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),VDt=u("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),HDt=u("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"},null,-1),qDt=[zDt,VDt,HDt];function YDt(n,e){return w(),M("svg",GDt,qDt)}const $Dt=_n(BDt,[["render",YDt]]),WDt={},KDt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},jDt=u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),QDt=u("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},null,-1),XDt=u("circle",{cx:"12",cy:"14",r:"2"},null,-1),ZDt=u("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),JDt=[jDt,QDt,XDt,ZDt];function ekt(n,e){return w(),M("svg",KDt,JDt)}const tkt=_n(WDt,[["render",ekt]]),nkt={},ikt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},skt=zu('',6),rkt=[skt];function okt(n,e){return w(),M("svg",ikt,rkt)}const akt=_n(nkt,[["render",okt]]),lkt=pn({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:n}=Oi();return{viewModel:n}}}),ckt=["disabled","title"];function dkt(n,e,t,i,s,r){return w(),M("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!n.viewModel.commandHandler.canExecuteCommand(n.command),title:n.title,onClick:e[0]||(e[0]=o=>n.viewModel.commandHandler.executeCommand(n.command))},[n.icon?(w(),Tt(Fu(n.icon),{key:0})):(w(),M($e,{key:1},[je(fe(n.title),1)],64))],8,ckt)}const ukt=_n(lkt,[["render",dkt]]),pkt=pn({components:{ToolbarButton:ukt},setup(){const{viewModel:n}=Oi();return{isSubgraph:it(()=>n.value.displayedGraph!==n.value.editor.graph),commands:[{command:Cb,title:"Copy",icon:$Dt},{command:Rb,title:"Paste",icon:FDt},{command:Tb,title:"Undo",icon:hDt},{command:xb,title:"Redo",icon:yDt},{command:eM,title:"Create Subgraph",icon:akt}],subgraphCommands:[{command:dc,title:"Save Subgraph",icon:tkt},{command:tM,title:"Back to Main Graph",icon:ODt}]}}}),_kt={class:"baklava-toolbar"};function hkt(n,e,t,i,s,r){const o=ht("toolbar-button");return w(),M("div",_kt,[(w(!0),M($e,null,dt(n.commands,a=>(w(),Tt(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),n.isSubgraph?(w(!0),M($e,{key:0},dt(n.subgraphCommands,a=>(w(),Tt(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):q("",!0)])}const fkt=_n(pkt,[["render",hkt]]),mkt={class:"connections-container"},gkt=pn({__name:"Editor",props:{viewModel:{}},setup(n){const e=n,t=Symbol("EditorToken"),i=jd(e,"viewModel");uMt(i);const s=mt(null);sa("editorEl",s);const r=it(()=>e.viewModel.displayedGraph.nodes),o=it(()=>e.viewModel.displayedGraph.nodes.map(O=>VI(jd(O,"position")))),a=it(()=>e.viewModel.displayedGraph.connections),l=it(()=>e.viewModel.displayedGraph.selectedNodes),d=pMt(),c=_Mt(),_=hMt(i),f=it(()=>({...d.styles.value})),m=mt(0);e.viewModel.editor.hooks.load.subscribe(t,O=>(m.value++,O));const h=O=>{d.onPointerMove(O),c.onMouseMove(O)},E=O=>{O.button===0&&(O.target===s.value&&(T(),d.onPointerDown(O)),c.onMouseDown())},b=O=>{d.onPointerUp(O),c.onMouseUp()},g=O=>{O.key==="Tab"&&O.preventDefault(),e.viewModel.commandHandler.handleKeyDown(O)},v=O=>{e.viewModel.commandHandler.handleKeyUp(O)},y=O=>{["Control","Shift"].some(R=>e.viewModel.commandHandler.pressedKeys.includes(R))||T(),e.viewModel.displayedGraph.selectedNodes.push(O)},T=()=>{e.viewModel.displayedGraph.selectedNodes=[]},C=O=>{for(const R of e.viewModel.displayedGraph.selectedNodes){const S=r.value.indexOf(R),A=o.value[S];A.onPointerDown(O),document.addEventListener("pointermove",A.onPointerMove)}document.addEventListener("pointerup",x)},x=()=>{for(const O of e.viewModel.displayedGraph.selectedNodes){const R=r.value.indexOf(O),S=o.value[R];S.onPointerUp(),document.removeEventListener("pointermove",S.onPointerMove)}document.removeEventListener("pointerup",x)};return(O,R)=>(w(),M("div",{ref_key:"el",ref:s,tabindex:"-1",class:He(["baklava-editor",{"baklava-ignore-mouse":!!Ct(c).temporaryConnection.value||Ct(d).dragging.value,"--temporary-connection":!!Ct(c).temporaryConnection.value}]),onPointermove:Te(h,["self"]),onPointerdown:E,onPointerup:b,onWheel:R[1]||(R[1]=Te((...S)=>Ct(d).onMouseWheel&&Ct(d).onMouseWheel(...S),["self"])),onKeydown:g,onKeyup:v,onContextmenu:R[2]||(R[2]=Te((...S)=>Ct(_).open&&Ct(_).open(...S),["self","prevent"]))},[Dn(O.$slots,"background",{},()=>[Oe(gMt)]),Dn(O.$slots,"toolbar",{},()=>[Oe(fkt)]),Dn(O.$slots,"palette",{},()=>[Oe(E2t)]),(w(),M("svg",mkt,[(w(!0),M($e,null,dt(a.value,S=>(w(),M("g",{key:S.id+m.value.toString()},[Dn(O.$slots,"connection",{connection:S},()=>[Oe(t2t,{connection:S},null,8,["connection"])])]))),128)),Dn(O.$slots,"temporaryConnection",{temporaryConnection:Ct(c).temporaryConnection.value},()=>[Ct(c).temporaryConnection.value?(w(),Tt(s2t,{key:0,connection:Ct(c).temporaryConnection.value},null,8,["connection"])):q("",!0)])])),u("div",{class:"node-container",style:en(f.value)},[Oe(rs,{name:"fade"},{default:Je(()=>[(w(!0),M($e,null,dt(r.value,(S,A)=>Dn(O.$slots,"node",{key:S.id+m.value.toString(),node:S,selected:l.value.includes(S),dragging:o.value[A].dragging.value,onSelect:U=>y(S),onStartDrag:C},()=>[Oe(KMt,{node:S,selected:l.value.includes(S),dragging:o.value[A].dragging.value,onSelect:U=>y(S),onStartDrag:C},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),Dn(O.$slots,"sidebar",{},()=>[Oe(c2t)]),Dn(O.$slots,"minimap",{},()=>[O.viewModel.settings.enableMinimap?(w(),Tt(d2t,{key:0})):q("",!0)]),Dn(O.$slots,"contextMenu",{contextMenu:Ct(_)},()=>[O.viewModel.settings.contextMenu.enabled?(w(),Tt(hv,{key:0,modelValue:Ct(_).show.value,"onUpdate:modelValue":R[0]||(R[0]=S=>Ct(_).show.value=S),items:Ct(_).items.value,x:Ct(_).x.value,y:Ct(_).y.value,onClick:Ct(_).onClick},null,8,["modelValue","items","x","y","onClick"])):q("",!0)])],34))}}),bkt=["INPUT","TEXTAREA","SELECT"];function Ekt(n){const e=mt([]),t=mt([]);return{pressedKeys:e,handleKeyDown:o=>{var a;e.value.includes(o.key)||e.value.push(o.key),!bkt.includes(((a=document.activeElement)==null?void 0:a.tagName)??"")&&t.value.forEach(l=>{l.keys.every(d=>e.value.includes(d))&&n(l.commandName)})},handleKeyUp:o=>{const a=e.value.indexOf(o.key);a>=0&&e.value.splice(a,1)},registerHotkey:(o,a)=>{t.value.push({keys:o,commandName:a})}}}const vkt=()=>{const n=mt(new Map),e=(r,o)=>{if(n.value.has(r))throw new Error(`Command "${r}" already exists`);n.value.set(r,o)},t=(r,o=!1,...a)=>{if(!n.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return}return n.value.get(r).execute(...a)},i=(r,o=!1,...a)=>{if(!n.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return!1}return n.value.get(r).canExecute(a)},s=Ekt(t);return ei({registerCommand:e,executeCommand:t,canExecuteCommand:i,...s})},ykt=n=>!(n instanceof Cc);function Skt(n,e){return{switchGraph:i=>{let s;if(ykt(i))s=new Cc(n.value),i.createGraph(s);else{if(i!==n.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");s=i}e.value&&e.value!==n.value.graph&&e.value.destroy(),s.panning=s.panning??i.panning??{x:0,y:0},s.scaling=s.scaling??i.scaling??1,s.selectedNodes=s.selectedNodes??[],s.sidebar=s.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=s}}}function Tkt(n,e){n.position=n.position??{x:0,y:0},n.disablePointerEvents=!1,n.twoColumn=n.twoColumn??!1,n.width=n.width??e.defaultWidth}const xkt=()=>({useStraightConnections:!1,enableMinimap:!1,background:{gridSize:100,gridDivision:5,subGridVisibleThreshold:.6},sidebar:{width:300,resizable:!0},displayValueOnHover:!1,nodes:{defaultWidth:200,maxWidth:320,minWidth:150,resizable:!1},contextMenu:{enabled:!0,additionalItems:[]}});function Ckt(n){const e=mt(n??new rMt),t=Symbol("ViewModelToken"),i=mt(null),s=o2(i),{switchGraph:r}=Skt(e,i),o=it(()=>s.value&&s.value!==e.value.graph),a=ei(xkt()),l=vkt(),d=nDt(s,l),c=sDt(s,e,l),_={renderNode:new li(null),renderInterface:new li(null)};return eDt(s,l,r),aDt(s,l),qn(e,(f,m)=>{m&&(m.events.registerGraph.unsubscribe(t),m.graphEvents.beforeAddNode.unsubscribe(t),f.nodeHooks.beforeLoad.unsubscribe(t),f.nodeHooks.afterSave.unsubscribe(t),f.graphTemplateHooks.beforeLoad.unsubscribe(t),f.graphTemplateHooks.afterSave.unsubscribe(t),f.graph.hooks.load.unsubscribe(t),f.graph.hooks.save.unsubscribe(t)),f&&(f.nodeHooks.beforeLoad.subscribe(t,(h,E)=>(E.position=h.position??{x:0,y:0},E.width=h.width??a.nodes.defaultWidth,E.twoColumn=h.twoColumn??!1,h)),f.nodeHooks.afterSave.subscribe(t,(h,E)=>(h.position=E.position,h.width=E.width,h.twoColumn=E.twoColumn,h)),f.graphTemplateHooks.beforeLoad.subscribe(t,(h,E)=>(E.panning=h.panning,E.scaling=h.scaling,h)),f.graphTemplateHooks.afterSave.subscribe(t,(h,E)=>(h.panning=E.panning,h.scaling=E.scaling,h)),f.graph.hooks.load.subscribe(t,(h,E)=>(E.panning=h.panning,E.scaling=h.scaling,h)),f.graph.hooks.save.subscribe(t,(h,E)=>(h.panning=E.panning,h.scaling=E.scaling,h)),f.graphEvents.beforeAddNode.subscribe(t,h=>Tkt(h,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(ZI,{category:"Subgraphs"}),e.value.registerNodeType(JI,{category:"Subgraphs"}),r(f.graph))},{immediate:!0}),ei({editor:e,displayedGraph:s,isSubgraph:o,settings:a,commandHandler:l,history:d,clipboard:c,hooks:_,switchGraph:r})}const Rkt=el({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new tn("Request",""),agent_name:()=>new z2t("Personality","",Cu.state.config.personalities).setPort(!1)},outputs:{response:()=>new tn("Response","")},async calculate({request:n}){console.log(Cu.state.config.personalities);let e="";try{e=(await Me.post("/generate",{params:{text:n}})).data}catch(t){console.error(t)}return{display:e,response:e}}}),Akt=el({type:"RAGNode",title:"RAG",inputs:{request:()=>new tn("Prompt",""),document_path:()=>new Rc("Document path","").setPort(!1)},outputs:{prompt:()=>new tn("Prompt with Data","")},async calculate({request:n,document_path:e}){let t="";try{t=(await Me.get("/rag",{params:{text:n,doc_path:e}})).data}catch(i){console.error(i)}return{response:t}}}),$R=el({type:"Task",title:"Task",inputs:{description:()=>new Rc("Task description","").setPort(!1)},outputs:{prompt:()=>new tn("Prompt")},calculate({description:n}){return{prompt:n}}}),WR=el({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new tn("Input","")},outputs:{response:()=>new Y2t("Text","")},async calculate({request:n}){}}),KR=el({type:"LLMNode",title:"LLM",inputs:{request:()=>new tn("Request","")},outputs:{response:()=>new tn("Response","")},async calculate({request:n}){console.log(Cu.state.config.personalities);let e="";try{e=(await Me.post("/generate",{params:{text:n}})).data}catch(t){console.error(t)}return{display:e,response:e}}}),wkt=el({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new tn("Question",""),outputs:()=>new Rc("choices, one per line","","").setPort(!1)},outputs:{response:()=>new tn("Response","")}}),Nkt=pn({components:{"baklava-editor":gkt},setup(){const n=Ckt(),e=new dMt(n.editor);n.editor.registerNodeType(Rkt),n.editor.registerNodeType($R),n.editor.registerNodeType(Akt),n.editor.registerNodeType(WR),n.editor.registerNodeType(KR),n.editor.registerNodeType(wkt);const t=Symbol();e.events.afterRun.subscribe(t,a=>{e.pause(),oMt(a,n.editor),e.resume()}),e.start();function i(a,l,d){const c=new a;return n.displayedGraph.addNode(c),c.position.x=l,c.position.y=d,c}const s=i($R,300,140),r=i(KR,550,140),o=i(WR,850,140);return n.displayedGraph.addConnection(s.outputs.prompt,r.inputs.request),n.displayedGraph.addConnection(r.outputs.response,o.inputs.text2display),{baklava:n,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),Okt={style:{width:"100vw",height:"100vh"}};function Ikt(n,e,t,i,s,r){const o=ht("baklava-editor");return w(),M("div",Okt,[Oe(o,{"view-model":n.baklava},null,8,["view-model"]),u("button",{onClick:e[0]||(e[0]=(...a)=>n.saveGraph&&n.saveGraph(...a))},"Save Graph"),u("button",{onClick:e[1]||(e[1]=(...a)=>n.loadGraph&&n.loadGraph(...a))},"Load Graph")])}const Mkt=bt(Nkt,[["render",Ikt]]),Dkt={},kkt={style:{width:"100vw",height:"100vh"}},Lkt=["src"];function Pkt(n,e,t,i,s,r){return w(),M("div",kkt,[u("iframe",{src:n.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,Lkt)])}const Ukt=bt(Dkt,[["render",Pkt]]),Fkt=YP({history:cP("/"),routes:[{path:"/comfyui_view/",name:"ComfyUI",component:Ukt},{path:"/playground/",name:"playground",component:vtt},{path:"/extensions/",name:"extensions",component:Itt},{path:"/help/",name:"help",component:Xtt},{path:"/settings/",name:"settings",component:Pmt},{path:"/training/",name:"training",component:igt},{path:"/quantizing/",name:"quantizing",component:pgt},{path:"/",name:"discussions",component:Pxt},{path:"/",name:"interactive",component:ZIt},{path:"/",name:"nodes",component:Mkt}]});const bp=XD(vZe);console.log("Loaded main.js");function jR(n){const e={};for(const t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}const Cu=Tk({state(){return{currentTheme:"",personality_editor:null,showPersonalityEditor:!1,selectedPersonality:null,currentPersonConfig:{ai_name:"",ai_author:"",ai_category:"",ai_language:"",ai_description:"",ai_conditionning:"",ai_disclaimer:"",ai_icon:null},client_id:"",yesNoDialog:null,universalForm:null,toast:null,news:null,messageBox:null,api_get_req:null,startSpeechRecognition:null,ready:!1,loading_infos:"",loading_progress:0,version:"unknown",settingsChanged:!1,isConnected:!1,isModelOk:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],mountedExtensions:[],bindingsZoo:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],installedBindings:[],currentModel:null,currentBinding:null,extensionsZoo:[],databases:[]}},mutations:{setIsReady(n,e){n.ready=e},setIsConnected(n,e){n.isConnected=e},setIsModelOk(n,e){n.isModelOk=e},setIsGenerating(n,e){n.isGenerating=e},setConfig(n,e){n.config=e},setPersonalities(n,e){n.personalities=e},setMountedPers(n,e){n.mountedPers=e},setMountedPersArr(n,e){n.mountedPersArr=e},setMountedExtensions(n,e){n.mountedExtensions=e},setbindingsZoo(n,e){n.bindingsZoo=e},setModelsArr(n,e){n.modelsArr=e},setselectedModel(n,e){n.selectedModel=e},setDiskUsage(n,e){n.diskUsage=e},setRamUsage(n,e){n.ramUsage=e},setVramUsage(n,e){n.vramUsage=e},setModelsZoo(n,e){n.modelsZoo=e},setCurrentBinding(n,e){n.currentBinding=e},setCurrentModel(n,e){n.currentModel=e},setExtensionsZoo(n,e){n.extensionsZoo=e},setDatabases(n,e){n.databases=e},setTheme(n){this.currentTheme=n}},getters:{getIsConnected(n){return n.isConnected},getIsModelOk(n){return n.isModelOk},getIsGenerating(n){return n.isGenerating},getConfig(n){return n.config},getPersonalities(n){return n.personalities},getMountedPersArr(n){return n.mountedPersArr},getmmountedExtensions(n){return n.mountedExtensions},getMountedPers(n){return n.mountedPers},getbindingsZoo(n){return n.bindingsZoo},getModelsArr(n){return n.modelsArr},getDiskUsage(n){return n.diskUsage},getRamUsage(n){return n.ramUsage},getVramUsage(n){return n.vramUsage},getDatabasesList(n){return n.databases},getModelsZoo(n){return n.modelsZoo},getCyrrentBinding(n){return n.currentBinding},getCurrentModel(n){return n.currentModel},getExtensionsZoo(n){return n.extensionsZoo}},actions:{async getVersion(){try{let n=await Me.get("/get_lollms_webui_version",{});n&&(this.state.version=n.data,console.log("version res:",n),console.log("version :",this.state.version))}catch{console.log("Coudln't get version")}},async refreshConfig({commit:n}){console.log("Fetching configuration");try{const e=await _i("get_config");e.active_personality_id<0&&(e.active_personality_id=0);let t=e.personalities[e.active_personality_id].split("/");e.personality_category=t[0],e.personality_folder=t[1],e.extensions.length>0?e.extension_category=e.extensions[-1]:e.extension_category="ai_sensors",console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),n("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:n}){let e=await _i("list_databases");console.log("databases:",e),n("setDatabases",e)},async refreshPersonalitiesZoo({commit:n}){let e=[];const t=await _i("get_all_personalities"),i=Object.keys(t);console.log("Personalities recovered:"+this.state.config.personalities);for(let s=0;s{let d=!1;for(const _ of this.state.config.personalities)if(_.includes(r+"/"+l.folder))if(d=!0,_.includes(":")){const f=_.split(":");l.language=f[1]}else l.language=null;let c={};return c=l,c.category=r,c.full_path=r+"/"+l.folder,c.isMounted=d,c});e.length==0?e=a:e=e.concat(a)}e.sort((s,r)=>s.name.localeCompare(r.name)),n("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:n}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const t=[];for(let i=0;ia.full_path==s||a.full_path==r[0]);if(o>=0){let a=jR(this.state.personalities[o]);r.length>1&&(a.language=r[1]),a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(l=>l.full_path=="generic/lollms")])}else t.push(i),console.log("Couldn't load personality : ",s)}for(let i=t.length-1;i>=0;i--)console.log("Removing personality : ",this.state.config.personalities[t[i]]),this.state.config.personalities.splice(t[i],1),this.state.config.active_personality_id>t[i]&&(this.state.config.active_personality_id-=1);n("setMountedPersArr",e),this.state.mountedPers=this.state.personalities[this.state.personalities.findIndex(i=>i.full_path==this.state.config.personalities[this.state.config.active_personality_id]||i.full_path+":"+i.language==this.state.config.personalities[this.state.config.active_personality_id])]},async refreshBindings({commit:n}){let e=await _i("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(i=>i.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),n("setbindingsZoo",e);const t=e.findIndex(i=>i.name==this.state.config.binding_name);t!=-1&&n("setCurrentBinding",e[t])},async refreshModelsZoo({commit:n}){console.log("Fetching models");const t=(await Me.get("/get_available_models")).data.filter(i=>i.variants&&i.variants.length>0);console.log(`get_available_models: ${t}`),n("setModelsZoo",t)},async refreshModelStatus({commit:n}){let e=await _i("get_model_status");n("setIsModelOk",e.status)},async refreshModels({commit:n}){console.log("Fetching models");let e=await _i("list_models");console.log(`Found ${e}`);let t=await _i("get_active_model");console.log("Selected model ",t),t!=null&&n("setselectedModel",t.model),n("setModelsArr",e),console.log("setModelsArr",e),console.log("this.state.modelsZoo",this.state.modelsZoo),this.state.modelsZoo.map(s=>{s.isInstalled=e.includes(s.name)}),this.state.installedModels=this.state.modelsZoo.filter(s=>s.isInstalled);const i=this.state.modelsZoo.findIndex(s=>s.name==this.state.config.model_name);i!=-1&&n("setCurrentModel",this.state.modelsZoo[i])},async refreshExtensionsZoo({commit:n}){let e=[],t=await _i("list_extensions");const i=Object.keys(t);console.log("Extensions recovered:"+t);for(let s=0;s{let d=!1;for(const _ of this.state.config.extensions)_.includes(r+"/"+l.folder)&&(d=!0);let c={};return c=l,c.category=r,c.full_path=r+"/"+l.folder,c.isMounted=d,c});e.length==0?e=a:e=e.concat(a)}e.sort((s,r)=>s.name.localeCompare(r.name)),console.log("Done loading extensions"),n("setExtensionsZoo",e)},refreshmountedExtensions({commit:n}){console.log("Mounting extensions");let e=[];const t=[];for(let i=0;io.full_path==s);if(r>=0){let o=jR(this.state.config.extensions[r]);o&&e.push(o)}else t.push(i),console.log("Couldn't load extension : ",s)}for(let i=t.length-1;i>=0;i--)console.log("Removing extensions : ",this.state.config.extensions[t[i]]),this.state.config.extensions.splice(t[i],1);n("setMountedExtensions",e)},async refreshDiskUsage({commit:n}){this.state.diskUsage=await _i("disk_usage")},async refreshRamUsage({commit:n}){this.state.ramUsage=await _i("ram_usage")},async refreshVramUsage({commit:n}){const e=await _i("vram_usage"),t=[];if(e.nb_gpus>0){for(let s=0;s License: see project LICENSE Touched: 2022 -*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.code-container{display:flex;margin:0}.line-numbers{flex-shrink:0;padding-right:5px;color:#999;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;margin:0}.code-content{flex-grow:1;margin:0}.progress-bar-container{background-color:#f0f0f0;border-radius:4px;height:8px;overflow:hidden}.progress-bar{background-color:#3498db;height:100%;transition:width .3s ease}.popup-container[data-v-d504dfc9]{background-color:#fff;color:#333;border-radius:8px;box-shadow:0 4px 6px #0000001a;padding:24px;width:100%;height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.close-button[data-v-d504dfc9]{position:absolute;top:16px;right:16px;background-color:#3490dc;color:#fff;font-weight:700;padding:8px 16px;border-radius:8px;cursor:pointer;transition:background-color .3s ease}.close-button[data-v-d504dfc9]:hover{background-color:#2779bd}.iframe-content[data-v-d504dfc9]{width:100%;height:80%;border:none;margin-bottom:16px}.checkbox-container[data-v-d504dfc9]{display:flex;align-items:center;justify-content:center}.styled-checkbox[data-v-d504dfc9]{width:24px;height:24px;accent-color:#3490dc;cursor:pointer}.checkbox-label[data-v-d504dfc9]{margin-left:8px;font-size:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fade-enter-active[data-v-d504dfc9],.fade-leave-active[data-v-d504dfc9]{transition:opacity .5s}.fade-enter[data-v-d504dfc9],.fade-leave-to[data-v-d504dfc9]{opacity:0}.container{margin:0;padding:0}.link-item{height:25px;margin-top:5px;padding:0 20px;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.link-item-dark{padding:0 20px;color:#f0f8ff;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.nav-ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;height:100%}.nav-li{cursor:pointer;display:flex;align-items:center;padding:5px}.fade-in{animation:fadeInAnimation .5s}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}.bounce-in{animation:bounceInAnimation .5s}.bounce-out{animation:bounceOutAnimation .5s}@keyframes bounceInAnimation{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}.dot{width:10px;height:10px;border-radius:50%}.dot-green{background-color:green}.dot-red{background-color:red}.hovered{transition:transform .3s cubic-bezier(.175,.885,.32,1.275);transform:scale(1.1)}.active{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;pointer-events:all}select{width:200px}body{background-color:#fafafa;font-family:sans-serif}.container{margin:4px auto;width:800px}.settings{position:fixed;top:0;right:0;width:250px;background-color:#fff;z-index:1000;display:none}.settings-button{cursor:pointer;padding:10px;border:1px solid #ddd;border-radius:5px;color:#333;font-size:14px}.settings-button:hover{background-color:#eee}.settings-button:active{background-color:#ddd}.slider-container{margin-top:20px}.slider-value{display:inline-block;margin-left:10px;color:#6b7280;font-size:14px}.small-button{padding:.5rem .75rem;font-size:.875rem}.active-tab{font-weight:700}.scrollbar[data-v-b19a05a8]{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);white-space:pre-wrap;overflow-wrap:break-word}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar{width:8px}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:4px}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color)}.menu-container{position:relative;display:inline-block}.menu-button{background-color:#007bff;color:#fff;padding:10px;border:none;cursor:pointer;border-radius:4px}.menu-list{position:absolute;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;padding:10px;max-width:500px;z-index:1000}.slide-enter-active,.slide-leave-active{transition:transform .2s}.slide-enter-to,.slide-leave-from{transform:translateY(-10px)}.menu-ul{list-style:none;padding:0;margin:0}.menu-li{cursor:pointer;display:flex;align-items:center;padding:5px}.menu-icon{width:20px;height:20px;margin-right:8px}.menu-command{min-width:200px;text-align:left}.selected-choice{background-color:#bde4ff}.heartbeat-text[data-v-ef55939e]{font-size:24px;animation:pulsate-ef55939e 1.5s infinite}@keyframes pulsate-ef55939e{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-ef55939e],.list-enter-active[data-v-ef55939e],.list-leave-active[data-v-ef55939e]{transition:all .5s ease}.list-enter-from[data-v-ef55939e]{transform:translatey(-30px)}.list-leave-to[data-v-ef55939e]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-ef55939e]{position:absolute}.bounce-enter-active[data-v-ef55939e]{animation:bounce-in-ef55939e .5s}.bounce-leave-active[data-v-ef55939e]{animation:bounce-in-ef55939e .5s reverse}@keyframes bounce-in-ef55939e{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-ef55939e]{background-color:#0ff}.hover[data-v-ef55939e]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-ef55939e]{font-weight:700}.collapsible-section{cursor:pointer;margin-bottom:10px;font-weight:700}.collapsible-section:hover{color:#1a202c}.collapsible-section .toggle-icon{margin-right:.25rem}.collapsible-section .toggle-icon i{color:#4a5568}.collapsible-section .toggle-icon i:hover{color:#1a202c}.json-viewer{max-height:300px;max-width:700px;flex:auto;overflow-y:auto;padding:10px;background-color:#f1f1f1;border:1px solid #ccc;border-radius:4px}.json-viewer .toggle-icon{cursor:pointer;margin-right:.25rem}.json-viewer .toggle-icon i{color:#4a5568}.json-viewer .toggle-icon i:hover{color:#1a202c}.expand-button{margin-left:10px;margin-right:10px;background:none;border:none;padding:0;cursor:pointer}.htmljs{background:none}.bounce-enter-active[data-v-9c85e2c1]{animation:bounce-in-9c85e2c1 .5s}.bounce-leave-active[data-v-9c85e2c1]{animation:bounce-in-9c85e2c1 .5s reverse}@keyframes bounce-in-9c85e2c1{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.custom-scrollbar[data-v-52cfa09c]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-52cfa09c]::-webkit-scrollbar-track{background-color:#f1f1f1}.custom-scrollbar[data-v-52cfa09c]::-webkit-scrollbar-thumb{background-color:#888;border-radius:4px}.custom-scrollbar[data-v-52cfa09c]::-webkit-scrollbar-thumb:hover{background-color:#555}.menu[data-v-52cfa09c]{display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper[data-v-52cfa09c]{position:relative;display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper>#commands-menu-items[data-v-52cfa09c]{top:calc(-100% - 2rem)}.list-move[data-v-5ab45082],.list-enter-active[data-v-5ab45082],.list-leave-active[data-v-5ab45082]{transition:all .5s ease}.list-enter-from[data-v-5ab45082]{transform:translatey(-30px)}.list-leave-to[data-v-5ab45082]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-5ab45082]{position:absolute}.slide-right-enter-active[data-v-f5c78cc1],.slide-right-leave-active[data-v-f5c78cc1]{transition:transform .3s ease}.slide-right-enter[data-v-f5c78cc1],.slide-right-leave-to[data-v-f5c78cc1]{transform:translate(-100%)}.fade-and-fly-enter-active[data-v-f5c78cc1]{animation:fade-and-fly-enter-f5c78cc1 .5s ease}.fade-and-fly-leave-active[data-v-f5c78cc1]{animation:fade-and-fly-leave-f5c78cc1 .5s ease}@keyframes fade-and-fly-enter-f5c78cc1{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-f5c78cc1{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-f5c78cc1],.list-enter-active[data-v-f5c78cc1],.list-leave-active[data-v-f5c78cc1]{transition:all .5s ease}.list-enter-from[data-v-f5c78cc1]{transform:translatey(-30px)}.list-leave-to[data-v-f5c78cc1]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-f5c78cc1]{position:absolute}.container{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.floating-frame{margin:15px;float:left;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;z-index:5000;position:fixed;cursor:move;bottom:0;right:0}.handle{width:100%;height:20px;background:#ccc;cursor:move;text-align:center}.floating-frame img{width:100%;height:auto}.controls{margin-top:10px}#webglContainer{top:0;left:0}.floating-frame2{margin:15px;width:800px;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;min-height:200px;z-index:5000}:root{--baklava-control-color-primary: #e28b46;--baklava-control-color-error: #d00000;--baklava-control-color-background: #2c3748;--baklava-control-color-foreground: white;--baklava-control-color-hover: #455670;--baklava-control-color-active: #556986;--baklava-control-color-disabled-foreground: #666c75;--baklava-control-border-radius: 3px;--baklava-sidebar-color-background: #1b202c;--baklava-sidebar-color-foreground: white;--baklava-node-color-background: #1b202c;--baklava-node-color-foreground: white;--baklava-node-color-hover: #e28c4677;--baklava-node-color-selected: var(--baklava-control-color-primary);--baklava-node-color-resize-handle: var(--baklava-control-color-background);--baklava-node-title-color-background: #151a24;--baklava-node-title-color-foreground: white;--baklava-group-node-title-color-background: #215636;--baklava-group-node-title-color-foreground: white;--baklava-node-interface-port-tooltip-color-foreground: var(--baklava-control-color-primary);--baklava-node-interface-port-tooltip-color-background: var(--baklava-editor-background-pattern-black);--baklava-node-border-radius: 6px;--baklava-color-connection-default: #737f96;--baklava-color-connection-allowed: #48bc79;--baklava-color-connection-forbidden: #bc4848;--baklava-editor-background-pattern-default: #202b3c;--baklava-editor-background-pattern-line: #263140;--baklava-editor-background-pattern-black: #263140;--baklava-context-menu-background: #1b202c;--baklava-context-menu-shadow: 0 0 8px rgba(0, 0, 0, .65);--baklava-toolbar-background: #1b202caa;--baklava-toolbar-foreground: white;--baklava-node-palette-background: #1b202caa;--baklava-node-palette-foreground: white;--baklava-visual-transition: .1s linear}.baklava-button{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);transition:background-color var(--baklava-visual-transition);border:none;padding:.45em .35em;border-radius:var(--baklava-control-border-radius);font-size:inherit;cursor:pointer;overflow-x:hidden}.baklava-button:hover{background-color:var(--baklava-control-color-hover)}.baklava-button:active{background-color:var(--baklava-control-color-primary)}.baklava-button.--block{width:100%}.baklava-checkbox{display:flex;padding:.35em 0;cursor:pointer;overflow-x:hidden;align-items:center}.baklava-checkbox .__checkmark-container{display:flex;background-color:var(--baklava-control-color-background);border-radius:var(--baklava-control-border-radius);transition:background-color var(--baklava-visual-transition);width:18px;height:18px}.baklava-checkbox:hover .__checkmark-container{background-color:var(--baklava-control-color-hover)}.baklava-checkbox:active .__checkmark-container{background-color:var(--baklava-control-color-active)}.baklava-checkbox .__checkmark{stroke-dasharray:15;stroke-dashoffset:15;stroke:var(--baklava-control-color-foreground);stroke-width:2px;fill:none;transition:stroke-dashoffset var(--baklava-visual-transition)}.baklava-checkbox.--checked .__checkmark{stroke-dashoffset:0}.baklava-checkbox.--checked .__checkmark-container{background-color:var(--baklava-control-color-primary)}.baklava-checkbox .__label{margin-left:.5rem}.baklava-context-menu{color:var(--baklava-control-color-foreground);position:absolute;display:inline-block;z-index:100;background-color:var(--baklava-context-menu-background);box-shadow:var(--baklava-context-menu-shadow);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);min-width:6rem;width:-moz-max-content;width:max-content}.baklava-context-menu>.item{display:flex;align-items:center;padding:.35em 1em;transition:background .05s linear;position:relative}.baklava-context-menu>.item>.__label{flex:1 1 auto}.baklava-context-menu>.item>.__submenu-icon{margin-left:.75rem}.baklava-context-menu>.item.--disabled{color:var(--baklava-control-color-hover)}.baklava-context-menu>.item:not(.--header):not(.--active):not(.--disabled):hover{background:var(--baklava-control-color-primary)}.baklava-context-menu>.item.--active{background:var(--baklava-control-color-primary)}.baklava-context-menu.--nested{left:100%;top:0}.baklava-context-menu.--flipped-x.--nested{left:unset;right:100%}.baklava-context-menu.--flipped-y.--nested{top:unset;bottom:0}.baklava-context-menu>.divider{margin:.35em 0;height:1px;background-color:var(--baklava-control-color-hover)}.baklava-icon{display:block;height:100%}.baklava-icon.--clickable{cursor:pointer;transition:color var(--baklava-visual-transition)}.baklava-icon.--clickable:hover{color:var(--baklava-control-color-primary)}.baklava-input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);border:none;border-radius:var(--baklava-control-border-radius);padding:.45em .75em;width:100%;transition:background-color var(--baklava-visual-transition);font-size:inherit;font:inherit}.baklava-input:hover{background-color:var(--baklava-control-color-hover)}.baklava-input:active{background-color:var(--baklava-control-color-active)}.baklava-input:focus-visible{outline:1px solid var(--baklava-control-color-primary)}.baklava-input[type=number]::-webkit-inner-spin-button,.baklava-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.baklava-input.--invalid{box-shadow:0 0 2px 2px var(--baklava-control-color-error)}.baklava-num-input{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);width:100%;display:grid;grid-template-columns:20px 1fr 20px}.baklava-num-input>.__button{display:flex;flex:0 0 auto;width:20px;justify-content:center;align-items:center;transition:background var(--baklava-visual-transition);cursor:pointer}.baklava-num-input>.__button:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__button:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__button.--dec{grid-area:1/1/span 1/span 1}.baklava-num-input>.__button.--dec>svg{transform:rotate(90deg)}.baklava-num-input>.__button.--inc{grid-area:1/3/span 1/span 1}.baklava-num-input>.__button.--inc>svg{transform:rotate(-90deg)}.baklava-num-input>.__button path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-num-input>.__content{grid-area:1/2/span 1/span 1;display:inline-flex;cursor:pointer;max-width:100%;min-width:0;align-items:center;transition:background-color var(--baklava-visual-transition)}.baklava-num-input>.__content:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__content:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__content>.__label,.baklava-num-input>.__content>.__value{margin:.35em 0;padding:0 .5em}.baklava-num-input>.__content>.__label{flex:1;min-width:0;overflow:hidden}.baklava-num-input>.__content>.__value{text-align:right}.baklava-num-input>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-select{width:100%;position:relative;color:var(--baklava-control-color-foreground)}.baklava-select.--open>.__selected{border-bottom-left-radius:0;border-bottom-right-radius:0}.baklava-select.--open>.__selected>.__icon{transform:rotate(180deg)}.baklava-select>.__selected{background-color:var(--baklava-control-color-background);padding:.35em .75em;border-radius:var(--baklava-control-border-radius);transition:background var(--baklava-visual-transition);min-height:1.7em;display:flex;align-items:center;cursor:pointer}.baklava-select>.__selected:hover{background:var(--baklava-control-color-hover)}.baklava-select>.__selected:active{background:var(--baklava-control-color-active)}.baklava-select>.__selected>.__text{flex:1 0 auto;flex-basis:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.baklava-select>.__selected>.__icon{flex:0 0 auto;display:flex;justify-content:center;align-items:center;transition:transform .25s ease;width:18px;height:18px}.baklava-select>.__selected>.__icon path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-select>.__dropdown{position:absolute;top:100%;left:0;right:0;z-index:10;background-color:var(--baklava-context-menu-background);filter:drop-shadow(0 0 4px black);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);max-height:15em;overflow-y:scroll}.baklava-select>.__dropdown::-webkit-scrollbar{width:0px;background:transparent}.baklava-select>.__dropdown>.item{padding:.35em .35em .35em 1em;transition:background .05s linear}.baklava-select>.__dropdown>.item:not(.--header):not(.--active){cursor:pointer}.baklava-select>.__dropdown>.item:not(.--header):not(.--active):hover{background:var(--baklava-control-color-hover)}.baklava-select>.__dropdown>.item.--active{background:var(--baklava-control-color-primary)}.baklava-select>.__dropdown>.item.--header{color:var(--baklava-control-color-disabled-foreground);border-bottom:1px solid var(--baklava-control-color-disabled-foreground);padding:.5em .35em .5em 1em}.baklava-slider{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);position:relative;cursor:pointer}.baklava-slider>.__content{display:flex;position:relative}.baklava-slider>.__content>.__label,.baklava-slider>.__content>.__value{flex:1 1 auto;margin:.35em 0;padding:0 .5em;text-overflow:ellipsis}.baklava-slider>.__content>.__value{text-align:right}.baklava-slider>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-slider>.__slider{position:absolute;top:0;bottom:0;left:0;background-color:var(--baklava-control-color-primary);border-radius:var(--baklava-control-border-radius)}.baklava-connection{stroke:var(--baklava-color-connection-default);stroke-width:2px;fill:none}.baklava-connection.--temporary{stroke-width:4px;stroke-dasharray:5 5;stroke-dashoffset:0;animation:dash 1s linear infinite;transform:translateY(-1px)}@keyframes dash{to{stroke-dashoffset:20}}.baklava-connection.--allowed{stroke:var(--baklava-color-connection-allowed)}.baklava-connection.--forbidden{stroke:var(--baklava-color-connection-forbidden)}.baklava-minimap{position:absolute;height:15%;width:15%;min-width:150px;max-width:90%;top:20px;right:20px;z-index:900}.baklava-editor{width:100%;height:100%;position:relative;overflow:hidden;outline:none!important;font-family:Lato,Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:15px;touch-action:none}.baklava-editor .background{background-color:var(--baklava-editor-background-pattern-default);background-image:linear-gradient(var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(90deg,var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(var(--baklava-editor-background-pattern-line) 1px,transparent 1px),linear-gradient(90deg,var(--baklava-editor-background-pattern-line) 1px,transparent 1px);background-repeat:repeat;width:100%;height:100%;pointer-events:none!important}.baklava-editor *:not(input):not(textarea){user-select:none;-moz-user-select:none;-webkit-user-select:none;touch-action:none}.baklava-editor .input-user-select{user-select:auto;-moz-user-select:auto;-webkit-user-select:auto}.baklava-editor *,.baklava-editor *:after,.baklava-editor *:before{box-sizing:border-box}.baklava-editor.--temporary-connection{cursor:crosshair}.baklava-editor .connections-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none!important}.baklava-editor .node-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.baklava-editor .node-container *{pointer-events:all}.baklava-ignore-mouse *{pointer-events:none!important}.baklava-ignore-mouse .__port{pointer-events:all!important}.baklava-node-interface{padding:.25em 0;position:relative}.baklava-node-interface .__port{position:absolute;width:10px;height:10px;background:white;border-radius:50%;top:calc(50% - 5px);cursor:crosshair}.baklava-node-interface .__port.--selected{outline:2px var(--baklava-color-connection-default) solid;outline-offset:4px}.baklava-node-interface.--input{text-align:left;padding-left:.5em}.baklava-node-interface.--input .__port{left:-1.1em}.baklava-node-interface.--output{text-align:right;padding-right:.5em}.baklava-node-interface.--output .__port{right:-1.1em}.baklava-node-interface .__tooltip{position:absolute;left:5px;top:15px;transform:translate(-50%);background:var(--baklava-node-interface-port-tooltip-color-background);color:var(--baklava-node-interface-port-tooltip-color-foreground);padding:.25em .5em;text-align:center;z-index:2}.baklava-node-palette{position:absolute;left:0;top:60px;width:250px;height:calc(100% - 60px);z-index:3;padding:2rem;overflow-y:auto;background:var(--baklava-node-palette-background);color:var(--baklava-node-palette-foreground)}.baklava-node-palette h1{margin-top:2rem}.baklava-node.--palette{position:unset;margin:1rem 0;cursor:grab}.baklava-node.--palette:first-child{margin-top:0}.baklava-node.--palette .__title{padding:.5rem;border-radius:var(--baklava-node-border-radius)}.baklava-dragged-node{position:absolute;width:calc(250px - 4rem);height:40px;z-index:4;pointer-events:none}.baklava-node{background:var(--baklava-node-color-background);color:var(--baklava-node-color-foreground);border:1px solid transparent;border-radius:var(--baklava-node-border-radius);position:absolute;box-shadow:0 0 4px #000c;transition:border-color var(--baklava-visual-transition),box-shadow var(--baklava-visual-transition);width:var(--width)}.baklava-node:hover{border-color:var(--baklava-node-color-hover)}.baklava-node:hover .__resize-handle:after{opacity:1}.baklava-node.--selected{z-index:5;border-color:var(--baklava-node-color-selected)}.baklava-node.--dragging{box-shadow:0 0 12px #000c}.baklava-node.--dragging>.__title{cursor:grabbing}.baklava-node>.__title{display:flex;background:var(--baklava-node-title-color-background);color:var(--baklava-node-title-color-foreground);padding:.4em .75em;border-radius:var(--baklava-node-border-radius) var(--baklava-node-border-radius) 0 0;cursor:grab}.baklava-node>.__title>*:first-child{flex-grow:1}.baklava-node>.__title>.__title-label{pointer-events:none}.baklava-node>.__title>.__menu{position:relative;cursor:initial}.baklava-node[data-node-type^=__baklava_]>.__title{background:var(--baklava-group-node-title-color-background);color:var(--baklava-group-node-title-color-foreground)}.baklava-node>.__content{padding:.75em}.baklava-node>.__content>div>div{margin:.5em 0}.baklava-node.--two-column>.__content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-template-areas:". ." ". ."}.baklava-node.--two-column>.__content>.__inputs{grid-row:1;grid-column:1}.baklava-node.--two-column>.__content>.__outputs{grid-row:1;grid-column:2}.baklava-node .__resize-handle{position:absolute;right:0;bottom:0;width:1rem;height:1rem;transform:translate(50%);cursor:ew-resize}.baklava-node .__resize-handle:after{content:"";position:absolute;bottom:0;left:-.5rem;width:1rem;height:1rem;opacity:0;border-bottom-right-radius:var(--baklava-node-border-radius);transition:opacity var(--baklava-visual-transition);background:linear-gradient(-45deg,transparent 10%,var(--baklava-node-color-resize-handle) 10%,var(--baklava-node-color-resize-handle) 15%,transparent 15%,transparent 30%,var(--baklava-node-color-resize-handle) 30%,var(--baklava-node-color-resize-handle) 35%,transparent 35%,transparent 50%,var(--baklava-node-color-resize-handle) 50%,var(--baklava-node-color-resize-handle) 55%,transparent 55%)}.baklava-sidebar{position:absolute;height:100%;width:25%;min-width:300px;max-width:90%;top:0;right:0;z-index:1000;background-color:var(--baklava-sidebar-color-background);color:var(--baklava-sidebar-color-foreground);box-shadow:none;overflow-x:hidden;padding:1em;transform:translate(100%);transition:transform .5s;display:flex;flex-direction:column}.baklava-sidebar.--open{transform:translate(0);box-shadow:0 0 15px #000}.baklava-sidebar .__resizer{position:absolute;left:0;top:0;height:100%;width:4px;cursor:col-resize}.baklava-sidebar .__header{display:flex;align-items:center}.baklava-sidebar .__header .__node-name{margin-left:.5rem}.baklava-sidebar .__close{font-size:2em;border:none;background:none;color:inherit;cursor:pointer}.baklava-sidebar .__interface{margin:.5em 0}.baklava-toolbar{position:absolute;left:0;top:0;width:100%;height:60px;z-index:3;padding:.5rem 2rem;background:var(--baklava-toolbar-background);color:var(--baklava-toolbar-foreground);display:flex;align-items:center}.baklava-toolbar-entry{margin-left:.5rem;margin-right:.5rem}.baklava-toolbar-button{color:var(--baklava-toolbar-foreground);background:none;border:none;transition:color var(--baklava-visual-transition)}.baklava-toolbar-button:not([disabled]){cursor:pointer}.baklava-toolbar-button:hover:not([disabled]){color:var(--baklava-control-color-primary)}.baklava-toolbar-button[disabled]{color:var(--baklava-control-color-disabled-foreground)}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .1s ease-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(5px);opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease-out!important}.fade-enter-from,.fade-leave-to{opacity:0}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:PTSans,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.tooltip-arrow,.tooltip-arrow:before{position:absolute;width:8px;height:8px;background:inherit}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1F2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{color:#fff;background:#4B5563}.dark input[type=file]::file-selector-button:hover{background:#6B7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6B7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-moz-range-thumb{background:#6B7280}input[type=range]::-moz-range-progress{background:#3F83F8}input[type=range]::-ms-fill-lower{background:#3F83F8}.toggle-bg:after{content:"";position:absolute;top:.125rem;left:.125rem;background:white;border-color:#d1d5db;border-width:1px;border-radius:9999px;height:1.25rem;width:1.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}input:checked+.toggle-bg:after{transform:translate(100%);border-color:#fff}input:checked+.toggle-bg{background:#1C64F2;border-color:#1c64f2}*{scrollbar-color:initial;scrollbar-width:initial}html{scroll-behavior:smooth}@font-face{font-family:Roboto;src:url(/assets/Roboto-Regular-7277cfb8.ttf) format("truetype")}@font-face{font-family:PTSans;src:url(/assets/PTSans-Regular-23b91352.ttf) format("truetype")}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-1{bottom:-.25rem}.-bottom-1\.5{bottom:-.375rem}.-bottom-2{bottom:-.5rem}.-bottom-4{bottom:-1rem}.-left-1{left:-.25rem}.-left-1\.5{left:-.375rem}.-right-0{right:-0px}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-1{top:-.25rem}.-top-1\.5{top:-.375rem}.-top-20{top:-5rem}.bottom-0{bottom:0}.bottom-16{bottom:4rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-20{bottom:5rem}.bottom-5{bottom:1.25rem}.bottom-\[60px\]{bottom:60px}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-20{left:5rem}.left-7{left:1.75rem}.left-9{left:2.25rem}.right-0{right:0}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-20{right:5rem}.right-3{right:.75rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.-m-4{margin:-1rem}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-my-1{margin-top:-.25rem;margin-bottom:-.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-4\/5{height:80%}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[200px\]{height:200px}.h-auto{height:auto}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-6{max-height:1.5rem}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[400px\]{max-height:400px}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-\[500px\]{min-height:500px}.min-h-\[900px\]{min-height:900px}.min-h-full{min-height:100%}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-3\/5{width:60%}.w-36{width:9rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-\[23rem\]{min-width:23rem}.min-w-\[24rem\]{min-width:24rem}.min-w-\[300px\]{min-width:300px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[23rem\]{max-width:23rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-\[900px\]{max-width:900px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0{--tw-translate-y: -0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\[40px\,1fr\]{grid-template-columns:40px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1rem * var(--tw-space-x-reverse));margin-left:calc(-1rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-bg-dark{border-color:var(--color-bg-dark)}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity: 1;border-color:rgb(214 31 105 / var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity: 1;border-color:rgb(191 18 93 / var(--tw-border-opacity))}.border-primary{border-color:var(--color-primary)}.border-primary-light{border-color:var(--color-primary-light)}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(126 58 242 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-secondary{border-color:var(--color-secondary)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(194 120 3 / var(--tw-border-opacity))}.bg-accent{background-color:var(--color-accent)}.bg-bg-dark-tone-panel{background-color:var(--color-bg-dark-tone-panel)}.bg-bg-light{background-color:var(--color-bg-light)}.bg-bg-light-discussion{background-color:var(--color-bg-light-discussion)}.bg-bg-light-panel{background-color:var(--color-bg-light-panel)}.bg-bg-light-tone{background-color:var(--color-bg-light-tone)}.bg-bg-light-tone-panel{background-color:var(--color-bg-light-tone-panel)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-300{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(254 236 220 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-white\/50{background-color:#ffffff80}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-70{--tw-bg-opacity: .7}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-bg-light{--tw-gradient-from: var(--color-bg-light) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bg-light-tone{--tw-gradient-from: var(--color-bg-light-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #0E9F6E var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-500{--tw-gradient-from: #84cc16 var(--tw-gradient-from-position);--tw-gradient-to: rgb(132 204 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #F05252 var(--tw-gradient-from-position);--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #0694A2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-5\%{--tw-gradient-from-position: 5%}.via-bg-light{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-light) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-600{--tw-gradient-to: rgb(8 145 178 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0891b2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-600{--tw-gradient-to: rgb(5 122 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #057A55 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-600{--tw-gradient-to: rgb(101 163 13 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #65a30d var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(214 31 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D61F69 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-600{--tw-gradient-to: rgb(224 36 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E02424 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-600{--tw-gradient-to: rgb(4 116 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #047481 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-10\%{--tw-gradient-via-position: 10%}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-700{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #046C4E var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.to-lime-700{--tw-gradient-to: #4d7c0f var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-700{--tw-gradient-to: #BF125D var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #C81E1E var(--tw-gradient-to-position)}.to-teal-700{--tw-gradient-to: #036672 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.to-100\%{--tw-gradient-to-position: 100%}.fill-blue-600{fill:#1c64f2}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-secondary{fill:var(--color-secondary)}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-24{padding-top:6rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-sans{font-family:PTSans,Roboto,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[\.82rem\]{font-size:.82rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-dark-text-panel{color:var(--color-dark-text-panel)}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-200{--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(81 69 205 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.text-light-text-panel{color:var(--color-light-text-panel)}.text-orange-200{--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity: 1;color:rgb(214 31 105 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(191 18 93 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-200{--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-secondary{color:var(--color-secondary)}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(142 75 16 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.text-opacity-95{--tw-text-opacity: .95}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-800\/80{--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-800\/80{--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-800\/80{--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-800\/80{--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-800\/80{--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-800\/80{--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-800\/80{--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.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)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));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)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));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)}.grayscale-0{--tw-grayscale: grayscale(0);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-sm{--tw-backdrop-blur: blur(4px);-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,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.scrollbar{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar{scrollbar-width:auto}.scrollbar::-webkit-scrollbar{display:block;width:var(--scrollbar-width, 16px);height:var(--scrollbar-height, 16px)}.scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-bg-light{--scrollbar-track: var(--color-bg-light) !important}.scrollbar-track-bg-light-tone{--scrollbar-track: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone{--scrollbar-thumb: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone-panel{--scrollbar-thumb: var(--color-bg-light-tone-panel) !important}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.display-none{display:none}h1{font-size:36px;font-weight:700}h2{font-size:24px;font-weight:700}h3{font-size:18px;font-weight:700}h4{font-size:18px;font-style:italic}p{font-size:16px;word-wrap:break-word;overflow-wrap:break-word;white-space:normal}ul{list-style-type:disc;margin-left:0}li{list-style-type:disc;margin-left:20px}ol{list-style-type:decimal;margin-left:20px}:root{--color-primary: #0e8ef0;--color-primary-light: #3dabff;--color-secondary: #0fd974;--color-accent: #f0700e;--color-light-text-panel: #ffffff;--color-dark-text-panel: #ffffff;--color-bg-light-panel: #7cb5ec;--color-bg-light: #e2edff;--color-bg-light-tone: #b9d2f7;--color-bg-light-code-block: #cad7ed;--color-bg-light-tone-panel: #8fb5ef;--color-bg-light-discussion: #c5d8f8;--color-bg-light-discussion-odd: #d6e7ff;--color-bg-dark: #132e59;--color-bg-dark-tone: #25477d;--color-bg-dark-tone-panel: #4367a3;--color-bg-dark-code-block: #2254a7;--color-bg-dark-discussion: #435E8A;--color-bg-dark-discussion-odd: #284471}.last\:mb-0:last-child{margin-bottom:0}.last\:\!border-transparent:last-child{border-color:transparent!important}.last\:pb-0:last-child{padding-bottom:0}.odd\:bg-bg-light-tone:nth-child(odd){background-color:var(--color-bg-light-tone)}.even\:bg-bg-light-discussion-odd:nth-child(2n){background-color:var(--color-bg-light-discussion-odd)}.even\:bg-bg-light-tone-panel:nth-child(2n){background-color:var(--color-bg-light-tone-panel)}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:-translate-y-12{--tw-translate-y: -3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-secondary{border-color:var(--color-secondary)}.group:hover .group-hover\:bg-white\/50{background-color:#ffffff80}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity: 0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.group:hover .group-hover\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.hover\:z-10:hover{z-index:10}.hover\:z-20:hover{z-index:20}.hover\:block:hover{display:block}.hover\:h-8:hover{height:2rem}.hover\:-translate-y-2:hover{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:translate-y-\[-5px\]:hover{--tw-translate-y: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-95:hover{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-2:hover{border-width:2px}.hover\:border-solid:hover{border-style:solid}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(188 240 218 / var(--tw-border-opacity))}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.hover\:border-secondary:hover{border-color:var(--color-secondary)}.hover\:bg-accent:hover{background-color:var(--color-accent)}.hover\:bg-bg-light-tone:hover{background-color:var(--color-bg-light-tone)}.hover\:bg-bg-light-tone-panel:hover{background-color:var(--color-bg-light-tone-panel)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{background-color:var(--color-secondary)}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:from-teal-200:hover{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.hover\:fill-primary:hover{fill:var(--color-primary)}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.hover\:text-secondary:hover{color:var(--color-secondary)}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:scrollbar-thumb-primary{--scrollbar-thumb-hover: var(--color-primary) !important}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-secondary:focus{border-color:var(--color-secondary)}.focus\:text-blue-700:focus{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-blue-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-secondary:focus{--tw-ring-color: var(--color-secondary)}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:scale-75:active{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scrollbar-thumb-secondary{--scrollbar-thumb-active: var(--color-secondary) !important}:is(.dark .dark\:divide-gray-700)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}:is(.dark .dark\:border-bg-light){border-color:var(--color-bg-light)}:is(.dark .dark\:border-blue-500){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-500){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-600){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-800){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-900){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}:is(.dark .dark\:border-green-500){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-400){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-500){--tw-border-opacity: 1;border-color:rgb(231 70 148 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-400){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-500){--tw-border-opacity: 1;border-color:rgb(144 97 249 / var(--tw-border-opacity))}:is(.dark .dark\:border-red-500){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}:is(.dark .dark\:border-transparent){border-color:transparent}:is(.dark .dark\:border-yellow-300){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}:is(.dark .dark\:bg-bg-dark){background-color:var(--color-bg-dark)}:is(.dark .dark\:bg-bg-dark-discussion){background-color:var(--color-bg-dark-discussion)}:is(.dark .dark\:bg-bg-dark-tone){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:bg-bg-dark-tone-panel){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .dark\:bg-black){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-200){--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-500){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-600){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-700){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-800){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-900){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-200){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-300){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-400){--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-600){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-700){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800\/30){background-color:#1f29374d}:is(.dark .dark\:bg-gray-800\/50){background-color:#1f293780}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-200){--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-500){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-600){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-800){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-200){--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-500){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-700){--tw-bg-opacity: 1;background-color:rgb(180 52 3 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-800){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-200){--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-600){--tw-bg-opacity: 1;background-color:rgb(214 31 105 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-200){--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-500){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-600){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-200){--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-500){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-600){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-800){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-yellow-200){--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-opacity-70){--tw-bg-opacity: .7}:is(.dark .dark\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\:from-bg-dark){--tw-gradient-from: var(--color-bg-dark) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-bg-dark-tone){--tw-gradient-from: var(--color-bg-dark-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:via-bg-dark){--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-dark) var(--tw-gradient-via-position), var(--tw-gradient-to)}:is(.dark .dark\:fill-gray-300){fill:#d1d5db}:is(.dark .dark\:fill-white){fill:#fff}:is(.dark .dark\:text-blue-200){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-500){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-800){--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}:is(.dark .dark\:text-dark-text-panel){color:var(--color-dark-text-panel)}:is(.dark .dark\:text-gray-200){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-800){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-100){--tw-text-opacity: 1;color:rgb(222 247 236 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-200){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-500){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-800){--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-900){--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-500){--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-900){--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}:is(.dark .dark\:text-light-text-panel){color:var(--color-light-text-panel)}:is(.dark .dark\:text-orange-200){--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-400){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-500){--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-900){--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}:is(.dark .dark\:text-primary){color:var(--color-primary)}:is(.dark .dark\:text-purple-400){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-500){--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-900){--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-200){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-500){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-800){--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-900){--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-50){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-300){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-500){--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-800){--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-900){--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-gray-400)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:shadow-lg){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-blue-800\/80){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-cyan-800\/80){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-green-800\/80){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-lime-800\/80){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-pink-800\/80){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-purple-800\/80){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-red-800\/80){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-teal-800\/80){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:ring-gray-500){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:ring-offset-gray-700){--tw-ring-offset-color: #374151}:is(.dark .dark\:ring-offset-gray-800){--tw-ring-offset-color: #1F2937}:is(.dark .dark\:scrollbar-track-bg-dark){--scrollbar-track: var(--color-bg-dark) !important}:is(.dark .dark\:scrollbar-track-bg-dark-tone){--scrollbar-track: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone){--scrollbar-thumb: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone-panel){--scrollbar-thumb: var(--color-bg-dark-tone-panel) !important}:is(.dark .odd\:dark\:bg-bg-dark-tone):nth-child(odd){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:even\:bg-bg-dark-discussion-odd:nth-child(2n)){background-color:var(--color-bg-dark-discussion-odd)}:is(.dark .dark\:even\:bg-bg-dark-tone-panel:nth-child(2n)){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .group:hover .dark\:group-hover\:bg-gray-800\/60){background-color:#1f293799}:is(.dark .group:hover .dark\:group-hover\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .group:focus .dark\:group-focus\:ring-gray-800\/70){--tw-ring-color: rgb(31 41 55 / .7)}:is(.dark .dark\:hover\:border-gray-600:hover){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-primary:hover){border-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-bg-dark-tone:hover){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:hover\:bg-blue-300:hover){--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-600:hover){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-700:hover){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-600:hover){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-700:hover){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-800:hover){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-300:hover){--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-600:hover){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-700:hover){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-500:hover){--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-700:hover){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-primary:hover){background-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-purple-500:hover){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-700:hover){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-300:hover){--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-600:hover){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-700:hover){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-secondary:hover){background-color:var(--color-secondary)}:is(.dark .dark\:hover\:bg-yellow-300:hover){--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-400:hover){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}:is(.dark .hover\:dark\:bg-bg-dark-tone):hover{background-color:var(--color-bg-dark-tone)}:is(.dark .hover\:dark\:bg-bg-dark-tone-panel):hover{background-color:var(--color-bg-dark-tone-panel)}:is(.dark .hover\:dark\:bg-bg-light-tone):hover{background-color:var(--color-bg-light-tone)}:is(.dark .dark\:hover\:fill-primary:hover){fill:var(--color-primary)}:is(.dark .dark\:hover\:text-blue-500:hover){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-300:hover){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-900:hover){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:scrollbar-thumb-primary){--scrollbar-thumb-hover: var(--color-primary) !important}:is(.dark .dark\:focus\:border-blue-500:focus){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:focus\:border-secondary:focus){border-color:var(--color-secondary)}:is(.dark .dark\:focus\:text-white:focus){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:focus\:ring-blue-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-cyan-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-green-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-lime-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-400:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-secondary:focus){--tw-ring-color: var(--color-secondary)}:is(.dark .dark\:focus\:ring-teal-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-offset-gray-700:focus){--tw-ring-offset-color: #374151}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:w-1\/4{width:25%}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:inset-0{top:0;right:0;bottom:0;left:0}.md\:order-2{order:2}.md\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/4{width:25%}.md\:w-48{width:12rem}.md\:w-auto{width:auto}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-6{padding:1.5rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}:is(.dark .md\:dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .md\:dark\:hover\:bg-transparent:hover){background-color:transparent}:is(.dark .md\:dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}}@media (min-width: 1280px){.xl\:h-80{height:20rem}.xl\:w-1\/6{width:16.666667%}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}} +*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.code-container{display:flex;margin:0}.line-numbers{flex-shrink:0;padding-right:5px;color:#999;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;margin:0}.code-content{flex-grow:1;margin:0}.progress-bar-container{background-color:#f0f0f0;border-radius:4px;height:8px;overflow:hidden}.progress-bar{background-color:#3498db;height:100%;transition:width .3s ease}.popup-container[data-v-d504dfc9]{background-color:#fff;color:#333;border-radius:8px;box-shadow:0 4px 6px #0000001a;padding:24px;width:100%;height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.close-button[data-v-d504dfc9]{position:absolute;top:16px;right:16px;background-color:#3490dc;color:#fff;font-weight:700;padding:8px 16px;border-radius:8px;cursor:pointer;transition:background-color .3s ease}.close-button[data-v-d504dfc9]:hover{background-color:#2779bd}.iframe-content[data-v-d504dfc9]{width:100%;height:80%;border:none;margin-bottom:16px}.checkbox-container[data-v-d504dfc9]{display:flex;align-items:center;justify-content:center}.styled-checkbox[data-v-d504dfc9]{width:24px;height:24px;accent-color:#3490dc;cursor:pointer}.checkbox-label[data-v-d504dfc9]{margin-left:8px;font-size:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fade-enter-active[data-v-d504dfc9],.fade-leave-active[data-v-d504dfc9]{transition:opacity .5s}.fade-enter[data-v-d504dfc9],.fade-leave-to[data-v-d504dfc9]{opacity:0}.container{margin:0;padding:0}.link-item{height:25px;margin-top:5px;padding:0 20px;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.link-item-dark{padding:0 20px;color:#f0f8ff;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.nav-ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;height:100%}.nav-li{cursor:pointer;display:flex;align-items:center;padding:5px}.fade-in{animation:fadeInAnimation .5s}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}.bounce-in{animation:bounceInAnimation .5s}.bounce-out{animation:bounceOutAnimation .5s}@keyframes bounceInAnimation{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}.dot{width:10px;height:10px;border-radius:50%}.dot-green{background-color:green}.dot-red{background-color:red}.hovered{transition:transform .3s cubic-bezier(.175,.885,.32,1.275);transform:scale(1.1)}.active{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;pointer-events:all}select{width:200px}body{background-color:#fafafa;font-family:sans-serif}.container{margin:4px auto;width:800px}.settings{position:fixed;top:0;right:0;width:250px;background-color:#fff;z-index:1000;display:none}.settings-button{cursor:pointer;padding:10px;border:1px solid #ddd;border-radius:5px;color:#333;font-size:14px}.settings-button:hover{background-color:#eee}.settings-button:active{background-color:#ddd}.slider-container{margin-top:20px}.slider-value{display:inline-block;margin-left:10px;color:#6b7280;font-size:14px}.small-button{padding:.5rem .75rem;font-size:.875rem}.active-tab{font-weight:700}.scrollbar[data-v-b19a05a8]{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);white-space:pre-wrap;overflow-wrap:break-word}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar{width:8px}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:4px}.scrollbar[data-v-b19a05a8]::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color)}.menu-container{position:relative;display:inline-block}.menu-button{background-color:#007bff;color:#fff;padding:10px;border:none;cursor:pointer;border-radius:4px}.menu-list{position:absolute;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;padding:10px;max-width:500px;z-index:1000}.slide-enter-active,.slide-leave-active{transition:transform .2s}.slide-enter-to,.slide-leave-from{transform:translateY(-10px)}.menu-ul{list-style:none;padding:0;margin:0}.menu-li{cursor:pointer;display:flex;align-items:center;padding:5px}.menu-icon{width:20px;height:20px;margin-right:8px}.menu-command{min-width:200px;text-align:left}.selected-choice{background-color:#bde4ff}.heartbeat-text[data-v-83865e3b]{font-size:24px;animation:pulsate-83865e3b 1.5s infinite}@keyframes pulsate-83865e3b{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-83865e3b],.list-enter-active[data-v-83865e3b],.list-leave-active[data-v-83865e3b]{transition:all .5s ease}.list-enter-from[data-v-83865e3b]{transform:translatey(-30px)}.list-leave-to[data-v-83865e3b]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-83865e3b]{position:absolute}.bounce-enter-active[data-v-83865e3b]{animation:bounce-in-83865e3b .5s}.bounce-leave-active[data-v-83865e3b]{animation:bounce-in-83865e3b .5s reverse}@keyframes bounce-in-83865e3b{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-83865e3b]{background-color:#0ff}.hover[data-v-83865e3b]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-83865e3b]{font-weight:700}.collapsible-section{cursor:pointer;margin-bottom:10px;font-weight:700}.collapsible-section:hover{color:#1a202c}.collapsible-section .toggle-icon{margin-right:.25rem}.collapsible-section .toggle-icon i{color:#4a5568}.collapsible-section .toggle-icon i:hover{color:#1a202c}.json-viewer{max-height:300px;max-width:700px;flex:auto;overflow-y:auto;padding:10px;background-color:#f1f1f1;border:1px solid #ccc;border-radius:4px}.json-viewer .toggle-icon{cursor:pointer;margin-right:.25rem}.json-viewer .toggle-icon i{color:#4a5568}.json-viewer .toggle-icon i:hover{color:#1a202c}.expand-button{margin-left:10px;margin-right:10px;background:none;border:none;padding:0;cursor:pointer}.htmljs{background:none}.bounce-enter-active[data-v-9c85e2c1]{animation:bounce-in-9c85e2c1 .5s}.bounce-leave-active[data-v-9c85e2c1]{animation:bounce-in-9c85e2c1 .5s reverse}@keyframes bounce-in-9c85e2c1{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.custom-scrollbar[data-v-52cfa09c]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-52cfa09c]::-webkit-scrollbar-track{background-color:#f1f1f1}.custom-scrollbar[data-v-52cfa09c]::-webkit-scrollbar-thumb{background-color:#888;border-radius:4px}.custom-scrollbar[data-v-52cfa09c]::-webkit-scrollbar-thumb:hover{background-color:#555}.menu[data-v-52cfa09c]{display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper[data-v-52cfa09c]{position:relative;display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper>#commands-menu-items[data-v-52cfa09c]{top:calc(-100% - 2rem)}.list-move[data-v-5ab45082],.list-enter-active[data-v-5ab45082],.list-leave-active[data-v-5ab45082]{transition:all .5s ease}.list-enter-from[data-v-5ab45082]{transform:translatey(-30px)}.list-leave-to[data-v-5ab45082]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-5ab45082]{position:absolute}.slide-right-enter-active[data-v-f5c78cc1],.slide-right-leave-active[data-v-f5c78cc1]{transition:transform .3s ease}.slide-right-enter[data-v-f5c78cc1],.slide-right-leave-to[data-v-f5c78cc1]{transform:translate(-100%)}.fade-and-fly-enter-active[data-v-f5c78cc1]{animation:fade-and-fly-enter-f5c78cc1 .5s ease}.fade-and-fly-leave-active[data-v-f5c78cc1]{animation:fade-and-fly-leave-f5c78cc1 .5s ease}@keyframes fade-and-fly-enter-f5c78cc1{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-f5c78cc1{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-f5c78cc1],.list-enter-active[data-v-f5c78cc1],.list-leave-active[data-v-f5c78cc1]{transition:all .5s ease}.list-enter-from[data-v-f5c78cc1]{transform:translatey(-30px)}.list-leave-to[data-v-f5c78cc1]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-f5c78cc1]{position:absolute}.container{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.floating-frame{margin:15px;float:left;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;z-index:5000;position:fixed;cursor:move;bottom:0;right:0}.handle{width:100%;height:20px;background:#ccc;cursor:move;text-align:center}.floating-frame img{width:100%;height:auto}.controls{margin-top:10px}#webglContainer{top:0;left:0}.floating-frame2{margin:15px;width:800px;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;min-height:200px;z-index:5000}:root{--baklava-control-color-primary: #e28b46;--baklava-control-color-error: #d00000;--baklava-control-color-background: #2c3748;--baklava-control-color-foreground: white;--baklava-control-color-hover: #455670;--baklava-control-color-active: #556986;--baklava-control-color-disabled-foreground: #666c75;--baklava-control-border-radius: 3px;--baklava-sidebar-color-background: #1b202c;--baklava-sidebar-color-foreground: white;--baklava-node-color-background: #1b202c;--baklava-node-color-foreground: white;--baklava-node-color-hover: #e28c4677;--baklava-node-color-selected: var(--baklava-control-color-primary);--baklava-node-color-resize-handle: var(--baklava-control-color-background);--baklava-node-title-color-background: #151a24;--baklava-node-title-color-foreground: white;--baklava-group-node-title-color-background: #215636;--baklava-group-node-title-color-foreground: white;--baklava-node-interface-port-tooltip-color-foreground: var(--baklava-control-color-primary);--baklava-node-interface-port-tooltip-color-background: var(--baklava-editor-background-pattern-black);--baklava-node-border-radius: 6px;--baklava-color-connection-default: #737f96;--baklava-color-connection-allowed: #48bc79;--baklava-color-connection-forbidden: #bc4848;--baklava-editor-background-pattern-default: #202b3c;--baklava-editor-background-pattern-line: #263140;--baklava-editor-background-pattern-black: #263140;--baklava-context-menu-background: #1b202c;--baklava-context-menu-shadow: 0 0 8px rgba(0, 0, 0, .65);--baklava-toolbar-background: #1b202caa;--baklava-toolbar-foreground: white;--baklava-node-palette-background: #1b202caa;--baklava-node-palette-foreground: white;--baklava-visual-transition: .1s linear}.baklava-button{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);transition:background-color var(--baklava-visual-transition);border:none;padding:.45em .35em;border-radius:var(--baklava-control-border-radius);font-size:inherit;cursor:pointer;overflow-x:hidden}.baklava-button:hover{background-color:var(--baklava-control-color-hover)}.baklava-button:active{background-color:var(--baklava-control-color-primary)}.baklava-button.--block{width:100%}.baklava-checkbox{display:flex;padding:.35em 0;cursor:pointer;overflow-x:hidden;align-items:center}.baklava-checkbox .__checkmark-container{display:flex;background-color:var(--baklava-control-color-background);border-radius:var(--baklava-control-border-radius);transition:background-color var(--baklava-visual-transition);width:18px;height:18px}.baklava-checkbox:hover .__checkmark-container{background-color:var(--baklava-control-color-hover)}.baklava-checkbox:active .__checkmark-container{background-color:var(--baklava-control-color-active)}.baklava-checkbox .__checkmark{stroke-dasharray:15;stroke-dashoffset:15;stroke:var(--baklava-control-color-foreground);stroke-width:2px;fill:none;transition:stroke-dashoffset var(--baklava-visual-transition)}.baklava-checkbox.--checked .__checkmark{stroke-dashoffset:0}.baklava-checkbox.--checked .__checkmark-container{background-color:var(--baklava-control-color-primary)}.baklava-checkbox .__label{margin-left:.5rem}.baklava-context-menu{color:var(--baklava-control-color-foreground);position:absolute;display:inline-block;z-index:100;background-color:var(--baklava-context-menu-background);box-shadow:var(--baklava-context-menu-shadow);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);min-width:6rem;width:-moz-max-content;width:max-content}.baklava-context-menu>.item{display:flex;align-items:center;padding:.35em 1em;transition:background .05s linear;position:relative}.baklava-context-menu>.item>.__label{flex:1 1 auto}.baklava-context-menu>.item>.__submenu-icon{margin-left:.75rem}.baklava-context-menu>.item.--disabled{color:var(--baklava-control-color-hover)}.baklava-context-menu>.item:not(.--header):not(.--active):not(.--disabled):hover{background:var(--baklava-control-color-primary)}.baklava-context-menu>.item.--active{background:var(--baklava-control-color-primary)}.baklava-context-menu.--nested{left:100%;top:0}.baklava-context-menu.--flipped-x.--nested{left:unset;right:100%}.baklava-context-menu.--flipped-y.--nested{top:unset;bottom:0}.baklava-context-menu>.divider{margin:.35em 0;height:1px;background-color:var(--baklava-control-color-hover)}.baklava-icon{display:block;height:100%}.baklava-icon.--clickable{cursor:pointer;transition:color var(--baklava-visual-transition)}.baklava-icon.--clickable:hover{color:var(--baklava-control-color-primary)}.baklava-input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);border:none;border-radius:var(--baklava-control-border-radius);padding:.45em .75em;width:100%;transition:background-color var(--baklava-visual-transition);font-size:inherit;font:inherit}.baklava-input:hover{background-color:var(--baklava-control-color-hover)}.baklava-input:active{background-color:var(--baklava-control-color-active)}.baklava-input:focus-visible{outline:1px solid var(--baklava-control-color-primary)}.baklava-input[type=number]::-webkit-inner-spin-button,.baklava-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.baklava-input.--invalid{box-shadow:0 0 2px 2px var(--baklava-control-color-error)}.baklava-num-input{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);width:100%;display:grid;grid-template-columns:20px 1fr 20px}.baklava-num-input>.__button{display:flex;flex:0 0 auto;width:20px;justify-content:center;align-items:center;transition:background var(--baklava-visual-transition);cursor:pointer}.baklava-num-input>.__button:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__button:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__button.--dec{grid-area:1/1/span 1/span 1}.baklava-num-input>.__button.--dec>svg{transform:rotate(90deg)}.baklava-num-input>.__button.--inc{grid-area:1/3/span 1/span 1}.baklava-num-input>.__button.--inc>svg{transform:rotate(-90deg)}.baklava-num-input>.__button path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-num-input>.__content{grid-area:1/2/span 1/span 1;display:inline-flex;cursor:pointer;max-width:100%;min-width:0;align-items:center;transition:background-color var(--baklava-visual-transition)}.baklava-num-input>.__content:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__content:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__content>.__label,.baklava-num-input>.__content>.__value{margin:.35em 0;padding:0 .5em}.baklava-num-input>.__content>.__label{flex:1;min-width:0;overflow:hidden}.baklava-num-input>.__content>.__value{text-align:right}.baklava-num-input>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-select{width:100%;position:relative;color:var(--baklava-control-color-foreground)}.baklava-select.--open>.__selected{border-bottom-left-radius:0;border-bottom-right-radius:0}.baklava-select.--open>.__selected>.__icon{transform:rotate(180deg)}.baklava-select>.__selected{background-color:var(--baklava-control-color-background);padding:.35em .75em;border-radius:var(--baklava-control-border-radius);transition:background var(--baklava-visual-transition);min-height:1.7em;display:flex;align-items:center;cursor:pointer}.baklava-select>.__selected:hover{background:var(--baklava-control-color-hover)}.baklava-select>.__selected:active{background:var(--baklava-control-color-active)}.baklava-select>.__selected>.__text{flex:1 0 auto;flex-basis:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.baklava-select>.__selected>.__icon{flex:0 0 auto;display:flex;justify-content:center;align-items:center;transition:transform .25s ease;width:18px;height:18px}.baklava-select>.__selected>.__icon path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-select>.__dropdown{position:absolute;top:100%;left:0;right:0;z-index:10;background-color:var(--baklava-context-menu-background);filter:drop-shadow(0 0 4px black);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);max-height:15em;overflow-y:scroll}.baklava-select>.__dropdown::-webkit-scrollbar{width:0px;background:transparent}.baklava-select>.__dropdown>.item{padding:.35em .35em .35em 1em;transition:background .05s linear}.baklava-select>.__dropdown>.item:not(.--header):not(.--active){cursor:pointer}.baklava-select>.__dropdown>.item:not(.--header):not(.--active):hover{background:var(--baklava-control-color-hover)}.baklava-select>.__dropdown>.item.--active{background:var(--baklava-control-color-primary)}.baklava-select>.__dropdown>.item.--header{color:var(--baklava-control-color-disabled-foreground);border-bottom:1px solid var(--baklava-control-color-disabled-foreground);padding:.5em .35em .5em 1em}.baklava-slider{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);position:relative;cursor:pointer}.baklava-slider>.__content{display:flex;position:relative}.baklava-slider>.__content>.__label,.baklava-slider>.__content>.__value{flex:1 1 auto;margin:.35em 0;padding:0 .5em;text-overflow:ellipsis}.baklava-slider>.__content>.__value{text-align:right}.baklava-slider>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-slider>.__slider{position:absolute;top:0;bottom:0;left:0;background-color:var(--baklava-control-color-primary);border-radius:var(--baklava-control-border-radius)}.baklava-connection{stroke:var(--baklava-color-connection-default);stroke-width:2px;fill:none}.baklava-connection.--temporary{stroke-width:4px;stroke-dasharray:5 5;stroke-dashoffset:0;animation:dash 1s linear infinite;transform:translateY(-1px)}@keyframes dash{to{stroke-dashoffset:20}}.baklava-connection.--allowed{stroke:var(--baklava-color-connection-allowed)}.baklava-connection.--forbidden{stroke:var(--baklava-color-connection-forbidden)}.baklava-minimap{position:absolute;height:15%;width:15%;min-width:150px;max-width:90%;top:20px;right:20px;z-index:900}.baklava-editor{width:100%;height:100%;position:relative;overflow:hidden;outline:none!important;font-family:Lato,Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:15px;touch-action:none}.baklava-editor .background{background-color:var(--baklava-editor-background-pattern-default);background-image:linear-gradient(var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(90deg,var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(var(--baklava-editor-background-pattern-line) 1px,transparent 1px),linear-gradient(90deg,var(--baklava-editor-background-pattern-line) 1px,transparent 1px);background-repeat:repeat;width:100%;height:100%;pointer-events:none!important}.baklava-editor *:not(input):not(textarea){user-select:none;-moz-user-select:none;-webkit-user-select:none;touch-action:none}.baklava-editor .input-user-select{user-select:auto;-moz-user-select:auto;-webkit-user-select:auto}.baklava-editor *,.baklava-editor *:after,.baklava-editor *:before{box-sizing:border-box}.baklava-editor.--temporary-connection{cursor:crosshair}.baklava-editor .connections-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none!important}.baklava-editor .node-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.baklava-editor .node-container *{pointer-events:all}.baklava-ignore-mouse *{pointer-events:none!important}.baklava-ignore-mouse .__port{pointer-events:all!important}.baklava-node-interface{padding:.25em 0;position:relative}.baklava-node-interface .__port{position:absolute;width:10px;height:10px;background:white;border-radius:50%;top:calc(50% - 5px);cursor:crosshair}.baklava-node-interface .__port.--selected{outline:2px var(--baklava-color-connection-default) solid;outline-offset:4px}.baklava-node-interface.--input{text-align:left;padding-left:.5em}.baklava-node-interface.--input .__port{left:-1.1em}.baklava-node-interface.--output{text-align:right;padding-right:.5em}.baklava-node-interface.--output .__port{right:-1.1em}.baklava-node-interface .__tooltip{position:absolute;left:5px;top:15px;transform:translate(-50%);background:var(--baklava-node-interface-port-tooltip-color-background);color:var(--baklava-node-interface-port-tooltip-color-foreground);padding:.25em .5em;text-align:center;z-index:2}.baklava-node-palette{position:absolute;left:0;top:60px;width:250px;height:calc(100% - 60px);z-index:3;padding:2rem;overflow-y:auto;background:var(--baklava-node-palette-background);color:var(--baklava-node-palette-foreground)}.baklava-node-palette h1{margin-top:2rem}.baklava-node.--palette{position:unset;margin:1rem 0;cursor:grab}.baklava-node.--palette:first-child{margin-top:0}.baklava-node.--palette .__title{padding:.5rem;border-radius:var(--baklava-node-border-radius)}.baklava-dragged-node{position:absolute;width:calc(250px - 4rem);height:40px;z-index:4;pointer-events:none}.baklava-node{background:var(--baklava-node-color-background);color:var(--baklava-node-color-foreground);border:1px solid transparent;border-radius:var(--baklava-node-border-radius);position:absolute;box-shadow:0 0 4px #000c;transition:border-color var(--baklava-visual-transition),box-shadow var(--baklava-visual-transition);width:var(--width)}.baklava-node:hover{border-color:var(--baklava-node-color-hover)}.baklava-node:hover .__resize-handle:after{opacity:1}.baklava-node.--selected{z-index:5;border-color:var(--baklava-node-color-selected)}.baklava-node.--dragging{box-shadow:0 0 12px #000c}.baklava-node.--dragging>.__title{cursor:grabbing}.baklava-node>.__title{display:flex;background:var(--baklava-node-title-color-background);color:var(--baklava-node-title-color-foreground);padding:.4em .75em;border-radius:var(--baklava-node-border-radius) var(--baklava-node-border-radius) 0 0;cursor:grab}.baklava-node>.__title>*:first-child{flex-grow:1}.baklava-node>.__title>.__title-label{pointer-events:none}.baklava-node>.__title>.__menu{position:relative;cursor:initial}.baklava-node[data-node-type^=__baklava_]>.__title{background:var(--baklava-group-node-title-color-background);color:var(--baklava-group-node-title-color-foreground)}.baklava-node>.__content{padding:.75em}.baklava-node>.__content>div>div{margin:.5em 0}.baklava-node.--two-column>.__content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-template-areas:". ." ". ."}.baklava-node.--two-column>.__content>.__inputs{grid-row:1;grid-column:1}.baklava-node.--two-column>.__content>.__outputs{grid-row:1;grid-column:2}.baklava-node .__resize-handle{position:absolute;right:0;bottom:0;width:1rem;height:1rem;transform:translate(50%);cursor:ew-resize}.baklava-node .__resize-handle:after{content:"";position:absolute;bottom:0;left:-.5rem;width:1rem;height:1rem;opacity:0;border-bottom-right-radius:var(--baklava-node-border-radius);transition:opacity var(--baklava-visual-transition);background:linear-gradient(-45deg,transparent 10%,var(--baklava-node-color-resize-handle) 10%,var(--baklava-node-color-resize-handle) 15%,transparent 15%,transparent 30%,var(--baklava-node-color-resize-handle) 30%,var(--baklava-node-color-resize-handle) 35%,transparent 35%,transparent 50%,var(--baklava-node-color-resize-handle) 50%,var(--baklava-node-color-resize-handle) 55%,transparent 55%)}.baklava-sidebar{position:absolute;height:100%;width:25%;min-width:300px;max-width:90%;top:0;right:0;z-index:1000;background-color:var(--baklava-sidebar-color-background);color:var(--baklava-sidebar-color-foreground);box-shadow:none;overflow-x:hidden;padding:1em;transform:translate(100%);transition:transform .5s;display:flex;flex-direction:column}.baklava-sidebar.--open{transform:translate(0);box-shadow:0 0 15px #000}.baklava-sidebar .__resizer{position:absolute;left:0;top:0;height:100%;width:4px;cursor:col-resize}.baklava-sidebar .__header{display:flex;align-items:center}.baklava-sidebar .__header .__node-name{margin-left:.5rem}.baklava-sidebar .__close{font-size:2em;border:none;background:none;color:inherit;cursor:pointer}.baklava-sidebar .__interface{margin:.5em 0}.baklava-toolbar{position:absolute;left:0;top:0;width:100%;height:60px;z-index:3;padding:.5rem 2rem;background:var(--baklava-toolbar-background);color:var(--baklava-toolbar-foreground);display:flex;align-items:center}.baklava-toolbar-entry{margin-left:.5rem;margin-right:.5rem}.baklava-toolbar-button{color:var(--baklava-toolbar-foreground);background:none;border:none;transition:color var(--baklava-visual-transition)}.baklava-toolbar-button:not([disabled]){cursor:pointer}.baklava-toolbar-button:hover:not([disabled]){color:var(--baklava-control-color-primary)}.baklava-toolbar-button[disabled]{color:var(--baklava-control-color-disabled-foreground)}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .1s ease-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(5px);opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease-out!important}.fade-enter-from,.fade-leave-to{opacity:0}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:PTSans,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.tooltip-arrow,.tooltip-arrow:before{position:absolute;width:8px;height:8px;background:inherit}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1F2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{color:#fff;background:#4B5563}.dark input[type=file]::file-selector-button:hover{background:#6B7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6B7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-moz-range-thumb{background:#6B7280}input[type=range]::-moz-range-progress{background:#3F83F8}input[type=range]::-ms-fill-lower{background:#3F83F8}.toggle-bg:after{content:"";position:absolute;top:.125rem;left:.125rem;background:white;border-color:#d1d5db;border-width:1px;border-radius:9999px;height:1.25rem;width:1.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}input:checked+.toggle-bg:after{transform:translate(100%);border-color:#fff}input:checked+.toggle-bg{background:#1C64F2;border-color:#1c64f2}*{scrollbar-color:initial;scrollbar-width:initial}html{scroll-behavior:smooth}@font-face{font-family:Roboto;src:url(/assets/Roboto-Regular-7277cfb8.ttf) format("truetype")}@font-face{font-family:PTSans;src:url(/assets/PTSans-Regular-23b91352.ttf) format("truetype")}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-1{bottom:-.25rem}.-bottom-1\.5{bottom:-.375rem}.-bottom-2{bottom:-.5rem}.-bottom-4{bottom:-1rem}.-left-1{left:-.25rem}.-left-1\.5{left:-.375rem}.-right-0{right:-0px}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-1{top:-.25rem}.-top-1\.5{top:-.375rem}.-top-20{top:-5rem}.bottom-0{bottom:0}.bottom-16{bottom:4rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-20{bottom:5rem}.bottom-5{bottom:1.25rem}.bottom-\[60px\]{bottom:60px}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-20{left:5rem}.left-7{left:1.75rem}.left-9{left:2.25rem}.right-0{right:0}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-20{right:5rem}.right-3{right:.75rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.-m-4{margin:-1rem}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-my-1{margin-top:-.25rem;margin-bottom:-.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-4\/5{height:80%}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[200px\]{height:200px}.h-auto{height:auto}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-6{max-height:1.5rem}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[400px\]{max-height:400px}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-\[500px\]{min-height:500px}.min-h-\[900px\]{min-height:900px}.min-h-full{min-height:100%}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-3\/5{width:60%}.w-36{width:9rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-\[23rem\]{min-width:23rem}.min-w-\[24rem\]{min-width:24rem}.min-w-\[300px\]{min-width:300px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[23rem\]{max-width:23rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-\[900px\]{max-width:900px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0{--tw-translate-y: -0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\[40px\,1fr\]{grid-template-columns:40px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1rem * var(--tw-space-x-reverse));margin-left:calc(-1rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-bg-dark{border-color:var(--color-bg-dark)}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity: 1;border-color:rgb(214 31 105 / var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity: 1;border-color:rgb(191 18 93 / var(--tw-border-opacity))}.border-primary{border-color:var(--color-primary)}.border-primary-light{border-color:var(--color-primary-light)}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(126 58 242 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-secondary{border-color:var(--color-secondary)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(194 120 3 / var(--tw-border-opacity))}.bg-accent{background-color:var(--color-accent)}.bg-bg-dark-tone-panel{background-color:var(--color-bg-dark-tone-panel)}.bg-bg-light{background-color:var(--color-bg-light)}.bg-bg-light-discussion{background-color:var(--color-bg-light-discussion)}.bg-bg-light-panel{background-color:var(--color-bg-light-panel)}.bg-bg-light-tone{background-color:var(--color-bg-light-tone)}.bg-bg-light-tone-panel{background-color:var(--color-bg-light-tone-panel)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-300{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(254 236 220 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-white\/50{background-color:#ffffff80}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-70{--tw-bg-opacity: .7}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-bg-light{--tw-gradient-from: var(--color-bg-light) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bg-light-tone{--tw-gradient-from: var(--color-bg-light-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #0E9F6E var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-500{--tw-gradient-from: #84cc16 var(--tw-gradient-from-position);--tw-gradient-to: rgb(132 204 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #F05252 var(--tw-gradient-from-position);--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #0694A2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-5\%{--tw-gradient-from-position: 5%}.via-bg-light{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-light) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-600{--tw-gradient-to: rgb(8 145 178 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0891b2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-600{--tw-gradient-to: rgb(5 122 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #057A55 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-600{--tw-gradient-to: rgb(101 163 13 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #65a30d var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(214 31 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D61F69 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-600{--tw-gradient-to: rgb(224 36 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E02424 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-600{--tw-gradient-to: rgb(4 116 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #047481 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-10\%{--tw-gradient-via-position: 10%}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-700{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #046C4E var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.to-lime-700{--tw-gradient-to: #4d7c0f var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-700{--tw-gradient-to: #BF125D var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #C81E1E var(--tw-gradient-to-position)}.to-teal-700{--tw-gradient-to: #036672 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.to-100\%{--tw-gradient-to-position: 100%}.fill-blue-600{fill:#1c64f2}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-secondary{fill:var(--color-secondary)}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-24{padding-top:6rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-sans{font-family:PTSans,Roboto,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[\.82rem\]{font-size:.82rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-dark-text-panel{color:var(--color-dark-text-panel)}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-200{--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(81 69 205 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.text-light-text-panel{color:var(--color-light-text-panel)}.text-orange-200{--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity: 1;color:rgb(214 31 105 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(191 18 93 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-200{--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-secondary{color:var(--color-secondary)}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(142 75 16 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.text-opacity-95{--tw-text-opacity: .95}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-800\/80{--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-800\/80{--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-800\/80{--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-800\/80{--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-800\/80{--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-800\/80{--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-800\/80{--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.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)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));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)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));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)}.grayscale-0{--tw-grayscale: grayscale(0);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-sm{--tw-backdrop-blur: blur(4px);-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,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.scrollbar{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar{scrollbar-width:auto}.scrollbar::-webkit-scrollbar{display:block;width:var(--scrollbar-width, 16px);height:var(--scrollbar-height, 16px)}.scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-bg-light{--scrollbar-track: var(--color-bg-light) !important}.scrollbar-track-bg-light-tone{--scrollbar-track: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone{--scrollbar-thumb: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone-panel{--scrollbar-thumb: var(--color-bg-light-tone-panel) !important}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.display-none{display:none}h1{font-size:36px;font-weight:700}h2{font-size:24px;font-weight:700}h3{font-size:18px;font-weight:700}h4{font-size:18px;font-style:italic}p{font-size:16px;word-wrap:break-word;overflow-wrap:break-word;white-space:normal}ul{list-style-type:disc;margin-left:0}li{list-style-type:disc;margin-left:20px}ol{list-style-type:decimal;margin-left:20px}:root{--color-primary: #0e8ef0;--color-primary-light: #3dabff;--color-secondary: #0fd974;--color-accent: #f0700e;--color-light-text-panel: #ffffff;--color-dark-text-panel: #ffffff;--color-bg-light-panel: #7cb5ec;--color-bg-light: #e2edff;--color-bg-light-tone: #b9d2f7;--color-bg-light-code-block: #cad7ed;--color-bg-light-tone-panel: #8fb5ef;--color-bg-light-discussion: #c5d8f8;--color-bg-light-discussion-odd: #d6e7ff;--color-bg-dark: #132e59;--color-bg-dark-tone: #25477d;--color-bg-dark-tone-panel: #4367a3;--color-bg-dark-code-block: #2254a7;--color-bg-dark-discussion: #435E8A;--color-bg-dark-discussion-odd: #284471}.last\:mb-0:last-child{margin-bottom:0}.last\:\!border-transparent:last-child{border-color:transparent!important}.last\:pb-0:last-child{padding-bottom:0}.odd\:bg-bg-light-tone:nth-child(odd){background-color:var(--color-bg-light-tone)}.even\:bg-bg-light-discussion-odd:nth-child(2n){background-color:var(--color-bg-light-discussion-odd)}.even\:bg-bg-light-tone-panel:nth-child(2n){background-color:var(--color-bg-light-tone-panel)}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:-translate-y-12{--tw-translate-y: -3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-secondary{border-color:var(--color-secondary)}.group:hover .group-hover\:bg-white\/50{background-color:#ffffff80}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity: 0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.group:hover .group-hover\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.hover\:z-10:hover{z-index:10}.hover\:z-20:hover{z-index:20}.hover\:block:hover{display:block}.hover\:h-8:hover{height:2rem}.hover\:-translate-y-2:hover{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:translate-y-\[-5px\]:hover{--tw-translate-y: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-95:hover{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-2:hover{border-width:2px}.hover\:border-solid:hover{border-style:solid}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(188 240 218 / var(--tw-border-opacity))}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.hover\:border-secondary:hover{border-color:var(--color-secondary)}.hover\:bg-accent:hover{background-color:var(--color-accent)}.hover\:bg-bg-light-tone:hover{background-color:var(--color-bg-light-tone)}.hover\:bg-bg-light-tone-panel:hover{background-color:var(--color-bg-light-tone-panel)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{background-color:var(--color-secondary)}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:from-teal-200:hover{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.hover\:fill-primary:hover{fill:var(--color-primary)}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.hover\:text-secondary:hover{color:var(--color-secondary)}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:scrollbar-thumb-primary{--scrollbar-thumb-hover: var(--color-primary) !important}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-secondary:focus{border-color:var(--color-secondary)}.focus\:text-blue-700:focus{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-blue-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-secondary:focus{--tw-ring-color: var(--color-secondary)}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:scale-75:active{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scrollbar-thumb-secondary{--scrollbar-thumb-active: var(--color-secondary) !important}:is(.dark .dark\:divide-gray-700)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}:is(.dark .dark\:border-bg-light){border-color:var(--color-bg-light)}:is(.dark .dark\:border-blue-500){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-500){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-600){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-800){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-900){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}:is(.dark .dark\:border-green-500){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-400){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-500){--tw-border-opacity: 1;border-color:rgb(231 70 148 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-400){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-500){--tw-border-opacity: 1;border-color:rgb(144 97 249 / var(--tw-border-opacity))}:is(.dark .dark\:border-red-500){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}:is(.dark .dark\:border-transparent){border-color:transparent}:is(.dark .dark\:border-yellow-300){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}:is(.dark .dark\:bg-bg-dark){background-color:var(--color-bg-dark)}:is(.dark .dark\:bg-bg-dark-discussion){background-color:var(--color-bg-dark-discussion)}:is(.dark .dark\:bg-bg-dark-tone){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:bg-bg-dark-tone-panel){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .dark\:bg-black){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-200){--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-500){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-600){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-700){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-800){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-900){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-200){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-300){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-400){--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-600){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-700){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800\/30){background-color:#1f29374d}:is(.dark .dark\:bg-gray-800\/50){background-color:#1f293780}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-200){--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-500){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-600){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-800){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-200){--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-500){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-700){--tw-bg-opacity: 1;background-color:rgb(180 52 3 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-800){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-200){--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-600){--tw-bg-opacity: 1;background-color:rgb(214 31 105 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-200){--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-500){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-600){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-200){--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-500){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-600){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-800){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-yellow-200){--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-opacity-70){--tw-bg-opacity: .7}:is(.dark .dark\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\:from-bg-dark){--tw-gradient-from: var(--color-bg-dark) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-bg-dark-tone){--tw-gradient-from: var(--color-bg-dark-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:via-bg-dark){--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-dark) var(--tw-gradient-via-position), var(--tw-gradient-to)}:is(.dark .dark\:fill-gray-300){fill:#d1d5db}:is(.dark .dark\:fill-white){fill:#fff}:is(.dark .dark\:text-blue-200){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-500){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-800){--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}:is(.dark .dark\:text-dark-text-panel){color:var(--color-dark-text-panel)}:is(.dark .dark\:text-gray-200){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-800){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-100){--tw-text-opacity: 1;color:rgb(222 247 236 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-200){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-500){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-800){--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-900){--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-500){--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-900){--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}:is(.dark .dark\:text-light-text-panel){color:var(--color-light-text-panel)}:is(.dark .dark\:text-orange-200){--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-400){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-500){--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-900){--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}:is(.dark .dark\:text-primary){color:var(--color-primary)}:is(.dark .dark\:text-purple-400){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-500){--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-900){--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-200){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-500){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-800){--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-900){--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-50){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-300){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-500){--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-800){--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-900){--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-gray-400)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:shadow-lg){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-blue-800\/80){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-cyan-800\/80){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-green-800\/80){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-lime-800\/80){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-pink-800\/80){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-purple-800\/80){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-red-800\/80){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-teal-800\/80){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:ring-gray-500){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:ring-offset-gray-700){--tw-ring-offset-color: #374151}:is(.dark .dark\:ring-offset-gray-800){--tw-ring-offset-color: #1F2937}:is(.dark .dark\:scrollbar-track-bg-dark){--scrollbar-track: var(--color-bg-dark) !important}:is(.dark .dark\:scrollbar-track-bg-dark-tone){--scrollbar-track: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone){--scrollbar-thumb: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone-panel){--scrollbar-thumb: var(--color-bg-dark-tone-panel) !important}:is(.dark .odd\:dark\:bg-bg-dark-tone):nth-child(odd){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:even\:bg-bg-dark-discussion-odd:nth-child(2n)){background-color:var(--color-bg-dark-discussion-odd)}:is(.dark .dark\:even\:bg-bg-dark-tone-panel:nth-child(2n)){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .group:hover .dark\:group-hover\:bg-gray-800\/60){background-color:#1f293799}:is(.dark .group:hover .dark\:group-hover\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .group:focus .dark\:group-focus\:ring-gray-800\/70){--tw-ring-color: rgb(31 41 55 / .7)}:is(.dark .dark\:hover\:border-gray-600:hover){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-primary:hover){border-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-bg-dark-tone:hover){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:hover\:bg-blue-300:hover){--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-600:hover){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-700:hover){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-600:hover){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-700:hover){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-800:hover){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-300:hover){--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-600:hover){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-700:hover){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-500:hover){--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-700:hover){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-primary:hover){background-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-purple-500:hover){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-700:hover){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-300:hover){--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-600:hover){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-700:hover){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-secondary:hover){background-color:var(--color-secondary)}:is(.dark .dark\:hover\:bg-yellow-300:hover){--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-400:hover){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}:is(.dark .hover\:dark\:bg-bg-dark-tone):hover{background-color:var(--color-bg-dark-tone)}:is(.dark .hover\:dark\:bg-bg-dark-tone-panel):hover{background-color:var(--color-bg-dark-tone-panel)}:is(.dark .hover\:dark\:bg-bg-light-tone):hover{background-color:var(--color-bg-light-tone)}:is(.dark .dark\:hover\:fill-primary:hover){fill:var(--color-primary)}:is(.dark .dark\:hover\:text-blue-500:hover){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-300:hover){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-900:hover){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:scrollbar-thumb-primary){--scrollbar-thumb-hover: var(--color-primary) !important}:is(.dark .dark\:focus\:border-blue-500:focus){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:focus\:border-secondary:focus){border-color:var(--color-secondary)}:is(.dark .dark\:focus\:text-white:focus){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:focus\:ring-blue-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-cyan-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-green-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-lime-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-400:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-secondary:focus){--tw-ring-color: var(--color-secondary)}:is(.dark .dark\:focus\:ring-teal-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-offset-gray-700:focus){--tw-ring-offset-color: #374151}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:w-1\/4{width:25%}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:inset-0{top:0;right:0;bottom:0;left:0}.md\:order-2{order:2}.md\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/4{width:25%}.md\:w-48{width:12rem}.md\:w-auto{width:auto}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-6{padding:1.5rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}:is(.dark .md\:dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .md\:dark\:hover\:bg-transparent:hover){background-color:transparent}:is(.dark .md\:dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}}@media (min-width: 1280px){.xl\:h-80{height:20rem}.xl\:w-1\/6{width:16.666667%}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}} diff --git a/web/dist/index.html b/web/dist/index.html index 0d3d73fc..e0618828 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -6,8 +6,8 @@ LoLLMS WebUI - Welcome - - + +
diff --git a/web/src/views/SettingsView.vue b/web/src/views/SettingsView.vue index b4ae5e55..65d7dc52 100644 --- a/web/src/views/SettingsView.vue +++ b/web/src/views/SettingsView.vue @@ -1304,6 +1304,21 @@ + + + + + + + + diff --git a/zoos/bindings_zoo b/zoos/bindings_zoo index 71811281..706da62f 160000 --- a/zoos/bindings_zoo +++ b/zoos/bindings_zoo @@ -1 +1 @@ -Subproject commit 718112818f4391db7d11267cd9f65d97fb3c6e71 +Subproject commit 706da62fe9deacdc9840ca9bf384efc25c61b323