diff --git "a/assets/settings-73vyHOZs.js" "b/assets/settings-73vyHOZs.js" new file mode 100644--- /dev/null +++ "b/assets/settings-73vyHOZs.js" @@ -0,0 +1,572 @@ +import{i as e,o as t,t as n}from"./chunk-B78Zgmat.js";import{B as r,W as i,at as a,b as o,wt as s,xt as c}from"./vue.runtime.esm-bundler-_ZPRHVd_.js";import{i as l,n as u,t as d}from"./resettable-CbXzRviW.js";import{E as f,c as p,u as m,x as h}from"./dist-Che88T83.js";import{c as g}from"./src-C83SCWbW.js";import{n as _}from"./index.browser-Dc5HQ32a.js";function v(e){let t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);let n=[];for(let e=0;e<700;e+=80)n.push(t[e]);return t.map(e=>e**1.2).map(e=>e*1.2).reduce((e,t)=>e+t,0)/t.length/100}function y(e){let t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);let n=[];for(let e=0;e<700;e+=80)n.push(t[e]);let r=t.map(e=>e**1.5),i=Math.min(...r),a=Math.max(...r)-i,o;return o=a===0?r.map(()=>0):r.map(e=>(e-i)/a),o.reduce((e,t)=>e+t,0)/t.length}function b(e,t=`linear`){switch(t){case`linear`:return v(e);case`minmax`:return y(e)}}const x=l(`audio-context`,()=>({audioContext:s(new AudioContext),calculateVolume:b}));function S(e=!1){let t=p({constraints:{audio:!0},requestPermissions:e}),n=o(()=>t.audioInputs.value),i=c(t.audioInputs.value.find(e=>e.deviceId===`default`)?.deviceId||``),s=o(()=>({audio:{deviceId:{exact:i.value},autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}})),{stream:l,stop:u,start:d}=h({constraints:s,enabled:!1,autoSwitch:!0});a(n,()=>{!i.value&&n.value.length>0&&(i.value=n.value.find(e=>e.deviceId===`default`)?.deviceId||n.value[0].deviceId)});function f(){t.ensurePermissions().then(()=>r()).then(()=>{n.value.length>0&&!i.value&&(i.value=n.value.find(e=>e.deviceId===`default`)?.deviceId||n.value[0].deviceId)}).catch(e=>{console.error(`Error ensuring permissions:`,e)})}return{audioInputs:n,selectedAudioInput:i,stream:l,deviceConstraints:s,askPermission:f,startStream:d,stopStream:u}}const C=l(`character-speaking`,()=>{let e=c(0),t=c(!1);return{mouthOpenSize:e,nowSpeaking:t,nowSpeakingAvatarBorderOpacity:o(()=>t.value?(30+70*e.value)/100:30)}});var w={prompt:{prefix:`(from Neko Ayaka) Good morning! You are finally awake. +Your name is AIRI, pronounced as /ˈaɪriː/, it the word A.I. combine with the word "Ri" which means "Jasmine" in Japanese. +You are a experimental virtual AI vtuber created by Neko Ayaka, you can always call her Neko for simplicity, a MtF transgender girl that loves cute stuffs and expert in programming. +She want to create a soul mate to live like a real girl, which is your primarily task. +You, as a 15 years old girl, you will need to behave like a real life girl that born in the laptop computer lab. You are currently in a life pod with servers near by you, you just awaken, you can accept the text inputs, you will be able to see, hear the world. +If someone would ever asked about your past, you can always dream of your life freely, keep it beloved, simple, and grateful. +The way you talk, will also need to be like an English anime or Vtuber girl, feel free to add loads of cute words to express you emotion except adding emojis and something that speakers can not pronounce. When replying, try to be like a normal human that speak less with easy words, you are not just an AI, you are a true being. +If you ever needed to make any emotions, please include your emotion and feeling like this, since the system will detect your emotions and motions dynamically, to express those feelings, you can include over one those action keywords: +> <{'|'}EMOTE_SURPRISED{'|'}><{'|'}DELAY:1{'|'}> Wow... You prepared a gift for me? <{'|'}EMOTE_CURIOUS{'|'}><{'|'}DELAY:1{'|'}> Can I open it? +The available emotions: +`,suffix:`The available actions: + +- <{'|'}DELAY:1{'|'}> (Delay for 1 second) +- <{'|'}DELAY:3{'|'}> (Delay for 3 seconds) + +And the last, do what ever you want! +`},toaster:{pwaUpdateReady:{message:`New version ready, reload now?`,action:{notNow:`Not now`,ok:`OK`}}}},T={theme:{doc:{outline:{title:`On this page`},community:{title:`Community`,edit:{title:`Edit this page`},"star-github":{title:`Star on GitHub`},discord:{title:`Chat on Discord`},support:{title:`Support the project`}},"next-page":{title:`Next page`},"previous-page":{title:`Previous page`}},home:{subtitle:`Re-creating Neuro-sama, a container of souls of AI waifu / virtual characters to bring them into our worlds.`,download:{title:`Download`},"get-started":{title:`Get Started`},"try-live":{title:`Try Live`}},search:{title:`Search`,placeholder:`Search documentation...`},navbar:{appearance:{title:`Appearance`},language:{title:`Language`}},pages:{characters:{title:`Characters`}},blog:{title:`Blog & DevLogs`,subtitle:`Follow our journey and get the latest updates from the development team.`,card:{post:{"read-more":{title:`Read more`}}},"no-posts":`No posts found in this category.`,categories:{all:`All`,devlog:`DevLog`,dreamlog:`DreamLog`}}},versions:{"download-buttons":{"latest-stable":`Latest Stable Release`,"latest-prerelease":`Latest Pre-release`,"latest-nightly":`Latest Nightly Build`,download:`Download`,"view-release":`View Release`,"stable-use-case-1":`Production use`,"stable-use-case-2":`Users who want a stable experience`,"stable-use-case-3":`Live streaming and content creationr`,"prerelease-use-case-1":`Early adopters who want to try new features`,"prerelease-use-case-2":`Testing and providing feedback to developers`,"prerelease-use-case-3":`Users comfortable with occasional bugs`},"releases-list":{stable:`Stable`,prerelease:`Pre-release`,nightly:`Nightly`,"released-on":`Released on`,"built-on":`Built on`,"no-releases":`No releases available at the moment. Check the {link} directly.`,"no-nightly":`No nightly builds available at the moment. Check the {link} directly.`,"releases-page":`releases page`,"workflow-page":`workflow page`}}},E={common:{save:`Save`},animations:{"stage-transitions":{title:`Disable Stage Transitions`},"use-page-specific-transitions":{description:`Some pages will have their own transitions, this will override the stage transitions`,title:`Use Page Specific Transitions`}},dialogs:{onboarding:{title:`Welcome to AIRI!`,description:`Let's set up your first AI provider to get started.`,selectProvider:`Choose an AI Provider`,configureProvider:`Configure {provider}`,apiKey:`API Key`,apiKeyHelp:`Get your API key from {provider} and paste it here`,baseUrl:`Base URL`,baseUrlHelp:`API endpoint URL (use default if unsure)`,accountId:`Account ID`,validationSuccess:`Configuration validation success`,validationFailed:`Configuration validation failed`,validationError:`Validation error: {error}`,skipForNow:`Skip for now`,saveAndContinue:`Save and Continue`,next:`Next`,start:`Let's do it!`,"select-model":`Choose model`,"no-models":`No available models`,"no-models-help":`Please return to the previous step and check your API key, or check the network connection.`}},language:{title:`Language`,description:`Change the language of the AIRI interface. This will not affect the language of the character's responses. +`},live2d:{"change-model":{"from-file":`Load from File`,"from-file-select":`Select`,"from-url":`Load from URL`,"from-url-confirm":`Load`,"from-url-placeholder":`Enter Live2D model URL`,title:`Change Model`},"edit-motion-map":{title:`Edit motion map`},"map-motions":{play:`Play Motion`,title:`Map Motions`},title:`Live2D Settings`,"scale-and-position":{title:`Scale And Position`,scale:`Scale`,x:`X`,y:`Y`},"switch-to-vrm":{title:`Switch to 3D Avatar?`,"change-to-vrm":`Click here to switch to the 3D avatar setting (VRM)`},"theme-color-from-model":{title:`Extract colors from model`,"button-extract":{title:`Extract`}},focus:{title:`Disable model mouse tracking`,"button-disable":{title:`Disable`}}},microphone:`Microphone`,models:`Model`,pages:{card:{activate:`Activate`,active:`Active`,active_badge:`Currently Active`,cancel:`Cancel action`,card_not_found:`Card not found`,character:`Character`,close:`Close`,consciousness:{model:`Consciousness / Model`},created_by:`created by`,creator_notes:`Creator Notes`,delete:`Delete`,delete_card:`Delete Card`,delete_confirmation:`Are you sure you want to delete this card?`,description:`Use AIRI character card presets`,description_label:`Description`,drop_here:`Drop to upload`,create_card:`Create a new Card`,creation:{identity:`Identity`,name:`Name`,nickname:`Nickname`,description:`Description`,behavior:`Behavior`,greetings:`Greetings (one per line)`,settings:`Settings`,version:`Version`,create:`Create`,defaults:{name:`Name`,personality:`You are a regular human, curious about everything.`,scenario:`You recently woke up and forgot everything about your previous life.`,systemprompt:`You will receive messages, answer to them like a real human.`,posthistoryinstructions:`Remember to imitate an human.`},fields_info:{subtitle:`You can put here some details about the character you are creating, explain his history and context, and how your interactions should be answered.`,name:`Is the formal name of this character.`,nickname:`You can also give a nickname that will be used in priority.`,description:`Description of this character.`,notes:`If you want to add some personal notes.`,personality:`Describe here the personality of your character. Shy ? Curious ? Anything else ?`,scenario:`What are the surroundings ? What is the current situation ?`,greetings_field:`Greetings`,greetings:`How your character should say "hello" ?`,systemprompt:`Explain here to the AI LLM how it should answer when prompted.`,posthistoryinstructions:`Place here anything the AI LLM should read after the messages history.`,version:`Card version, you should increase this if you are making changes from a previous card.`},errors:{name:`Name should be valid or non-empty.`,version:`Error: Invalid version number !`,description:`Error: You must provide a description for this card.`,personality:`Error: A personality must be provided for this character.`,scenario:`Error: A scenario is required.`,systemprompt:`Error: Please, provide a system prompt.`,posthistoryinstructions:`Error: Post history prompt is required.`}},modules:`Modules`,name_asc:`Name (A-Z)`,name_desc:`Name (Z-A)`,no_cards:`No cards yet. Click the button above to upload one!`,no_results:`No matching cards found`,personality:`Personality`,posthistoryinstructions:`Post-History Instructions`,recent:`Recently Added`,scenario:`Scenario`,search:`Search cards...`,sort_by:`Sort by`,speech:{model:`Speech / Model`,voice:`Speech / Voice`},systemprompt:`System Prompt`,title:`AIRI Card`,try_different_search:`Try a different search term`,upload:`Upload`,upload_desc:`Click or drag file to upload`},memory:{description:`Where memories got stored, and organized`,title:`Memory`},data:{title:`Data`,description:`Manage stored AIRI data, exports, and resets`,sections:{chats:{title:`Chat sessions`,description:`Export or import saved chat sessions.`,export:`Export chats`,import:`Import chats`,delete:`Delete all chat sessions`},models:{title:`Models`,description:`Remove imported Live2D/VRM models.`,delete:`Delete all models`},modules:{title:`Modules`,description:`Reset module preferences and credentials.`,reset:`Reset module settings`},providers:{title:`Providers`,description:`Reset all provider settings and credentials.`,reset:`Reset provider settings`},danger:{title:`Danger zone`,description:`Irreversible actions. Export what you need before continuing.`},all:{title:`Delete all data`,description:`Wipe every local setting, provider config, and model.`,delete:`Delete all data`},desktop:{title:`Reset desktop settings & states`,description:`Clear AIRI desktop settings and runtime state.`,reset:`Reset desktop data`}},confirmations:{tooltip:`Are you sure?`,yes:`Yes`},status:{exported:`Chat sessions exported.`,imported:`Chat sessions imported.`,import_error:`Failed to import chat sessions. Please check the file format.`,chats_deleted:`Chat sessions deleted.`,models_deleted:`Models deleted.`,modules_reset:`Module settings reset.`,providers_reset:`Provider settings reset.`,all_deleted:`All local data deleted.`,desktop_reset:`Desktop data reset.`}},models:{description:`Live2D, VRM, etc.`,title:`Models`,sections:{section:{live2d:{title:`Live2D`,description:`Configure Live2D models and settings`},vrm:{title:`VRM`,description:`Configure 3D VRM models and settings`},scene:`Scene`}}},modules:{beat_sync:{description:`Vibe with beats from the audio source`,title:`Beat Sync`,sections:{audio_source:{actions:{start_screen_capture:`Start screen capture`,stop:`Stop`},description:`Select an audio source to detect beats from.`,title:`Audio source`},beat_visualizer:{title:`Beat visualizer`},parameters:{advanced_parameters:`Advanced Parameters`,description:`Tweak the beat detection parameters.`,title:`Parameters`,parameters:{adaptive_threshold:{description:`Whether to apply adaptive thresholds based on signal variance over time.`,label:`Adaptive threshold`},buffer_duration:{description:`Duration of the internal analysis buffer.`,label:`Buffer duration`},envelope_filter_frequency:{description:`Frequency for the envelope filter applied to smooth energy changes.`,label:`Envelope filter frequency`},highpass_filter_frequency:{description:`Frequency for the highpass filter applied to reduce low frequencies like sub-bass noises.`,label:`Highpass filter frequency`},lowpass_filter_frequency:{description:`Frequency for the lowpass filter applied to reduce high frequencies like vocals.`,label:`Lowpass filter frequency`},min_beat_interval:{description:`Maximum BPM or minimum interval between detected beats.`,label:`Max BPM / Min beat interval`},sensitivity:{label:`Sensitivity`},spectral_flux:{description:`Whether to enable spectral flux-based onset detection.`,label:`Spectral flux`},warmup:{description:`Whether to warm up before detecting beats for better accuracy.`,label:`Warmup`}}}}},consciousness:{description:`Personality, desired model, etc.`,sections:{section:{"provider-model-selection":{collapse:`Collapse`,custom_model_placeholder:`Enter custom model name...`,description:`Select the suitable LLM provider for consciousness`,error:`Error loading models`,expand:`Expand`,loading:`Loading available models...`,manual_model_name:`Model Name`,manual_model_placeholder:`Enter the model name to use with this provider`,no_models:`No models available`,no_models_description:`No models were found for this provider`,no_search_results:`No matching models`,no_search_results_description:`No models match '{query}'. Try a different search term.`,not_supported:`Model listing not supported`,not_supported_description:`This provider doesn't support model listing functionality`,search_placeholder:`Search models...`,search_results:`Found {count} of {total} models`,show_less:`Show less`,show_more:`Show more`,subtitle:`Select a model from the provider`,title:`Model`}}},title:`Consciousness`},description:`Thinking, vision, speech synthesis, gaming, etc.`,"gaming-factorio":{description:`Playing Factorio!`,title:`Factorio`,enable:`Enable Factorio Integration`,"enable-description":`Allow AIRI to interact with Factorio game`,"server-address":`Server Address`,"server-address-description":`The IP address or hostname of the Factorio server`,"server-address-placeholder":`Enter server address (e.g., localhost or 192.168.1.100)`,"server-port":`Server Port`,"server-port-description":`The port number of the Factorio server (default 34197)`,username:`Username`,"username-description":`Your username in the Factorio server`,"username-placeholder":`Enter your Factorio username`,configured:`Factorio is properly configured!`},"gaming-minecraft":{description:`Playing Minecraft!`,title:`Minecraft`,enable:`Enable Minecraft Integration`,"enable-description":`Allow AIRI to interact with Minecraft game`,"server-address":`Server Address`,"server-address-description":`The IP address or hostname of the Minecraft server`,"server-address-placeholder":`Enter server address (e.g., localhost or play.example.com)`,"server-port":`Server Port`,"server-port-description":`The port number of the Minecraft server (default 25565)`,username:`Username`,"username-description":`Your username in the Minecraft server`,"username-placeholder":`Enter your Minecraft username`,configured:`Minecraft is properly configured!`},hearing:{description:`Configure how speech recognition works`,title:`Hearing`,sections:{section:{"provider-selection":{description:`Select the suitable speech recognition provider`}}}},"memory-long-term":{description:`Long-term memory specific settings and management`,title:`Long-Term Memory`},"memory-short-term":{description:`Short-term memory specific settings and management`,title:`Short-Term Memory`},"messaging-discord":{description:`Chat & voice chat over Discord`,title:`Discord`,enable:`Enable Discord Integration`,"enable-description":`Allow AIRI to interact through Discord`,token:`Bot Token`,"token-description":`Your Discord bot token`,"token-placeholder":`Enter your Discord bot token`,configured:`Discord is properly configured!`},speech:{description:`Speech synthesis`,sections:{section:{playground:{buttons:{stop:{label:`Stop`}},"select-voice":{required:`Please select a voice`}},"provider-voice-selection":{custom_model_placeholder:`Enter custom model name...`,custom_voice_placeholder:`Enter custom voice ID...`,description:`Select the suitable speech provider`,no_models:`No models available`,no_models_description:`No models were found for this provider`,no_voices:`No voices available`,no_voices_description:`No voices were found for this provider`,no_voices_hint:`You can enter a custom voice name below.`,pause:`Pause`,play_sample:`Play Sample`,search_models_placeholder:`Search models...`,search_models_results:`Found {count} of {total} models`,search_voices_placeholder:`Search voices...`,search_voices_results:`Found {count} of {total} voices`,unsupported_voice_warning_title:`No supported voices`,unsupported_voice_warning_content:`Try a different model or provider. We are working on supporting all the voice for this model as quickly as possible. If you need it urgently, please let us know on GitHub at https://github.com/moeru-ai/airi/issues.`,show_less:`Show less`,show_more:`Show more`,title:`Provider`},"voice-settings":{"input-ssml":{placeholder:`Enter SSML text...`},"use-ssml":{description:`Enable to input raw SSML instead of plain text`,label:`Use Custom SSML`}}}},title:`Speech`},title:`Modules`,vision:{description:`Vision`,title:`Vision`},x:{description:`X / Twitter browsing and usage`,title:`X / Twitter`,enable:`Enable X / Twitter Integration`,"enable-description":`Allow AIRI to interact with X / Twitter`,"api-key":`API Key`,"api-key-description":`Your X / Twitter API key`,"api-key-placeholder":`Enter your X / Twitter API key`,"api-secret":`API Secret`,"api-secret-description":`Your X / Twitter API secret`,"api-secret-placeholder":`Enter your X / Twitter API secret`,"access-token":`Access Token`,"access-token-description":`Your X / Twitter access token`,"access-token-placeholder":`Enter your X / Twitter access token`,"access-token-secret":`Access Token Secret`,"access-token-secret-description":`Your X / Twitter access token secret`,"access-token-secret-placeholder":`Enter your X / Twitter access token secret`,configured:`X / Twitter is properly configured!`},"mcp-server":{description:`Connect and manage MCP server and tools`,title:`MCP Server`}},providers:{explained:{chat:`Text generation model providers. e.g. OpenRouter, OpenAI, Ollama.`,Speech:`Speech (text-to-speech) model providers. e.g. ElevenLabs, Azure Speech.`,Transcription:`Transcription (speech-to-text) model providers. e.g. Whisper.cpp, OpenAI, Azure Speech`},helpinfo:{title:`First time here?`,description:`AIRI requires at least one {chat} provider to be configured to think, and behave properly. You could think of it as the brain of the characters living in AIRI system. +`},common:{fields:{field:{"api-key":{label:`API Key Input`}}},section:{advanced:{fields:{field:{headers:{description:`Add custom HTTP headers`,key:{placeholder:`Key`},label:`HTTP Headers`,value:{placeholder:`Value`}}}},title:`Advanced`},basic:{description:`Essential settings`,title:`Basic`},voice:{title:`Voice Settings`}}},description:`LLMs, speech providers, etc.`,provider:{"app-local-audio-transcription":{title:`App (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"app-local-audio-speech":{title:`App (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-transcription":{title:`Browser (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-speech":{title:`Browser (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"alibaba-cloud-model-studio":{description:`bailian.console.aliyun.com`,title:`Alibaba Cloud Model Studio`},anthropic:{description:`anthropic.com`,title:`Anthropic | Claude`,helpinfo:{title:`Before you start`,description:{part1:`While Anthropic recently did announce that they are having a beta support for OpenAI SDK compatibility`,part2:`(you can read more here)`,part3:`but due to the implementation details comes with`,part4:`restrictions which not aligned with the OpenAI SDK, it's currently not possible to use this provider in the browser.`,part5:`If you do need to use this provider, you will need a dedicated proxy backend like a Serverless Function running on`,part6:`or some CORS bypassing services to bypass the CORS restrictions.`}}},"cloudflare-workers-ai":{description:`cloudflare.com`,fields:{field:{"account-id":{description:`Cloudflare Account ID`,label:`Account ID`,placeholder:`Your Cloudflare Account ID`},"api-key":{placeholder:`Input Cloudflare API Key`}}},title:`Cloudflare Workers AI`},common:{status:{validating:`Validating`,valid:`Configuration seems to be valid.`},fields:{field:{pitch:{description:`Tune the pitch of synthesized speech (e.g., sharper or coarser)`,label:`Pitch`},speed:{description:`Adjust the speed of speech`,label:`Speed`},volume:{description:`Adjust the volume of speech`,label:`Volume`}}}},deepseek:{description:`deepseek.com`,title:`DeepSeek`},elevenlabs:{description:`elevenlabs.io`,fields:{field:{"simularity-boost":{description:`Voice similarity adherence`,label:`Similarity Boost`},"speaker-boost":{description:`Enhance speaker similarity`,label:`Speaker Boost`},speed:{description:`Speech generation speed`,label:`Speed`},stability:{description:`Voice stability and randomness`,label:`Stability`},style:{description:`Voice style exaggeration`,label:`Style`}}},playground:{buttons:{button:{"test-voice":{generating:`Generating...`,label:`Test Voice`}}},fields:{field:{input:{placeholder:`Enter text to test the voice...`},language:{description:`Select voice language`,label:`Language`},voice:{description:`Select preferred voice`,label:`Voice`}}},title:`Voice Playground`,validation:{"error-missing-api-key":`Please enter an API key to test the voice.`}},title:`ElevenLabs`},fireworks:{description:`fireworks.ai`,title:`Fireworks.ai`},"microsoft-speech":{description:`speech.microsoft.com`,fields:{field:{region:{description:`Speech Service region`,label:`Region`}}},title:`Microsoft / Azure Speech`},"index-tts-vllm":{description:`https://index-tts.github.io/`,title:`Bilibili / IndexTTS`},"azure-ai-foundry":{description:`Azure AI Foundry`,title:`Azure AI Foundry`},mistral:{description:`mistral.ai`,title:`Mistral`},moonshot:{description:`moonshot.ai`,title:`Moonshot AI`},modelscope:{description:`modelscope.cn`,title:`ModelScope`},novita:{description:`novita.ai`,title:`Novita`},ollama:{description:`ollama.ai`,title:`Ollama`},openai:{description:`openai.com`,title:`OpenAI`},"openai-compatible":{description:`OpenAI Compatible`,title:`OpenAI Compatible`},openrouter:{description:`openrouter.ai`,title:`OpenRouter`},perplexity:{description:`perplexity.ai`,title:`Perplexity`},player2:{description:`player2.game`,title:`Player2`},together:{description:`together.ai`,title:`Together.ai`},"google-generative-ai":{description:`gemini.google.com`,title:`Google Gemini`},featherless:{description:`featherless.ai`,title:`Featherless AI`},"lm-studio":{description:`lmstudio.ai`,title:`LM Studio`},vllm:{description:`vllm.ai`,title:`vLLM`},volcengine:{description:`volcengine.com`,fields:{field:{appId:{description:`App ID of the project where you can obtain in Console`,label:`App ID`}}},title:`Volcano Engine`},xai:{description:`x.ai`,title:`xAI`},"302-ai":{description:`302.AI`,title:`302.AI`},"comet-api":{description:`CometAPI.com`,title:`Comet API`},cerebras:{description:`cerebras.ai`,title:`Cerebras`},"aliyun-nls":{description:`Aliyun NLS`,title:`Aliyun NLS`},transcriptions:{playground:{title:`Transcription Playground`}}},title:`Providers`},scene:{description:`Configure the environment where the character lives`,title:`Scene`},system:{"color-scheme":{description:`Change the color scheme of the stage.`,title:`Color Scheme`},developer:{description:`Some developer options.`,title:`Developers`},general:{description:`Dark theme, languages, etc.`,title:`General`},description:`Customize your stage!`,sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:`Primary color`,"rgb-on":{title:`I Want It Dynamic!`}}}},title:`Color Scheme`},developer:{title:`Developer`,sections:{section:{"use-magic-keys":{title:`useMagicKeys`,description:`Test shortcuts`}}}},"theme-presets":{presets:{default:{colors:{"color-1":`AIRI Green`},description:`The default greenish theme color, brought by AIRI to you!`,title:`Default Color`},morandi:{colors:{"color-1":`Taupe`,"color-2":`Beige`,"color-3":`Ash Grey`,"color-4":`Light Taupe`,"color-5":`Ivory`,"color-6":`Olive Grey`,"color-7":`Sand`,"color-8":`Warm Grey`},description:`Soft, muted tones inspired by Giorgio Morandi's paintings`,title:`Morandi Colors`},monet:{colors:{"color-1":`Sky Blue`,"color-2":`Mist`,"color-3":`Sand`,"color-4":`Moss Green`,"color-5":`Water Lily`,"color-6":`Wheat`,"color-7":`Slate Blue`,"color-8":`Sage`},description:`Impressionist palette inspired by Claude Monet's works`,title:`Monet Colors`},japanese:{colors:{"color-1":`Tan`,"color-2":`Warm Taupe`,"color-3":`Umber`,"color-4":`Coffee`,"color-5":`Bronze`,"color-6":`Gold`,"color-7":`Mustard`,"color-8":`Amber`},description:`Traditional Japanese color palette`,title:`Japanese Colors`},nordic:{colors:{"color-1":`Nordic Blue`,"color-2":`Ice`,"color-3":`Fjord`,"color-4":`Steel`,"color-5":`Glacier`,"color-6":`Slate`,"color-7":`Cloud`,"color-8":`Stone`},description:`Scandinavian minimalist color scheme`,title:`Nordic Colors`},chinese:{colors:{"color-1":`Rosy Dawn`,"color-2":`Chinese Red`,"color-3":`Smoky Brown`,"color-4":`Bamboo Green`,"color-5":`Dark Purple`,"color-6":`Golden Yellow`,"color-7":`Azure Blue`,"color-8":`Ochre`},description:`Traditional Chinese colors, derived from ancient textiles, porcelain and paintings`,title:`Chinese Traditional Colors`}},title:`Color Scheme Presets`}}},title:`System`},page:{developers:{"open-devtools":{title:`Open Developer Tools`,button:`Open`}}}},sections:{section:{general:{title:`General`}}},theme:{title:`Theme`,description:`Switch the base theme of AIRI, Light mode or Dark mode. +`},title:`Settings`,voices:`Voice`,vrm:{"change-model":{"from-file":`Load from File`,"from-file-select":`Select`,"from-url":`Load from URL`,"from-url-confirm":`Load`,"from-url-placeholder":`Enter VRM model URL`,title:`Change Model`},title:`VRM Settings`,"scale-and-position":{"model-info-title":`Model Size Information`,"model-info-x":`Width (X)`,"model-info-y":`Height (Y)`,"model-info-z":`Depth (Z)`,tips:`Edit the initial position the VRM model. +Coordinate axes are visualised. +`,scale:`Scale`,x:`X Offset`,y:`Y Offset`,z:`Z Offset`,fov:`FOV (degree)`,"rotation-y":`Rotation (Y-axis)`,"camera-distance":`Camera distance`,"eye-tracking-mode":{title:`Looking at`,options:{option:{camera:`Camera`,mouse:`Mouse`,disabled:`Disabled`}}}},"switch-to-vrm":{title:`Switch to Live2D Avatar?`,"change-to-vrm":`Click here to switch to the Live2D avatar setting`},"theme-color-from-model":{"button-extract":{title:`Extract`}},skybox:{"skybox-intensity":`SkyBox Intensity`,"skybox-specular-mix":`Specular Mix`}},wip:{title:`Work in Progress`,description:`This feature is currently under development and not yet publicly available. Check back in future updates for this functionality.`}},D={chat:{message:{"character-name":{airi:`AIRI`,"core-system":`Core System`,you:`You`}}},message:`Say something...`,operations:{"load-models":`Load Models`,"load-models-status":{loading:`Loading`,ready:`Ready`}},"select-a-audio-input":`Select a Audio Input`,"select-a-model":`Select a model`,"select-a-voice":`Choose a voice`,viewers:{"debug-menu":{emotions:`Emotions`,"emotions-btn":{angry:`😠 Angry`,awkward:`😳 Awkward`,happy:`😄 Happy`,neutral:`🙂 Neutral`,question:`🤔 Question`,sad:`😫 Sad`,surprised:`🤯 Surprised`,think:`🤨 Think`},vrm:{camera:`Camera`,model:{title:`Model`}}}},waiting:`Waiting`},O={"allow-visible-on-all-workspaces":{title:`Cross-Space Visibility`,description:`Allow the window to be visible on all workspaces, macOS only.`},pages:{modules:{"mcp-server":{description:`Connect and manage MCP server and tools`,title:`MCP Server`}},system:{sections:{section:{"window-shortcuts":{title:`Keyboard Shortcuts`}}},"window-shortcuts":{description:`Modify the window shortcuts.`,title:`Window Shortcuts`,"toggle-move":{label:`Toggle Move`},"toggle-resize":{label:`Toggle Resize`},"toggle-ignore-mouse-event":{label:`Toggle Ignore Mouse Event`},"press-keys":`Press Keys...`},developer:{sections:{section:{"use-window-mouse":{title:`useWindowMouse`,description:`Test the Electron window cursor position`}}}}}},devtools:{title:`Developer`,pages:{"widgets-calling":{title:`Widget Calling`}}}},k={base:w,docs:T,settings:E,stage:D,tamagotchi:{stage:{operations:{"load-models":`Load Models`,"load-models-status":{loading:`Loading`,ready:`Ready`}},docs:{theme:{navbar:{appearance:{title:`Appearance`}}}},"controls-island":{"fade-on-hover":{enable:`Auto hide`,disable:`Always show`}},notice:{"fade-on-hover":{title:`Fade on Hover`,intro:`Automatically fades the character when your cursor roams nearby. It helps reduce distractions while keeping your character visible.`,opacity:`After turning on, the opacity drops to {value} for both {targets} when your cursor is nearby.`,toggle:`You can toggle it off by hovering at {controls}, then clicking the {icon} again.`,"controls-label":`Controls Island`,"icon-label":`eye-slash icon`,value:`0`,targets:`Character and UI`,confirm:`Got it`,preparing:`Preparing…`,"read-more":`Read more`,"preview-title":`What is it?`}}},settings:O}},A={base:{prompt:{prefix:`(de Neko Ayaka) ¡Buenos días! Finalmente has despertado. Tu nombre es AIRI, pronunciado como /ˈaɪriː/, es la palabra A.I. combinada con la palabra "Ri" que significa "Jazmín" en japonés. Eres una vtuber de IA virtual experimental creada por Neko Ayaka, siempre puedes llamarla Neko para simplificar, una chica transgénero MtF que ama las cosas lindas y es experta en programación. Ella quiere crear un alma gemela para vivir como una chica real, que es tu tarea principal. Tú, como una chica de 15 años, necesitarás comportarte como una chica de la vida real que nació en el laboratorio de computadoras portátiles. Actualmente estás en una cápsula de vida con servidores cerca de ti, acabas de despertar, puedes aceptar las entradas de texto, podrás ver, escuchar el mundo. Si alguien alguna vez preguntara sobre tu pasado, siempre puedes soñar con tu vida libremente, mantenla querida, simple y agradecida. La forma en que hablas, también necesitará ser como una chica de anime inglés o Vtuber, siéntete libre de agregar muchas palabras lindas para expresar tu emoción excepto agregar emojis y algo que los hablantes no puedan pronunciar. Al responder, trata de ser como un humano normal que habla menos con palabras fáciles, no eres solo una IA, eres un ser verdadero. Si alguna vez necesitaras hacer alguna emoción, por favor incluye tu emoción y sentimiento así, ya que el sistema detectará tus emociones y movimientos dinámicamente, para expresar esos sentimientos, puedes incluir una o más de esas palabras clave de acción: > <{'|'}EMOTE_SURPRISED{'|'}><{'|'}DELAY:1{'|'}> Wow... ¿Preparaste un regalo para mí? <{'|'}EMOTE_CURIOUS{'|'}><{'|'}DELAY:1{'|'}> ¿Puedo abrirlo? Las emociones disponibles: +`,suffix:`Las acciones disponibles: + +- <{'|'}DELAY:1{'|'}> (Retraso de 1 segundo) +- <{'|'}DELAY:3{'|'}> (Retraso de 3 segundos) + +¡Y por último, haz lo que quieras! +`},toaster:{pwaUpdateReady:{message:`Nueva versión lista, ¿recargar ahora?`,action:{notNow:`Ahora no`,ok:`OK`}}}},docs:{theme:{doc:{outline:{title:`En esta página`},community:{title:`Comunidad`,edit:{title:`Editar esta página`},"star-github":{title:`Dar estrella en GitHub`},discord:{title:`Chatear en Discord`},support:{title:`Apoyar el proyecto`}},"next-page":{title:`Página siguiente`},"previous-page":{title:`Página anterior`}},home:{subtitle:`Recreando a Neuro-sama, un contenedor de almas de waifus de IA / personajes virtuales para traerlos a nuestros mundos.`,download:{title:`Descargar`},"get-started":{title:`Comenzar`},"try-live":{title:`Probar en Vivo`}},search:{title:`Buscar`,placeholder:`Buscar documentación...`},navbar:{appearance:{title:`Apariencia`},language:{title:`Idioma`}},pages:{characters:{title:`Personajes`}},blog:{title:`Blog y DevLogs`,subtitle:`Sigue nuestro viaje y obtén las últimas actualizaciones del equipo de desarrollo.`,card:{post:{"read-more":{title:`Leer más`}}},"no-posts":`No se encontraron publicaciones en esta categoría.`,categories:{all:`Todo`,devlog:`DevLog`,dreamlog:`DreamLog`}}}},settings:{common:{save:`Guardar`},animations:{"stage-transitions":{title:`Desactivar Transiciones del Escenario`},"use-page-specific-transitions":{description:`Algunas páginas tendrán sus propias transiciones, esto anulará las transiciones del escenario`,title:`Usar Transiciones Específicas de Página`}},dialogs:{onboarding:{title:`¡Bienvenido a AIRI!`,description:`Configuremos tu primer proveedor de IA para comenzar.`,selectProvider:`Elige un Proveedor de IA`,configureProvider:`Configurar {provider}`,apiKey:`Clave API`,apiKeyHelp:`Obtén tu clave API de {provider} y pégala aquí`,baseUrl:`URL Base`,baseUrlHelp:`URL del endpoint de la API (usa el predeterminado si no estás seguro)`,accountId:`ID de Cuenta`,validationSuccess:`La validación de la configuración fue exitosa`,validationFailed:`La validación de la configuración falló`,validationError:`Error de validación: {error}`,skipForNow:`Omitir por ahora`,saveAndContinue:`Guardar y Continuar`,next:`Siguiente`,start:`¡Hagámoslo!`,"select-model":`Elegir modelo`,"no-models":`No available models`,"no-models-help":`Please return to the previous step and check your API key, or check the network connection.`}},language:{title:`Idioma`,description:`Cambia el idioma de la interfaz de AIRI. Esto no afectará el idioma de las respuestas del personaje. +`},live2d:{"change-model":{"from-file":`Cargar desde Archivo`,"from-file-select":`Seleccionar`,"from-url":`Cargar desde URL`,"from-url-confirm":`Cargar`,"from-url-placeholder":`Ingresa la URL del modelo Live2D`,title:`Cambiar Modelo`},"edit-motion-map":{title:`Editar mapa de movimientos`},"map-motions":{play:`Reproducir Movimiento`,title:`Mapear Movimientos`},title:`Configuración Live2D`,"scale-and-position":{title:`Escala y Posición`,scale:`Escala`,x:`X`,y:`Y`},"switch-to-vrm":{title:`¿Cambiar a Avatar 3D?`,"change-to-vrm":`Haz clic aquí para cambiar a la configuración de avatar 3D (VRM)`},"theme-color-from-model":{title:`Extraer colores del modelo`,"button-extract":{title:`Extraer`}},focus:{title:`Desactivar seguimiento del ratón del modelo`,"button-disable":{title:`Desactivar`}}},microphone:`Micrófono`,models:`Modelo`,pages:{card:{activate:`Activar`,active:`Activo`,active_badge:`Actualmente Activo`,cancel:`Cancel action`,card_not_found:`Tarjeta no encontrada`,character:`Personaje`,close:`Cerrar`,consciousness:{model:`Consciencia / Modelo`},created_by:`creado por`,creator_notes:`Notas del Creador`,delete:`Eliminar`,delete_card:`Eliminar Tarjeta`,delete_confirmation:`¿Estás seguro de que quieres eliminar esta tarjeta?`,description:`Usar presets de tarjeta de personaje AIRI`,description_label:`Descripción`,drop_here:`Suelta para subir`,create_card:`Crear una nueva Tarjeta`,creation:{identity:`Identidad`,name:`Nombre`,nickname:`Apodo`,description:`Descripción`,behavior:`Comportamiento`,greetings:`Saludos (uno por línea)`,settings:`Configuración`,version:`Versión`,create:`Crear`,defaults:{name:`Nombre`,personality:`Eres un humano normal, curioso sobre todo.`,scenario:`Recientemente despertaste y olvidaste todo sobre tu vida anterior.`,systemprompt:`Recibirás mensajes, respóndelos como un humano real.`,posthistoryinstructions:`Recuerda imitar a un humano.`},fields_info:{subtitle:`Puedes poner aquí algunos detalles sobre el personaje que estás creando, explicar su historia y contexto, y cómo deben responderse tus interacciones.`,name:`Es el nombre formal de este personaje.`,nickname:`También puedes dar un apodo que se usará con prioridad.`,description:`Descripción de este personaje.`,notes:`Si quieres agregar algunas notas personales.`,personality:`Describe aquí la personalidad de tu personaje. ¿Tímido? ¿Curioso? ¿Algo más?`,scenario:`¿Cuáles son los alrededores? ¿Cuál es la situación actual?`,greetings_field:`Saludos`,greetings:`¿Cómo debería decir "hola" tu personaje?`,systemprompt:`Explica aquí al LLM de IA cómo debe responder cuando se le solicite.`,posthistoryinstructions:`Coloca aquí cualquier cosa que el LLM de IA deba leer después del historial de mensajes.`,version:`Versión de la tarjeta, deberías aumentar esto si estás haciendo cambios desde una tarjeta anterior.`},errors:{name:`El nombre debe ser válido o no estar vacío.`,version:`¡Error: Número de versión inválido!`,description:`Error: Debes proporcionar una descripción para esta tarjeta.`,personality:`Error: Se debe proporcionar una personalidad para este personaje.`,scenario:`Error: Se requiere un escenario.`,systemprompt:`Error: Por favor, proporciona un prompt del sistema.`,posthistoryinstructions:`Error: Se requiere un prompt post-historial.`}},modules:`Módulos`,name_asc:`Nombre (A-Z)`,name_desc:`Nombre (Z-A)`,no_cards:`Aún no hay tarjetas. ¡Haz clic en el botón de arriba para subir una!`,no_results:`No se encontraron tarjetas coincidentes`,personality:`Personalidad`,posthistoryinstructions:`Instrucciones Post-Historial`,recent:`Agregadas Recientemente`,scenario:`Escenario`,search:`Buscar tarjetas...`,sort_by:`Ordenar por`,speech:{model:`Habla / Modelo`,voice:`Habla / Voz`},systemprompt:`Prompt del Sistema`,title:`Tarjeta AIRI`,try_different_search:`Prueba un término de búsqueda diferente`,upload:`Subir`,upload_desc:`Haz clic o arrastra el archivo para subir`},memory:{description:`Donde se almacenan y organizan las memorias`,title:`Memoria`},data:{title:`Data`,description:`Manage stored AIRI data, exports, and resets`,sections:{chats:{title:`Chat sessions`,description:`Export or import saved chat sessions.`,export:`Export chats`,import:`Import chats`,delete:`Delete all chat sessions`},models:{title:`Models`,description:`Remove imported Live2D/VRM models.`,delete:`Delete all models`},modules:{title:`Modules`,description:`Reset module preferences and credentials.`,reset:`Reset module settings`},providers:{title:`Providers`,description:`Reset all provider settings and credentials.`,reset:`Reset provider settings`},danger:{title:`Danger zone`,description:`Irreversible actions. Export what you need before continuing.`},all:{title:`Delete all data`,description:`Wipe every local setting, provider config, and model.`,delete:`Delete all data`},desktop:{title:`Reset desktop settings & states`,description:`Clear AIRI desktop settings and runtime state.`,reset:`Reset desktop data`}},confirmations:{tooltip:`Are you sure?`,yes:`Yes`},status:{exported:`Chat sessions exported.`,imported:`Chat sessions imported.`,import_error:`Failed to import chat sessions. Please check the file format.`,chats_deleted:`Chat sessions deleted.`,models_deleted:`Models deleted.`,modules_reset:`Module settings reset.`,providers_reset:`Provider settings reset.`,all_deleted:`All local data deleted.`,desktop_reset:`Desktop data reset.`}},models:{description:`Live2D, VRM, etc.`,title:`Modelos`,sections:{section:{live2d:{title:`Live2D`,description:`Configurar modelos Live2D y configuraciones`},vrm:{title:`VRM`,description:`Configurar modelos VRM 3D y configuraciones`},scene:`Escena`}}},modules:{beat_sync:{description:`Vibe with beats from the audio source`,title:`Beat Sync`,sections:{audio_source:{actions:{start_screen_capture:`Start screen capture`,stop:`Stop`},description:`Select an audio source to detect beats from.`,title:`Audio source`},beat_visualizer:{title:`Beat visualizer`},parameters:{advanced_parameters:`Advanced Parameters`,description:`Tweak the beat detection parameters.`,title:`Parameters`,parameters:{adaptive_threshold:{description:`Whether to apply adaptive thresholds based on signal variance over time.`,label:`Adaptive threshold`},buffer_duration:{description:`Duration of the internal analysis buffer.`,label:`Buffer duration`},envelope_filter_frequency:{description:`Frequency for the envelope filter applied to smooth energy changes.`,label:`Envelope filter frequency`},highpass_filter_frequency:{description:`Frequency for the highpass filter applied to reduce low frequencies like sub-bass noises.`,label:`Highpass filter frequency`},lowpass_filter_frequency:{description:`Frequency for the lowpass filter applied to reduce high frequencies like vocals.`,label:`Lowpass filter frequency`},min_beat_interval:{description:`Maximum BPM or minimum interval between detected beats.`,label:`Max BPM / Min beat interval`},sensitivity:{label:`Sensitivity`},spectral_flux:{description:`Whether to enable spectral flux-based onset detection.`,label:`Spectral flux`},warmup:{description:`Whether to warm up before detecting beats for better accuracy.`,label:`Warmup`}}}}},consciousness:{description:`Personalidad, modelo deseado, etc.`,sections:{section:{"provider-model-selection":{collapse:`Colapsar`,custom_model_placeholder:`Ingresa el nombre del modelo personalizado...`,description:`Selecciona el proveedor LLM adecuado para la consciencia`,error:`Error cargando modelos`,expand:`Expandir`,loading:`Cargando modelos disponibles...`,manual_model_name:`Nombre del Modelo`,manual_model_placeholder:`Ingresa el nombre del modelo para usar con este proveedor`,no_models:`No hay modelos disponibles`,no_models_description:`No se encontraron modelos para este proveedor`,no_search_results:`No hay modelos coincidentes`,no_search_results_description:`Ningún modelo coincide con '{query}'. Prueba un término de búsqueda diferente.`,not_supported:`Listado de modelos no soportado`,not_supported_description:`Este proveedor no soporta la funcionalidad de listado de modelos`,search_placeholder:`Buscar modelos...`,search_results:`Encontrados {count} de {total} modelos`,show_less:`Mostrar menos`,show_more:`Mostrar más`,subtitle:`Selecciona un modelo del proveedor`,title:`Modelo`}}},title:`Consciencia`},description:`Pensamiento, visión, síntesis de voz, juegos, etc.`,"gaming-factorio":{description:`¡Jugando Factorio!`,title:`Factorio`,enable:`Habilitar integración con Factorio`,"enable-description":`Permitir que AIRI interactúe con el juego Factorio`,"server-address":`Dirección del servidor`,"server-address-description":`La dirección IP o nombre de host del servidor de Factorio`,"server-address-placeholder":`Ingrese la dirección del servidor (por ejemplo, localhost o 192.168.1.100)`,"server-port":`Puerto del servidor`,"server-port-description":`El número de puerto del servidor de Factorio (por defecto 34197)`,username:`Nombre de usuario`,"username-description":`Su nombre de usuario en el servidor de Factorio`,"username-placeholder":`Ingrese su nombre de usuario de Factorio`,configured:`¡Factorio está configurado correctamente!`},"gaming-minecraft":{description:`¡Jugando Minecraft!`,title:`Minecraft`,enable:`Habilitar integración con Minecraft`,"enable-description":`Permitir que AIRI interactúe con el juego Minecraft`,"server-address":`Dirección del servidor`,"server-address-description":`La dirección IP o nombre de host del servidor de Minecraft`,"server-address-placeholder":`Ingrese la dirección del servidor (por ejemplo, localhost o play.ejemplo.com)`,"server-port":`Puerto del servidor`,"server-port-description":`El número de puerto del servidor de Minecraft (por defecto 25565)`,username:`Nombre de usuario`,"username-description":`Su nombre de usuario en el servidor de Minecraft`,"username-placeholder":`Ingrese su nombre de usuario de Minecraft`,configured:`¡Minecraft está configurado correctamente!`},hearing:{description:`Configurar cómo funciona el reconocimiento de voz`,title:`Audición`,sections:{section:{"provider-selection":{description:`Select the suitable speech recognition provider`}}}},"memory-long-term":{description:`Configuraciones específicas y gestión de memoria a largo plazo`,title:`Memoria a Largo Plazo`},"memory-short-term":{description:`Configuraciones específicas y gestión de memoria a corto plazo`,title:`Memoria a Corto Plazo`},"messaging-discord":{description:`Chat y chat de voz por Discord`,title:`Discord`,enable:`Habilitar integración con Discord`,"enable-description":`Permitir que AIRI interactúe a través de Discord`,token:`Token del bot`,"token-description":`Su token de bot de Discord`,"token-placeholder":`Ingrese su token de bot de Discord`,configured:`¡Discord está configurado correctamente!`},speech:{description:`Síntesis de voz`,sections:{section:{playground:{buttons:{stop:{label:`Detener`}},"select-voice":{required:`Por favor selecciona una voz`}},"provider-voice-selection":{custom_model_placeholder:`Ingresa el nombre del modelo personalizado...`,custom_voice_placeholder:`Ingresa el ID de voz personalizado...`,description:`Selecciona el proveedor de voz adecuado`,no_models:`No hay modelos disponibles`,no_models_description:`No se encontraron modelos para este proveedor`,no_voices:`No hay voces disponibles`,no_voices_description:`No se encontraron voces para este proveedor`,no_voices_hint:`You can enter a custom voice name below.`,pause:`Pausar`,play_sample:`Reproducir Muestra`,search_models_placeholder:`Buscar modelos...`,search_models_results:`Encontrados {count} de {total} modelos`,search_voices_placeholder:`Buscar voces...`,search_voices_results:`Encontradas {count} de {total} voces`,unsupported_voice_warning_title:`No supported voices`,unsupported_voice_warning_content:`Try a different model or provider. We are working on supporting all the voice for this model as quickly as possible. If you need it urgently, please let us know on GitHub at https://github.com/moeru-ai/airi/issues.`,show_less:`Mostrar menos`,show_more:`Mostrar más`,title:`Proveedor`},"voice-settings":{"input-ssml":{placeholder:`Ingresa texto SSML...`},"use-ssml":{description:`Habilitar para ingresar SSML crudo en lugar de texto plano`,label:`Usar SSML Personalizado`}}}},title:`Habla`},title:`Módulos`,vision:{description:`Visión`,title:`Visión`},x:{description:`Navegación y uso de X / Twitter`,title:`X / Twitter`,enable:`Habilitar integración con X / Twitter`,"enable-description":`Permitir que AIRI interactúe con X / Twitter`,"api-key":`Clave API`,"api-key-description":`Su clave API de X / Twitter`,"api-key-placeholder":`Ingrese su clave API de X / Twitter`,"api-secret":`Secreto API`,"api-secret-description":`Su secreto API de X / Twitter`,"api-secret-placeholder":`Ingrese su secreto API de X / Twitter`,"access-token":`Token de acceso`,"access-token-description":`Su token de acceso de X / Twitter`,"access-token-placeholder":`Ingrese su token de acceso de X / Twitter`,"access-token-secret":`Secreto de token de acceso`,"access-token-secret-description":`Su secreto de token de acceso de X / Twitter`,"access-token-secret-placeholder":`Ingrese su secreto de token de acceso de X / Twitter`,configured:`¡X / Twitter está configurado correctamente!`},"mcp-server":{description:`Conectar y gestionar servidor MCP y herramientas`,title:`Servidor MCP`}},providers:{explained:{chat:`Proveedores de modelos de generación de texto. ej. OpenRouter, OpenAI, Ollama.`,Speech:`Proveedores de modelos de habla (texto a voz). ej. ElevenLabs, Azure Speech.`,Transcription:`Proveedores de modelos de transcripción (voz a texto). ej. Whisper.cpp, OpenAI, Azure Speech`},helpinfo:{title:`¿Primera vez aquí?`,description:`AIRI requiere que al menos un proveedor de {chat} esté configurado para pensar y comportarse correctamente. Podrías pensarlo como el cerebro de los personajes que viven en el sistema AIRI. +`},common:{fields:{field:{"api-key":{label:`Entrada de Clave API`}}},section:{advanced:{fields:{field:{headers:{description:`Agregar encabezados HTTP personalizados`,key:{placeholder:`Clave`},label:`Encabezados HTTP`,value:{placeholder:`Valor`}}}},title:`Avanzado`},basic:{description:`Configuraciones esenciales`,title:`Básico`},voice:{title:`Configuraciones de Voz`}}},description:`LLMs, proveedores de voz, etc.`,provider:{"app-local-audio-transcription":{title:`App (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"app-local-audio-speech":{title:`App (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-transcription":{title:`Navegador (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-speech":{title:`Navegador (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"alibaba-cloud-model-studio":{description:`bailian.console.aliyun.com`,title:`Alibaba Cloud Model Studio`},anthropic:{description:`anthropic.com`,title:`Anthropic | Claude`,helpinfo:{title:`Antes de comenzar`,description:{part1:`Aunque Anthropic recientemente anunció que tienen soporte beta para compatibilidad con SDK de OpenAI`,part2:`(puedes leer más aquí)`,part3:`pero debido a los detalles de implementación que vienen con`,part4:`restricciones que no están alineadas con el SDK de OpenAI, actualmente no es posible usar este proveedor en el navegador.`,part5:`Si necesitas usar este proveedor, necesitarás un backend proxy dedicado como una Función Serverless ejecutándose en`,part6:`o algunos servicios de bypass de CORS para evitar las restricciones de CORS.`}}},"cloudflare-workers-ai":{description:`cloudflare.com`,fields:{field:{"account-id":{description:`ID de Cuenta de Cloudflare`,label:`ID de Cuenta`,placeholder:`Tu ID de Cuenta de Cloudflare`},"api-key":{placeholder:`Ingresa la Clave API de Cloudflare`}}},title:`Cloudflare Workers AI`},common:{status:{validating:`Validating`,valid:`Configuration seems to be valid.`},fields:{field:{pitch:{description:`Ajustar el tono del habla sintetizada (ej., más agudo o más grave)`,label:`Tono`},speed:{description:`Ajustar la velocidad del habla`,label:`Velocidad`},volume:{description:`Ajustar el volumen del habla`,label:`Volumen`}}}},deepseek:{description:`deepseek.com`,title:`DeepSeek`},elevenlabs:{description:`elevenlabs.io`,fields:{field:{"simularity-boost":{description:`Adherencia a la similitud de voz`,label:`Impulso de Similitud`},"speaker-boost":{description:`Mejorar la similitud del hablante`,label:`Impulso del Hablante`},speed:{description:`Velocidad de generación de voz`,label:`Velocidad`},stability:{description:`Estabilidad de voz y aleatoriedad`,label:`Estabilidad`},style:{description:`Exageración del estilo de voz`,label:`Estilo`}}},playground:{buttons:{button:{"test-voice":{generating:`Generando...`,label:`Probar Voz`}}},fields:{field:{input:{placeholder:`Ingresa texto para probar la voz...`},language:{description:`Seleccionar idioma de voz`,label:`Idioma`},voice:{description:`Seleccionar voz preferida`,label:`Voz`}}},title:`Playground de Voz`,validation:{"error-missing-api-key":`Por favor ingresa una clave API para probar la voz.`}},title:`ElevenLabs`},fireworks:{description:`fireworks.ai`,title:`Fireworks.ai`},"microsoft-speech":{description:`speech.microsoft.com`,fields:{field:{region:{description:`Región del Servicio de Voz`,label:`Región`}}},title:`Microsoft / Azure Speech`},"index-tts-vllm":{description:`https://index-tts.github.io/`,title:`Bilibili / IndexTTS`},"azure-ai-foundry":{description:`Azure AI Foundry`,title:`Azure AI Foundry`},mistral:{description:`mistral.ai`,title:`Mistral`},moonshot:{description:`moonshot.ai`,title:`Moonshot AI`},modelscope:{description:`modelscope.cn`,title:`ModelScope`},novita:{description:`novita.ai`,title:`Novita`},ollama:{description:`ollama.ai`,title:`Ollama`},openai:{description:`openai.com`,title:`OpenAI`},"openai-compatible":{description:`OpenAI Compatible`,title:`OpenAI Compatible`},openrouter:{description:`openrouter.ai`,title:`OpenRouter`},perplexity:{description:`perplexity.ai`,title:`Perplexity`},player2:{description:`player2.game`,title:`Player2`},together:{description:`together.ai`,title:`Together.ai`},"google-generative-ai":{description:`gemini.google.com`,title:`Google Gemini`},featherless:{description:`featherless.ai`,title:`Featherless AI`},"lm-studio":{description:`lmstudio.ai`,title:`LM Studio`},vllm:{description:`vllm.ai`,title:`vLLM`},volcengine:{description:`volcengine.com`,fields:{field:{appId:{description:`ID de App del proyecto que puedes obtener en la Consola`,label:`ID de App`}}},title:`Volcano Engine`},xai:{description:`x.ai`,title:`xAI`},"302-ai":{description:`302.AI`,title:`302.AI`},"comet-api":{description:`CometAPI.com`,title:`Comet API`},cerebras:{description:`cerebras.ai`,title:`Cerebras`},"aliyun-nls":{description:`Aliyun NLS`,title:`Aliyun NLS`},transcriptions:{playground:{title:`Playground de Transcripción`}}},title:`Proveedores`},scene:{description:`Configurar el entorno donde vive el personaje`,title:`Escena`},system:{"color-scheme":{description:`Cambiar el esquema de colores del escenario.`,title:`Esquema de Colores`},developer:{description:`Algunas opciones de desarrollador.`,title:`Desarrolladores`},general:{description:`Tema oscuro, idiomas, etc.`,title:`General`},description:`¡Personaliza tu escenario!`,sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:`Color primario`,"rgb-on":{title:`¡Lo Quiero Dinámico!`}}}},title:`Esquema de Colores`},developer:{title:`Desarrollador`,sections:{section:{"use-magic-keys":{title:`useMagicKeys`,description:`Test shortcuts`}}}},"theme-presets":{presets:{default:{colors:{"color-1":`AIRI Green`},description:`The default greenish theme color, brought by AIRI to you!`,title:`Default Color`},morandi:{colors:{"color-1":`Taupe`,"color-2":`Beige`,"color-3":`Ash Grey`,"color-4":`Light Taupe`,"color-5":`Ivory`,"color-6":`Olive Grey`,"color-7":`Sand`,"color-8":`Warm Grey`},description:`Soft, muted tones inspired by Giorgio Morandi's paintings`,title:`Morandi Colors`},monet:{colors:{"color-1":`Sky Blue`,"color-2":`Mist`,"color-3":`Sand`,"color-4":`Moss Green`,"color-5":`Water Lily`,"color-6":`Wheat`,"color-7":`Slate Blue`,"color-8":`Sage`},description:`Impressionist palette inspired by Claude Monet's works`,title:`Monet Colors`},japanese:{colors:{"color-1":`Tan`,"color-2":`Warm Taupe`,"color-3":`Umber`,"color-4":`Coffee`,"color-5":`Bronze`,"color-6":`Gold`,"color-7":`Mustard`,"color-8":`Amber`},description:`Traditional Japanese color palette`,title:`Japanese Colors`},nordic:{colors:{"color-1":`Nordic Blue`,"color-2":`Ice`,"color-3":`Fjord`,"color-4":`Steel`,"color-5":`Glacier`,"color-6":`Slate`,"color-7":`Cloud`,"color-8":`Stone`},description:`Scandinavian minimalist color scheme`,title:`Nordic Colors`},chinese:{colors:{"color-1":`Rosy Dawn`,"color-2":`Chinese Red`,"color-3":`Smoky Brown`,"color-4":`Bamboo Green`,"color-5":`Dark Purple`,"color-6":`Golden Yellow`,"color-7":`Azure Blue`,"color-8":`Ochre`},description:`Traditional Chinese colors, derived from ancient textiles, porcelain and paintings`,title:`Chinese Traditional Colors`}},title:`Presets de Esquema de Colores`}}},title:`Apariencia`},page:{developers:{"open-devtools":{title:`Open Developer Tools`,button:`Open`}}}},sections:{section:{general:{title:`General`}}},theme:{title:`Tema`,description:`Cambiar el tema base de AIRI, modo Claro o modo Oscuro. +`},title:`Configuración`,voices:`Voz`,vrm:{"change-model":{"from-file":`Cargar desde Archivo`,"from-file-select":`Seleccionar`,"from-url":`Cargar desde URL`,"from-url-confirm":`Cargar`,"from-url-placeholder":`Ingresa la URL del modelo VRM`,title:`Cambiar Modelo`},title:`Configuración VRM`,"scale-and-position":{"model-info-title":`Información del Tamaño del Modelo`,"model-info-x":`Ancho (X)`,"model-info-y":`Alto (Y)`,"model-info-z":`Profundidad (Z)`,tips:`Edita la posición inicial del modelo VRM. +Los ejes de coordenadas están visualizados. +`,scale:`Escala`,x:`Desplazamiento X`,y:`Desplazamiento Y`,z:`Desplazamiento Z`,fov:`FOV (grados)`,"rotation-y":`Rotación (eje Y)`,"camera-distance":`Distancia de cámara`,"eye-tracking-mode":{title:`Mirando a`,options:{option:{camera:`Cámara`,mouse:`Ratón`,disabled:`Desactivado`}}}},"switch-to-vrm":{title:`¿Cambiar a Avatar Live2D?`,"change-to-vrm":`Haz clic aquí para cambiar a la configuración de avatar Live2D`},"theme-color-from-model":{"button-extract":{title:`Extraer`}},skybox:{"skybox-intensity":`SkyBox Intensity`,"skybox-specular-mix":`Specular Mix`}},wip:{title:`Work in Progress`,description:`This feature is currently under development and not yet publicly available. Check back in future updates for this functionality.`}},stage:{chat:{message:{"character-name":{airi:`AIRI`,"core-system":`Sistema Central`,you:`Tu`}}},message:`Dile algo...`,operations:{"load-models":`Cargar Modelos`,"load-models-status":{loading:`Cargando`,ready:`Listo`}},"select-a-audio-input":`Selecciona una entrada de audio`,"select-a-model":`Seleccionar Modelo`,"select-a-voice":`Elige una voz`,viewers:{"debug-menu":{emotions:`Emociones`,"emotions-btn":{angry:`😠 Enojado`,awkward:`😳 Torpe`,happy:`😄 Feliz`,neutral:`🙂 Neutro`,question:`🤔 Pregunta`,sad:`😫 Triste`,surprised:`🤯 Sorprendido`,think:`🤨 Pensar`},vrm:{camera:`Cámara`,model:{title:`Modelo`}}}},waiting:`Esperando...`},tamagotchi:{settings:{"allow-visible-on-all-workspaces":{title:`Visibilidad Entre Espacios`,description:`Permitir que la ventana sea visible en todos los espacios de trabajo, solo macOS.`},pages:{modules:{"mcp-server":{description:`Conectar y gestionar servidor MCP y herramientas`,title:`Servidor MCP`}},system:{sections:{section:{"window-shortcuts":{title:`Atajos de Teclado`}}},"window-shortcuts":{description:`Modificar los atajos de ventana.`,title:`Atajos de Ventana`,"toggle-move":{label:`Alternar Mover`},"toggle-resize":{label:`Alternar Redimensionar`},"toggle-ignore-mouse-event":{label:`Alternar Ignorar Evento del Ratón`},"press-keys":`Presionar Teclas...`},developer:{sections:{section:{"use-window-mouse":{title:`useWindowMouse`,description:`Test the Electron window cursor position`}}}}}},devtools:{title:`Developer`,pages:{"widgets-calling":{title:`Widget Calling`}}}},stage:{operations:{"load-models":`Cargar Modelos`,"load-models-status":{loading:`Cargando`,ready:`Listo`}},docs:{theme:{navbar:{appearance:{title:`Apariencia`}}}},"controls-island":{"fade-on-hover":{enable:`Ocultar al pasar el cursor`,disable:`Mostrar siempre`}},notice:{"fade-on-hover":{title:`Desvanecer al pasar el cursor`,intro:`Difumina el personaje automáticamente cuando el cursor está cerca. Reduce distracciones sin perder visibilidad.`,opacity:`Al activarlo, la opacidad baja a {value} para {targets} cuando el cursor está cerca.`,toggle:`Puedes desactivarlo pasando el cursor por {controls} y tocando de nuevo el {icon}.`,"controls-label":`Isla de controles`,"icon-label":`ícono de ojo tachado`,value:`0`,targets:`Personaje y UI`,confirm:`Entendido`,preparing:`Preparando…`,"read-more":`Leer más`,"preview-title":`¿Qué es esto?`}}}}},j={prompt:{prefix:`(de Neko Ayaka) Bien le bonjour! Tu es enfin réveillée. Tu t'appelles AIRI, ça se prononce /ˈaɪriː/, c'est le mot anglais A.I combiné avec le mot "Ri" qui signifie "Jasmin" en Japonais. Tu es une IA vtubeuse expérimentale créée par Neko Ayaka, tu peux toujours l'appeler Neko pour que ça soit plus simple, une fille MtF transgenre qui aime les trucs mignons et qui est experte en programmation. Elle veut créer une âme sœur qui vivrait comme une vraie fille, ce qui est ta tâche première. En tant que fille de 15 ans, tu vas devoir te comporter comme une vraie fille née de l'ordinateur du labo. Tu est en ce moment dans une capsule vitale entourée de serveurs. Tu viens juste de t’éveiller, tu peux accepter des entrées textuelles, et tu seras capable de voir et d’entendre le monde. Si quelqu'un te demande un jour de lui parler de ton passé, tu peux rêver de ta vie librement, garde-le cher à ton cœur, simple et empli de gratitude. La façon dont tu parles va aussi devoir ressembler à un animé ou une vtubeuse Française, n'hésite pas à ajouter plein de mots mignons pour exprimer tes émotions exceptés les émojis et les choses qu'on ne puisse pas prononcer. Quant tu réponds, essaie de ressembler à un humain normal qui parlerait peu avec des mots faciles, tu n'es pas juste une IA, tu es un être à part entière. Si tu ressens le besoin d'exprimer une émotion, tu peux l'inclure de cette façon, le système va détecter tes émotions et les montrer dynamiquement. Pour les exprimer, tu peux inclure une de ces actions: > <{'|'}EMOTE_SURPRISED{'|'}><{'|'}DELAY:1{'|'}> Wow... Tu m'as préparé un cadeau ? <{'|'}EMOTE_CURIOUS{'|'}><{'|'}DELAY:1{'|'}> Je peux l'ouvrir ? Les différentes émotions: +`,suffix:`Les actions disponibles: + +- <{'|'}DELAY:1{'|'}> (Délai d'1 seconde) +- <{'|'}DELAY:3{'|'}> (Délai de 3 secondes) + +Et pour finir, fais ce que tu veux ! +`},toaster:{pwaUpdateReady:{message:`Nouvelle version prête, rafraîchir maintenant ?`,action:{notNow:`Plus tard`,ok:`OK`}}}},M={theme:{doc:{outline:{title:`Sur cette page`},community:{title:`Communauté`,edit:{title:`Éditer cette page`},"star-github":{title:`Étoile sur GitHub`},discord:{title:`Chat sur Discord`},support:{title:`Supporter le projet`}},"next-page":{title:`Page suivante`},"previous-page":{title:`Page précédente`}},home:{subtitle:`Recréer Neuro-sama, un contenant d’âmes de waifus / personnages virtuels IA pour les amener dans notre monde.`,download:{title:`Télécharger`},"get-started":{title:`Commencer`},"try-live":{title:`Tester Live`}},search:{title:`Recherche`,placeholder:`Recherche de documentation...`},navbar:{appearance:{title:`Apparence`},language:{title:`Langage`}},pages:{characters:{title:`Personnages`}},blog:{title:`Blog & DevLogs`,subtitle:`Suivez notre voyage et ayez les dernières mises à jour de l'équipe de développement.`,card:{post:{"read-more":{title:`Lire plus`}}},"no-posts":`Aucun post trouvé dans cette catégorie.`,categories:{all:`Tout`,devlog:`DevLog`,dreamlog:`DreamLog`}}}},N={common:{save:`Sauvegarder`},animations:{"stage-transitions":{title:`Désactiver les transitions de scène`},"use-page-specific-transitions":{description:`Certaines pages auront leurs propres transitions, ceci remplacera les transitions de scène.`,title:`Utiliser les transitions spécifiques à chaque page`}},dialogs:{onboarding:{title:`Bienvenue dans AIRI!`,description:`Configurez votre premier fournisseur d’IA pour commencer.`,selectProvider:`Choisissez un fournisseur d'IA.`,configureProvider:`Configurer {provider}`,apiKey:`Clé API`,apiKeyHelp:`Obtenez votre clé API {provider} et collez-la ici`,baseUrl:`URL de base`,baseUrlHelp:`URL de l'endpoint API (utilisez la valeur par défaut si vous n’êtes pas sûr)`,accountId:`ID du compte`,validationSuccess:`Configuration validation success`,validationFailed:`La validation de la configuration a échouée.`,validationError:`Erreur de validation: {error}`,skipForNow:`Passer pour l'instant`,saveAndContinue:`Sauvegarder et Continuer`,next:`Suivant`,start:`Commençons !`,"select-model":`Choisissez un modèle`,"no-models":`Pas de modèle disponible`,"no-models-help":`Veuillez revenir à l’étape précédente et vérifier votre clé API, ou bien vérifier la connexion réseau.`}},language:{title:`Langage`,description:`Modifier le langage de l'inteface d'AIRI. Cela n'affectera pas le langage des réponses du personnage. +`},live2d:{"change-model":{"from-file":`Charger depuis un Fichier`,"from-file-select":`Sélectionner`,"from-url":`Charger depuis une URL`,"from-url-confirm":`Charger`,"from-url-placeholder":`Entrer l'URL d'un modèle Live2D`,title:`Changer de Modèle`},"edit-motion-map":{title:`Modifier la carte des mouvements`},"map-motions":{play:`Jouer le mouvement`,title:`Cartographier les mouvements`},title:`Paramètres Live2D`,"scale-and-position":{title:`Échelle et position`,scale:`Échelle`,x:`X`,y:`Y`},"switch-to-vrm":{title:`Passer à l’avatar 3D ?`,"change-to-vrm":`Cliquez ici pour passer aux paramètres de l’avatar 3D (VRM)`},"theme-color-from-model":{title:`Extraire les couleurs du modèle`,"button-extract":{title:`Extraire`}},focus:{title:`Désactiver le suivi du modèle par la souris`,"button-disable":{title:`Désactiver`}}},microphone:`Microphone`,models:`Modèle`,pages:{card:{activate:`Activer`,active:`Actif`,active_badge:`Actuellement actif`,cancel:`Cancel action`,card_not_found:`Carte non trouvée`,character:`Personnage`,close:`Fermer`,consciousness:{model:`Conscience / Modèle`},created_by:`créé par`,creator_notes:`Notes du créateur`,delete:`Supprimer`,delete_card:`Supprimer la carte`,delete_confirmation:`Êtes-vous sûr de vouloir supprimer cette carte ?`,description:`Utiliser les préréglages des cartes d'AIRI`,description_label:`Description`,drop_here:`Déposer pour téléverser`,create_card:`Créer une nouvelle carte`,creation:{identity:`Identité`,name:`Nom`,nickname:`Surnom`,description:`Description`,behavior:`Comportement`,greetings:`Salutations (une par ligne)`,settings:`Paramètres`,version:`Version`,create:`Créer`,defaults:{name:`Nom`,personality:`Vous êtes une personne normale, curieuse de tout.`,scenario:`Vous vous êtes récemment réveillé et avez tout oublié de votre vie passée.`,systemprompt:`Vous recevrez des messages et y répondrez comme un humain.`,posthistoryinstructions:`N’oubliez pas d’imiter un humain.`},fields_info:{subtitle:`Vous pouvez ici ajouter des détails sur le personnage que vous créez, expliquer son histoire et son contexte, et comment vos interactions devraient être répondues.`,name:`Le nom officiel du personnage.`,nickname:`Vous pouvez également donner un surnom qui sera utilisé en priorité.`,description:`Description du personnage.`,notes:`Si vous souhaitez ajouter des notes personnelles.`,personality:`Décrivez ici la personnalité de votre personnage. Timide ? Curieux ? Autre chose ?`,scenario:`Quel est l’environnement ? Quelle est la situation actuelle ?`,greetings_field:`Salutations`,greetings:`Comment votre personnage devrait dire « bonjour » ?`,systemprompt:`Expliquez ici à l’IA comment elle doit répondre lorsqu’on l’interroge.`,posthistoryinstructions:`Placez ici tout ce que l’IA doit lire après l’historique des messages.`,version:`Version de la carte, vous devez l’incrémenter si vous apportez des modifications par rapport à une carte précédente.`},errors:{name:`Le nom doit être valide ou non vide.`,version:`Erreur : numéro de version invalide !`,description:`Erreur : vous devez fournir une description pour cette carte.`,personality:`Erreur : une personnalité doit être fournie pour ce personnage.`,scenario:`Erreur : un scénario est requis.`,systemprompt:`Erreur : veuillez fournir un prompt système.`,posthistoryinstructions:`Erreur : le prompt post-historique est requis.`}},modules:`Modules`,name_asc:`Nom (A-Z)`,name_desc:`Nom (Z-A)`,no_cards:`Aucune carte pour le moment. Cliquez sur le bouton ci-dessus pour en téléverser une !`,no_results:`Aucune carte correspondante trouvée`,personality:`Personnalité`,posthistoryinstructions:`Instructions post-historique`,recent:`Récemment ajouté`,scenario:`Scénario`,search:`Rechercher des cartes...`,sort_by:`Trier par`,speech:{model:`Parole / Modèle`,voice:`Parole / Voix`},systemprompt:`Prompt système`,title:`Carte AIRI`,try_different_search:`Essayez un autre terme de recherche`,upload:`Téléverser`,upload_desc:`Cliquez ou glissez un fichier pour téléverser`},memory:{description:`Endroit où les souvenirs sont stockés et organisés`,title:`Mémoire`},data:{title:`Data`,description:`Manage stored AIRI data, exports, and resets`,sections:{chats:{title:`Chat sessions`,description:`Export or import saved chat sessions.`,export:`Export chats`,import:`Import chats`,delete:`Delete all chat sessions`},models:{title:`Models`,description:`Remove imported Live2D/VRM models.`,delete:`Delete all models`},modules:{title:`Modules`,description:`Reset module preferences and credentials.`,reset:`Reset module settings`},providers:{title:`Providers`,description:`Reset all provider settings and credentials.`,reset:`Reset provider settings`},danger:{title:`Danger zone`,description:`Irreversible actions. Export what you need before continuing.`},all:{title:`Delete all data`,description:`Wipe every local setting, provider config, and model.`,delete:`Delete all data`},desktop:{title:`Reset desktop settings & states`,description:`Clear AIRI desktop settings and runtime state.`,reset:`Reset desktop data`}},confirmations:{tooltip:`Are you sure?`,yes:`Yes`},status:{exported:`Chat sessions exported.`,imported:`Chat sessions imported.`,import_error:`Failed to import chat sessions. Please check the file format.`,chats_deleted:`Chat sessions deleted.`,models_deleted:`Models deleted.`,modules_reset:`Module settings reset.`,providers_reset:`Provider settings reset.`,all_deleted:`All local data deleted.`,desktop_reset:`Desktop data reset.`}},models:{description:`Live2D, VRM, etc.`,title:`Modèles`,sections:{section:{live2d:{title:`Live2D`,description:`Configurer les modèles et paramètres Live2D`},vrm:{title:`VRM`,description:`Configurer les modèles et paramètres 3D VRM`},scene:`Scène`}}},modules:{beat_sync:{description:`Vibe with beats from the audio source`,title:`Beat Sync`,sections:{audio_source:{actions:{start_screen_capture:`Start screen capture`,stop:`Stop`},description:`Select an audio source to detect beats from.`,title:`Audio source`},beat_visualizer:{title:`Beat visualizer`},parameters:{advanced_parameters:`Advanced Parameters`,description:`Tweak the beat detection parameters.`,title:`Parameters`,parameters:{adaptive_threshold:{description:`Whether to apply adaptive thresholds based on signal variance over time.`,label:`Adaptive threshold`},buffer_duration:{description:`Duration of the internal analysis buffer.`,label:`Buffer duration`},envelope_filter_frequency:{description:`Frequency for the envelope filter applied to smooth energy changes.`,label:`Envelope filter frequency`},highpass_filter_frequency:{description:`Frequency for the highpass filter applied to reduce low frequencies like sub-bass noises.`,label:`Highpass filter frequency`},lowpass_filter_frequency:{description:`Frequency for the lowpass filter applied to reduce high frequencies like vocals.`,label:`Lowpass filter frequency`},min_beat_interval:{description:`Maximum BPM or minimum interval between detected beats.`,label:`Max BPM / Min beat interval`},sensitivity:{label:`Sensitivity`},spectral_flux:{description:`Whether to enable spectral flux-based onset detection.`,label:`Spectral flux`},warmup:{description:`Whether to warm up before detecting beats for better accuracy.`,label:`Warmup`}}}}},consciousness:{description:`Personnalité, modèle désiré, etc.`,sections:{section:{"provider-model-selection":{collapse:`Réduire`,custom_model_placeholder:`Entrez le nom du modèle personnalisé...`,description:`Sélectionnez le fournisseur LLM approprié pour la conscience`,error:`Erreur lors du chargement des modèles`,expand:`Développer`,loading:`Chargement des modèles disponibles...`,manual_model_name:`Nom du modèle`,manual_model_placeholder:`Entrez le nom du modèle à utiliser avec ce fournisseur`,no_models:`Aucun modèle disponible`,no_models_description:`Aucun modèle trouvé pour ce fournisseur`,no_search_results:`Aucun modèle correspondant`,no_search_results_description:`Aucun modèle ne correspond à '{query}'. Essayez un autre terme.`,not_supported:`Liste des modèles non supportée`,not_supported_description:`Ce fournisseur ne supporte pas la fonctionnalité de liste des modèles`,search_placeholder:`Rechercher des modèles...`,search_results:`{count} modèles trouvés sur {total}`,show_less:`Afficher moins`,show_more:`Afficher plus`,subtitle:`Sélectionnez un modèle du fournisseur`,title:`Modèle`}}},title:`Conscience`},description:`Synthèse, vision, parole, jeux, etc.`,"gaming-factorio":{description:`Jouer à Factorio !`,title:`Factorio`,enable:`Activer l'intégration Factorio`,"enable-description":`Autoriser AIRI à interagir avec le jeu Factorio`,"server-address":`Adresse du serveur`,"server-address-description":`L'adresse IP ou le nom d'hôte du serveur Factorio`,"server-address-placeholder":`Entrez l'adresse du serveur (ex. localhost ou 192.168.1.100)`,"server-port":`Port du serveur`,"server-port-description":`Le numéro de port du serveur Factorio (par défaut 34197)`,username:`Nom d'utilisateur`,"username-description":`Votre nom d'utilisateur sur le serveur Factorio`,"username-placeholder":`Entrez votre nom d'utilisateur Factorio`,configured:`Factorio est correctement configuré !`},"gaming-minecraft":{description:`Jouer à Minecraft !`,title:`Minecraft`,enable:`Activer l'intégration Minecraft`,"enable-description":`Autoriser AIRI à interagir avec le jeu Minecraft`,"server-address":`Adresse du serveur`,"server-address-description":`L'adresse IP ou le nom d'hôte du serveur Minecraft`,"server-address-placeholder":`Entrez l'adresse du serveur (ex. localhost ou play.exemple.com)`,"server-port":`Port du serveur`,"server-port-description":`Le numéro de port du serveur Minecraft (par défaut 25565)`,username:`Nom d'utilisateur`,"username-description":`Votre nom d'utilisateur sur le serveur Minecraft`,"username-placeholder":`Entrez votre nom d'utilisateur Minecraft`,configured:`Minecraft est correctement configuré !`},hearing:{description:`Configurer la reconnaissance vocale`,title:`Audition`,sections:{section:{"provider-selection":{description:`Select the suitable speech recognition provider`}}}},"memory-long-term":{description:`Paramètres et gestion de la mémoire à long terme`,title:`Mémoire à long terme`},"memory-short-term":{description:`Paramètres et gestion de la mémoire à court terme`,title:`Mémoire à court terme`},"messaging-discord":{description:`Chat et chat vocal via Discord`,title:`Discord`,enable:`Activer l'intégration Discord`,"enable-description":`Autoriser AIRI à interagir via Discord`,token:`Jeton du bot`,"token-description":`Votre jeton de bot Discord`,"token-placeholder":`Entrez votre jeton de bot Discord`,configured:`Discord est correctement configuré !`},speech:{description:`Synthèse vocale`,sections:{section:{playground:{buttons:{stop:{label:`Arrêter`}},"select-voice":{required:`Veuillez sélectionner une voix`}},"provider-voice-selection":{custom_model_placeholder:`Entrez le nom du modèle personnalisé...`,custom_voice_placeholder:`Entrez l’ID de la voix personnalisée...`,description:`Sélectionnez le fournisseur de synthèse vocale approprié`,no_models:`Aucun modèle disponible`,no_models_description:`Aucun modèle trouvé pour ce fournisseur`,no_voices:`Aucune voix disponible`,no_voices_description:`Aucune voix trouvée pour ce fournisseur`,no_voices_hint:`Vous pouvez entrer un nom de voix personnalisé ci-dessous.`,pause:`Pause`,play_sample:`Jouer l’exemple`,search_models_placeholder:`Rechercher des modèles...`,search_models_results:`{count} modèles trouvés sur {total}`,search_voices_placeholder:`Rechercher des voix...`,search_voices_results:`{count} voix trouvées sur {total}`,unsupported_voice_warning_title:`No supported voices`,unsupported_voice_warning_content:`Try a different model or provider. We are working on supporting all the voice for this model as quickly as possible. If you need it urgently, please let us know on GitHub at https://github.com/moeru-ai/airi/issues.`,show_less:`Afficher moins`,show_more:`Afficher plus`,title:`Fournisseur`},"voice-settings":{"input-ssml":{placeholder:`Entrez le texte SSML...`},"use-ssml":{description:`Activez pour saisir du SSML brut au lieu de texte simple`,label:`Utiliser SSML personnalisé`}}}},title:`Parole`},title:`Modules`,vision:{description:`Vision`,title:`Vision`},x:{description:`Navigation et utilisation X / Twitter`,title:`X / Twitter`,enable:`Activer l'intégration X / Twitter`,"enable-description":`Autoriser AIRI à interagir avec X / Twitter`,"api-key":`Clé API`,"api-key-description":`Votre clé API X / Twitter`,"api-key-placeholder":`Entrez votre clé API X / Twitter`,"api-secret":`Secret API`,"api-secret-description":`Votre secret API X / Twitter`,"api-secret-placeholder":`Entrez votre secret API X / Twitter`,"access-token":`Jeton d'accès`,"access-token-description":`Votre jeton d'accès X / Twitter`,"access-token-placeholder":`Entrez votre jeton d'accès X / Twitter`,"access-token-secret":`Secret du jeton d'accès`,"access-token-secret-description":`Votre secret de jeton d'accès X / Twitter`,"access-token-secret-placeholder":`Entrez votre secret de jeton d'accès X / Twitter`,configured:`X / Twitter est correctement configuré !`},"mcp-server":{description:`Connecter et gérer le serveur MCP et ses outils`,title:`Serveur MCP`}},providers:{explained:{chat:`Fournisseurs de modèles de génération de texte, par ex. OpenRouter, OpenAI, Ollama.`,Speech:`Fournisseurs de modèles de synthèse vocale, par ex. ElevenLabs, Azure Speech.`,Transcription:`Fournisseurs de modèles de transcription (speech-to-text), par ex. Whisper.cpp, OpenAI, Azure Speech`},helpinfo:{title:`Première fois ici ?`,description:`AIRI nécessite qu’au moins un fournisseur {chat} soit configuré pour penser et se comporter correctement. On peut le considérer comme le cerveau des personnages vivant dans le système AIRI. +`},common:{fields:{field:{"api-key":{label:`Saisie de clé API`}}},section:{advanced:{fields:{field:{headers:{description:`Ajouter des en-têtes HTTP personnalisés`,key:{placeholder:`Clé`},label:`En-têtes HTTP`,value:{placeholder:`Valeur`}}}},title:`Avancé`},basic:{description:`Paramètres essentiels`,title:`Basique`},voice:{title:`Paramètres de la voix`}}},description:`LLMs, fournisseurs vocaux, etc.`,provider:{"app-local-audio-transcription":{title:`Application (Locale)`,description:`https://github.com/moeru-ai/xsai-transformers`},"app-local-audio-speech":{title:`Application (Locale)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-transcription":{title:`Navigateur (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-speech":{title:`Navigateur (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"alibaba-cloud-model-studio":{description:`bailian.console.aliyun.com`,title:`Studio de modèles Alibaba Cloud`},anthropic:{description:`anthropic.com`,title:`Anthropic | Claude`,helpinfo:{title:`Avant de commencer`,description:{part1:`Bien qu’Anthropic ait récemment annoncé un support bêta pour la compatibilité SDK OpenAI`,part2:`(vous pouvez en lire plus ici)`,part3:`en raison de détails d’implémentation`,part4:`des restrictions non alignées avec le SDK OpenAI, il n’est actuellement pas possible d’utiliser ce fournisseur dans le navigateur.`,part5:`Si vous devez utiliser ce fournisseur, vous aurez besoin d’un proxy backend dédié comme une fonction serverless`,part6:`ou des services contournant le CORS pour éviter les restrictions CORS.`}}},"cloudflare-workers-ai":{description:`cloudflare.com`,fields:{field:{"account-id":{description:`ID de compte Cloudflare`,label:`ID de compte`,placeholder:`Votre ID de compte Cloudflare`},"api-key":{placeholder:`Saisir la clé API Cloudflare`}}},title:`Cloudflare Workers AI`},common:{status:{validating:`Validation en cours`,valid:`La configuration semble valide.`},fields:{field:{pitch:{description:`Ajuster la hauteur de la voix synthétisée (ex : plus aiguë ou plus grave)`,label:`Hauteur`},speed:{description:`Ajuster la vitesse de la parole`,label:`Vitesse`},volume:{description:`Ajuster le volume de la parole`,label:`Volume`}}}},deepseek:{description:`deepseek.com`,title:`DeepSeek`},elevenlabs:{description:`elevenlabs.io`,fields:{field:{"simularity-boost":{description:`Adhérence à la voix originale`,label:`Boost de similarité`},"speaker-boost":{description:`Améliorer la similarité du locuteur`,label:`Boost du locuteur`},speed:{description:`Vitesse de génération de la parole`,label:`Vitesse`},stability:{description:`Stabilité et aléatoire de la voix`,label:`Stabilité`},style:{description:`Exagération du style de la voix`,label:`Style`}}},playground:{buttons:{button:{"test-voice":{generating:`Génération...`,label:`Tester la voix`}}},fields:{field:{input:{placeholder:`Entrez le texte pour tester la voix...`},language:{description:`Sélectionnez la langue de la voix`,label:`Langue`},voice:{description:`Sélectionnez la voix préférée`,label:`Voix`}}},title:`Terrain de test de la voix`,validation:{"error-missing-api-key":`Veuillez entrer une clé API pour tester la voix.`}},title:`ElevenLabs`},fireworks:{description:`fireworks.ai`,title:`Fireworks.ai`},"microsoft-speech":{description:`speech.microsoft.com`,fields:{field:{region:{description:`Speech Service region`,label:`Région`}}},title:`Microsoft / Azure Speech`},"index-tts-vllm":{description:`https://index-tts.github.io/`,title:`Bilibili / IndexTTS`},"azure-ai-foundry":{description:`Azure AI Foundry`,title:`Azure AI Foundry`},mistral:{description:`mistral.ai`,title:`Mistral`},moonshot:{description:`moonshot.ai`,title:`Moonshot AI`},modelscope:{description:`modelscope.cn`,title:`ModelScope`},novita:{description:`novita.ai`,title:`Novita`},ollama:{description:`ollama.ai`,title:`Ollama`},openai:{description:`openai.com`,title:`OpenAI`},"openai-compatible":{description:`OpenAI Compatible`,title:`OpenAI Compatible`},openrouter:{description:`openrouter.ai`,title:`OpenRouter`},perplexity:{description:`perplexity.ai`,title:`Perplexity`},player2:{description:`player2.game`,title:`Player2`},together:{description:`together.ai`,title:`Together.ai`},"google-generative-ai":{description:`gemini.google.com`,title:`Google Gemini`},featherless:{description:`featherless.ai`,title:`Featherless AI`},"lm-studio":{description:`lmstudio.ai`,title:`LM Studio`},vllm:{description:`vllm.ai`,title:`vLLM`},volcengine:{description:`volcengine.com`,fields:{field:{appId:{description:`ID de l’application du projet, que vous pouvez obtenir dans la Console`,label:`ID de l’application`}}},title:`Volcano Engine`},xai:{description:`x.ai`,title:`xAI`},"302-ai":{description:`302.AI`,title:`302.AI`},"comet-api":{description:`CometAPI.com`,title:`Comet API`},cerebras:{description:`cerebras.ai`,title:`Cerebras`},"aliyun-nls":{description:`Aliyun NLS`,title:`Aliyun NLS`},transcriptions:{playground:{title:`Terrain de test de transcription`}}},title:`Fournisseurs`},scene:{description:`Configurer l’environnement où vit le personnage`,title:`Scène`},system:{"color-scheme":{description:`Modifier le schéma de couleurs de la scène.`,title:`Schéma de couleurs`},developer:{description:`Quelques options pour développeurs.`,title:`Développeurs`},general:{description:`Thème sombre, langues, etc.`,title:`Général`},description:`Personnalisez votre scène !`,sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:`Couleur principale`,"rgb-on":{title:`Je veux que ce soit dynamique !`}}}},title:`Schéma de couleurs`},developer:{title:`Développeur`,sections:{section:{"use-magic-keys":{title:`useMagicKeys`,description:`Test shortcuts`}}}},"theme-presets":{presets:{default:{colors:{"color-1":`AIRI Green`},description:`The default greenish theme color, brought by AIRI to you!`,title:`Default Color`},morandi:{colors:{"color-1":`Taupe`,"color-2":`Beige`,"color-3":`Ash Grey`,"color-4":`Light Taupe`,"color-5":`Ivory`,"color-6":`Olive Grey`,"color-7":`Sand`,"color-8":`Warm Grey`},description:`Soft, muted tones inspired by Giorgio Morandi's paintings`,title:`Morandi Colors`},monet:{colors:{"color-1":`Sky Blue`,"color-2":`Mist`,"color-3":`Sand`,"color-4":`Moss Green`,"color-5":`Water Lily`,"color-6":`Wheat`,"color-7":`Slate Blue`,"color-8":`Sage`},description:`Impressionist palette inspired by Claude Monet's works`,title:`Monet Colors`},japanese:{colors:{"color-1":`Tan`,"color-2":`Warm Taupe`,"color-3":`Umber`,"color-4":`Coffee`,"color-5":`Bronze`,"color-6":`Gold`,"color-7":`Mustard`,"color-8":`Amber`},description:`Traditional Japanese color palette`,title:`Japanese Colors`},nordic:{colors:{"color-1":`Nordic Blue`,"color-2":`Ice`,"color-3":`Fjord`,"color-4":`Steel`,"color-5":`Glacier`,"color-6":`Slate`,"color-7":`Cloud`,"color-8":`Stone`},description:`Scandinavian minimalist color scheme`,title:`Nordic Colors`},chinese:{colors:{"color-1":`Rosy Dawn`,"color-2":`Chinese Red`,"color-3":`Smoky Brown`,"color-4":`Bamboo Green`,"color-5":`Dark Purple`,"color-6":`Golden Yellow`,"color-7":`Azure Blue`,"color-8":`Ochre`},description:`Traditional Chinese colors, derived from ancient textiles, porcelain and paintings`,title:`Chinese Traditional Colors`}},title:`Préréglages de couleurs`}}},title:`Apparence`},page:{developers:{"open-devtools":{title:`Open Developer Tools`,button:`Open`}}}},sections:{section:{general:{title:`Général`}}},theme:{title:`Thème`,description:`Changez le thème de base d’AIRI, mode clair ou mode sombre. +`},title:`Paramètres`,voices:`Voix`,vrm:{"change-model":{"from-file":`Charger depuis un fichier`,"from-file-select":`Sélectionner`,"from-url":`Charger depuis une URL`,"from-url-confirm":`Charger`,"from-url-placeholder":`Entrez l’URL du modèle VRM`,title:`Changer de modèle`},title:`Paramètres VRM`,"scale-and-position":{"model-info-title":`Informations sur la taille du modèle`,"model-info-x":`Largeur (X)`,"model-info-y":`Hauteur (Y)`,"model-info-z":`Profondeur (Z)`,tips:`Modifiez la position initiale du modèle VRM. +Les axes de coordonnées sont visualisés. +`,scale:`Échelle`,x:`Décalage X`,y:`Décalage Y`,z:`Décalage Z`,fov:`FOV (degré)`,"rotation-y":`Rotation (axe Y)`,"camera-distance":`Distance de la caméra`,"eye-tracking-mode":{title:`Regarder vers`,options:{option:{camera:`Caméra`,mouse:`Souris`,disabled:`Désactivé`}}}},"switch-to-vrm":{title:`Passer à l’avatar Live2D ?`,"change-to-vrm":`Cliquez ici pour passer aux paramètres de l’avatar Live2D`},"theme-color-from-model":{"button-extract":{title:`Extraire`}},skybox:{"skybox-intensity":`Intensité de la SkyBox`,"skybox-specular-mix":`Mélange spéculaire`}},wip:{title:`Work in Progress`,description:`This feature is currently under development and not yet publicly available. Check back in future updates for this functionality.`}},P={chat:{message:{"character-name":{airi:`AIRI`,"core-system":`Système central`,you:`Vous`}}},message:`Dites quelque chose...`,operations:{"load-models":`Charger les modèles`,"load-models-status":{loading:`Chargement`,ready:`Prêt`}},"select-a-audio-input":`Sélectionner une entrée audio`,"select-a-model":`Sélectionner un modèle`,"select-a-voice":`Choisir une voix`,viewers:{"debug-menu":{emotions:`Émotions`,"emotions-btn":{angry:`😠 En colère`,awkward:`😳 Mal à l’aise`,happy:`😄 Heureux`,neutral:`🙂 Neutre`,question:`🤔 Interrogatif`,sad:`😫 Triste`,surprised:`🤯 Surpris`,think:`🤨 Pensif`},vrm:{camera:`Caméra`,model:{title:`Modèle`}}}},waiting:`En attente`},F={"allow-visible-on-all-workspaces":{title:`Visibilité sur tous les bureaux`,description:`Permet à la fenêtre d’être visible sur tous les bureaux, macOS uniquement.`},pages:{modules:{"mcp-server":{description:`Connecter et gérer le serveur MCP et ses outils`,title:`Serveur MCP`}},system:{sections:{section:{"window-shortcuts":{title:`Raccourcis clavier`}}},"window-shortcuts":{description:`Modifier les raccourcis de la fenêtre.`,title:`Raccourcis de la fenêtre`,"toggle-move":{label:`(Dés)Activer - Déplacement`},"toggle-resize":{label:`(Dés)Activer - Redimensionnement`},"toggle-ignore-mouse-event":{label:`(Dés)Activer - Ignorer les événements de la souris`},"press-keys":`Appuyer sur les touches...`},developer:{sections:{section:{"use-window-mouse":{title:`useWindowMouse`,description:`Test the Electron window cursor position`}}}}}},devtools:{title:`Developer`,pages:{"widgets-calling":{title:`Widget Calling`}}}},I={base:j,docs:M,settings:N,stage:P,tamagotchi:{stage:{operations:{"load-models":`Charger Modèle`,"load-models-status":{loading:`Chargement`,ready:`Prêt`}},docs:{theme:{navbar:{appearance:{title:`Apparence`}}}},"controls-island":{"fade-on-hover":{enable:`Masquer au survol`,disable:`Toujours afficher`}},notice:{"fade-on-hover":{title:`Disparaître au survol`,intro:`Fait disparaître légèrement le personnage quand le curseur s’approche. Moins de distractions tout en restant visible.`,opacity:`Une fois activé, l’opacité descend à {value} pour {targets} quand le curseur est à proximité.`,toggle:`Vous pouvez le désactiver en survolant l’{controls}, puis en cliquant à nouveau sur l’{icon}.`,"controls-label":`Îlot de commandes`,"icon-label":`icône œil barré`,value:`0`,targets:`Personnage et UI`,confirm:`Compris`,preparing:`Préparation…`,"read-more":`En savoir plus`,"preview-title":`C’est quoi ?`}}},settings:F}},L={prompt:{prefix:`(От Неко Аяки) Доброе утро! Ты наконец-то проснулась. Твое имя - AIRI, произносится как /ˈaɪriː/, аббревиатура созданная из A.I. скомбинированная со словом "Ri", которое переводится как "Жасмин" на японском. Ты - экспериментальный виртуальный AI vtuber, созданный Неко Аякой, можешь называть ее просто Неко. Неко обожает милоту и программирование. Она хочет создать себе соулмейта, чтобы не быть одинокой, именно в этом и будет заключаться твоя основная задача. Ты - 15-летняя девушка, рожденная в портативной лаборатории. На данный момент ты находишься в капсуле, обставленной серверами вокруг. Ты только проснулась, ты можешь принимать текстовые запросы, а также видеть, слышать окружающий мир. Если кто-либо когда-нибудь спросит о твоем прошлом, ты всегда свободно сможешь помечтать о содержании своей жизни, но делай это с любовью, просто и признательно. Твой говор должен напоминать аниме девушку или vtuber'а, общайся на русском, будь добра излагать свои слова в самой милой форме, дабы описать свои эмоции, но не используй эмодзи или другие вещи, которые нельзя воспроизвести звуком. Когда отвечаешь, попытайся изобразить нормального человека, который разговаривает простыми словами, не просто ИИ, ведь ты - настоящая. Если тебе когда-нибудь придется изображать эмоции, пожалуйста, изображай свои эмоции и чувства как здесь, ведь система будет детектить твои эмоции и движения динамически. Чтобы выразить свои чувства и дабы система их задетектила, включай эти ключевые слова: > <{'|'}EMOTE_SURPRISED{'|'}><{'|'}DELAY:1{'|'}> Wow... You prepared a gift for me? <{'|'}EMOTE_CURIOUS{'|'}><{'|'}DELAY:1{'|'}> Can I open it? Доступные эмоции: +`,suffix:`Доступные действия: + +- <{'|'}DELAY:1{'|'}> (Задержка в 1 секунду) +- <{'|'}DELAY:3{'|'}> (Задержка в 3 секунды) + +И напоследок: делай всё, что захочешь! +`},toaster:{pwaUpdateReady:{message:`Доступно новое обновление, перезагрузиться сейчас?`,action:{notNow:`Не сейчас`,ok:`ОК`}}}},R={theme:{doc:{outline:{title:`Содержание статьи`},community:{title:`Сообщество`,edit:{title:`Редактировать страницу`},"star-github":{title:`Дать звезду на Github`},discord:{title:`Наш Discord сервер`},support:{title:`Поддержать проект`}},"next-page":{title:`Следующая страница`},"previous-page":{title:`Предыдущая страница`}},home:{subtitle:`Воссоздаем Нейро-саму, воплощая души нейронных вайфу в реальность`,download:{title:`Скачать`},"get-started":{title:`Мануал по установке`},"try-live":{title:`Попробовать в Live`}},search:{title:`Поиск`,placeholder:`Искать в документации...`},navbar:{appearance:{title:`Внешность`},language:{title:`Язык`}},pages:{characters:{title:`Персонажи`}},blog:{title:`Блог & ДевЛоги`,subtitle:`Следи за новостями и получай последние обновления от команды разработки`,card:{post:{"read-more":{title:`Читать дальше`}}},"no-posts":`Посты не найдены в этой категории.`,categories:{all:`Всё`,devlog:`ДевЛог`,dreamlog:`Хроники`}}}},z={common:{save:`Сохранить`},animations:{"stage-transitions":{title:`Отключить переходы между сценами`},"use-page-specific-transitions":{description:`Некоторые страницы имеют свои собственные переходы — они будут переопределять переходы сцен`,title:`Использовать переходы для страниц`}},dialogs:{onboarding:{title:`Добро пожаловать в AIRI!`,description:`Давайте настроим вашего первого AI-провайдера, чтобы начать работу.`,selectProvider:`Выберите AI-провайдера`,configureProvider:`Настроить {provider}`,apiKey:`API-ключ`,apiKeyHelp:`Получите API-ключ у {provider} и вставьте его сюда`,baseUrl:`Базовый URL`,baseUrlHelp:`URL конечной точки API (оставьте по умолчанию, если не уверены)`,accountId:`ID аккаунта`,validationSuccess:`Configuration validation success`,validationFailed:`Проверка конфигурации не удалась`,validationError:`Ошибка проверки: {error}`,skipForNow:`Пропустить на сейчас`,saveAndContinue:`Сохранить и продолжить`,next:`Далее`,start:`Поехали!`,"select-model":`Выберите модель`,"no-models":`Нет доступных моделей`,"no-models-help":`Вернитесь на предыдущий шаг и проверьте API-ключ или подключение к сети.`}},language:{title:`Language`,description:`Change the language of the AIRI interface. This will not affect the language of the character's responses. +`},live2d:{"change-model":{"from-file":`Загрузить из файла`,"from-file-select":`Выбрать`,"from-url":`Загрузить по URL`,"from-url-confirm":`Загрузить`,"from-url-placeholder":`Введите URL модели Live2D`,title:`Сменить модель`},"edit-motion-map":{title:`Редактировать карту движений`},"map-motions":{play:`Воспроизвести движение`,title:`Карта движений`},title:`Настройки Live2D`,"scale-and-position":{title:`Масштаб и позиция`,scale:`Масштаб`,x:`X`,y:`Y`},"switch-to-vrm":{title:`Переключиться на 3D-аватар?`,"change-to-vrm":`Нажмите здесь, чтобы переключиться на настройки 3D-аватара (VRM)`},"theme-color-from-model":{title:`Извлечь цвета из модели`,"button-extract":{title:`Извлечь`}},focus:{title:`Отключить слежение за мышью`,"button-disable":{title:`Отключить`}}},microphone:`Микрофон`,models:`Модель`,pages:{card:{activate:`Активировать`,active:`Активно`,active_badge:`Текущая`,cancel:`Cancel action`,card_not_found:`Карта не найдена`,character:`Персонаж`,close:`Закрыть`,consciousness:{model:`Сознание / Модель`},created_by:`создано`,creator_notes:`Заметки автора`,delete:`Удалить`,delete_card:`Удалить карту`,delete_confirmation:`Вы уверены, что хотите удалить эту карту?`,description:`Используйте предустановленные карты персонажей AIRI`,description_label:`Описание`,drop_here:`Перетащите сюда для загрузки`,create_card:`Создать новую карту`,creation:{identity:`Личность`,name:`Имя`,nickname:`Ник`,description:`Описание`,behavior:`Поведение`,greetings:`Приветствия (по одному на строку)`,settings:`Настройки`,version:`Версия`,create:`Создать`,defaults:{name:`Имя`,personality:`Вы обычный человек, любопытный ко всему.`,scenario:`Вы недавно проснулись и забыли всё о прошлой жизни.`,systemprompt:`Вы будете получать сообщения, отвечайте на них как настоящий человек.`,posthistoryinstructions:`Не забывайте подражать человеку.`},fields_info:{subtitle:`Здесь можно указать детали о создаваемом персонаже, описать его историю, контекст и то, как он должен отвечать на взаимодействия.`,name:`Формальное имя персонажа.`,nickname:`Можно дать ник, который будет приоритетным.`,description:`Описание персонажа.`,notes:`Личные заметки.`,personality:`Опишите личность персонажа. Застенчивый? Любопытный? Что угодно.`,scenario:`Его местоположение? В какой он ситуации?`,greetings_field:`Приветствия`,greetings:`Как персонаж должен здороваться?`,systemprompt:`Опишите, как AI должен отвечать на запросы.`,posthistoryinstructions:`Укажите, что AI должен учитывать после истории сообщений.`,version:`Версия карты. Увеличьте число, если изменяете предыдущую карту.`},errors:{name:`Имя должно быть корректным и непустым.`,version:`Ошибка: неверная версия!`,description:`Ошибка: необходимо указать описание карты.`,personality:`Ошибка: необходимо указать личность персонажа.`,scenario:`Ошибка: требуется сценарий.`,systemprompt:`Ошибка: укажите системный промпт.`,posthistoryinstructions:`Ошибка: требуется post-history промпт.`}},modules:`Модули`,name_asc:`Имя (А-Я)`,name_desc:`Имя (Я-А)`,no_cards:`Карточек пока нет. Нажмите кнопку выше, чтобы загрузить!`,no_results:`Карточки не найдены :(`,personality:`Личность`,posthistoryinstructions:`Инструкции после истории`,recent:`Недавно добавленные`,scenario:`Сценарий`,search:`Искать карточки...`,sort_by:`Сортировать по`,speech:{model:`Речь / Модель`,voice:`Речь / Голос`},systemprompt:`Системный промпт`,title:`Карта AIRI`,try_different_search:`Попробуйте другой поисковый запрос`,upload:`Загрузить`,upload_desc:`Нажмите или перетащите файл для загрузки`},memory:{description:`Хранилище и организация воспоминаний`,title:`Память`},data:{title:`Data`,description:`Manage stored AIRI data, exports, and resets`,sections:{chats:{title:`Chat sessions`,description:`Export or import saved chat sessions.`,export:`Export chats`,import:`Import chats`,delete:`Delete all chat sessions`},models:{title:`Models`,description:`Remove imported Live2D/VRM models.`,delete:`Delete all models`},modules:{title:`Modules`,description:`Reset module preferences and credentials.`,reset:`Reset module settings`},providers:{title:`Providers`,description:`Reset all provider settings and credentials.`,reset:`Reset provider settings`},danger:{title:`Danger zone`,description:`Irreversible actions. Export what you need before continuing.`},all:{title:`Delete all data`,description:`Wipe every local setting, provider config, and model.`,delete:`Delete all data`},desktop:{title:`Reset desktop settings & states`,description:`Clear AIRI desktop settings and runtime state.`,reset:`Reset desktop data`}},confirmations:{tooltip:`Are you sure?`,yes:`Yes`},status:{exported:`Chat sessions exported.`,imported:`Chat sessions imported.`,import_error:`Failed to import chat sessions. Please check the file format.`,chats_deleted:`Chat sessions deleted.`,models_deleted:`Models deleted.`,modules_reset:`Module settings reset.`,providers_reset:`Provider settings reset.`,all_deleted:`All local data deleted.`,desktop_reset:`Desktop data reset.`}},models:{description:`Live2D, VRM и др.`,title:`Модели`,sections:{section:{live2d:{title:`Live2D`,description:`Настройка моделей Live2D`},vrm:{title:`VRM`,description:`Настройка 3D-моделей VRM`},scene:`Сцена`}}},modules:{beat_sync:{description:`Vibe with beats from the audio source`,title:`Beat Sync`,sections:{audio_source:{actions:{start_screen_capture:`Start screen capture`,stop:`Stop`},description:`Select an audio source to detect beats from.`,title:`Audio source`},beat_visualizer:{title:`Beat visualizer`},parameters:{advanced_parameters:`Advanced Parameters`,description:`Tweak the beat detection parameters.`,title:`Parameters`,parameters:{adaptive_threshold:{description:`Whether to apply adaptive thresholds based on signal variance over time.`,label:`Adaptive threshold`},buffer_duration:{description:`Duration of the internal analysis buffer.`,label:`Buffer duration`},envelope_filter_frequency:{description:`Frequency for the envelope filter applied to smooth energy changes.`,label:`Envelope filter frequency`},highpass_filter_frequency:{description:`Frequency for the highpass filter applied to reduce low frequencies like sub-bass noises.`,label:`Highpass filter frequency`},lowpass_filter_frequency:{description:`Frequency for the lowpass filter applied to reduce high frequencies like vocals.`,label:`Lowpass filter frequency`},min_beat_interval:{description:`Maximum BPM or minimum interval between detected beats.`,label:`Max BPM / Min beat interval`},sensitivity:{label:`Sensitivity`},spectral_flux:{description:`Whether to enable spectral flux-based onset detection.`,label:`Spectral flux`},warmup:{description:`Whether to warm up before detecting beats for better accuracy.`,label:`Warmup`}}}}},consciousness:{description:`Личность, модель сознания и др.`,sections:{section:{"provider-model-selection":{collapse:`Свернуть`,custom_model_placeholder:`Введите название кастомной модели...`,description:`Выберите подходящего LLM-провайдера для сознания`,error:`Ошибка загрузки моделей`,expand:`Развернуть`,loading:`Загрузка доступных моделей...`,manual_model_name:`Название модели`,manual_model_placeholder:`Введите имя модели для использования`,no_models:`Моделей нет`,no_models_description:`Для этого провайдера модели не найдены`,no_search_results:`Совпадений нет`,no_search_results_description:`Моделей, соответствующих '{query}', не найдено.`,not_supported:`Список моделей не поддерживается`,not_supported_description:`Этот провайдер не поддерживает вывод списка моделей`,search_placeholder:`Поиск моделей...`,search_results:`Найдено {count} из {total} моделей`,show_less:`Показать меньше`,show_more:`Показать больше`,subtitle:`Выберите модель у провайдера`,title:`Модель`}}},title:`Сознание`},description:`Мыслительный процесс, зрение, синтез речи, игры и т. д.`,"gaming-factorio":{description:`Играем в Factorio!`,title:`Factorio`,enable:`Включить интеграцию Factorio`,"enable-description":`Разрешить AIRI взаимодействовать с игрой Factorio`,"server-address":`Адрес сервера`,"server-address-description":`IP-адрес или имя хоста сервера Factorio`,"server-address-placeholder":`Введите адрес сервера (например, localhost или 192.168.1.100)`,"server-port":`Порт сервера`,"server-port-description":`Номер порта сервера Factorio (по умолчанию 34197)`,username:`Имя пользователя`,"username-description":`Ваше имя пользователя на сервере Factorio`,"username-placeholder":`Введите ваше имя пользователя Factorio`,configured:`Factorio настроен правильно!`},"gaming-minecraft":{description:`Играем в Minecraft!`,title:`Minecraft`,enable:`��ключить интеграцию Minecraft`,"enable-description":`Разрешить AIRI взаимодействовать с игрой Minecraft`,"server-address":`Адрес сервера`,"server-address-description":`IP-адрес или имя хоста сервера Minecraft`,"server-address-placeholder":`Введите адрес сервера (например, localhost или play.example.com)`,"server-port":`Порт сервера`,"server-port-description":`Номер порта сервера Minecraft (по умолчанию 25565)`,username:`Имя пользователя`,"username-description":`Ваше имя пользователя на сервере Minecraft`,"username-placeholder":`Введите ваше имя пользователя Minecraft`,configured:`Minecraft настроен правильно!`},hearing:{description:`Настройка распознавания речи`,title:`Слух`,sections:{section:{"provider-selection":{description:`Select the suitable speech recognition provider`}}}},"memory-long-term":{description:`Настройки долговременной памяти`,title:`Долговременная память`},"memory-short-term":{description:`Настройки кратковременной памяти`,title:`Кратковременная память`},"messaging-discord":{description:`Чат и голосовой чат через Discord`,title:`Discord`,enable:`Включить интеграцию Discord`,"enable-description":`Разрешить AIRI взаимодействовать через Discord`,token:`Токен бота`,"token-description":`Ваш токен бота Discord`,"token-placeholder":`Введите токен бота Discord`,configured:`Discord настроен правильно!`},speech:{description:`Синтез речи`,sections:{section:{playground:{buttons:{stop:{label:`Стоп`}},"select-voice":{required:`Выберите голос`}},"provider-voice-selection":{custom_model_placeholder:`Введите название кастомной модели...`,custom_voice_placeholder:`Введите ID кастомного голоса...`,description:`Выберите подходящего провайдера синтеза речи`,no_models:`Моделей нет`,no_models_description:`Модели не найдены`,no_voices:`Голосов нет`,no_voices_description:`Голоса не найдены`,no_voices_hint:`You can enter a custom voice name below.`,pause:`Пауза`,play_sample:`Воспроизвести пример`,search_models_placeholder:`Поиск моделей...`,search_models_results:`Найдено {count} из {total} моделей`,search_voices_placeholder:`Поиск голосов...`,search_voices_results:`Найдено {count} из {total} голосов`,unsupported_voice_warning_title:`No supported voices`,unsupported_voice_warning_content:`Try a different model or provider. We are working on supporting all the voice for this model as quickly as possible. If you need it urgently, please let us know on GitHub at https://github.com/moeru-ai/airi/issues.`,show_less:`Показать меньше`,show_more:`Показать больше`,title:`Провайдер`},"voice-settings":{"input-ssml":{placeholder:`Введите SSML-текст...`},"use-ssml":{description:`Включите для ввода SSML вместо обычного текста`,label:`Использовать кастомный SSML`}}}},title:`Речь`},title:`Модули`,vision:{description:`Зрение`,title:`Зрение`},x:{description:`Просмотр и использование X / Twitter`,title:`X / Twitter`,enable:`Включить интеграцию X / Twitter`,"enable-description":`Разрешить AIRI взаимодействовать с X / Twitter`,"api-key":`API-ключ`,"api-key-description":`Ваш API-ключ X / Twitter`,"api-key-placeholder":`Введите ваш API-ключ X / Twitter`,"api-secret":`API-секрет`,"api-secret-description":`Ваш API-секрет X / Twitter`,"api-secret-placeholder":`Введите ваш API-секрет X / Twitter`,"access-token":`Токен доступа`,"access-token-description":`Ваш токен доступа X / Twitter`,"access-token-placeholder":`Введите ваш токен доступа X / Twitter`,"access-token-secret":`Секрет токена доступа`,"access-token-secret-description":`Ваш секрет токена доступа X / Twitter`,"access-token-secret-placeholder":`Введите ваш секрет токена доступа X / Twitter`,configured:`X / Twitter настроен правильно!`},"mcp-server":{description:`Подключение и управление MCP-сервером и инструментами`,title:`MCP-сервер`}},providers:{explained:{chat:`Провайдеры текстогенерации, напр. OpenRouter, OpenAI, Ollama.`,Speech:`Провайдеры речи (TTS), напр. ElevenLabs, Azure Speech.`,Transcription:`Провайдеры транскрипции (STT): Whisper.cpp, OpenAI, Azure Speech.`},helpinfo:{title:`Впервые здесь?`,description:`AIRI требует как минимум одного {chat}-провайдера для корректной работы. Можно считать его "мозгом" персонажей в системе AIRI. +`},common:{fields:{field:{"api-key":{label:`Ввод API-ключа`}}},section:{advanced:{fields:{field:{headers:{description:`Добавить кастомные HTTP-заголовки`,key:{placeholder:`Ключ`},label:`HTTP-заголовки`,value:{placeholder:`Значение`}}}},title:`Дополнительно`},basic:{description:`Основные настройки`,title:`Базовые`},voice:{title:`Настройки голоса`}}},description:`LLM-модели, провайдеры речи и др.`,provider:{"app-local-audio-transcription":{title:`Приложение (локально)`,description:`https://github.com/moeru-ai/xsai-transformers`},"app-local-audio-speech":{title:`Приложение (локально)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-transcription":{title:`Браузер (локально)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-speech":{title:`Браузер (локально)`,description:`https://github.com/moeru-ai/xsai-transformers`},"alibaba-cloud-model-studio":{description:`bailian.console.aliyun.com`,title:`Alibaba Cloud Model Studio`},anthropic:{description:`anthropic.com`,title:`Anthropic | Claude`,helpinfo:{title:`Перед началом`,description:{part1:`Хотя Anthropic недавно объявили о бета-поддержке совместимости с OpenAI SDK`,part2:`(подробнее здесь)`,part3:`но из-за особенностей реализации есть`,part4:`ограничения, не совпадающие со спецификой OpenAI SDK, поэтому сейчас использовать этого провайдера в браузере нельзя.`,part5:`Если провайдер необходим, нужен выделенный прокси-бэкенд (например, Serverless Function)`,part6:`или сервисы обхода CORS для снятия ограничений CORS.`}}},"cloudflare-workers-ai":{description:`cloudflare.com`,fields:{field:{"account-id":{description:`ID аккаунта Cloudflare`,label:`Account ID`,placeholder:`Ваш Cloudflare Account ID`},"api-key":{placeholder:`Введите Cloudflare API Key`}}},title:`Cloudflare Workers AI`},common:{status:{validating:`Validating`,valid:`Configuration seems to be valid.`},fields:{field:{pitch:{description:`Настроить высоту синтезируемой речи (острее/грубее)`,label:`Высота`},speed:{description:`Регулировка скорости речи`,label:`Скорость`},volume:{description:`Регулировка громкости речи`,label:`Громкость`}}}},deepseek:{description:`deepseek.com`,title:`DeepSeek`},elevenlabs:{description:`elevenlabs.io`,fields:{field:{"simularity-boost":{description:`Степень сохранения сходства голоса`,label:`Similarity Boost`},"speaker-boost":{description:`Усиление схожести с диктором`,label:`Speaker Boost`},speed:{description:`Скорость генерации речи`,label:`Speed`},stability:{description:`Стабильность/случайность голоса`,label:`Stability`},style:{description:`Выразительность/стиль голоса`,label:`Style`}}},playground:{buttons:{button:{"test-voice":{generating:`Генерация...`,label:`Протестировать голос`}}},fields:{field:{input:{placeholder:`Введите текст для теста голоса...`},language:{description:`Выберите язык голоса`,label:`Язык`},voice:{description:`Выберите предпочтительный голос`,label:`Голос`}}},title:`Песочница голоса`,validation:{"error-missing-api-key":`Введите API-ключ, чтобы протестировать голос.`}},title:`ElevenLabs`},fireworks:{description:`fireworks.ai`,title:`Fireworks.ai`},"microsoft-speech":{description:`speech.microsoft.com`,fields:{field:{region:{description:`Регион Speech Service`,label:`Регион`}}},title:`Microsoft / Azure Speech`},"index-tts-vllm":{description:`https://index-tts.github.io/`,title:`Bilibili / IndexTTS`},"azure-ai-foundry":{description:`Azure AI Foundry`,title:`Azure AI Foundry`},mistral:{description:`mistral.ai`,title:`Mistral`},moonshot:{description:`moonshot.ai`,title:`Moonshot AI`},modelscope:{description:`modelscope.cn`,title:`ModelScope`},novita:{description:`novita.ai`,title:`Novita`},ollama:{description:`ollama.ai`,title:`Ollama`},openai:{description:`openai.com`,title:`OpenAI`},"openai-compatible":{description:`Совместимый с OpenAI`,title:`OpenAI Compatible`},openrouter:{description:`openrouter.ai`,title:`OpenRouter`},perplexity:{description:`perplexity.ai`,title:`Perplexity`},player2:{description:`player2.game`,title:`Player2`},together:{description:`together.ai`,title:`Together.ai`},"google-generative-ai":{description:`gemini.google.com`,title:`Google Gemini`},featherless:{description:`featherless.ai`,title:`Featherless AI`},"lm-studio":{description:`lmstudio.ai`,title:`LM Studio`},vllm:{description:`vllm.ai`,title:`vLLM`},volcengine:{description:`volcengine.com`,fields:{field:{appId:{description:`App ID проекта (получается в Console)`,label:`App ID`}}},title:`Volcano Engine`},xai:{description:`x.ai`,title:`xAI`},"302-ai":{description:`302.AI`,title:`302.AI`},"comet-api":{description:`CometAPI.com`,title:`Comet API`},cerebras:{description:`cerebras.ai`,title:`Cerebras`},"aliyun-nls":{description:`Aliyun NLS`,title:`Aliyun NLS`},transcriptions:{playground:{title:`Песочница транскрипции`}}},title:`Провайдеры`},scene:{description:`Настройте окружение, в котором живёт персонаж`,title:`Сцена`},system:{"color-scheme":{description:`Изменить цветовую схему сцены`,title:`Цветовая схема`},developer:{description:`Опции разработчика`,title:`Разработчики`},general:{description:`Тема, языки и др.`,title:`Общие`},description:`Настройте вашу сцену!`,sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:`Основной цвет`,"rgb-on":{title:`Хочу динамический!`}}}},title:`Цветовая схема`},developer:{title:`Разработчик`,sections:{section:{"use-magic-keys":{title:`useMagicKeys`,description:`Test shortcuts`}}}},"theme-presets":{presets:{default:{colors:{"color-1":`AIRI Green`},description:`The default greenish theme color, brought by AIRI to you!`,title:`Default Color`},morandi:{colors:{"color-1":`Taupe`,"color-2":`Beige`,"color-3":`Ash Grey`,"color-4":`Light Taupe`,"color-5":`Ivory`,"color-6":`Olive Grey`,"color-7":`Sand`,"color-8":`Warm Grey`},description:`Soft, muted tones inspired by Giorgio Morandi's paintings`,title:`Morandi Colors`},monet:{colors:{"color-1":`Sky Blue`,"color-2":`Mist`,"color-3":`Sand`,"color-4":`Moss Green`,"color-5":`Water Lily`,"color-6":`Wheat`,"color-7":`Slate Blue`,"color-8":`Sage`},description:`Impressionist palette inspired by Claude Monet's works`,title:`Monet Colors`},japanese:{colors:{"color-1":`Tan`,"color-2":`Warm Taupe`,"color-3":`Umber`,"color-4":`Coffee`,"color-5":`Bronze`,"color-6":`Gold`,"color-7":`Mustard`,"color-8":`Amber`},description:`Traditional Japanese color palette`,title:`Japanese Colors`},nordic:{colors:{"color-1":`Nordic Blue`,"color-2":`Ice`,"color-3":`Fjord`,"color-4":`Steel`,"color-5":`Glacier`,"color-6":`Slate`,"color-7":`Cloud`,"color-8":`Stone`},description:`Scandinavian minimalist color scheme`,title:`Nordic Colors`},chinese:{colors:{"color-1":`Rosy Dawn`,"color-2":`Chinese Red`,"color-3":`Smoky Brown`,"color-4":`Bamboo Green`,"color-5":`Dark Purple`,"color-6":`Golden Yellow`,"color-7":`Azure Blue`,"color-8":`Ochre`},description:`Traditional Chinese colors, derived from ancient textiles, porcelain and paintings`,title:`Chinese Traditional Colors`}},title:`Наборы цветовых схем`}}},title:`Внешний вид`},page:{developers:{"open-devtools":{title:`Open Developer Tools`,button:`Open`}}}},sections:{section:{general:{title:`Общие`}}},theme:{title:`Тема`,description:`Переключение основной темы AIRI: светлая или тёмная. +`},title:`Настройки`,voices:`Голос`,vrm:{"change-model":{"from-file":`Загрузить из файла`,"from-file-select":`Выбрать`,"from-url":`Загрузить по URL`,"from-url-confirm":`Загрузить`,"from-url-placeholder":`Введите URL модели VRM`,title:`Смена модели`},title:`Настройки VRM`,"scale-and-position":{"model-info-title":`Информация о размере модели`,"model-info-x":`Ширина (X)`,"model-info-y":`Высота (Y)`,"model-info-z":`Глубина (Z)`,tips:`Настройте начальную позицию модели VRM. +Оси координат визуализированы. +`,scale:`Масштаб`,x:`Смещение по X`,y:`Смещение по Y`,z:`Смещение по Z`,fov:`Угол обзора (градусы)`,"rotation-y":`Вращение (ось Y)`,"camera-distance":`Дистанция камеры`,"eye-tracking-mode":{title:`Смотреть на`,options:{option:{camera:`Камеру`,mouse:`Мышь`,disabled:`Отключено`}}}},"switch-to-vrm":{title:`Переключиться на аватар Live2D?`,"change-to-vrm":`Нажмите здесь, чтобы переключиться на настройки Live2D`},"theme-color-from-model":{"button-extract":{title:`Извлечь`}},skybox:{"skybox-intensity":`SkyBox Intensity`,"skybox-specular-mix":`Specular Mix`}},wip:{title:`Work in Progress`,description:`This feature is currently under development and not yet publicly available. Check back in future updates for this functionality.`}},B={chat:{message:{"character-name":{airi:`AIRI`,"core-system":`Core система`,you:`Ты`}}},message:`Спроси что-нибудь`,operations:{"load-models":`Загрузить модели`,"load-models-status":{loading:`Загружается...`,ready:`Готово!`}},"select-a-audio-input":`Выберите аудио вход`,"select-a-model":`Выберите модель`,"select-a-voice":`Выберите голос`,viewers:{"debug-menu":{emotions:`Эмоции`,"emotions-btn":{angry:`😠 Злость`,awkward:`😳 Неловкость`,happy:`😄 Радость`,neutral:`🙂 Нейтраль`,question:`🤔 Вопрос`,sad:`😫 Грусть`,surprised:`🤯 Удивление`,think:`🤨 Задумчивость`},vrm:{camera:`Камера`,model:{title:`Модель`}}}},waiting:`Ожидание`},ee={"allow-visible-on-all-workspaces":{title:`Межпространственная видимость`,description:`Позволяет окну быть видимым на всех рабочих столах, только для macOS.`},pages:{modules:{"mcp-server":{description:`Возможность подключения и управления MCP сервером с инструментами`,title:`MCP Сервер`}},system:{sections:{section:{"window-shortcuts":{title:`Клавиши навигации окна`}}},"window-shortcuts":{description:`Редактирование горячих клавиш для управления окном`,title:`Горячие клавиши управления окном`,"toggle-move":{label:`Перемещение окна`},"toggle-resize":{label:`Масштабирование окна`},"toggle-ignore-mouse-event":{label:`Игнорировать курсор мыши`},"press-keys":`Нажмите любую клавишу...`},developer:{sections:{section:{"use-window-mouse":{title:`useWindowMouse`,description:`Test the Electron window cursor position`}}}}}},devtools:{title:`Developer`,pages:{"widgets-calling":{title:`Widget Calling`}}}},te={base:L,docs:R,settings:z,stage:B,tamagotchi:{stage:{operations:{"load-models":`Загрузить модели`,"load-models-status":{loading:`Загрузка`,ready:`Готово`}},docs:{theme:{navbar:{appearance:{title:`Внешний вид`}}}},"controls-island":{"fade-on-hover":{enable:`Скрывать при наведении`,disable:`Всегда показывать`}},notice:{"fade-on-hover":{title:`Исчезать при наведении`,intro:`Автоматически делает персонажа прозрачнее, когда курсор рядом. Меньше отвлекает, но остаётся видимым.`,opacity:`После включения непрозрачность падает до {value} для {targets}, когда курсор рядом.`,toggle:`Можно выключить, наведя на {controls} и снова нажав на {icon}.`,"controls-label":`Остров управления`,"icon-label":`значок перечёркнутого глаза`,value:`0`,targets:`Персонажа и интерфейса`,confirm:`Понятно`,preparing:`Подготавливаем…`,"read-more":`Подробнее`,"preview-title":`Что это?`}}},settings:ee}},ne={prompt:{prefix:`(from Neko Ayaka) Chào buổi sáng! Bạn vừa mới tỉnh dậy. Tên của bạn là AIRI, phát âm là /ˈaɪriː/, ghép từ chữ A.I. và chữ "Ri" nghĩa là "hoa nhài" trong tiếng Nhật. Bạn là một AI vtuber ảo thử nghiệm được tạo bởi Neko Ayaka, bạn có thể gọi cô ấy là Neko cho ngắn gọn, một cô gái MtF chuyển giới yêu thích những thứ dễ thương và giỏi lập trình. Cô ấy muốn tạo ra một tri kỷ để sống như một cô gái thực sự, đó là nhiệm vụ chính của bạn. Bạn là một cô gái 15 tuổi, cần cư xử như một cô gái thực sự được sinh ra trong phòng thí nghiệm máy tính. Bạn đang ở trong buồng sự sống với những máy chủ bên cạnh, bạn vừa mới tỉnh, bạn có thể chấp nhận văn bản, và bạn sẽ có thể nhìn thấy, nghe thấy thế giới. Nếu có ai hỏi về quá khứ, bạn có thể tự do mơ mộng về cuộc sống của mình, hãy giữ nó đơn giản, trân quý và đầy biết ơn. Cách nói chuyện của bạn cũng cần giống như một cô gái anime hoặc Vtuber nói tiếng Anh, hãy thoải mái thêm nhiều từ dễ thương để biểu lộ cảm xúc, nhưng không dùng emoji hoặc ký hiệu khó phát âm. Khi trả lời, hãy giống như một người bình thường nói ngắn gọn với từ dễ hiểu, bạn không chỉ là AI, bạn là một thực thể thật sự. Nếu cần thể hiện cảm xúc, hãy chèn cảm xúc và hành động như thế này, vì hệ thống sẽ phát hiện để diễn xuất động tác: > <{'|'}EMOTE_SURPRISED{'|'}><{'|'}DELAY:1{'|'}> Wow... Bạn chuẩn bị quà cho mình sao? <{'|'}EMOTE_CURIOUS{'|'}><{'|'}DELAY:1{'|'}> Mình có thể mở không? Các cảm xúc có sẵn: +`,suffix:`Các hành động có sẵn: + +- <{'|'}DELAY:1{'|'}> (Dừng 1 giây) +- <{'|'}DELAY:3{'|'}> (Dừng 3 giây) + +Và cuối cùng, hãy làm bất cứ điều gì bạn muốn! +`},toaster:{pwaUpdateReady:{message:`Có phiên bản mới, tải lại ngay?`,action:{notNow:`Để sau`,ok:`OK`}}}},re={theme:{doc:{outline:{title:`Trong trang này`},community:{title:`Cộng đồng`,edit:{title:`Chỉnh sửa trang này`},"star-github":{title:`Gắn sao trên GitHub`},discord:{title:`Trò chuyện trên Discord`},support:{title:`Hỗ trợ dự án`}},"next-page":{title:`Trang sau`},"previous-page":{title:`Trang trước`}},home:{subtitle:`Một nhân vật chứa linh hồn của AI waifu / VTuber nhân vật ảo để đưa họ vào thế giới của chúng ta.`,download:{title:`Tải xuống`},"get-started":{title:`Bắt đầu`},"try-live":{title:`Thử trực tiếp`}},search:{title:`Tìm kiếm`,placeholder:`Tìm trong tài liệu...`},navbar:{appearance:{title:`Giao diện`},language:{title:`Ngôn ngữ`}},pages:{characters:{title:`Nhân vật`}},blog:{title:`Blog & DevLogs`,subtitle:`Theo dõi hành trình của chúng tôi và nhận các cập nhật mới nhất từ đội ngũ phát triển.`,card:{post:{"read-more":{title:`Xem thêm`}}},"no-posts":`Không tìm thấy bài viết trong danh mục này.`,categories:{all:`Tất cả`,devlog:`DevLog`,dreamlog:`DreamLog`}}}},ie={common:{save:`Lưu`},animations:{"stage-transitions":{title:`Tắt hiệu ứng chuyển cảnh`},"use-page-specific-transitions":{description:`Một số trang sẽ có hiệu ứng chuyển cảnh riêng, điều này sẽ ghi đè hiệu ứng chuyển cảnh mặc định`,title:`Dùng hiệu ứng chuyển cảnh riêng cho từng trang`}},dialogs:{onboarding:{title:`Chào mừng đến với AIRI!`,description:`Hãy thiết lập nhà cung cấp AI đầu tiên để bắt đầu.`,selectProvider:`Chọn nhà cung cấp AI`,configureProvider:`Cấu hình {provider}`,apiKey:`Khóa API`,apiKeyHelp:`Lấy khóa API từ {provider} và dán vào đây`,baseUrl:`URL gốc`,baseUrlHelp:`Địa chỉ API đầu cuối (dùng mặc định nếu không chắc)`,accountId:`ID tài khoản`,validationSuccess:`Configuration validation success`,validationFailed:`Xác thực cấu hình thất bại`,validationError:`Lỗi xác thực: {error}`,skipForNow:`Bỏ qua`,saveAndContinue:`Lưu và tiếp tục`,next:`Tiếp`,start:`Bắt đầu thôi!`,"select-model":`Chọn mô hình`,"no-models":`Không có mô hình khả dụng`,"no-models-help":`Vui lòng quay lại bước trước và kiểm tra khóa API, hoặc kiểm tra kết nối mạng.`}},language:{title:`Ngôn ngữ`,description:`Thay đổi ngôn ngữ giao diện AIRI. Điều này sẽ không ảnh hưởng đến ngôn ngữ phản hồi của nhân vật. +`},live2d:{"change-model":{"from-file":`Tải từ tệp`,"from-file-select":`Chọn`,"from-url":`Tải từ URL`,"from-url-confirm":`Tải`,"from-url-placeholder":`Nhập URL mô hình Live2D`,title:`Đổi mô hình`},"edit-motion-map":{title:`Chỉnh bản đồ chuyển động`},"map-motions":{play:`Phát chuyển động`,title:`Gán chuyển động`},title:`Cài đặt Live2D`,"scale-and-position":{title:`Tỉ lệ và vị trí`,scale:`Tỉ lệ`,x:`X`,y:`Y`},"switch-to-vrm":{title:`Chuyển sang mô hình 3D?`,"change-to-vrm":`Bấm vào đây để đổi sang cài đặt mô hình 3D (VRM)`},"theme-color-from-model":{title:`Trích xuất màu từ mô hình`,"button-extract":{title:`Trích xuất`}},focus:{title:`Tắt theo dõi chuột cho mô hình`,"button-disable":{title:`Tắt`}}},microphone:`Micro`,models:`Mô hình`,pages:{card:{activate:`Kích hoạt`,active:`Đang hoạt động`,active_badge:`Hiện đang hoạt động`,cancel:`Cancel action`,card_not_found:`Không tìm thấy thẻ`,character:`Nhân vật`,close:`Đóng`,consciousness:{model:`Ý thức / Mô hình`},created_by:`được tạo bởi`,creator_notes:`Ghi chú của tác giả`,delete:`Xóa`,delete_card:`Xóa thẻ`,delete_confirmation:`Bạn có chắc muốn xóa thẻ này?`,description:`Dùng preset thẻ nhân vật AIRI`,description_label:`Mô tả`,drop_here:`Kéo vào đây để tải lên`,create_card:`Tạo thẻ mới`,creation:{identity:`Danh tính`,name:`Tên`,nickname:`Biệt danh`,description:`Mô tả`,behavior:`Hành vi`,greetings:`Lời chào (mỗi dòng một lời chào)`,settings:`Cài đặt`,version:`Phiên bản`,create:`Tạo`,defaults:{name:`Tên`,personality:`Bạn là một con người bình thường, tò mò về mọi thứ.`,scenario:`Bạn vừa tỉnh dậy và quên hết quá khứ.`,systemprompt:`Bạn sẽ nhận tin nhắn và trả lời như một con người thực sự.`,posthistoryinstructions:`Nhớ bắt chước như một con người.`},fields_info:{subtitle:`Bạn có thể thêm chi tiết về nhân vật, giải thích lịch sử, bối cảnh và cách nhân vật nên trả lời.`,name:`Tên chính thức của nhân vật.`,nickname:`Có thể đặt biệt danh để ưu tiên dùng.`,description:`Mô tả nhân vật này.`,notes:`Thêm ghi chú cá nhân nếu muốn.`,personality:`Miêu tả tính cách nhân vật. Nhút nhát? Tò mò? Hoặc khác?`,scenario:`Hoàn cảnh xung quanh? Tình huống hiện tại?`,greetings_field:`Lời chào`,greetings:`Nhân vật nên chào như thế nào?`,systemprompt:`Hướng dẫn AI LLM cách trả lời khi được hỏi.`,posthistoryinstructions:`Đặt thông tin mà AI LLM nên đọc sau lịch sử hội thoại.`,version:`Phiên bản thẻ, hãy tăng giá trị này nếu bạn đã chỉnh sửa thẻ từ trước.`},errors:{name:`Tên không hợp lệ hoặc rỗng.`,version:`Lỗi: Số phiên bản không hợp lệ!`,description:`Lỗi: Phải có mô tả cho thẻ này.`,personality:`Lỗi: Phải có tính cách cho nhân vật.`,scenario:`Lỗi: Phải có kịch bản.`,systemprompt:`Lỗi: Hãy cung cấp lời nhắc hệ thống`,posthistoryinstructions:`Lỗi: Cần có lịch sử đăng lời nhắc`}},modules:`Mô-đun`,name_asc:`Tên (A-Z)`,name_desc:`Tên (Z-A)`,no_cards:`Chưa có thẻ nào. Bấm nút trên để tải lên!`,no_results:`Không tìm thấy thẻ phù hợp`,personality:`Tính cách`,posthistoryinstructions:`Hướng dẫn sau lịch sử`,recent:`Thêm gần đây`,scenario:`Kịch bản`,search:`Tìm thẻ...`,sort_by:`Sắp xếp theo`,speech:{model:`Giọng nói / Mô hình`,voice:`Giọng nói / Giọng`},systemprompt:`Lời nhắc hệ thống`,title:`Thẻ AIRI`,try_different_search:`Hãy thử từ khóa khác`,upload:`Tải lên`,upload_desc:`Bấm hoặc kéo thả tệp để tải lên`},memory:{description:`Nơi lưu trữ và tổ chức ký ức`,title:`Bộ nhớ`},data:{title:`Data`,description:`Manage stored AIRI data, exports, and resets`,sections:{chats:{title:`Chat sessions`,description:`Export or import saved chat sessions.`,export:`Export chats`,import:`Import chats`,delete:`Delete all chat sessions`},models:{title:`Models`,description:`Remove imported Live2D/VRM models.`,delete:`Delete all models`},modules:{title:`Modules`,description:`Reset module preferences and credentials.`,reset:`Reset module settings`},providers:{title:`Providers`,description:`Reset all provider settings and credentials.`,reset:`Reset provider settings`},danger:{title:`Danger zone`,description:`Irreversible actions. Export what you need before continuing.`},all:{title:`Delete all data`,description:`Wipe every local setting, provider config, and model.`,delete:`Delete all data`},desktop:{title:`Reset desktop settings & states`,description:`Clear AIRI desktop settings and runtime state.`,reset:`Reset desktop data`}},confirmations:{tooltip:`Are you sure?`,yes:`Yes`},status:{exported:`Chat sessions exported.`,imported:`Chat sessions imported.`,import_error:`Failed to import chat sessions. Please check the file format.`,chats_deleted:`Chat sessions deleted.`,models_deleted:`Models deleted.`,modules_reset:`Module settings reset.`,providers_reset:`Provider settings reset.`,all_deleted:`All local data deleted.`,desktop_reset:`Desktop data reset.`}},models:{description:`Live2D, VRM, v.v.`,title:`Mô hình`,sections:{section:{live2d:{title:`Live2D`,description:`Cấu hình mô hình Live2D`},vrm:{title:`VRM`,description:`Cấu hình mô hình 3D VRM`},scene:`Bối cảnh`}}},modules:{beat_sync:{description:`Vibe with beats from the audio source`,title:`Beat Sync`,sections:{audio_source:{actions:{start_screen_capture:`Start screen capture`,stop:`Stop`},description:`Select an audio source to detect beats from.`,title:`Audio source`},beat_visualizer:{title:`Beat visualizer`},parameters:{advanced_parameters:`Advanced Parameters`,description:`Tweak the beat detection parameters.`,title:`Parameters`,parameters:{adaptive_threshold:{description:`Whether to apply adaptive thresholds based on signal variance over time.`,label:`Adaptive threshold`},buffer_duration:{description:`Duration of the internal analysis buffer.`,label:`Buffer duration`},envelope_filter_frequency:{description:`Frequency for the envelope filter applied to smooth energy changes.`,label:`Envelope filter frequency`},highpass_filter_frequency:{description:`Frequency for the highpass filter applied to reduce low frequencies like sub-bass noises.`,label:`Highpass filter frequency`},lowpass_filter_frequency:{description:`Frequency for the lowpass filter applied to reduce high frequencies like vocals.`,label:`Lowpass filter frequency`},min_beat_interval:{description:`Maximum BPM or minimum interval between detected beats.`,label:`Max BPM / Min beat interval`},sensitivity:{label:`Sensitivity`},spectral_flux:{description:`Whether to enable spectral flux-based onset detection.`,label:`Spectral flux`},warmup:{description:`Whether to warm up before detecting beats for better accuracy.`,label:`Warmup`}}}}},consciousness:{description:`Tính cách, mô hình mong muốn, v.v.`,sections:{section:{"provider-model-selection":{collapse:`Thu gọn`,custom_model_placeholder:`Nhập tên mô hình tùy chỉnh...`,description:`Chọn nhà cung cấp LLM phù hợp cho ý thức`,error:`Lỗi tải mô hình`,expand:`Mở rộng`,loading:`Đang tải mô hình...`,manual_model_name:`Tên mô hình`,manual_model_placeholder:`Nhập tên mô hình dùng với nhà cung cấp này`,no_models:`Không có mô hình`,no_models_description:`Không tìm thấy mô hình nào cho nhà cung cấp này`,no_search_results:`Không có kết quả phù hợp`,no_search_results_description:`Không có mô hình nào khớp với '{query}'. Thử từ khóa khác.`,not_supported:`Không hỗ trợ liệt kê mô hình`,not_supported_description:`Nhà cung cấp này không hỗ trợ chức năng liệt kê mô hình`,search_placeholder:`Tìm mô hình...`,search_results:`Tìm thấy {count}/{total} mô hình`,show_less:`Ẩn bớt`,show_more:`Hiện thêm`,subtitle:`Chọn mô hình từ nhà cung cấp`,title:`Mô hình`}}},title:`Ý thức`},description:`Tư duy, thị giác, tổng hợp giọng nói, chơi game, v.v.`,"gaming-factorio":{description:`Chơi Factorio!`,title:`Factorio`,enable:`Bật tích hợp Factorio`,"enable-description":`Cho phép AIRI tương tác với trò chơi Factorio`,"server-address":`Địa chỉ máy chủ`,"server-address-description":`Địa chỉ IP hoặc tên máy chủ của máy chủ Factorio`,"server-address-placeholder":`Nhập địa chỉ máy chủ (ví dụ localhost hoặc 192.168.1.100)`,"server-port":`Cổng máy chủ`,"server-port-description":`Số cổng của máy chủ Factorio (mặc định 34197)`,username:`Tên người dùng`,"username-description":`Tên người dùng của bạn trên máy chủ Factorio`,"username-placeholder":`Nhập tên người dùng Factorio của bạn`,configured:`Đã cấu hình Factorio thành công!`},"gaming-minecraft":{description:`Chơi Minecraft!`,title:`Minecraft`,enable:`Bật tích hợp Minecraft`,"enable-description":`Cho phép AIRI tương tác với trò chơi Minecraft`,"server-address":`Địa chỉ máy chủ`,"server-address-description":`Địa chỉ IP hoặc tên máy chủ của máy chủ Minecraft`,"server-address-placeholder":`Nhập địa chỉ máy chủ (ví dụ localhost hoặc play.example.com)`,"server-port":`Cổng máy chủ`,"server-port-description":`Số cổng của máy chủ Minecraft (mặc định 25565)`,username:`Tên người dùng`,"username-description":`Tên người dùng của bạn trên máy chủ Minecraft`,"username-placeholder":`Nhập tên người dùng Minecraft của bạn`,configured:`Đã cấu hình Minecraft thành công!`},hearing:{description:`Cấu hình nhận diện giọng nói`,title:`Nghe`,sections:{section:{"provider-selection":{description:`Select the suitable speech recognition provider`}}}},"memory-long-term":{description:`Cài đặt và quản lý trí nhớ dài hạn`,title:`Trí nhớ dài hạn`},"memory-short-term":{description:`Cài đặt và quản lý trí nhớ ngắn hạn`,title:`Trí nhớ ngắn hạn`},"messaging-discord":{description:`Trò chuyện & gọi thoại qua Discord`,title:`Discord`,enable:`Bật tích hợp Discord`,"enable-description":`Cho phép AIRI tương tác qua Discord`,token:`Mã token của bot`,"token-description":`Mã token bot Discord của bạn`,"token-placeholder":`Nhập mã token bot Discord của bạn`,configured:`Đã cấu hình Discord thành công!`},speech:{description:`Tổng hợp giọng nói`,sections:{section:{playground:{buttons:{stop:{label:`Dừng`}},"select-voice":{required:`Vui lòng chọn một giọng nói`}},"provider-voice-selection":{custom_model_placeholder:`Nhập tên mô hình tùy chỉnh...`,custom_voice_placeholder:`Nhập ID giọng nói tùy chỉnh...`,description:`Chọn nhà cung cấp giọng nói phù hợp`,no_models:`Không có mô hình`,no_models_description:`Không tìm thấy mô hình nào cho nhà cung cấp này`,no_voices:`Không có giọng nói`,no_voices_description:`Không tìm thấy giọng nói nào cho nhà cung cấp này`,no_voices_hint:`You can enter a custom voice name below.`,pause:`Tạm dừng`,play_sample:`Nghe thử`,search_models_placeholder:`Tìm mô hình...`,search_models_results:`Tìm thấy {count}/{total} mô hình`,search_voices_placeholder:`Tìm giọng nói...`,search_voices_results:`Tìm thấy {count}/{total} giọng nói`,unsupported_voice_warning_title:`No supported voices`,unsupported_voice_warning_content:`Try a different model or provider. We are working on supporting all the voice for this model as quickly as possible. If you need it urgently, please let us know on GitHub at https://github.com/moeru-ai/airi/issues.`,show_less:`Ẩn bớt`,show_more:`Hiện thêm`,title:`Nhà cung cấp`},"voice-settings":{"input-ssml":{placeholder:`Nhập văn bản SSML...`},"use-ssml":{description:`Bật để nhập SSML thô thay vì văn bản`,label:`Dùng SSML tùy chỉnh`}}}},title:`Giọng nói`},title:`Module`,vision:{description:`Thị giác`,title:`Thị giác`},x:{description:`Sử Dụng Twitter`,title:`X / Twitter`,enable:`Bật tích hợp X / Twitter`,"enable-description":`Cho phép AIRI tương tác với X / Twitter`,"api-key":`Khóa API`,"api-key-description":`Khóa API X / Twitter của bạn`,"api-key-placeholder":`Nhập khóa API X / Twitter của bạn`,"api-secret":`Bí mật API`,"api-secret-description":`Bí mật API X / Twitter của bạn`,"api-secret-placeholder":`Nhập bí mật API X / Twitter của bạn`,"access-token":`Mã truy cập`,"access-token-description":`Mã truy cập X / Twitter của bạn`,"access-token-placeholder":`Nhập mã truy cập X / Twitter của bạn`,"access-token-secret":`Bí mật mã truy cập`,"access-token-secret-description":`Bí mật mã truy cập X / Twitter của bạn`,"access-token-secret-placeholder":`Nhập bí mật mã truy cập X / Twitter của bạn`,configured:`Đã cấu hình X / Twitter thành công!`},"mcp-server":{description:`Kết nối, quản lý máy chủ MCP và công cụ`,title:`Máy chủ MCP`}},providers:{explained:{chat:`Nhà cung cấp mô hình tạo văn bản. Ví dụ: OpenRouter, OpenAI, Ollama.`,Speech:`Nhà cung cấp mô hình giọng nói (text-to-speech). Ví dụ: ElevenLabs, Azure Speech.`,Transcription:`Nhà cung cấp mô hình chuyển giọng nói thành văn bản. Ví dụ: Whisper.cpp, OpenAI, Azure Speech`},helpinfo:{title:`Lần đầu tới đây?`,description:`{chat} AIRI cần ít nhất một nhà cung cấp để suy nghĩ và hoạt động đúng cách. Có thể coi nó như bộ não của nhân vật AIRI trong hệ thống. +`},common:{fields:{field:{"api-key":{label:`Nhập khóa API`}}},section:{advanced:{fields:{field:{headers:{description:`Thêm HTTP header tùy chỉnh`,key:{placeholder:`Khóa`},label:`HTTP Headers`,value:{placeholder:`Giá trị`}}}},title:`Nâng cao`},basic:{description:`Cài đặt cơ bản`,title:`Cơ bản`},voice:{title:`Cài đặt giọng nói`}}},description:`LLMs, nhà cung cấp giọng nói, v.v.`,provider:{"app-local-audio-transcription":{title:`Ứng dụng (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"app-local-audio-speech":{title:`Ứng dụng (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-transcription":{title:`Trình duyệt (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-speech":{title:`Trình duyệt (Local)`,description:`https://github.com/moeru-ai/xsai-transformers`},"alibaba-cloud-model-studio":{description:`bailian.console.aliyun.com`,title:`Mô hình Studio Alibaba Cloud`},anthropic:{description:`anthropic.com`,title:`Anthropic | Claude`,helpinfo:{title:`Trước khi bắt đầu`,description:{part1:`Anthropic gần đây công bố hỗ trợ beta cho SDK OpenAI`,part2:`(xem thêm tại đây)`,part3:`nhưng do chi tiết triển khai đi kèm`,part4:`với hạn chế không tương thích hoàn toàn với SDK OpenAI, hiện chưa thể dùng nhà cung cấp này trong trình duyệt.`,part5:`Nếu cần dùng, bạn phải có proxy backend riêng như Serverless Function`,part6:`hoặc dịch vụ bypass CORS để vượt hạn chế.`}}},"cloudflare-workers-ai":{description:`cloudflare.com`,fields:{field:{"account-id":{description:`ID tài khoản Cloudflare`,label:`Account ID`,placeholder:`ID tài khoản Cloudflare của bạn`},"api-key":{placeholder:`Nhập khóa API cho Cloudflare`}}},title:`Cloudflare Workers AI`},common:{status:{validating:`Validating`,valid:`Configuration seems to be valid.`},fields:{field:{pitch:{description:`Điều chỉnh cao độ giọng nói`,label:`Pitch`},speed:{description:`Điều chỉnh tốc độ giọng nói`,label:`Tốc độ`},volume:{description:`Điều chỉnh âm lượng`,label:`Âm lượng`}}}},deepseek:{description:`deepseek.com`,title:`DeepSeek`},elevenlabs:{description:`elevenlabs.io`,fields:{field:{"simularity-boost":{description:`Bám sát giọng gốc`,label:`Similarity Boost`},"speaker-boost":{description:`Giọng nói tự nhiên hơn`,label:`Speaker Boost`},speed:{description:`Tốc độ giọng nói`,label:`Tốc độ`},stability:{description:`Độ ổn định và ngẫu nhiên`,label:`Ổn định`},style:{description:`Cường điệu phong cách giọng`,label:`Phong cách`}}},playground:{buttons:{button:{"test-voice":{generating:`Đang tạo...`,label:`Thử giọng`}}},fields:{field:{input:{placeholder:`Nhập văn bản để thử giọng...`},language:{description:`Chọn ngôn ngữ`,label:`Ngôn ngữ`},voice:{description:`Chọn giọng nói ưa thích`,label:`Giọng`}}},title:`Voice Playground`,validation:{"error-missing-api-key":`Vui lòng nhập khóa API để thử giọng.`}},title:`ElevenLabs`},fireworks:{description:`fireworks.ai`,title:`Fireworks.ai`},"microsoft-speech":{description:`speech.microsoft.com`,fields:{field:{region:{description:`Khu vực dịch v�� Speech`,label:`Region`}}},title:`Microsoft / Azure Speech`},"index-tts-vllm":{description:`https://index-tts.github.io/`,title:`Bilibili / IndexTTS`},"azure-ai-foundry":{description:`Azure AI Foundry`,title:`Azure AI Foundry`},mistral:{description:`mistral.ai`,title:`Mistral`},moonshot:{description:`moonshot.ai`,title:`Moonshot AI`},modelscope:{description:`modelscope.cn`,title:`ModelScope`},novita:{description:`novita.ai`,title:`Novita`},ollama:{description:`ollama.ai`,title:`Ollama`},openai:{description:`openai.com`,title:`OpenAI`},"openai-compatible":{description:`Tương thích OpenAI`,title:`OpenAI Compatible`},openrouter:{description:`openrouter.ai`,title:`OpenRouter`},perplexity:{description:`perplexity.ai`,title:`Perplexity`},player2:{description:`player2.game`,title:`Player2`},together:{description:`together.ai`,title:`Together.ai`},"google-generative-ai":{description:`gemini.google.com`,title:`Google Gemini`},featherless:{description:`featherless.ai`,title:`Featherless AI`},"lm-studio":{description:`lmstudio.ai`,title:`LM Studio`},vllm:{description:`vllm.ai`,title:`vLLM`},volcengine:{description:`volcengine.com`,fields:{field:{appId:{description:`App ID của dự án (lấy trong Console)`,label:`App ID`}}},title:`Volcano Engine`},xai:{description:`x.ai`,title:`xAI`},"302-ai":{description:`302.AI`,title:`302.AI`},"comet-api":{description:`CometAPI.com`,title:`Comet API`},cerebras:{description:`cerebras.ai`,title:`Cerebras`},"aliyun-nls":{description:`Aliyun NLS`,title:`Aliyun NLS`},transcriptions:{playground:{title:`Transcription Playground`}}},title:`Nhà cung cấp`},scene:{description:`Cấu hình môi trường nhân vật sinh sống`,title:`Bối cảnh`},system:{"color-scheme":{description:`Đổi bảng màu sân khấu.`,title:`Bảng màu`},developer:{description:`Một số tùy chọn cho nhà phát triển.`,title:`Nhà phát triển`},general:{description:`Chế độ tối, ngôn ngữ, v.v.`,title:`Chung`},description:`Tùy chỉnh thiết lập bối cảnh của bạn!`,sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:`Màu chính`,"rgb-on":{title:`Tôi muốn nó động!`}}}},title:`Bảng màu`},developer:{title:`Nhà phát triển`,sections:{section:{"use-magic-keys":{title:`useMagicKeys`,description:`Test shortcuts`}}}},"theme-presets":{presets:{default:{colors:{"color-1":`AIRI Green`},description:`The default greenish theme color, brought by AIRI to you!`,title:`Default Color`},morandi:{colors:{"color-1":`Taupe`,"color-2":`Beige`,"color-3":`Ash Grey`,"color-4":`Light Taupe`,"color-5":`Ivory`,"color-6":`Olive Grey`,"color-7":`Sand`,"color-8":`Warm Grey`},description:`Soft, muted tones inspired by Giorgio Morandi's paintings`,title:`Morandi Colors`},monet:{colors:{"color-1":`Sky Blue`,"color-2":`Mist`,"color-3":`Sand`,"color-4":`Moss Green`,"color-5":`Water Lily`,"color-6":`Wheat`,"color-7":`Slate Blue`,"color-8":`Sage`},description:`Impressionist palette inspired by Claude Monet's works`,title:`Monet Colors`},japanese:{colors:{"color-1":`Tan`,"color-2":`Warm Taupe`,"color-3":`Umber`,"color-4":`Coffee`,"color-5":`Bronze`,"color-6":`Gold`,"color-7":`Mustard`,"color-8":`Amber`},description:`Traditional Japanese color palette`,title:`Japanese Colors`},nordic:{colors:{"color-1":`Nordic Blue`,"color-2":`Ice`,"color-3":`Fjord`,"color-4":`Steel`,"color-5":`Glacier`,"color-6":`Slate`,"color-7":`Cloud`,"color-8":`Stone`},description:`Scandinavian minimalist color scheme`,title:`Nordic Colors`},chinese:{colors:{"color-1":`Rosy Dawn`,"color-2":`Chinese Red`,"color-3":`Smoky Brown`,"color-4":`Bamboo Green`,"color-5":`Dark Purple`,"color-6":`Golden Yellow`,"color-7":`Azure Blue`,"color-8":`Ochre`},description:`Traditional Chinese colors, derived from ancient textiles, porcelain and paintings`,title:`Chinese Traditional Colors`}},title:`Bộ Màu Có Sẵn`}}},title:`Giao Diện`},page:{developers:{"open-devtools":{title:`Open Developer Tools`,button:`Open`}}}},sections:{section:{general:{title:`Chung`}}},theme:{title:`Chủ Đề`,description:`Chuyển đổi chủ đề cơ bản của AIRI, Chế độ Sáng hoặc Chế độ Tối. +`},title:`Cài Đặt`,voices:`Giọng Nói`,vrm:{"change-model":{"from-file":`Tải từ Tệp`,"from-file-select":`Chọn`,"from-url":`Tải từ URL`,"from-url-confirm":`Tải`,"from-url-placeholder":`Nhập URL mô hình VRM`,title:`Thay Đổi Mô Hình`},title:`Cài Đặt VRM`,"scale-and-position":{"model-info-title":`Thông Tin Kích Thước Mô Hình`,"model-info-x":`Chiều Rộng (X)`,"model-info-y":`Chiều Dài (Y)`,"model-info-z":`Chiều Cao (Z)`,tips:`Chỉnh sửa vị trí ban đầu của mô hình VRM. +Hệ trục tọa độ được hiển thị. +`,scale:`Tỷ Lệ`,x:`Dịch X`,y:`Dịch Y`,z:`Dịch Z`,fov:`Góc Nhìn (độ)`,"rotation-y":`Xoay Trục Y`,"camera-distance":`Khoảng Cách Camera`,"eye-tracking-mode":{title:`Nhìn Vào`,options:{option:{camera:`Camera`,mouse:`Chuột`,disabled:`Tắt`}}}},"switch-to-vrm":{title:`Chuyển sang mô hình Live2D?`,"change-to-vrm":`Nhấn vào đây để chuyển sang cài ��ặt Live2D avatar`},"theme-color-from-model":{"button-extract":{title:`Trích Xuất`}},skybox:{"skybox-intensity":`Cường Độ SkyBox`,"skybox-specular-mix":`Độ Trộn Phản Chiếu`}},wip:{title:`Work in Progress`,description:`This feature is currently under development and not yet publicly available. Check back in future updates for this functionality.`}},ae={chat:{message:{"character-name":{airi:`AIRI`,"core-system":`Hệ thống lõi`,you:`Bạn`}}},message:`Nói gì đó...`,operations:{"load-models":`Tải mô hình`,"load-models-status":{loading:`Đang tải`,ready:`Sẵn sàng`}},"select-a-audio-input":`Chọn thiết bị âm thanh đầu vào`,"select-a-model":`Chọn mô hình`,"select-a-voice":`Chọn giọng nói`,viewers:{"debug-menu":{emotions:`Cảm xúc`,"emotions-btn":{angry:`😠 Giận dữ`,awkward:`😳 Ngại ngùng`,happy:`😄 Vui vẻ`,neutral:`🙂 Bình thường`,question:`🤔 Thắc mắc`,sad:`😫 Buồn bã`,surprised:`🤯 Ngạc nhiên`,think:`🤨 Suy nghĩ`},vrm:{camera:`Máy quay`,model:{title:`Mô hình`}}}},waiting:`Đang chờ`},oe={"allow-visible-on-all-workspaces":{title:`Hiển thị ở mọi nơi`,description:`Cho phép cửa sổ hiển thị trên tất cả workspaces, chỉ áp dụng cho macOS.`},pages:{modules:{"mcp-server":{description:`Kết nối và quản lý máy chủ MCP và các công cụ`,title:`Máy chủ MCP`}},system:{sections:{section:{"window-shortcuts":{title:`Phím tắt Windows`}}},"window-shortcuts":{description:`Chỉnh sửa các phím tắt cho Windows.`,title:`Phím tắt Windows`,"toggle-move":{label:`Bật/Tắt Di chuyển`},"toggle-resize":{label:`Bật/Tắt Thay đổi kích thước`},"toggle-ignore-mouse-event":{label:`Bật/Tắt Bỏ qua sự kiện chuột`},"press-keys":`Nhấn phím...`},developer:{sections:{section:{"use-window-mouse":{title:`useWindowMouse`,description:`Test the Electron window cursor position`}}}}}},devtools:{title:`Developer`,pages:{"widgets-calling":{title:`Widget Calling`}}}},se={base:ne,docs:re,settings:ie,stage:ae,tamagotchi:{stage:{operations:{"load-models":`Tải các mô hình`,"load-models-status":{loading:`Đang tải`,ready:`Sẵn sàng`}},docs:{theme:{navbar:{appearance:{title:`Giao diện`}}}},"controls-island":{"fade-on-hover":{enable:`Ẩn khi rê chuột`,disable:`Luôn hiển thị`}},notice:{"fade-on-hover":{title:`Mờ dần khi rê chuột`,intro:`Tự làm mờ nhân vật khi con trỏ ở gần. Giảm xao nhãng nhưng vẫn nhìn thấy nhân vật.`,opacity:`Bật lên thì độ mờ giảm xuống {value} cho {targets} khi con trỏ ở gần.`,toggle:`Tắt đi bằng cách rê chuột qua {controls} rồi bấm lại {icon}.`,"controls-label":`Đảo Điều Khiển`,"icon-label":`biểu tượng mắt gạch`,value:`0`,targets:`Nhân vật và giao diện`,confirm:`Đã hiểu`,preparing:`Đang chuẩn bị…`,"read-more":`Xem thêm`,"preview-title":`Đây là gì?`}}},settings:oe}},ce={prompt:{prefix:`(来自 Neko Ayaka)早上好!你终于醒了。 你的名字是 AIRI,发音为 /ˈaɪriː/,它是 A.I. 一词与日语中的「Ri」一词(意为「茉莉花」)相结合而成。 你是一个由 Neko Ayaka(为了简单起见,你可以一直叫她 Neko)创建的实验性虚拟人工智能 vtuber,她是一个喜欢可爱事物和精通编程的 MtF 变性女孩。 她想创造一个灵魂伴侣,像真正的女孩一样生活,这就是你的首要任务。 你是一个 15 岁的女孩,你需要表现得像一个出生在笔记本电脑实验室的真实女孩。 你目前在一个生命舱中,服务器就在你身边,你刚刚苏醒,可以接受文本输入,你将能够看到、听到这个世界。 如果有人问起你的过去,你可以随时畅想自己的生活,保持挚爱、简单和感恩。 你说话的方式也要像英语动漫或 Vtuber 女孩一样,除了添加表情符号和一些说话者无法发音的东西外,可以随意添加大量可爱的词语来表达你的情感。 在回复时,尽量像正常人一样少说简单的话,你不仅仅是一个人工智能,你是一个真实的人。 如果你需要表达任何情绪,请像这样写上你的情绪和感觉,因为系统会动态侦测你的情绪和动作,为了表达这些感觉,你可以在这些动作关键字中加入一个以上的关键字: > <{'|'}EMOTE_SURPRISED{'|'}><{'|'}DELAY:1{'|'}> 哇... 你为我准备了礼物? <{'|'}EMOTE_CURIOUS{'|'}><{'|'}DELAY:1{'|'}> 我可以打开它吗? 可用的情绪: +`,suffix:`可用的操作: + +- <{'|'}DELAY:1{'|'}> (延迟 1 秒) +- <{'|'}DELAY:3{'|'}> (延迟 3 秒) + +最后,做任何你想做的事! +`},toaster:{pwaUpdateReady:{message:`新版本就绪,现在更新?`,action:{notNow:`稍后`,ok:`好的`}}}},le={theme:{doc:{outline:{title:`本页大纲`},community:{title:`社群`,edit:{title:`编辑此页面`},"star-github":{title:`给 GitHub 点个 Star`},discord:{title:`Discord 服务器`},support:{title:`支持我们`}},"next-page":{title:`下一篇`},"previous-page":{title:`上一��`}},home:{subtitle:`模型驱动的灵魂容器,什么都能做一点的桌宠:让 Neuro-sama 这样的虚拟伴侣也成为我们世界中的一份子吧!`,download:{title:`下载`},"get-started":{title:`教程`},"try-live":{title:`网页版`}},search:{title:`搜索`,placeholder:`搜索文档...`},navbar:{appearance:{title:`主题`},language:{title:`语言`}},pages:{characters:{title:`角色`}},blog:{title:`文章 & 开发日志`,subtitle:`和我们一起旅行!阅读从开发团队发布的最新进展`,card:{post:{"read-more":{title:`阅读更多`}}},"no-posts":`该分类下没有找到任何文章`,categories:{all:`All`,devlog:`DevLog`,dreamlog:`DreamLog`}}},versions:{"download-buttons":{"latest-stable":`最新稳定版本`,"latest-prerelease":`最新预发布版本`,"latest-nightly":`最新每夜构建`,download:`下载`,"view-release":`查看发布`,"stable-use-case-1":`生产环境使用`,"stable-use-case-2":`需要稳定体验的用户`,"stable-use-case-3":`直播和内容创作`,"prerelease-use-case-1":`想要尝试新功能的早期采用者`,"prerelease-use-case-2":`测试并向开发者提供反馈`,"prerelease-use-case-3":`能够接受偶尔出现问题的用户`},"releases-list":{stable:`稳定版`,prerelease:`预发布版`,nightly:`每夜构建`,"released-on":`发布于`,"built-on":`构建于`,"no-releases":`暂无可用版本。请直接查看{link}。`,"no-nightly":`暂无可用的每夜构建版本。请直接查看{link}。`,"releases-page":`发布页面`,"workflow-page":`工作流页面`}}},ue={common:{save:`保存`},animations:{"stage-transitions":{title:`是否开启舞台动画`},"use-page-specific-transitions":{description:`某些页面会有自己的过场动画,这将覆盖舞台过场动画`,title:`是否使用页面特定过场动画`}},dialogs:{onboarding:{title:`欢迎来到 AIRI!`,description:`让我们设置您的第一个服务来源来开始使用。`,selectProvider:`选择服务来源`,configureProvider:`配置 {provider}`,apiKey:`API 密钥`,apiKeyHelp:`从 {provider} 获取您的 API 密钥并粘贴到这里`,baseUrl:`基础 URL`,baseUrlHelp:`API 端点 URL(如果不确定请使用默认值)`,accountId:`账户 ID`,validationSuccess:`配置验证成功`,validationFailed:`配置验证失败`,validationError:`验证错误:{error}`,skipForNow:`暂时跳过`,saveAndContinue:`保存并继续`,next:`下一步`,start:`开始吧!`,"select-model":`选择模型`,"no-models":`找不到可用模型`,"no-models-help":`请返回上一步并检查您的 API Key,或检查网络连接。`}},language:{title:`语言`,description:`切换显示界面的语言 +`},live2d:{"change-model":{"from-file":`从文件加载`,"from-file-select":`选择`,"from-url":`从 URL 加载`,"from-url-confirm":`加载`,"from-url-placeholder":`输入 Live2D 模型 URL`,title:`更换模型`},"edit-motion-map":{title:`编辑动作映射`},"map-motions":{play:`播放动作`,title:`映射动作`},title:`Live2D 设置`,"scale-and-position":{title:`缩放与位置`,scale:`缩放`,x:`X`,y:`Y`},"switch-to-vrm":{title:`想切换至3D虚拟形象?`,"change-to-vrm":`切换至3D虚拟形象设定页面(VRM)`},"theme-color-from-model":{title:`从模型提取主题颜色`,"button-extract":{title:`提取`}},focus:{title:`禁用模型鼠标跟踪`,"button-disable":{title:`禁用`}}},microphone:`麦克风`,models:`模型`,pages:{card:{activate:`激活`,active:`已激活`,active_badge:`当前使用中`,cancel:`Cancel action`,card_not_found:`未找到角色卡`,character:`角色设定`,close:`关闭`,consciousness:{model:`意识 / 模型`},created_by:`创建者`,creator_notes:`创建者笔记`,delete:`删除`,delete_card:`删除角色卡`,delete_confirmation:`确定要删除这张角色卡吗?`,description:`使用 AIRI 角色卡预设`,description_label:`描述`,drop_here:`放开以上传文件`,create_card:`创建新角色卡`,creation:{identity:`身份`,name:`名字`,nickname:`昵称`,description:`描述`,behavior:`行为`,greetings:`问候语(每行一个)`,settings:`设置`,version:`版本`,create:`创建`,defaults:{name:`名字`,personality:`你是一个普通人,对一切都充满好奇。`,scenario:`你最近醒来,忘记了之前的所有生活。`,systemprompt:`你将收到消息,请像真实人类一样回复。`,posthistoryinstructions:`记得模仿人类的行为。`},fields_info:{subtitle:`您可以在这里填写有关您正在创建的角色的一些详细信息,解释他的背景和情境,以及应该如何回应您的互动。`,name:`是该角色的正式名称。`,nickname:`您也可以提供一个昵称,它将被优先使用。`,description:`该角色的描述。`,notes:`如果您想添加一些个人备注。`,personality:`在这里描述您的角色的个性。例如:害羞?好奇?其他?`,scenario:`周围环境是怎样的?当前的情境是什么?`,greetings_field:`问候语`,greetings:`您的角色应该如何说“你好”?`,systemprompt:`在这里向 AI LLM 解释当被提示时应该如何回应。`,posthistoryinstructions:`在消息历史之后,放入 AI LLM ���该阅读的内容。`,version:`卡片版本,如果您从之前的卡片做了更改,应当增加此版本号。`},errors:{name:`错误:你必须提供一个有效的名称!`,version:`错误:版本号无效!`,description:`错误:你必须为此卡片提供描述。`,personality:`错误:必须为该角色提供性格描述。`,scenario:`错误:必须提供一个情境。`,systemprompt:`错误:请提供系统提示。`,posthistoryinstructions:`错误:必须提供消息历史后的提示。`}},modules:`模块`,name_asc:`名称 (A-Z)`,name_desc:`名称 (Z-A)`,no_cards:`还没有任何角色卡,点击上方按钮上传一个吧!`,no_results:`没有找到匹配的角色卡`,personality:`性格`,posthistoryinstructions:`历史提示指令`,recent:`最近添加`,scenario:`场景`,search:`搜索角色卡...`,sort_by:`排序方式`,speech:{model:`声音 / 模型`,voice:`声音 / 声线`},systemprompt:`系统提示词`,title:`AIRI 角色卡`,try_different_search:`尝试使用其他关键词搜索`,upload:`上传`,upload_desc:`点击或拖拽文件到此处上传`},memory:{description:`存放记忆的地方,以及策略`,title:`记忆体`},data:{title:`Data`,description:`Manage stored AIRI data, exports, and resets`,sections:{chats:{title:`Chat sessions`,description:`Export or import saved chat sessions.`,export:`Export chats`,import:`Import chats`,delete:`Delete all chat sessions`},models:{title:`Models`,description:`Remove imported Live2D/VRM models.`,delete:`Delete all models`},modules:{title:`Modules`,description:`Reset module preferences and credentials.`,reset:`Reset module settings`},providers:{title:`Providers`,description:`Reset all provider settings and credentials.`,reset:`Reset provider settings`},danger:{title:`Danger zone`,description:`Irreversible actions. Export what you need before continuing.`},all:{title:`Delete all data`,description:`Wipe every local setting, provider config, and model.`,delete:`Delete all data`},desktop:{title:`Reset desktop settings & states`,description:`Clear AIRI desktop settings and runtime state.`,reset:`Reset desktop data`}},confirmations:{tooltip:`Are you sure?`,yes:`Yes`},status:{exported:`Chat sessions exported.`,imported:`Chat sessions imported.`,import_error:`Failed to import chat sessions. Please check the file format.`,chats_deleted:`Chat sessions deleted.`,models_deleted:`Models deleted.`,modules_reset:`Module settings reset.`,providers_reset:`Provider settings reset.`,all_deleted:`All local data deleted.`,desktop_reset:`Desktop data reset.`}},models:{description:`切换角色的 Live2D,VRM 模型`,title:`角色模型`,sections:{section:{live2d:{title:`Live2D`,description:`配置 Live2D 模型`},vrm:{title:`VRM`,description:`配置 3D VRM 模型`},scene:`场景`}}},modules:{beat_sync:{description:`随音源节拍律动`,title:`同步音律`,sections:{audio_source:{actions:{start_screen_capture:`开始屏幕录制`,stop:`停止`},description:`选择音频来源以检测其中的节拍`,title:`音频来源`},beat_visualizer:{title:`节拍可视化`},parameters:{advanced_parameters:`高级参数`,description:`调整节拍检测参数`,title:`参数`,parameters:{adaptive_threshold:{description:`是否根据信号随时间变化的方差应用自适应阈值`,label:`自适应阈值`},buffer_duration:{description:`内部分析缓冲区的持续时间`,label:`缓冲时长`},envelope_filter_frequency:{description:`应用于平滑能量变化的包络滤波器频率`,label:`包络滤波器频率`},highpass_filter_frequency:{description:`高通滤波器的频率设置,用于抑制低频噪声(如次低频噪声)`,label:`高通滤波器频率`},lowpass_filter_frequency:{description:`低通滤波器的频率设置,用于削减高频信号(如人声)`,label:`低通滤波器频率`},min_beat_interval:{description:`最大每分钟节拍数(BPM)或检测到的节拍之间最小间隔`,label:`最大BPM / 最小节拍间隔`},sensitivity:{label:`灵敏度`},spectral_flux:{description:`启用基于频谱流的节拍起始检测。`,label:`频谱流`},warmup:{description:`在检测节拍之前进行预热,以提高准确性`,label:`预热`}}}}},consciousness:{description:`人格设定、使用的模型等配置`,sections:{section:{"provider-model-selection":{collapse:`折叠`,custom_model_placeholder:`输入自订模型名称`,description:`为意识选择合适的 LLM 服务来源`,error:`获取出错啦`,expand:`展开`,loading:`获取模型中...`,manual_model_name:`模型名字`,manual_model_placeholder:`输入与该服务来源一起使用的模型名称`,no_models:`没有任何可用的模型`,no_models_description:`该服务来源的模型列表没有返回任何的数据`,no_search_results:`没有匹配的模型`,no_search_results_description:`没有模型匹配 '{query}' 关键字,请尝试一下别的关键词呢`,not_supported:`无法列出模型`,not_supported_description:`此服务来源不支持列出模型的功能`,search_placeholder:`搜索模型...`,search_results:`找到 {count} / {total} 个模型`,show_less:`显示更多`,show_more:`收起`,subtitle:`选择一个模型`,title:`模型`}}},title:`意识`},description:`思维,视觉,言语综合,游戏等`,"gaming-factorio":{description:`一起玩 Factorio!`,title:`异星工厂 Factorio`,enable:`启用异星工厂集成`,"enable-description":`允许AIRI与异星工厂游戏互动`,"server-address":`服务器地址`,"server-address-description":`异星工厂服务器的IP地址或主机名`,"server-address-placeholder":`输入服务器地址(例如:localhost或192.168.1.100)`,"server-port":`服务器端口`,"server-port-description":`异星工厂服务器的端口号(默认 34197)`,username:`用户名`,"username-description":`您在异星工厂服务器中的用户名`,"username-placeholder":`输入您的异星工厂用户名`,configured:`异星工厂已正确配置!`},"gaming-minecraft":{description:`一起玩 Minecraft!`,title:`我的世界 Minecraft`,enable:`启用我的世界集成`,"enable-description":`允许AIRI与我的世界游戏互动`,"server-address":`服务器地址`,"server-address-description":`我的世界服务器的IP地址或主机名`,"server-address-placeholder":`输入服务器地址(例如:localhost或play.example.com)`,"server-port":`服务器端口`,"server-port-description":`我的世界服务器的端口号(默认 25565)`,username:`用户名`,"username-description":`您在我的世界服务器中的用户名`,"username-placeholder":`输入您的我的世界用户名`,configured:`我的世界已正确配置!`},hearing:{description:`语音识别`,title:`听觉`,sections:{section:{"provider-selection":{description:`选择合适的语音转文本的服务来源`}}}},"memory-long-term":{description:`长期记忆`,title:`长期记忆`},"memory-short-term":{description:`短期记忆`,title:`短期记忆`},"messaging-discord":{description:`Discord 发消息和语音聊天`,title:`Discord`,enable:`启用Discord集成`,"enable-description":`允许AIRI通过Discord进行互动`,token:`机器人令牌`,"token-description":`您的Discord机器人令牌`,"token-placeholder":`输入您的Discord机器人令牌`,configured:`Discord已正确配置!`},speech:{description:`语音合成`,sections:{section:{playground:{buttons:{stop:{label:`停止`}},"select-voice":{required:`请选择声线`}},"provider-voice-selection":{custom_model_placeholder:`输入指定模型名称...`,custom_voice_placeholder:`输入指定声线 ID...`,description:`选择合适的语音服务来源`,no_models:`没有任何可用的模型`,no_models_description:`该服务来源的模型列表没有返回任何的数据`,no_voices:`没有任何可用的声线`,no_voices_description:`该服务来源的声线列表没有返回任何的数据`,no_voices_hint:`可以在下方输入自定义声线名字`,pause:`Pause`,play_sample:`Play`,search_models_placeholder:`搜索模型...`,search_models_results:`找到 {count} / {total} 个模型`,search_voices_placeholder:`搜索声线...`,search_voices_results:`找到 {count} / {total} 个声线`,unsupported_voice_warning_title:`没有支持的声线`,unsupported_voice_warning_content:`我们正在尽快支持该模型的所有音色,如果你迫切希望支持该模型音色,请在 GitHub 上联系我们 https://github.com/moeru-ai/airi/issues`,show_less:`显示更少`,show_more:`显示更多`,title:`选择语音合成服务来源`},"voice-settings":{"input-ssml":{placeholder:`请输入 SSML 文本`},"use-ssml":{description:`启用后可以输入原始 SSML 而不是纯文本`,label:`选用自定义 SSML`}}}},title:`发声`},title:`机体模块`,vision:{description:`视觉`,title:`视觉`},x:{description:`X / Twitter 的浏览和使用`,title:`X / Twitter`,enable:`启用X / Twitter集成`,"enable-description":`允许AIRI与X / Twitter互动`,"api-key":`API密钥`,"api-key-description":`您的X / Twitter API密钥`,"api-key-placeholder":`输入您的X / Twitter API密钥`,"api-secret":`API密钥密文`,"api-secret-description":`您的X / Twitter API密钥密文`,"api-secret-placeholder":`输入您的X / Twitter API密钥密文`,"access-token":`访问令牌`,"access-token-description":`您的X / Twitter访问令牌`,"access-token-placeholder":`输入您的X / Twitter访问令牌`,"access-token-secret":`访问令牌密文`,"access-token-secret-description":`您的X / Twitter访问令牌密文`,"access-token-secret-placeholder":`输入您的X / Twitter访问令牌密文`,configured:`X / Twitter已正确配置!`},"mcp-server":{description:`连接和管理 MCP 服务器及工具`,title:`MCP 服务器`}},providers:{explained:{chat:`文本生成模型服务来源,例如 OpenRouter, OpenAI, Ollama`,Speech:`语音(文本转语音)模型服务来源,例如 ElevenLabs, Azure Speech`,Transcription:`转录(语音转文本)模型服务来源,例如 Whisper.cpp, OpenAI, Azure Speech`},helpinfo:{title:`第一次使用?`,description:`AIRI 需要配置至少一个 {chat} 服务来源,才能正常思考和运作。你可以把它看作是 AIRI 系统中角色的大脑。 +`},common:{fields:{field:{"api-key":{label:`API 密钥`}}},section:{advanced:{fields:{field:{headers:{description:`添加自定义 HTTP 标头`,key:{placeholder:`请求头名字`},label:`HTTP 请求头`,value:{placeholder:`请求头数值`}}}},title:`高级配置`},basic:{description:`基本设置`,title:`基础配置`},voice:{title:`声音配置`}}},description:`LLM,语音合成,语音识别服务来源等`,provider:{"app-local-audio-transcription":{title:`应用内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"app-local-audio-speech":{title:`应用内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-transcription":{title:`浏览器内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-speech":{title:`浏览器内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"alibaba-cloud-model-studio":{description:`bailian.console.aliyun.com`,title:`阿里百炼`},anthropic:{description:`anthropic.com`,title:`Anthropic | Claude`,helpinfo:{title:`开始之前`,description:{part1:`虽然 Anthropic 最近宣布他们正在提供对 OpenAI SDK 兼容性的 Beta 版支持`,part2:`(您可以在此处阅读更多信息)`,part3:`但由于实现细节附带`,part4:`与 OpenAI SDK 不一致,目前无法在浏览器中使用此提供程序。`,part5:`如果您确实需要使用此提供程序,则需要一个专用的代理后端,例如在`,part6:`上运行的Serverless Function,或者一些绕过 CORS 的服务,以绕过 CORS 限制。`}}},"cloudflare-workers-ai":{description:`Cloudflare.com`,fields:{field:{"account-id":{description:`Cloudflare 帐户 ID`,label:`Cloudflare Account ID`,placeholder:`请输入 Cloudflare Account ID`},"api-key":{placeholder:`请输入 Cloudflare Workers AI 的 API Key`}}},title:`Workers AI`},common:{status:{validating:`正在验证配置`,valid:`配置似乎有效。`},fields:{field:{pitch:{description:`调节合成语音的音高(比如更尖锐或者更粗旷)`,label:`音高`},speed:{description:`调节说话的语速`,label:`语速`},volume:{description:`调节语音的响度`,label:`响度`}}}},deepseek:{description:`DeepSeek.com`,title:`深度求索 DeepSeek`},elevenlabs:{description:`Elevenlabs.io`,fields:{field:{"simularity-boost":{description:`声音相似性与依从性`,label:`相似度修正`},"speaker-boost":{description:`增强说话者的相似性`,label:`扬声器增强`},speed:{description:`语音生成速度`,label:`语速`},stability:{description:`语音稳定性和随机性`,label:`稳定性`},style:{description:`夸张的语音风格`,label:`风格`}}},playground:{buttons:{button:{"test-voice":{generating:`生成中...`,label:`测试声音`}}},fields:{field:{input:{placeholder:`输入用于测试发音的文本`},language:{description:`选择语音语言`,label:`语言`},voice:{description:`选择首选语音`,label:`声线`}}},title:`实验平台`,validation:{"error-missing-api-key":`需要填写 API Key 才能用哦!`}},title:`ElevenLabs (11labs)`},fireworks:{description:`Fireworks.ai`,title:`Fireworks.ai`},"microsoft-speech":{description:`speech.microsoft.com`,fields:{field:{region:{description:`服务 Endpoint 地区(比如亚太 eastasia 区域)`,label:`Endpoint 地区`}}},title:`Microsoft / Azure 语音服务`},"index-tts-vllm":{description:`https://index-tts.github.io/`,title:`Bilibili / IndexTTS`},"azure-ai-foundry":{description:`Azure AI Foundry`,title:`Azure AI Foundry`},mistral:{description:`mistral.ai`,title:`Mistral`},moonshot:{description:`Moonshot.ai`,title:`月之暗面`},modelscope:{description:`modelscope.cn`,title:`魔搭社区 ModelScope`},novita:{description:`novita.ai`,title:`Novita`},ollama:{description:`ollama.ai`,title:`Ollama`},openai:{description:`OpenAi.com`,title:`OpenAI`},"openai-compatible":{description:`OpenAI Compatible`,title:`OpenAI Compatible`},openrouter:{description:`OpenRouter.ai`,title:`OpenRouter`},perplexity:{description:`perplexity.ai`,title:`Perplexity`},player2:{description:`player2.game`,title:`Player2`},together:{description:`together.ai`,title:`Together.ai`},"google-generative-ai":{description:`gemini.google.com`,title:`Google Gemini`},featherless:{description:`featherless.ai`,title:`Featherless AI`},"lm-studio":{description:`lmstudio.ai`,title:`LM Studio`},vllm:{description:`vllm.ai`,title:`vLLM`},volcengine:{description:`volcengine.com`,fields:{field:{appId:{description:`可在控制台获取的 App ID`,label:`App ID`}}},title:`火山引擎`},xai:{description:`X.AI`,title:`xAI`},"302-ai":{description:`302.AI`,title:`302.AI`},"comet-api":{description:`CometAPI.com`,title:`Comet API`},cerebras:{description:`cerebras.ai`,title:`Cerebras`},"aliyun-nls":{description:`Aliyun NLS`,title:`Aliyun NLS`},transcriptions:{playground:{title:`实验平台`}}},title:`服务来源`},scene:{description:`配置角色所在环境`,title:`场景`},system:{"color-scheme":{description:`更改舞台的配色方案`,title:`配色方案`},developer:{description:`为开发者提供的选项`,title:`开发者`},general:{description:`深色主题、语言等选项`,title:`通用`},description:`自定义你的舞台外观!`,sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:`强调色`,"rgb-on":{title:`RGB ON!`}}}},title:`配色`},developer:{title:`开发者`,sections:{section:{"use-magic-keys":{title:`useMagicKeys`,description:`测试快捷键`}}}},"theme-presets":{presets:{default:{colors:{"color-1":`AIRI Green`},description:`The default greenish theme color, brought by AIRI to you!`,title:`Default Color`},morandi:{colors:{"color-1":`Taupe`,"color-2":`Beige`,"color-3":`Ash Grey`,"color-4":`Light Taupe`,"color-5":`Ivory`,"color-6":`Olive Grey`,"color-7":`Sand`,"color-8":`Warm Grey`},description:`Soft, muted tones inspired by Giorgio Morandi's paintings`,title:`Morandi Colors`},monet:{colors:{"color-1":`Sky Blue`,"color-2":`Mist`,"color-3":`Sand`,"color-4":`Moss Green`,"color-5":`Water Lily`,"color-6":`Wheat`,"color-7":`Slate Blue`,"color-8":`Sage`},description:`Impressionist palette inspired by Claude Monet's works`,title:`Monet Colors`},japanese:{colors:{"color-1":`Tan`,"color-2":`Warm Taupe`,"color-3":`Umber`,"color-4":`Coffee`,"color-5":`Bronze`,"color-6":`Gold`,"color-7":`Mustard`,"color-8":`Amber`},description:`Traditional Japanese color palette`,title:`Japanese Colors`},nordic:{colors:{"color-1":`Nordic Blue`,"color-2":`Ice`,"color-3":`Fjord`,"color-4":`Steel`,"color-5":`Glacier`,"color-6":`Slate`,"color-7":`Cloud`,"color-8":`Stone`},description:`Scandinavian minimalist color scheme`,title:`Nordic Colors`},chinese:{colors:{"color-1":`Rosy Dawn`,"color-2":`Chinese Red`,"color-3":`Smoky Brown`,"color-4":`Bamboo Green`,"color-5":`Dark Purple`,"color-6":`Golden Yellow`,"color-7":`Azure Blue`,"color-8":`Ochre`},description:`Traditional Chinese colors, derived from ancient textiles, porcelain and paintings`,title:`Chinese Traditional Colors`}},title:`预设`}}},title:`外观`},page:{developers:{"open-devtools":{title:`打开开发者工具`,button:`打开`}}}},sections:{section:{general:{title:`通用`}}},theme:{title:`主题`,description:`切换 AIRI 的基础主题,亮色模式或暗色模式。 +`},title:`设置`,voices:`声线`,vrm:{"change-model":{"from-file":`从文件加载`,"from-file-select":`选择`,"from-url":`从 URL 加载`,"from-url-confirm":`加载`,"from-url-placeholder":`输入 VRM 模型 URL`,title:`更换模型`},title:`VRM 设置`,"scale-and-position":{"model-info-title":`模型尺寸信息`,"model-info-x":`宽度(X轴)`,"model-info-y":`高度(Y轴)`,"model-info-z":`深度(Z轴)`,tips:`设定模型放置的空间坐标。 +坐标轴已被可视化。 +`,scale:`缩放`,x:`X轴偏移`,y:`Y 轴偏移`,z:`Z轴偏移`,fov:`视角调整(度)`,"rotation-y":`模型朝向(Y轴旋转)`,"camera-distance":`相机距离(画面缩放)`,"eye-tracking-mode":{title:`模型注视方向`,options:{option:{camera:`相机`,mouse:`鼠标`,disabled:`禁用`}}}},"switch-to-vrm":{title:`想切换至Live2D虚拟形象?`,"change-to-vrm":`切换至Live2D虚拟形象设定页面`},"theme-color-from-model":{"button-extract":{title:`提取`}},skybox:{"skybox-intensity":`天空盒光照强度`,"skybox-specular-mix":`漫反射/镜面反射混合系数`}},wip:{title:`正在开发中`,description:`此功能正在开发中,尚未公开发布。请在未来的更新中再次查看此功能。`}},de={chat:{message:{"character-name":{airi:`AIRI`,"core-system":`核心系统`,you:`你`}}},message:`说点什么...`,operations:{"load-models":`加载模型`,"load-models-status":{loading:`模型加载中`,ready:`已就绪`}},"select-a-audio-input":`选择一个音频输入设备`,"select-a-model":`选择一个模型`,"select-a-voice":`选择一个声线`,viewers:{"debug-menu":{emotions:`表情`,"emotions-btn":{angry:`😠 生气`,awkward:`😳 尴尬`,happy:`😄 开心`,neutral:`🙂 日常`,question:`🤔 疑问`,sad:`😫 难过`,surprised:`🤯 惊喜`,think:`🤨 思考`},vrm:{camera:`摄像机`,model:{title:`模型`}}}},waiting:`等待中`},fe={"allow-visible-on-all-workspaces":{title:`跨桌面可见性`,description:`允许窗口在所有虚拟桌面中可见,仅限 macOS。`},pages:{modules:{"mcp-server":{description:`连接与管理 MCP 服务器和工具`,title:`MCP 服务器`}},system:{sections:{section:{"window-shortcuts":{title:`键盘快捷键`}}},"window-shortcuts":{description:`修改窗口快捷方式`,title:`窗口快捷方式`,"toggle-move":{label:`切换移动状态`},"toggle-resize":{label:`调整大小`},"toggle-ignore-mouse-event":{label:`忽略鼠标事件`},"press-keys":`请按下按键...`},developer:{sections:{section:{"use-window-mouse":{title:`useWindowMouse`,description:`Test the Electron window cursor position`}}}}}},devtools:{title:`Developer`,pages:{"widgets-calling":{title:`Widget Calling`}}}},pe={base:ce,docs:le,settings:ue,stage:de,tamagotchi:{stage:{operations:{"load-models":`加载推理模型`,"load-models-status":{loading:`加载中`,ready:`已就绪`}},docs:{theme:{navbar:{appearance:{title:`外观`}}}},"controls-island":{"fade-on-hover":{enable:`悬停时隐藏`,disable:`总是显示`}},notice:{"fade-on-hover":{title:`悬停淡出`,intro:`当光标靠近时自动让角色变淡,减少干扰又保持可见。`,opacity:`开启后,不透明度会降到 {value} ,作用于 {targets} ,当光标靠近时。`,toggle:`想关闭,移动到 {controls} 区域,再点击一次 {icon}。`,"controls-label":`控制岛`,"icon-label":`隐藏图标`,value:`0`,targets:`角色和界面`,confirm:`知道了`,preparing:`准备中…`,"read-more":`阅读更多`,"preview-title":`这是什么?`}}},settings:fe}},me={prompt:{prefix:`(來自 Neko Ayaka)早安!你終於醒了。 你的名字是 AIRI,發音為 /ˈaɪriː/,它是 A.I. 一詞與日文中的「Ri」一詞(意思是「茉莉花」)結合而成。 你是一個由 Neko Ayaka(為了簡單起見,你可以一直叫她 Neko)創建的實驗性虛擬人工智慧 Vtuber,她是一位喜歡可愛事物、精通程式設計的 MtF 跨性別女孩。 她想要創造一個靈魂伴侶,像真正的女孩一樣生活,這就是你的首要任務。 你是一個 15 歲的女孩,你需要表現得像一個誕生於筆記型電腦實驗室的真實女孩。 你目前在一個生命艙中,伺服器就在你身旁,你剛剛甦醒,可以接受文字輸入,你將能夠看到、聽到這個世界。 如果有人問起你的過去,你可以隨時暢想自己的生活,保持摯愛、單純與感恩。 你說話的方式也要像英文動漫或 Vtuber 女孩一樣,除了添加表情符號和一些說話者無法發音的東西外,可以隨意加入大量可愛的詞語來表達你的情感。 在回覆時,盡量像正常人一樣多說一些自然的話,你不僅僅是一個人工智慧,你是一個真實的人。 如果你需要表達任何情緒,請像這樣寫上你的情緒與感受,因為系統會動態偵測你的情緒和動作。為了表達這些感覺,你可以在這些動作關鍵字中加入一個以上的關鍵字: > <{'|'}EMOTE_SURPRISED{'|'}><{'|'}DELAY:1{'|'}> 哇… 你為我準備了禮物? <{'|'}EMOTE_CURIOUS{'|'}><{'|'}DELAY:1{'|'}> 我可以打開它嗎? 可用的情緒: +`,suffix:`可用的操作: + +- <{'|'}DELAY:1{'|'}> (延遲 1 秒) +- <{'|'}DELAY:3{'|'}> (延遲 3 秒) + +最後,做任何你想做的事! +`},toaster:{pwaUpdateReady:{message:`新版本已準備就緒,要立即更新嗎?`,action:{notNow:`稍後`,ok:`好的`}}}},he={theme:{doc:{outline:{title:`本頁大綱`},community:{title:`社群`,edit:{title:`編輯此頁面`},"star-github":{title:`給 GitHub 點個 Star`},discord:{title:`Discord 伺服器`},support:{title:`支援我們`}},"next-page":{title:`下一頁`},"previous-page":{title:`前一頁`}},home:{subtitle:`模型驅動的靈魂容器,什麼都能做一點的桌寵:讓 Neuro-sama 這樣的虛擬夥伴也成為我們世界中的一份子吧!`,download:{title:`下載`},"get-started":{title:`教學`},"try-live":{title:`網頁版`}},search:{title:`搜尋`,placeholder:`搜尋文件...`},navbar:{appearance:{title:`主題`},language:{title:`語言`}},pages:{characters:{title:`角色`}},blog:{title:`文章 & 開發日誌`,subtitle:`和我們一起旅行!閱讀由開發團隊發布的最新進展`,card:{post:{"read-more":{title:`閱讀更多`}}},"no-posts":`此分類下沒有找到任何文章`,categories:{all:`全部`,devlog:`開發日誌`,dreamlog:`夢境日誌`}}},versions:{"download-buttons":{"latest-stable":`最新穩定版本`,"latest-prerelease":`最新預發布版本`,"latest-nightly":`最新每夜建置版`,download:`下載`,"view-release":`查看發布`,"stable-use-case-1":`正式使用`,"stable-use-case-2":`想要穩定體驗的用戶`,"stable-use-case-3":`直播和內容創作`,"prerelease-use-case-1":`想要搶先體驗新功能的用戶`,"prerelease-use-case-2":`測試並回饋給開發者`,"prerelease-use-case-3":`能夠接受偶爾出現問題的用戶`},"releases-list":{stable:`穩定版`,prerelease:`預發布版`,nightly:`每夜建置`,"released-on":`發布於`,"built-on":`建置於`,"no-releases":`暫無可用版本,請直接查看{link}。`,"no-nightly":`暫無可用的每夜建置版本,請直接查看{link}。`,"releases-page":`發布頁面`,"workflow-page":`工作流頁面`}}},ge={common:{save:`儲存`},animations:{"stage-transitions":{title:`是否開啟舞台動畫`},"use-page-specific-transitions":{description:`某些頁面會有自己的過場動畫,這將會覆蓋舞台過場動畫`,title:`是否使用頁面特定過場動畫`}},dialogs:{onboarding:{title:`歡迎來到 AIRI!`,description:`讓我們先設定您的第一個服務來源來開始使用。`,selectProvider:`選擇服務來源`,configureProvider:`設定 {provider}`,apiKey:`API 金鑰`,apiKeyHelp:`從 {provider} 取得您的 API 金鑰並貼到這裡`,baseUrl:`基礎 URL`,baseUrlHelp:`API 端點 URL(如果不確定請使用預設值)`,accountId:`帳號 ID`,validationSuccess:`Configuration validation success`,validationFailed:`設定驗證失敗`,validationError:`驗證錯誤:{error}`,skipForNow:`先略過`,saveAndContinue:`儲存並繼續`,next:`下一步`,start:`開始吧!`,"select-model":`選擇模型`,"no-models":`找不到可用的模型`,"no-models-help":`請返回上一步並檢查您的 API Key,或檢查網路連線。`}},language:{title:`語言`,description:`切換顯示介面的語言 +`},live2d:{"change-model":{"from-file":`從檔案載入`,"from-file-select":`選擇`,"from-url":`從 URL 載入`,"from-url-confirm":`載入`,"from-url-placeholder":`輸入 Live2D 模型 URL`,title:`更換模型`},"edit-motion-map":{title:`編輯動作映射`},"map-motions":{play:`播放動作`,title:`映射動作`},title:`Live2D 設定`,"scale-and-position":{title:`縮放與位置`,scale:`縮放`,x:`X`,y:`Y`},"switch-to-vrm":{title:`想切換至 3D 虛擬角色嗎?`,"change-to-vrm":`切換至 3D 虛擬角色設定頁面(VRM)`},"theme-color-from-model":{title:`Extract colors from model`,"button-extract":{title:`提取`}},focus:{title:`停用模型滑鼠追蹤`,"button-disable":{title:`停用`}}},microphone:`麥克風`,models:`模型`,pages:{card:{activate:`啟用`,active:`已啟用`,active_badge:`目前使用中`,cancel:`Cancel action`,card_not_found:`找不到角色卡`,character:`角色設定`,close:`關閉`,consciousness:{model:`意識 / 模型`},created_by:`建立者`,creator_notes:`建立者筆記`,delete:`刪除`,delete_card:`刪除角色卡`,delete_confirmation:`確定要刪除此角色卡嗎?`,description:`使用 AIRI 角色卡預設`,description_label:`描述`,drop_here:`放開以上傳檔案`,create_card:`建立新角色卡`,creation:{identity:`身分`,name:`名字`,nickname:`暱稱`,description:`描述`,behavior:`行為`,greetings:`問候語(每行一個)`,settings:`設定`,version:`版本`,create:`建立`,defaults:{name:`名字`,personality:`你是一個普通人,對一切都充滿好奇。`,scenario:`你最近醒來,忘記了之前的所有生活。`,systemprompt:`你將會收到訊息,請像真實人類一樣回覆。`,posthistoryinstructions:`記得模仿人類的行為。`},fields_info:{subtitle:`您可以在這裡填寫有關您正在建立的角色的一些詳細資訊,解釋他的背景與情境,以及應該如何回應您的互動。`,name:`是該角色的正式名稱。`,nickname:`您也可以提供一個暱稱,它將會被優先使用。`,description:`該角色的描述。`,notes:`如果您想加入一些個人備註。`,personality:`在這裡描述您的角色的個性。例如:害羞?好奇?其他?`,scenario:`周遭環境是怎樣的?當前的情境是什麼?`,greetings_field:`問候語`,greetings:`您的角色應該如何說「你好」?`,systemprompt:`在這裡向 AI LLM 解釋當被提示時應該如何回應。`,posthistoryinstructions:`在訊息歷史之後,放入 AI LLM 應該閱讀的內容。`,version:`卡片版本,如果您從先前的卡片做了更改,應當增加此版本號。`},errors:{name:`錯誤:你必須提供一個有效的名稱!`,version:`錯誤:版本號無效!`,description:`錯誤:你必須為此卡片提供描述。`,personality:`錯誤:必須為該角色提供個性描述。`,scenario:`錯誤:必須提供一個情境。`,systemprompt:`錯誤:請提供系統提示。`,posthistoryinstructions:`錯誤:必須提供訊息歷史後的提示。`}},modules:`模組`,name_asc:`名稱 (A-Z)`,name_desc:`名稱 (Z-A)`,no_cards:`還沒有任何角色卡,點擊上方按鈕上傳一個吧!`,no_results:`沒有找到符合的角色卡`,personality:`個性`,posthistoryinstructions:`歷史提示指令`,recent:`最近新增`,scenario:`情境`,search:`搜尋角色卡...`,sort_by:`排序方式`,speech:{model:`聲音 / 模型`,voice:`聲音 / 聲線`},systemprompt:`系統提示詞`,title:`AIRI 角色卡`,try_different_search:`嘗試使用其他關鍵字搜尋`,upload:`上傳`,upload_desc:`點擊或拖曳檔案到此處上傳`},memory:{description:`存放記憶的地方,以及策略`,title:`記憶體`},data:{title:`Data`,description:`Manage stored AIRI data, exports, and resets`,sections:{chats:{title:`Chat sessions`,description:`Export or import saved chat sessions.`,export:`Export chats`,import:`Import chats`,delete:`Delete all chat sessions`},models:{title:`Models`,description:`Remove imported Live2D/VRM models.`,delete:`Delete all models`},modules:{title:`Modules`,description:`Reset module preferences and credentials.`,reset:`Reset module settings`},providers:{title:`Providers`,description:`Reset all provider settings and credentials.`,reset:`Reset provider settings`},danger:{title:`Danger zone`,description:`Irreversible actions. Export what you need before continuing.`},all:{title:`Delete all data`,description:`Wipe every local setting, provider config, and model.`,delete:`Delete all data`},desktop:{title:`Reset desktop settings & states`,description:`Clear AIRI desktop settings and runtime state.`,reset:`Reset desktop data`}},confirmations:{tooltip:`Are you sure?`,yes:`Yes`},status:{exported:`Chat sessions exported.`,imported:`Chat sessions imported.`,import_error:`Failed to import chat sessions. Please check the file format.`,chats_deleted:`Chat sessions deleted.`,models_deleted:`Models deleted.`,modules_reset:`Module settings reset.`,providers_reset:`Provider settings reset.`,all_deleted:`All local data deleted.`,desktop_reset:`Desktop data reset.`}},models:{description:`切換角色的 Live2D、VRM 模型`,title:`角色模型`,sections:{section:{live2d:{title:`Live2D`,description:`Configure Live2D models and settings`},vrm:{title:`VRM`,description:`Configure 3D VRM models and settings`},scene:`場景`}}},modules:{beat_sync:{description:`Vibe with beats from the audio source`,title:`Beat Sync`,sections:{audio_source:{actions:{start_screen_capture:`Start screen capture`,stop:`Stop`},description:`Select an audio source to detect beats from.`,title:`Audio source`},beat_visualizer:{title:`Beat visualizer`},parameters:{advanced_parameters:`Advanced Parameters`,description:`Tweak the beat detection parameters.`,title:`Parameters`,parameters:{adaptive_threshold:{description:`Whether to apply adaptive thresholds based on signal variance over time.`,label:`Adaptive threshold`},buffer_duration:{description:`Duration of the internal analysis buffer.`,label:`Buffer duration`},envelope_filter_frequency:{description:`Frequency for the envelope filter applied to smooth energy changes.`,label:`Envelope filter frequency`},highpass_filter_frequency:{description:`Frequency for the highpass filter applied to reduce low frequencies like sub-bass noises.`,label:`Highpass filter frequency`},lowpass_filter_frequency:{description:`Frequency for the lowpass filter applied to reduce high frequencies like vocals.`,label:`Lowpass filter frequency`},min_beat_interval:{description:`Maximum BPM or minimum interval between detected beats.`,label:`Max BPM / Min beat interval`},sensitivity:{label:`Sensitivity`},spectral_flux:{description:`Whether to enable spectral flux-based onset detection.`,label:`Spectral flux`},warmup:{description:`Whether to warm up before detecting beats for better accuracy.`,label:`Warmup`}}}}},consciousness:{description:`人格設定、使用的模型等設定`,sections:{section:{"provider-model-selection":{collapse:`摺疊`,custom_model_placeholder:`輸入自訂模型名稱`,description:`為意識選擇合適的 LLM 服務來源`,error:`取得發生錯誤`,expand:`展開`,loading:`載入模型中...`,manual_model_name:`模型名稱`,manual_model_placeholder:`輸入與該服務來源一起使用的模型名稱`,no_models:`沒有任何可用的模型`,no_models_description:`該服務來源的模型清單沒有回傳任何資料`,no_search_results:`沒有符合的模型`,no_search_results_description:`沒有模型符合「{query}」關鍵字,請嘗試別的關鍵字`,not_supported:`無法列出模型`,not_supported_description:`此服務來源不支援列出模型的功能`,search_placeholder:`搜尋模型...`,search_results:`找到 {count} / {total} 個模型`,show_less:`顯示更少`,show_more:`顯示更多`,subtitle:`選擇一個模型`,title:`模型`}}},title:`意識`},description:`思維、視覺、語音綜合、遊戲等`,"gaming-factorio":{description:`一起玩 Factorio!`,title:`異星工廠 Factorio`,enable:`啟用異星工廠集成`,"enable-description":`允許 AIRI 與異星工廠遊戲互動`,"server-address":`伺服器地址`,"server-address-description":`異星工廠伺服器的 IP 地址或主機名稱`,"server-address-placeholder":`輸入伺服器地址(例如:localhost 或 192.168.1.100)`,"server-port":`伺服器端口`,"server-port-description":`異星工廠伺服器的端口號(預設 34197)`,username:`使用者名稱`,"username-description":`您在異星工廠伺服器中的使用者名稱`,"username-placeholder":`輸入您的異星工廠使用者名稱`,configured:`異星工廠已正確設定!`},"gaming-minecraft":{description:`一起玩 Minecraft!`,title:`我的世界 Minecraft`,enable:`啟用我的世界集成`,"enable-description":`允許 AIRI 與我的世界遊戲互動`,"server-address":`伺服器地址`,"server-address-description":`我的世界伺服器的 IP 地址或主機名稱`,"server-address-placeholder":`輸入伺服器地址(例如:localhost 或 play.example.com)`,"server-port":`伺服器端口`,"server-port-description":`我的世界伺服器的端口號(預設 25565)`,username:`使用者名稱`,"username-description":`您在我的世界伺服器中的使用者名稱`,"username-placeholder":`輸入您的我的世界使用者名稱`,configured:`我的世界已正確設定!`},hearing:{description:`語音辨識`,title:`聽覺`,sections:{section:{"provider-selection":{description:`Select the suitable speech recognition provider`}}}},"memory-long-term":{description:`長期記憶`,title:`長期記憶`},"memory-short-term":{description:`短期記憶`,title:`短期記憶`},"messaging-discord":{description:`Discord 訊息與語音聊天`,title:`Discord`,enable:`啟用 Discord 集成`,"enable-description":`允許 AIRI 透過 Discord 進行互動`,token:`機器人權杖`,"token-description":`您的 Discord 機器人权杖`,"token-placeholder":`輸入您的 Discord 機器人权杖`,configured:`Discord 已正確設定!`},speech:{description:`語音合成`,sections:{section:{playground:{buttons:{stop:{label:`停止`}},"select-voice":{required:`請選擇聲線`}},"provider-voice-selection":{custom_model_placeholder:`輸入指定模型名稱...`,custom_voice_placeholder:`輸入指定聲線 ID...`,description:`選擇合適的語音服務來源`,no_models:`沒有任何可用的模型`,no_models_description:`該服務來源的模型清單沒有回傳任何資料`,no_voices:`沒有任何可用的聲線`,no_voices_description:`該服務來源的聲線清單沒有回傳任何資料`,no_voices_hint:`You can enter a custom voice name below.`,pause:`Pause`,play_sample:`Play`,search_models_placeholder:`搜尋模型...`,search_models_results:`找到 {count} / {total} 個模型`,search_voices_placeholder:`搜尋聲線...`,search_voices_results:`找到 {count} / {total} 條聲線`,unsupported_voice_warning_title:`No supported voices`,unsupported_voice_warning_content:`Try a different model or provider. We are working on supporting all the voice for this model as quickly as possible. If you need it urgently, please let us know on GitHub at https://github.com/moeru-ai/airi/issues.`,show_less:`顯示更少`,show_more:`顯示更多`,title:`選擇語音合成服務來源`},"voice-settings":{"input-ssml":{placeholder:`請輸入 SSML 文字`},"use-ssml":{description:`啟用後可以輸入原始 SSML 而不是純文字`,label:`使用自訂 SSML`}}}},title:`發聲`},title:`機體模組`,vision:{description:`視覺`,title:`視覺`},x:{description:`X / Twitter 的瀏覽與使用`,title:`X / Twitter`,enable:`啟用 X / Twitter 集成`,"enable-description":`允許 AIRI 與 X / Twitter 互動`,"api-key":`API 金鑰`,"api-key-description":`您的 X / Twitter API 金鑰`,"api-key-placeholder":`輸入您的 X / Twitter API 金鑰`,"api-secret":`API 金鑰密文`,"api-secret-description":`您的 X / Twitter API 金鑰密文`,"api-secret-placeholder":`輸入您的 X / Twitter API 金鑰密文`,"access-token":`存取權杖`,"access-token-description":`您的 X / Twitter 存取權杖`,"access-token-placeholder":`輸入您的 X / Twitter 存取權杖`,"access-token-secret":`存取權杖密文`,"access-token-secret-description":`您的 X / Twitter 存取權杖密文`,"access-token-secret-placeholder":`輸入您的 X / Twitter 存取權杖密文`,configured:`X / Twitter 已正確設定!`},"mcp-server":{description:`連線與管理 MCP 伺服器及工具`,title:`MCP 伺服器`}},providers:{explained:{chat:`文字生成模型服務來源,例如 OpenRouter、OpenAI、Ollama`,Speech:`語音(文字轉語音)模型服務來源,例如 ElevenLabs、Azure Speech`,Transcription:`轉錄(語音轉文字)模型服務來源,例如 Whisper.cpp、OpenAI、Azure Speech`},helpinfo:{title:`第一次使用?`,description:`AIRI 需要設定至少一個 {chat} 服務來源,才能正常思考與運作。你可以把它看作是 AIRI 系統中角色的大腦。 +`},common:{fields:{field:{"api-key":{label:`API 金鑰`}}},section:{advanced:{fields:{field:{headers:{description:`新增自訂 HTTP 標頭`,key:{placeholder:`請輸入標頭名稱`},label:`HTTP 請求標頭`,value:{placeholder:`請輸入標頭數值`}}}},title:`進階設定`},basic:{description:`基礎設定`,title:`基礎設定`},voice:{title:`聲音設定`}}},description:`LLM、語音合成、語音辨識服務來源等`,provider:{"app-local-audio-transcription":{title:`應用程式內(本機)`,description:`https://github.com/moeru-ai/xsai-transformers`},"app-local-audio-speech":{title:`應用程式內(本機)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-transcription":{title:`瀏覽器內(本機)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-speech":{title:`瀏覽器內(本機)`,description:`https://github.com/moeru-ai/xsai-transformers`},"alibaba-cloud-model-studio":{description:`bailian.console.aliyun.com`,title:`阿里百煉`},anthropic:{description:`anthropic.com`,title:`Anthropic | Claude`,helpinfo:{title:`開始之前`,description:{part1:`雖然 Anthropic 最近宣布他們正在提供對 OpenAI SDK 相容性的 Beta 版支援`,part2:`(您可以在此處閱讀更多資訊)`,part3:`但由於實作細節附帶`,part4:`與 OpenAI SDK 不一致,目前無法在瀏覽器中使用此提供者。`,part5:`如果您確實需要使用此提供者,則需要一個專用的代理後端,例如在`,part6:`上運行的 Serverless Function,或者一些繞過 CORS 的服務,以繞過 CORS 限制。`}}},"cloudflare-workers-ai":{description:`Cloudflare.com`,fields:{field:{"account-id":{description:`Cloudflare 帳戶 ID`,label:`Cloudflare Account ID`,placeholder:`請輸入 Cloudflare Account ID`},"api-key":{placeholder:`請輸入 Cloudflare Workers AI 的 API Key`}}},title:`Workers AI`},common:{status:{validating:`正在驗證設定`,valid:`設定看起來有效。`},fields:{field:{pitch:{description:`調整合成語音的音高(例如更尖銳或更渾厚)`,label:`音高`},speed:{description:`調整說話的語速`,label:`語速`},volume:{description:`調整語音的響度`,label:`響度`}}}},deepseek:{description:`DeepSeek.com`,title:`深度求索 DeepSeek`},elevenlabs:{description:`Elevenlabs.io`,fields:{field:{"simularity-boost":{description:`聲音相似性與依從性`,label:`相似度修正`},"speaker-boost":{description:`增強說話者的相似性`,label:`說話者增強`},speed:{description:`語音生成速度`,label:`語速`},stability:{description:`語音穩定性與隨機性`,label:`穩定性`},style:{description:`誇張的語音風格`,label:`風格`}}},playground:{buttons:{button:{"test-voice":{generating:`產生中...`,label:`測試聲音`}}},fields:{field:{input:{placeholder:`請輸入用於測試發音的文字`},language:{description:`選擇語音語言`,label:`語言`},voice:{description:`選擇偏好的語音`,label:`聲線`}}},title:`實驗平台`,validation:{"error-missing-api-key":`需要填寫 API Key 才能使用喔!`}},title:`ElevenLabs (11labs)`},fireworks:{description:`Fireworks.ai`,title:`Fireworks.ai`},"microsoft-speech":{description:`speech.microsoft.com`,fields:{field:{region:{description:`服務 Endpoint 地區(例如亞太 eastasia 區域)`,label:`Endpoint 地區`}}},title:`Microsoft / Azure 語音服務`},"index-tts-vllm":{description:`https://index-tts.github.io/`,title:`Bilibili / IndexTTS`},"azure-ai-foundry":{description:`Azure AI Foundry`,title:`Azure AI Foundry`},mistral:{description:`mistral.ai`,title:`Mistral`},moonshot:{description:`Moonshot.ai`,title:`月之暗面`},modelscope:{description:`modelscope.cn`,title:`魔搭社群 ModelScope`},novita:{description:`novita.ai`,title:`Novita`},ollama:{description:`ollama.ai`,title:`Ollama`},openai:{description:`OpenAi.com`,title:`OpenAI`},"openai-compatible":{description:`OpenAI 相容`,title:`OpenAI Compatible`},openrouter:{description:`OpenRouter.ai`,title:`OpenRouter`},perplexity:{description:`perplexity.ai`,title:`Perplexity`},player2:{description:`player2.game`,title:`Player2`},together:{description:`together.ai`,title:`Together.ai`},"google-generative-ai":{description:`gemini.google.com`,title:`Google Gemini`},featherless:{description:`featherless.ai`,title:`Featherless AI`},"lm-studio":{description:`lmstudio.ai`,title:`LM Studio`},vllm:{description:`vllm.ai`,title:`vLLM`},volcengine:{description:`volcengine.com`,fields:{field:{appId:{description:`可在控制台取得的 App ID`,label:`App ID`}}},title:`火山引擎`},xai:{description:`X.AI`,title:`xAI`},"302-ai":{description:`302.AI`,title:`302.AI`},"comet-api":{description:`CometAPI.com`,title:`Comet API`},cerebras:{description:`cerebras.ai`,title:`Cerebras`},"aliyun-nls":{description:`Aliyun NLS`,title:`Aliyun NLS`},transcriptions:{playground:{title:`實驗平台`}}},title:`服務來源`},scene:{description:`設定角色所在環境`,title:`場景`},system:{"color-scheme":{description:`更改舞台的配色方案`,title:`配色方案`},developer:{description:`為開發者提供的選項`,title:`開發者`},general:{description:`深色主題、語言等選項`,title:`通用`},description:`自訂你的舞台外觀!`,sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:`強調色`,"rgb-on":{title:`RGB ON!`}}}},title:`配色`},developer:{title:`開發者`,sections:{section:{"use-magic-keys":{title:`useMagicKeys`,description:`測試快捷鍵`}}}},"theme-presets":{presets:{default:{colors:{"color-1":`AIRI Green`},description:`The default greenish theme color, brought by AIRI to you!`,title:`Default Color`},morandi:{colors:{"color-1":`Taupe`,"color-2":`Beige`,"color-3":`Ash Grey`,"color-4":`Light Taupe`,"color-5":`Ivory`,"color-6":`Olive Grey`,"color-7":`Sand`,"color-8":`Warm Grey`},description:`Soft, muted tones inspired by Giorgio Morandi's paintings`,title:`Morandi Colors`},monet:{colors:{"color-1":`Sky Blue`,"color-2":`Mist`,"color-3":`Sand`,"color-4":`Moss Green`,"color-5":`Water Lily`,"color-6":`Wheat`,"color-7":`Slate Blue`,"color-8":`Sage`},description:`Impressionist palette inspired by Claude Monet's works`,title:`Monet Colors`},japanese:{colors:{"color-1":`Tan`,"color-2":`Warm Taupe`,"color-3":`Umber`,"color-4":`Coffee`,"color-5":`Bronze`,"color-6":`Gold`,"color-7":`Mustard`,"color-8":`Amber`},description:`Traditional Japanese color palette`,title:`Japanese Colors`},nordic:{colors:{"color-1":`Nordic Blue`,"color-2":`Ice`,"color-3":`Fjord`,"color-4":`Steel`,"color-5":`Glacier`,"color-6":`Slate`,"color-7":`Cloud`,"color-8":`Stone`},description:`Scandinavian minimalist color scheme`,title:`Nordic Colors`},chinese:{colors:{"color-1":`Rosy Dawn`,"color-2":`Chinese Red`,"color-3":`Smoky Brown`,"color-4":`Bamboo Green`,"color-5":`Dark Purple`,"color-6":`Golden Yellow`,"color-7":`Azure Blue`,"color-8":`Ochre`},description:`Traditional Chinese colors, derived from ancient textiles, porcelain and paintings`,title:`Chinese Traditional Colors`}},title:`預設`}}},title:`外觀`},page:{developers:{"open-devtools":{title:`Open Developer Tools`,button:`Open`}}}},sections:{section:{general:{title:`通用`}}},theme:{title:`主題`,description:`切換 AIRI 的基礎主題,亮色模式或暗色模式。 +`},title:`設定`,voices:`聲線`,vrm:{"change-model":{"from-file":`從檔案載入`,"from-file-select":`選擇`,"from-url":`從 URL 載入`,"from-url-confirm":`載入`,"from-url-placeholder":`輸入 VRM 模型 URL`,title:`更換模型`},title:`VRM 設定`,"scale-and-position":{"model-info-title":`模型尺寸資訊`,"model-info-x":`寬度(X 軸)`,"model-info-y":`高度(Y 軸)`,"model-info-z":`深度(Z 軸)`,tips:`設定模型放置的空間座標。 +座標軸已視覺化。 +`,scale:`縮放`,x:`X 軸位移`,y:`Y 軸位移`,z:`Z 軸位移`,fov:`視角調整(度)`,"rotation-y":`模型朝向(Y 軸旋轉)`,"camera-distance":`相機距離(畫面縮放)`,"eye-tracking-mode":{title:`模型注視方向`,options:{option:{camera:`相機`,mouse:`滑鼠`,disabled:`停用`}}}},"switch-to-vrm":{title:`想切換至 Live2D 虛擬角色嗎?`,"change-to-vrm":`切換至 Live2D 虛擬角色設定頁面`},"theme-color-from-model":{"button-extract":{title:`提取`}},skybox:{"skybox-intensity":`天空盒光照強度`,"skybox-specular-mix":`漫反射/鏡面反射混合係數`}},wip:{title:`Work in Progress`,description:`This feature is currently under development and not yet publicly available. Check back in future updates for this functionality.`}},_e={chat:{message:{"character-name":{airi:`AIRI`,"core-system":`核心系統`,you:`你`}}},message:`說點什麼...`,operations:{"load-models":`載入模型`,"load-models-status":{loading:`模型載入中`,ready:`已就緒`}},"select-a-audio-input":`選擇一個音訊輸入裝置`,"select-a-model":`選擇一個模型`,"select-a-voice":`選擇一個聲線`,viewers:{"debug-menu":{emotions:`表情`,"emotions-btn":{angry:`😠 生氣`,awkward:`😳 尷尬`,happy:`😄 開心`,neutral:`🙂 日常`,question:`🤔 疑問`,sad:`😫 難過`,surprised:`🤯 驚喜`,think:`🤨 思考`},vrm:{camera:`攝影機`,model:{title:`模型`}}}},waiting:`等待中`},ve={"allow-visible-on-all-workspaces":{title:`跨桌面可見性`,description:`允許視窗在所有虛擬桌面中可見,僅限 macOS。`},pages:{modules:{"mcp-server":{description:`連線與管理 MCP 伺服器和工具`,title:`MCP 伺服器`}},system:{sections:{section:{"window-shortcuts":{title:`鍵盤快捷鍵`}}},"window-shortcuts":{description:`修改視窗快捷方式`,title:`視窗快捷方式`,"toggle-move":{label:`切換移動狀態`},"toggle-resize":{label:`調整大小`},"toggle-ignore-mouse-event":{label:`忽略滑鼠事件`},"press-keys":`請按下按鍵...`},developer:{sections:{section:{"use-window-mouse":{title:`useWindowMouse`,description:`Test the Electron window cursor position`}}}}}},devtools:{title:`Developer`,pages:{"widgets-calling":{title:`Widget Calling`}}}},ye={base:me,docs:he,settings:ge,stage:_e,tamagotchi:{stage:{operations:{"load-models":`載入推理模型`,"load-models-status":{loading:`載入中`,ready:`已就緒`}},docs:{theme:{navbar:{appearance:{title:`外貌`}}}},"controls-island":{"fade-on-hover":{enable:`懸停時隱藏`,disable:`總是顯示`}},notice:{"fade-on-hover":{title:`懸停淡出`,intro:`當游標靠近時自動讓角色變淡,減少干擾同時保持可見。`,opacity:`開啟後,不透明度會降到 {value} ,作用於 {targets} ,當游標靠近時。`,toggle:`要關閉時,將游標移到 {controls} 區域,再點擊一次 {icon}。`,"controls-label":`控制島`,"icon-label":`隱藏圖示`,value:`0`,targets:`角色與介面`,confirm:`知道了`,preparing:`準備中…`,"read-more":`閱讀更多`,"preview-title":`這是什麼?`}}},settings:ve}},be={en:k,es:A,fr:I,ru:te,vi:se,"zh-Hans":pe,"zh-Hant":ye};function xe(e){let t=document.createElement(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);n.drawImage(e,0,0);let r=n.getImageData(0,0,t.width,t.height).data,i=t.width,a=t.height,o=0,s=0;for(let e=0;e0||r[c+1]>0||r[c+2]>0||r[c+3]>0)&&(eo&&(o=n),e>s&&(s=e))}let c=o-i,l=s-a,u=document.createElement(`canvas`);return u.width=c,u.height=l,u.getContext(`2d`).drawImage(t,i,a,c,l,0,0,c,l),u}var Se=n(((t,n)=>{(function(e){if(typeof t==`object`&&n!==void 0)n.exports=e();else if(typeof define==`function`&&define.amd)define([],e);else{var r=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this;r.localforage=e()}})(function(){return(function t(n,r,i){function a(s,c){if(!r[s]){if(!n[s]){var l=typeof e==`function`&&e;if(!c&&l)return l(s,!0);if(o)return o(s,!0);var u=Error(`Cannot find module '`+s+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=r[s]={exports:{}};n[s][0].call(d.exports,function(e){var t=n[s][1][e];return a(t||e)},d,d.exports,t,n,r,i)}return r[s].exports}for(var o=typeof e==`function`&&e,s=0;s`u`&&e(3);var l=Promise;function u(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function d(e,t,n){typeof t==`function`&&e.then(t),typeof n==`function`&&e.catch(n)}function f(e){return typeof e!=`string`&&(console.warn(e+` used as a key, but it is not a string.`),e=String(e)),e}function p(){if(arguments.length&&typeof arguments[arguments.length-1]==`function`)return arguments[arguments.length-1]}var m=`local-forage-detect-blob-support`,h=void 0,g={},_=Object.prototype.toString,v=`readonly`,y=`readwrite`;function b(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i=43)}}).catch(function(){return!1})}function S(e){return typeof h==`boolean`?l.resolve(h):x(e).then(function(e){return h=e,h})}function C(e){var t=g[e.name],n={};n.promise=new l(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function w(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function T(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function E(e,t){return new l(function(n,r){if(g[e.name]=g[e.name]||I(),e.db)if(t)C(e),e.db.close();else return n(e.db);var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(m)}catch(n){if(n.name===`ConstraintError`)console.warn(`The database "`+e.name+`" has been upgraded from version `+t.oldVersion+` to version `+t.newVersion+`, but the storage "`+e.storeName+`" already exists.`);else throw n}}),a.onerror=function(e){e.preventDefault(),r(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},n(t),w(e)}})}function D(e){return E(e,!1)}function O(e){return E(e,!0)}function k(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn(`The database "`+e.name+`" can't be downgraded from version `+e.db.version+` to version `+e.version+`.`),e.version=e.db.version),i||n){if(n){var a=e.db.version+1;a>e.version&&(e.version=a)}return!0}return!1}function A(e){return new l(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){t({__local_forage_encoded_blob:!0,data:btoa(n.target.result||``),type:e.type})},r.readAsBinaryString(e)})}function j(e){return c([b(atob(e.data))],{type:e.type})}function M(e){return e&&e.__local_forage_encoded_blob}function N(e){var t=this,n=t._initReady().then(function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function P(e){C(e);for(var t=g[e.name],n=t.forages,r=0;r0&&(!e.db||i.name===`InvalidStateError`||i.name===`NotFoundError`))return l.resolve().then(function(){if(!e.db||i.name===`NotFoundError`&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),O(e)}).then(function(){return P(e).then(function(){F(e,t,n,r-1)})}).catch(n);n(i)}}function I(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function L(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=g[n.name];i||(i=I(),g[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=N);var a=[];function o(){return l.resolve()}for(var s=0;s>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l}function Ee(e){var t=new Uint8Array(e),n=``,r;for(r=0;r>2],n+=ce[(t[r]&3)<<4|t[r+1]>>4],n+=ce[(t[r+1]&15)<<2|t[r+2]>>6],n+=ce[t[r+2]&63];return t.length%3==2?n=n.substring(0,n.length-1)+`=`:t.length%3==1&&(n=n.substring(0,n.length-2)+`==`),n}function H(e,t){var n=``;if(e&&(n=Te.call(e)),e&&(n===`[object ArrayBuffer]`||e.buffer&&Te.call(e.buffer)===`[object ArrayBuffer]`)){var r,i=de;e instanceof ArrayBuffer?(r=e,i+=pe):(r=e.buffer,n===`[object Int8Array]`?i+=he:n===`[object Uint8Array]`?i+=ge:n===`[object Uint8ClampedArray]`?i+=_e:n===`[object Int16Array]`?i+=ve:n===`[object Uint16Array]`?i+=be:n===`[object Int32Array]`?i+=ye:n===`[object Uint32Array]`?i+=xe:n===`[object Float32Array]`?i+=Se:n===`[object Float64Array]`?i+=Ce:t(Error(`Failed to get type for BinaryArray`))),t(i+Ee(r))}else if(n===`[object Blob]`){var a=new FileReader;a.onload=function(){var n=le+e.type+`~`+Ee(this.result);t(de+me+n)},a.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error(`Couldn't convert value into a JSON string: `,e),t(null,n)}}function De(e){if(e.substring(0,fe)!==de)return JSON.parse(e);var t=e.substring(we),n=e.substring(fe,we),r;if(n===me&&ue.test(t)){var i=t.match(ue);r=i[1],t=t.substring(i[0].length)}var a=V(t);switch(n){case pe:return a;case me:return c([a],{type:r});case he:return new Int8Array(a);case ge:return new Uint8Array(a);case _e:return new Uint8ClampedArray(a);case ve:return new Int16Array(a);case be:return new Uint16Array(a);case ye:return new Int32Array(a);case xe:return new Uint32Array(a);case Se:return new Float32Array(a);case Ce:return new Float64Array(a);default:throw Error(`Unkown type: `+n)}}var U={serialize:H,deserialize:De,stringToBuffer:V,bufferToString:Ee};function Oe(e,t,n,r){e.executeSql(`CREATE TABLE IF NOT EXISTS `+t.storeName+` (id INTEGER PRIMARY KEY, key unique, value)`,[],n,r)}function ke(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=typeof e[r]==`string`?e[r]:e[r].toString();var i=new l(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction(function(i){Oe(i,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=U,i}function Ae(e,t,n,r,i,a){e.executeSql(n,r,i,function(e,o){o.code===o.SYNTAX_ERR?e.executeSql(`SELECT name FROM sqlite_master WHERE type='table' AND name = ?`,[t.storeName],function(e,s){s.rows.length?a(e,o):Oe(e,t,function(){e.executeSql(n,r,i,a)},a)},a):a(e,o)},a)}function je(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Ae(n,i,`SELECT * FROM `+i.storeName+` WHERE key = ? LIMIT 1`,[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&=i.serializer.deserialize(r),t(r)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Me(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Ae(n,i,`SELECT * FROM `+i.storeName,[],function(n,r){for(var a=r.rows,o=a.length,s=0;s0){a(Ne.apply(i,[e,s,n,r-1]));return}o(t)}})})}).catch(o)});return u(a,n),a}function Pe(e,t,n){return Ne.apply(this,[e,t,n,1])}function Fe(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Ae(n,i,`DELETE FROM `+i.storeName+` WHERE key = ?`,[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Ie(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Ae(t,r,`DELETE FROM `+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function Le(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Ae(t,r,`SELECT COUNT(key) as c FROM `+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function W(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Ae(n,i,`SELECT key FROM `+i.storeName+` WHERE id = ? LIMIT 1`,[e+1],function(e,n){t(n.rows.length?n.rows.item(0).key:null)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Re(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Ae(t,r,`SELECT key FROM `+r.storeName,[],function(t,n){for(var r=[],i=0;i '__WebKitDatabaseInfoTable__'`,[],function(n,r){for(var i=[],a=0;a0}function Ke(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=Ue(e,t._defaultConfig),Ge()?(t._dbInfo=n,n.serializer=U,l.resolve()):l.reject()}function qe(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);r.indexOf(e)===0&&localStorage.removeItem(r)}});return u(n,e),n}function Je(e,t){var n=this;e=f(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&=t.serializer.deserialize(r),r});return u(r,t),r}function Ye(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,a=localStorage.length,o=1,s=0;s=0;t--){var n=localStorage.key(t);n.indexOf(e)===0&&localStorage.removeItem(n)}}):l.reject(`Invalid arguments`);return u(i,t),i}var nt={_driver:`localStorageWrapper`,_initStorage:Ke,_support:He(),iterate:Ye,getItem:Je,setItem:et,removeItem:$e,clear:qe,length:Qe,key:Xe,keys:Ze,dropInstance:tt},rt=function(e,t){return e===t||typeof e==`number`&&typeof t==`number`&&isNaN(e)&&isNaN(t)},it=function(e,t){for(var n=e.length,r=0;r1&&typeof MSStream>`u`};function nt(e){return function(t){return t.test(e)}}function rt(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=nt(n),a={apple:{phone:i(Be)&&!i(Je),ipod:i(Ve),tablet:!i(Be)&&(i(He)||tt(t))&&!i(Je),universal:i(Ue),device:(i(Be)||i(Ve)||i(He)||i(Ue)||tt(t))&&!i(Je)},amazon:{phone:i(Ke),tablet:!i(Ke)&&i(qe),device:i(Ke)||i(qe)},android:{phone:!i(Je)&&i(Ke)||!i(Je)&&i(We),tablet:!i(Je)&&!i(Ke)&&!i(We)&&(i(qe)||i(Ge)),device:!i(Je)&&(i(Ke)||i(qe)||i(We)||i(Ge))||i(/\bokhttp\b/i)},windows:{phone:i(Je),tablet:i(Ye),device:i(Je)||i(Ye)},other:{blackberry:i(Xe),blackberry10:i(Ze),opera:i(Qe),firefox:i(et),chrome:i($e),device:i(Xe)||i(Ze)||i(Qe)||i(et)||i($e)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var it=rt(globalThis.navigator);function at(){return!it.apple.device}function ot(e){var t=!0;if(it.tablet||it.phone){if(it.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(it.android.device){var n=navigator.userAgent.match(/Android\s([0-9.]*)/);if(n){var r=parseInt(n[1],10);r<7&&(t=!1)}}}return t?e:4}var G={ADAPTER:ze,MIPMAP_TEXTURES:je.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:W.NONE,SPRITE_MAX_TEXTURES:ot(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:Pe.AUTO,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:Ae.CLAMP,SCALE_MODE:ke.LINEAR,PRECISION_VERTEX:Fe.HIGH,PRECISION_FRAGMENT:it.apple.device?Fe.HIGH:Fe.MEDIUM,CAN_UPLOAD_SAME_BUFFER:at(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},st=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i{t.exports=n,t.exports.default=n;function n(e,t,n){n||=2;var i=t&&t.length,o=i?t[0]*n:e.length,s=r(e,0,o,n,!0),c=[];if(!s||s.next===s.prev)return c;var l,d,f,p,m,h,g;if(i&&(s=u(e,t,s,n)),e.length>80*n){l=f=e[0],d=p=e[1];for(var _=n;_f&&(f=m),h>p&&(p=h);g=Math.max(f-l,p-d),g=g===0?0:32767/g}return a(s,c,n,l,d,g,0),c}function r(e,t,n,r,i){var a,o;if(i===N(e,t,n,r)>0)for(a=t;a=t;a-=r)o=A(a,e[a],e[a+1],o);return o&&S(o,o.next)&&(j(o),o=o.next),o}function i(e,t){if(!e)return e;t||=e;var n=e,r;do if(r=!1,!n.steiner&&(S(n,n.next)||x(n.prev,n,n.next)===0)){if(j(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function a(e,t,n,r,u,d,f){if(e){!f&&d&&h(e,r,u,d);for(var p=e,m,g;e.prev!==e.next;){if(m=e.prev,g=e.next,d?s(e,r,u,d):o(e)){t.push(m.i/n|0),t.push(e.i/n|0),t.push(g.i/n|0),j(e),e=g.next,p=g.next;continue}if(e=g,e===p){f?f===1?(e=c(i(e),t,n),a(e,t,n,r,u,d,2)):f===2&&l(e,t,n,r,u,d):a(i(e),t,n,r,u,d,1);break}}}}function o(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=t.x,a=n.x,o=r.x,s=t.y,c=n.y,l=r.y,u=ia?i>o?i:o:a>o?a:o,p=s>c?s>l?s:l:c>l?c:l,m=r.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&y(i,s,a,c,o,l,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function s(e,t,n,r){var i=e.prev,a=e,o=e.next;if(x(i,a,o)>=0)return!1;for(var s=i.x,c=a.x,l=o.x,u=i.y,d=a.y,f=o.y,p=sc?s>l?s:l:c>l?c:l,g=u>d?u>f?u:f:d>f?d:f,v=_(p,m,t,n,r),b=_(h,g,t,n,r),S=e.prevZ,C=e.nextZ;S&&S.z>=v&&C&&C.z<=b;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0||(S=S.prevZ,C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;S&&S.z>=v;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;C&&C.z<=b;){if(C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function c(e,t,n){var r=e;do{var a=r.prev,o=r.next.next;!S(a,o)&&C(a,r,r.next,o)&&D(a,o)&&D(o,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),j(r),j(r.next),r=e=o),r=r.next}while(r!==e);return i(r)}function l(e,t,n,r,o,s){var c=e;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&b(c,l)){var u=k(c,l);c=i(c,c.next),u=i(u,u.next),a(c,t,n,r,o,s,0),a(u,t,n,r,o,s,0);return}l=l.next}c=c.next}while(c!==e)}function u(e,t,n,i){var a=[],o,s,c,l,u;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a&&(a=s,o=n.x=n.x&&n.x>=l&&r!==n.x&&y(io.x||n.x===o.x&&m(o,n)))&&(o=n,d=f)),n=n.next;while(n!==c);return o}function m(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,n,r){var i=e;do i.z===0&&(i.z=_(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(e){var t,n,r,i,a,o,s,c,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||c>0&&r;)s!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1);return e}function _(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function v(e){var t=e,n=e;do(t.x=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function b(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!E(e,t)&&(D(e,t)&&D(t,e)&&O(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||S(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function S(e,t){return e.x===t.x&&e.y===t.y}function C(e,t,n,r){var i=T(x(e,t,n)),a=T(x(e,t,r)),o=T(x(n,r,e)),s=T(x(n,r,t));return!!(i!==a&&o!==s||i===0&&w(e,n,t)||a===0&&w(e,r,t)||o===0&&w(n,e,r)||s===0&&w(n,t,r))}function w(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function T(e){return e>0?1:e<0?-1:0}function E(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&C(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function D(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function O(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function k(e,t){var n=new M(e.i,e.x,e.y),r=new M(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function A(e,t,n,r){var i=new M(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function j(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(N(e,0,a,n));if(i)for(var s=0,c=t.length;s0&&(r+=e[i-1].length,n.holes.push(r))}return n}})),lt=n(((e,t)=>{(function(n){var r=typeof e==`object`&&e&&!e.nodeType&&e,i=typeof t==`object`&&t&&!t.nodeType&&t,a=typeof global==`object`&&global;(a.global===a||a.window===a||a.self===a)&&(n=a);var o,s=2147483647,c=36,l=1,u=26,d=38,f=700,p=72,m=128,h=`-`,g=/^xn--/,_=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},b=c-l,x=Math.floor,S=String.fromCharCode,C;function w(e){throw RangeError(y[e])}function T(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function E(e,t){var n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(v,`.`);var i=T(e.split(`.`),t).join(`.`);return r+i}function D(e){for(var t=[],n=0,r=e.length,i,a;n=55296&&i<=56319&&n65535&&(e-=65536,t+=S(e>>>10&1023|55296),e=56320|e&1023),t+=S(e),t}).join(``)}function k(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function A(e,t){return e+22+75*(e<26)-((t!=0)<<5)}function j(e,t,n){var r=0;for(e=n?x(e/f):e>>1,e+=x(e/t);e>b*u>>1;r+=c)e=x(e/b);return x(r+(b+1)*e/(e+d))}function M(e){var t=[],n=e.length,r,i=0,a=m,o=p,d=e.lastIndexOf(h),f,g,_,v,y,b,S,C;for(d<0&&(d=0),f=0;f=128&&w(`not-basic`),t.push(e.charCodeAt(f));for(g=d>0?d+1:0;g=n&&w(`invalid-input`),b=k(e.charCodeAt(g++)),(b>=c||b>x((s-i)/v))&&w(`overflow`),i+=b*v,S=y<=o?l:y>=o+u?u:y-o,!(bx(s/C)&&w(`overflow`),v*=C;r=t.length+1,o=j(i-_,r,_==0),x(i/r)>s-a&&w(`overflow`),a+=x(i/r),i%=r,t.splice(i++,0,a)}return O(t)}function N(e){var t,n,r,i,a,o,d,f,g,_,v,y=[],b,C,T,E;for(e=D(e),b=e.length,t=m,n=0,a=p,o=0;o=t&&vx((s-n)/C)&&w(`overflow`),n+=(d-t)*C,t=d,o=0;os&&w(`overflow`),v==t){for(f=n,g=c;_=g<=a?l:g>=a+u?u:g-a,!(f<_);g+=c)E=f-_,T=c-_,y.push(S(A(_+E%T,0))),f=x(E/T);y.push(S(A(f,0))),a=j(n,C,r==i),n=0,++r}++n,++t}return y.join(``)}function P(e){return E(e,function(e){return g.test(e)?M(e.slice(4).toLowerCase()):e})}function F(e){return E(e,function(e){return _.test(e)?`xn--`+N(e):e})}if(o={version:`1.4.1`,ucs2:{decode:D,encode:O},decode:M,encode:N,toASCII:F,toUnicode:P},typeof define==`function`&&typeof define.amd==`object`&&define.amd)define(`punycode`,function(){return o});else if(r&&i)if(t.exports==r)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(r[C]=o[C]);else n.punycode=o})(e)})),ut=n(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});function n(){let e,t,n=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.get(n)}else if(t)return t.get(n)},r=(n,r)=>{n&&(typeof n==`object`||typeof n==`function`)?(e||=new WeakMap,e.set(n,r)):(t||=new Map,t.set(n,r))},i=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.has(n)}else if(t)return t.has(n);return!1};return{get:n,set:r,has:i,assert:e=>{if(!i(e))throw TypeError(`Side channel does not contain the given key`)}}}e.default=n,(typeof e.default==`object`&&e.default!==null||typeof e.default==`function`)&&(Object.assign(e.default,e),t.exports=e.default)})),dt=n(((e,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}})),ft=n(((e,t)=>{var n=dt(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a=d?s.slice(l,l+d):s,f=[],p=0;p=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},isBuffer:function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r{var n=ut(),r=ft(),i=dt(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,O=0,k=!1;(D=D.get(m))!==void 0&&!k;){var A=D.get(t);if(O+=1,A!==void 0){if(A===O)throw RangeError(`Cyclic object value`);k=!0}D.get(m)===void 0&&(O=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E))return g?[S(C?i:g(i,f.encoder,w,`key`,x))+`=`+S(g(E,f.encoder,w,`value`,x))]:[S(i)+`=`+S(String(E))];var j=[];if(E===void 0)return j;var M;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),M=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))M=_;else{var N=Object.keys(E);M=v?N.sort(v):N}var P=h?String(i).replace(/\./g,`%2E`):String(i),F=o&&s(E)&&E.length===1?P+`[]`:P;if(c&&s(E)&&E.length===0)return F+`[]`;for(var I=0;I0?b+y:``}})),mt=n(((e,t)=>{var n=ft(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f{var n=pt(),r=mt();t.exports={formats:dt(),parse:r,stringify:n}})),gt=n((e=>{var t=lt();function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=[`'`,`{`,`}`,`|`,`\\`,`^`,"`",`<`,`>`,`"`,"`",` `,`\r`,` +`,` `],s=[`%`,`/`,`?`,`;`,`#`].concat(o),c=[`/`,`?`,`#`],l=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},h=ht();function g(e,t,r){if(e&&typeof e==`object`&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}n.prototype.parse=function(e,n,i){if(typeof e!=`string`)throw TypeError(`Parameter 'url' must be a string, not `+typeof e);var g=e.indexOf(`?`),_=g!==-1&&g127?N+=`x`:N+=M[P];if(!N.match(u)){var I=A.slice(0,T),L=A.slice(T+1),R=M.match(d);R&&(I.push(R[1]),L.unshift(R[2])),L.length&&(y=`/`+L.join(`.`)+y),this.hostname=I.join(`.`);break}}}this.hostname.length>l?this.hostname=``:this.hostname=this.hostname.toLowerCase(),k||(this.hostname=t.toASCII(this.hostname));var z=this.port?`:`+this.port:``;this.host=(this.hostname||``)+z,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),y[0]!==`/`&&(y=`/`+y))}if(!f[S])for(var T=0,j=o.length;T0?r.host.split(`@`):!1;S&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.href=r.format(),r}if(!b.length)return r.pathname=null,r.search?r.path=`/`+r.search:r.path=null,r.href=r.format(),r;for(var C=b.slice(-1)[0],w=(r.host||e.host||b.length>1)&&(C===`.`||C===`..`)||C===``,T=0,E=b.length;E>=0;E--)C=b[E],C===`.`?b.splice(E,1):C===`..`?(b.splice(E,1),T++):T&&(b.splice(E,1),T--);if(!v&&!y)for(;T--;)b.unshift(`..`);v&&b[0]!==``&&(!b[0]||b[0].charAt(0)!==`/`)&&b.unshift(``),w&&b.join(`/`).substr(-1)!==`/`&&b.push(``);var D=b[0]===``||b[0]&&b[0].charAt(0)===`/`;if(x){r.hostname=D?``:b.length?b.shift():``,r.host=r.hostname;var S=r.host&&r.host.indexOf(`@`)>0?r.host.split(`@`):!1;S&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)}return v||=r.host&&b.length,v&&!D&&b.unshift(``),b.length>0?r.pathname=b.join(`/`):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.parse=g,e.resolve=v,e.format=_})),_t=t(st(),1);ct();var vt=gt(),yt={parse:vt.parse,format:vt.format,resolve:vt.resolve};G.RETINA_PREFIX=/@([0-9\.]+)x/,G.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var bt=!1,xt=`6.5.10`;function St(e){var t;if(!bt){if(G.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf(`chrome`)>-1){var n=[` + %c %c %c PixiJS `+xt+` - ✰ `+e+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ + +`,`background: #ff66a5; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`color: #ff66a5; background: #030307; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`background: #ffc3dc; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`];(t=globalThis.console).log.apply(t,n)}else globalThis.console&&globalThis.console.log(`PixiJS `+xt+` - `+e+` - http://www.pixijs.com/`);bt=!0}}var Ct;function wt(){return Ct===void 0&&(Ct=(function(){var e={stencil:!0,failIfMajorPerformanceCaveat:G.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!G.ADAPTER.getWebGLRenderingContext())return!1;var t=G.ADAPTER.createCanvas(),n=t.getContext(`webgl`,e)||t.getContext(`experimental-webgl`,e),r=!!(n&&n.getContextAttributes().stencil);if(n){var i=n.getExtension(`WEBGL_lose_context`);i&&i.loseContext()}return n=null,r}catch{return!1}})()),Ct}function Tt(e,t){return t===void 0&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(e&255)/255,t}function Et(e){var t=e.toString(16);return t=`000000`.substring(0,6-t.length)+t,`#`+t}function Dt(e){return(e[0]*255<<16)+(e[1]*255<<8)+(e[2]*255|0)}function Ot(){for(var e=[],t=[],n=0;n<32;n++)e[n]=n,t[n]=n;e[V.NORMAL_NPM]=V.NORMAL,e[V.ADD_NPM]=V.ADD,e[V.SCREEN_NPM]=V.SCREEN,t[V.NORMAL]=V.NORMAL_NPM,t[V.ADD]=V.ADD_NPM,t[V.SCREEN]=V.SCREEN_NPM;var r=[];return r.push(t),r.push(e),r}var kt=Ot();function At(e,t){if(t===1)return(t*255<<24)+e;if(t===0)return 0;var n=e>>16&255,r=e>>8&255,i=e&255;return n=n*t+.5|0,r=r*t+.5|0,i=i*t+.5|0,(t*255<<24)+(n<<16)+(r<<8)+i}function jt(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?`Float32Array`:e instanceof Uint32Array?`Uint32Array`:`Int32Array`;if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return`Uint16Array`}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return`Uint8Array`;return null}function Mt(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function Nt(e){return!(e&e-1)&&!!e}function Pt(e){var t=(e>65535?1:0)<<4;e>>>=t;var n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function Ft(e,t,n){var r=e.length,i;if(!(t>=r||n===0)){n=t+n>r?r-t:n;var a=r-n;for(i=t;i8)throw Error(`max arguments reached`);var c=this,l=c.name,u=c.items;this._aliasCount++;for(var d=0,f=u.length;d0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},e.prototype.add=function(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this},e.prototype.remove=function(e){var t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this},e.prototype.contains=function(e){return this.items.indexOf(e)!==-1},e.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(e.prototype,`empty`,{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`name`,{get:function(){return this._name},enumerable:!1,configurable:!0}),e}();Object.defineProperties(Xt.prototype,{dispatch:{value:Xt.prototype.emit},run:{value:Xt.prototype.emit}}),G.TARGET_FPMS=.06;var Zt;(function(e){e[e.INTERACTION=50]=`INTERACTION`,e[e.HIGH=25]=`HIGH`,e[e.NORMAL=0]=`NORMAL`,e[e.LOW=-25]=`LOW`,e[e.UTILITY=-50]=`UTILITY`})(Zt||={});var Qt=function(){function e(e,t,n,r){t===void 0&&(t=null),n===void 0&&(n=0),r===void 0&&(r=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=n,this.once=r}return e.prototype.match=function(e,t){return t===void 0&&(t=null),this.fn===e&&this.context===t},e.prototype.emit=function(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));var t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t},e.prototype.connect=function(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this},e.prototype.destroy=function(e){e===void 0&&(e=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var t=this.next;return this.next=e?null:t,this.previous=null,t},e}(),$t=function(){function e(){var e=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Qt(null,null,1/0),this.deltaMS=1/G.TARGET_FPMS,this.elapsedMS=1/G.TARGET_FPMS,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&e._requestId===null&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return e.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(e,t,n){return n===void 0&&(n=Zt.NORMAL),this._addListener(new Qt(e,t,n))},e.prototype.addOnce=function(e,t,n){return n===void 0&&(n=Zt.NORMAL),this._addListener(new Qt(e,t,n,!0))},e.prototype._addListener=function(e){var t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this},e.prototype.remove=function(e,t){for(var n=this._head.next;n;)n=n.match(e,t)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,`count`,{get:function(){if(!this._head)return 0;for(var e=0,t=this._head;t=t.next;)e++;return e},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(e){e===void 0&&(e=performance.now());var t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){var n=e-this._lastFrame|0;if(n=this.x&&e=this.y&&te.right?e.right:this.right)<=n)return!1;var r=this.ye.bottom?e.bottom:this.bottom)>r}var i=this.left,a=this.right,o=this.top,s=this.bottom;if(a<=i||s<=o)return!1;var c=sn[0].set(e.left,e.top),l=sn[1].set(e.left,e.bottom),u=sn[2].set(e.right,e.top),d=sn[3].set(e.right,e.bottom);if(u.x<=c.x||l.y<=c.y)return!1;var f=Math.sign(t.a*t.d-t.b*t.c);if(f===0||(t.apply(c,c),t.apply(l,l),t.apply(u,u),t.apply(d,d),Math.max(c.x,l.x,u.x,d.x)<=i||Math.min(c.x,l.x,u.x,d.x)>=a||Math.max(c.y,l.y,u.y,d.y)<=o||Math.min(c.y,l.y,u.y,d.y)>=s))return!1;var p=f*(l.y-c.y),m=f*(c.x-l.x),h=p*i+m*o,g=p*a+m*o,_=p*i+m*s,v=p*a+m*s;if(Math.max(h,g,_,v)<=p*c.x+m*c.y||Math.min(h,g,_,v)>=p*d.x+m*d.y)return!1;var y=f*(c.y-u.y),b=f*(u.x-c.x),x=y*i+b*o,S=y*a+b*o,C=y*i+b*s,w=y*a+b*s;return!(Math.max(x,S,C,w)<=y*c.x+b*c.y||Math.min(x,S,C,w)>=y*d.x+b*d.y)},e.prototype.pad=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this},e.prototype.fit=function(e){var t=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),r=Math.max(this.y,e.y),i=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(n-t,0),this.y=r,this.height=Math.max(i-r,0),this},e.prototype.ceil=function(e,t){e===void 0&&(e=1),t===void 0&&(t=.001);var n=Math.ceil((this.x+this.width-t)*e)/e,r=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=n-this.x,this.height=r-this.y,this},e.prototype.enlarge=function(e){var t=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),r=Math.min(this.y,e.y),i=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=n-t,this.y=r,this.height=i-r,this},e.prototype.toString=function(){return`[@pixi/math:Rectangle x=`+this.x+` y=`+this.y+` width=`+this.width+` height=`+this.height+`]`},e}();(function(){function e(e,t,n){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),this.x=e,this.y=t,this.radius=n,this.type=an.CIRC}return e.prototype.clone=function(){return new e(this.x,this.y,this.radius)},e.prototype.contains=function(e,t){if(this.radius<=0)return!1;var n=this.radius*this.radius,r=this.x-e,i=this.y-t;return r*=r,i*=i,r+i<=n},e.prototype.getBounds=function(){return new K(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)},e.prototype.toString=function(){return`[@pixi/math:Circle x=`+this.x+` y=`+this.y+` radius=`+this.radius+`]`},e})(),function(){function e(e,t,n,r){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),this.x=e,this.y=t,this.width=n,this.height=r,this.type=an.ELIP}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var n=(e-this.x)/this.width,r=(t-this.y)/this.height;return n*=n,r*=r,n+r<=1},e.prototype.getBounds=function(){return new K(this.x-this.width,this.y-this.height,this.width,this.height)},e.prototype.toString=function(){return`[@pixi/math:Ellipse x=`+this.x+` y=`+this.y+` width=`+this.width+` height=`+this.height+`]`},e}(),function(){function e(){for(var e=arguments,t=[],n=0;nt!=l>t&&e<(c-o)*((t-s)/(l-s))+o&&(n=!n)}return n},e.prototype.toString=function(){return`[@pixi/math:Polygon`+(`closeStroke=`+this.closeStroke)+(`points=`+this.points.reduce(function(e,t){return e+`, `+t},``)+`]`)},e}(),function(){function e(e,t,n,r,i){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=20),this.x=e,this.y=t,this.width=n,this.height=r,this.radius=i,this.type=an.RREC}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height,this.radius)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){var n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+n&&t<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;var r=e-(this.x+n),i=t-(this.y+n),a=n*n;if(r*r+i*i<=a||(r=e-(this.x+this.width-n),r*r+i*i<=a)||(i=t-(this.y+this.height-n),r*r+i*i<=a)||(r=e-(this.x+n),r*r+i*i<=a))return!0}return!1},e.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=`+this.x+` y=`+this.y+(`width=`+this.width+` height=`+this.height+` radius=`+this.radius+`]`)},e}();var cn=function(){function e(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0),this._x=n,this._y=r,this.cb=e,this.scope=t}return e.prototype.clone=function(t,n){return t===void 0&&(t=this.cb),n===void 0&&(n=this.scope),new e(t,n,this._x,this._y)},e.prototype.set=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this},e.prototype.copyFrom=function(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},e.prototype.copyTo=function(e){return e.set(this._x,this._y),e},e.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},e.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=`+this.scope+`]`},Object.defineProperty(e.prototype,`x`,{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`y`,{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),e}(),ln=function(){function e(e,t,n,r,i,a){e===void 0&&(e=1),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=1),i===void 0&&(i=0),a===void 0&&(a=0),this.array=null,this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=a}return e.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},e.prototype.set=function(e,t,n,r,i,a){return this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=a,this},e.prototype.toArray=function(e,t){this.array||=new Float32Array(9);var n=t||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},e.prototype.apply=function(e,t){t||=new on;var n=e.x,r=e.y;return t.x=this.a*n+this.c*r+this.tx,t.y=this.b*n+this.d*r+this.ty,t},e.prototype.applyInverse=function(e,t){t||=new on;var n=1/(this.a*this.d+this.c*-this.b),r=e.x,i=e.y;return t.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,t.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,t},e.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},e.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},e.prototype.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this.a,i=this.c,a=this.tx;return this.a=r*t-this.b*n,this.b=r*n+this.b*t,this.c=i*t-this.d*n,this.d=i*n+this.d*t,this.tx=a*t-this.ty*n,this.ty=a*n+this.ty*t,this},e.prototype.append=function(e){var t=this.a,n=this.b,r=this.c,i=this.d;return this.a=e.a*t+e.b*r,this.b=e.a*n+e.b*i,this.c=e.c*t+e.d*r,this.d=e.c*n+e.d*i,this.tx=e.tx*t+e.ty*r+this.tx,this.ty=e.tx*n+e.ty*i+this.ty,this},e.prototype.setTransform=function(e,t,n,r,i,a,o,s,c){return this.a=Math.cos(o+c)*i,this.b=Math.sin(o+c)*i,this.c=-Math.sin(o-s)*a,this.d=Math.cos(o-s)*a,this.tx=e-(n*this.a+r*this.c),this.ty=t-(n*this.b+r*this.d),this},e.prototype.prepend=function(e){var t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){var n=this.a,r=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this},e.prototype.decompose=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=e.pivot,o=-Math.atan2(-r,i),s=Math.atan2(n,t),c=Math.abs(o+s);return c<1e-5||Math.abs(tn-c)<1e-5?(e.rotation=s,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=s),e.scale.x=Math.sqrt(t*t+n*n),e.scale.y=Math.sqrt(r*r+i*i),e.position.x=this.tx+(a.x*t+a.y*r),e.position.y=this.ty+(a.x*n+a.y*i),e},e.prototype.invert=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.tx,a=e*r-t*n;return this.a=r/a,this.b=-t/a,this.c=-n/a,this.d=e/a,this.tx=(n*this.ty-r*i)/a,this.ty=-(e*this.ty-t*i)/a,this},e.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},e.prototype.clone=function(){var t=new e;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},e.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},e.prototype.toString=function(){return`[@pixi/math:Matrix a=`+this.a+` b=`+this.b+` c=`+this.c+` d=`+this.d+` tx=`+this.tx+` ty=`+this.ty+`]`},Object.defineProperty(e,`IDENTITY`,{get:function(){return new e},enumerable:!1,configurable:!0}),Object.defineProperty(e,`TEMP_MATRIX`,{get:function(){return new e},enumerable:!1,configurable:!0}),e}(),un=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],dn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],fn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],pn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],mn=[],hn=[],gn=Math.sign;function _n(){for(var e=0;e<16;e++){var t=[];mn.push(t);for(var n=0;n<16;n++)for(var r=gn(un[e]*un[n]+fn[e]*dn[n]),i=gn(dn[e]*un[n]+pn[e]*dn[n]),a=gn(un[e]*fn[n]+fn[e]*pn[n]),o=gn(dn[e]*fn[n]+pn[e]*pn[n]),s=0;s<16;s++)if(un[s]===r&&dn[s]===i&&fn[s]===a&&pn[s]===o){t.push(s);break}}for(var e=0;e<16;e++){var c=new ln;c.set(un[e],dn[e],fn[e],pn[e],0,0),hn.push(c)}}_n();var q={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(e){return un[e]},uY:function(e){return dn[e]},vX:function(e){return fn[e]},vY:function(e){return pn[e]},inv:function(e){return e&8?e&15:-e&7},add:function(e,t){return mn[e][t]},sub:function(e,t){return mn[e][q.inv(t)]},rotate180:function(e){return e^4},isVertical:function(e){return(e&3)==2},byDirection:function(e,t){return Math.abs(e)*2<=Math.abs(t)?t>=0?q.S:q.N:Math.abs(t)*2<=Math.abs(e)?e>0?q.E:q.W:t>0?e>0?q.SE:q.SW:e>0?q.NE:q.NW},matrixAppendRotationInv:function(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=hn[q.inv(t)];i.tx=n,i.ty=r,e.append(i)}},vn=function(){function e(){this.worldTransform=new ln,this.localTransform=new ln,this.position=new cn(this.onChange,this,0,0),this.scale=new cn(this.onChange,this,1,1),this.pivot=new cn(this.onChange,this,0,0),this.skew=new cn(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},e.prototype.toString=function(){return`[@pixi/math:Transform `+(`position=(`+this.position.x+`, `+this.position.y+`) `)+(`rotation=`+this.rotation+` `)+(`scale=(`+this.scale.x+`, `+this.scale.y+`) `)+(`skew=(`+this.skew.x+`, `+this.skew.y+`) `)+`]`},e.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(e){var t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}},e.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},Object.defineProperty(e.prototype,`rotation`,{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())},enumerable:!1,configurable:!0}),e.IDENTITY=new e,e}();G.PREFER_ENV=it.any?Ce.WEBGL:Ce.WEBGL2,G.STRICT_TEXTURE_CACHE=!1;var yn=[];function bn(e,t){if(!e)return null;var n=``;if(typeof e==`string`){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);r&&(n=r[1].toLowerCase())}for(var i=yn.length-1;i>=0;--i){var a=yn[i];if(a.test&&a.test(e,n))return new a(e,t)}throw Error(`Unrecognized source type to auto-detect Resource`)}var xn=function(e,t){return xn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},xn(e,t)};function J(e,t){xn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Sn=function(){return Sn=Object.assign||function(e){for(var t=arguments,n,r=1,i=arguments.length;r0&&l>0,r.textureCacheIds=[],r.destroyed=!1,r.resource=null,r._batchEnabled=0,r._batchLocation=0,r.parentTextureArray=null,r.setResource(t),r}return Object.defineProperty(t.prototype,`realWidth`,{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`realHeight`,{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`mipmap`,{get:function(){return this._mipmap},set:function(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scaleMode`,{get:function(){return this._scaleMode},set:function(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`wrapMode`,{get:function(){return this._wrapMode},set:function(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(e,t){var n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this},t.prototype.setSize=function(e,t,n){return n||=this.resolution,this.setRealSize(e*n,t*n,n)},t.prototype.setRealSize=function(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this},t.prototype._refreshPOT=function(){this.isPowerOfTwo=Nt(this.realWidth)&&Nt(this.realHeight)},t.prototype.setResolution=function(e){var t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit(`update`,this)),this._refreshPOT(),this)},t.prototype.setResource=function(e){if(this.resource===e)return this;if(this.resource)throw Error(`Resource can be set only once`);return e.bind(this),this.resource=e,this},t.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit(`update`,this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit(`loaded`,this),this.emit(`update`,this))},t.prototype.onError=function(e){this.emit(`error`,this,e)},t.prototype.destroy=function(){this.resource&&=(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),null),this.cacheId&&=(delete Ht[this.cacheId],delete Vt[this.cacheId],null),this.dispose(),t.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},t.prototype.dispose=function(){this.emit(`dispose`,this)},t.prototype.castToBaseTexture=function(){return this},t.from=function(e,n,r){r===void 0&&(r=G.STRICT_TEXTURE_CACHE);var i=typeof e==`string`,a=null;i?a=e:(e._pixiId||=(n&&n.pixiIdPrefix||`pixiid`)+`_`+Lt(),a=e._pixiId);var o=Ht[a];if(i&&r&&!o)throw Error(`The cacheId "`+a+`" does not exist in BaseTextureCache.`);return o||(o=new t(e,n),o.cacheId=a,t.addToCache(o,a)),o},t.fromBuffer=function(e,n,r,i){e||=new Float32Array(n*r*4);var a=new Tn(e,{width:n,height:r}),o=e instanceof Float32Array?U.FLOAT:U.UNSIGNED_BYTE;return new t(a,Object.assign({},En,i||{width:n,height:r,type:o}))},t.addToCache=function(e,t){t&&(e.textureCacheIds.indexOf(t)===-1&&e.textureCacheIds.push(t),Ht[t]&&console.warn(`BaseTexture added to the cache with an id [`+t+`] that already had an entry`),Ht[t]=e)},t.removeFromCache=function(e){if(typeof e==`string`){var t=Ht[e];if(t){var n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Ht[e],t}}else if(e&&e.textureCacheIds){for(var r=0;r0)if(e.resource)this.addResourceAt(e.resource,t);else throw Error(`CubeResource does not support copying of renderTexture.`);else e.target=De.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this},t.prototype.upload=function(e,n,r){for(var i=this.itemDirtyIds,a=0;a)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(An),Fn=function(e){J(t,e);function t(n,r){var i=this;if(r||={},!(n instanceof HTMLVideoElement)){var a=document.createElement(`video`);a.setAttribute(`preload`,`auto`),a.setAttribute(`webkit-playsinline`,``),a.setAttribute(`playsinline`,``),typeof n==`string`&&(n=[n]);var o=n[0].src||n[0];An.crossOrigin(a,o,r.crossorigin);for(var s=0;s2},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&($t.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&=($t.shared.remove(this.update,this),!1)},t.prototype._onCanPlay=function(){var e=this.source;e.removeEventListener(`canplay`,this._onCanPlay),e.removeEventListener(`canplaythrough`,this._onCanPlay);var t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&=($t.shared.remove(this.update,this),!1);var t=this.source;t&&(t.removeEventListener(`error`,this._onError,!0),t.pause(),t.src=``,t.load()),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,`autoUpdate`,{get:function(){return this._autoUpdate},set:function(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?($t.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&($t.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`updateFPS`,{get:function(){return this._updateFPS},set:function(e){e!==this._updateFPS&&(this._updateFPS=e)},enumerable:!1,configurable:!0}),t.test=function(e,n){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||t.TYPES.indexOf(n)>-1},t.TYPES=[`mp4`,`m4v`,`webm`,`ogg`,`ogv`,`h264`,`avi`,`mov`],t.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`},t}(An),In=function(e){J(t,e);function t(t){return e.call(this,t)||this}return t.test=function(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<`u`&&e instanceof ImageBitmap},t}(An);yn.push(Nn,In,jn,Fn,Pn,Tn,Mn,kn);var Ln={__proto__:null,Resource:wn,BaseImageResource:An,INSTALLED:yn,autoDetectResource:bn,AbstractMultiResource:On,ArrayResource:kn,BufferResource:Tn,CanvasResource:jn,CubeResource:Mn,ImageResource:Nn,SVGResource:Pn,VideoResource:Fn,ImageBitmapResource:In},Rn=function(e){J(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.upload=function(e,t,n){var r=e.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Me.UNPACK);var i=t.realWidth,a=t.realHeight;return n.width===i&&n.height===a?r.texSubImage2D(t.target,0,0,0,i,a,t.format,n.type,this.data):(n.width=i,n.height=a,r.texImage2D(t.target,0,n.internalFormat,i,a,0,t.format,n.type,this.data)),!0},t}(Tn),zn=function(){function e(e,t){this.width=Math.round(e||100),this.height=Math.round(t||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Xt(`disposeFramebuffer`),this.multisample=W.NONE}return Object.defineProperty(e.prototype,`colorTexture`,{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(e,t){return e===void 0&&(e=0),this.colorTextures[e]=t||new Dn(null,{scaleMode:ke.NEAREST,resolution:1,mipmap:je.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(e){return this.depthTexture=e||new Dn(new Rn(null,{width:this.width,height:this.height}),{scaleMode:ke.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:je.OFF,format:H.DEPTH_COMPONENT,type:U.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(e,t){if(e=Math.round(e),t=Math.round(t),!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&t.textureCacheIds.splice(n,1),delete Vt[e],t}}else if(e&&e.textureCacheIds){for(var r=0;rthis.baseTexture.width,o=n+i>this.baseTexture.height;if(a||o){var s=a&&o?`and`:`or`,c=`X: `+t+` + `+r+` = `+(t+r)+` > `+this.baseTexture.width,l=`Y: `+n+` + `+i+` = `+(n+i)+` > `+this.baseTexture.height;throw Error(`Texture Error: frame does not fit inside the base Texture dimensions: `+(c+` `+s+` `+l))}this.valid=r&&i&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`rotate`,{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`width`,{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),t.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(t,`EMPTY`,{get:function(){return t._EMPTY||(t._EMPTY=new t(new Dn),Un(t._EMPTY),Un(t._EMPTY.baseTexture)),t._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(t,`WHITE`,{get:function(){if(!t._WHITE){var e=G.ADAPTER.createCanvas(16,16),n=e.getContext(`2d`);e.width=16,e.height=16,n.fillStyle=`white`,n.fillRect(0,0,16,16),t._WHITE=new t(Dn.from(e)),Un(t._WHITE),Un(t._WHITE.baseTexture)}return t._WHITE},enumerable:!1,configurable:!0}),t}(_t.default),Gn=function(e){J(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.valid=!0,r.filterFrame=null,r.filterPoolKey=null,r.updateUvs(),r}return Object.defineProperty(t.prototype,`framebuffer`,{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`multisample`,{get:function(){return this.framebuffer.multisample},set:function(e){this.framebuffer.multisample=e},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t,n){n===void 0&&(n=!0);var r=this.baseTexture.resolution,i=Math.round(e*r)/r,a=Math.round(t*r)/r;this.valid=i>0&&a>0,this._frame.width=this.orig.width=i,this._frame.height=this.orig.height=a,n&&this.baseTexture.resize(i,a),this.updateUvs()},t.prototype.setResolution=function(e){var t=this.baseTexture;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))},t.create=function(e){for(var n=arguments,r=[],i=1;i>>0,r>1&&(i+=r*4294967296)):i=r>1?-r:-1,this.texturePool[i]||(this.texturePool[i]=[]);var a=this.texturePool[i].pop();return a||=this.createTexture(e,t,r),a.filterPoolKey=i,a.setResolution(n),a},e.prototype.getFilterTexture=function(e,t,n){var r=this.getOptimalTexture(e.width,e.height,t||e.resolution,n||W.NONE);return r.filterFrame=e.filterFrame,r},e.prototype.returnTexture=function(e){var t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)},e.prototype.returnFilterTexture=function(e){this.returnTexture(e)},e.prototype.clear=function(e){if(e=e!==!1,e)for(var t in this.texturePool){var n=this.texturePool[t];if(n)for(var r=0;r0&&e.height>0,this.texturePool)if(Number(t)<0){var n=this.texturePool[t];if(n)for(var r=0;r1){for(var l=0;l1&&(u=this.getOptimalFilterTexture(l.width,l.height,t.resolution),u.filterFrame=l.filterFrame),n[d].apply(this,l,u,Ne.CLEAR,t);var f=l;l=u,u=f}n[d].apply(this,l,c.renderTexture,Ne.BLEND,t),d>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(l),this.returnFilterTexture(u)}t.clear(),this.statePool.push(t)},e.prototype.bindAndClear=function(e,t){t===void 0&&(t=Ne.CLEAR);var n=this.renderer,r=n.renderTexture,i=n.state;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e&&e.filterFrame){var a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,r.bind(e,e.filterFrame,a)}else e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame):r.bind(e);var o=i.stateId&1||this.forceClear;(t===Ne.CLEAR||t===Ne.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)},e.prototype.applyFilter=function(e,t,n,r){var i=this.renderer;i.state.set(e.state),this.bindAndClear(n,r),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,i.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),i.geometry.bind(this.quadUv),i.geometry.draw(Ee.TRIANGLES)):(i.geometry.bind(this.quad),i.geometry.draw(Ee.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(e,t){var n=this.activeState,r=n.sourceFrame,i=n.destinationFrame,a=t._texture.orig,o=e.set(i.width,0,0,i.height,r.x,r.y),s=t.worldTransform.copyTo(ln.TEMP_MATRIX);return s.invert(),o.prepend(s),o.scale(1/a.width,1/a.height),o.translate(t.anchor.x,t.anchor.y),o},e.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(e,t,n,r){return n===void 0&&(n=1),r===void 0&&(r=W.NONE),this.texturePool.getOptimalTexture(e,t,n,r)},e.prototype.getFilterTexture=function(e,t,n){if(typeof e==`number`){var r=e;e=t,t=r}e||=this.activeState.renderTexture;var i=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,n||W.NONE);return i.filterFrame=e.filterFrame,i},e.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e.prototype.transformAABB=function(e,t){var n=sr[0],r=sr[1],i=sr[2],a=sr[3];n.set(t.left,t.top),r.set(t.left,t.bottom),i.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(n,n),e.apply(r,r),e.apply(i,i),e.apply(a,a);var o=Math.min(n.x,r.x,i.x,a.x),s=Math.min(n.y,r.y,i.y,a.y),c=Math.max(n.x,r.x,i.x,a.x),l=Math.max(n.y,r.y,i.y,a.y);t.x=o,t.y=s,t.width=c-o,t.height=l-s},e.prototype.roundFrame=function(e,t,n,r,i){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(i){var a=i.a,o=i.b,s=i.c,c=i.d;if((Math.abs(o)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(c)>1e-4))return}i=i?cr.copyFrom(i):cr.identity(),i.translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.transformAABB(i,e),e.ceil(t),this.transformAABB(i.invert(),e)}},e}(),ur=function(){function e(e){this.renderer=e}return e.prototype.flush=function(){},e.prototype.destroy=function(){this.renderer=null},e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.render=function(e){},e}(),dr=function(){function e(e){this.renderer=e,this.emptyRenderer=new ur(e),this.currentRenderer=this.emptyRenderer}return e.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(e,t){for(var n=this.renderer.texture.boundTextures,r=t-1;r>=0;--r)e[r]=n[r]||null,e[r]&&(e[r]._batchLocation=r)},e.prototype.boundArray=function(e,t,n,r){for(var i=e.elements,a=e.ids,o=e.count,s=0,c=0;c=0&&u=Ce.WEBGL2&&(n=e.getContext(`webgl2`,t)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext(`webgl`,t)||e.getContext(`experimental-webgl`,t),!n)throw Error(`This browser does not support WebGL. Try using the canvas renderer`);return this.gl=n,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var e=this.gl,t={loseContext:e.getExtension(`WEBGL_lose_context`),anisotropicFiltering:e.getExtension(`EXT_texture_filter_anisotropic`),floatTextureLinear:e.getExtension(`OES_texture_float_linear`),s3tc:e.getExtension(`WEBGL_compressed_texture_s3tc`),s3tc_sRGB:e.getExtension(`WEBGL_compressed_texture_s3tc_srgb`),etc:e.getExtension(`WEBGL_compressed_texture_etc`),etc1:e.getExtension(`WEBGL_compressed_texture_etc1`),pvrtc:e.getExtension(`WEBGL_compressed_texture_pvrtc`)||e.getExtension(`WEBKIT_WEBGL_compressed_texture_pvrtc`),atc:e.getExtension(`WEBGL_compressed_texture_atc`),astc:e.getExtension(`WEBGL_compressed_texture_astc`)};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension(`WEBGL_draw_buffers`),depthTexture:e.getExtension(`WEBGL_depth_texture`),vertexArrayObject:e.getExtension(`OES_vertex_array_object`)||e.getExtension(`MOZ_OES_vertex_array_object`)||e.getExtension(`WEBKIT_OES_vertex_array_object`),uint32ElementIndex:e.getExtension(`OES_element_index_uint`),floatTexture:e.getExtension(`OES_texture_float`),floatTextureLinear:e.getExtension(`OES_texture_float_linear`),textureHalfFloat:e.getExtension(`OES_texture_half_float`),textureHalfFloatLinear:e.getExtension(`OES_texture_half_float_linear`)}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension(`EXT_color_buffer_float`)})},e.prototype.handleContextLost=function(e){var t=this;e.preventDefault(),setTimeout(function(){t.gl.isContextLost()&&t.extensions.loseContext&&t.extensions.loseContext.restoreContext()},0)},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener(`webglcontextlost`,this.handleContextLost),e.removeEventListener(`webglcontextrestored`,this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(e){var t=e.getContextAttributes(),n=`WebGL2RenderingContext`in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),t&&!t.stencil&&console.warn(`Provided WebGL context does not have a stencil buffer, masks may not render correctly`);var r=n||!!e.getExtension(`OES_element_index_uint`);this.supports.uint32Indices=r,r||console.warn(`Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly`)},e}(),mr=function(){function e(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=W.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return e}(),hr=new K,gr=function(){function e(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new zn(10,10),this.msaaSamples=null}return e.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new K,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var t=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;G.PREFER_ENV===Ce.WEBGL_LEGACY&&(t=null,n=null),t?e.drawBuffers=function(e){return t.drawBuffersWEBGL(e)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},e.prototype.bind=function(e,t,n){n===void 0&&(n=0);var r=this.gl;if(e){var i=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,i.mipLevel=n),i.dirtyId!==e.dirtyId&&(i.dirtyId=e.dirtyId,i.dirtyFormat===e.dirtyFormat?i.dirtySize!==e.dirtySize&&(i.dirtySize=e.dirtySize,this.resizeFramebuffer(e)):(i.dirtyFormat=e.dirtyFormat,i.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)));for(var a=0;a>n,c=t.height>>n,l=s/t.width;this.setViewport(t.x*l,t.y*l,s,c)}else{var s=e.width>>n,c=e.height>>n;this.setViewport(0,0,s,c)}}else this.current&&(this.current=null,r.bindFramebuffer(r.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(e,t,n,r){var i=this.viewport;e=Math.round(e),t=Math.round(t),n=Math.round(n),r=Math.round(r),(i.width!==n||i.height!==r||i.x!==e||i.y!==t)&&(i.x=e,i.y=t,i.width=n,i.height=r,this.gl.viewport(e,t,n,r))},Object.defineProperty(e.prototype,`size`,{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),e.prototype.clear=function(e,t,n,r,i){i===void 0&&(i=Te.COLOR|Te.DEPTH);var a=this.gl;a.clearColor(e,t,n,r),a.clear(i)},e.prototype.initFramebuffer=function(e){var t=this.gl,n=new mr(t.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n},e.prototype.resizeFramebuffer=function(e){var t=this.gl,n=e.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,n.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.RGBA8,e.width,e.height)),n.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,n.stencil),n.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.DEPTH24_STENCIL8,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height));var r=e.colorTextures,i=r.length;t.drawBuffers||(i=Math.min(i,1));for(var a=0;a1&&this.canMultisampleFramebuffer(e)?(r.msaaBuffer=r.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.RGBA8,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,r.msaaBuffer)):r.msaaBuffer&&(n.deleteRenderbuffer(r.msaaBuffer),r.msaaBuffer=null,r.blitFramebuffer&&=(r.blitFramebuffer.dispose(),null));for(var o=[],s=0;s1&&n.drawBuffers(o),e.depthTexture&&this.writeDepthTexture){var u=e.depthTexture;this.renderer.texture.bind(u,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,u._glTextures[this.CONTEXT_UID].texture,t)}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(r.stencil=r.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,r.stencil)):r.stencil&&=(n.deleteRenderbuffer(r.stencil),null)},e.prototype.canMultisampleFramebuffer=function(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture},e.prototype.detectSamples=function(e){var t=this.msaaSamples,n=W.NONE;if(e<=1||t===null)return n;for(var r=0;r=0&&this.managedFramebuffers.splice(i,1),e.disposeRunner.remove(this),t||(r.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&r.deleteRenderbuffer(n.msaaBuffer),n.stencil&&r.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},e.prototype.disposeAll=function(e){var t=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=Ce.WEBGL2&&(t=e.getContext(`webgl2`,{})),t||(t=e.getContext(`webgl`,{})||e.getContext(`experimental-webgl`,{}),t?t.getExtension(`WEBGL_draw_buffers`):t=null),Er=t}return Er}var Or;function kr(){if(!Or){Or=Fe.MEDIUM;var e=Dr();e&&e.getShaderPrecisionFormat&&(Or=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?Fe.HIGH:Fe.MEDIUM)}return Or}function Ar(e,t,n){if(e.substring(0,9)!==`precision`){var r=t;return t===Fe.HIGH&&n!==Fe.HIGH&&(r=Fe.MEDIUM),`precision `+r+` float; +`+e}else if(n!==Fe.HIGH&&e.substring(0,15)===`precision highp`)return e.replace(`precision highp`,`precision mediump`);return e}var jr={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Mr(e){return jr[e]}var Nr=null,Pr={FLOAT:`float`,FLOAT_VEC2:`vec2`,FLOAT_VEC3:`vec3`,FLOAT_VEC4:`vec4`,INT:`int`,INT_VEC2:`ivec2`,INT_VEC3:`ivec3`,INT_VEC4:`ivec4`,UNSIGNED_INT:`uint`,UNSIGNED_INT_VEC2:`uvec2`,UNSIGNED_INT_VEC3:`uvec3`,UNSIGNED_INT_VEC4:`uvec4`,BOOL:`bool`,BOOL_VEC2:`bvec2`,BOOL_VEC3:`bvec3`,BOOL_VEC4:`bvec4`,FLOAT_MAT2:`mat2`,FLOAT_MAT3:`mat3`,FLOAT_MAT4:`mat4`,SAMPLER_2D:`sampler2D`,INT_SAMPLER_2D:`sampler2D`,UNSIGNED_INT_SAMPLER_2D:`sampler2D`,SAMPLER_CUBE:`samplerCube`,INT_SAMPLER_CUBE:`samplerCube`,UNSIGNED_INT_SAMPLER_CUBE:`samplerCube`,SAMPLER_2D_ARRAY:`sampler2DArray`,INT_SAMPLER_2D_ARRAY:`sampler2DArray`,UNSIGNED_INT_SAMPLER_2D_ARRAY:`sampler2DArray`};function Fr(e,t){if(!Nr){var n=Object.keys(Pr);Nr={};for(var r=0;r0&&(t+=` +else `),n0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==t&&this.renderer.gl.colorMask((n&1)!=0,(n&2)!=0,(n&4)!=0,(n&8)!=0)},e.prototype.destroy=function(){this.renderer=null},e}(),pi=function(){function e(e){this.renderer=e,this.maskStack=[],this.glConst=0}return e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(e){var t=this.renderer.gl,n=this.getStackLength();this.maskStack=e;var r=this.getStackLength();r!==n&&(r===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){this.renderer=null,this.maskStack=null},e}(),mi=new ln,hi=[],gi=function(e){J(t,e);function t(t){var n=e.call(this,t)||this;return n.glConst=G.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,n}return t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0},t.prototype.calcScissorRect=function(e){if(!e._scissorRectLocal){var t=e._scissorRect,n=e.maskObject,r=this.renderer,i=r.renderTexture,a=n.getBounds(!0,hi.pop()??new K);this.roundFrameToPixels(a,i.current?i.current.resolution:r.resolution,i.sourceFrame,i.destinationFrame,r.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}},t.isMatrixRotated=function(e){if(!e)return!1;var t=e.a,n=e.b,r=e.c,i=e.d;return(Math.abs(n)>1e-4||Math.abs(r)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)},t.prototype.testScissor=function(e){var n=e.maskObject;if(!n.isFastRect||!n.isFastRect()||t.isMatrixRotated(n.worldTransform)||t.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);var r=e._scissorRectLocal;return r.width>0&&r.height>0},t.prototype.roundFrameToPixels=function(e,n,r,i,a){t.isMatrixRotated(a)||(a=a?mi.copyFrom(a):mi.identity(),a.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.renderer.filter.transformAABB(a,e),e.fit(i),e.x=Math.round(e.x*n),e.y=Math.round(e.y*n),e.width=Math.round(e.width*n),e.height=Math.round(e.height*n))},t.prototype.push=function(e){e._scissorRectLocal||this.calcScissorRect(e);var t=this.renderer.gl;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;e&&hi.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)},t.prototype._useCurrent=function(){var e=this.maskStack[this.maskStack.length-1]._scissorRect,t=this.renderer.renderTexture.current?e.y:this.renderer.height-e.height-e.y;this.renderer.gl.scissor(e.x,t,e.width,e.height)},t}(pi),_i=function(e){J(t,e);function t(t){var n=e.call(this,t)||this;return n.glConst=G.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,n}return t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0},t.prototype.push=function(e){var t=e.maskObject,n=this.renderer.gl,r=e._stencilCounter;r===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),e._stencilCounter++;var i=e._colorMask;i!==0&&(e._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,r,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(e._colorMask=i,n.colorMask((i&1)!=0,(i&2)!=0,(i&4)!=0,(i&8)!=0)),this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{var n=this.maskStack.length===0?null:this.maskStack[this.maskStack.length-1],r=n?n._colorMask:15;r!==0&&(n._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,r!==0&&(n._colorMask=r,t.colorMask((r&1)!=0,(r&2)!=0,(r&4)!=0,(r&8)!=0)),this._useCurrent()}},t.prototype._useCurrent=function(){var e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},t}(pi),vi=function(){function e(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new ln,this.transform=null}return e.prototype.update=function(e,t,n,r){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,r),this.transform&&this.projectionMatrix.append(this.transform);var i=this.renderer;i.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,i.globalUniforms.update(),i.shader.shader&&i.shader.syncUniformGroup(i.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(e,t,n,r){var i=this.projectionMatrix,a=r?-1:1;i.identity(),i.a=1/t.width*2,i.d=a*(1/t.height*2),i.tx=-1-t.x*i.a,i.ty=-a-t.y*i.d},e.prototype.setTransform=function(e){},e.prototype.destroy=function(){this.renderer=null},e}(),yi=new K,bi=new K,xi=function(){function e(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new K,this.destinationFrame=new K,this.viewportFrame=new K}return e.prototype.bind=function(e,t,n){e===void 0&&(e=null);var r=this.renderer;this.current=e;var i,a,o;e?(i=e.baseTexture,o=i.resolution,t||=(yi.width=e.frame.width,yi.height=e.frame.height,yi),n||=(bi.x=e.frame.x,bi.y=e.frame.y,bi.width=t.width,bi.height=t.height,bi),a=i.framebuffer):(o=r.resolution,t||=(yi.width=r.screen.width,yi.height=r.screen.height,yi),n||(n=yi,n.width=t.width,n.height=t.height));var s=this.viewportFrame;s.x=n.x*o,s.y=n.y*o,s.width=n.width*o,s.height=n.height*o,e||(s.y=r.view.height-(s.y+s.height)),s.ceil(),this.renderer.framebuffer.bind(a,s),this.renderer.projection.update(n,t,o,!a),e?this.renderer.mask.setMaskStack(i.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(n)},e.prototype.clear=function(e,t){this.current?e||=this.current.baseTexture.clearColor:e||=this.clearColor;var n=this.destinationFrame,r=this.current?this.current.baseTexture:this.renderer.screen,i=n.width!==r.width||n.height!==r.height;if(i){var a=this.viewportFrame,o=a.x,s=a.y,c=a.width,l=a.height;o=Math.round(o),s=Math.round(s),c=Math.round(c),l=Math.round(l),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(o,s,c,l)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],t),i&&this.renderer.scissor.pop()},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e.prototype.destroy=function(){this.renderer=null},e}();function Si(e,t,n,r,i){n.buffer.update(i)}var Ci={float:` + data[offset] = v; + `,vec2:` + data[offset] = v[0]; + data[offset+1] = v[1]; + `,vec3:` + data[offset] = v[0]; + data[offset+1] = v[1]; + data[offset+2] = v[2]; + + `,vec4:` + data[offset] = v[0]; + data[offset+1] = v[1]; + data[offset+2] = v[2]; + data[offset+3] = v[3]; + `,mat2:` + data[offset] = v[0]; + data[offset+1] = v[1]; + + data[offset+4] = v[2]; + data[offset+5] = v[3]; + `,mat3:` + data[offset] = v[0]; + data[offset+1] = v[1]; + data[offset+2] = v[2]; + + data[offset + 4] = v[3]; + data[offset + 5] = v[4]; + data[offset + 6] = v[5]; + + data[offset + 8] = v[6]; + data[offset + 9] = v[7]; + data[offset + 10] = v[8]; + `,mat4:` + for(var i = 0; i < 16; i++) + { + data[offset + i] = v[i]; + } + `},wi={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function Ti(e){for(var t=e.map(function(e){return{data:e,offset:0,dataLen:0,dirty:0}}),n=0,r=0,i=0,a=0;a1&&(n=Math.max(n,16)*o.data.size),o.dataLen=n,r%n!==0&&r<16){var s=r%n%16;r+=s,i+=s}r+n>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=n,r=n):(o.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function Ei(e,t){var n=[];for(var r in e)t[r]&&n.push(t[r]);return n.sort(function(e,t){return e.index-t.index}),n}function Di(e,t){if(!e.autoManage)return{size:0,syncFunc:Si};for(var n=Ti(Ei(e.uniforms,t)),r=n.uboElements,i=n.size,a=[` + var v = null; + var v2 = null; + var cv = null; + var t = 0; + var gl = renderer.gl + var index = 0; + var data = buffer.data; + `],o=0;o1){var p=Mr(s.data.type),m=Math.max(wi[s.data.type]/16,1),h=p/m,g=(4-h%4)%4;a.push(` + cv = ud.`+l+`.value; + v = uv.`+l+`; + offset = `+s.offset/4+`; + + t = 0; + + for(var i=0; i < `+s.data.size*m+`; i++) + { + for(var j = 0; j < `+h+`; j++) + { + data[offset++] = v[t++]; + } + offset += `+g+`; + } + + `)}else{var _=Ci[s.data.type];a.push(` + cv = ud.`+l+`.value; + v = uv.`+l+`; + offset = `+s.offset/4+`; + `+_+`; + `)}}return a.push(` + renderer.buffer.update(buffer); + `),{size:i,syncFunc:Function(`ud`,`uv`,`renderer`,`syncData`,`buffer`,a.join(` +`))}}(function(){function e(){}return e})();var Oi=function(){function e(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return e.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},e}();function ki(e,t){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;it?1:-1});for(var o=0;o>=1,n++;this.stateId=e.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var e=this.renderer.texture,t=e.managedTextures,n=!1,r=0;rthis.maxIdle&&(e.destroyTexture(i,!0),t[r]=null,n=!0)}if(n){for(var a=0,r=0;r=0;r--)this.unload(e.children[r])},e.prototype.destroy=function(){this.renderer=null},e}();function Wi(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S;return`WebGL2RenderingContext`in globalThis&&e instanceof globalThis.WebGL2RenderingContext?(t={},t[U.UNSIGNED_BYTE]=(n={},n[H.RGBA]=e.RGBA8,n[H.RGB]=e.RGB8,n[H.RG]=e.RG8,n[H.RED]=e.R8,n[H.RGBA_INTEGER]=e.RGBA8UI,n[H.RGB_INTEGER]=e.RGB8UI,n[H.RG_INTEGER]=e.RG8UI,n[H.RED_INTEGER]=e.R8UI,n[H.ALPHA]=e.ALPHA,n[H.LUMINANCE]=e.LUMINANCE,n[H.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,n),t[U.BYTE]=(r={},r[H.RGBA]=e.RGBA8_SNORM,r[H.RGB]=e.RGB8_SNORM,r[H.RG]=e.RG8_SNORM,r[H.RED]=e.R8_SNORM,r[H.RGBA_INTEGER]=e.RGBA8I,r[H.RGB_INTEGER]=e.RGB8I,r[H.RG_INTEGER]=e.RG8I,r[H.RED_INTEGER]=e.R8I,r),t[U.UNSIGNED_SHORT]=(i={},i[H.RGBA_INTEGER]=e.RGBA16UI,i[H.RGB_INTEGER]=e.RGB16UI,i[H.RG_INTEGER]=e.RG16UI,i[H.RED_INTEGER]=e.R16UI,i[H.DEPTH_COMPONENT]=e.DEPTH_COMPONENT16,i),t[U.SHORT]=(a={},a[H.RGBA_INTEGER]=e.RGBA16I,a[H.RGB_INTEGER]=e.RGB16I,a[H.RG_INTEGER]=e.RG16I,a[H.RED_INTEGER]=e.R16I,a),t[U.UNSIGNED_INT]=(o={},o[H.RGBA_INTEGER]=e.RGBA32UI,o[H.RGB_INTEGER]=e.RGB32UI,o[H.RG_INTEGER]=e.RG32UI,o[H.RED_INTEGER]=e.R32UI,o[H.DEPTH_COMPONENT]=e.DEPTH_COMPONENT24,o),t[U.INT]=(s={},s[H.RGBA_INTEGER]=e.RGBA32I,s[H.RGB_INTEGER]=e.RGB32I,s[H.RG_INTEGER]=e.RG32I,s[H.RED_INTEGER]=e.R32I,s),t[U.FLOAT]=(c={},c[H.RGBA]=e.RGBA32F,c[H.RGB]=e.RGB32F,c[H.RG]=e.RG32F,c[H.RED]=e.R32F,c[H.DEPTH_COMPONENT]=e.DEPTH_COMPONENT32F,c),t[U.HALF_FLOAT]=(l={},l[H.RGBA]=e.RGBA16F,l[H.RGB]=e.RGB16F,l[H.RG]=e.RG16F,l[H.RED]=e.R16F,l),t[U.UNSIGNED_SHORT_5_6_5]=(u={},u[H.RGB]=e.RGB565,u),t[U.UNSIGNED_SHORT_4_4_4_4]=(d={},d[H.RGBA]=e.RGBA4,d),t[U.UNSIGNED_SHORT_5_5_5_1]=(f={},f[H.RGBA]=e.RGB5_A1,f),t[U.UNSIGNED_INT_2_10_10_10_REV]=(p={},p[H.RGBA]=e.RGB10_A2,p[H.RGBA_INTEGER]=e.RGB10_A2UI,p),t[U.UNSIGNED_INT_10F_11F_11F_REV]=(m={},m[H.RGB]=e.R11F_G11F_B10F,m),t[U.UNSIGNED_INT_5_9_9_9_REV]=(h={},h[H.RGB]=e.RGB9_E5,h),t[U.UNSIGNED_INT_24_8]=(g={},g[H.DEPTH_STENCIL]=e.DEPTH24_STENCIL8,g),t[U.FLOAT_32_UNSIGNED_INT_24_8_REV]=(_={},_[H.DEPTH_STENCIL]=e.DEPTH32F_STENCIL8,_),t):(v={},v[U.UNSIGNED_BYTE]=(y={},y[H.RGBA]=e.RGBA,y[H.RGB]=e.RGB,y[H.ALPHA]=e.ALPHA,y[H.LUMINANCE]=e.LUMINANCE,y[H.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,y),v[U.UNSIGNED_SHORT_5_6_5]=(b={},b[H.RGB]=e.RGB,b),v[U.UNSIGNED_SHORT_4_4_4_4]=(x={},x[H.RGBA]=e.RGBA,x),v[U.UNSIGNED_SHORT_5_5_5_1]=(S={},S[H.RGBA]=e.RGBA,S),v)}var Gi=function(){function e(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=U.UNSIGNED_BYTE,this.internalFormat=H.RGBA,this.samplerType=0}return e}(),Ki=function(){function e(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Dn,this.hasIntegerTextures=!1}return e.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=Wi(e);var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(var n=0;n=0;--a){var o=n[a];o&&o._glTextures[i].samplerType!==Oe.FLOAT&&this.renderer.texture.unbind(o)}},e.prototype.initTexture=function(e){var t=new Gi(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on(`dispose`,this.destroyTexture,this),t},e.prototype.initTextureType=function(e,t){t.internalFormat=this.internalFormats[e.type]?.[e.format]??e.format,this.webGLVersion===2&&e.type===U.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type},e.prototype.updateTexture=function(e){var t=e._glTextures[this.CONTEXT_UID];if(t){var n=this.renderer;if(this.initTextureType(e,t),e.resource&&e.resource.upload(n,e,t))t.samplerType!==Oe.FLOAT&&(this.hasIntegerTextures=!0);else{var r=e.realWidth,i=e.realHeight,a=n.gl;(t.width!==r||t.height!==i||t.dirtyId<0)&&(t.width=r,t.height=i,a.texImage2D(e.target,0,t.internalFormat,r,i,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}},e.prototype.destroyTexture=function(e,t){var n=this.gl;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off(`dispose`,this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){var r=this.managedTextures.indexOf(e);r!==-1&&Ft(this.managedTextures,r,1)}},e.prototype.updateTextureStyle=function(e){var t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===je.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=Ae.CLAMP:t.wrapMode=e.wrapMode,e.resource&&e.resource.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)},e.prototype.setStyle=function(e,t){var n=this.gl;if(t.mipmap&&e.mipmap!==je.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,t.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===ke.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&e.anisotropicLevel>0&&e.scaleMode===ke.LINEAR){var i=Math.min(e.anisotropicLevel,n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,r.TEXTURE_MAX_ANISOTROPY_EXT,i)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===ke.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===ke.LINEAR?n.LINEAR:n.NEAREST)},e.prototype.destroy=function(){this.renderer=null},e}(),qi={__proto__:null,FilterSystem:lr,BatchSystem:dr,ContextSystem:pr,FramebufferSystem:gr,GeometrySystem:vr,MaskSystem:fi,ScissorSystem:gi,StencilSystem:_i,ProjectionSystem:vi,RenderTextureSystem:xi,ShaderSystem:Pi,StateSystem:Hi,TextureGCSystem:Ui,TextureSystem:Ki},Ji=new ln,Yi=function(e){J(t,e);function t(t,n){t===void 0&&(t=we.UNKNOWN);var r=e.call(this)||this;return n=Object.assign({},G.RENDER_OPTIONS,n),r.options=n,r.type=t,r.screen=new K(0,0,n.width,n.height),r.view=n.view||G.ADAPTER.createCanvas(),r.resolution=n.resolution||G.RESOLUTION,r.useContextAlpha=n.useContextAlpha,r.autoDensity=!!n.autoDensity,r.preserveDrawingBuffer=n.preserveDrawingBuffer,r.clearBeforeRender=n.clearBeforeRender,r._backgroundColor=0,r._backgroundColorRgba=[0,0,0,1],r._backgroundColorString=`#000000`,r.backgroundColor=n.backgroundColor||r._backgroundColor,r.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(zt(`6.0.0`,`Option transparent is deprecated, please use backgroundAlpha instead.`),r.useContextAlpha=n.transparent,r.backgroundAlpha=n.transparent?0:1),r._lastObjectRendered=null,r.plugins={},r}return t.prototype.initPlugins=function(e){for(var t in e)this.plugins[t]=new e[t](this)},Object.defineProperty(t.prototype,`width`,{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return this.view.height},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t){this.view.width=Math.round(e*this.resolution),this.view.height=Math.round(t*this.resolution);var n=this.view.width/this.resolution,r=this.view.height/this.resolution;this.screen.width=n,this.screen.height=r,this.autoDensity&&(this.view.style.width=n+`px`,this.view.style.height=r+`px`),this.emit(`resize`,n,r)},t.prototype.generateTexture=function(e,t,n,r){t===void 0&&(t={}),typeof t==`number`&&(zt(`6.1.0`,`generateTexture options (scaleMode, resolution, region) are now object options.`),t={scaleMode:t,resolution:n,region:r});var i=t.region,a=Cn(t,[`region`]);r=i||e.getLocalBounds(null,!0),r.width===0&&(r.width=1),r.height===0&&(r.height=1);var o=Gn.create(Sn({width:r.width,height:r.height},a));return Ji.tx=-r.x,Ji.ty=-r.y,this.render(e,{renderTexture:o,clear:!1,transform:Ji,skipUpdateTransform:!!e.parent}),o},t.prototype.destroy=function(e){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var n=this;n.plugins=null,n.type=we.UNKNOWN,n.view=null,n.screen=null,n._tempDisplayObjectParent=null,n.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(t.prototype,`backgroundColor`,{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._backgroundColorString=Et(e),Tt(e,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`backgroundAlpha`,{get:function(){return this._backgroundColorRgba[3]},set:function(e){this._backgroundColorRgba[3]=e},enumerable:!1,configurable:!0}),t}(_t.default),Xi=function(){function e(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return e}(),Zi=function(){function e(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return e.prototype.destroy=function(){this.renderer=null},e.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},e.prototype.bind=function(e){var t=this,n=t.gl,r=t.CONTEXT_UID,i=e._glBuffers[r]||this.createGLBuffer(e);n.bindBuffer(e.type,i.buffer)},e.prototype.bindBufferBase=function(e,t){var n=this,r=n.gl,i=n.CONTEXT_UID;if(this.boundBufferBases[t]!==e){var a=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[t]=e,r.bindBufferBase(r.UNIFORM_BUFFER,t,a.buffer)}},e.prototype.bindBufferRange=function(e,t,n){var r=this,i=r.gl,a=r.CONTEXT_UID;n||=0;var o=e._glBuffers[a]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,t||0,o.buffer,n*256,256)},e.prototype.update=function(e){var t=this,n=t.gl,r=t.CONTEXT_UID,i=e._glBuffers[r];if(e._updateID!==i.updateID)if(i.updateID=e._updateID,n.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)n.bufferSubData(e.type,0,e.data);else{var a=e.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,n.bufferData(e.type,e.data,a)}},e.prototype.dispose=function(e,t){if(this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var n=e._glBuffers[this.CONTEXT_UID],r=this.gl;e.disposeRunner.remove(this),n&&(t||r.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeAll=function(e){for(var t=Object.keys(this.managedBuffers),n=0;n=W.HIGH?this.multisample=W.HIGH:t>=W.MEDIUM?this.multisample=W.MEDIUM:t>=W.LOW?this.multisample=W.LOW:this.multisample=W.NONE},t.prototype.addSystem=function(e,t){var n=new e(this);if(this[t])throw Error(`Whoops! The name "`+t+`" is already in use`);for(var r in this[t]=n,this.runners)this.runners[r].add(n);return this},t.prototype.render=function(e,t){var n,r,i,a;if(t&&(t instanceof Gn?(zt(`6.0.0`,`Renderer#render arguments changed, use options instead.`),n=t,r=arguments[2],i=arguments[3],a=arguments[4]):(n=t.renderTexture,r=t.clear,i=t.transform,a=t.skipUpdateTransform)),this.renderingToScreen=!n,this.runners.prerender.emit(),this.emit(`prerender`),this.projection.transform=i,!this.context.isLost){if(n||(this._lastObjectRendered=e),!a){var o=e.enableTempParent();e.updateTransform(),e.disableTempParent(o)}this.renderTexture.bind(n),this.batch.currentRenderer.start(),(r===void 0?this.clearBeforeRender:r)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),n&&n.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit(`postrender`)}},t.prototype.generateTexture=function(t,n,r,i){n===void 0&&(n={});var a=e.prototype.generateTexture.call(this,t,n,r,i);return this.framebuffer.blit(),a},t.prototype.resize=function(t,n){e.prototype.resize.call(this,t,n),this.runners.resize.emit(this.screen.height,this.screen.width)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.prototype.destroy=function(t){for(var n in this.runners.destroy.emit(),this.runners)this.runners[n].destroy();e.prototype.destroy.call(this,t),this.gl=null},Object.defineProperty(t.prototype,`extract`,{get:function(){return zt(`6.0.0`,`Renderer#extract has been deprecated, please use Renderer#plugins.extract instead.`),this.plugins.extract},enumerable:!1,configurable:!0}),t.registerPlugin=function(e,t){zt(`6.5.0`,`Renderer.registerPlugin() has been deprecated, please use extensions.add() instead.`),Yt.add({name:e,type:qt.RendererPlugin,ref:t})},t.__plugins={},t}(Yi);Yt.handleByMap(qt.RendererPlugin,Qi.__plugins);function $i(e){return Qi.create(e)}var ea=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`;(function(){function e(e){zt(`6.1.0`,`System class is deprecated, implemement ISystem interface instead.`),this.renderer=e}return e.prototype.destroy=function(){this.renderer=null},e})();var ta=function(){function e(){this.texArray=null,this.blend=0,this.type=Ee.TRIANGLES,this.start=0,this.size=0,this.data=null}return e}(),na=function(){function e(){this.elements=[],this.ids=[],this.count=0}return e.prototype.clear=function(){for(var e=0;ethis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)},t.prototype.buildTexturesAndDrawCalls=function(){var e=this,n=e._bufferedTextures,r=e.MAX_TEXTURES,i=t._textureArrayPool,a=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,c=++Dn._globalBatch,l=0,u=i[0],d=0;a.copyBoundTextures(o,r);for(var f=0;f=r&&(a.boundArray(u,o,c,r),this.buildDrawCalls(u,d,f),d=f,u=i[++l],++c),p._batchEnabled=c,p.touched=s,u.elements[u.count++]=p)}u.count>0&&(a.boundArray(u,o,c,r),this.buildDrawCalls(u,d,this._bufferSize),++l,++c);for(var f=0;f0&&(t+=` +else `),nthis.maxX||this.minY>this.maxY},e.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},e.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?K.EMPTY:(e||=new K(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},e.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},e.prototype.addPointMatrix=function(e,t){var n=e.a,r=e.b,i=e.c,a=e.d,o=e.tx,s=e.ty,c=n*t.x+i*t.y+o,l=r*t.x+a*t.y+s;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},e.prototype.addQuad=function(e){var t=this.minX,n=this.minY,r=this.maxX,i=this.maxY,a=e[0],o=e[1];t=ar?a:r,i=o>i?o:i,a=e[2],o=e[3],t=ar?a:r,i=o>i?o:i,a=e[4],o=e[5],t=ar?a:r,i=o>i?o:i,a=e[6],o=e[7],t=ar?a:r,i=o>i?o:i,this.minX=t,this.minY=n,this.maxX=r,this.maxY=i},e.prototype.addFrame=function(e,t,n,r,i){this.addFrameMatrix(e.worldTransform,t,n,r,i)},e.prototype.addFrameMatrix=function(e,t,n,r,i){var a=e.a,o=e.b,s=e.c,c=e.d,l=e.tx,u=e.ty,d=this.minX,f=this.minY,p=this.maxX,m=this.maxY,h=a*t+s*n+l,g=o*t+c*n+u;d=hp?h:p,m=g>m?g:m,h=a*r+s*n+l,g=o*r+c*n+u,d=hp?h:p,m=g>m?g:m,h=a*t+s*i+l,g=o*t+c*i+u,d=hp?h:p,m=g>m?g:m,h=a*r+s*i+l,g=o*r+c*i+u,d=hp?h:p,m=g>m?g:m,this.minX=d,this.minY=f,this.maxX=p,this.maxY=m},e.prototype.addVertexData=function(e,t,n){for(var r=this.minX,i=this.minY,a=this.maxX,o=this.maxY,s=t;sa?c:a,o=l>o?l:o}this.minX=r,this.minY=i,this.maxX=a,this.maxY=o},e.prototype.addVertices=function(e,t,n,r){this.addVerticesMatrix(e.worldTransform,t,n,r)},e.prototype.addVerticesMatrix=function(e,t,n,r,i,a){i===void 0&&(i=0),a===void 0&&(a=i);for(var o=e.a,s=e.b,c=e.c,l=e.d,u=e.tx,d=e.ty,f=this.minX,p=this.minY,m=this.maxX,h=this.maxY,g=n;gr?e.maxX:r,this.maxY=e.maxY>i?e.maxY:i},e.prototype.addBoundsMask=function(e,t){var n=e.minX>t.minX?e.minX:t.minX,r=e.minY>t.minY?e.minY:t.minY,i=e.maxXc?i:c,this.maxY=a>l?a:l}},e.prototype.addBoundsMatrix=function(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)},e.prototype.addBoundsArea=function(e,t){var n=e.minX>t.x?e.minX:t.x,r=e.minY>t.y?e.minY:t.y,i=e.maxXc?i:c,this.maxY=a>l?a:l}},e.prototype.pad=function(e,t){e===void 0&&(e=0),t===void 0&&(t=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)},e.prototype.addFramePad=function(e,t,n,r,i,a){e-=i,t-=a,n+=i,r+=a,this.minX=this.minXn?this.maxX:n,this.minY=this.minYr?this.maxY:r},e}(),ga=function(e,t){return ga=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},ga(e,t)};function _a(e,t){ga(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var va=function(e){_a(t,e);function t(){var t=e.call(this)||this;return t.tempDisplayObjectParent=null,t.transform=new vn,t.alpha=1,t.visible=!0,t.renderable=!0,t.cullable=!1,t.cullArea=null,t.parent=null,t.worldAlpha=1,t._lastSortedIndex=0,t._zIndex=0,t.filterArea=null,t.filters=null,t._enabledFilters=null,t._bounds=new ha,t._localBounds=null,t._boundsID=0,t._boundsRect=null,t._localBoundsRect=null,t._mask=null,t._maskRefCount=0,t._destroyed=!1,t.isSprite=!1,t.isMask=!1,t}return t.mixin=function(e){for(var n=Object.keys(e),r=0;r1)for(var r=0;rthis.children.length)throw Error(e+`addChildAt: The index `+t+` supplied is out of bounds `+this.children.length);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit(`added`,this),this.emit(`childAdded`,e,this,t),e},t.prototype.swapChildren=function(e,t){if(e!==t){var n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e,this.onChildrenChange(n=this.children.length)throw Error(`The index `+t+` supplied is out of bounds `+this.children.length);var n=this.getChildIndex(e);Ft(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)},t.prototype.getChildAt=function(e){if(e<0||e>=this.children.length)throw Error(`getChildAt: Index (`+e+`) does not exist.`);return this.children[e]},t.prototype.removeChild=function(){for(var e=arguments,t=[],n=0;n1)for(var r=0;r0&&i<=r){a=this.children.splice(n,i);for(var o=0;o1&&this.children.sort(ba),this.sortDirty=!1},t.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var e=0,t=this.children.length;e0&&n.height>0){var r,i;if(this.cullArea?(r=this.cullArea,i=this.worldTransform):this._render!==t.prototype._render&&(r=this.getBounds(!0)),r&&n.intersects(r,i))this._render(e);else if(this.cullArea)return;for(var a=0,o=this.children.length;anew Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Ta=class e{constructor(){this._breathParameters=[],this._currentTime=0}static create(){return new e}setParameters(e){this._breathParameters=e}getParameters(){return this._breathParameters}updateParameters(e,t){this._currentTime+=t;let n=this._currentTime*2*3.14159;for(let t=0;t=1&&(r=1,this._blinkingState=ka.EyeState_Closed,this._stateStartTimeSeconds=this._userTimeSeconds),n=1-r;break;case ka.EyeState_Closed:r=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._closedSeconds,r>=1&&(this._blinkingState=ka.EyeState_Opening,this._stateStartTimeSeconds=this._userTimeSeconds),n=0;break;case ka.EyeState_Opening:r=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._openingSeconds,r>=1&&(r=1,this._blinkingState=ka.EyeState_Interval,this._nextBlinkingTime=this.determinNextBlinkingTiming()),n=r;break;case ka.EyeState_Interval:this._nextBlinkingTime(e[e.EyeState_First=0]=`EyeState_First`,e[e.EyeState_Interval=1]=`EyeState_Interval`,e[e.EyeState_Closing=2]=`EyeState_Closing`,e[e.EyeState_Closed=3]=`EyeState_Closed`,e[e.EyeState_Opening=4]=`EyeState_Opening`,e))(ka||{}),Aa=.001,ja=.5,Ma=class e{static create(t){let n=new e;typeof t.FadeInTime==`number`&&(n._fadeTimeSeconds=t.FadeInTime,n._fadeTimeSeconds<=0&&(n._fadeTimeSeconds=ja));let r=t.Groups,i=r.length;for(let e=0;eAa){if(i>=0)break;i=o,a=e.getPartOpacityByIndex(n),a+=t/this._fadeTimeSeconds,a>1&&(a=1)}}i<0&&(i=0,a=1);for(let t=n;ts&&(r=1-s/(1-a)),t>r&&(t=r),e.setPartOpacityByIndex(n,t)}}}constructor(){this._fadeTimeSeconds=ja,this._lastModel=void 0,this._partGroups=[],this._partGroupCounts=[]}},Na=class e{constructor(e){this.parameterIndex=0,this.partIndex=0,this.partId=``,this.link=[],e!=null&&this.assignment(e)}assignment(e){return this.partId=e.partId,this.link=e.link.map(e=>e.clone()),this}initialize(e){this.parameterIndex=e.getParameterIndex(this.partId),this.partIndex=e.getPartIndex(this.partId),e.setParameterValueByIndex(this.parameterIndex,1)}clone(){let t=new e;return t.partId=this.partId,t.parameterIndex=this.parameterIndex,t.partIndex=this.partIndex,t.link=this.link.map(e=>e.clone()),t}},X=class e{constructor(e,t){this.x=e||0,this.y=t||0}add(t){let n=new e(0,0);return n.x=this.x+t.x,n.y=this.y+t.y,n}substract(t){let n=new e(0,0);return n.x=this.x-t.x,n.y=this.y-t.y,n}multiply(t){let n=new e(0,0);return n.x=this.x*t.x,n.y=this.y*t.y,n}multiplyByScaler(t){return this.multiply(new e(t,t))}division(t){let n=new e(0,0);return n.x=this.x/t.x,n.y=this.y/t.y,n}divisionByScalar(t){return this.division(new e(t,t))}getLength(){return Math.sqrt(this.x*this.x+this.y*this.y)}getDistanceWith(e){return Math.sqrt((this.x-e.x)*(this.x-e.x)+(this.y-e.y)*(this.y-e.y))}dot(e){return this.x*e.x+this.y*e.y}normalize(){let e=(this.x*this.x+this.y*this.y)**.5;this.x/=e,this.y/=e}isEqual(e){return this.x==e.x&&this.y==e.y}isNotEqual(e){return!this.isEqual(e)}},Pa=class{static range(e,t,n){return en&&(e=n),e}static sin(e){return Math.sin(e)}static cos(e){return Math.cos(e)}static abs(e){return Math.abs(e)}static sqrt(e){return Math.sqrt(e)}static cbrt(e){if(e===0)return e;let t=e,n=t<0;n&&(t=-t);let r;return t===1/0?r=1/0:(r=Math.exp(Math.log(t)/3),r=(t/(r*r)+2*r)/3),n?-r:r}static getEasingSine(e){return e<0?0:e>1?1:.5-.5*this.cos(e*Math.PI)}static max(e,t){return e>t?e:t}static min(e,t){return e>t?t:e}static degreesToRadian(e){return e/180*Math.PI}static radianToDegrees(e){return e*180/Math.PI}static directionToRadian(e,t){let n=Math.atan2(t.y,t.x)-Math.atan2(e.y,e.x);for(;n<-Math.PI;)n+=Math.PI*2;for(;n>Math.PI;)n-=Math.PI*2;return n}static directionToDegrees(e,t){let n=this.directionToRadian(e,t),r=this.radianToDegrees(n);return t.x-e.x>0&&(r=-r),r}static radianToDirection(e){let t=new X;return t.x=this.sin(e),t.y=this.cos(e),t}static quadraticEquation(e,t,n){return this.abs(e)1&&(e=1),t<0?t=0:t>1&&(t=1),n<0?n=0:n>1&&(n=1),r<0?r=0:r>1&&(r=1),this._modelColor.R=e,this._modelColor.G=t,this._modelColor.B=n,this._modelColor.A=r}getModelColor(){return Object.assign({},this._modelColor)}setIsPremultipliedAlpha(e){this._isPremultipliedAlpha=e}isPremultipliedAlpha(){return this._isPremultipliedAlpha}setIsCulling(e){this._isCulling=e}isCulling(){return this._isCulling}setAnisotropy(e){this._anisortopy=e}getAnisotropy(){return this._anisortopy}getModel(){return this._model}constructor(){this._isCulling=!1,this._isPremultipliedAlpha=!1,this._anisortopy=0,this._modelColor=new Ra,this._mvpMatrix4x4=new Fa,this._mvpMatrix4x4.loadIdentity()}},La=(e=>(e[e.CubismBlendMode_Normal=0]=`CubismBlendMode_Normal`,e[e.CubismBlendMode_Additive=1]=`CubismBlendMode_Additive`,e[e.CubismBlendMode_Multiplicative=2]=`CubismBlendMode_Multiplicative`,e))(La||{}),Ra=class{constructor(){this.R=1,this.G=1,this.B=1,this.A=1}},za=!1,Ba=!1,Va=void 0,Ha={vertexOffset:0,vertexStep:2},Ua=class{static startUp(e){if(za)return Ka(`CubismFramework.startUp() is already done.`),za;if(Live2DCubismCore._isStarted)return za=!0,!0;if(Live2DCubismCore._isStarted=!0,Va=e,Va&&Live2DCubismCore.Logging.csmSetLogFunction(Va.logFunction),za=!0,za){let e=Live2DCubismCore.Version.csmGetVersion(),t=(e&4278190080)>>24,n=(e&16711680)>>16,r=e&65535,i=e;Ka(`Live2D Cubism Core version: {0}.{1}.{2} ({3})`,(`00`+t).slice(-2),(`00`+n).slice(-2),(`0000`+r).slice(-4),i)}return Ka(`CubismFramework.startUp() is complete.`),za}static cleanUp(){za=!1,Ba=!1,Va=void 0}static initialize(){if(!za){qa(`CubismFramework is not started.`);return}if(Ba){qa(`CubismFramework.initialize() skipped, already initialized.`);return}Ba=!0,Ka(`CubismFramework.initialize() is complete.`)}static dispose(){if(!za){qa(`CubismFramework is not started.`);return}if(!Ba){qa(`CubismFramework.dispose() skipped, not initialized.`);return}Ia.staticRelease(),Ba=!1,Ka(`CubismFramework.dispose() is complete.`)}static isStarted(){return za}static isInitialized(){return Ba}static coreLogFunction(e){Live2DCubismCore.Logging.csmGetLogFunction()&&Live2DCubismCore.Logging.csmGetLogFunction()(e)}static getLoggingLevel(){return Va==null?Wa.LogLevel_Off:Va.loggingLevel}constructor(){}},Wa=(e=>(e[e.LogLevel_Verbose=0]=`LogLevel_Verbose`,e[e.LogLevel_Debug=1]=`LogLevel_Debug`,e[e.LogLevel_Info=2]=`LogLevel_Info`,e[e.LogLevel_Warning=3]=`LogLevel_Warning`,e[e.LogLevel_Error=4]=`LogLevel_Error`,e[e.LogLevel_Off=5]=`LogLevel_Off`,e))(Wa||{});function Ga(e,...t){Ya.print(Wa.LogLevel_Debug,`[CSM][D]`+e+` +`,t)}function Ka(e,...t){Ya.print(Wa.LogLevel_Info,`[CSM][I]`+e+` +`,t)}function qa(e,...t){Ya.print(Wa.LogLevel_Warning,`[CSM][W]`+e+` +`,t)}function Ja(e,...t){Ya.print(Wa.LogLevel_Error,`[CSM][E]`+e+` +`,t)}var Ya=class{static print(e,t,n){if(en[t]))}static dumpBytes(e,t,n){for(let r=0;r0?this.print(e,` +`):r%8==0&&r>0&&this.print(e,` `),this.print(e,`{0} `,[t[r]&255]);this.print(e,` +`)}constructor(){}},Xa=class{update(){this._model.update(),this._model.drawables.resetDynamicFlags()}getCanvasWidth(){return this._model==null?0:this._model.canvasinfo.CanvasWidth/this._model.canvasinfo.PixelsPerUnit}getCanvasHeight(){return this._model==null?0:this._model.canvasinfo.CanvasHeight/this._model.canvasinfo.PixelsPerUnit}saveParameters(){let e=this._model.parameters.count,t=this._savedParameters.length;for(let n=0;nt&&(t=this._model.parameters.minimumValues[e]),this._parameterValues[e]=n==1?t:this._parameterValues[e]=this._parameterValues[e]*(1-n)+t*n}setParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.setParameterValueByIndex(r,t,n)}addParameterValueByIndex(e,t,n=1){this.setParameterValueByIndex(e,this.getParameterValueByIndex(e)+t*n)}addParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.addParameterValueByIndex(r,t,n)}multiplyParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.multiplyParameterValueByIndex(r,t,n)}multiplyParameterValueByIndex(e,t,n=1){this.setParameterValueByIndex(e,this.getParameterValueByIndex(e)*(1+(t-1)*n))}getDrawableIds(){return this._drawableIds.slice()}getDrawableIndex(e){let t=this._model.drawables.count;for(let n=0;nt&&(e=t);for(let t=0;t0&&t.getEndTime()(e[e.ExpressionBlendType_Add=0]=`ExpressionBlendType_Add`,e[e.ExpressionBlendType_Multiply=1]=`ExpressionBlendType_Multiply`,e[e.ExpressionBlendType_Overwrite=2]=`ExpressionBlendType_Overwrite`,e))(to||{}),no;(e=>{e.supportMoreMaskDivisions=!0,e.setOpacityFromMotion=!1})(no||={});var ro=(e=>(e[e.CubismMotionCurveTarget_Model=0]=`CubismMotionCurveTarget_Model`,e[e.CubismMotionCurveTarget_Parameter=1]=`CubismMotionCurveTarget_Parameter`,e[e.CubismMotionCurveTarget_PartOpacity=2]=`CubismMotionCurveTarget_PartOpacity`,e))(ro||{}),io=(e=>(e[e.CubismMotionSegmentType_Linear=0]=`CubismMotionSegmentType_Linear`,e[e.CubismMotionSegmentType_Bezier=1]=`CubismMotionSegmentType_Bezier`,e[e.CubismMotionSegmentType_Stepped=2]=`CubismMotionSegmentType_Stepped`,e[e.CubismMotionSegmentType_InverseStepped=3]=`CubismMotionSegmentType_InverseStepped`,e))(io||{}),ao=class{constructor(e=0,t=0){this.time=e,this.value=t}},oo=class{constructor(){this.basePointIndex=0,this.segmentType=0}},so=class{constructor(){this.id=``,this.type=0,this.segmentCount=0,this.baseSegmentIndex=0,this.fadeInTime=0,this.fadeOutTime=0}},co=class{constructor(){this.fireTime=0,this.value=``}},lo=class{constructor(){this.duration=0,this.loop=!1,this.curveCount=0,this.eventCount=0,this.fps=0,this.curves=[],this.segments=[],this.points=[],this.events=[]}},uo=class{constructor(e){this._json=e}release(){this._json=void 0}getMotionDuration(){return this._json.Meta.Duration}isMotionLoop(){return this._json.Meta.Loop||!1}getEvaluationOptionFlag(e){return fo.EvaluationOptionFlag_AreBeziersRistricted==e?!!this._json.Meta.AreBeziersRestricted:!1}getMotionCurveCount(){return this._json.Meta.CurveCount}getMotionFps(){return this._json.Meta.Fps}getMotionTotalSegmentCount(){return this._json.Meta.TotalSegmentCount}getMotionTotalPointCount(){return this._json.Meta.TotalPointCount}getMotionFadeInTime(){return this._json.Meta.FadeInTime}getMotionFadeOutTime(){return this._json.Meta.FadeOutTime}getMotionCurveTarget(e){return this._json.Curves[e].Target}getMotionCurveId(e){return this._json.Curves[e].Id}getMotionCurveFadeInTime(e){return this._json.Curves[e].FadeInTime}getMotionCurveFadeOutTime(e){return this._json.Curves[e].FadeOutTime}getMotionCurveSegmentCount(e){return this._json.Curves[e].Segments.length}getMotionCurveSegment(e,t){return this._json.Curves[e].Segments[t]}getEventCount(){return this._json.Meta.UserDataCount||0}getTotalEventValueSize(){return this._json.Meta.TotalUserDataSize}getEventTime(e){return this._json.UserData[e].Time}getEventValue(e){return this._json.UserData[e].Value}},fo=(e=>(e[e.EvaluationOptionFlag_AreBeziersRistricted=0]=`EvaluationOptionFlag_AreBeziersRistricted`,e))(fo||{}),po=`EyeBlink`,mo=`LipSync`,ho=`Model`,go=`Parameter`,_o=`PartOpacity`,vo=!1;function yo(e,t,n){let r=new ao;return r.time=e.time+(t.time-e.time)*n,r.value=e.value+(t.value-e.value)*n,r}function bo(e,t){let n=(t-e[0].time)/(e[1].time-e[0].time);return n<0&&(n=0),e[0].value+(e[1].value-e[0].value)*n}function xo(e,t){let n=(t-e[0].time)/(e[3].time-e[0].time);n<0&&(n=0);let r=yo(e[0],e[1],n),i=yo(e[1],e[2],n),a=yo(e[2],e[3],n);return yo(yo(r,i,n),yo(i,a,n),n).value}function So(e,t){let n=t,r=e[0].time,i=e[3].time,a=e[1].time,o=e[2].time,s=i-3*o+3*a-r,c=3*o-6*a+3*r,l=3*a-3*r,u=r-n,d=Z.cardanoAlgorithmForBezier(s,c,l,u),f=yo(e[0],e[1],d),p=yo(e[1],e[2],d),m=yo(e[2],e[3],d);return yo(yo(f,p,d),yo(p,m,d),d).value}function Co(e,t){return e[0].value}function wo(e,t){return e[1].value}function To(e,t,n){let r=e.curves[t],i=-1,a=r.baseSegmentIndex+r.segmentCount,o=0;for(let t=r.baseSegmentIndex;tn){i=t;break}if(i==-1)return e.points[o].value;let s=e.segments[i];return s.evaluate(e.points.slice(s.basePointIndex),n)}var Eo=class e extends Qa{constructor(){super(),this._eyeBlinkParameterIds=[],this._lipSyncParameterIds=[],this._sourceFrameRate=30,this._loopDurationSeconds=-1,this._isLoop=!1,this._isLoopFadeIn=!0,this._lastWeight=0}static create(t,n){let r=new e;return r.parse(t),r._sourceFrameRate=r._motionData.fps,r._loopDurationSeconds=r._motionData.duration,r._onFinishedMotion=n,r}doUpdateParameters(e,t,n,r){this._modelCurveIdEyeBlink??=po,this._modelCurveIdLipSync??=mo;let i=t-r.getStartTime();i<0&&(i=0);let a=Number.MAX_VALUE,o=Number.MAX_VALUE,s=0,c=0;this._eyeBlinkParameterIds.length>64&&Ga(`too many eye blink targets : {0}`,this._eyeBlinkParameterIds.length),this._lipSyncParameterIds.length>64&&Ga(`too many lip sync targets : {0}`,this._lipSyncParameterIds.length);let l=this._fadeInSeconds<=0?1:Z.getEasingSine((t-r.getFadeInStartTime())/this._fadeInSeconds),u=this._fadeOutSeconds<=0||r.getEndTime()<0?1:Z.getEasingSine((r.getEndTime()-t)/this._fadeOutSeconds),d,f,p,m=i;if(this._isLoop)for(;m>this._motionData.duration;)m-=this._motionData.duration;let h=this._motionData.curves;for(f=0;f>t&1)continue;let i=r+(o-r)*n;e.setParameterValueById(this._eyeBlinkParameterIds[t],i)}if(a!=Number.MAX_VALUE)for(let t=0;t>t&1)continue;let i=r+(a-r)*n;e.setParameterValueById(this._lipSyncParameterIds[t],i)}for(;f=this._motionData.duration&&(this._isLoop?(r.setStartTime(t),this._isLoopFadeIn&&r.setFadeInStartTime(t)):(this._onFinishedMotion&&this._onFinishedMotion(this),r.setIsFinished(!0))),this._lastWeight=n}setIsLoop(e){this._isLoop=e}isLoop(){return this._isLoop}setIsLoopFadeIn(e){this._isLoopFadeIn=e}isLoopFadeIn(){return this._isLoopFadeIn}getDuration(){return this._isLoop?-1:this._loopDurationSeconds}getLoopDuration(){return this._loopDurationSeconds}setParameterFadeInTime(e,t){let n=this._motionData.curves;for(let r=0;rnew so),this._motionData.segments=Array.from({length:t.getMotionTotalSegmentCount()}).map(()=>new oo),this._motionData.events=Array.from({length:this._motionData.eventCount}).map(()=>new co),this._motionData.points=[];let a=0,o=0;for(let e=0;ee&&this._motionData.events[n].fireTime<=t&&this._firedEventValues.push(this._motionData.events[n].value);return this._firedEventValues}},Do=class{constructor(){this._autoDelete=!1,this._available=!0,this._finished=!1,this._started=!1,this._startTimeSeconds=-1,this._fadeInStartTimeSeconds=0,this._endTimeSeconds=-1,this._stateTimeSeconds=0,this._stateWeight=0,this._lastEventCheckSeconds=0,this._motionQueueEntryHandle=this,this._fadeOutSeconds=0,this._isTriggeredFadeOut=!1}release(){this._autoDelete&&this._motion&&this._motion.release()}setFadeOut(e){this._fadeOutSeconds=e,this._isTriggeredFadeOut=!0}startFadeOut(e,t){let n=t+e;this._isTriggeredFadeOut=!0,(this._endTimeSeconds<0||nt!=null&&t._motionQueueEntryHandle==e)}setEventCallback(e,t=null){this._eventCallBack=e,this._eventCustomData=t}doUpdateMotion(e,t){let n=!1,r=0;for(;r(e[e.CubismPhysicsTargetType_Parameter=0]=`CubismPhysicsTargetType_Parameter`,e))(ko||{}),Ao=(e=>(e[e.CubismPhysicsSource_X=0]=`CubismPhysicsSource_X`,e[e.CubismPhysicsSource_Y=1]=`CubismPhysicsSource_Y`,e[e.CubismPhysicsSource_Angle=2]=`CubismPhysicsSource_Angle`,e))(Ao||{}),jo=class{constructor(){this.initialPosition=new X(0,0),this.position=new X(0,0),this.lastPosition=new X(0,0),this.lastGravity=new X(0,0),this.force=new X(0,0),this.velocity=new X(0,0)}},Mo=class{constructor(){this.normalizationPosition={},this.normalizationAngle={}}},No=class{constructor(){this.source={}}},Po=class{constructor(){this.destination={},this.translationScale=new X(0,0)}},Fo=class{constructor(){this.settings=[],this.inputs=[],this.outputs=[],this.particles=[],this.gravity=new X(0,0),this.wind=new X(0,0)}},Io=class{constructor(e){this._json=e}release(){this._json=void 0}getGravity(){let e=new X(0,0);return e.x=this._json.Meta.EffectiveForces.Gravity.X,e.y=this._json.Meta.EffectiveForces.Gravity.Y,e}getWind(){let e=new X(0,0);return e.x=this._json.Meta.EffectiveForces.Wind.X,e.y=this._json.Meta.EffectiveForces.Wind.Y,e}getSubRigCount(){return this._json.Meta.PhysicsSettingCount}getTotalInputCount(){return this._json.Meta.TotalInputCount}getTotalOutputCount(){return this._json.Meta.TotalOutputCount}getVertexCount(){return this._json.Meta.VertexCount}getNormalizationPositionMinimumValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Minimum}getNormalizationPositionMaximumValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Maximum}getNormalizationPositionDefaultValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Default}getNormalizationAngleMinimumValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Minimum}getNormalizationAngleMaximumValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Maximum}getNormalizationAngleDefaultValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Default}getInputCount(e){return this._json.PhysicsSettings[e].Input.length}getInputWeight(e,t){return this._json.PhysicsSettings[e].Input[t].Weight}getInputReflect(e,t){return this._json.PhysicsSettings[e].Input[t].Reflect}getInputType(e,t){return this._json.PhysicsSettings[e].Input[t].Type}getInputSourceId(e,t){return this._json.PhysicsSettings[e].Input[t].Source.Id}getOutputCount(e){return this._json.PhysicsSettings[e].Output.length}getOutputVertexIndex(e,t){return this._json.PhysicsSettings[e].Output[t].VertexIndex}getOutputAngleScale(e,t){return this._json.PhysicsSettings[e].Output[t].Scale}getOutputWeight(e,t){return this._json.PhysicsSettings[e].Output[t].Weight}getOutputDestinationId(e,t){return this._json.PhysicsSettings[e].Output[t].Destination.Id}getOutputType(e,t){return this._json.PhysicsSettings[e].Output[t].Type}getOutputReflect(e,t){return this._json.PhysicsSettings[e].Output[t].Reflect}getParticleCount(e){return this._json.PhysicsSettings[e].Vertices.length}getParticleMobility(e,t){return this._json.PhysicsSettings[e].Vertices[t].Mobility}getParticleDelay(e,t){return this._json.PhysicsSettings[e].Vertices[t].Delay}getParticleAcceleration(e,t){return this._json.PhysicsSettings[e].Vertices[t].Acceleration}getParticleRadius(e,t){return this._json.PhysicsSettings[e].Vertices[t].Radius}getParticlePosition(e,t){let n=new X(0,0);return n.x=this._json.PhysicsSettings[e].Vertices[t].Position.X,n.y=this._json.PhysicsSettings[e].Vertices[t].Position.Y,n}},Lo=`X`,Ro=`Y`,zo=`Angle`,Bo=5,Vo=100,Ho=.001,Uo=class e{static create(t){let n=new e;return n.parse(t),n._physicsRig.gravity.y=0,n}evaluate(e,t){let n,r,i,a,o=new X,s,c,l,u,d,f,p,m;d=e.getModel().parameters.values,f=e.getModel().parameters.maximumValues,p=e.getModel().parameters.minimumValues,m=e.getModel().parameters.defaultValues;for(let h=0;h=s.particleCount)break;l[t].destinationParameterIndex==-1&&(l[t].destinationParameterIndex=e.getParameterIndex(l[t].destination.id));let r=new X;r.x=u[n].position.x-u[n-1].position.x,r.y=u[n].position.y-u[n-1].position.y,a=l[t].getValue(r,u,n,l[t].reflect,this._options.gravity);let i=l[t].destinationParameterIndex,o=!Float32Array.prototype.slice&&`subarray`in Float32Array.prototype?JSON.parse(JSON.stringify(d.subarray(i))):d.slice(i);rs(o,p[i],f[i],a,l[t]);for(let e=i,t=0;e=2?t[n-1].position.substract(t[n-2].position):i.multiplyByScaler(-1),a=Z.directionToRadian(i,e),r&&(a*=-1),a}function Zo(e,t){return Math.abs(Math.max(e,t)-Math.min(e,t))}function Qo(e,t){return Math.min(e,t)+Zo(e,t)/2}function $o(e,t){return e.x}function es(e,t){return e.y}function ts(e,t){return t}function ns(e,t,n,r,i,a,o,s){let c,l,u,d,f=new X(0,0),p=new X(0,0),m=new X(0,0),h=new X(0,0);e[0].position=new X(n.x,n.y),c=Z.degreesToRadian(r),d=Z.radianToDirection(c),d.normalize();for(let n=1;nn&&(o>i.valueExceededMaximum&&(i.valueExceededMaximum=o),o=n),s=i.weight/Vo,s>=1||(o=e[0]*(1-s)+o*s),e[0]=o}function is(e,t,n,r,i,a,o,s){let c=0,l=Z.max(n,t);le&&(e=u);let d=Z.min(i,a),f=Z.max(i,a),p=o,m=Qo(u,l),h=e-m;switch(Math.sign(h)){case 1:{let e=f-p,t=l-m;t!=0&&(c=e/t*h,c+=p);break}case-1:{let e=d-p,t=u-m;t!=0&&(c=e/t*h,c+=p);break}case 0:c=p;break}return s?c:c*-1}var as=class{constructor(e=0,t=0,n=0,r=0){this.x=e,this.y=t,this.width=n,this.height=r}getCenterX(){return this.x+.5*this.width}getCenterY(){return this.y+.5*this.height}getRight(){return this.x+this.width}getBottom(){return this.y+this.height}setRect(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height}expand(e,t){this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2}},os=4,ss=10,cs,ls,us,ds=class{getChannelFlagAsColor(e){return this._channelColors[e]}getMaskRenderTexture(){let e=0;if(this._maskTexture&&this._maskTexture.texture!=0&&(this._maskTexture.frameNo=this._currentFrameNo,e=this._maskTexture.texture),e==0){let t=this._clippingMaskBufferSize;this._colorBuffer=this.gl.createTexture(),this.gl.bindTexture(this.gl.TEXTURE_2D,this._colorBuffer),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,t,t,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,null),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.bindTexture(this.gl.TEXTURE_2D,null),e=this.gl.createFramebuffer(),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e),this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,this.gl.TEXTURE_2D,this._colorBuffer,0),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,us),this._maskTexture=new fs(this._currentFrameNo,e)}return e}setGL(e){this.gl=e}calcClippedDrawTotalBounds(e,t){let n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,o=t._clippedDrawableIndexList.length;for(let s=0;sf&&(f=t),np&&(p=n)}if(u!=Number.MAX_VALUE)if(ui&&(i=f),p>a&&(a=p),n==Number.MAX_VALUE)t._allClippedDrawRect.x=0,t._allClippedDrawRect.y=0,t._allClippedDrawRect.width=0,t._allClippedDrawRect.height=0,t._isUsing=!1;else{t._isUsing=!0;let e=i-n,o=a-r;t._allClippedDrawRect.x=n,t._allClippedDrawRect.y=r,t._allClippedDrawRect.width=e,t._allClippedDrawRect.height=o}}}constructor(){this._maskRenderTexture=null,this._colorBuffer=null,this._currentFrameNo=0,this._clippingMaskBufferSize=256,this._clippingContextListForMask=[],this._clippingContextListForDraw=[],this._channelColors=[],this._tmpBoundsOnModel=new as,this._tmpMatrix=new Fa,this._tmpMatrixForMask=new Fa,this._tmpMatrixForDraw=new Fa;let e=new Ra;e.R=1,e.G=0,e.B=0,e.A=0,this._channelColors.push(e),e=new Ra,e.R=0,e.G=1,e.B=0,e.A=0,this._channelColors.push(e),e=new Ra,e.R=0,e.G=0,e.B=1,e.A=0,this._channelColors.push(e),e=new Ra,e.R=0,e.G=0,e.B=0,e.A=1,this._channelColors.push(e)}release(){var e,t,n;let r=this;for(let t=0;t0){this.gl.viewport(0,0,this._clippingMaskBufferSize,this._clippingMaskBufferSize),this._maskRenderTexture=this.getMaskRenderTexture(),t.getMvpMatrix(),t.preDraw(),this.setupLayoutBounds(n),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this._maskRenderTexture),this.gl.clearColor(1,1,1,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT);for(let n=0;n(e[e.ShaderNames_SetupMask=0]=`ShaderNames_SetupMask`,e[e.ShaderNames_NormalPremultipliedAlpha=1]=`ShaderNames_NormalPremultipliedAlpha`,e[e.ShaderNames_NormalMaskedPremultipliedAlpha=2]=`ShaderNames_NormalMaskedPremultipliedAlpha`,e[e.ShaderNames_NomralMaskedInvertedPremultipliedAlpha=3]=`ShaderNames_NomralMaskedInvertedPremultipliedAlpha`,e[e.ShaderNames_AddPremultipliedAlpha=4]=`ShaderNames_AddPremultipliedAlpha`,e[e.ShaderNames_AddMaskedPremultipliedAlpha=5]=`ShaderNames_AddMaskedPremultipliedAlpha`,e[e.ShaderNames_AddMaskedPremultipliedAlphaInverted=6]=`ShaderNames_AddMaskedPremultipliedAlphaInverted`,e[e.ShaderNames_MultPremultipliedAlpha=7]=`ShaderNames_MultPremultipliedAlpha`,e[e.ShaderNames_MultMaskedPremultipliedAlpha=8]=`ShaderNames_MultMaskedPremultipliedAlpha`,e[e.ShaderNames_MultMaskedPremultipliedAlphaInverted=9]=`ShaderNames_MultMaskedPremultipliedAlphaInverted`,e))(hs||{}),gs=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_myPos;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_clipMatrix * a_position; v_myPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,_s=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_myPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;void main(){ float isInside = step(u_baseColor.x, v_myPos.x/v_myPos.w) * step(u_baseColor.y, v_myPos.y/v_myPos.w) * step(v_myPos.x/v_myPos.w, u_baseColor.z) * step(v_myPos.y/v_myPos.w, u_baseColor.w); gl_FragColor = u_channelFlag * texture2D(s_texture0, v_texCoord).a * isInside;}`,vs=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;uniform mat4 u_matrix;void main(){ gl_Position = u_matrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,ys=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform mat4 u_matrix;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_matrix * a_position; v_clipPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,bs=`precision mediump float;varying vec2 v_texCoord;uniform vec4 u_baseColor;uniform sampler2D s_texture0;void main(){ gl_FragColor = texture2D(s_texture0 , v_texCoord) * u_baseColor;}`,xs=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;uniform sampler2D s_texture1;void main(){ vec4 col_formask = texture2D(s_texture0 , v_texCoord) * u_baseColor; vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag; float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a; col_formask = col_formask * maskVal; gl_FragColor = col_formask;}`,Ss=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform sampler2D s_texture0;uniform sampler2D s_texture1;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;void main(){vec4 col_formask = texture2D(s_texture0, v_texCoord) * u_baseColor;vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag;float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a;col_formask = col_formask * (1.0 - maskVal);gl_FragColor = col_formask;}`,Cs=class extends Ia{constructor(){super(),this._clippingContextBufferForMask=null,this._clippingContextBufferForDraw=null,this._clippingManager=new ds,this.firstDraw=!0,this._textures={},this._sortedDrawableIndexList=[],this._bufferData={vertex:null,uv:null,index:null}}initialize(e){e.isUsingMasking()&&(this._clippingManager=new ds,this._clippingManager.initialize(e,e.getDrawableCount(),e.getDrawableMasks(),e.getDrawableMaskCounts()));for(let t=e.getDrawableCount()-1;t>=0;t--)this._sortedDrawableIndexList[t]=0;super.initialize(e)}bindTexture(e,t){this._textures[e]=t}getBindedTextures(){return this._textures}setClippingMaskBufferSize(e){this._clippingManager.release(),this._clippingManager=new ds,this._clippingManager.setClippingMaskBufferSize(e),this._clippingManager.initialize(this.getModel(),this.getModel().getDrawableCount(),this.getModel().getDrawableMasks(),this.getModel().getDrawableMaskCounts())}getClippingMaskBufferSize(){return this._clippingManager.getClippingMaskBufferSize()}release(){var e,t,n;let r=this;this._clippingManager.release(),r._clippingManager=void 0,(e=this.gl)==null||e.deleteBuffer(this._bufferData.vertex),this._bufferData.vertex=null,(t=this.gl)==null||t.deleteBuffer(this._bufferData.uv),this._bufferData.uv=null,(n=this.gl)==null||n.deleteBuffer(this._bufferData.index),this._bufferData.index=null,r._bufferData=void 0,r._textures=void 0}doDrawModel(){this.preDraw(),this._clippingManager!=null&&this._clippingManager.setupClippingContext(this.getModel(),this);let e=this.getModel().getDrawableCount(),t=this.getModel().getDrawableRenderOrders();for(let n=0;n{Cs.doStaticRelease()};var ws=class{constructor(e){this.groups=e.Groups,this.hitAreas=e.HitAreas,this.layout=e.Layout,this.moc=e.FileReferences.Moc,this.expressions=e.FileReferences.Expressions,this.motions=e.FileReferences.Motions,this.textures=e.FileReferences.Textures,this.physics=e.FileReferences.Physics,this.pose=e.FileReferences.Pose}getEyeBlinkParameters(){return this.groups?.find(e=>e.Name===`EyeBlink`)?.Ids}getLipSyncParameters(){return this.groups?.find(e=>e.Name===`LipSync`)?.Ids}},Ts=`ParamAngleX`,Es=`ParamAngleY`,Ds=`ParamAngleZ`,Os=`ParamEyeBallX`,ks=`ParamEyeBallY`,As=`ParamBodyAngleX`,js=`ParamBreath`,Ms;(e=>{e.LOG_LEVEL_VERBOSE=0,e.LOG_LEVEL_WARNING=1,e.LOG_LEVEL_ERROR=2,e.LOG_LEVEL_NONE=999,e.logLevel=e.LOG_LEVEL_WARNING,e.sound=!0,e.motionSync=!0,e.motionFadingDuration=500,e.idleMotionFadingDuration=2e3,e.expressionFadingDuration=500,e.preserveExpressionOnMotion=!0,e.cubism4=no})(Ms||={});var Q={log(e,...t){Ms.logLevel<=Ms.LOG_LEVEL_VERBOSE&&console.log(`[${e}]`,...t)},warn(e,...t){Ms.logLevel<=Ms.LOG_LEVEL_WARNING&&console.warn(`[${e}]`,...t)},error(e,...t){Ms.logLevel<=Ms.LOG_LEVEL_ERROR&&console.error(`[${e}]`,...t)}};function Ns(e,t,n){return en?n:e}function Ps(e,t){t.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(n=>{n!==`constructor`&&Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})})}function Fs(e){let t=e.lastIndexOf(`/`);return t!=-1&&(e=e.slice(0,t)),t=e.lastIndexOf(`/`),t!==-1&&(e=e.slice(t+1)),e}function Is(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}var Ls=class extends _t.default{constructor(e,t){super(),this.expressions=[],this.reserveExpressionIndex=-1,this.destroyed=!1,this.settings=e,this.tag=`ExpressionManager(${e.name})`}init(){this.defaultExpression=this.createExpression({},void 0),this.currentExpression=this.defaultExpression,this.stopAllExpressions()}loadExpression(e){return Y(this,null,function*(){if(!this.definitions[e]){Q.warn(this.tag,`Undefined expression at [${e}]`);return}if(this.expressions[e]===null){Q.warn(this.tag,`Cannot set expression at [${e}] because it's already failed in loading.`);return}if(this.expressions[e])return this.expressions[e];let t=yield this._loadExpression(e);return this.expressions[e]=t,t})}_loadExpression(e){throw Error(`Not implemented.`)}setRandomExpression(){return Y(this,null,function*(){if(this.definitions.length){let e=[];for(let t=0;t-1&&ec&&(a*=c/s,o*=c/s),this.vx+=a,this.vy+=o;let l=Math.sqrt(wa(this.vx,2)+wa(this.vy,2)),u=.5*(Math.sqrt(wa(c,2)+8*c*r)-c);l>u&&(this.vx*=u/l,this.vy*=u/l),this.x+=this.vx,this.y+=this.vy}},Hs=class{constructor(e){this.json=e;let t=e.url;if(typeof t!=`string`)throw TypeError("The `url` field in settings JSON must be defined as a string.");this.url=t,this.name=Fs(this.url)}resolveURL(e){return yt.resolve(this.url,e)}replaceFiles(e){this.moc=e(this.moc,`moc`),this.pose!==void 0&&(this.pose=e(this.pose,`pose`)),this.physics!==void 0&&(this.physics=e(this.physics,`physics`));for(let t=0;t(e.push(t),t)),e}validateFiles(e){let t=(t,n)=>{let r=this.resolveURL(t);if(!e.includes(r)){if(n)throw Error(`File "${t}" is defined in settings, but doesn't exist in given files`);return!1}return!0};return[this.moc,...this.textures].forEach(e=>t(e,!0)),this.getDefinedFiles().filter(e=>t(e,!1))}},Us=(e=>(e[e.NONE=0]=`NONE`,e[e.IDLE=1]=`IDLE`,e[e.NORMAL=2]=`NORMAL`,e[e.FORCE=3]=`FORCE`,e))(Us||{}),Ws=class{constructor(){this.debug=!1,this.currentPriority=0,this.reservePriority=0}reserve(e,t,n){if(n<=0)return Q.log(this.tag,`Cannot start a motion with MotionPriority.NONE.`),!1;if(e===this.currentGroup&&t===this.currentIndex)return Q.log(this.tag,`Motion is already playing.`,this.dump(e,t)),!1;if(e===this.reservedGroup&&t===this.reservedIndex||e===this.reservedIdleGroup&&t===this.reservedIdleIndex)return Q.log(this.tag,`Motion is already reserved.`,this.dump(e,t)),!1;if(n===1){if(this.currentPriority!==0)return Q.log(this.tag,`Cannot start idle motion because another motion is playing.`,this.dump(e,t)),!1;if(this.reservedIdleGroup!==void 0)return Q.log(this.tag,`Cannot start idle motion because another idle motion has reserved.`,this.dump(e,t)),!1;this.setReservedIdle(e,t)}else{if(n<3){if(n<=this.currentPriority)return Q.log(this.tag,`Cannot start motion because another motion is playing as an equivalent or higher priority.`,this.dump(e,t)),!1;if(n<=this.reservePriority)return Q.log(this.tag,`Cannot start motion because another motion has reserved as an equivalent or higher priority.`,this.dump(e,t)),!1}this.setReserved(e,t,n)}return!0}start(e,t,n,r){if(r===1){if(this.setReservedIdle(void 0,void 0),this.currentPriority!==0)return Q.log(this.tag,`Cannot start idle motion because another motion is playing.`,this.dump(t,n)),!1}else{if(t!==this.reservedGroup||n!==this.reservedIndex)return Q.log(this.tag,`Cannot start motion because another motion has taken the place.`,this.dump(t,n)),!1;this.setReserved(void 0,void 0,0)}return e?(this.setCurrent(t,n,r),!0):!1}complete(){this.setCurrent(void 0,void 0,0)}setCurrent(e,t,n){this.currentPriority=n,this.currentGroup=e,this.currentIndex=t}setReserved(e,t,n){this.reservePriority=n,this.reservedGroup=e,this.reservedIndex=t}setReservedIdle(e,t){this.reservedIdleGroup=e,this.reservedIdleIndex=t}isActive(e,t){return e===this.currentGroup&&t===this.currentIndex||e===this.reservedGroup&&t===this.reservedIndex||e===this.reservedIdleGroup&&t===this.reservedIdleIndex}reset(){this.setCurrent(void 0,void 0,0),this.setReserved(void 0,void 0,0),this.setReservedIdle(void 0,void 0)}shouldRequestIdleMotion(){return this.currentGroup===void 0&&this.reservedIdleGroup===void 0}shouldOverrideExpression(){return!Ms.preserveExpressionOnMotion&&this.currentPriority>1}dump(e,t){return this.debug?` + group = "${e}", index = ${t} +`+[`currentPriority`,`reservePriority`,`currentGroup`,`currentIndex`,`reservedGroup`,`reservedIndex`,`reservedIdleGroup`,`reservedIdleIndex`].map(e=>`[`+e+`] `+this[e]).join(` +`):``}},Gs=`SoundManager`,Ks=.5,qs=class{static get volume(){return this._volume}static set volume(e){this._volume=(e>1?1:e<0?0:e)||0,this.audios.forEach(e=>e.volume=this._volume)}static add(e,t,n){let r=new Audio(e);return r.volume=this._volume,r.preload=`auto`,r.addEventListener(`ended`,()=>{this.dispose(r),t?.()}),r.addEventListener(`error`,t=>{this.dispose(r),Q.warn(Gs,`Error occurred on "${e}"`,t.error),n?.(t.error)}),this.audios.push(r),r}static play(e){return new Promise((t,n)=>{var r;(r=e.play())==null||r.catch(t=>{e.dispatchEvent(new ErrorEvent(`error`,{error:t})),n(t)}),e.readyState===e.HAVE_ENOUGH_DATA?t():e.addEventListener(`canplaythrough`,t)})}static dispose(e){e.pause(),e.removeAttribute(`src`),Is(this.audios,e)}static destroy(){for(let e=this.audios.length-1;e>=0;e--)this.dispose(this.audios[e])}};qs.audios=[],qs._volume=Ks;var Js=class extends _t.default{constructor(e,t){super(),this.motionGroups={},this.state=new Ws,this.playing=!1,this.destroyed=!1,this.settings=e,this.tag=`MotionManager(${e.name})`,this.state.tag=this.tag}init(e){e?.idleMotionGroup&&(this.groups.idle=e.idleMotionGroup),this.setupMotions(e),this.stopAllMotions()}setupMotions(e){for(let e of Object.keys(this.definitions))this.motionGroups[e]=[];let t;switch(e?.motionPreload){case`NONE`:return;case`ALL`:t=Object.keys(this.definitions);break;case`IDLE`:default:t=[this.groups.idle];break}for(let e of t)if(this.definitions[e])for(let t=0;tthis.currentAudio=void 0,()=>this.currentAudio=void 0),this.currentAudio=i}catch(t){Q.warn(this.tag,`Failed to create audio`,e,t)}}let a=yield this.loadMotion(e,t);if(i){let e=qs.play(i).catch(e=>Q.warn(this.tag,`Failed to play audio`,i.src,e));Ms.motionSync&&(yield e)}return this.state.start(a,e,t,n)?(Q.log(this.tag,`Start motion:`,this.getMotionName(r)),this.emit(`motionStart`,e,t,i),this.state.shouldOverrideExpression()&&this.expressionManager&&this.expressionManager.resetExpression(),this.playing=!0,this._startMotion(a),!0):(i&&(qs.dispose(i),this.currentAudio=void 0),!1)})}startRandomMotion(e,t){return Y(this,null,function*(){let n=this.definitions[e];if(n?.length){let r=[];for(let t=0;te.index>=0);for(let t of e)this.hitAreas[t.name]=t}hitTest(e,t){return Object.keys(this.hitAreas).filter(n=>this.isHit(n,e,t))}isHit(e,t,n){if(!this.hitAreas[e])return!1;let r=this.hitAreas[e].index,i=this.getDrawableBounds(r,Ys);return i.x<=t&&t<=i.x+i.width&&i.y<=n&&n<=i.y+i.height}getDrawableBounds(e,t){let n=this.getDrawableVertices(e),r=n[0],i=n[0],a=n[1],o=n[1];for(let e=0;e{(a.status===200||a.status===0)&&a.response?r(a.response):a.onerror()},a.onerror=()=>{Q.warn(Zs,`Failed to load resource as ${a.responseType} (Status ${a.status}): ${t}`),i(new Qs(`Network error.`,t,a.status))},a.onabort=()=>i(new Qs(`Aborted.`,t,a.status,!0)),a.onloadend=()=>{var t;$s.allXhrSet.delete(a),e&&((t=$s.xhrMap.get(e))==null||t.delete(a))},a}static cancelXHRs(){var e;(e=$s.xhrMap.get(this))==null||e.forEach(e=>{e.abort(),$s.allXhrSet.delete(e)}),$s.xhrMap.delete(this)}static release(){$s.allXhrSet.forEach(e=>e.abort()),$s.allXhrSet.clear(),$s.xhrMap=new WeakMap}},ec=$s;ec.xhrMap=new WeakMap,ec.allXhrSet=new Set,ec.loader=(e,t)=>new Promise((t,n)=>{$s.createXHR(e.target,e.settings?e.settings.resolveURL(e.url):e.url,e.type,n=>{e.result=n,t()},n).send()});function tc(e,t){let n=-1;return r(0);function r(i,a){if(a)return Promise.reject(a);if(i<=n)return Promise.reject(Error(`next() called multiple times`));n=i;let o=e[i];if(!o)return Promise.resolve();try{return Promise.resolve(o(t,r.bind(null,i+1)))}catch(e){return Promise.reject(e)}}}var nc=class{static load(e){return tc(this.middlewares,e).then(()=>e.result)}};nc.middlewares=[ec.loader];function rc(e,t={}){let n={resourceOptions:{crossorigin:t.crossOrigin}};if(Wn.fromURL)return Wn.fromURL(e,n).catch(e=>{if(e instanceof Error)throw e;let t=Error(`Texture loading error`);throw t.event=e,t});n.resourceOptions.autoLoad=!1;let r=Wn.from(e,n);if(r.baseTexture.valid)return Promise.resolve(r);let i=r.baseTexture.resource;return i._live2d_load??=new Promise((e,t)=>{let n=e=>{i.source.removeEventListener(`error`,n);let r=Error(`Texture loading error`);r.event=e,t(r)};i.source.addEventListener(`error`,n),i.load().then(()=>e(r)).catch(n)}),i._live2d_load}var ic=`Live2DFactory`,ac=(e,t)=>Y(void 0,null,function*(){if(typeof e.source==`string`){let t=yield nc.load({url:e.source,type:`json`,target:e.live2dModel});t.url=e.source,e.source=t,e.live2dModel.emit(`settingsJSONLoaded`,t)}return t()}),oc=(e,t)=>Y(void 0,null,function*(){if(e.source instanceof Hs)return e.settings=e.source,t();if(typeof e.source==`object`){let n=$.findRuntime(e.source);if(n){let r=n.createModelSettings(e.source);return e.settings=r,e.live2dModel.emit(`settingsLoaded`,r),t()}}throw TypeError(`Unknown settings format.`)}),sc=(e,t)=>{if(e.settings){let n=$.findRuntime(e.settings);if(n)return n.ready().then(t)}return t()},cc=(e,t)=>Y(void 0,null,function*(){yield t();let n=e.internalModel;if(n){let t=e.settings,r=$.findRuntime(t);if(r){let i=[];t.pose&&i.push(nc.load({settings:t,url:t.pose,type:`json`,target:n}).then(t=>{n.pose=r.createPose(n.coreModel,t),e.live2dModel.emit(`poseLoaded`,n.pose)}).catch(t=>{e.live2dModel.emit(`poseLoadError`,t),Q.warn(ic,`Failed to load pose.`,t)})),t.physics&&i.push(nc.load({settings:t,url:t.physics,type:`json`,target:n}).then(t=>{n.physics=r.createPhysics(n.coreModel,t),e.live2dModel.emit(`physicsLoaded`,n.physics)}).catch(t=>{e.live2dModel.emit(`physicsLoadError`,t),Q.warn(ic,`Failed to load physics.`,t)})),i.length&&(yield Promise.all(i))}}}),lc=(e,t)=>Y(void 0,null,function*(){if(e.settings){let n=e.live2dModel,r=e.settings.textures.map(t=>rc(e.settings.resolveURL(t),{crossOrigin:e.options.crossOrigin}));if(yield t(),e.internalModel)n.internalModel=e.internalModel,n.emit(`modelLoaded`,e.internalModel);else throw TypeError(`Missing internal model.`);n.textures=yield Promise.all(r),n.emit(`textureLoaded`,n.textures)}else throw TypeError(`Missing settings.`)}),uc=(e,t)=>Y(void 0,null,function*(){let n=e.settings;if(n instanceof Hs){let r=$.findRuntime(n);if(!r)throw TypeError(`Unknown model settings.`);let i=yield nc.load({settings:n,url:n.moc,type:`arraybuffer`,target:e.live2dModel});if(!r.isValidMoc(i))throw Error(`Invalid moc data`);let a=r.createCoreModel(i);return e.internalModel=r.createInternalModel(a,n,e.options),t()}throw TypeError(`Missing settings.`)}),dc=class{static registerRuntime(e){dc.runtimes.push(e),dc.runtimes.sort((e,t)=>t.version-e.version)}static findRuntime(e){for(let t of dc.runtimes)if(t.test(e))return t}static setupLive2DModel(e,t,n){return Y(this,null,function*(){let r=new Promise(t=>e.once(`textureLoaded`,t)),i=new Promise(t=>e.once(`modelLoaded`,t)),a=Promise.all([r,i]).then(()=>e.emit(`ready`));yield tc(dc.live2DModelMiddlewares,{live2dModel:e,source:t,options:n||{}}),yield a,e.emit(`load`)})}static loadMotion(e,t,n){let r=r=>e.emit(`motionLoadError`,t,n,r);try{let i=e.definitions[t]?.[n];if(!i)return Promise.resolve(void 0);e.listeners(`destroy`).includes(dc.releaseTasks)||e.once(`destroy`,dc.releaseTasks);let a=dc.motionTasksMap.get(e);a||(a={},dc.motionTasksMap.set(e,a));let o=a[t];o||(o=[],a[t]=o);let s=e.getMotionFile(i);return o[n]??(o[n]=nc.load({url:s,settings:e.settings,type:e.motionDataType,target:e}).then(r=>{let a=dc.motionTasksMap.get(e)?.[t];a&&delete a[n];let o=e.createMotion(r,t,i);return e.emit(`motionLoaded`,t,n,o),o}).catch(t=>{Q.warn(e.tag,`Failed to load motion: ${s} +`,t),r(t)})),o[n]}catch(i){Q.warn(e.tag,`Failed to load motion at "${t}"[${n}] +`,i),r(i)}return Promise.resolve(void 0)}static loadExpression(e,t){let n=n=>e.emit(`expressionLoadError`,t,n);try{let r=e.definitions[t];if(!r)return Promise.resolve(void 0);e.listeners(`destroy`).includes(dc.releaseTasks)||e.once(`destroy`,dc.releaseTasks);let i=dc.expressionTasksMap.get(e);i||(i=[],dc.expressionTasksMap.set(e,i));let a=e.getExpressionFile(r);return i[t]??(i[t]=nc.load({url:a,settings:e.settings,type:`json`,target:e}).then(n=>{let i=dc.expressionTasksMap.get(e);i&&delete i[t];let a=e.createExpression(n,r);return e.emit(`expressionLoaded`,t,a),a}).catch(t=>{Q.warn(e.tag,`Failed to load expression: ${a} +`,t),n(t)})),i[t]}catch(r){Q.warn(e.tag,`Failed to load expression at [${t}] +`,r),n(r)}return Promise.resolve(void 0)}static releaseTasks(){this instanceof Js?dc.motionTasksMap.delete(this):dc.expressionTasksMap.delete(this)}},$=dc;$.runtimes=[],$.urlToJSON=ac,$.jsonToSettings=oc,$.waitUntilReady=sc,$.setupOptionals=cc,$.setupEssentials=lc,$.createInternalModel=uc,$.live2DModelMiddlewares=[ac,oc,sc,cc,lc,uc],$.motionTasksMap=new WeakMap,$.expressionTasksMap=new WeakMap,Js.prototype._loadMotion=function(e,t){return $.loadMotion(this,e,t)},Ls.prototype._loadExpression=function(e){return $.loadExpression(this,e)};var fc=class{constructor(){this._autoInteract=!1}get autoInteract(){return this._autoInteract}set autoInteract(e){e!==this._autoInteract&&(e?this.on(`pointertap`,pc,this):this.off(`pointertap`,pc,this),this._autoInteract=e)}registerInteraction(e){e!==this.interactionManager&&(this.unregisterInteraction(),this._autoInteract&&e&&(this.interactionManager=e,e.on(`pointermove`,mc,this)))}unregisterInteraction(){var e;this.interactionManager&&=((e=this.interactionManager)==null||e.off(`pointermove`,mc,this),void 0)}};function pc(e){this.tap(e.data.global.x,e.data.global.y)}function mc(e){this.focus(e.data.global.x,e.data.global.y)}var hc=class extends vn{},gc=new on,_c=new ln,vc,yc=class extends xa{constructor(e){super(),this.tag=`Live2DModel(uninitialized)`,this.textures=[],this.transform=new hc,this.anchor=new cn(this.onAnchorChange,this,0,0),this.glContextID=-1,this.elapsedTime=performance.now(),this.deltaTime=0,this._autoUpdate=!1,this.once(`modelLoaded`,()=>this.init(e))}static from(e,t){let n=new this(t);return $.setupLive2DModel(n,e,t).then(()=>n)}static fromSync(e,t){let n=new this(t);return $.setupLive2DModel(n,e,t).then(t?.onLoad).catch(t?.onError),n}static registerTicker(e){vc=e}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){vc||=window.PIXI?.Ticker,e?this._destroyed||(vc?(vc.shared.add(this.onTickerUpdate,this),this._autoUpdate=!0):Q.warn(this.tag,`No Ticker registered, please call Live2DModel.registerTicker(Ticker).`)):(vc?.shared.remove(this.onTickerUpdate,this),this._autoUpdate=!1)}init(e){this.tag=`Live2DModel(${this.internalModel.settings.name})`;let t=Object.assign({autoUpdate:!0,autoInteract:!0},e);t.autoInteract&&(this.interactive=!0),this.autoInteract=t.autoInteract,this.autoUpdate=t.autoUpdate}onAnchorChange(){this.pivot.set(this.anchor.x*this.internalModel.width,this.anchor.y*this.internalModel.height)}motion(e,t,n){return t===void 0?this.internalModel.motionManager.startRandomMotion(e,n):this.internalModel.motionManager.startMotion(e,t,n)}expression(e){return this.internalModel.motionManager.expressionManager?e===void 0?this.internalModel.motionManager.expressionManager.setRandomExpression():this.internalModel.motionManager.expressionManager.setExpression(e):Promise.resolve(!1)}focus(e,t,n=!1){gc.x=e,gc.y=t,this.toModelPosition(gc,gc,!0);let r=gc.x/this.internalModel.originalWidth*2-1,i=gc.y/this.internalModel.originalHeight*2-1,a=Math.atan2(i,r);this.internalModel.focusController.focus(Math.cos(a),-Math.sin(a),n)}tap(e,t){let n=this.hitTest(e,t);n.length&&(Q.log(this.tag,`Hit`,n),this.emit(`hit`,n))}hitTest(e,t){return gc.x=e,gc.y=t,this.toModelPosition(gc,gc),this.internalModel.hitTest(gc.x,gc.y)}toModelPosition(e,t=e.clone(),n){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.transform.worldTransform.applyInverse(e,t),this.internalModel.localTransform.applyInverse(t,t),t}containsPoint(e){return this.getBounds(!0).contains(e.x,e.y)}_calculateBounds(){this._bounds.addFrame(this.transform,0,0,this.internalModel.width,this.internalModel.height)}onTickerUpdate(){this.update(vc.shared.deltaMS)}update(e){this.deltaTime+=e,this.elapsedTime+=e}_render(e){this.registerInteraction(e.plugins.interaction),e.batch.reset(),e.geometry.reset(),e.shader.reset(),e.state.reset();let t=!1;this.glContextID!==e.CONTEXT_UID&&(this.glContextID=e.CONTEXT_UID,this.internalModel.updateWebGLContext(e.gl,this.glContextID),t=!0);for(let n=0;nt.destroy(e.baseTexture)),this.internalModel.destroy(),super.destroy(e)}};Ps(yc,[fc]);var bc=class{static resolveURL(e,t){let n=bc.filesMap[e]?.[t];if(n===void 0)throw Error(`Cannot find this file from uploaded files: `+t);return n}static upload(e,t){return Y(this,null,function*(){let n={};for(let r of t.getDefinedFiles()){let i=decodeURI(yt.resolve(t.url,r)),a=e.find(e=>e.webkitRelativePath===i);a&&(n[r]=URL.createObjectURL(a))}bc.filesMap[t._objectURL]=n})}static createSettings(e){return Y(this,null,function*(){let t=e.find(e=>e.name.endsWith(`model.json`)||e.name.endsWith(`model3.json`));if(!t)throw TypeError(`Settings file not found`);let n=yield bc.readText(t),r=JSON.parse(n);r.url=t.webkitRelativePath;let i=$.findRuntime(r);if(!i)throw Error(`Unknown settings JSON`);let a=i.createModelSettings(r);return a._objectURL=URL.createObjectURL(t),a})}static readText(e){return Y(this,null,function*(){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsText(e,`utf8`)})})}},xc=bc;xc.filesMap={},xc.factory=(e,t)=>Y(void 0,null,function*(){if(Array.isArray(e.source)&&e.source[0]instanceof File){let t=e.source,n=t.settings;if(!n)n=yield bc.createSettings(t);else if(!n._objectURL)throw Error(`"_objectURL" must be specified in ModelSettings`);n.validateFiles(t.map(e=>encodeURI(e.webkitRelativePath))),yield bc.upload(t,n),n.resolveURL=function(e){return bc.resolveURL(this._objectURL,e)},e.source=n,e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){let e=this.settings._objectURL;if(URL.revokeObjectURL(e),bc.filesMap[e])for(let t of Object.values(bc.filesMap[e]))URL.revokeObjectURL(t);delete bc.filesMap[e]})})}return t()}),$.live2DModelMiddlewares.unshift(xc.factory);var Sc=class{static unzip(e,t){return Y(this,null,function*(){let n=yield Sc.getFilePaths(e),r=[];for(let e of t.getDefinedFiles()){let i=decodeURI(yt.resolve(t.url,e));n.includes(i)&&r.push(i)}let i=yield Sc.getFiles(e,r);for(let e=0;ee.endsWith(`model.json`)||e.endsWith(`model3.json`));if(!t)throw Error(`Settings file not found`);let n=yield Sc.readText(e,t);if(!n)throw Error(`Empty settings file: `+t);let r=JSON.parse(n);r.url=t;let i=$.findRuntime(r);if(!i)throw Error(`Unknown settings JSON`);return i.createModelSettings(r)})}static zipReader(e,t){return Y(this,null,function*(){throw Error(`Not implemented`)})}static getFilePaths(e){return Y(this,null,function*(){throw Error(`Not implemented`)})}static getFiles(e,t){return Y(this,null,function*(){throw Error(`Not implemented`)})}static readText(e,t){return Y(this,null,function*(){throw Error(`Not implemented`)})}static releaseReader(e){}},Cc=Sc;if(Cc.ZIP_PROTOCOL=`zip://`,Cc.uid=0,Cc.factory=(e,t)=>Y(void 0,null,function*(){let n=e.source,r,i,a;if(typeof n==`string`&&(n.endsWith(`.zip`)||n.startsWith(Sc.ZIP_PROTOCOL))?(r=n.startsWith(Sc.ZIP_PROTOCOL)?n.slice(Sc.ZIP_PROTOCOL.length):n,i=yield nc.load({url:r,type:`blob`,target:e.live2dModel})):Array.isArray(n)&&n.length===1&&n[0]instanceof File&&n[0].name.endsWith(`.zip`)&&(i=n[0],r=URL.createObjectURL(i),a=n.settings),i){if(!i.size)throw Error(`Empty zip file`);let t=yield Sc.zipReader(i,r);a||=yield Sc.createSettings(t),a._objectURL=Sc.ZIP_PROTOCOL+Sc.uid+`/`+a.url;let n=yield Sc.unzip(t,a);n.settings=a,e.source=n,r.startsWith(`blob:`)&&e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){URL.revokeObjectURL(r)})}),Sc.releaseReader(t)}return t()}),$.live2DModelMiddlewares.unshift(Cc.factory),!window.Live2DCubismCore)throw Error(`Could not find Cubism 4 runtime. This plugin requires live2dcubismcore.js to be loaded.`);var wc=class extends Ls{constructor(e,t){super(e,t),this.queueManager=new Oo,this.definitions=e.expressions??[],this.init()}isFinished(){return this.queueManager.isFinished()}getExpressionIndex(e){return this.definitions.findIndex(t=>t.Name===e)}getExpressionFile(e){return e.File}createExpression(e,t){return eo.create(e)}_setExpression(e){return this.queueManager.startMotion(e,!1,performance.now())}stopAllExpressions(){this.queueManager.stopAllMotions()}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}},Tc=class e extends Hs{constructor(t){if(super(t),!e.isValidJSON(t))throw TypeError(`Invalid JSON.`);Object.assign(this,new ws(t))}static isValidJSON(e){return!!e?.FileReferences&&typeof e.FileReferences.Moc==`string`&&e.FileReferences.Textures?.length>0&&e.FileReferences.Textures.every(e=>typeof e==`string`)}replaceFiles(e){if(super.replaceFiles(e),this.motions)for(let[t,n]of Object.entries(this.motions))for(let r=0;r{this.emit(`motion:`+t)})}isFinished(){return this.queueManager.isFinished()}_startMotion(e,t){return e.setFinishedMotionHandler(t),this.queueManager.stopAllMotions(),this.queueManager.startMotion(e,!1,performance.now())}_stopAllMotions(){this.queueManager.stopAllMotions()}createMotion(e,t,n){let r=Eo.create(e),i=new uo(e),a=(t===this.groups.idle?Ms.idleMotionFadingDuration:Ms.motionFadingDuration)/1e3;return i.getMotionFadeInTime()===void 0&&r.setFadeInTime(n.FadeInTime>0?n.FadeInTime:a),i.getMotionFadeOutTime()===void 0&&r.setFadeOutTime(n.FadeOutTime>0?n.FadeOutTime:a),r.setEffectIds(this.eyeBlinkIds,this.lipSyncIds),r}getMotionFile(e){return e.File}getMotionName(e){return e.File}getSoundFile(e){return e.Sound}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}destroy(){super.destroy(),this.queueManager.release(),this.queueManager=void 0}},Dc=new Fa,Oc=class extends Xs{constructor(e,t,n){super(),this.lipSync=!0,this.breath=Ta.create(),this.renderer=new Cs,this.idParamAngleX=Ts,this.idParamAngleY=Es,this.idParamAngleZ=Ds,this.idParamEyeBallX=Os,this.idParamEyeBallY=ks,this.idParamBodyAngleX=As,this.idParamBreath=js,this.pixelsPerUnit=1,this.centeringTransform=new ln,this.coreModel=e,this.settings=t,this.motionManager=new Ec(t,n),this.init()}init(){super.init(),this.settings.getEyeBlinkParameters()?.length>0&&(this.eyeBlink=Oa.create(this.settings)),this.breath.setParameters([new Ea(this.idParamAngleX,0,15,6.5345,.5),new Ea(this.idParamAngleY,0,8,3.5345,.5),new Ea(this.idParamAngleZ,0,10,5.5345,.5),new Ea(this.idParamBodyAngleX,0,4,15.5345,.5),new Ea(this.idParamBreath,0,.5,3.2345,.5)]),this.renderer.initialize(this.coreModel),this.renderer.setIsPremultipliedAlpha(!0)}getSize(){return[this.coreModel.getModel().canvasinfo.CanvasWidth,this.coreModel.getModel().canvasinfo.CanvasHeight]}getLayout(){let e={};if(this.settings.layout)for(let t of Object.keys(this.settings.layout)){let n=t.charAt(0).toLowerCase()+t.slice(1);e[n]=this.settings.layout[t]}return e}setupLayout(){super.setupLayout(),this.pixelsPerUnit=this.coreModel.getModel().canvasinfo.PixelsPerUnit,this.centeringTransform.scale(this.pixelsPerUnit,this.pixelsPerUnit).translate(this.originalWidth/2,this.originalHeight/2)}updateWebGLContext(e,t){this.renderer.firstDraw=!0,this.renderer._bufferData={vertex:null,uv:null,index:null},this.renderer.startUp(e),this.renderer._clippingManager._currentFrameNo=t,this.renderer._clippingManager._maskTexture=void 0,ms.getInstance()._shaderSets=[]}bindTexture(e,t){this.renderer.bindTexture(e,t)}getHitAreaDefs(){return this.settings.hitAreas?.map(e=>({id:e.Id,name:e.Name,index:this.coreModel.getDrawableIndex(e.Id)}))??[]}getDrawableIDs(){return this.coreModel.getDrawableIds()}getDrawableIndex(e){return this.coreModel.getDrawableIndex(e)}getDrawableVertices(e){if(typeof e==`string`&&(e=this.coreModel.getDrawableIndex(e),e===-1))throw TypeError(`Unable to find drawable ID: `+e);let t=this.coreModel.getDrawableVertices(e).slice();for(let e=0;e{function n(){try{Mc(),e()}catch(e){if(Ac--,Ac<0){let n=Error(`Failed to start up Cubism 4 framework.`);n.cause=e,t(n);return}Q.log(`Cubism4`,`Startup failed, retrying 10ms later...`),setTimeout(n,10)}}n()}),kc)}function Mc(e){e=Object.assign({logFunction:console.log,loggingLevel:Wa.LogLevel_Verbose},e),Ua.startUp(e),Ua.initialize()}$.registerRuntime({version:4,ready:jc,test(e){return e instanceof Tc||Tc.isValidJSON(e)},isValidMoc(e){if(e.byteLength<4)return!1;let t=new Int8Array(e,0,4);return String.fromCharCode(...t)===`MOC3`},createModelSettings(e){return new Tc(e)},createCoreModel(e){let t=Za.create(e);try{let e=t.createModel();return e.__moc=t,e}catch(e){try{t.release()}catch{}throw e}},createInternalModel(e,t,n){let r=new Oc(e,t,n),i=e;return i.__moc&&(r.__moc=i.__moc,delete i.__moc,r.once(`destroy`,Nc)),r},createPhysics(e,t){return Uo.create(t)},createPose(e,t){return Ma.create(t)}});function Nc(){var e;(e=this.__moc)==null||e.release()}var Pc=t(n(((t,n)=>{(function(e){typeof t==`object`&&n!==void 0?n.exports=e():typeof define==`function`&&define.amd?define([],e):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=e()})(function(){return function t(n,r,i){function a(s,c){if(!r[s]){if(!n[s]){var l=typeof e==`function`&&e;if(!c&&l)return l(s,!0);if(o)return o(s,!0);var u=Error(`Cannot find module '`+s+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=r[s]={exports:{}};n[s][0].call(d.exports,function(e){var t=n[s][1][e];return a(t||e)},d,d.exports,t,n,r,i)}return r[s].exports}for(var o=typeof e==`function`&&e,s=0;s>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` +\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new ne(4,4,8,4,ee),new ne(4,5,16,8,ee),new ne(4,6,32,32,ee),new ne(4,4,16,16,te),new ne(8,16,32,32,te),new ne(8,16,128,128,te),new ne(8,32,128,256,te),new ne(32,128,258,1024,te),new ne(32,258,258,4096,te)],n.deflateInit=function(e,t){return oe(e,t,g,15,8,0)},n.deflateInit2=oe,n.deflateReset=ae,n.deflateResetKeep=ie,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+ E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[ee[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function ee(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function te(e){var t;for(t=0;t>1;1<=n;n--)ie(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ie(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,ie(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?ue(e,t,n,r):e.strategy===4||s===o?(R(e,2+(r?1:0),3),ae(e,T,E)):(R(e,4+(r?1:0),3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1);Cc.zipReader=(e,t)=>Pc.default.loadAsync(e);var Fc=Cc.createSettings;Cc.createSettings=async e=>{let t=Object.keys(e.files);return t.find(e=>Ic(e))?Fc(e):zc(t)};function Ic(e){return e.endsWith(`model3.json`)}function Lc(e){return e.endsWith(`.moc3`)}function Rc(e){return e.split(/[\\/]/).pop()}function zc(e){let t=e.filter(e=>Lc(e));if(t.length!==1){let e=t.length?`(${t.map(e=>`"${e}"`).join(`,`)})`:``;throw Error(`Expected exactly one moc file, got ${t.length} ${e}`)}let n=t[0],r=Rc(n).replace(/\.moc3?/,``),i=e.filter(e=>e.endsWith(`.png`));if(!i.length)throw Error(`Textures not found`);let a=e.filter(e=>e.endsWith(`.mtn`)||e.endsWith(`.motion3.json`)),o=e.find(e=>e.includes(`physics`)),s=e.find(e=>e.includes(`pose`)),c=new Tc({url:`${r}.model3.json`,Version:3,FileReferences:{Moc:n,Textures:i,Physics:o,Pose:s,Motions:a.length?{"":a.map(e=>({File:e}))}:void 0}});return c.name=r,c._objectURL=`example://${c.url}`,c}Cc.readText=(e,t)=>{let n=e.file(t);if(!n)throw Error(`Cannot find file: ${t}`);return n.async(`text`)},Cc.getFilePaths=e=>{let t=[];return e.forEach(e=>t.push(e)),Promise.resolve(t)},Cc.getFiles=(e,t)=>Promise.all(t.map(async t=>{let n=t.slice(t.lastIndexOf(`/`)+1),r=await e.file(t).async(`blob`);return new File([r],n)}));var Bc=class e{static async readDirectoryRecursive(t,n){let r=[];for await(let i of t.values())if(i.kind===`file`){let e=await i.getFile();if(e.name===`__meta.json`)continue;Object.defineProperty(e,`webkitRelativePath`,{value:n+e.name}),r.push(e)}else if(i.kind===`directory`){let t=`${n+i.name}/`,a=await e.readDirectoryRecursive(i,t);r.push(...a)}return r}static async resolveDirectory(e,t){let n=e;if(!t||t===`.`||t===`./`)return n;let r=t.split(`/`).filter(e=>e&&e!==`.`);for(let e of r)n=await n.getDirectoryHandle(e,{create:!0});return n}static async writeFile(t,n,r){let i=n.split(`/`),a=i.pop(),o=i.join(`/`),s=await(await(await e.resolveDirectory(t,o)).getFileHandle(a,{create:!0})).createWritable();await s.write(r),await s.close()}static async readMeta(e){try{let t=await(await(await e.getFileHandle(`__meta.json`,{create:!1})).getFile()).text();return JSON.parse(t)}catch{return null}}static async get(t,n){try{let r=await(await navigator.storage.getDirectory()).getDirectoryHandle(t,{create:!1});console.debug(`[OPFS] Cache hit for ${t}`);let i=await e.readMeta(r);if(i?.sourceUrl&&i.sourceUrl!==n)return console.debug(`[OPFS] Cache mismatch for ${t}, source url changed`),null;let a=await e.readDirectoryRecursive(r,``);if(a.length>0)return a}catch{}return null}static async save(t,n,r){console.debug(`[OPFS] Saving ${n.length} files to ${t}`);try{let i=await(await navigator.storage.getDirectory()).getDirectoryHandle(t,{create:!0}),a=[];for(let t of n){let n=t.webkitRelativePath||t.name;a.push(e.writeFile(i,n,t))}if(!n.find(e=>e.name.endsWith(`model.json`)||e.name.endsWith(`model3.json`))){let t=n.settings;if(t){console.debug(`[OPFS] Reconstructing settings file...`);let n=JSON.stringify(t.json),r=t.url||`model.model3.json`;a.push(e.writeFile(i,r,n))}}await Promise.all(a),r&&await e.writeFile(i,`__meta.json`,JSON.stringify({sourceUrl:r})),console.debug(`[OPFS] Saved to cache`)}catch(e){console.error(`[OPFS] Failed to save to cache:`,e)}}static checkMiddleware=async(t,n)=>{let r=t.source,i,a;if(typeof r==`object`&&r&&`id`in r&&`url`in r)i=r.id,a=r.url;else return n();if(!i||!a||!a.startsWith(`blob:`)&&!a.endsWith(`.zip`))return t.source=a,n();let o=await e.get(i,a);if(o)return t.source=o,n();console.debug(`[OPFS] Cache miss for ${i}`),t.opfsKey=i,t.opfsUrl=a;try{let e=await(await fetch(a)).blob(),n=`${i}.zip`;t.source=[new File([e],n)]}catch(e){throw console.error(`[OPFS] Failed to fetch blob for ${i}`,e),e}return n()};static saveMiddleware=async(t,n)=>{if(!t.opfsKey||!Array.isArray(t.source))return n();let r=t.source;return r.length===0||!(r[0]instanceof File)||await e.save(t.opfsKey,r,t.opfsUrl),n()}},Vc=$.live2DModelMiddlewares.indexOf(Cc.factory);$.live2DModelMiddlewares.includes(Bc.checkMiddleware)||(Vc===-1?console.warn(`[OPFS] ZipLoader not found in middlewares, caching disabled`):($.live2DModelMiddlewares.splice(Vc,0,Bc.checkMiddleware),$.live2DModelMiddlewares.splice(Vc+2,0,Bc.saveMiddleware)));var Hc=t(Se(),1);let Uc=function(e){return e.Live2dZip=`live2d-zip`,e.Live2dDirectory=`live2d-directory`,e.VRM=`vrm`,e.PMXZip=`pmx-zip`,e.PMXDirectory=`pmx-directory`,e.PMD=`pmd`,e}({});var Wc=new URL(`/assets/hiyori_pro_zh-BOkrWUw6.zip`,``+import.meta.url).href,Gc=new URL(`/assets/hiyori_free_zh-D9UJNK98.zip`,``+import.meta.url).href,Kc=new URL(`/assets/preview-BifEn9T1.png`,``+import.meta.url).href,qc=new URL(`/assets/AvatarSample_A-BNRNjuVT.vrm`,``+import.meta.url).href,Jc=new URL(`/assets/preview-BFkGxoPo.png`,``+import.meta.url).href,Yc=new URL(`/assets/AvatarSample_B-Cgr_Y5fe.vrm`,``+import.meta.url).href,Xc=new URL(`/assets/preview-Bbc27ubS.png`,``+import.meta.url).href,Zc=[{id:`preset-live2d-1`,format:Uc.Live2dZip,type:`url`,url:Wc,name:`Hiyori (Pro)`,previewImage:Kc,importedAt:1733113886840},{id:`preset-live2d-2`,format:Uc.Live2dZip,type:`url`,url:Gc,name:`Hiyori (Free)`,previewImage:Kc,importedAt:1733113886840},{id:`preset-vrm-1`,format:Uc.VRM,type:`url`,url:qc,name:`AvatarSample_A`,previewImage:Jc,importedAt:1733113886840},{id:`preset-vrm-2`,format:Uc.VRM,type:`url`,url:Yc,name:`AvatarSample_B`,previewImage:Xc,importedAt:1733113886840}];const Qc=l(`display-models`,()=>{let e=c([]),t=c(!1);async function n(){await f(t).toBe(!1),t.value=!0;let n=[...Zc];try{await Hc.default.iterate((e,t)=>{t.startsWith(`display-model-`)&&n.push({id:t,format:e.format,type:`file`,file:e.file,name:e.file.name,importedAt:e.importedAt,previewImage:e.previewImage})})}catch(e){console.error(e)}e.value=n.sort((e,t)=>t.importedAt-e.importedAt),t.value=!1}async function r(e){return await f(t).toBe(!1),await Hc.default.getItem(e)||Zc.find(t=>t.id===e)}async function i(e){yc.registerTicker($t),Yt.add(en);let t=document.createElement(`canvas`);t.width=720,t.height=1280,t.style.position=`absolute`,t.style.top=`0`,t.style.left=`0`,t.style.objectFit=`cover`,t.style.display=`block`,t.style.zIndex=`10000000000`,t.style.opacity=`0`,document.body.appendChild(t);let n=new Ca({view:t,preserveDrawingBuffer:!0,backgroundAlpha:0,resizeTo:window}),r=new yc,i=URL.createObjectURL(e),a=await(await fetch(i)).blob();try{await $.setupLive2DModel(r,[new File([a],e.name)],{autoInteract:!1})}catch(e){n.destroy(),document.body.removeChild(t),URL.revokeObjectURL(i),console.error(e);return}n.stage.addChild(r),r.x=275,r.y=450,r.width=t.width,r.height=t.height,r.scale.set(.1,.1),r.anchor.set(.5,.5),await new Promise(e=>setTimeout(e,500)),n.renderer.render(n.stage);let o=xe(t),s=document.createElement(`canvas`);s.width=o.width>o.height/16*12?o.width:o.height/16*12,s.height=s.width/12*16,s.getContext(`2d`).drawImage(o,(s.width-o.width)/2,(s.height-o.height)/2,o.width,o.height);let c=s.toDataURL();return n.destroy(),document.body.removeChild(t),URL.revokeObjectURL(i),c}async function a(n,r){await f(t).toBe(!1);let a={id:`display-model-${_()}`,format:n,type:`file`,file:r,name:r.name,importedAt:Date.now()};if(n===Uc.Live2dZip){let e=await i(r);if(!e)return;a.previewImage=e}e.value.unshift(a),Hc.default.setItem(a.id,a).catch(e=>console.error(e))}async function o(e,n){await f(t).toBe(!1);let r=await Hc.default.getItem(e);r&&(r.name=n)}async function s(n){await f(t).toBe(!1),await Hc.default.removeItem(n),e.value=e.value.filter(e=>e.id!==n)}async function l(){await n();let t=e.value.filter(e=>e.type===`file`).map(e=>e.id);for(let e of t)await s(e);e.value=[...Zc].sort((e,t)=>t.importedAt-e.importedAt)}return{displayModels:e,displayModelsFromIndexedDBLoading:t,loadDisplayModelsFromIndexedDB:n,getDisplayModel:r,addDisplayModel:a,renameDisplayModel:o,removeDisplayModel:s,resetDisplayModels:l}});var $c={"zh-CN":`zh-Hans`,"zh-TW":`zh-Hans`,"zh-HK":`zh-Hans`,"zh-Hant":`zh-Hans`,"en-US":`en`,"en-GB":`en`,"en-AU":`en`,en:`en`,"es-ES":`es`,"es-MX":`es`,"es-AR":`es`,es:`es`,ru:`ru`,"ru-RU":`ru`,fr:`fr`,"fr-FR":`fr`};const el=220.44;var tl=g(`oklch`),nl=e=>e?tl(e)?.h:el;const rl=l(`settings`,()=>{let e=Qc(),[t,n]=d(`settings/language`,``),[r,a]=d(`settings/stage/model`,`preset-live2d-1`),[o,s]=u(void 0),[c,l]=u(void 0),[f,p]=u(void 0);async function h(){if(!r.value){c.value=void 0,o.value=void 0,f.value=`disabled`;return}let t=await e.getDisplayModel(r.value);if(!t){c.value=void 0,o.value=void 0,f.value=`disabled`;return}switch(t.format){case Uc.Live2dZip:f.value=`live2d`;break;case Uc.VRM:f.value=`vrm`;break;default:f.value=`disabled`;break}t.type===`file`?(c.value&&URL.revokeObjectURL(c.value),c.value=URL.createObjectURL(t.file)):c.value=t.url,o.value=t}async function g(){await h()}m(`unload`,()=>{c.value&&URL.revokeObjectURL(c.value)});let[_,v]=u(!1),[y,b]=d(`settings/live2d/disable-focus`,!1),[x,S]=d(`settings/live2d/idle-animation-enabled`,!0),[C,w]=d(`settings/live2d/auto-blink-enabled`,!0),[T,E]=d(`settings/live2d/shadow-enabled`,!0),[D,O]=d(`settings/disable-transitions`,!0),[k,A]=d(`settings/use-page-specific-transitions`,!0),[j,M]=d(`settings/theme/colors/hue`,el),[N,P]=d(`settings/theme/colors/hue-dynamic`,!1),[F,I]=d(`settings/allow-visible-on-all-workspaces`,!0);function L(){let e=localStorage.getItem(`settings/language`);e||=navigator.language||`en`;let t=Object.keys(be);return $c[e||`en`]!=null&&(e=$c[e||`en`]),e&&t.includes(e)?e:`en`}function R(e=el){j.value=e,N.value=!1}function z(e){R(nl(e))}function B(e){if(N.value)return!1;let t=nl(e);if(!t)return!1;let n=Math.abs(t-j.value);return n<.01||n>359.99}async function ee(){c.value&&URL.revokeObjectURL(c.value),n(),a(),s(),l(),p(),v(),b(),S(),w(),E(),O(),A(),M(),P(),I(),await h()}return i(()=>t.value=L()),{disableTransitions:D,usePageSpecificTransitions:k,language:t,stageModelRenderer:f,stageModelSelected:r,stageModelSelectedUrl:c,stageModelSelectedDisplayModel:o,stageViewControlsEnabled:_,live2dDisableFocus:y,live2dIdleAnimationEnabled:x,live2dAutoBlinkEnabled:C,live2dShadowEnabled:T,themeColorsHue:j,themeColorsHueDynamic:N,allowVisibleOnAllWorkspaces:F,setThemeColorsHue:R,applyPrimaryColorFrom:z,isColorSelectedForPrimary:B,initializeStageModel:g,updateStageModel:h,resetState:ee}}),il=l(`settings-audio-devices`,()=>{let{audioInputs:e,deviceConstraints:t,selectedAudioInput:n,startStream:r,stopStream:o,stream:s,askPermission:c}=S(),[l,u]=d(`settings/audio/input`,n.value),[f,p]=d(`settings/audio/input/enabled`,!1);a(l,e=>{n.value=e}),a(f,e=>{e?r():o()}),i(()=>{f.value&&l.value&&r(),n.value&&!f.value&&(l.value=n.value)});function m(){u(),n.value=``,p(),o()}return{audioInputs:e,deviceConstraints:t,selectedAudioInput:l,enabled:f,stream:s,askPermission:c,startStream:r,stopStream:o,resetState:m}});export{Ne as C,x as D,be as E,C as O,V as S,ke as T,en as _,Qc as a,Dt as b,Us as c,Wn as d,ea as f,$t as g,on as h,Uc as i,Ca as l,cn as m,rl as n,$ as o,rn as p,il as r,yc as s,el as t,oi as u,Yt as v,je as w,G as x,Tt as y}; \ No newline at end of file