From 00bf881f56819f37898b3b7eb29a28661f0bca88 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 6 Feb 2025 18:19:28 +0800 Subject: [PATCH 01/26] refactor: restructure Live2D frontend architecture --- packages/live2d/.gitignore | 13 +++ packages/live2d/README.md | 29 +++++++ packages/live2d/biome.json | 30 +++++++ packages/live2d/index.html | 13 +++ packages/live2d/package.json | 35 ++++++++ packages/live2d/postcss.config.mjs | 5 ++ packages/live2d/src/Demo.tsx | 13 +++ packages/live2d/src/common/UnoLitElement.ts | 4 + .../live2d/src/components/Live2dCanvas.tsx | 22 +++++ packages/live2d/src/components/Live2dTips.tsx | 22 +++++ .../live2d/src/components/Live2dToggle.tsx | 59 ++++++++++++++ .../live2d/src/components/Live2dTools.tsx | 22 +++++ .../live2d/src/components/Live2dWidget.tsx | 23 ++++++ packages/live2d/src/env.d.ts | 1 + packages/live2d/src/events/index.ts | 3 + packages/live2d/src/helpers/sendMessage.ts | 18 +++++ packages/live2d/src/index.ts | 5 ++ packages/live2d/src/live2d/model.ts | 81 +++++++++++++++++++ packages/live2d/src/styles/unocss.global.css | 1 + .../live2d/src/styles/unocss.global.css.d.ts | 2 + packages/live2d/src/types/index.ts | 20 +++++ packages/live2d/src/util/UnoMixin.ts | 20 +++++ packages/live2d/src/util/isString.ts | 7 ++ packages/live2d/tsconfig.json | 31 +++++++ packages/live2d/tsconfig.tsbuildinfo | 1 + packages/live2d/uno.config.ts | 9 +++ packages/live2d/vite.config.ts | 24 ++++++ 27 files changed, 513 insertions(+) create mode 100644 packages/live2d/.gitignore create mode 100644 packages/live2d/README.md create mode 100644 packages/live2d/biome.json create mode 100644 packages/live2d/index.html create mode 100644 packages/live2d/package.json create mode 100644 packages/live2d/postcss.config.mjs create mode 100644 packages/live2d/src/Demo.tsx create mode 100644 packages/live2d/src/common/UnoLitElement.ts create mode 100644 packages/live2d/src/components/Live2dCanvas.tsx create mode 100644 packages/live2d/src/components/Live2dTips.tsx create mode 100644 packages/live2d/src/components/Live2dToggle.tsx create mode 100644 packages/live2d/src/components/Live2dTools.tsx create mode 100644 packages/live2d/src/components/Live2dWidget.tsx create mode 100644 packages/live2d/src/env.d.ts create mode 100644 packages/live2d/src/events/index.ts create mode 100644 packages/live2d/src/helpers/sendMessage.ts create mode 100644 packages/live2d/src/index.ts create mode 100644 packages/live2d/src/live2d/model.ts create mode 100644 packages/live2d/src/styles/unocss.global.css create mode 100644 packages/live2d/src/styles/unocss.global.css.d.ts create mode 100644 packages/live2d/src/types/index.ts create mode 100644 packages/live2d/src/util/UnoMixin.ts create mode 100644 packages/live2d/src/util/isString.ts create mode 100644 packages/live2d/tsconfig.json create mode 100644 packages/live2d/tsconfig.tsbuildinfo create mode 100644 packages/live2d/uno.config.ts create mode 100644 packages/live2d/vite.config.ts diff --git a/packages/live2d/.gitignore b/packages/live2d/.gitignore new file mode 100644 index 0000000..38d7344 --- /dev/null +++ b/packages/live2d/.gitignore @@ -0,0 +1,13 @@ +# Local +.DS_Store +*.local +*.log* + +# Dist +node_modules +dist/ + +# IDE +.vscode/* +!.vscode/extensions.json +.idea diff --git a/packages/live2d/README.md b/packages/live2d/README.md new file mode 100644 index 0000000..37b1dd3 --- /dev/null +++ b/packages/live2d/README.md @@ -0,0 +1,29 @@ +# Rsbuild Project + +## Setup + +Install the dependencies: + +```bash +pnpm install +``` + +## Get Started + +Start the dev server: + +```bash +pnpm dev +``` + +Build the app for production: + +```bash +pnpm build +``` + +Preview the production build locally: + +```bash +pnpm preview +``` diff --git a/packages/live2d/biome.json b/packages/live2d/biome.json new file mode 100644 index 0000000..f281009 --- /dev/null +++ b/packages/live2d/biome.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.8.0/schema.json", + "organizeImports": { + "enabled": true + }, + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "formatter": { + "indentStyle": "space" + }, + "javascript": { + "formatter": { + "quoteStyle": "single" + } + }, + "css": { + "parser": { + "cssModules": true + } + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + } +} diff --git a/packages/live2d/index.html b/packages/live2d/index.html new file mode 100644 index 0000000..7f0cf33 --- /dev/null +++ b/packages/live2d/index.html @@ -0,0 +1,13 @@ + + + + + + + Live2d Demo + + +
+ + + diff --git a/packages/live2d/package.json b/packages/live2d/package.json new file mode 100644 index 0000000..731f2a3 --- /dev/null +++ b/packages/live2d/package.json @@ -0,0 +1,35 @@ +{ + "name": "live2d", + "private": true, + "version": "1.0.0", + "type": "module", + "files": ["dist"], + "main": "./dist/live2d.umd.cjs", + "module": "./dist/live2d.js", + "exports": { + ".": { + "import": "./dist/live2d.js", + "require": "./dist/live2d.umd.cjs" + } + }, + "scripts": { + "dev": "vite --open", + "build": "tsc -b && vite build", + "check": "biome check --write" + }, + "dependencies": { + "@lit/react": "^1.0.7", + "lit": "^3.2.1", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@unocss/postcss": "^65.4.3", + "@vitejs/plugin-react": "^4.3.4", + "ts-lit-plugin": "^2.0.2", + "unocss": "^65.4.3", + "vite": "^6.1.0" + } +} diff --git a/packages/live2d/postcss.config.mjs b/packages/live2d/postcss.config.mjs new file mode 100644 index 0000000..e76c97a --- /dev/null +++ b/packages/live2d/postcss.config.mjs @@ -0,0 +1,5 @@ +import UnoCSS from '@unocss/postcss'; + +export default { + plugins: [UnoCSS()], +}; \ No newline at end of file diff --git a/packages/live2d/src/Demo.tsx b/packages/live2d/src/Demo.tsx new file mode 100644 index 0000000..989f480 --- /dev/null +++ b/packages/live2d/src/Demo.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { Live2dToggleComponent } from './components/Live2dToggle'; + +const rootEl = document.getElementById('root'); +if (rootEl) { + const root = ReactDOM.createRoot(rootEl); + root.render( + + + , + ); +} diff --git a/packages/live2d/src/common/UnoLitElement.ts b/packages/live2d/src/common/UnoLitElement.ts new file mode 100644 index 0000000..bf940fc --- /dev/null +++ b/packages/live2d/src/common/UnoLitElement.ts @@ -0,0 +1,4 @@ +import { LitElement } from "lit"; +import { UNO } from "../util/UnoMixin"; + +export const UnoLitElement = UNO(LitElement) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx new file mode 100644 index 0000000..8b86854 --- /dev/null +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -0,0 +1,22 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; + +export class Live2dCanvas extends UnoLitElement { + render(): TemplateResult { + return html` +
+ +
+ `; + } +} + +customElements.define("live2d-canvas", Live2dCanvas); + +export const Live2dCanvasComponent = createComponent({ + tagName: "live2d-canvas", + elementClass: Live2dCanvas, + react: React, +}) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx new file mode 100644 index 0000000..6dc8fb2 --- /dev/null +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -0,0 +1,22 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; + +export class Live2dTips extends UnoLitElement { + render(): TemplateResult { + return html` +
+ +
+ `; + } +} + +customElements.define("live2d-tips", Live2dTips); + +export const Live2dTipsComponent = createComponent({ + tagName: "live2d-tips", + elementClass: Live2dTips, + react: React, +}) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx new file mode 100644 index 0000000..f03785e --- /dev/null +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -0,0 +1,59 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; +import { TOGGLE_CANVAS_EVENT } from "../events"; +import { state } from "lit/decorators.js"; + +export class Live2dToggle extends UnoLitElement { + @state() + // 当前工具栏是否显示 + private _isShow = false; + + constructor() { + super(); + this.addEventListener("click", this.handleClick); + // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 + const live2dDisplay = localStorage.getItem("live2d-display") + if (live2dDisplay) { + if (Date.now() - Number.parseInt(live2dDisplay) > 24 * 60 * 60 * 1000) { + this.triggerToggleLive2d(true); + } + } + } + + render(): TemplateResult { + return html`
+ 看板娘 +
`; + } + + handleClick() { + this.triggerToggleLive2d(!!this._isShow); + } + + triggerToggleLive2d(isShow: boolean) { + // 当前切换栏与 Live2d 的显示状态相反 + this._isShow = !isShow; + if (isShow) { + localStorage.removeItem("live2d-display"); + } else { + localStorage.setItem("live2d-display", Date.now().toString()); + } + this.dispatchEvent(new CustomEvent(TOGGLE_CANVAS_EVENT, { + bubbles: true, + composed: true, + detail: { + isShow, + }, + })); + } +} + +customElements.define("live2d-toggle", Live2dToggle); + +export const Live2dToggleComponent = createComponent({ + tagName: "live2d-toggle", + elementClass: Live2dToggle, + react: React, +}) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx new file mode 100644 index 0000000..7731bb9 --- /dev/null +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -0,0 +1,22 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; + +export class Live2dTools extends UnoLitElement { + render(): TemplateResult { + return html` +
+ +
+ `; + } +} + +customElements.define("live2d-tools", Live2dTools); + +export const Live2dToolsComponent = createComponent({ + tagName: "live2d-tools", + elementClass: Live2dTools, + react: React, +}) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx new file mode 100644 index 0000000..196338c --- /dev/null +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -0,0 +1,23 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; +import { state } from "lit/decorators.js"; + +export class Live2dWidget extends UnoLitElement { + render(): TemplateResult { + return html` +
+ +
+ `; + } +} + +customElements.define("live2d-widget", Live2dWidget); + +export const Live2dWidgetComponent = createComponent({ + tagName: "live2d-widget", + elementClass: Live2dWidget, + react: React, +}) \ No newline at end of file diff --git a/packages/live2d/src/env.d.ts b/packages/live2d/src/env.d.ts new file mode 100644 index 0000000..09c0137 --- /dev/null +++ b/packages/live2d/src/env.d.ts @@ -0,0 +1 @@ +/// \ No newline at end of file diff --git a/packages/live2d/src/events/index.ts b/packages/live2d/src/events/index.ts new file mode 100644 index 0000000..89687bf --- /dev/null +++ b/packages/live2d/src/events/index.ts @@ -0,0 +1,3 @@ +export const TOGGLE_CANVAS_EVENT = 'toggle-canvas'; + +export const LIVE2d_MESSAGE_EVENT = 'live2d-message'; \ No newline at end of file diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts new file mode 100644 index 0000000..38e8069 --- /dev/null +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -0,0 +1,18 @@ +import { LIVE2d_MESSAGE_EVENT } from "../events"; + +/** + * 向 Live2D 发送消息事件 + * @param text + * @param timeout + * @param priority + */ +export function sendMessage(text: string, timeout = 3000, priority = 0) { + const event = new CustomEvent(LIVE2d_MESSAGE_EVENT, { + detail: { + text, + timeout, + priority, + }, + }); + window.dispatchEvent(event); +} \ No newline at end of file diff --git a/packages/live2d/src/index.ts b/packages/live2d/src/index.ts new file mode 100644 index 0000000..5e2d630 --- /dev/null +++ b/packages/live2d/src/index.ts @@ -0,0 +1,5 @@ +import { Live2dToggle } from "./components/Live2dToggle" + +export { + Live2dToggle +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts new file mode 100644 index 0000000..b595e81 --- /dev/null +++ b/packages/live2d/src/live2d/model.ts @@ -0,0 +1,81 @@ +import { sendMessage } from "../helpers/sendMessage"; +import type { Live2dConfig } from "../types"; +import { isNotEmptyString } from "../util/isString"; + +declare const loadlive2d: any; + +interface ModelTexturesResult { + textures: { + id: number; + } +} + +interface ModelResult { + model: { + id: number; + message: string; + } +} + +class Model { + #apiPath: string; + #config: Live2dConfig; + + constructor(config: Live2dConfig) { + const apiPath = config.apiPath; + if (!isNotEmptyString(apiPath)) { + throw new Error("Invalid initWidget argument!"); + } + + this.#apiPath = apiPath.endsWith("/") ? apiPath : `${apiPath}/`; + this.#config = config; + } + + /** + * 为 Live2d 加载模型。 + * + * @param modelId 模型编号 + * @param modelTexturesId 纹理编号 + * @param text 加载时的消息 + */ + async loadModel(modelId: number, modelTexturesId: number, text: string) { + localStorage.setItem("modelId", String(modelId)); + localStorage.setItem("modelTexturesId", String(modelTexturesId)); + // 发送消息事件 + sendMessage(text, 4000, 3); + loadlive2d( + "live2d", + `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, + this.#config.consoleShowStatus === true + ? console.log(`[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`) + : null + ); + } + + /** + * 随机切换模型贴图 + */ + async loadRandTextures() { + const modelId = Number(localStorage.getItem("modelId")); + const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); + // 可选 "rand"(随机), "switch"(顺序) + const result = await fetch(`${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`) + .then((response) => response.json()) as ModelTexturesResult; + const texturesId = result.textures.id; + if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { + sendMessage("我还没有其他衣服呢!", 4000, 3); + return; + } + this.loadModel(modelId, texturesId, "我的新衣服好看嘛?"); + } + + /** + * 切换模型 + */ + async loadOtherModel() { + const modelId = Number(localStorage.getItem("modelId")); + const result = await fetch(`${this.#apiPath}switch/?id=${modelId}`) + .then((response) => response.json()) as ModelResult; + this.loadModel(result.model.id, 0, result.model.message); + } +} \ No newline at end of file diff --git a/packages/live2d/src/styles/unocss.global.css b/packages/live2d/src/styles/unocss.global.css new file mode 100644 index 0000000..d76ae77 --- /dev/null +++ b/packages/live2d/src/styles/unocss.global.css @@ -0,0 +1 @@ +@unocss \ No newline at end of file diff --git a/packages/live2d/src/styles/unocss.global.css.d.ts b/packages/live2d/src/styles/unocss.global.css.d.ts new file mode 100644 index 0000000..46fd886 --- /dev/null +++ b/packages/live2d/src/styles/unocss.global.css.d.ts @@ -0,0 +1,2 @@ +declare let style: string +export default style \ No newline at end of file diff --git a/packages/live2d/src/types/index.ts b/packages/live2d/src/types/index.ts new file mode 100644 index 0000000..311ce63 --- /dev/null +++ b/packages/live2d/src/types/index.ts @@ -0,0 +1,20 @@ +export interface Live2dConfig { + // Live2d API 路径 + apiPath: string; + // Live2d 定位 + live2dLocation: "left" | "right"; + // 是否在控制台显示状态 + consoleShowStatus?: boolean; + // 是否显示右侧工具栏 + isTools?: boolean; + [key: string]: unknown; +} + +export interface Live2dMessageEventDetail { + // 消息内容 + text: string; + // 消息显示时间 + timeout: number; + // 消息优先级 + priority: number; +} \ No newline at end of file diff --git a/packages/live2d/src/util/UnoMixin.ts b/packages/live2d/src/util/UnoMixin.ts new file mode 100644 index 0000000..1cbedf7 --- /dev/null +++ b/packages/live2d/src/util/UnoMixin.ts @@ -0,0 +1,20 @@ +import { adoptStyles, type LitElement, unsafeCSS } from 'lit' +// @ts-ignore +import style from "../styles/unocss.global.css?inline" + +declare global { + // biome-ignore lint/suspicious/noExplicitAny: any is needed to define a mixin + export type LitMixin = new (...args: any[]) => T & LitElement; +} + +const stylesheet = unsafeCSS(style) + +export const UNO = (superClass: T): T => + class extends superClass { + connectedCallback() { + super.connectedCallback(); + if (this.shadowRoot) { + adoptStyles(this.shadowRoot, [stylesheet]) + } + } + }; \ No newline at end of file diff --git a/packages/live2d/src/util/isString.ts b/packages/live2d/src/util/isString.ts new file mode 100644 index 0000000..b6f7de8 --- /dev/null +++ b/packages/live2d/src/util/isString.ts @@ -0,0 +1,7 @@ +export const isString = (value: unknown): value is string => { + return typeof value === "string"; +} + +export const isNotEmptyString = (value: unknown): value is string => { + return typeof value === "string" && value.length > 0; +}; \ No newline at end of file diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json new file mode 100644 index 0000000..0b26a03 --- /dev/null +++ b/packages/live2d/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", + "target": "ES2020", + "noEmit": true, + "skipLibCheck": true, + + /* modules */ + "module": "ESNext", + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + + "experimentalDecorators": true, + "useDefineForClassFields": false, + "plugins": [ + { + "name": "ts-lit-plugin" + } + ] + }, + "include": ["src"] +} diff --git a/packages/live2d/tsconfig.tsbuildinfo b/packages/live2d/tsconfig.tsbuildinfo new file mode 100644 index 0000000..da9ec8e --- /dev/null +++ b/packages/live2d/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/common/unolitelement.ts","./src/components/live2dtoggle.tsx","./src/events/index.ts","./src/styles/unocss.global.css.d.ts","./src/util/unomixin.ts"],"version":"5.7.3"} \ No newline at end of file diff --git a/packages/live2d/uno.config.ts b/packages/live2d/uno.config.ts new file mode 100644 index 0000000..48d1df6 --- /dev/null +++ b/packages/live2d/uno.config.ts @@ -0,0 +1,9 @@ +import { defineConfig, presetUno, transformerDirectives } from 'unocss'; + +export default defineConfig({ + content: { + filesystem: ['src/**/*.{html,ts,js,tsx,jsx}'], + }, + presets: [presetUno()], + transformers: [transformerDirectives()], +}); \ No newline at end of file diff --git a/packages/live2d/vite.config.ts b/packages/live2d/vite.config.ts new file mode 100644 index 0000000..896637b --- /dev/null +++ b/packages/live2d/vite.config.ts @@ -0,0 +1,24 @@ +import { defineConfig } from 'vite' +import { resolve } from 'node:path' +import react from '@vitejs/plugin-react' + +export default defineConfig({ + plugins: [react({ + babel: { + parserOpts: { + plugins: ['decorators-legacy'], + }, + }, + })], + + build: { + lib: { + entry: resolve(__dirname, 'src/index.ts'), + name: 'Live2d', + fileName: 'live2d', + }, + rollupOptions: { + external: ['react', 'react-dom'], + } + } +}) From 439ed34cf4ada89fbe0d8649af9089341316eeca Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 6 Feb 2025 18:19:46 +0800 Subject: [PATCH 02/26] refactor: restructure Live2D frontend architecture --- .gitignore | 2 + package.json | 25 + pnpm-lock.yaml | 2748 +++++++++++++++++ pnpm-workspace.yaml | 2 + .../run/halo/live2d/Live2dInitProcessor.java | 4 +- 5 files changed, 2779 insertions(+), 2 deletions(-) create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 pnpm-workspace.yaml diff --git a/.gitignore b/.gitignore index c97ac56..0ad2ba8 100755 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,5 @@ application-local.properties /admin-frontend/node_modules/ /workplace/ + +/node_modules/ \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..1065b22 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "plugin-live2d", + "private": true, + "scripts": { + "build": "pnpm run build:packages", + "example:dev": "pnpm dev --filter ./packages/** " + }, + "author": { + "name": "LIlGG", + "url": "https://github.com/LIlGG" + }, + "contributors": [ + { + "name": "LIlGG", + "email": "mail@e.lixingyong.com", + "url": "https://github.com/LIlGG" + } + ], + "license": "MIT", + "devDependencies": { + "@biomejs/biome": "^1.9.3", + "typescript": "^5.7.2" + }, + "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a" +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..7df699b --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2748 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@biomejs/biome': + specifier: ^1.9.3 + version: 1.9.4 + typescript: + specifier: ^5.7.2 + version: 5.7.3 + + packages/live2d: + dependencies: + '@lit/react': + specifier: ^1.0.7 + version: 1.0.7(@types/react@19.0.8) + lit: + specifier: ^3.2.1 + version: 3.2.1 + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + devDependencies: + '@types/react': + specifier: ^19.0.0 + version: 19.0.8 + '@types/react-dom': + specifier: ^19.0.0 + version: 19.0.3(@types/react@19.0.8) + '@unocss/postcss': + specifier: ^65.4.3 + version: 65.4.3(postcss@8.5.1) + '@vitejs/plugin-react': + specifier: ^4.3.4 + version: 4.3.4(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2)) + ts-lit-plugin: + specifier: ^2.0.2 + version: 2.0.2 + unocss: + specifier: ^65.4.3 + version: 65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + vite: + specifier: ^6.1.0 + version: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + +packages: + + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + + '@antfu/install-pkg@1.0.0': + resolution: {integrity: sha512-xvX6P/lo1B3ej0OsaErAjqgFYzYVcJpamjLAFLYh9vRJngBrMoUG7aVnrGTeqM7yxbyTD5p3F2+0/QUEh8Vzhw==} + + '@antfu/utils@8.1.0': + resolution: {integrity: sha512-XPR7Jfwp0FFl/dFYPX8ZjpmU4/1mIXTjnZ1ba48BLMyKOV62/tiRjdsFcPs2hsYcSud4tzk7w3a3LjX8Fu3huA==} + + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.26.5': + resolution: {integrity: sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.26.7': + resolution: {integrity: sha512-SRijHmF0PSPgLIBYlWnG0hyeJLwXE2CgpsXaMOrtt2yp9/86ALw6oUlj9KYuZ0JN07T4eBMVIW4li/9S1j2BGA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.26.5': + resolution: {integrity: sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.26.5': + resolution: {integrity: sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.25.9': + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.26.0': + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.26.5': + resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.25.9': + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.26.7': + resolution: {integrity: sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.26.7': + resolution: {integrity: sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-transform-react-jsx-self@7.25.9': + resolution: {integrity: sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.25.9': + resolution: {integrity: sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/runtime@7.26.7': + resolution: {integrity: sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==} + engines: {node: '>=6.9.0'} + + '@babel/template@7.25.9': + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.26.7': + resolution: {integrity: sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.26.7': + resolution: {integrity: sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==} + engines: {node: '>=6.9.0'} + + '@biomejs/biome@1.9.4': + resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@1.9.4': + resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@1.9.4': + resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@1.9.4': + resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@1.9.4': + resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@1.9.4': + resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@1.9.4': + resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@1.9.4': + resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@1.9.4': + resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/aix-ppc64@0.24.2': + resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm64@0.24.2': + resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-arm@0.24.2': + resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/android-x64@0.24.2': + resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-arm64@0.24.2': + resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/darwin-x64@0.24.2': + resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-arm64@0.24.2': + resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.24.2': + resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm64@0.24.2': + resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-arm@0.24.2': + resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-ia32@0.24.2': + resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-loong64@0.24.2': + resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-mips64el@0.24.2': + resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-ppc64@0.24.2': + resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-riscv64@0.24.2': + resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-s390x@0.24.2': + resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/linux-x64@0.24.2': + resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.24.2': + resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.24.2': + resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-arm64@0.24.2': + resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.24.2': + resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/sunos-x64@0.24.2': + resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-arm64@0.24.2': + resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-ia32@0.24.2': + resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@esbuild/win32-x64@0.24.2': + resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@iconify/types@2.0.0': + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + + '@iconify/utils@2.3.0': + resolution: {integrity: sha512-GmQ78prtwYW6EtzXRU1rY+KwOKfz32PD7iJh6Iyqw68GiKuoZ2A6pRtzWONz5VQJbp50mEjXh/7NkumtrAgRKA==} + + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} + engines: {node: '>=6.0.0'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.6': + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + + '@lit-labs/ssr-dom-shim@1.3.0': + resolution: {integrity: sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ==} + + '@lit/react@1.0.7': + resolution: {integrity: sha512-cencnwwLXQKiKxjfFzSgZRngcWJzUDZi/04E0fSaF86wZgchMdvTyu+lE36DrUfvuus3bH8+xLPrhM1cTjwpzw==} + peerDependencies: + '@types/react': 17 || 18 || 19 + + '@lit/reactive-element@2.0.4': + resolution: {integrity: sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@polka/url@1.0.0-next.28': + resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + + '@rollup/pluginutils@5.1.4': + resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/rollup-android-arm-eabi@4.34.4': + resolution: {integrity: sha512-gGi5adZWvjtJU7Axs//CWaQbQd/vGy8KGcnEaCWiyCqxWYDxwIlAHFuSe6Guoxtd0SRvSfVTDMPd5H+4KE2kKA==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.34.4': + resolution: {integrity: sha512-1aRlh1gqtF7vNPMnlf1vJKk72Yshw5zknR/ZAVh7zycRAGF2XBMVDAHmFQz/Zws5k++nux3LOq/Ejj1WrDR6xg==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.34.4': + resolution: {integrity: sha512-drHl+4qhFj+PV/jrQ78p9ch6A0MfNVZScl/nBps5a7u01aGf/GuBRrHnRegA9bP222CBDfjYbFdjkIJ/FurvSQ==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.34.4': + resolution: {integrity: sha512-hQqq/8QALU6t1+fbNmm6dwYsa0PDD4L5r3TpHx9dNl+aSEMnIksHZkSO3AVH+hBMvZhpumIGrTFj8XCOGuIXjw==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.34.4': + resolution: {integrity: sha512-/L0LixBmbefkec1JTeAQJP0ETzGjFtNml2gpQXA8rpLo7Md+iXQzo9kwEgzyat5Q+OG/C//2B9Fx52UxsOXbzw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.34.4': + resolution: {integrity: sha512-6Rk3PLRK+b8L/M6m/x6Mfj60LhAUcLJ34oPaxufA+CfqkUrDoUPQYFdRrhqyOvtOKXLJZJwxlOLbQjNYQcRQfw==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.34.4': + resolution: {integrity: sha512-kmT3x0IPRuXY/tNoABp2nDvI9EvdiS2JZsd4I9yOcLCCViKsP0gB38mVHOhluzx+SSVnM1KNn9k6osyXZhLoCA==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.34.4': + resolution: {integrity: sha512-3iSA9tx+4PZcJH/Wnwsvx/BY4qHpit/u2YoZoXugWVfc36/4mRkgGEoRbRV7nzNBSCOgbWMeuQ27IQWgJ7tRzw==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.34.4': + resolution: {integrity: sha512-7CwSJW+sEhM9sESEk+pEREF2JL0BmyCro8UyTq0Kyh0nu1v0QPNY3yfLPFKChzVoUmaKj8zbdgBxUhBRR+xGxg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.34.4': + resolution: {integrity: sha512-GZdafB41/4s12j8Ss2izofjeFXRAAM7sHCb+S4JsI9vaONX/zQ8cXd87B9MRU/igGAJkKvmFmJJBeeT9jJ5Cbw==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loongarch64-gnu@4.34.4': + resolution: {integrity: sha512-uuphLuw1X6ur11675c2twC6YxbzyLSpWggvdawTUamlsoUv81aAXRMPBC1uvQllnBGls0Qt5Siw8reSIBnbdqQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.34.4': + resolution: {integrity: sha512-KvLEw1os2gSmD6k6QPCQMm2T9P2GYvsMZMRpMz78QpSoEevHbV/KOUbI/46/JRalhtSAYZBYLAnT9YE4i/l4vg==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.34.4': + resolution: {integrity: sha512-wcpCLHGM9yv+3Dql/CI4zrY2mpQ4WFergD3c9cpRowltEh5I84pRT/EuHZsG0In4eBPPYthXnuR++HrFkeqwkA==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.34.4': + resolution: {integrity: sha512-nLbfQp2lbJYU8obhRQusXKbuiqm4jSJteLwfjnunDT5ugBKdxqw1X9KWwk8xp1OMC6P5d0WbzxzhWoznuVK6XA==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.34.4': + resolution: {integrity: sha512-JGejzEfVzqc/XNiCKZj14eb6s5w8DdWlnQ5tWUbs99kkdvfq9btxxVX97AaxiUX7xJTKFA0LwoS0KU8C2faZRg==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.34.4': + resolution: {integrity: sha512-/iFIbhzeyZZy49ozAWJ1ZR2KW6ZdYUbQXLT4O5n1cRZRoTpwExnHLjlurDXXPKEGxiAg0ujaR9JDYKljpr2fDg==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.34.4': + resolution: {integrity: sha512-qORc3UzoD5UUTneiP2Afg5n5Ti1GAW9Gp5vHPxzvAFFA3FBaum9WqGvYXGf+c7beFdOKNos31/41PRMUwh1tpA==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.34.4': + resolution: {integrity: sha512-5g7E2PHNK2uvoD5bASBD9aelm44nf1w4I5FEI7MPHLWcCSrR8JragXZWgKPXk5i2FU3JFfa6CGZLw2RrGBHs2Q==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.34.4': + resolution: {integrity: sha512-p0scwGkR4kZ242xLPBuhSckrJ734frz6v9xZzD+kHVYRAkSUmdSLCIJRfql6H5//aF8Q10K+i7q8DiPfZp0b7A==} + cpu: [x64] + os: [win32] + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.6.8': + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.20.6': + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + + '@types/node@22.13.1': + resolution: {integrity: sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==} + + '@types/react-dom@19.0.3': + resolution: {integrity: sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA==} + peerDependencies: + '@types/react': ^19.0.0 + + '@types/react@19.0.8': + resolution: {integrity: sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw==} + + '@types/trusted-types@2.0.7': + resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + + '@unocss/astro@65.4.3': + resolution: {integrity: sha512-yhPKH4CT2CFjvKR8lL6oS/7jarMWp4iSnYcNlTlZLmvTIS3dGxyhAsVy/xkdzdJ6sM+6FS0hUuQNv+NYvArRNg==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 + peerDependenciesMeta: + vite: + optional: true + + '@unocss/cli@65.4.3': + resolution: {integrity: sha512-pZESqf5tS5AjATkAP11M0ecIiias0//nir7MgUQLs/v2GX0x7K0KhVTJ50TiFePff0TnwTHheDNJGR3gesDiVg==} + engines: {node: '>=14'} + hasBin: true + + '@unocss/config@65.4.3': + resolution: {integrity: sha512-Z3tnQ10UjM09Y1yVqfCYfZEh2pXFQlUQ1g188mMWxjXWEIXeei3f9dIApRBgC+xcPE6prqdu3fDC5emU+sqyxw==} + engines: {node: '>=14'} + + '@unocss/core@65.4.3': + resolution: {integrity: sha512-luFgdcchSlNrYSaDvU2176T2PPQZdxqfREVbxEXNXlFEgyEFrx5hOSUXoJtJSZjRhAcE6zkWyLDf/JkQJ5Eeyw==} + + '@unocss/extractor-arbitrary-variants@65.4.3': + resolution: {integrity: sha512-RhSOOzOxkNjJl9zeglaBe0U+o39jleCCNPWJ87DDJA3ckbyylIIf21ZwY1Xu76rmdar5DT9ob7ucuPfEpJLN9A==} + + '@unocss/inspector@65.4.3': + resolution: {integrity: sha512-mj3K0WtnP0DuonQPzxkXhLMBU5qi13dpxaJcEOSv+EBMPlJbww0bj7K7uaFqXv8LPufs/hkQzI9yjOrEzR5WBQ==} + + '@unocss/postcss@65.4.3': + resolution: {integrity: sha512-ZHlWfArfhhWBVhUeAETrtnD7nhqpfXv5muGrJCSDHmjgFJX8jtDa6rf52ICCFWEOe8p2dku7o27o26pGXYTYJg==} + engines: {node: '>=14'} + peerDependencies: + postcss: ^8.4.21 + + '@unocss/preset-attributify@65.4.3': + resolution: {integrity: sha512-kN8levkt+BwzzWKA6glthasuFt/Cplc70oxzAYd/gZcosxwDK5+MmxjGDG5aLLu2PA58tPHUZ+ltW/QG5BM+Xw==} + + '@unocss/preset-icons@65.4.3': + resolution: {integrity: sha512-g1WNamvYOIdD8YAOvZ5h4g3peel3rLTtKvB0wX4pVL5exsYsoyc0tmiGm57k+ZmnIucqSzxoUZ/vjHDLAViahw==} + + '@unocss/preset-mini@65.4.3': + resolution: {integrity: sha512-JajAF18DKJRXgd9usrAYTcHUtZy606mD396ZswDgw/mUSu529tuiT6LOD43aJMYHgPEw7wKYjiGFHkeBTHijuQ==} + + '@unocss/preset-tagify@65.4.3': + resolution: {integrity: sha512-8/MbMbgdvj1A87XNVVzD8gFVqywaSJAD3Bv8RwjcFn0rwlgZY0PdTBYo3M3FH25axb4znzXBmLZdEBVZOGUosg==} + + '@unocss/preset-typography@65.4.3': + resolution: {integrity: sha512-DEo7GECG0AQ8FkzH/x8QCEL5BR1D+GNoxHGmNxc7rFKghJONVyJ3jROA9mDmWNAva8JygN4Up+lzPZG3mNYezQ==} + + '@unocss/preset-uno@65.4.3': + resolution: {integrity: sha512-gxELOQwR3YbMLR+WjYz3m/Zb6VXa8O0Xln0rfS2TI7OXXoQ1twak5zwYPrOI5fJF8lJ5yyKUiXiOR8UEPBpoCQ==} + + '@unocss/preset-web-fonts@65.4.3': + resolution: {integrity: sha512-edkyohQ4+qjuOxIJf+NeQiEayB47A9eA2NhBLbcqZ0OfMpN8tRZPVW5cyB3b5Ef253NGMd4S8H/96vGTBpqOBA==} + + '@unocss/preset-wind@65.4.3': + resolution: {integrity: sha512-KM13xIARNeZ/ZKJr33fZ89l79wgI+1Oo8VPJzmckLjbH9IGOhcH2GON7wVIxQqqqM9IM3vALEqw2KNdM6ontWw==} + + '@unocss/reset@65.4.3': + resolution: {integrity: sha512-f9QnMtY1yPS1HEIkeKmSwUYcp4QS6zdo9ZcIFE9PDSLOcns3v+M1lTQg8mLChxJHVl73Cf6PofWVh5tmnxV53Q==} + + '@unocss/rule-utils@65.4.3': + resolution: {integrity: sha512-bzRRdb9mb82IvgOt3KiRyUh/njRfJC3hoV84lMyUPryT8YTEP/hl6kt2KQ2l1K3WDz7ZPQXVi2eqUbqc+AUpwg==} + engines: {node: '>=14'} + + '@unocss/transformer-attributify-jsx@65.4.3': + resolution: {integrity: sha512-GI0joW6+jG3sLMzqDxT/Nr0lGarHKsXQzpKQt1LfBGEDgNSQZtDZ1IGlkdZeErRFvWcDLWU0xm2LikLS4Az8kw==} + + '@unocss/transformer-compile-class@65.4.3': + resolution: {integrity: sha512-AzLeic0ESQ/yhLKfkSsQ72wQLkKEPsmX578+ZKcPSRh/HM5tfNz8RqffOHr6YOEKKTaZHN23OqbA511amRKC1w==} + + '@unocss/transformer-directives@65.4.3': + resolution: {integrity: sha512-e3zZYjXqHSWb6YrC09/FnCsndhZdRzmYhPubTzOjnvb5K0ihIiLvHx9c2TRPWvMspXs0wHKQsLW5fAs8oyimeQ==} + + '@unocss/transformer-variant-group@65.4.3': + resolution: {integrity: sha512-nZNgKLclhIjfuqCaZTmJwhWSByL7vnhb3l/ChRX4qtWOweRLro79r6MvfcqQNrweK5nCw4yibsXCrFUWq7Jj5w==} + + '@unocss/vite@65.4.3': + resolution: {integrity: sha512-YajF8Z2J/KvXdnC5BsGJjt3fm4D14vmYaHdlTyzi92Rkh/67JtaCz2OhElDoF6k4S4fm9B8uLRP10p+smRe9Fw==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 + + '@unocss/webpack@65.4.3': + resolution: {integrity: sha512-jD2vmKSenoJNjt8upRI3S4OvucamicuJ0GuPnNDPl1kFGtdZb9dJX0cNABCx00xORZg/4rP52/xeDHVCCU97HA==} + peerDependencies: + webpack: ^4 || ^5 + + '@vitejs/plugin-react@4.3.4': + resolution: {integrity: sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 + + '@vscode/web-custom-data@0.4.13': + resolution: {integrity: sha512-2ZUIRfhofZ/npLlf872EBnPmn27Kt4M2UssmQIfnJvgGgMYZJ5fvtHEDnttBBf2hnVtBgNCqZMVHJA+wsFVqTA==} + + '@vue/compiler-core@3.5.13': + resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} + + '@vue/compiler-dom@3.5.13': + resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} + + '@vue/compiler-sfc@3.5.13': + resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==} + + '@vue/compiler-ssr@3.5.13': + resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} + + '@vue/reactivity@3.5.13': + resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==} + + '@vue/runtime-core@3.5.13': + resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==} + + '@vue/runtime-dom@3.5.13': + resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==} + + '@vue/server-renderer@3.5.13': + resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==} + peerDependencies: + vue: 3.5.13 + + '@vue/shared@3.5.13': + resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browserslist@4.24.4: + resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + bundle-require@5.1.0: + resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.18' + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + caniuse-lite@1.0.30001697: + resolution: {integrity: sha512-GwNPlWJin8E+d7Gxq96jxM6w0w+VFeyyXRsjU58emtkYqnbwHqXm5uT2uCmO0RQE9htWknOP4xtBlLmM/gWxvQ==} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + + consola@3.4.0: + resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==} + engines: {node: ^14.18.0 || >=16.10.0} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + css-tree@3.1.0: + resolution: {integrity: sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + + destr@2.0.3: + resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==} + + didyoumean2@4.1.0: + resolution: {integrity: sha512-qTBmfQoXvhKO75D/05C8m+fteQmn4U46FWYiLhXtZQInzitXLWY0EQ/2oKnpAz9g2lQWW8jYcLcT+hPJGT+kig==} + engines: {node: '>=10.13'} + + duplexer@0.1.2: + resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + + electron-to-chromium@1.5.93: + resolution: {integrity: sha512-M+29jTcfNNoR9NV7la4SwUqzWAxEwnc7ThA5e1m6LRSotmpfpCpLcIfgtSCVL+MllNLgAyM/5ru86iMRemPzDQ==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + + esbuild@0.24.2: + resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + + fastq@1.19.0: + resolution: {integrity: sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==} + + fdir@6.4.3: + resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-tsconfig@4.10.0: + resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + + globals@15.14.0: + resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} + engines: {node: '>=18'} + + gzip-size@6.0.0: + resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} + engines: {node: '>=10'} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + importx@0.5.1: + resolution: {integrity: sha512-YrRaigAec1sC2CdIJjf/hCH1Wp9Ii8Cq5ROw4k5nJ19FVl2FcJUHZ5gGIb1vs8+JNYIyOJpc2fcufS2330bxDw==} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + hasBin: true + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + lit-analyzer@2.0.3: + resolution: {integrity: sha512-XiAjnwVipNrKav7r3CSEZpWt+mwYxrhPRVC7h8knDmn/HWTzzWJvPe+mwBcL2brn4xhItAMzZhFC8tzzqHKmiQ==} + hasBin: true + + lit-element@4.1.1: + resolution: {integrity: sha512-HO9Tkkh34QkTeUmEdNYhMT8hzLid7YlMlATSi1q4q17HE5d9mrrEHJ/o8O2D0cMi182zK1F3v7x0PWFjrhXFew==} + + lit-html@3.2.1: + resolution: {integrity: sha512-qI/3lziaPMSKsrwlxH/xMgikhQ0EGOX2ICU73Bi/YHFvz2j/yMCIrw4+puF2IpQ4+upd3EWbvnHM9+PnJn48YA==} + + lit@3.2.1: + resolution: {integrity: sha512-1BBa1E/z0O9ye5fZprPtdqnc0BFzxIxTTOO/tQFmyC/hj1O3jL4TfmLBw0WEwjAokdLwpclkvGgDJwTIh0/22w==} + + load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + local-pkg@1.0.0: + resolution: {integrity: sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==} + engines: {node: '>=14'} + + lodash.deburr@4.1.0: + resolution: {integrity: sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + + mdn-data@2.12.2: + resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mlly@1.7.4: + resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} + + mrmime@2.0.0: + resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} + engines: {node: '>=10'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.8: + resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + node-fetch-native@1.6.6: + resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} + + node-releases@2.0.19: + resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + ofetch@1.4.1: + resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} + + package-manager-detector@0.2.9: + resolution: {integrity: sha512-+vYvA/Y31l8Zk8dwxHhL3JfTuHPm6tlxM2A3GeQyl7ovYnSp1+mzAxClxaOr0qO1TtPxbQxetI7v5XqKLJZk7Q==} + + parse5@5.1.0: + resolution: {integrity: sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==} + + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + + pathe@2.0.2: + resolution: {integrity: sha512-15Ztpk+nov8DR524R4BF7uEuzESgzUEAV4Ah7CUMNGXdE5ELuvxElxGXndBl32vMSsWa1jpNf22Z+Er3sKwq+w==} + + perfect-debounce@1.0.0: + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + + pkg-types@1.3.1: + resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} + + postcss@8.5.1: + resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} + engines: {node: ^10 || ^12 || >=14} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + react-dom@19.0.0: + resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} + peerDependencies: + react: ^19.0.0 + + react-refresh@0.14.2: + resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} + engines: {node: '>=0.10.0'} + + react@19.0.0: + resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} + engines: {node: '>=0.10.0'} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rollup@4.34.4: + resolution: {integrity: sha512-spF66xoyD7rz3o08sHP7wogp1gZ6itSq22SGa/IZTcUDXDlOyrShwMwkVSB+BUxFRZZCUYqdb3KWDEOMVQZxuw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + scheduler@0.25.0: + resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + sirv@3.0.0: + resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} + engines: {node: '>=18'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + terser@5.38.0: + resolution: {integrity: sha512-a4GD5R1TjEeuCT6ZRiYMHmIf7okbCPEuhQET8bczV6FrQMMlFXA1n+G0KKjdlFCm3TEHV77GxfZB3vZSUQGFpg==} + engines: {node: '>=10'} + hasBin: true + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinyglobby@0.2.10: + resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + engines: {node: '>=12.0.0'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + + ts-lit-plugin@2.0.2: + resolution: {integrity: sha512-DPXlVxhjWHxg8AyBLcfSYt2JXgpANV1ssxxwjY98o26gD8MzeiM68HFW9c2VeDd1CjoR3w7B/6/uKxwBQe+ioA==} + + ts-simple-type@2.0.0-next.0: + resolution: {integrity: sha512-A+hLX83gS+yH6DtzNAhzZbPfU+D9D8lHlTSd7GeoMRBjOt3GRylDqLTYbdmjA4biWvq2xSfpqfIDj2l0OA/BVg==} + + tsx@4.19.2: + resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} + engines: {node: '>=18.0.0'} + hasBin: true + + typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} + engines: {node: '>=14.17'} + hasBin: true + + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + + unconfig@0.6.1: + resolution: {integrity: sha512-cVU+/sPloZqOyJEAfNwnQSFCzFrZm85vcVkryH7lnlB/PiTycUkAjt5Ds79cfIshGOZ+M5v3PBDnKgpmlE5DtA==} + + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + + unocss@65.4.3: + resolution: {integrity: sha512-mwSVi0ovPxaDv58yFB7Vm5v1x/q/pUc7aTh7SJbeYoRrpbUGdKiVf20YSQfMqmBNXV9CFDr4o6tabP/58as6RQ==} + engines: {node: '>=14'} + peerDependencies: + '@unocss/webpack': 65.4.3 + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 + peerDependenciesMeta: + '@unocss/webpack': + optional: true + vite: + optional: true + + unplugin@2.1.2: + resolution: {integrity: sha512-Q3LU0e4zxKfRko1wMV2HmP8lB9KWislY7hxXpxd+lGx0PRInE4vhMBVEZwpdVYHvtqzhSrzuIfErsob6bQfCzw==} + engines: {node: '>=18.12.0'} + + update-browserslist-db@1.1.2: + resolution: {integrity: sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + vite@6.1.0: + resolution: {integrity: sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vscode-css-languageservice@4.3.0: + resolution: {integrity: sha512-BkQAMz4oVHjr0oOAz5PdeE72txlLQK7NIwzmclfr+b6fj6I8POwB+VoXvrZLTbWt9hWRgfvgiQRkh5JwrjPJ5A==} + + vscode-html-languageservice@3.1.0: + resolution: {integrity: sha512-QAyRHI98bbEIBCqTzZVA0VblGU40na0txggongw5ZgTj9UVsVk5XbLT16O9OTcbqBGSqn0oWmFDNjK/XGIDcqg==} + + vscode-languageserver-textdocument@1.0.12: + resolution: {integrity: sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==} + + vscode-languageserver-types@3.16.0-next.2: + resolution: {integrity: sha512-QjXB7CKIfFzKbiCJC4OWC8xUncLsxo19FzGVp/ADFvvi87PlmBSCAtZI5xwGjF5qE0xkLf0jjKUn3DzmpDP52Q==} + + vscode-nls@4.1.2: + resolution: {integrity: sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw==} + + vscode-uri@2.1.2: + resolution: {integrity: sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==} + + vue-flow-layout@0.1.1: + resolution: {integrity: sha512-JdgRRUVrN0Y2GosA0M68DEbKlXMqJ7FQgsK8CjQD2vxvNSqAU6PZEpi4cfcTVtfM2GVOMjHo7GKKLbXxOBqDqA==} + peerDependencies: + vue: ^3.4.37 + + vue@3.5.13: + resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + web-component-analyzer@2.0.0: + resolution: {integrity: sha512-UEvwfpD+XQw99sLKiH5B1T4QwpwNyWJxp59cnlRwFfhUW6JsQpw5jMeMwi7580sNou8YL3kYoS7BWLm+yJ/jVQ==} + hasBin: true + + webpack-sources@3.2.3: + resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} + engines: {node: '>=10.13.0'} + + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + +snapshots: + + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + + '@antfu/install-pkg@1.0.0': + dependencies: + package-manager-detector: 0.2.9 + tinyexec: 0.3.2 + + '@antfu/utils@8.1.0': {} + + '@babel/code-frame@7.26.2': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.26.5': {} + + '@babel/core@7.26.7': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.5 + '@babel/helper-compilation-targets': 7.26.5 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.7) + '@babel/helpers': 7.26.7 + '@babel/parser': 7.26.7 + '@babel/template': 7.25.9 + '@babel/traverse': 7.26.7 + '@babel/types': 7.26.7 + convert-source-map: 2.0.0 + debug: 4.4.0 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.26.5': + dependencies: + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.26.5': + dependencies: + '@babel/compat-data': 7.26.5 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.4 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-module-imports@7.25.9': + dependencies: + '@babel/traverse': 7.26.7 + '@babel/types': 7.26.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.7)': + dependencies: + '@babel/core': 7.26.7 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.26.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.26.5': {} + + '@babel/helper-string-parser@7.25.9': {} + + '@babel/helper-validator-identifier@7.25.9': {} + + '@babel/helper-validator-option@7.25.9': {} + + '@babel/helpers@7.26.7': + dependencies: + '@babel/template': 7.25.9 + '@babel/types': 7.26.7 + + '@babel/parser@7.26.7': + dependencies: + '@babel/types': 7.26.7 + + '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.7)': + dependencies: + '@babel/core': 7.26.7 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.26.7)': + dependencies: + '@babel/core': 7.26.7 + '@babel/helper-plugin-utils': 7.26.5 + + '@babel/runtime@7.26.7': + dependencies: + regenerator-runtime: 0.14.1 + + '@babel/template@7.25.9': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 + + '@babel/traverse@7.26.7': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.5 + '@babel/parser': 7.26.7 + '@babel/template': 7.25.9 + '@babel/types': 7.26.7 + debug: 4.4.0 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.26.7': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + + '@biomejs/biome@1.9.4': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.9.4 + '@biomejs/cli-darwin-x64': 1.9.4 + '@biomejs/cli-linux-arm64': 1.9.4 + '@biomejs/cli-linux-arm64-musl': 1.9.4 + '@biomejs/cli-linux-x64': 1.9.4 + '@biomejs/cli-linux-x64-musl': 1.9.4 + '@biomejs/cli-win32-arm64': 1.9.4 + '@biomejs/cli-win32-x64': 1.9.4 + + '@biomejs/cli-darwin-arm64@1.9.4': + optional: true + + '@biomejs/cli-darwin-x64@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64@1.9.4': + optional: true + + '@biomejs/cli-linux-x64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-x64@1.9.4': + optional: true + + '@biomejs/cli-win32-arm64@1.9.4': + optional: true + + '@biomejs/cli-win32-x64@1.9.4': + optional: true + + '@esbuild/aix-ppc64@0.23.1': + optional: true + + '@esbuild/aix-ppc64@0.24.2': + optional: true + + '@esbuild/android-arm64@0.23.1': + optional: true + + '@esbuild/android-arm64@0.24.2': + optional: true + + '@esbuild/android-arm@0.23.1': + optional: true + + '@esbuild/android-arm@0.24.2': + optional: true + + '@esbuild/android-x64@0.23.1': + optional: true + + '@esbuild/android-x64@0.24.2': + optional: true + + '@esbuild/darwin-arm64@0.23.1': + optional: true + + '@esbuild/darwin-arm64@0.24.2': + optional: true + + '@esbuild/darwin-x64@0.23.1': + optional: true + + '@esbuild/darwin-x64@0.24.2': + optional: true + + '@esbuild/freebsd-arm64@0.23.1': + optional: true + + '@esbuild/freebsd-arm64@0.24.2': + optional: true + + '@esbuild/freebsd-x64@0.23.1': + optional: true + + '@esbuild/freebsd-x64@0.24.2': + optional: true + + '@esbuild/linux-arm64@0.23.1': + optional: true + + '@esbuild/linux-arm64@0.24.2': + optional: true + + '@esbuild/linux-arm@0.23.1': + optional: true + + '@esbuild/linux-arm@0.24.2': + optional: true + + '@esbuild/linux-ia32@0.23.1': + optional: true + + '@esbuild/linux-ia32@0.24.2': + optional: true + + '@esbuild/linux-loong64@0.23.1': + optional: true + + '@esbuild/linux-loong64@0.24.2': + optional: true + + '@esbuild/linux-mips64el@0.23.1': + optional: true + + '@esbuild/linux-mips64el@0.24.2': + optional: true + + '@esbuild/linux-ppc64@0.23.1': + optional: true + + '@esbuild/linux-ppc64@0.24.2': + optional: true + + '@esbuild/linux-riscv64@0.23.1': + optional: true + + '@esbuild/linux-riscv64@0.24.2': + optional: true + + '@esbuild/linux-s390x@0.23.1': + optional: true + + '@esbuild/linux-s390x@0.24.2': + optional: true + + '@esbuild/linux-x64@0.23.1': + optional: true + + '@esbuild/linux-x64@0.24.2': + optional: true + + '@esbuild/netbsd-arm64@0.24.2': + optional: true + + '@esbuild/netbsd-x64@0.23.1': + optional: true + + '@esbuild/netbsd-x64@0.24.2': + optional: true + + '@esbuild/openbsd-arm64@0.23.1': + optional: true + + '@esbuild/openbsd-arm64@0.24.2': + optional: true + + '@esbuild/openbsd-x64@0.23.1': + optional: true + + '@esbuild/openbsd-x64@0.24.2': + optional: true + + '@esbuild/sunos-x64@0.23.1': + optional: true + + '@esbuild/sunos-x64@0.24.2': + optional: true + + '@esbuild/win32-arm64@0.23.1': + optional: true + + '@esbuild/win32-arm64@0.24.2': + optional: true + + '@esbuild/win32-ia32@0.23.1': + optional: true + + '@esbuild/win32-ia32@0.24.2': + optional: true + + '@esbuild/win32-x64@0.23.1': + optional: true + + '@esbuild/win32-x64@0.24.2': + optional: true + + '@iconify/types@2.0.0': {} + + '@iconify/utils@2.3.0': + dependencies: + '@antfu/install-pkg': 1.0.0 + '@antfu/utils': 8.1.0 + '@iconify/types': 2.0.0 + debug: 4.4.0 + globals: 15.14.0 + kolorist: 1.8.0 + local-pkg: 1.0.0 + mlly: 1.7.4 + transitivePeerDependencies: + - supports-color + + '@jridgewell/gen-mapping@0.3.8': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/set-array@1.2.1': {} + + '@jridgewell/source-map@0.3.6': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + optional: true + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + + '@lit-labs/ssr-dom-shim@1.3.0': {} + + '@lit/react@1.0.7(@types/react@19.0.8)': + dependencies: + '@types/react': 19.0.8 + + '@lit/reactive-element@2.0.4': + dependencies: + '@lit-labs/ssr-dom-shim': 1.3.0 + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.19.0 + + '@polka/url@1.0.0-next.28': {} + + '@rollup/pluginutils@5.1.4(rollup@4.34.4)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.34.4 + + '@rollup/rollup-android-arm-eabi@4.34.4': + optional: true + + '@rollup/rollup-android-arm64@4.34.4': + optional: true + + '@rollup/rollup-darwin-arm64@4.34.4': + optional: true + + '@rollup/rollup-darwin-x64@4.34.4': + optional: true + + '@rollup/rollup-freebsd-arm64@4.34.4': + optional: true + + '@rollup/rollup-freebsd-x64@4.34.4': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.34.4': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.34.4': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.34.4': + optional: true + + '@rollup/rollup-linux-loongarch64-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.34.4': + optional: true + + '@rollup/rollup-linux-x64-musl@4.34.4': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.34.4': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.34.4': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.34.4': + optional: true + + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.6 + + '@types/babel__generator@7.6.8': + dependencies: + '@babel/types': 7.26.7 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 + + '@types/babel__traverse@7.20.6': + dependencies: + '@babel/types': 7.26.7 + + '@types/estree@1.0.6': {} + + '@types/node@22.13.1': + dependencies: + undici-types: 6.20.0 + optional: true + + '@types/react-dom@19.0.3(@types/react@19.0.8)': + dependencies: + '@types/react': 19.0.8 + + '@types/react@19.0.8': + dependencies: + csstype: 3.1.3 + + '@types/trusted-types@2.0.7': {} + + '@unocss/astro@65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3))': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/reset': 65.4.3 + '@unocss/vite': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + optionalDependencies: + vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + transitivePeerDependencies: + - rollup + - supports-color + - vue + + '@unocss/cli@65.4.3(rollup@4.34.4)': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.4(rollup@4.34.4) + '@unocss/config': 65.4.3 + '@unocss/core': 65.4.3 + '@unocss/preset-uno': 65.4.3 + cac: 6.7.14 + chokidar: 3.6.0 + colorette: 2.0.20 + consola: 3.4.0 + magic-string: 0.30.17 + pathe: 2.0.2 + perfect-debounce: 1.0.0 + tinyglobby: 0.2.10 + transitivePeerDependencies: + - rollup + - supports-color + + '@unocss/config@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + unconfig: 0.6.1 + transitivePeerDependencies: + - supports-color + + '@unocss/core@65.4.3': {} + + '@unocss/extractor-arbitrary-variants@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/inspector@65.4.3(vue@3.5.13(typescript@5.7.3))': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/rule-utils': 65.4.3 + colorette: 2.0.20 + gzip-size: 6.0.0 + sirv: 3.0.0 + vue-flow-layout: 0.1.1(vue@3.5.13(typescript@5.7.3)) + transitivePeerDependencies: + - vue + + '@unocss/postcss@65.4.3(postcss@8.5.1)': + dependencies: + '@unocss/config': 65.4.3 + '@unocss/core': 65.4.3 + '@unocss/rule-utils': 65.4.3 + css-tree: 3.1.0 + postcss: 8.5.1 + tinyglobby: 0.2.10 + transitivePeerDependencies: + - supports-color + + '@unocss/preset-attributify@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/preset-icons@65.4.3': + dependencies: + '@iconify/utils': 2.3.0 + '@unocss/core': 65.4.3 + ofetch: 1.4.1 + transitivePeerDependencies: + - supports-color + + '@unocss/preset-mini@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/extractor-arbitrary-variants': 65.4.3 + '@unocss/rule-utils': 65.4.3 + + '@unocss/preset-tagify@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/preset-typography@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/preset-mini': 65.4.3 + + '@unocss/preset-uno@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/preset-mini': 65.4.3 + '@unocss/preset-wind': 65.4.3 + '@unocss/rule-utils': 65.4.3 + + '@unocss/preset-web-fonts@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + ofetch: 1.4.1 + + '@unocss/preset-wind@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/preset-mini': 65.4.3 + '@unocss/rule-utils': 65.4.3 + + '@unocss/reset@65.4.3': {} + + '@unocss/rule-utils@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + magic-string: 0.30.17 + + '@unocss/transformer-attributify-jsx@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/transformer-compile-class@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/transformer-directives@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + '@unocss/rule-utils': 65.4.3 + css-tree: 3.1.0 + + '@unocss/transformer-variant-group@65.4.3': + dependencies: + '@unocss/core': 65.4.3 + + '@unocss/vite@65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3))': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.4(rollup@4.34.4) + '@unocss/config': 65.4.3 + '@unocss/core': 65.4.3 + '@unocss/inspector': 65.4.3(vue@3.5.13(typescript@5.7.3)) + chokidar: 3.6.0 + magic-string: 0.30.17 + tinyglobby: 0.2.10 + vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + transitivePeerDependencies: + - rollup + - supports-color + - vue + + '@unocss/webpack@65.4.3(rollup@4.34.4)': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.4(rollup@4.34.4) + '@unocss/config': 65.4.3 + '@unocss/core': 65.4.3 + chokidar: 3.6.0 + magic-string: 0.30.17 + tinyglobby: 0.2.10 + unplugin: 2.1.2 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - rollup + - supports-color + optional: true + + '@vitejs/plugin-react@4.3.4(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))': + dependencies: + '@babel/core': 7.26.7 + '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.7) + '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.7) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.2 + vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + transitivePeerDependencies: + - supports-color + + '@vscode/web-custom-data@0.4.13': {} + + '@vue/compiler-core@3.5.13': + dependencies: + '@babel/parser': 7.26.7 + '@vue/shared': 3.5.13 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.1 + + '@vue/compiler-dom@3.5.13': + dependencies: + '@vue/compiler-core': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/compiler-sfc@3.5.13': + dependencies: + '@babel/parser': 7.26.7 + '@vue/compiler-core': 3.5.13 + '@vue/compiler-dom': 3.5.13 + '@vue/compiler-ssr': 3.5.13 + '@vue/shared': 3.5.13 + estree-walker: 2.0.2 + magic-string: 0.30.17 + postcss: 8.5.1 + source-map-js: 1.2.1 + + '@vue/compiler-ssr@3.5.13': + dependencies: + '@vue/compiler-dom': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/reactivity@3.5.13': + dependencies: + '@vue/shared': 3.5.13 + + '@vue/runtime-core@3.5.13': + dependencies: + '@vue/reactivity': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/runtime-dom@3.5.13': + dependencies: + '@vue/reactivity': 3.5.13 + '@vue/runtime-core': 3.5.13 + '@vue/shared': 3.5.13 + csstype: 3.1.3 + + '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.7.3))': + dependencies: + '@vue/compiler-ssr': 3.5.13 + '@vue/shared': 3.5.13 + vue: 3.5.13(typescript@5.7.3) + + '@vue/shared@3.5.13': {} + + acorn@8.14.0: {} + + ansi-regex@5.0.1: {} + + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + + binary-extensions@2.3.0: {} + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browserslist@4.24.4: + dependencies: + caniuse-lite: 1.0.30001697 + electron-to-chromium: 1.5.93 + node-releases: 2.0.19 + update-browserslist-db: 1.1.2(browserslist@4.24.4) + + buffer-from@1.1.2: + optional: true + + bundle-require@5.1.0(esbuild@0.24.2): + dependencies: + esbuild: 0.24.2 + load-tsconfig: 0.2.5 + + cac@6.7.14: {} + + caniuse-lite@1.0.30001697: {} + + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.3: {} + + color-name@1.1.4: {} + + colorette@2.0.20: {} + + commander@2.20.3: + optional: true + + confbox@0.1.8: {} + + consola@3.4.0: {} + + convert-source-map@2.0.0: {} + + css-tree@3.1.0: + dependencies: + mdn-data: 2.12.2 + source-map-js: 1.2.1 + + csstype@3.1.3: {} + + debug@4.4.0: + dependencies: + ms: 2.1.3 + + defu@6.1.4: {} + + destr@2.0.3: {} + + didyoumean2@4.1.0: + dependencies: + '@babel/runtime': 7.26.7 + leven: 3.1.0 + lodash.deburr: 4.1.0 + + duplexer@0.1.2: {} + + electron-to-chromium@1.5.93: {} + + emoji-regex@8.0.0: {} + + entities@4.5.0: {} + + esbuild@0.23.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + + esbuild@0.24.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.2 + '@esbuild/android-arm': 0.24.2 + '@esbuild/android-arm64': 0.24.2 + '@esbuild/android-x64': 0.24.2 + '@esbuild/darwin-arm64': 0.24.2 + '@esbuild/darwin-x64': 0.24.2 + '@esbuild/freebsd-arm64': 0.24.2 + '@esbuild/freebsd-x64': 0.24.2 + '@esbuild/linux-arm': 0.24.2 + '@esbuild/linux-arm64': 0.24.2 + '@esbuild/linux-ia32': 0.24.2 + '@esbuild/linux-loong64': 0.24.2 + '@esbuild/linux-mips64el': 0.24.2 + '@esbuild/linux-ppc64': 0.24.2 + '@esbuild/linux-riscv64': 0.24.2 + '@esbuild/linux-s390x': 0.24.2 + '@esbuild/linux-x64': 0.24.2 + '@esbuild/netbsd-arm64': 0.24.2 + '@esbuild/netbsd-x64': 0.24.2 + '@esbuild/openbsd-arm64': 0.24.2 + '@esbuild/openbsd-x64': 0.24.2 + '@esbuild/sunos-x64': 0.24.2 + '@esbuild/win32-arm64': 0.24.2 + '@esbuild/win32-ia32': 0.24.2 + '@esbuild/win32-x64': 0.24.2 + + escalade@3.2.0: {} + + escape-string-regexp@1.0.5: {} + + estree-walker@2.0.2: {} + + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fastq@1.19.0: + dependencies: + reusify: 1.0.4 + + fdir@6.4.3(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + fsevents@2.3.3: + optional: true + + gensync@1.0.0-beta.2: {} + + get-caller-file@2.0.5: {} + + get-tsconfig@4.10.0: + dependencies: + resolve-pkg-maps: 1.0.0 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + globals@11.12.0: {} + + globals@15.14.0: {} + + gzip-size@6.0.0: + dependencies: + duplexer: 0.1.2 + + has-flag@3.0.0: {} + + importx@0.5.1: + dependencies: + bundle-require: 5.1.0(esbuild@0.24.2) + debug: 4.4.0 + esbuild: 0.24.2 + jiti: 2.4.2 + pathe: 1.1.2 + tsx: 4.19.2 + transitivePeerDependencies: + - supports-color + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-number@7.0.0: {} + + jiti@2.4.2: {} + + js-tokens@4.0.0: {} + + jsesc@3.1.0: {} + + json5@2.2.3: {} + + kolorist@1.8.0: {} + + leven@3.1.0: {} + + lit-analyzer@2.0.3: + dependencies: + '@vscode/web-custom-data': 0.4.13 + chalk: 2.4.2 + didyoumean2: 4.1.0 + fast-glob: 3.3.3 + parse5: 5.1.0 + ts-simple-type: 2.0.0-next.0 + vscode-css-languageservice: 4.3.0 + vscode-html-languageservice: 3.1.0 + web-component-analyzer: 2.0.0 + + lit-element@4.1.1: + dependencies: + '@lit-labs/ssr-dom-shim': 1.3.0 + '@lit/reactive-element': 2.0.4 + lit-html: 3.2.1 + + lit-html@3.2.1: + dependencies: + '@types/trusted-types': 2.0.7 + + lit@3.2.1: + dependencies: + '@lit/reactive-element': 2.0.4 + lit-element: 4.1.1 + lit-html: 3.2.1 + + load-tsconfig@0.2.5: {} + + local-pkg@1.0.0: + dependencies: + mlly: 1.7.4 + pkg-types: 1.3.1 + + lodash.deburr@4.1.0: {} + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + + mdn-data@2.12.2: {} + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mlly@1.7.4: + dependencies: + acorn: 8.14.0 + pathe: 2.0.2 + pkg-types: 1.3.1 + ufo: 1.5.4 + + mrmime@2.0.0: {} + + ms@2.1.3: {} + + nanoid@3.3.8: {} + + node-fetch-native@1.6.6: {} + + node-releases@2.0.19: {} + + normalize-path@3.0.0: {} + + ofetch@1.4.1: + dependencies: + destr: 2.0.3 + node-fetch-native: 1.6.6 + ufo: 1.5.4 + + package-manager-detector@0.2.9: {} + + parse5@5.1.0: {} + + pathe@1.1.2: {} + + pathe@2.0.2: {} + + perfect-debounce@1.0.0: {} + + picocolors@1.1.1: {} + + picomatch@2.3.1: {} + + picomatch@4.0.2: {} + + pkg-types@1.3.1: + dependencies: + confbox: 0.1.8 + mlly: 1.7.4 + pathe: 2.0.2 + + postcss@8.5.1: + dependencies: + nanoid: 3.3.8 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + queue-microtask@1.2.3: {} + + react-dom@19.0.0(react@19.0.0): + dependencies: + react: 19.0.0 + scheduler: 0.25.0 + + react-refresh@0.14.2: {} + + react@19.0.0: {} + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.1 + + regenerator-runtime@0.14.1: {} + + require-directory@2.1.1: {} + + resolve-pkg-maps@1.0.0: {} + + reusify@1.0.4: {} + + rollup@4.34.4: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.34.4 + '@rollup/rollup-android-arm64': 4.34.4 + '@rollup/rollup-darwin-arm64': 4.34.4 + '@rollup/rollup-darwin-x64': 4.34.4 + '@rollup/rollup-freebsd-arm64': 4.34.4 + '@rollup/rollup-freebsd-x64': 4.34.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.34.4 + '@rollup/rollup-linux-arm-musleabihf': 4.34.4 + '@rollup/rollup-linux-arm64-gnu': 4.34.4 + '@rollup/rollup-linux-arm64-musl': 4.34.4 + '@rollup/rollup-linux-loongarch64-gnu': 4.34.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.34.4 + '@rollup/rollup-linux-riscv64-gnu': 4.34.4 + '@rollup/rollup-linux-s390x-gnu': 4.34.4 + '@rollup/rollup-linux-x64-gnu': 4.34.4 + '@rollup/rollup-linux-x64-musl': 4.34.4 + '@rollup/rollup-win32-arm64-msvc': 4.34.4 + '@rollup/rollup-win32-ia32-msvc': 4.34.4 + '@rollup/rollup-win32-x64-msvc': 4.34.4 + fsevents: 2.3.3 + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + scheduler@0.25.0: {} + + semver@6.3.1: {} + + sirv@3.0.0: + dependencies: + '@polka/url': 1.0.0-next.28 + mrmime: 2.0.0 + totalist: 3.0.1 + + source-map-js@1.2.1: {} + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + optional: true + + source-map@0.6.1: + optional: true + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + + terser@5.38.0: + dependencies: + '@jridgewell/source-map': 0.3.6 + acorn: 8.14.0 + commander: 2.20.3 + source-map-support: 0.5.21 + optional: true + + tinyexec@0.3.2: {} + + tinyglobby@0.2.10: + dependencies: + fdir: 6.4.3(picomatch@4.0.2) + picomatch: 4.0.2 + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + totalist@3.0.1: {} + + ts-lit-plugin@2.0.2: + dependencies: + lit-analyzer: 2.0.3 + web-component-analyzer: 2.0.0 + + ts-simple-type@2.0.0-next.0: {} + + tsx@4.19.2: + dependencies: + esbuild: 0.23.1 + get-tsconfig: 4.10.0 + optionalDependencies: + fsevents: 2.3.3 + + typescript@5.2.2: {} + + typescript@5.7.3: {} + + ufo@1.5.4: {} + + unconfig@0.6.1: + dependencies: + '@antfu/utils': 8.1.0 + defu: 6.1.4 + importx: 0.5.1 + transitivePeerDependencies: + - supports-color + + undici-types@6.20.0: + optional: true + + unocss@65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)): + dependencies: + '@unocss/astro': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + '@unocss/cli': 65.4.3(rollup@4.34.4) + '@unocss/core': 65.4.3 + '@unocss/postcss': 65.4.3(postcss@8.5.1) + '@unocss/preset-attributify': 65.4.3 + '@unocss/preset-icons': 65.4.3 + '@unocss/preset-mini': 65.4.3 + '@unocss/preset-tagify': 65.4.3 + '@unocss/preset-typography': 65.4.3 + '@unocss/preset-uno': 65.4.3 + '@unocss/preset-web-fonts': 65.4.3 + '@unocss/preset-wind': 65.4.3 + '@unocss/transformer-attributify-jsx': 65.4.3 + '@unocss/transformer-compile-class': 65.4.3 + '@unocss/transformer-directives': 65.4.3 + '@unocss/transformer-variant-group': 65.4.3 + '@unocss/vite': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + optionalDependencies: + '@unocss/webpack': 65.4.3(rollup@4.34.4) + vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + transitivePeerDependencies: + - postcss + - rollup + - supports-color + - vue + + unplugin@2.1.2: + dependencies: + acorn: 8.14.0 + webpack-virtual-modules: 0.6.2 + optional: true + + update-browserslist-db@1.1.2(browserslist@4.24.4): + dependencies: + browserslist: 4.24.4 + escalade: 3.2.0 + picocolors: 1.1.1 + + vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2): + dependencies: + esbuild: 0.24.2 + postcss: 8.5.1 + rollup: 4.34.4 + optionalDependencies: + '@types/node': 22.13.1 + fsevents: 2.3.3 + jiti: 2.4.2 + terser: 5.38.0 + tsx: 4.19.2 + + vscode-css-languageservice@4.3.0: + dependencies: + vscode-languageserver-textdocument: 1.0.12 + vscode-languageserver-types: 3.16.0-next.2 + vscode-nls: 4.1.2 + vscode-uri: 2.1.2 + + vscode-html-languageservice@3.1.0: + dependencies: + vscode-languageserver-textdocument: 1.0.12 + vscode-languageserver-types: 3.16.0-next.2 + vscode-nls: 4.1.2 + vscode-uri: 2.1.2 + + vscode-languageserver-textdocument@1.0.12: {} + + vscode-languageserver-types@3.16.0-next.2: {} + + vscode-nls@4.1.2: {} + + vscode-uri@2.1.2: {} + + vue-flow-layout@0.1.1(vue@3.5.13(typescript@5.7.3)): + dependencies: + vue: 3.5.13(typescript@5.7.3) + + vue@3.5.13(typescript@5.7.3): + dependencies: + '@vue/compiler-dom': 3.5.13 + '@vue/compiler-sfc': 3.5.13 + '@vue/runtime-dom': 3.5.13 + '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@5.7.3)) + '@vue/shared': 3.5.13 + optionalDependencies: + typescript: 5.7.3 + + web-component-analyzer@2.0.0: + dependencies: + fast-glob: 3.3.3 + ts-simple-type: 2.0.0-next.0 + typescript: 5.2.2 + yargs: 17.7.2 + + webpack-sources@3.2.3: + optional: true + + webpack-virtual-modules@0.6.2: + optional: true + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + y18n@5.0.8: {} + + yallist@3.1.1: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..eccc335 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +packages: + - 'packages/**' \ No newline at end of file diff --git a/src/main/java/run/halo/live2d/Live2dInitProcessor.java b/src/main/java/run/halo/live2d/Live2dInitProcessor.java index 8c599b9..4c2eb1a 100644 --- a/src/main/java/run/halo/live2d/Live2dInitProcessor.java +++ b/src/main/java/run/halo/live2d/Live2dInitProcessor.java @@ -107,9 +107,9 @@ private CharSequence loadLive2d(String loadTime, String loadingScript) { """; } else { template = """ - window.onload = function() { + window.addEventListener('load', () => { %s - } + }) """; } return template.formatted(loadingScript); From b9351edc72477169a72a785acfa7913f8307e98c Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 6 Feb 2025 18:43:12 +0800 Subject: [PATCH 03/26] feat: enhance toggle functionality --- packages/live2d/src/components/Live2dToggle.tsx | 2 +- packages/live2d/uno.config.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index f03785e..3394500 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -23,7 +23,7 @@ export class Live2dToggle extends UnoLitElement { } render(): TemplateResult { - return html`
+ return html`
看板娘
`; } diff --git a/packages/live2d/uno.config.ts b/packages/live2d/uno.config.ts index 48d1df6..0127cd9 100644 --- a/packages/live2d/uno.config.ts +++ b/packages/live2d/uno.config.ts @@ -6,4 +6,9 @@ export default defineConfig({ }, presets: [presetUno()], transformers: [transformerDirectives()], + rules: [ + ['writing-vertical-rl', { + "writing-mode": "vertical-rl" + }] + ] }); \ No newline at end of file From 87ecb6ecb18ab3975b1aa7985369edf6301ed58f Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Fri, 7 Feb 2025 01:10:57 +0800 Subject: [PATCH 04/26] feat: add live2d context --- packages/live2d/.editorconfig | 11 +++ packages/live2d/package.json | 21 ++-- packages/live2d/src/Demo.tsx | 20 ++-- .../live2d/src/components/Live2dCanvas.tsx | 30 ++++-- .../live2d/src/components/Live2dContext.tsx | 31 ++++++ .../live2d/src/components/Live2dToggle.tsx | 99 ++++++++++--------- .../live2d/src/components/Live2dWidget.tsx | 38 +++++-- packages/live2d/src/context/config-context.ts | 15 +++ packages/live2d/src/index.ts | 6 +- packages/live2d/src/live2d/model.ts | 4 +- packages/live2d/src/types/index.ts | 13 +-- 11 files changed, 196 insertions(+), 92 deletions(-) create mode 100644 packages/live2d/.editorconfig create mode 100644 packages/live2d/src/components/Live2dContext.tsx create mode 100644 packages/live2d/src/context/config-context.ts diff --git a/packages/live2d/.editorconfig b/packages/live2d/.editorconfig new file mode 100644 index 0000000..3c2d313 --- /dev/null +++ b/packages/live2d/.editorconfig @@ -0,0 +1,11 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = false \ No newline at end of file diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 731f2a3..b3af2c0 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -3,21 +3,24 @@ "private": true, "version": "1.0.0", "type": "module", - "files": ["dist"], + "files": [ + "dist" + ], "main": "./dist/live2d.umd.cjs", - "module": "./dist/live2d.js", - "exports": { - ".": { - "import": "./dist/live2d.js", - "require": "./dist/live2d.umd.cjs" - } - }, + "module": "./dist/live2d.js", + "exports": { + ".": { + "import": "./dist/live2d.js", + "require": "./dist/live2d.umd.cjs" + } + }, "scripts": { - "dev": "vite --open", + "dev": "vite --open", "build": "tsc -b && vite build", "check": "biome check --write" }, "dependencies": { + "@lit/context": "^1.1.3", "@lit/react": "^1.0.7", "lit": "^3.2.1", "react": "^19.0.0", diff --git a/packages/live2d/src/Demo.tsx b/packages/live2d/src/Demo.tsx index 989f480..3ba19a6 100644 --- a/packages/live2d/src/Demo.tsx +++ b/packages/live2d/src/Demo.tsx @@ -1,13 +1,13 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import { Live2dToggleComponent } from './components/Live2dToggle'; +import React from "react"; +import ReactDOM from "react-dom/client"; +import { Live2dContextComponent } from "./components/Live2dContext"; -const rootEl = document.getElementById('root'); +const rootEl = document.getElementById("root"); if (rootEl) { - const root = ReactDOM.createRoot(rootEl); - root.render( - - - , - ); + const root = ReactDOM.createRoot(rootEl); + root.render( + + + , + ); } diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 8b86854..912e93e 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -2,21 +2,37 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; +import { property, state } from "lit/decorators.js"; +import Model from "../live2d/model"; +import { consume } from "@lit/context"; +import { configContext, type Live2dConfig } from "../context/config-context"; export class Live2dCanvas extends UnoLitElement { - render(): TemplateResult { - return html` + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _model: unknown; + + connectedCallback(): void { + super.connectedCallback(); + this._model = new Model(this.config); + } + + render(): TemplateResult { + return html`
`; - } + } } customElements.define("live2d-canvas", Live2dCanvas); export const Live2dCanvasComponent = createComponent({ - tagName: "live2d-canvas", - elementClass: Live2dCanvas, - react: React, -}) \ No newline at end of file + tagName: "live2d-canvas", + elementClass: Live2dCanvas, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx new file mode 100644 index 0000000..582c911 --- /dev/null +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -0,0 +1,31 @@ +import { html, type TemplateResult } from "lit"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { createComponent } from "@lit/react"; +import React from "react"; +import "./Live2dWidget"; +import { provide } from "@lit/context"; +import { configContext, type Live2dConfig } from "../context/config-context"; + +export class Live2dContext extends UnoLitElement { + @provide({ context: configContext }) + logger = { + apiPath: "https://live2d.fghrsh.net/api", + live2dLocation: "right", + consoleShowStatus: false, + isTools: true, + } as Live2dConfig; + + render(): TemplateResult { + return html` + + `; + } +} + +customElements.define("live2d-context", Live2dContext); + +export const Live2dContextComponent = createComponent({ + tagName: "live2d-context", + elementClass: Live2dContext, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 3394500..4885e51 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -4,56 +4,67 @@ import { createComponent } from "@lit/react"; import React from "react"; import { TOGGLE_CANVAS_EVENT } from "../events"; import { state } from "lit/decorators.js"; +import type { Live2dToggleEventDetail } from "../types"; export class Live2dToggle extends UnoLitElement { - @state() - // 当前工具栏是否显示 - private _isShow = false; - - constructor() { - super(); - this.addEventListener("click", this.handleClick); - // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 - const live2dDisplay = localStorage.getItem("live2d-display") - if (live2dDisplay) { - if (Date.now() - Number.parseInt(live2dDisplay) > 24 * 60 * 60 * 1000) { - this.triggerToggleLive2d(true); - } - } - } - - render(): TemplateResult { - return html`
+ @state() + // 当前工具栏是否显示 + private _isShow = false; + + connectedCallback(): void { + super.connectedCallback(); + this.addEventListener("click", this.handleClick); + + // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 + const live2dDisplay = localStorage.getItem("live2d-display"); + if (live2dDisplay) { + if (Date.now() - Number.parseInt(live2dDisplay) <= 24 * 60 * 60 * 1000) { + this.triggerToggleLive2d(false); + return; + } + } + this.triggerToggleLive2d(true); + } + + disconnectedCallback(): void { + super.disconnectedCallback(); + this.removeEventListener("click", this.handleClick); + } + + render(): TemplateResult { + return html`
看板娘
`; - } - - handleClick() { - this.triggerToggleLive2d(!!this._isShow); - } - - triggerToggleLive2d(isShow: boolean) { - // 当前切换栏与 Live2d 的显示状态相反 - this._isShow = !isShow; - if (isShow) { - localStorage.removeItem("live2d-display"); - } else { - localStorage.setItem("live2d-display", Date.now().toString()); - } - this.dispatchEvent(new CustomEvent(TOGGLE_CANVAS_EVENT, { - bubbles: true, - composed: true, - detail: { - isShow, - }, - })); - } + } + + handleClick() { + this.triggerToggleLive2d(!!this._isShow); + } + + triggerToggleLive2d(isShow: boolean) { + // 当前切换栏与 Live2d 的显示状态相反 + this._isShow = !isShow; + if (isShow) { + localStorage.removeItem("live2d-display"); + } else { + localStorage.setItem("live2d-display", Date.now().toString()); + } + this.dispatchEvent( + new CustomEvent(TOGGLE_CANVAS_EVENT, { + bubbles: true, + composed: true, + detail: { + isShow, + }, + }), + ); + } } customElements.define("live2d-toggle", Live2dToggle); export const Live2dToggleComponent = createComponent({ - tagName: "live2d-toggle", - elementClass: Live2dToggle, - react: React, -}) \ No newline at end of file + tagName: "live2d-toggle", + elementClass: Live2dToggle, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 196338c..bb3cd74 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -2,22 +2,40 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; +import type { Live2dToggleEventDetail } from "../types"; import { state } from "lit/decorators.js"; +import "./Live2dToggle"; +import "./Live2dCanvas"; + export class Live2dWidget extends UnoLitElement { - render(): TemplateResult { - return html` -
- -
+ @state() + private _isShow = false; + + render(): TemplateResult { + return html` + + ${this.renderLive2dWidget()} `; - } + } + + renderLive2dWidget() { + if (this._isShow) { + return html`
+ +
`; + } + } + + handleToggleWidget(e: CustomEvent) { + this._isShow = e.detail.isShow; + } } customElements.define("live2d-widget", Live2dWidget); export const Live2dWidgetComponent = createComponent({ - tagName: "live2d-widget", - elementClass: Live2dWidget, - react: React, -}) \ No newline at end of file + tagName: "live2d-widget", + elementClass: Live2dWidget, + react: React, +}); diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts new file mode 100644 index 0000000..867bf09 --- /dev/null +++ b/packages/live2d/src/context/config-context.ts @@ -0,0 +1,15 @@ +import { createContext } from '@lit/context'; + +export interface Live2dConfig { + // Live2d API 路径 + apiPath: string; + // Live2d 定位 + live2dLocation: "left" | "right"; + // 是否在控制台显示状态 + consoleShowStatus?: boolean; + // 是否显示右侧工具栏 + isTools?: boolean; + [key: string]: unknown; +} + +export const configContext = createContext("config"); \ No newline at end of file diff --git a/packages/live2d/src/index.ts b/packages/live2d/src/index.ts index 5e2d630..615b6eb 100644 --- a/packages/live2d/src/index.ts +++ b/packages/live2d/src/index.ts @@ -1,5 +1,9 @@ import { Live2dToggle } from "./components/Live2dToggle" +import { Live2dWidget } from "./components/Live2dWidget" +import { Live2dContext } from './components/Live2dContext'; export { - Live2dToggle + Live2dToggle, + Live2dWidget, + Live2dContext, } \ No newline at end of file diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index b595e81..c6546ef 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -78,4 +78,6 @@ class Model { .then((response) => response.json()) as ModelResult; this.loadModel(result.model.id, 0, result.model.message); } -} \ No newline at end of file +} + +export default Model; \ No newline at end of file diff --git a/packages/live2d/src/types/index.ts b/packages/live2d/src/types/index.ts index 311ce63..55345db 100644 --- a/packages/live2d/src/types/index.ts +++ b/packages/live2d/src/types/index.ts @@ -1,13 +1,6 @@ -export interface Live2dConfig { - // Live2d API 路径 - apiPath: string; - // Live2d 定位 - live2dLocation: "left" | "right"; - // 是否在控制台显示状态 - consoleShowStatus?: boolean; - // 是否显示右侧工具栏 - isTools?: boolean; - [key: string]: unknown; +export interface Live2dToggleEventDetail { + // 是否显示看板娘 + isShow: boolean; } export interface Live2dMessageEventDetail { From 3052a28e34c2a83e5c59e7e87916650941bca119 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Tue, 11 Feb 2025 01:26:14 +0800 Subject: [PATCH 05/26] refactor: complete refactoring of tips and related content --- .../live2d/src/components/Live2dCanvas.tsx | 35 +- .../live2d/src/components/Live2dContext.tsx | 1 + packages/live2d/src/components/Live2dTips.tsx | 47 +- .../live2d/src/components/Live2dToggle.tsx | 3 +- .../live2d/src/components/Live2dWidget.tsx | 6 +- packages/live2d/src/context/config-context.ts | 45 + packages/live2d/src/events/event.d.ts | 8 + packages/live2d/src/events/index.ts | 4 +- packages/live2d/src/events/load-tips.ts | 46 + packages/live2d/src/events/types.ts | 27 + packages/live2d/src/helpers/getPluginTips.ts | 52 + .../live2d/src/helpers/loadTipsResource.ts | 35 + packages/live2d/src/helpers/mergeTips.ts | 31 + .../live2d/src/helpers/pluginTipsCovert.ts | 29 + packages/live2d/src/helpers/sendMessage.ts | 2 +- packages/live2d/src/libs/live2d-tips.json | 412 + packages/live2d/src/libs/live2d.min.js | 8121 +++++++++++++++++ packages/live2d/src/live2d/model.ts | 31 +- packages/live2d/src/types/index.ts | 13 - packages/live2d/src/util/distinctArray.ts | 7 + pnpm-lock.yaml | 10 + 21 files changed, 8921 insertions(+), 44 deletions(-) create mode 100644 packages/live2d/src/events/event.d.ts create mode 100644 packages/live2d/src/events/load-tips.ts create mode 100644 packages/live2d/src/events/types.ts create mode 100644 packages/live2d/src/helpers/getPluginTips.ts create mode 100644 packages/live2d/src/helpers/loadTipsResource.ts create mode 100644 packages/live2d/src/helpers/mergeTips.ts create mode 100644 packages/live2d/src/helpers/pluginTipsCovert.ts create mode 100644 packages/live2d/src/libs/live2d-tips.json create mode 100644 packages/live2d/src/libs/live2d.min.js delete mode 100644 packages/live2d/src/types/index.ts create mode 100644 packages/live2d/src/util/distinctArray.ts diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 912e93e..fdd32fb 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -1,11 +1,13 @@ -import { html, type TemplateResult } from "lit"; +import { html, type PropertyValues, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import { property, state } from "lit/decorators.js"; +import { property, query, state } from "lit/decorators.js"; import Model from "../live2d/model"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; +import "../libs/live2d.min.js"; +import { LIVE2D_BEFORE_INIT_EVENT } from "../events/types.js"; export class Live2dCanvas extends UnoLitElement { @consume({ context: configContext }) @@ -15,18 +17,35 @@ export class Live2dCanvas extends UnoLitElement { @state() private _model: unknown; - connectedCallback(): void { - super.connectedCallback(); - this._model = new Model(this.config); - } + @query("#live2d") + private _live2d; render(): TemplateResult { return html` -
+ -
+ `; } + + connectedCallback(): void { + super.connectedCallback(); + // 发出 Live2d beforeInit 事件 + window.dispatchEvent( + new CustomEvent(LIVE2D_BEFORE_INIT_EVENT, { + detail: { + config: this.config, + }, + }), + ); + } + + protected firstUpdated(_changedProperties: PropertyValues): void { + super.firstUpdated(_changedProperties); + if (this.config && this._live2d) { + this._model = new Model(this._live2d, this.config); + } + } } customElements.define("live2d-canvas", Live2dCanvas); diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index 582c911..651e769 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -5,6 +5,7 @@ import React from "react"; import "./Live2dWidget"; import { provide } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; +import "../events"; export class Live2dContext extends UnoLitElement { @provide({ context: configContext }) diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 6dc8fb2..4e945db 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -2,21 +2,54 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; +import { + LIVE2d_MESSAGE_EVENT, + type Live2dMessageEventDetail, +} from "../events/types"; +import { consume } from "@lit/context"; +import { configContext, type Live2dConfig } from "../context/config-context"; +import { property } from "lit/decorators.js"; export class Live2dTips extends UnoLitElement { - render(): TemplateResult { - return html` + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + render(): TemplateResult { + return html`
`; - } + } + + connectedCallback(): void { + super.connectedCallback(); + // 为 tips 注册 tips 相关事件 + window.addEventListener( + LIVE2d_MESSAGE_EVENT, + this.handleMessage as EventListener, + ); + } + + disconnectedCallback(): void { + super.connectedCallback(); + window.removeEventListener( + LIVE2d_MESSAGE_EVENT, + this.handleMessage as EventListener, + ); + } + + handleMessage(e: CustomEvent) { + console.log(e.detail); + return; + } } customElements.define("live2d-tips", Live2dTips); export const Live2dTipsComponent = createComponent({ - tagName: "live2d-tips", - elementClass: Live2dTips, - react: React, -}) \ No newline at end of file + tagName: "live2d-tips", + elementClass: Live2dTips, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 4885e51..8a5f007 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -2,9 +2,8 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import { TOGGLE_CANVAS_EVENT } from "../events"; +import { type Live2dToggleEventDetail, TOGGLE_CANVAS_EVENT } from "../events/types"; import { state } from "lit/decorators.js"; -import type { Live2dToggleEventDetail } from "../types"; export class Live2dToggle extends UnoLitElement { @state() diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index bb3cd74..c71c272 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -2,11 +2,12 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import type { Live2dToggleEventDetail } from "../types"; import { state } from "lit/decorators.js"; import "./Live2dToggle"; +import "./Live2dTips"; import "./Live2dCanvas"; +import type { Live2dToggleEventDetail } from "../events/types"; export class Live2dWidget extends UnoLitElement { @state() @@ -14,7 +15,7 @@ export class Live2dWidget extends UnoLitElement { render(): TemplateResult { return html` - + ${this.renderLive2dWidget()} `; } @@ -22,6 +23,7 @@ export class Live2dWidget extends UnoLitElement { renderLive2dWidget() { if (this._isShow) { return html`
+
`; } diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index 867bf09..915e1c4 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,5 +1,26 @@ import { createContext } from '@lit/context'; +export interface TipConfig { + mouseover: { + selector: string; + text: string[] | string; + }[]; + click: { + selector: string; + text: string[] | string; + }[]; + seasons: { + date: string; + text: string[] | string; + }[]; + message: { + default?: string[] | string; + console?: string[] | string; + copy?: string[] | string; + visibilitychange?: string[] | string; + } +} + export interface Live2dConfig { // Live2d API 路径 apiPath: string; @@ -9,6 +30,30 @@ export interface Live2dConfig { consoleShowStatus?: boolean; // 是否显示右侧工具栏 isTools?: boolean; + // 是否强制使用默认配置 + isForceUseDefaultConfig?: boolean; + // 模型编号 + modelId?: number; + // 纹理编号 + modelTexturesId?: number; + // 主题下的 tips 文件路径 + themeTipsPath?: string; + // 用户自定义的 tips 文件路径 + tipsPath?: string; + // 用户使用插件定义的 tips + selectorTips?: [{ + messageTexts?: { + message: string; + }[]; + selector: string; + mouseAction: "click" | "mouseover" | string | undefined; + }]; + // 页面可见性变化时的 tips + backSiteTip: string[] | string; + // 复制内容时的 tips + copyContentTip: string[] | string; + // 控制台打印 tips + openConsoleTip: string[] | string; [key: string]: unknown; } diff --git a/packages/live2d/src/events/event.d.ts b/packages/live2d/src/events/event.d.ts new file mode 100644 index 0000000..dbb1ea5 --- /dev/null +++ b/packages/live2d/src/events/event.d.ts @@ -0,0 +1,8 @@ +// 扩展全局事件映射 +interface GlobalEventHandlersEventMap { + "live2d:before-init": CustomEvent; + + "live2d:toggle-canvas": CustomEvent; + + "live2d:send-message": CustomEvent; +} \ No newline at end of file diff --git a/packages/live2d/src/events/index.ts b/packages/live2d/src/events/index.ts index 89687bf..73f237c 100644 --- a/packages/live2d/src/events/index.ts +++ b/packages/live2d/src/events/index.ts @@ -1,3 +1 @@ -export const TOGGLE_CANVAS_EVENT = 'toggle-canvas'; - -export const LIVE2d_MESSAGE_EVENT = 'live2d-message'; \ No newline at end of file +import "./load-tips"; \ No newline at end of file diff --git a/packages/live2d/src/events/load-tips.ts b/packages/live2d/src/events/load-tips.ts new file mode 100644 index 0000000..aed124a --- /dev/null +++ b/packages/live2d/src/events/load-tips.ts @@ -0,0 +1,46 @@ +import type { Live2dConfig, TipConfig } from "../context/config-context"; +import { getPluginTips } from "../helpers/getPluginTips"; +import { loadTipsResource } from "../helpers/loadTipsResource"; +import { mergeTips } from "../helpers/mergeTips"; +import { isNotEmptyString } from "../util/isString"; + +window.addEventListener("live2d:before-init", async (e) => { + const config = e.detail.config; + const tips = await _loadTips(config); + console.log("tips", tips); +}) + +const _loadTips = async (config: Live2dConfig) => { + if (!config) { + return; + } + // 后台配置 tips,其中包含 mouseover 及 click 两种配置,以及单独配置的 message + const pluginTips = getPluginTips(config); + // 主题设置 tips,只会包含 mouseover 及 click 两种配置(会过滤掉其他配置) + const themeTipsResult = await loadTipsResource(config.themeTipsPath); + const themeTips: TipConfig = { + click: themeTipsResult?.click || [], + mouseover: themeTipsResult?.mouseover || [], + seasons: [], + message: {}, + }; + const fullOrDefaultTips = await _getFullOrDefaultTips(config); + // 合并三种 tips + return mergeTips({ + pluginTips, + themeTips, + fullOrDefaultTips, + }); +} + +export const _getFullOrDefaultTips = async (config: Live2dConfig): Promise => { + // 获取插件文件中的全量 tips 文件 + if (isNotEmptyString(config?.tipsPath)) { + const tipsResult = await loadTipsResource(config.tipsPath); + if (tipsResult) { + return tipsResult; + } + } + // 获取默认的 tips 文件 + return (await import("../libs/live2d-tips.json")).default; +} diff --git a/packages/live2d/src/events/types.ts b/packages/live2d/src/events/types.ts new file mode 100644 index 0000000..1658fd1 --- /dev/null +++ b/packages/live2d/src/events/types.ts @@ -0,0 +1,27 @@ +import type { Live2dConfig } from "../context/config-context"; + +// Live2d beforeInit 事件 +export const LIVE2D_BEFORE_INIT_EVENT = 'live2d:before-init'; +export type Live2dBeforeInitEventDetail = { + // Live2D 配置 + config: Live2dConfig +} + + +// 切换 canvas 显示状态事件 +export const TOGGLE_CANVAS_EVENT = 'live2d:toggle-canvas'; +export type Live2dToggleEventDetail = { + // 是否显示看板娘 + isShow: boolean; +} + +// 发送 Live2D 消息事件 +export const LIVE2d_MESSAGE_EVENT = 'live2d:send-message'; +export type Live2dMessageEventDetail = { + // 消息内容 + text: string; + // 消息显示时间 + timeout: number; + // 消息优先级 + priority: number; +} diff --git a/packages/live2d/src/helpers/getPluginTips.ts b/packages/live2d/src/helpers/getPluginTips.ts new file mode 100644 index 0000000..423e61b --- /dev/null +++ b/packages/live2d/src/helpers/getPluginTips.ts @@ -0,0 +1,52 @@ +import type { Live2dConfig, TipConfig } from "../context/config-context"; + +/** + * 整合插件配置中的 tips 元素。 + * + * 插件配置中的元素如下所示: + * "selectorTips" : [ { + * "mouseAction" : "mouseover", + * "selector" : "#select", + * "messageTexts" : [ { + * "message" : "123" + * }, { + * "message" : "1231" + * }] + * }], + * "copyContentTip" : "你都复制了些什么呀,转载要记得加上出处哦!", + * "openConsoleTip" : "你是想要看看我的小秘密吗?", + */ +export const getPluginTips = (config: Live2dConfig): TipConfig => { + const tips: TipConfig = { + seasons: [], + click: [], + mouseover: [], + message: {}, + }; + // selector + if (config.selectorTips) { + for (const item of config.selectorTips) { + const texts = item.messageTexts?.map((text) => text.message); + if (!texts) { + continue; + } + const obj = { + selector: item.selector, + text: texts, + }; + if (item.mouseAction === "click") { + tips.click?.push(obj); + } else { + tips.mouseover?.push(obj); + } + } + } + // message + if (tips.message) { + tips.message.visibilitychange = config.backSiteTip; + tips.message.copy = config.copyContentTip; + tips.message.console = config.openConsoleTip; + } + + return tips; +} \ No newline at end of file diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts new file mode 100644 index 0000000..e0fa4af --- /dev/null +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -0,0 +1,35 @@ +import type { TipConfig } from '../context/config-context'; + +/** + * 远程加载提示资源 + * + * @param url + * @returns + */ +export function loadTipsResource(url?: string) { + const defaultObj: TipConfig = { + mouseover: [], + click: [], + seasons: [], + message: {}, + }; + return new Promise((resolve) => { + if (!url) { + resolve(defaultObj); + return; + } + try { + fetch(url) + .then((response) => response.json()) + .then((result) => { + resolve(result); + }) + .catch(() => { + resolve(defaultObj); + }); + } catch (e) { + // ignore + } + }); +}; \ No newline at end of file diff --git a/packages/live2d/src/helpers/mergeTips.ts b/packages/live2d/src/helpers/mergeTips.ts new file mode 100644 index 0000000..3a4eb0e --- /dev/null +++ b/packages/live2d/src/helpers/mergeTips.ts @@ -0,0 +1,31 @@ +import type { TipConfig } from "../context/config-context"; +import { distinctArray } from "../util/distinctArray"; + +/** + * 合并各个渠道的 tips,根据获取位置不同,合并时优先级也不同。优先级按高到低的顺序为 + * + *
    + *
      后台插件配置文件中获得的 tips。(该配置文件只支持 mouseover 与 click 两种类型的 tips 属性,另外包括单独配置的 message)
    + *
      主题文件中设置的 tips (该配置文件只支持 mouseover 与 click 两种类型的 tips 属性)
    + *
      配置/默认的 tips 文件(该配置文件支持所有的 tips 属性,但其属性会被优先级高的覆盖)
    + *
+ * + * 请注意,此项返回值为修改后的 defaultTips,任何修改 defaultTips 的情况都将导致返回值同步修改。 + * + * @param pluginTips 后台配置文件中设置的 tips + * @param themeTips 主题提供的 tips + * @param defaultTips 配置/默认的 tips + */ +export const mergeTips = ({ pluginTips, themeTips, fullOrDefaultTips }: { + pluginTips: TipConfig; + themeTips: TipConfig; + fullOrDefaultTips: TipConfig; +}) => { + const defaultTips = { ...fullOrDefaultTips }; + const duplicateClick = [...pluginTips.click, ...themeTips.click, ...fullOrDefaultTips.click]; + const duplicateMouseover = [...pluginTips.mouseover, ...themeTips.mouseover, ...fullOrDefaultTips.mouseover]; + defaultTips.click = distinctArray(duplicateClick, "selector"); + defaultTips.mouseover = distinctArray(duplicateMouseover, "selector"); + defaultTips.message = { ...defaultTips.message, ...pluginTips.message }; + return defaultTips; +}; \ No newline at end of file diff --git a/packages/live2d/src/helpers/pluginTipsCovert.ts b/packages/live2d/src/helpers/pluginTipsCovert.ts new file mode 100644 index 0000000..ea50cfd --- /dev/null +++ b/packages/live2d/src/helpers/pluginTipsCovert.ts @@ -0,0 +1,29 @@ +import type { Live2dConfig } from "../context/config-context"; + +export function backendConfigConvert(config: Live2dConfig) { + const tips = { + click: [], + mouseover: [], + message: {}, + }; + // selector + if (!!config["selectorTips"]) { + config["selectorTips"].forEach((item) => { + let texts = item["messageTexts"].map((text) => text.message); + let obj = { + selector: item["selector"], + text: texts, + }; + if (item["mouseAction"] === "click") { + tips.click.push(obj); + } else { + tips.mouseover.push(obj); + } + }); + } + // message + tips.message.visibilitychange = config["backSiteTip"]; + tips.message.copy = config["copyContentTip"]; + tips.message.console = config["openConsoleTip"]; + return tips; +}; \ No newline at end of file diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index 38e8069..3ce33ec 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -1,4 +1,4 @@ -import { LIVE2d_MESSAGE_EVENT } from "../events"; +import { LIVE2d_MESSAGE_EVENT } from "../events/types"; /** * 向 Live2D 发送消息事件 diff --git a/packages/live2d/src/libs/live2d-tips.json b/packages/live2d/src/libs/live2d-tips.json new file mode 100644 index 0000000..1846253 --- /dev/null +++ b/packages/live2d/src/libs/live2d-tips.json @@ -0,0 +1,412 @@ +{ + "mouseover": [ + { + "selector": "#live2d", + "text": [ + "干嘛呢你,快把手拿开~~", + "鼠…鼠标放错地方了!", + "你要干嘛呀?", + "喵喵喵?", + "怕怕(ノ≧∇≦)ノ", + "非礼呀!救命!", + "这样的话,只能使用武力了!", + "我要生气了哦", + "不要动手动脚的!", + "真…真的是不知羞耻!", + "Hentai!" + ] + }, + { + "selector": "#live2d-tool-openai", + "text": [ + "想要和我聊天吗?", + "我可是知道不少东西的!", + "呐呐,来和我聊聊天嘛~" + ] + }, + { + "selector": "#live2d-tool-hitokoto", + "text": ["猜猜我要说些什么?", "我从青蛙王子那里听到了不少人生经验。"] + }, + { + "selector": "#live2d-tool-asteroids", + "text": [ + "要不要来玩飞机大战?", + "这个按钮上写着「不要点击」。", + "想来和我一起玩个游戏吗?", + "听说这样可以蹦迪!" + ] + }, + { + "selector": "#live2d-tool-switch-model", + "text": [ + "你是不是不爱人家了呀,呜呜呜~", + "要见见我的姐姐嘛?", + "想要看看我妹妹嘛?", + "要切换看板娘吗?" + ] + }, + { + "selector": "#live2d-tool-switch-texture", + "text": [ + "喜欢换装 PLAY 吗?", + "这次要扮演什么呢?", + "变装!", + "让我们看看接下来会发生什么!" + ] + }, + { + "selector": "#live2d-tool-photo", + "text": [ + "你要给我拍照呀?一二三~茄子~", + "要不,我们来合影吧!", + "保持微笑就好了~" + ] + }, + { + "selector": "#live2d-tool-info", + "text": [ + "想要知道更多关于我的事么?", + "这里记录着我搬家的历史呢。", + "你想深入了解我什么呢?" + ] + }, + { + "selector": "#live2d-tool-quit", + "text": [ + "到了要说再见的时候了吗?", + "呜呜 QAQ 后会有期……", + "不要抛弃我呀……", + "我们,还能再见面吗……", + "哼,你会后悔的!" + ] + }, + { + "selector": "a[href='/']", + "text": [ + "点击前往首页,想回到上一页可以使用浏览器的后退功能哦。", + "点它就可以回到首页啦!", + "回首页看看吧。" + ] + }, + { + "selector": "a[href$='/about']", + "text": [ + "你想知道我家主人是谁吗?", + "这里有一些关于我家主人的秘密哦,要不要看看呢?", + "发现主人出没地点!" + ] + }, + { + "selector": "a[href='/tags']", + "text": ["点击就可以看文章的标签啦!", "点击来查看所有标签哦。"] + }, + { + "selector": "a[href='/categories']", + "text": ["文章都分类好啦~", "点击来查看文章分类哦。"] + }, + { + "selector": "a[href='/archives']", + "text": [ + "翻页比较麻烦吗,那就来看看文章归档吧。", + "文章目录都整理在这里啦!" + ] + }, + { + "selector": "#header-menu a", + "text": ["快看看这里都有什么呢?"] + }, + { + "selector": ".site-author", + "text": ["我家主人好看吗?", "这是我家主人(*´∇`*)"] + }, + { + "selector": ".site-state", + "text": ["这是文章的统计信息~", "要不要点进去看看?"] + }, + { + "selector": ".cc-opacity, .post-copyright-author", + "text": [ + "要记得规范转载哦。", + "所有文章均采用 CC BY-NC-SA 4.0 许可协议~", + "转载前要先注意下文章的版权协议呢。" + ] + }, + { + "selector": ".links-of-author", + "text": ["这里是主人的常驻地址哦。", "这里有主人的联系方式!"] + }, + { + "selector": ".followme", + "text": ["手机扫一下就能继续看,很方便呢~", "扫一扫,打开新世界的大门!"] + }, + { + "selector": ".fancybox img, img.medium-zoom-image", + "text": ["点击图片可以放大呢!"] + }, + { + "selector": ".copy-btn", + "text": ["代码可以直接点击复制哟。"] + }, + { + "selector": ".highlight .table-container, .gist", + "text": ["GitHub!我是新手!", "有问题为什么不先问问神奇海螺呢?"] + }, + { + "selector": "a[href^='mailto']", + "text": ["邮件我会及时回复的!", "点击就可以发送邮件啦~"] + }, + { + "selector": "a[href^='/tags/']", + "text": [ + "要去看看 {text} 标签么?", + "点它可以查看此标签下的所有文章哟!" + ] + }, + { + "selector": "a[href^='/categories/']", + "text": [ + "要去看看 {text} 分类么?", + "点它可以查看此分类下的所有文章哟!" + ] + }, + { + "selector": "#post-list > div", + "text": ["要看看 {text} 这篇文章吗?"] + }, + { + "selector": "a[rel='contents']", + "text": ["点击来阅读全文哦。"] + }, + { + "selector": ".beian a", + "text": ["我也是有户口的人哦。", "我的主人可是遵纪守法的好主人。"] + }, + { + "selector": ".container a[href^='http'], .nav-link .nav-text", + "text": [ + "要去看看 {text} 么?", + "去 {text} 逛逛吧。", + "到 {text} 看看吧。" + ] + }, + { + "selector": ".back-to-top", + "text": [ + "点它就可以回到顶部啦!", + "又回到最初的起点~", + "要回到开始的地方么?" + ] + }, + { + "selector": ".reward-container", + "text": [ + "我是不是棒棒哒~快给我点赞吧!", + "要打赏我嘛?好期待啊~", + "主人最近在吃土呢,很辛苦的样子,给他一些钱钱吧~" + ] + }, + { + "selector": "#wechat", + "text": ["这是我的微信二维码~"] + }, + { + "selector": "#alipay", + "text": ["这是我的支付宝哦!"] + }, + { + "selector": ".need-share-button_weibo", + "text": ["微博?来分享一波喵!"] + }, + { + "selector": ".need-share-button_wechat", + "text": ["分享到微信吧!"] + }, + { + "selector": ".need-share-button_douban", + "text": ["分享到豆瓣好像也不错!"] + }, + { + "selector": ".need-share-button_qqzone", + "text": ["QQ 空间,一键转发,耶~"] + }, + { + "selector": ".need-share-button_twitter", + "text": ["Twitter?好像是不存在的东西?"] + }, + { + "selector": ".need-share-button_facebook", + "text": ["emmm…FB 好像也是不存在的东西?"] + }, + { + "selector": ".post-nav-item a[rel='next']", + "text": [ + "来看看下一篇文章吧。", + "点它可以看下一篇文章哦!", + "要翻到下一篇文章吗?" + ] + }, + { + "selector": ".post-nav-item a[rel='prev']", + "text": [ + "来看看上一篇文章吧。", + "点它可以看上一篇文章哦!", + "要翻到上一篇文章吗?" + ] + }, + { + "selector": ".extend.next", + "text": ["去下一页看看吧。", "点它可以前进哦!", "要翻到下一页吗?"] + }, + { + "selector": ".extend.prev", + "text": ["去上一页看看吧。", "点它可以后退哦!", "要翻到上一页吗?"] + }, + { + "selector": ".rounded-base", + "text": [ + "想要去评论些什么吗?", + "要说点什么吗?", + "觉得博客不错?快来留言和主人交流吧!" + ] + }, + { + "selector": ".rounded-base a", + "text": [ + "你会不会熟练使用 Markdown 呀?", + "使用 Markdown 让评论更美观吧~" + ] + }, + { + "selector": ".relative", + "text": ["要插入一个萌萌哒的表情吗?", "要来一发表情吗?"] + }, + { + "selector": ".btn-secondary", + "text": ["要对自己的发言负责哦~", "要提交了吗,请耐心等待回复哦~"] + }, + { + "selector": ".comment-item", + "text": ["哇,快看看这个精彩评论!", "如果有疑问,请尽快留言哦~"] + } + ], + "click": [ + { + "selector": "#live2d", + "text": [ + "是…是不小心碰到了吧…", + "萝莉控是什么呀?", + "你看到我的小熊了吗?", + "再摸的话我可要报警了!⌇●﹏●⌇", + "110 吗,这里有个变态一直在摸我(ó﹏ò。)", + "不要摸我了,我会告诉老婆来打你的!", + "干嘛动我呀!小心我咬你!", + "别摸我,有什么好摸的!" + ] + }, + { + "selector": ".rounded-base", + "text": ["要吐槽些什么呢?", "一定要认真填写喵~", "有什么想说的吗?"] + }, + { + "selector": ".btn-secondary", + "text": ["提交评论啦~"] + } + ], + "seasons": [ + { + "date": "01/01", + "text": "元旦了呢,新的一年又开始了,今年是{year}年~" + }, + { + "date": "02/14", + "text": "又是一年情人节,{year}年找到对象了嘛~" + }, + { + "date": "03/08", + "text": "今天是国际妇女节!" + }, + { + "date": "03/12", + "text": "今天是植树节,要保护环境呀!" + }, + { + "date": "04/01", + "text": "悄悄告诉你一个秘密~今天是愚人节,不要被骗了哦~" + }, + { + "date": "05/01", + "text": "今天是五一劳动节,计划好假期去哪里了吗~" + }, + { + "date": "06/01", + "text": "儿童节了呢,快活的时光总是短暂,要是永远长不大该多好啊…" + }, + { + "date": "09/03", + "text": "中国人民抗日战争胜利纪念日,铭记历史、缅怀先烈、珍爱和平、开创未来。" + }, + { + "date": "09/10", + "text": "教师节,在学校要给老师问声好呀~" + }, + { + "date": "10/01", + "text": "国庆节到了,为祖国母亲庆生!" + }, + { + "date": "11/05-11/12", + "text": "今年的双十一是和谁一起过的呢~" + }, + { + "date": "12/20-12/31", + "text": "这几天是圣诞节,主人肯定又去剁手买买买了~" + } + ], + "time": [ + { + "hour": "6-7", + "text": "早上好!一日之计在于晨,美好的一天就要开始了~" + }, + { + "hour": "8-11", + "text": "上午好!工作顺利嘛,不要久坐,多起来走动走动哦!" + }, + { + "hour": "12-13", + "text": "中午了,工作了一个上午,现在是午餐时间!" + }, + { + "hour": "14-17", + "text": "午后很容易犯困呢,今天的运动目标完成了吗?" + }, + { + "hour": "18-19", + "text": "傍晚了!窗外夕阳的景色很美丽呢,最美不过夕阳红~" + }, + { + "hour": "20-21", + "text": "晚上好,今天过得怎么样?" + }, + { + "hour": "22-23", + "text": ["已经这么晚了呀,早点休息吧,晚安~", "深夜时要爱护眼睛呀!"] + }, + { + "hour": "0-5", + "text": "你是夜猫子呀?这么晚还不睡觉,明天起的来嘛?" + } + ], + "message": { + "default": [ + "好久不见,日子过得好快呢……", + "大坏蛋!你都多久没理人家了呀,嘤嘤嘤~", + "呐~快来逗我玩吧!", + "拿小拳拳锤你胸口!", + "记得把小家加入收藏夹哦!" + ], + "console": "哈哈,你打开了控制台,是想要看看我的小秘密吗?", + "copy": "你都复制了些什么呀,转载要记得加上出处哦!", + "visibilitychange": "哇,你终于回来了~" + } +} diff --git a/packages/live2d/src/libs/live2d.min.js b/packages/live2d/src/libs/live2d.min.js new file mode 100644 index 0000000..156325a --- /dev/null +++ b/packages/live2d/src/libs/live2d.min.js @@ -0,0 +1,8121 @@ +!(function (t) { + function i(r) { + if (e[r]) return e[r].exports; + var o = (e[r] = { i: r, l: !1, exports: {} }); + return t[r].call(o.exports, o, o.exports, i), (o.l = !0), o.exports; + } + var e = {}; + (i.m = t), + (i.c = e), + (i.d = function (t, e, r) { + i.o(t, e) || + Object.defineProperty(t, e, { + configurable: !1, + enumerable: !0, + get: r, + }); + }), + (i.n = function (t) { + var e = + t && t.__esModule + ? function () { + return t.default; + } + : function () { + return t; + }; + return i.d(e, "a", e), e; + }), + (i.o = function (t, i) { + return Object.prototype.hasOwnProperty.call(t, i); + }), + (i.p = ""), + i((i.s = 4)); +})([ + function (t, i, e) { + "use strict"; + function r() { + (this.live2DModel = null), + (this.modelMatrix = null), + (this.eyeBlink = null), + (this.physics = null), + (this.pose = null), + (this.debugMode = !1), + (this.initialized = !1), + (this.updating = !1), + (this.alpha = 1), + (this.accAlpha = 0), + (this.lipSync = !1), + (this.lipSyncValue = 0), + (this.accelX = 0), + (this.accelY = 0), + (this.accelZ = 0), + (this.dragX = 0), + (this.dragY = 0), + (this.startTimeMSec = null), + (this.mainMotionManager = new h()), + (this.expressionManager = new h()), + (this.motions = {}), + (this.expressions = {}), + (this.isTexLoaded = !1); + } + function o() { + AMotion.prototype.constructor.call(this), (this.paramList = new Array()); + } + function n() { + (this.id = ""), (this.type = -1), (this.value = null); + } + function s() { + (this.nextBlinkTime = null), + (this.stateStartTime = null), + (this.blinkIntervalMsec = null), + (this.eyeState = g.STATE_FIRST), + (this.blinkIntervalMsec = 4e3), + (this.closingMotionMsec = 100), + (this.closedMotionMsec = 50), + (this.openingMotionMsec = 150), + (this.closeIfZero = !0), + (this.eyeID_L = "PARAM_EYE_L_OPEN"), + (this.eyeID_R = "PARAM_EYE_R_OPEN"); + } + function _() { + (this.tr = new Float32Array(16)), this.identity(); + } + function a(t, i) { + _.prototype.constructor.call(this), (this.width = t), (this.height = i); + } + function h() { + MotionQueueManager.prototype.constructor.call(this), + (this.currentPriority = null), + (this.reservePriority = null), + (this.super = MotionQueueManager.prototype); + } + function l() { + (this.physicsList = new Array()), + (this.startTimeMSec = UtSystem.getUserTimeMSec()); + } + function $() { + (this.lastTime = 0), + (this.lastModel = null), + (this.partsGroups = new Array()); + } + function u(t) { + (this.paramIndex = -1), + (this.partsIndex = -1), + (this.link = null), + (this.id = t); + } + function p() { + (this.EPSILON = 0.01), + (this.faceTargetX = 0), + (this.faceTargetY = 0), + (this.faceX = 0), + (this.faceY = 0), + (this.faceVX = 0), + (this.faceVY = 0), + (this.lastTimeSec = 0); + } + function f() { + _.prototype.constructor.call(this), + (this.screenLeft = null), + (this.screenRight = null), + (this.screenTop = null), + (this.screenBottom = null), + (this.maxLeft = null), + (this.maxRight = null), + (this.maxTop = null), + (this.maxBottom = null), + (this.max = Number.MAX_VALUE), + (this.min = 0); + } + function c() {} + var d = 0; + (r.prototype.getModelMatrix = function () { + return this.modelMatrix; + }), + (r.prototype.setAlpha = function (t) { + t > 0.999 && (t = 1), t < 0.001 && (t = 0), (this.alpha = t); + }), + (r.prototype.getAlpha = function () { + return this.alpha; + }), + (r.prototype.isInitialized = function () { + return this.initialized; + }), + (r.prototype.setInitialized = function (t) { + this.initialized = t; + }), + (r.prototype.isUpdating = function () { + return this.updating; + }), + (r.prototype.setUpdating = function (t) { + this.updating = t; + }), + (r.prototype.getLive2DModel = function () { + return this.live2DModel; + }), + (r.prototype.setLipSync = function (t) { + this.lipSync = t; + }), + (r.prototype.setLipSyncValue = function (t) { + this.lipSyncValue = t; + }), + (r.prototype.setAccel = function (t, i, e) { + (this.accelX = t), (this.accelY = i), (this.accelZ = e); + }), + (r.prototype.setDrag = function (t, i) { + (this.dragX = t), (this.dragY = i); + }), + (r.prototype.getMainMotionManager = function () { + return this.mainMotionManager; + }), + (r.prototype.getExpressionManager = function () { + return this.expressionManager; + }), + (r.prototype.loadModelData = function (t, i) { + var e = c.getPlatformManager(); + this.debugMode && e.log("Load model : " + t); + var r = this; + e.loadLive2DModel(t, function (t) { + if ( + ((r.live2DModel = t), + r.live2DModel.saveParam(), + 0 != Live2D.getError()) + ) + return void console.error("Error : Failed to loadModelData()."); + (r.modelMatrix = new a( + r.live2DModel.getCanvasWidth(), + r.live2DModel.getCanvasHeight() + )), + r.modelMatrix.setWidth(2), + r.modelMatrix.setCenterPosition(0, 0), + i(r.live2DModel); + }); + }), + (r.prototype.loadTexture = function (t, i, e) { + d++; + var r = c.getPlatformManager(); + this.debugMode && r.log("Load Texture : " + i); + var o = this; + r.loadTexture(this.live2DModel, t, i, function () { + d--, 0 == d && (o.isTexLoaded = !0), "function" == typeof e && e(); + }); + }), + (r.prototype.loadMotion = function (t, i, e) { + var r = c.getPlatformManager(); + this.debugMode && r.log("Load Motion : " + i); + var o = null, + n = this; + r.loadBytes(i, function (i) { + (o = Live2DMotion.loadMotion(i)), + null != t && (n.motions[t] = o), + e(o); + }); + }), + (r.prototype.loadExpression = function (t, i, e) { + var r = c.getPlatformManager(); + this.debugMode && r.log("Load Expression : " + i); + var n = this; + r.loadBytes(i, function (i) { + null != t && (n.expressions[t] = o.loadJson(i)), + "function" == typeof e && e(); + }); + }), + (r.prototype.loadPose = function (t, i) { + var e = c.getPlatformManager(); + this.debugMode && e.log("Load Pose : " + t); + var r = this; + try { + e.loadBytes(t, function (t) { + (r.pose = $.load(t)), "function" == typeof i && i(); + }); + } catch (t) { + console.warn(t); + } + }), + (r.prototype.loadPhysics = function (t) { + var i = c.getPlatformManager(); + this.debugMode && i.log("Load Physics : " + t); + var e = this; + try { + i.loadBytes(t, function (t) { + e.physics = l.load(t); + }); + } catch (t) { + console.warn(t); + } + }), + (r.prototype.hitTestSimple = function (t, i, e) { + if (null === this.live2DModel) return !1; + var r = this.live2DModel.getDrawDataIndex(t); + if (r < 0) return !1; + for ( + var o = this.live2DModel.getTransformedPoints(r), + n = this.live2DModel.getCanvasWidth(), + s = 0, + _ = this.live2DModel.getCanvasHeight(), + a = 0, + h = 0; + h < o.length; + h += 2 + ) { + var l = o[h], + $ = o[h + 1]; + l < n && (n = l), + l > s && (s = l), + $ < _ && (_ = $), + $ > a && (a = $); + } + var u = this.modelMatrix.invertTransformX(i), + p = this.modelMatrix.invertTransformY(e); + return n <= u && u <= s && _ <= p && p <= a; + }), + (r.prototype.hitTestSimpleCustom = function (t, i, e, r) { + return ( + null !== this.live2DModel && + e >= t[0] && + e <= i[0] && + r <= t[1] && + r >= i[1] + ); + }), + (o.prototype = new AMotion()), + (o.EXPRESSION_DEFAULT = "DEFAULT"), + (o.TYPE_SET = 0), + (o.TYPE_ADD = 1), + (o.TYPE_MULT = 2), + (o.loadJson = function (t) { + var i = new o(), + e = c.getPlatformManager(), + r = e.jsonParseFromBytes(t); + if ( + (i.setFadeIn(parseInt(r.fade_in) > 0 ? parseInt(r.fade_in) : 1e3), + i.setFadeOut(parseInt(r.fade_out) > 0 ? parseInt(r.fade_out) : 1e3), + null == r.params) + ) + return i; + var s = r.params, + _ = s.length; + i.paramList = []; + for (var a = 0; a < _; a++) { + var h = s[a], + l = h.id.toString(), + $ = parseFloat(h.val), + u = o.TYPE_ADD, + p = null != h.calc ? h.calc.toString() : "add"; + if ( + (u = + "add" === p + ? o.TYPE_ADD + : "mult" === p + ? o.TYPE_MULT + : "set" === p + ? o.TYPE_SET + : o.TYPE_ADD) == o.TYPE_ADD + ) { + var f = null == h.def ? 0 : parseFloat(h.def); + $ -= f; + } else if (u == o.TYPE_MULT) { + var f = null == h.def ? 1 : parseFloat(h.def); + 0 == f && (f = 1), ($ /= f); + } + var d = new n(); + (d.id = l), (d.type = u), (d.value = $), i.paramList.push(d); + } + return i; + }), + (o.prototype.updateParamExe = function (t, i, e, r) { + for (var n = this.paramList.length - 1; n >= 0; --n) { + var s = this.paramList[n]; + s.type == o.TYPE_ADD + ? t.addToParamFloat(s.id, s.value, e) + : s.type == o.TYPE_MULT + ? t.multParamFloat(s.id, s.value, e) + : s.type == o.TYPE_SET && t.setParamFloat(s.id, s.value, e); + } + }), + (s.prototype.calcNextBlink = function () { + return ( + UtSystem.getUserTimeMSec() + + Math.random() * (2 * this.blinkIntervalMsec - 1) + ); + }), + (s.prototype.setInterval = function (t) { + this.blinkIntervalMsec = t; + }), + (s.prototype.setEyeMotion = function (t, i, e) { + (this.closingMotionMsec = t), + (this.closedMotionMsec = i), + (this.openingMotionMsec = e); + }), + (s.prototype.updateParam = function (t) { + var i, + e = UtSystem.getUserTimeMSec(), + r = 0; + switch (this.eyeState) { + case g.STATE_CLOSING: + (r = (e - this.stateStartTime) / this.closingMotionMsec), + r >= 1 && + ((r = 1), + (this.eyeState = g.STATE_CLOSED), + (this.stateStartTime = e)), + (i = 1 - r); + break; + case g.STATE_CLOSED: + (r = (e - this.stateStartTime) / this.closedMotionMsec), + r >= 1 && + ((this.eyeState = g.STATE_OPENING), (this.stateStartTime = e)), + (i = 0); + break; + case g.STATE_OPENING: + (r = (e - this.stateStartTime) / this.openingMotionMsec), + r >= 1 && + ((r = 1), + (this.eyeState = g.STATE_INTERVAL), + (this.nextBlinkTime = this.calcNextBlink())), + (i = r); + break; + case g.STATE_INTERVAL: + this.nextBlinkTime < e && + ((this.eyeState = g.STATE_CLOSING), (this.stateStartTime = e)), + (i = 1); + break; + case g.STATE_FIRST: + default: + (this.eyeState = g.STATE_INTERVAL), + (this.nextBlinkTime = this.calcNextBlink()), + (i = 1); + } + this.closeIfZero || (i = -i), + t.setParamFloat(this.eyeID_L, i), + t.setParamFloat(this.eyeID_R, i); + }); + var g = function () {}; + (g.STATE_FIRST = "STATE_FIRST"), + (g.STATE_INTERVAL = "STATE_INTERVAL"), + (g.STATE_CLOSING = "STATE_CLOSING"), + (g.STATE_CLOSED = "STATE_CLOSED"), + (g.STATE_OPENING = "STATE_OPENING"), + (_.mul = function (t, i, e) { + var r, + o, + n, + s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + for (r = 0; r < 4; r++) + for (o = 0; o < 4; o++) + for (n = 0; n < 4; n++) s[r + 4 * o] += t[r + 4 * n] * i[n + 4 * o]; + for (r = 0; r < 16; r++) e[r] = s[r]; + }), + (_.prototype.identity = function () { + for (var t = 0; t < 16; t++) this.tr[t] = t % 5 == 0 ? 1 : 0; + }), + (_.prototype.getArray = function () { + return this.tr; + }), + (_.prototype.getCopyMatrix = function () { + return new Float32Array(this.tr); + }), + (_.prototype.setMatrix = function (t) { + if (null != this.tr && this.tr.length == this.tr.length) + for (var i = 0; i < 16; i++) this.tr[i] = t[i]; + }), + (_.prototype.getScaleX = function () { + return this.tr[0]; + }), + (_.prototype.getScaleY = function () { + return this.tr[5]; + }), + (_.prototype.transformX = function (t) { + return (this.tr[0] * t * 8) / 3 + this.tr[12]; + }), + (_.prototype.transformY = function (t) { + return (this.tr[5] * t * 8) / 3 + this.tr[13]; + }), + (_.prototype.invertTransformX = function (t) { + return (t - this.tr[12]) / this.tr[0]; + }), + (_.prototype.invertTransformY = function (t) { + return (t - this.tr[13]) / this.tr[5]; + }), + (_.prototype.multTranslate = function (t, i) { + var e = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1]; + _.mul(e, this.tr, this.tr); + }), + (_.prototype.translate = function (t, i) { + (this.tr[12] = t), (this.tr[13] = i); + }), + (_.prototype.translateX = function (t) { + this.tr[12] = t; + }), + (_.prototype.translateY = function (t) { + this.tr[13] = t; + }), + (_.prototype.multScale = function (t, i) { + var e = [t, 0, 0, 0, 0, i, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; + _.mul(e, this.tr, this.tr); + }), + (_.prototype.scale = function (t, i) { + (this.tr[0] = t), (this.tr[5] = i); + }), + (a.prototype = new _()), + (a.prototype.setPosition = function (t, i) { + this.translate(t, i); + }), + (a.prototype.setCenterPosition = function (t, i) { + var e = this.width * this.getScaleX(), + r = this.height * this.getScaleY(); + this.translate(t - e / 2, i - r / 2); + }), + (a.prototype.top = function (t) { + this.setY(t); + }), + (a.prototype.bottom = function (t) { + var i = this.height * this.getScaleY(); + this.translateY(t - i); + }), + (a.prototype.left = function (t) { + this.setX(t); + }), + (a.prototype.right = function (t) { + var i = this.width * this.getScaleX(); + this.translateX(t - i); + }), + (a.prototype.centerX = function (t) { + var i = this.width * this.getScaleX(); + this.translateX(t - i / 2); + }), + (a.prototype.centerY = function (t) { + var i = this.height * this.getScaleY(); + this.translateY(t - i / 2); + }), + (a.prototype.setX = function (t) { + this.translateX(t); + }), + (a.prototype.setY = function (t) { + this.translateY(t); + }), + (a.prototype.setHeight = function (t) { + var i = t / this.height, + e = -i; + this.scale(i, e); + }), + (a.prototype.setWidth = function (t) { + var i = t / this.width, + e = -i; + this.scale(i, e); + }), + (h.prototype = new MotionQueueManager()), + (h.prototype.getCurrentPriority = function () { + return this.currentPriority; + }), + (h.prototype.getReservePriority = function () { + return this.reservePriority; + }), + (h.prototype.reserveMotion = function (t) { + return ( + !(this.reservePriority >= t) && + !(this.currentPriority >= t) && + ((this.reservePriority = t), !0) + ); + }), + (h.prototype.setReservePriority = function (t) { + this.reservePriority = t; + }), + (h.prototype.updateParam = function (t) { + var i = MotionQueueManager.prototype.updateParam.call(this, t); + return this.isFinished() && (this.currentPriority = 0), i; + }), + (h.prototype.startMotionPrio = function (t, i) { + return ( + i == this.reservePriority && (this.reservePriority = 0), + (this.currentPriority = i), + this.startMotion(t, !1) + ); + }), + (l.load = function (t) { + for ( + var i = new l(), + e = c.getPlatformManager(), + r = e.jsonParseFromBytes(t), + o = r.physics_hair, + n = o.length, + s = 0; + s < n; + s++ + ) { + var _ = o[s], + a = new PhysicsHair(), + h = _.setup, + $ = parseFloat(h.length), + u = parseFloat(h.regist), + p = parseFloat(h.mass); + a.setup($, u, p); + for (var f = _.src, d = f.length, g = 0; g < d; g++) { + var y = f[g], + m = y.id, + T = PhysicsHair.Src.SRC_TO_X, + P = y.ptype; + "x" === P + ? (T = PhysicsHair.Src.SRC_TO_X) + : "y" === P + ? (T = PhysicsHair.Src.SRC_TO_Y) + : "angle" === P + ? (T = PhysicsHair.Src.SRC_TO_G_ANGLE) + : UtDebug.error("live2d", "Invalid parameter:PhysicsHair.Src"); + var S = parseFloat(y.scale), + v = parseFloat(y.weight); + a.addSrcParam(T, m, S, v); + } + for (var L = _.targets, M = L.length, g = 0; g < M; g++) { + var E = L[g], + m = E.id, + T = PhysicsHair.Target.TARGET_FROM_ANGLE, + P = E.ptype; + "angle" === P + ? (T = PhysicsHair.Target.TARGET_FROM_ANGLE) + : "angle_v" === P + ? (T = PhysicsHair.Target.TARGET_FROM_ANGLE_V) + : UtDebug.error("live2d", "Invalid parameter:PhysicsHair.Target"); + var S = parseFloat(E.scale), + v = parseFloat(E.weight); + a.addTargetParam(T, m, S, v); + } + i.physicsList.push(a); + } + return i; + }), + (l.prototype.updateParam = function (t) { + for ( + var i = UtSystem.getUserTimeMSec() - this.startTimeMSec, e = 0; + e < this.physicsList.length; + e++ + ) + this.physicsList[e].update(t, i); + }), + ($.load = function (t) { + for ( + var i = new $(), + e = c.getPlatformManager(), + r = e.jsonParseFromBytes(t), + o = r.parts_visible, + n = o.length, + s = 0; + s < n; + s++ + ) { + for ( + var _ = o[s], a = _.group, h = a.length, l = new Array(), p = 0; + p < h; + p++ + ) { + var f = a[p], + d = new u(f.id); + if (((l[p] = d), null != f.link)) { + var g = f.link, + y = g.length; + d.link = new Array(); + for (var m = 0; m < y; m++) { + var T = new u(g[m]); + d.link.push(T); + } + } + } + i.partsGroups.push(l); + } + return i; + }), + ($.prototype.updateParam = function (t) { + if (null != t) { + t != this.lastModel && this.initParam(t), (this.lastModel = t); + var i = UtSystem.getUserTimeMSec(), + e = 0 == this.lastTime ? 0 : (i - this.lastTime) / 1e3; + (this.lastTime = i), e < 0 && (e = 0); + for (var r = 0; r < this.partsGroups.length; r++) + this.normalizePartsOpacityGroup(t, this.partsGroups[r], e), + this.copyOpacityOtherParts(t, this.partsGroups[r]); + } + }), + ($.prototype.initParam = function (t) { + if (null != t) + for (var i = 0; i < this.partsGroups.length; i++) + for (var e = this.partsGroups[i], r = 0; r < e.length; r++) { + e[r].initIndex(t); + var o = e[r].partsIndex, + n = e[r].paramIndex; + if (!(o < 0)) { + var s = 0 != t.getParamFloat(n); + if ( + (t.setPartsOpacity(o, s ? 1 : 0), + t.setParamFloat(n, s ? 1 : 0), + null != e[r].link) + ) + for (var _ = 0; _ < e[r].link.length; _++) + e[r].link[_].initIndex(t); + } + } + }), + ($.prototype.normalizePartsOpacityGroup = function (t, i, e) { + for (var r = -1, o = 1, n = 0; n < i.length; n++) { + var s = i[n].partsIndex, + _ = i[n].paramIndex; + if (!(s < 0) && 0 != t.getParamFloat(_)) { + if (r >= 0) break; + (r = n), + (o = t.getPartsOpacity(s)), + (o += e / 0.5), + o > 1 && (o = 1); + } + } + r < 0 && ((r = 0), (o = 1)); + for (var n = 0; n < i.length; n++) { + var s = i[n].partsIndex; + if (!(s < 0)) + if (r == n) t.setPartsOpacity(s, o); + else { + var a, + h = t.getPartsOpacity(s); + a = o < 0.5 ? (-0.5 * o) / 0.5 + 1 : (0.5 * (1 - o)) / 0.5; + var l = (1 - a) * (1 - o); + l > 0.15 && (a = 1 - 0.15 / (1 - o)), + h > a && (h = a), + t.setPartsOpacity(s, h); + } + } + }), + ($.prototype.copyOpacityOtherParts = function (t, i) { + for (var e = 0; e < i.length; e++) { + var r = i[e]; + if (null != r.link && !(r.partsIndex < 0)) + for ( + var o = t.getPartsOpacity(r.partsIndex), n = 0; + n < r.link.length; + n++ + ) { + var s = r.link[n]; + s.partsIndex < 0 || t.setPartsOpacity(s.partsIndex, o); + } + } + }), + (u.prototype.initIndex = function (t) { + (this.paramIndex = t.getParamIndex("VISIBLE:" + this.id)), + (this.partsIndex = t.getPartsDataIndex(PartsDataID.getID(this.id))), + t.setParamFloat(this.paramIndex, 1); + }), + (p.FRAME_RATE = 30), + (p.prototype.setPoint = function (t, i) { + (this.faceTargetX = t), (this.faceTargetY = i); + }), + (p.prototype.getX = function () { + return this.faceX; + }), + (p.prototype.getY = function () { + return this.faceY; + }), + (p.prototype.update = function () { + var t = 40 / 7.5 / p.FRAME_RATE; + if (0 == this.lastTimeSec) + return void (this.lastTimeSec = UtSystem.getUserTimeMSec()); + var i = UtSystem.getUserTimeMSec(), + e = ((i - this.lastTimeSec) * p.FRAME_RATE) / 1e3; + this.lastTimeSec = i; + var r = 0.15 * p.FRAME_RATE, + o = (e * t) / r, + n = this.faceTargetX - this.faceX, + s = this.faceTargetY - this.faceY; + if (!(Math.abs(n) <= this.EPSILON && Math.abs(s) <= this.EPSILON)) { + var _ = Math.sqrt(n * n + s * s), + a = (t * n) / _, + h = (t * s) / _, + l = a - this.faceVX, + $ = h - this.faceVY, + u = Math.sqrt(l * l + $ * $); + (u < -o || u > o) && ((l *= o / u), ($ *= o / u), (u = o)), + (this.faceVX += l), + (this.faceVY += $); + var f = 0.5 * (Math.sqrt(o * o + 16 * o * _ - 8 * o * _) - o), + c = Math.sqrt( + this.faceVX * this.faceVX + this.faceVY * this.faceVY + ); + c > f && ((this.faceVX *= f / c), (this.faceVY *= f / c)), + (this.faceX += this.faceVX), + (this.faceY += this.faceVY); + } + }), + (f.prototype = new _()), + (f.prototype.getMaxScale = function () { + return this.max; + }), + (f.prototype.getMinScale = function () { + return this.min; + }), + (f.prototype.setMaxScale = function (t) { + this.max = t; + }), + (f.prototype.setMinScale = function (t) { + this.min = t; + }), + (f.prototype.isMaxScale = function () { + return this.getScaleX() == this.max; + }), + (f.prototype.isMinScale = function () { + return this.getScaleX() == this.min; + }), + (f.prototype.adjustTranslate = function (t, i) { + this.tr[0] * this.maxLeft + (this.tr[12] + t) > this.screenLeft && + (t = this.screenLeft - this.tr[0] * this.maxLeft - this.tr[12]), + this.tr[0] * this.maxRight + (this.tr[12] + t) < this.screenRight && + (t = this.screenRight - this.tr[0] * this.maxRight - this.tr[12]), + this.tr[5] * this.maxTop + (this.tr[13] + i) < this.screenTop && + (i = this.screenTop - this.tr[5] * this.maxTop - this.tr[13]), + this.tr[5] * this.maxBottom + (this.tr[13] + i) > this.screenBottom && + (i = this.screenBottom - this.tr[5] * this.maxBottom - this.tr[13]); + var e = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1]; + _.mul(e, this.tr, this.tr); + }), + (f.prototype.adjustScale = function (t, i, e) { + var r = e * this.tr[0]; + r < this.min + ? this.tr[0] > 0 && (e = this.min / this.tr[0]) + : r > this.max && this.tr[0] > 0 && (e = this.max / this.tr[0]); + var o = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1], + n = [e, 0, 0, 0, 0, e, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], + s = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -t, -i, 0, 1]; + _.mul(s, this.tr, this.tr), + _.mul(n, this.tr, this.tr), + _.mul(o, this.tr, this.tr); + }), + (f.prototype.setScreenRect = function (t, i, e, r) { + (this.screenLeft = t), + (this.screenRight = i), + (this.screenTop = r), + (this.screenBottom = e); + }), + (f.prototype.setMaxScreenRect = function (t, i, e, r) { + (this.maxLeft = t), + (this.maxRight = i), + (this.maxTop = r), + (this.maxBottom = e); + }), + (f.prototype.getScreenLeft = function () { + return this.screenLeft; + }), + (f.prototype.getScreenRight = function () { + return this.screenRight; + }), + (f.prototype.getScreenBottom = function () { + return this.screenBottom; + }), + (f.prototype.getScreenTop = function () { + return this.screenTop; + }), + (f.prototype.getMaxLeft = function () { + return this.maxLeft; + }), + (f.prototype.getMaxRight = function () { + return this.maxRight; + }), + (f.prototype.getMaxBottom = function () { + return this.maxBottom; + }), + (f.prototype.getMaxTop = function () { + return this.maxTop; + }), + (c.platformManager = null), + (c.getPlatformManager = function () { + return c.platformManager; + }), + (c.setPlatformManager = function (t) { + c.platformManager = t; + }), + (t.exports = { + L2DTargetPoint: p, + Live2DFramework: c, + L2DViewMatrix: f, + L2DPose: $, + L2DPartsParam: u, + L2DPhysics: l, + L2DMotionManager: h, + L2DModelMatrix: a, + L2DMatrix44: _, + EYE_STATE: g, + L2DEyeBlink: s, + L2DExpressionParam: n, + L2DExpressionMotion: o, + L2DBaseModel: r, + }); + }, + function (t, i, e) { + "use strict"; + var r = { + DEBUG_LOG: !1, + DEBUG_MOUSE_LOG: !1, + DEBUG_DRAW_HIT_AREA: !1, + DEBUG_DRAW_ALPHA_MODEL: !1, + VIEW_MAX_SCALE: 2, + VIEW_MIN_SCALE: 0.8, + VIEW_LOGICAL_LEFT: -1, + VIEW_LOGICAL_RIGHT: 1, + VIEW_LOGICAL_MAX_LEFT: -2, + VIEW_LOGICAL_MAX_RIGHT: 2, + VIEW_LOGICAL_MAX_BOTTOM: -2, + VIEW_LOGICAL_MAX_TOP: 2, + PRIORITY_NONE: 0, + PRIORITY_IDLE: 1, + PRIORITY_SLEEPY: 2, + PRIORITY_NORMAL: 3, + PRIORITY_FORCE: 4, + MOTION_GROUP_IDLE: "idle", + MOTION_GROUP_SLEEPY: "sleepy", + MOTION_GROUP_TAP_BODY: "tap_body", + MOTION_GROUP_FLICK_HEAD: "flick_head", + MOTION_GROUP_PINCH_IN: "pinch_in", + MOTION_GROUP_PINCH_OUT: "pinch_out", + MOTION_GROUP_SHAKE: "shake", + HIT_AREA_HEAD: "head", + HIT_AREA_BODY: "body", + }; + t.exports = r; + }, + function (t, i, e) { + "use strict"; + function r(t) { + n = t; + } + function o() { + return n; + } + Object.defineProperty(i, "__esModule", { value: !0 }), + (i.setContext = r), + (i.getContext = o); + var n = void 0; + }, + function (t, i, e) { + "use strict"; + function r() {} + (r.matrixStack = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), + (r.depth = 0), + (r.currentMatrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), + (r.tmp = new Array(16)), + (r.reset = function () { + this.depth = 0; + }), + (r.loadIdentity = function () { + for (var t = 0; t < 16; t++) this.currentMatrix[t] = t % 5 == 0 ? 1 : 0; + }), + (r.push = function () { + var t = (this.depth, 16 * (this.depth + 1)); + this.matrixStack.length < t + 16 && (this.matrixStack.length = t + 16); + for (var i = 0; i < 16; i++) + this.matrixStack[t + i] = this.currentMatrix[i]; + this.depth++; + }), + (r.pop = function () { + --this.depth < 0 && + (myError("Invalid matrix stack."), (this.depth = 0)); + for (var t = 16 * this.depth, i = 0; i < 16; i++) + this.currentMatrix[i] = this.matrixStack[t + i]; + }), + (r.getMatrix = function () { + return this.currentMatrix; + }), + (r.multMatrix = function (t) { + var i, e, r; + for (i = 0; i < 16; i++) this.tmp[i] = 0; + for (i = 0; i < 4; i++) + for (e = 0; e < 4; e++) + for (r = 0; r < 4; r++) + this.tmp[i + 4 * e] += + this.currentMatrix[i + 4 * r] * t[r + 4 * e]; + for (i = 0; i < 16; i++) this.currentMatrix[i] = this.tmp[i]; + }), + (t.exports = r); + }, + function (t, i, e) { + t.exports = e(5); + }, + function (t, i, e) { + "use strict"; + function r(t) { + return t && t.__esModule ? t : { default: t }; + } + function o(t) { + (C = t), + C.addEventListener && + (window.addEventListener("click", g), + window.addEventListener("mousedown", g), + window.addEventListener("mousemove", g), + window.addEventListener("mouseup", g), + document.addEventListener("mouseout", g), + window.addEventListener("touchstart", y), + window.addEventListener("touchend", y), + window.addEventListener("touchmove", y)); + } + function n(t) { + var i = C.width, + e = C.height; + N = new M.L2DTargetPoint(); + var r = e / i, + o = w.default.VIEW_LOGICAL_LEFT, + n = w.default.VIEW_LOGICAL_RIGHT, + _ = -r, + h = r; + if ( + ((window.Live2D.captureFrame = !1), + (B = new M.L2DViewMatrix()), + B.setScreenRect(o, n, _, h), + B.setMaxScreenRect( + w.default.VIEW_LOGICAL_MAX_LEFT, + w.default.VIEW_LOGICAL_MAX_RIGHT, + w.default.VIEW_LOGICAL_MAX_BOTTOM, + w.default.VIEW_LOGICAL_MAX_TOP + ), + B.setMaxScale(w.default.VIEW_MAX_SCALE), + B.setMinScale(w.default.VIEW_MIN_SCALE), + (U = new M.L2DMatrix44()), + U.multScale(1, i / e), + (G = new M.L2DMatrix44()), + G.multTranslate(-i / 2, -e / 2), + G.multScale(2 / i, -2 / i), + (F = v()), + (0, D.setContext)(F), + !F) + ) + return ( + console.error("Failed to create WebGL context."), + void ( + window.WebGLRenderingContext && + console.error( + "Your browser don't support WebGL, check https://get.webgl.org/ for futher information." + ) + ) + ); + window.Live2D.setGL(F), F.clearColor(0, 0, 0, 0), a(t), s(); + } + function s() { + b || + ((b = !0), + (function t() { + _(); + var i = + window.requestAnimationFrame || + window.mozRequestAnimationFrame || + window.webkitRequestAnimationFrame || + window.msRequestAnimationFrame; + if (window.Live2D.captureFrame) { + window.Live2D.captureFrame = !1; + var e = document.createElement("a"); + document.body.appendChild(e), + e.setAttribute("type", "hidden"), + (e.href = C.toDataURL()), + (e.download = window.Live2D.captureName || "live2d.png"), + e.click(); + } + i(t, C); + })()); + } + function _() { + O.default.reset(), + O.default.loadIdentity(), + N.update(), + R.setDrag(N.getX(), N.getY()), + F.clear(F.COLOR_BUFFER_BIT), + O.default.multMatrix(U.getArray()), + O.default.multMatrix(B.getArray()), + O.default.push(); + for (var t = 0; t < R.numModels(); t++) { + var i = R.getModel(t); + if (null == i) return; + i.initialized && !i.updating && (i.update(), i.draw(F)); + } + O.default.pop(); + } + function a(t) { + (R.reloadFlg = !0), R.count++, R.changeModel(F, t); + } + function h(t, i) { + return t.x * i.x + t.y * i.y; + } + function l(t, i) { + var e = Math.sqrt(t * t + i * i); + return { x: t / e, y: i / e }; + } + function $(t, i, e) { + function r(t, i) { + return (180 * Math.acos(h({ x: 0, y: 1 }, l(t, i)))) / Math.PI; + } + if ( + i.x < e.left + e.width && + i.y < e.top + e.height && + i.x > e.left && + i.y > e.top + ) + return i; + var o = t.x - i.x, + n = t.y - i.y, + s = r(o, n); + i.x < t.x && (s = 360 - s); + var _ = 360 - r(e.left - t.x, -1 * (e.top - t.y)), + a = 360 - r(e.left - t.x, -1 * (e.top + e.height - t.y)), + $ = r(e.left + e.width - t.x, -1 * (e.top - t.y)), + u = r(e.left + e.width - t.x, -1 * (e.top + e.height - t.y)), + p = n / o, + f = {}; + if (s < $) { + var c = e.top - t.y, + d = c / p; + f = { y: t.y + c, x: t.x + d }; + } else if (s < u) { + var g = e.left + e.width - t.x, + y = g * p; + f = { y: t.y + y, x: t.x + g }; + } else if (s < a) { + var m = e.top + e.height - t.y, + T = m / p; + f = { y: t.y + m, x: t.x + T }; + } else if (s < _) { + var P = t.x - e.left, + S = P * p; + f = { y: t.y - S, x: t.x - P }; + } else { + var v = e.top - t.y, + L = v / p; + f = { y: t.y + v, x: t.x + L }; + } + return f; + } + function u(t) { + Y = !0; + var i = C.getBoundingClientRect(), + e = P(t.clientX - i.left), + r = S(t.clientY - i.top), + o = $( + { x: i.left + i.width / 2, y: i.top + i.height * X }, + { x: t.clientX, y: t.clientY }, + i + ), + n = m(o.x - i.left), + s = T(o.y - i.top); + w.default.DEBUG_MOUSE_LOG && + console.log( + "onMouseMove device( x:" + + t.clientX + + " y:" + + t.clientY + + " ) view( x:" + + n + + " y:" + + s + + ")" + ), + (k = e), + (V = r), + N.setPoint(n, s); + } + function p(t) { + Y = !0; + var i = C.getBoundingClientRect(), + e = P(t.clientX - i.left), + r = S(t.clientY - i.top), + o = $( + { x: i.left + i.width / 2, y: i.top + i.height * X }, + { x: t.clientX, y: t.clientY }, + i + ), + n = m(o.x - i.left), + s = T(o.y - i.top); + w.default.DEBUG_MOUSE_LOG && + console.log( + "onMouseDown device( x:" + + t.clientX + + " y:" + + t.clientY + + " ) view( x:" + + n + + " y:" + + s + + ")" + ), + (k = e), + (V = r), + R.tapEvent(n, s); + } + function f(t) { + var i = C.getBoundingClientRect(), + e = P(t.clientX - i.left), + r = S(t.clientY - i.top), + o = $( + { x: i.left + i.width / 2, y: i.top + i.height * X }, + { x: t.clientX, y: t.clientY }, + i + ), + n = m(o.x - i.left), + s = T(o.y - i.top); + w.default.DEBUG_MOUSE_LOG && + console.log( + "onMouseMove device( x:" + + t.clientX + + " y:" + + t.clientY + + " ) view( x:" + + n + + " y:" + + s + + ")" + ), + Y && ((k = e), (V = r), N.setPoint(n, s)); + } + function c() { + Y && (Y = !1), N.setPoint(0, 0); + } + function d() { + w.default.DEBUG_LOG && console.log("Set Session Storage."), + sessionStorage.setItem("Sleepy", "1"); + } + function g(t) { + if ("mousewheel" == t.type); + else if ("mousedown" == t.type) p(t); + else if ("mousemove" == t.type) { + var i = sessionStorage.getItem("Sleepy"); + "1" === i && sessionStorage.setItem("Sleepy", "0"), u(t); + } else if ("mouseup" == t.type) { + if ("button" in t && 0 != t.button) return; + } else if ("mouseout" == t.type) { + w.default.DEBUG_LOG && console.log("Mouse out Window."), c(); + var e = sessionStorage.getItem("SleepyTimer"); + window.clearTimeout(e), + (e = window.setTimeout(d, 5e4)), + sessionStorage.setItem("SleepyTimer", e); + } + } + function y(t) { + var i = t.touches[0]; + "touchstart" == t.type + ? 1 == t.touches.length && u(i) + : "touchmove" == t.type + ? f(i) + : "touchend" == t.type && c(); + } + function m(t) { + var i = G.transformX(t); + return B.invertTransformX(i); + } + function T(t) { + var i = G.transformY(t); + return B.invertTransformY(i); + } + function P(t) { + return G.transformX(t); + } + function S(t) { + return G.transformY(t); + } + function v() { + for ( + var t = ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"], + i = 0; + i < t.length; + i++ + ) + try { + var e = C.getContext(t[i], { premultipliedAlpha: !0 }); + if (e) return e; + } catch (t) {} + return null; + } + function L(t, i, e) { + (X = void 0 === e ? 0.5 : e), o(t), n(i); + } + e(6); + var M = e(0), + E = e(8), + A = r(E), + I = e(1), + w = r(I), + x = e(3), + O = r(x), + D = e(2), + R = (window.navigator.platform.toLowerCase(), new A.default()), + b = !1, + F = null, + C = null, + N = null, + B = null, + U = null, + G = null, + Y = !1, + k = 0, + V = 0, + X = 0.5; + window.loadlive2d = L; + }, + function (t, i, e) { + "use strict"; + (function (t) { + !(function () { + function i() { + At || + ((this._$MT = null), + (this._$5S = null), + (this._$NP = 0), + i._$42++, + (this._$5S = new Y(this))); + } + function e(t) { + if (!At) { + (this.clipContextList = new Array()), + (this.glcontext = t.gl), + (this.dp_webgl = t), + (this.curFrameNo = 0), + (this.firstError_clipInNotUpdate = !0), + (this.colorBuffer = 0), + (this.isInitGLFBFunc = !1), + (this.tmpBoundsOnModel = new S()), + at.glContext.length > at.frameBuffers.length && + (this.curFrameNo = this.getMaskRenderTexture()), + (this.tmpModelToViewMatrix = new R()), + (this.tmpMatrix2 = new R()), + (this.tmpMatrixForMask = new R()), + (this.tmpMatrixForDraw = new R()), + (this.CHANNEL_COLORS = new Array()); + var i = new A(); + (i = new A()), + (i.r = 0), + (i.g = 0), + (i.b = 0), + (i.a = 1), + this.CHANNEL_COLORS.push(i), + (i = new A()), + (i.r = 1), + (i.g = 0), + (i.b = 0), + (i.a = 0), + this.CHANNEL_COLORS.push(i), + (i = new A()), + (i.r = 0), + (i.g = 1), + (i.b = 0), + (i.a = 0), + this.CHANNEL_COLORS.push(i), + (i = new A()), + (i.r = 0), + (i.g = 0), + (i.b = 1), + (i.a = 0), + this.CHANNEL_COLORS.push(i); + for (var e = 0; e < this.CHANNEL_COLORS.length; e++) + this.dp_webgl.setChannelFlagAsColor(e, this.CHANNEL_COLORS[e]); + } + } + function r(t, i, e) { + (this.clipIDList = new Array()), + (this.clipIDList = e), + (this.clippingMaskDrawIndexList = new Array()); + for (var r = 0; r < e.length; r++) + this.clippingMaskDrawIndexList.push(i.getDrawDataIndex(e[r])); + (this.clippedDrawContextList = new Array()), + (this.isUsing = !0), + (this.layoutChannelNo = 0), + (this.layoutBounds = new S()), + (this.allClippedDrawRect = new S()), + (this.matrixForMask = new Float32Array(16)), + (this.matrixForDraw = new Float32Array(16)), + (this.owner = t); + } + function o(t, i) { + (this._$gP = t), (this.drawDataIndex = i); + } + function n() { + At || (this.color = null); + } + function s() { + At || + ((this._$dP = null), + (this._$eo = null), + (this._$V0 = null), + (this._$dP = 1e3), + (this._$eo = 1e3), + (this._$V0 = 1), + this._$a0()); + } + function _() {} + function a() { + (this._$r = null), (this._$0S = null); + } + function h() { + At || + ((this.x = null), + (this.y = null), + (this.width = null), + (this.height = null)); + } + function l(t) { + At || et.prototype.constructor.call(this, t); + } + function $() {} + function u(t) { + At || et.prototype.constructor.call(this, t); + } + function p() { + At || + ((this._$vo = null), + (this._$F2 = null), + (this._$ao = 400), + (this._$1S = 400), + p._$42++); + } + function f() { + At || + ((this.p1 = new c()), + (this.p2 = new c()), + (this._$Fo = 0), + (this._$Db = 0), + (this._$L2 = 0), + (this._$M2 = 0), + (this._$ks = 0), + (this._$9b = 0), + (this._$iP = 0), + (this._$iT = 0), + (this._$lL = new Array()), + (this._$qP = new Array()), + this.setup(0.3, 0.5, 0.1)); + } + function c() { + (this._$p = 1), + (this.x = 0), + (this.y = 0), + (this.vx = 0), + (this.vy = 0), + (this.ax = 0), + (this.ay = 0), + (this.fx = 0), + (this.fy = 0), + (this._$s0 = 0), + (this._$70 = 0), + (this._$7L = 0), + (this._$HL = 0); + } + function d(t, i, e) { + (this._$wL = null), + (this.scale = null), + (this._$V0 = null), + (this._$wL = t), + (this.scale = i), + (this._$V0 = e); + } + function g(t, i, e, r) { + d.prototype.constructor.call(this, i, e, r), + (this._$tL = null), + (this._$tL = t); + } + function y(t, i, e) { + (this._$wL = null), + (this.scale = null), + (this._$V0 = null), + (this._$wL = t), + (this.scale = i), + (this._$V0 = e); + } + function T(t, i, e, r) { + y.prototype.constructor.call(this, i, e, r), + (this._$YP = null), + (this._$YP = t); + } + function P() { + At || + ((this._$fL = 0), + (this._$gL = 0), + (this._$B0 = 1), + (this._$z0 = 1), + (this._$qT = 0), + (this.reflectX = !1), + (this.reflectY = !1)); + } + function S() { + At || + ((this.x = null), + (this.y = null), + (this.width = null), + (this.height = null)); + } + function v() {} + function L() { + At || ((this.x = null), (this.y = null)); + } + function M() { + At || + ((this._$gP = null), + (this._$dr = null), + (this._$GS = null), + (this._$qb = null), + (this._$Lb = null), + (this._$mS = null), + (this.clipID = null), + (this.clipIDList = new Array())); + } + function E() { + At || + ((this._$Eb = E._$ps), + (this._$lT = 1), + (this._$C0 = 1), + (this._$tT = 1), + (this._$WL = 1), + (this.culling = !1), + (this.matrix4x4 = new Float32Array(16)), + (this.premultipliedAlpha = !1), + (this.anisotropy = 0), + (this.clippingProcess = E.CLIPPING_PROCESS_NONE), + (this.clipBufPre_clipContextMask = null), + (this.clipBufPre_clipContextDraw = null), + (this.CHANNEL_COLORS = new Array())); + } + function A() { + At || + ((this.a = 1), + (this.r = 1), + (this.g = 1), + (this.b = 1), + (this.scale = 1), + (this._$ho = 1), + (this.blendMode = at.L2D_COLOR_BLEND_MODE_MULT)); + } + function I() { + At || + ((this._$kP = null), + (this._$dr = null), + (this._$Ai = !0), + (this._$mS = null)); + } + function w() {} + function x() { + At || + ((this._$VP = 0), + (this._$wL = null), + (this._$GP = null), + (this._$8o = x._$ds), + (this._$2r = -1), + (this._$O2 = 0), + (this._$ri = 0)); + } + function O() {} + function D() { + At || (this._$Ob = null); + } + function R() { + (this.m = new Float32Array(16)), this.identity(); + } + function b(t) { + At || et.prototype.constructor.call(this, t); + } + function F() { + At || + ((this._$7 = 1), + (this._$f = 0), + (this._$H = 0), + (this._$g = 1), + (this._$k = 0), + (this._$w = 0), + (this._$hi = STATE_IDENTITY), + (this._$Z = _$pS)); + } + function C() { + At || + (s.prototype.constructor.call(this), + (this.motions = new Array()), + (this._$7r = null), + (this._$7r = C._$Co++), + (this._$D0 = 30), + (this._$yT = 0), + (this._$E = !0), + (this.loopFadeIn = !0), + (this._$AS = -1), + _$a0()); + } + function N() { + (this._$P = new Float32Array(100)), (this.size = 0); + } + function B() { + (this._$4P = null), (this._$I0 = null), (this._$RP = null); + } + function U() {} + function G() {} + function Y(t) { + At || + ((this._$QT = !0), + (this._$co = -1), + (this._$qo = 0), + (this._$pb = new Array(Y._$is)), + (this._$_2 = new Float32Array(Y._$is)), + (this._$vr = new Float32Array(Y._$is)), + (this._$Rr = new Float32Array(Y._$is)), + (this._$Or = new Float32Array(Y._$is)), + (this._$fs = new Float32Array(Y._$is)), + (this._$Js = new Array(Y._$is)), + (this._$3S = new Array()), + (this._$aS = new Array()), + (this._$Bo = null), + (this._$F2 = new Array()), + (this._$db = new Array()), + (this._$8b = new Array()), + (this._$Hr = new Array()), + (this._$Ws = null), + (this._$Vs = null), + (this._$Er = null), + (this._$Es = new Int16Array(U._$Qb)), + (this._$ZP = new Float32Array(2 * U._$1r)), + (this._$Ri = t), + (this._$b0 = Y._$HP++), + (this.clipManager = null), + (this.dp_webgl = null)); + } + function k() {} + function V() { + At || + ((this._$12 = null), + (this._$bb = null), + (this._$_L = null), + (this._$jo = null), + (this._$iL = null), + (this._$0L = null), + (this._$Br = null), + (this._$Dr = null), + (this._$Cb = null), + (this._$mr = null), + (this._$_L = wt.STATE_FIRST), + (this._$Br = 4e3), + (this._$Dr = 100), + (this._$Cb = 50), + (this._$mr = 150), + (this._$jo = !0), + (this._$iL = "PARAM_EYE_L_OPEN"), + (this._$0L = "PARAM_EYE_R_OPEN")); + } + function X() { + At || + (E.prototype.constructor.call(this), + (this._$sb = new Int32Array(X._$As)), + (this._$U2 = new Array()), + (this.transform = null), + (this.gl = null), + null == X._$NT && + ((X._$NT = X._$9r(256)), + (X._$vS = X._$9r(256)), + (X._$no = X._$vb(256)))); + } + function z() { + At || + (I.prototype.constructor.call(this), + (this._$GS = null), + (this._$Y0 = null)); + } + function H(t) { + _t.prototype.constructor.call(this, t), + (this._$8r = I._$ur), + (this._$Yr = null), + (this._$Wr = null); + } + function W() { + At || + (M.prototype.constructor.call(this), + (this._$gP = null), + (this._$dr = null), + (this._$GS = null), + (this._$qb = null), + (this._$Lb = null), + (this._$mS = null)); + } + function j() { + At || + ((this._$NL = null), + (this._$3S = null), + (this._$aS = null), + j._$42++); + } + function q() { + At || (i.prototype.constructor.call(this), (this._$zo = new X())); + } + function J() { + At || + (s.prototype.constructor.call(this), + (this.motions = new Array()), + (this._$o2 = null), + (this._$7r = J._$Co++), + (this._$D0 = 30), + (this._$yT = 0), + (this._$E = !1), + (this.loopFadeIn = !0), + (this._$rr = -1), + (this._$eP = 0)); + } + function Q(t, i) { + return String.fromCharCode(t.getUint8(i)); + } + function N() { + (this._$P = new Float32Array(100)), (this.size = 0); + } + function B() { + (this._$4P = null), (this._$I0 = null), (this._$RP = null); + } + function Z() { + At || + (I.prototype.constructor.call(this), + (this._$o = 0), + (this._$A = 0), + (this._$GS = null), + (this._$Eo = null)); + } + function K(t) { + _t.prototype.constructor.call(this, t), + (this._$8r = I._$ur), + (this._$Cr = null), + (this._$hr = null); + } + function tt() { + At || + ((this.visible = !0), + (this._$g0 = !1), + (this._$NL = null), + (this._$3S = null), + (this._$aS = null), + tt._$42++); + } + function it(t) { + (this._$VS = null), (this._$e0 = null), (this._$e0 = t); + } + function et(t) { + At || (this.id = t); + } + function rt() {} + function ot() { + At || (this._$4S = null); + } + function nt(t, i) { + (this.canvas = t), + (this.context = i), + (this.viewport = new Array(0, 0, t.width, t.height)), + (this._$6r = 1), + (this._$xP = 0), + (this._$3r = 1), + (this._$uP = 0), + (this._$Qo = -1), + (this.cacheImages = {}); + } + function st() { + At || + ((this._$TT = null), + (this._$LT = null), + (this._$FS = null), + (this._$wL = null)); + } + function _t(t) { + At || + ((this._$e0 = null), + (this._$IP = null), + (this._$JS = !1), + (this._$AT = !0), + (this._$e0 = t), + (this.totalScale = 1), + (this._$7s = 1), + (this.totalOpacity = 1)); + } + function at() {} + function ht() {} + function lt(t) { + At || (this._$ib = t); + } + function $t() { + At || + (W.prototype.constructor.call(this), + (this._$LP = -1), + (this._$d0 = 0), + (this._$Yo = 0), + (this._$JP = null), + (this._$5P = null), + (this._$BP = null), + (this._$Eo = null), + (this._$Qi = null), + (this._$6s = $t._$ms), + (this.culling = !0), + (this.gl_cacheImage = null), + (this.instanceNo = $t._$42++)); + } + function ut(t) { + Mt.prototype.constructor.call(this, t), + (this._$8r = W._$ur), + (this._$Cr = null), + (this._$hr = null); + } + function pt() { + At || ((this.x = null), (this.y = null)); + } + function ft(t) { + At || + (i.prototype.constructor.call(this), + (this.drawParamWebGL = new mt(t)), + this.drawParamWebGL.setGL(at.getGL(t))); + } + function ct() { + At || + ((this.motions = null), + (this._$eb = !1), + (this.motions = new Array())); + } + function dt() { + (this._$w0 = null), + (this._$AT = !0), + (this._$9L = !1), + (this._$z2 = -1), + (this._$bs = -1), + (this._$Do = -1), + (this._$sr = null), + (this._$sr = dt._$Gs++); + } + function gt() { + this.m = new Array(1, 0, 0, 0, 1, 0, 0, 0, 1); + } + function yt(t) { + At || et.prototype.constructor.call(this, t); + } + function mt(t) { + At || + (E.prototype.constructor.call(this), + (this.textures = new Array()), + (this.transform = null), + (this.gl = null), + (this.glno = t), + (this.firstDraw = !0), + (this.anisotropyExt = null), + (this.maxAnisotropy = 0), + (this._$As = 32), + (this._$Gr = !1), + (this._$NT = null), + (this._$vS = null), + (this._$no = null), + (this.vertShader = null), + (this.fragShader = null), + (this.vertShaderOff = null), + (this.fragShaderOff = null)); + } + function Tt(t, i, e) { + return ( + null == i && (i = t.createBuffer()), + t.bindBuffer(t.ARRAY_BUFFER, i), + t.bufferData(t.ARRAY_BUFFER, e, t.DYNAMIC_DRAW), + i + ); + } + function Pt(t, i, e) { + return ( + null == i && (i = t.createBuffer()), + t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, i), + t.bufferData(t.ELEMENT_ARRAY_BUFFER, e, t.DYNAMIC_DRAW), + i + ); + } + function St(t) { + At || + ((this._$P = new Int8Array(8)), + (this._$R0 = new DataView(this._$P.buffer)), + (this._$3i = new Int8Array(1e3)), + (this._$hL = 0), + (this._$v0 = 0), + (this._$S2 = 0), + (this._$Ko = new Array()), + (this._$T = t), + (this._$F = 0)); + } + function vt() {} + function Lt() {} + function Mt(t) { + At || + ((this._$e0 = null), + (this._$IP = null), + (this._$Us = null), + (this._$7s = null), + (this._$IS = [!1]), + (this._$VS = null), + (this._$AT = !0), + (this.baseOpacity = 1), + (this.clipBufPre_clipContext = null), + (this._$e0 = t)); + } + function Et() {} + var At = !0; + (i._$0s = 1), + (i._$4s = 2), + (i._$42 = 0), + (i._$62 = function (t, e) { + try { + if ( + (e instanceof ArrayBuffer && (e = new DataView(e)), + !(e instanceof DataView)) + ) + throw new lt( + "_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer" + ); + var r, + o = new St(e), + n = o._$ST(), + s = o._$ST(), + a = o._$ST(); + if (109 != n || 111 != s || 99 != a) + throw new lt("_$gi _$C _$li , _$Q0 _$P0."); + if (((r = o._$ST()), o._$gr(r), r > G._$T7)) { + t._$NP |= i._$4s; + throw new lt( + "_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : " + + G._$T7 + + " < _$f0 : " + + r + + " )@_$SS#loadModel()\n" + ); + } + var h = o._$nP(); + if (r >= G._$s7) { + var l = o._$9T(), + $ = o._$9T(); + if (-30584 != l || -30584 != $) + throw ( + ((t._$NP |= i._$0s), + new lt("_$gi _$C _$li , _$0 _$6 _$Ui.")) + ); + } + t._$KS(h); + var u = t.getModelContext(); + u.setDrawParam(t.getDrawParam()), u.init(); + } catch (t) { + _._$Rb(t); + } + }), + (i.prototype._$KS = function (t) { + this._$MT = t; + }), + (i.prototype.getModelImpl = function () { + return ( + null == this._$MT && ((this._$MT = new p()), this._$MT._$zP()), + this._$MT + ); + }), + (i.prototype.getCanvasWidth = function () { + return null == this._$MT ? 0 : this._$MT.getCanvasWidth(); + }), + (i.prototype.getCanvasHeight = function () { + return null == this._$MT ? 0 : this._$MT.getCanvasHeight(); + }), + (i.prototype.getParamFloat = function (t) { + return ( + "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), + this._$5S.getParamFloat(t) + ); + }), + (i.prototype.setParamFloat = function (t, i, e) { + "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), + arguments.length < 3 && (e = 1), + this._$5S.setParamFloat( + t, + this._$5S.getParamFloat(t) * (1 - e) + i * e + ); + }), + (i.prototype.addToParamFloat = function (t, i, e) { + "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), + arguments.length < 3 && (e = 1), + this._$5S.setParamFloat(t, this._$5S.getParamFloat(t) + i * e); + }), + (i.prototype.multParamFloat = function (t, i, e) { + "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), + arguments.length < 3 && (e = 1), + this._$5S.setParamFloat( + t, + this._$5S.getParamFloat(t) * (1 + (i - 1) * e) + ); + }), + (i.prototype.getParamIndex = function (t) { + return this._$5S.getParamIndex(u.getID(t)); + }), + (i.prototype.loadParam = function () { + this._$5S.loadParam(); + }), + (i.prototype.saveParam = function () { + this._$5S.saveParam(); + }), + (i.prototype.init = function () { + this._$5S.init(); + }), + (i.prototype.update = function () { + this._$5S.update(); + }), + (i.prototype._$Rs = function () { + return _._$li("_$60 _$PT _$Rs()"), -1; + }), + (i.prototype._$Ds = function (t) { + _._$li("_$60 _$PT _$SS#_$Ds() \n"); + }), + (i.prototype._$K2 = function () {}), + (i.prototype.draw = function () {}), + (i.prototype.getModelContext = function () { + return this._$5S; + }), + (i.prototype._$s2 = function () { + return this._$NP; + }), + (i.prototype._$P7 = function (t, i, e, r) { + var o = -1, + n = 0, + s = this; + if (0 != e) + if (1 == t.length) { + var _ = t[0], + a = 0 != s.getParamFloat(_), + h = i[0], + l = s.getPartsOpacity(h), + $ = e / r; + a ? (l += $) > 1 && (l = 1) : (l -= $) < 0 && (l = 0), + s.setPartsOpacity(h, l); + } else { + for (var u = 0; u < t.length; u++) { + var _ = t[u], + p = 0 != s.getParamFloat(_); + if (p) { + if (o >= 0) break; + o = u; + var h = i[u]; + (n = s.getPartsOpacity(h)), (n += e / r), n > 1 && (n = 1); + } + } + o < 0 && + (console.log("No _$wi _$q0/ _$U default[%s]", t[0]), + (o = 0), + (n = 1), + s.loadParam(), + s.setParamFloat(t[o], n), + s.saveParam()); + for (var u = 0; u < t.length; u++) { + var h = i[u]; + if (o == u) s.setPartsOpacity(h, n); + else { + var f, + c = s.getPartsOpacity(h); + f = n < 0.5 ? (-0.5 * n) / 0.5 + 1 : (0.5 * (1 - n)) / 0.5; + var d = (1 - f) * (1 - n); + d > 0.15 && (f = 1 - 0.15 / (1 - n)), + c > f && (c = f), + s.setPartsOpacity(h, c); + } + } + } + else + for (var u = 0; u < t.length; u++) { + var _ = t[u], + h = i[u], + p = 0 != s.getParamFloat(_); + s.setPartsOpacity(h, p ? 1 : 0); + } + }), + (i.prototype.setPartsOpacity = function (t, i) { + "number" != typeof t && + (t = this._$5S.getPartsDataIndex(l.getID(t))), + this._$5S.setPartsOpacity(t, i); + }), + (i.prototype.getPartsDataIndex = function (t) { + return ( + t instanceof l || (t = l.getID(t)), this._$5S.getPartsDataIndex(t) + ); + }), + (i.prototype.getPartsOpacity = function (t) { + return ( + "number" != typeof t && + (t = this._$5S.getPartsDataIndex(l.getID(t))), + t < 0 ? 0 : this._$5S.getPartsOpacity(t) + ); + }), + (i.prototype.getDrawParam = function () {}), + (i.prototype.getDrawDataIndex = function (t) { + return this._$5S.getDrawDataIndex(b.getID(t)); + }), + (i.prototype.getDrawData = function (t) { + return this._$5S.getDrawData(t); + }), + (i.prototype.getTransformedPoints = function (t) { + var i = this._$5S._$C2(t); + return i instanceof ut ? i.getTransformedPoints() : null; + }), + (i.prototype.getIndexArray = function (t) { + if (t < 0 || t >= this._$5S._$aS.length) return null; + var i = this._$5S._$aS[t]; + return null != i && i.getType() == W._$wb && i instanceof $t + ? i.getIndexArray() + : null; + }), + (e.CHANNEL_COUNT = 4), + (e.RENDER_TEXTURE_USE_MIPMAP = !1), + (e.NOT_USED_FRAME = -100), + (e.prototype._$L7 = function () { + if ( + (this.tmpModelToViewMatrix && (this.tmpModelToViewMatrix = null), + this.tmpMatrix2 && (this.tmpMatrix2 = null), + this.tmpMatrixForMask && (this.tmpMatrixForMask = null), + this.tmpMatrixForDraw && (this.tmpMatrixForDraw = null), + this.tmpBoundsOnModel && (this.tmpBoundsOnModel = null), + this.CHANNEL_COLORS) + ) { + for (var t = this.CHANNEL_COLORS.length - 1; t >= 0; --t) + this.CHANNEL_COLORS.splice(t, 1); + this.CHANNEL_COLORS = []; + } + this.releaseShader(); + }), + (e.prototype.releaseShader = function () { + for (var t = at.frameBuffers.length, i = 0; i < t; i++) + this.gl.deleteFramebuffer(at.frameBuffers[i].framebuffer); + (at.frameBuffers = []), (at.glContext = []); + }), + (e.prototype.init = function (t, i, e) { + for (var o = 0; o < i.length; o++) { + var n = i[o].getClipIDList(); + if (null != n) { + var s = this.findSameClip(n); + null == s && + ((s = new r(this, t, n)), this.clipContextList.push(s)); + var _ = i[o].getDrawDataID(), + a = t.getDrawDataIndex(_); + s.addClippedDrawData(_, a); + e[o].clipBufPre_clipContext = s; + } + } + }), + (e.prototype.getMaskRenderTexture = function () { + var t = null; + return ( + (t = this.dp_webgl.createFramebuffer()), + (at.frameBuffers[this.dp_webgl.glno] = t), + this.dp_webgl.glno + ); + }), + (e.prototype.setupClip = function (t, i) { + for (var e = 0, r = 0; r < this.clipContextList.length; r++) { + var o = this.clipContextList[r]; + this.calcClippedDrawTotalBounds(t, o), o.isUsing && e++; + } + if (e > 0) { + var n = i.gl.getParameter(i.gl.FRAMEBUFFER_BINDING), + s = new Array(4); + (s[0] = 0), + (s[1] = 0), + (s[2] = i.gl.canvas.width), + (s[3] = i.gl.canvas.height), + i.gl.viewport( + 0, + 0, + at.clippingMaskBufferSize, + at.clippingMaskBufferSize + ), + this.setupLayoutBounds(e), + i.gl.bindFramebuffer( + i.gl.FRAMEBUFFER, + at.frameBuffers[this.curFrameNo].framebuffer + ), + i.gl.clearColor(0, 0, 0, 0), + i.gl.clear(i.gl.COLOR_BUFFER_BIT); + for (var r = 0; r < this.clipContextList.length; r++) { + var o = this.clipContextList[r], + _ = o.allClippedDrawRect, + a = (o.layoutChannelNo, o.layoutBounds); + this.tmpBoundsOnModel._$jL(_), + this.tmpBoundsOnModel.expand(0.05 * _.width, 0.05 * _.height); + var h = a.width / this.tmpBoundsOnModel.width, + l = a.height / this.tmpBoundsOnModel.height; + this.tmpMatrix2.identity(), + this.tmpMatrix2.translate(-1, -1, 0), + this.tmpMatrix2.scale(2, 2, 1), + this.tmpMatrix2.translate(a.x, a.y, 0), + this.tmpMatrix2.scale(h, l, 1), + this.tmpMatrix2.translate( + -this.tmpBoundsOnModel.x, + -this.tmpBoundsOnModel.y, + 0 + ), + this.tmpMatrixForMask.setMatrix(this.tmpMatrix2.m), + this.tmpMatrix2.identity(), + this.tmpMatrix2.translate(a.x, a.y, 0), + this.tmpMatrix2.scale(h, l, 1), + this.tmpMatrix2.translate( + -this.tmpBoundsOnModel.x, + -this.tmpBoundsOnModel.y, + 0 + ), + this.tmpMatrixForDraw.setMatrix(this.tmpMatrix2.m); + for ( + var $ = this.tmpMatrixForMask.getArray(), u = 0; + u < 16; + u++ + ) + o.matrixForMask[u] = $[u]; + for ( + var p = this.tmpMatrixForDraw.getArray(), u = 0; + u < 16; + u++ + ) + o.matrixForDraw[u] = p[u]; + for ( + var f = o.clippingMaskDrawIndexList.length, c = 0; + c < f; + c++ + ) { + var d = o.clippingMaskDrawIndexList[c], + g = t.getDrawData(d), + y = t._$C2(d); + i.setClipBufPre_clipContextForMask(o), g.draw(i, t, y); + } + } + i.gl.bindFramebuffer(i.gl.FRAMEBUFFER, n), + i.setClipBufPre_clipContextForMask(null), + i.gl.viewport(s[0], s[1], s[2], s[3]); + } + }), + (e.prototype.getColorBuffer = function () { + return this.colorBuffer; + }), + (e.prototype.findSameClip = function (t) { + for (var i = 0; i < this.clipContextList.length; i++) { + var e = this.clipContextList[i], + r = e.clipIDList.length; + if (r == t.length) { + for (var o = 0, n = 0; n < r; n++) + for (var s = e.clipIDList[n], _ = 0; _ < r; _++) + if (t[_] == s) { + o++; + break; + } + if (o == r) return e; + } + } + return null; + }), + (e.prototype.calcClippedDrawTotalBounds = function (t, i) { + for ( + var e = t._$Ri.getModelImpl().getCanvasWidth(), + r = t._$Ri.getModelImpl().getCanvasHeight(), + o = e > r ? e : r, + n = o, + s = o, + _ = 0, + a = 0, + h = i.clippedDrawContextList.length, + l = 0; + l < h; + l++ + ) { + var $ = i.clippedDrawContextList[l], + u = $.drawDataIndex, + p = t._$C2(u); + if (p._$yo()) { + for ( + var f = p.getTransformedPoints(), + c = f.length, + d = [], + g = [], + y = 0, + m = U._$i2; + m < c; + m += U._$No + ) + (d[y] = f[m]), (g[y] = f[m + 1]), y++; + var T = Math.min.apply(null, d), + P = Math.min.apply(null, g), + S = Math.max.apply(null, d), + v = Math.max.apply(null, g); + T < n && (n = T), + P < s && (s = P), + S > _ && (_ = S), + v > a && (a = v); + } + } + if (n == o) + (i.allClippedDrawRect.x = 0), + (i.allClippedDrawRect.y = 0), + (i.allClippedDrawRect.width = 0), + (i.allClippedDrawRect.height = 0), + (i.isUsing = !1); + else { + var L = _ - n, + M = a - s; + (i.allClippedDrawRect.x = n), + (i.allClippedDrawRect.y = s), + (i.allClippedDrawRect.width = L), + (i.allClippedDrawRect.height = M), + (i.isUsing = !0); + } + }), + (e.prototype.setupLayoutBounds = function (t) { + var i = t / e.CHANNEL_COUNT, + r = t % e.CHANNEL_COUNT; + (i = ~~i), (r = ~~r); + for (var o = 0, n = 0; n < e.CHANNEL_COUNT; n++) { + var s = i + (n < r ? 1 : 0); + if (0 == s); + else if (1 == s) { + var a = this.clipContextList[o++]; + (a.layoutChannelNo = n), + (a.layoutBounds.x = 0), + (a.layoutBounds.y = 0), + (a.layoutBounds.width = 1), + (a.layoutBounds.height = 1); + } else if (2 == s) + for (var h = 0; h < s; h++) { + var l = h % 2, + $ = 0; + l = ~~l; + var a = this.clipContextList[o++]; + (a.layoutChannelNo = n), + (a.layoutBounds.x = 0.5 * l), + (a.layoutBounds.y = 0), + (a.layoutBounds.width = 0.5), + (a.layoutBounds.height = 1); + } + else if (s <= 4) + for (var h = 0; h < s; h++) { + var l = h % 2, + $ = h / 2; + (l = ~~l), ($ = ~~$); + var a = this.clipContextList[o++]; + (a.layoutChannelNo = n), + (a.layoutBounds.x = 0.5 * l), + (a.layoutBounds.y = 0.5 * $), + (a.layoutBounds.width = 0.5), + (a.layoutBounds.height = 0.5); + } + else if (s <= 9) + for (var h = 0; h < s; h++) { + var l = h % 3, + $ = h / 3; + (l = ~~l), ($ = ~~$); + var a = this.clipContextList[o++]; + (a.layoutChannelNo = n), + (a.layoutBounds.x = l / 3), + (a.layoutBounds.y = $ / 3), + (a.layoutBounds.width = 1 / 3), + (a.layoutBounds.height = 1 / 3); + } + else _._$li("_$6 _$0P mask count : %d", s); + } + }), + (r.prototype.addClippedDrawData = function (t, i) { + var e = new o(t, i); + this.clippedDrawContextList.push(e); + }), + (s._$JT = function (t, i, e) { + var r = t / i, + o = e / i, + n = o, + s = 1 - (1 - o) * (1 - o), + _ = 1 - (1 - n) * (1 - n), + a = + (1 / 3) * (1 - o) * s + + (n * (2 / 3) + (1 / 3) * (1 - n)) * (1 - s), + h = + (n + (2 / 3) * (1 - n)) * _ + + (o * (1 / 3) + (2 / 3) * (1 - o)) * (1 - _), + l = 1 - 3 * h + 3 * a - 0, + $ = 3 * h - 6 * a + 0, + u = 3 * a - 0; + if (r <= 0) return 0; + if (r >= 1) return 1; + var p = r, + f = p * p; + return l * (p * f) + $ * f + u * p + 0; + }), + (s.prototype._$a0 = function () {}), + (s.prototype.setFadeIn = function (t) { + this._$dP = t; + }), + (s.prototype.setFadeOut = function (t) { + this._$eo = t; + }), + (s.prototype._$pT = function (t) { + this._$V0 = t; + }), + (s.prototype.getFadeOut = function () { + return this._$eo; + }), + (s.prototype._$4T = function () { + return this._$eo; + }), + (s.prototype._$mT = function () { + return this._$V0; + }), + (s.prototype.getDurationMSec = function () { + return -1; + }), + (s.prototype.getLoopDurationMSec = function () { + return -1; + }), + (s.prototype.updateParam = function (t, i) { + if (i._$AT && !i._$9L) { + var e = w.getUserTimeMSec(); + if (i._$z2 < 0) { + (i._$z2 = e), (i._$bs = e); + var r = this.getDurationMSec(); + i._$Do < 0 && (i._$Do = r <= 0 ? -1 : i._$z2 + r); + } + var o = this._$V0; + (o = + o * + (0 == this._$dP ? 1 : ht._$r2((e - i._$bs) / this._$dP)) * + (0 == this._$eo || i._$Do < 0 + ? 1 + : ht._$r2((i._$Do - e) / this._$eo))), + (0 <= o && o <= 1) || console.log("### assert!! ### "), + this.updateParamExe(t, e, o, i), + i._$Do > 0 && i._$Do < e && (i._$9L = !0); + } + }), + (s.prototype.updateParamExe = function (t, i, e, r) {}), + (_._$8s = 0), + (_._$fT = new Object()), + (_.start = function (t) { + var i = _._$fT[t]; + null == i && ((i = new a()), (i._$r = t), (_._$fT[t] = i)), + (i._$0S = w.getSystemTimeMSec()); + }), + (_.dump = function (t) { + var i = _._$fT[t]; + if (null != i) { + var e = w.getSystemTimeMSec(), + r = e - i._$0S; + return console.log(t + " : " + r + "ms"), r; + } + return -1; + }), + (_.end = function (t) { + var i = _._$fT[t]; + if (null != i) { + return w.getSystemTimeMSec() - i._$0S; + } + return -1; + }), + (_._$li = function (t, i) { + console.log("_$li : " + t + "\n", i); + }), + (_._$Ji = function (t, i) { + console.log(t, i); + }), + (_._$dL = function (t, i) { + console.log(t, i), console.log("\n"); + }), + (_._$KL = function (t, i) { + for (var e = 0; e < i; e++) + e % 16 == 0 && e > 0 + ? console.log("\n") + : e % 8 == 0 && e > 0 && console.log(" "), + console.log("%02X ", 255 & t[e]); + console.log("\n"); + }), + (_._$nr = function (t, i, e) { + console.log("%s\n", t); + for (var r = i.length, o = 0; o < r; ++o) + console.log("%5d", i[o]), + console.log("%s\n", e), + console.log(","); + console.log("\n"); + }), + (_._$Rb = function (t) { + console.log("dump exception : " + t), + console.log("stack :: " + t.stack); + }), + (h.prototype._$8P = function () { + return 0.5 * (this.x + this.x + this.width); + }), + (h.prototype._$6P = function () { + return 0.5 * (this.y + this.y + this.height); + }), + (h.prototype._$EL = function () { + return this.x + this.width; + }), + (h.prototype._$5T = function () { + return this.y + this.height; + }), + (h.prototype._$jL = function (t, i, e, r) { + (this.x = t), (this.y = i), (this.width = e), (this.height = r); + }), + (h.prototype._$jL = function (t) { + (this.x = t.x), + (this.y = t.y), + (this.width = t.width), + (this.height = t.height); + }), + (l.prototype = new et()), + (l._$tP = new Object()), + (l._$27 = function () { + l._$tP.clear(); + }), + (l.getID = function (t) { + var i = l._$tP[t]; + return null == i && ((i = new l(t)), (l._$tP[t] = i)), i; + }), + (l.prototype._$3s = function () { + return new l(); + }), + (u.prototype = new et()), + (u._$tP = new Object()), + (u._$27 = function () { + u._$tP.clear(); + }), + (u.getID = function (t) { + var i = u._$tP[t]; + return null == i && ((i = new u(t)), (u._$tP[t] = i)), i; + }), + (u.prototype._$3s = function () { + return new u(); + }), + (p._$42 = 0), + (p.prototype._$zP = function () { + null == this._$vo && (this._$vo = new ot()), + null == this._$F2 && (this._$F2 = new Array()); + }), + (p.prototype.getCanvasWidth = function () { + return this._$ao; + }), + (p.prototype.getCanvasHeight = function () { + return this._$1S; + }), + (p.prototype._$F0 = function (t) { + (this._$vo = t._$nP()), + (this._$F2 = t._$nP()), + (this._$ao = t._$6L()), + (this._$1S = t._$6L()); + }), + (p.prototype._$6S = function (t) { + this._$F2.push(t); + }), + (p.prototype._$Xr = function () { + return this._$F2; + }), + (p.prototype._$E2 = function () { + return this._$vo; + }), + (f.prototype.setup = function (t, i, e) { + (this._$ks = this._$Yb()), + this.p2._$xT(), + 3 == arguments.length && + ((this._$Fo = t), + (this._$L2 = i), + (this.p1._$p = e), + (this.p2._$p = e), + (this.p2.y = t), + this.setup()); + }), + (f.prototype.getPhysicsPoint1 = function () { + return this.p1; + }), + (f.prototype.getPhysicsPoint2 = function () { + return this.p2; + }), + (f.prototype._$qr = function () { + return this._$Db; + }), + (f.prototype._$pr = function (t) { + this._$Db = t; + }), + (f.prototype._$5r = function () { + return this._$M2; + }), + (f.prototype._$Cs = function () { + return this._$9b; + }), + (f.prototype._$Yb = function () { + return ( + (-180 * + Math.atan2(this.p1.x - this.p2.x, -(this.p1.y - this.p2.y))) / + Math.PI + ); + }), + (f.prototype.addSrcParam = function (t, i, e, r) { + var o = new g(t, i, e, r); + this._$lL.push(o); + }), + (f.prototype.addTargetParam = function (t, i, e, r) { + var o = new T(t, i, e, r); + this._$qP.push(o); + }), + (f.prototype.update = function (t, i) { + if (0 == this._$iP) + return ( + (this._$iP = this._$iT = i), + void (this._$Fo = Math.sqrt( + (this.p1.x - this.p2.x) * (this.p1.x - this.p2.x) + + (this.p1.y - this.p2.y) * (this.p1.y - this.p2.y) + )) + ); + var e = (i - this._$iT) / 1e3; + if (0 != e) { + for (var r = this._$lL.length - 1; r >= 0; --r) { + this._$lL[r]._$oP(t, this); + } + this._$oo(t, e), + (this._$M2 = this._$Yb()), + (this._$9b = (this._$M2 - this._$ks) / e), + (this._$ks = this._$M2); + } + for (var r = this._$qP.length - 1; r >= 0; --r) { + this._$qP[r]._$YS(t, this); + } + this._$iT = i; + }), + (f.prototype._$oo = function (t, i) { + i < 0.033 && (i = 0.033); + var e = 1 / i; + (this.p1.vx = (this.p1.x - this.p1._$s0) * e), + (this.p1.vy = (this.p1.y - this.p1._$70) * e), + (this.p1.ax = (this.p1.vx - this.p1._$7L) * e), + (this.p1.ay = (this.p1.vy - this.p1._$HL) * e), + (this.p1.fx = this.p1.ax * this.p1._$p), + (this.p1.fy = this.p1.ay * this.p1._$p), + this.p1._$xT(); + var r, + o, + n = -Math.atan2(this.p1.y - this.p2.y, this.p1.x - this.p2.x), + s = Math.cos(n), + _ = Math.sin(n), + a = 9.8 * this.p2._$p, + h = this._$Db * Lt._$bS, + l = a * Math.cos(n - h); + (r = l * _), (o = l * s); + var $ = -this.p1.fx * _ * _, + u = -this.p1.fy * _ * s, + p = -this.p2.vx * this._$L2, + f = -this.p2.vy * this._$L2; + (this.p2.fx = r + $ + p), + (this.p2.fy = o + u + f), + (this.p2.ax = this.p2.fx / this.p2._$p), + (this.p2.ay = this.p2.fy / this.p2._$p), + (this.p2.vx += this.p2.ax * i), + (this.p2.vy += this.p2.ay * i), + (this.p2.x += this.p2.vx * i), + (this.p2.y += this.p2.vy * i); + var c = Math.sqrt( + (this.p1.x - this.p2.x) * (this.p1.x - this.p2.x) + + (this.p1.y - this.p2.y) * (this.p1.y - this.p2.y) + ); + (this.p2.x = this.p1.x + (this._$Fo * (this.p2.x - this.p1.x)) / c), + (this.p2.y = + this.p1.y + (this._$Fo * (this.p2.y - this.p1.y)) / c), + (this.p2.vx = (this.p2.x - this.p2._$s0) * e), + (this.p2.vy = (this.p2.y - this.p2._$70) * e), + this.p2._$xT(); + }), + (c.prototype._$xT = function () { + (this._$s0 = this.x), + (this._$70 = this.y), + (this._$7L = this.vx), + (this._$HL = this.vy); + }), + (d.prototype._$oP = function (t, i) {}), + (g.prototype = new d()), + (g.prototype._$oP = function (t, i) { + var e = this.scale * t.getParamFloat(this._$wL), + r = i.getPhysicsPoint1(); + switch (this._$tL) { + default: + case f.Src.SRC_TO_X: + r.x = r.x + (e - r.x) * this._$V0; + break; + case f.Src.SRC_TO_Y: + r.y = r.y + (e - r.y) * this._$V0; + break; + case f.Src.SRC_TO_G_ANGLE: + var o = i._$qr(); + (o += (e - o) * this._$V0), i._$pr(o); + } + }), + (y.prototype._$YS = function (t, i) {}), + (T.prototype = new y()), + (T.prototype._$YS = function (t, i) { + switch (this._$YP) { + default: + case f.Target.TARGET_FROM_ANGLE: + t.setParamFloat(this._$wL, this.scale * i._$5r(), this._$V0); + break; + case f.Target.TARGET_FROM_ANGLE_V: + t.setParamFloat(this._$wL, this.scale * i._$Cs(), this._$V0); + } + }), + (f.Src = function () {}), + (f.Src.SRC_TO_X = "SRC_TO_X"), + (f.Src.SRC_TO_Y = "SRC_TO_Y"), + (f.Src.SRC_TO_G_ANGLE = "SRC_TO_G_ANGLE"), + (f.Target = function () {}), + (f.Target.TARGET_FROM_ANGLE = "TARGET_FROM_ANGLE"), + (f.Target.TARGET_FROM_ANGLE_V = "TARGET_FROM_ANGLE_V"), + (P.prototype.init = function (t) { + (this._$fL = t._$fL), + (this._$gL = t._$gL), + (this._$B0 = t._$B0), + (this._$z0 = t._$z0), + (this._$qT = t._$qT), + (this.reflectX = t.reflectX), + (this.reflectY = t.reflectY); + }), + (P.prototype._$F0 = function (t) { + (this._$fL = t._$_T()), + (this._$gL = t._$_T()), + (this._$B0 = t._$_T()), + (this._$z0 = t._$_T()), + (this._$qT = t._$_T()), + t.getFormatVersion() >= G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 && + ((this.reflectX = t._$po()), (this.reflectY = t._$po())); + }), + (P.prototype._$e = function () {}); + var It = function () {}; + (It._$ni = function (t, i, e, r, o, n, s, _, a) { + var h = s * n - _ * o; + if (0 == h) return null; + var l, + $ = ((t - e) * n - (i - r) * o) / h; + return ( + (l = 0 != o ? (t - e - $ * s) / o : (i - r - $ * _) / n), + isNaN(l) && + ((l = (t - e - $ * s) / o), + isNaN(l) && (l = (i - r - $ * _) / n), + isNaN(l) && + (console.log("a is NaN @UtVector#_$ni() "), + console.log("v1x : " + o), + console.log("v1x != 0 ? " + (0 != o)))), + null == a ? new Array(l, $) : ((a[0] = l), (a[1] = $), a) + ); + }), + (S.prototype._$8P = function () { + return this.x + 0.5 * this.width; + }), + (S.prototype._$6P = function () { + return this.y + 0.5 * this.height; + }), + (S.prototype._$EL = function () { + return this.x + this.width; + }), + (S.prototype._$5T = function () { + return this.y + this.height; + }), + (S.prototype._$jL = function (t, i, e, r) { + (this.x = t), (this.y = i), (this.width = e), (this.height = r); + }), + (S.prototype._$jL = function (t) { + (this.x = t.x), + (this.y = t.y), + (this.width = t.width), + (this.height = t.height); + }), + (S.prototype.contains = function (t, i) { + return ( + this.x <= this.x && + this.y <= this.y && + this.x <= this.x + this.width && + this.y <= this.y + this.height + ); + }), + (S.prototype.expand = function (t, i) { + (this.x -= t), + (this.y -= i), + (this.width += 2 * t), + (this.height += 2 * i); + }), + (v._$Z2 = function (t, i, e, r) { + var o = i._$Q2(t, e), + n = t._$vs(), + s = t._$Tr(); + if ((i._$zr(n, s, o), o <= 0)) return r[n[0]]; + if (1 == o) { + var _ = r[n[0]], + a = r[n[1]], + h = s[0]; + return (_ + (a - _) * h) | 0; + } + if (2 == o) { + var _ = r[n[0]], + a = r[n[1]], + l = r[n[2]], + $ = r[n[3]], + h = s[0], + u = s[1], + p = (_ + (a - _) * h) | 0, + f = (l + ($ - l) * h) | 0; + return (p + (f - p) * u) | 0; + } + if (3 == o) { + var c = r[n[0]], + d = r[n[1]], + g = r[n[2]], + y = r[n[3]], + m = r[n[4]], + T = r[n[5]], + P = r[n[6]], + S = r[n[7]], + h = s[0], + u = s[1], + v = s[2], + _ = (c + (d - c) * h) | 0, + a = (g + (y - g) * h) | 0, + l = (m + (T - m) * h) | 0, + $ = (P + (S - P) * h) | 0, + p = (_ + (a - _) * u) | 0, + f = (l + ($ - l) * u) | 0; + return (p + (f - p) * v) | 0; + } + if (4 == o) { + var L = r[n[0]], + M = r[n[1]], + E = r[n[2]], + A = r[n[3]], + I = r[n[4]], + w = r[n[5]], + x = r[n[6]], + O = r[n[7]], + D = r[n[8]], + R = r[n[9]], + b = r[n[10]], + F = r[n[11]], + C = r[n[12]], + N = r[n[13]], + B = r[n[14]], + U = r[n[15]], + h = s[0], + u = s[1], + v = s[2], + G = s[3], + c = (L + (M - L) * h) | 0, + d = (E + (A - E) * h) | 0, + g = (I + (w - I) * h) | 0, + y = (x + (O - x) * h) | 0, + m = (D + (R - D) * h) | 0, + T = (b + (F - b) * h) | 0, + P = (C + (N - C) * h) | 0, + S = (B + (U - B) * h) | 0, + _ = (c + (d - c) * u) | 0, + a = (g + (y - g) * u) | 0, + l = (m + (T - m) * u) | 0, + $ = (P + (S - P) * u) | 0, + p = (_ + (a - _) * v) | 0, + f = (l + ($ - l) * v) | 0; + return (p + (f - p) * G) | 0; + } + for (var Y = 1 << o, k = new Float32Array(Y), V = 0; V < Y; V++) { + for (var X = V, z = 1, H = 0; H < o; H++) + (z *= X % 2 == 0 ? 1 - s[H] : s[H]), (X /= 2); + k[V] = z; + } + for (var W = new Float32Array(Y), j = 0; j < Y; j++) W[j] = r[n[j]]; + for (var q = 0, j = 0; j < Y; j++) q += k[j] * W[j]; + return (q + 0.5) | 0; + }), + (v._$br = function (t, i, e, r) { + var o = i._$Q2(t, e), + n = t._$vs(), + s = t._$Tr(); + if ((i._$zr(n, s, o), o <= 0)) return r[n[0]]; + if (1 == o) { + var _ = r[n[0]], + a = r[n[1]], + h = s[0]; + return _ + (a - _) * h; + } + if (2 == o) { + var _ = r[n[0]], + a = r[n[1]], + l = r[n[2]], + $ = r[n[3]], + h = s[0], + u = s[1]; + return (1 - u) * (_ + (a - _) * h) + u * (l + ($ - l) * h); + } + if (3 == o) { + var p = r[n[0]], + f = r[n[1]], + c = r[n[2]], + d = r[n[3]], + g = r[n[4]], + y = r[n[5]], + m = r[n[6]], + T = r[n[7]], + h = s[0], + u = s[1], + P = s[2]; + return ( + (1 - P) * + ((1 - u) * (p + (f - p) * h) + u * (c + (d - c) * h)) + + P * ((1 - u) * (g + (y - g) * h) + u * (m + (T - m) * h)) + ); + } + if (4 == o) { + var S = r[n[0]], + v = r[n[1]], + L = r[n[2]], + M = r[n[3]], + E = r[n[4]], + A = r[n[5]], + I = r[n[6]], + w = r[n[7]], + x = r[n[8]], + O = r[n[9]], + D = r[n[10]], + R = r[n[11]], + b = r[n[12]], + F = r[n[13]], + C = r[n[14]], + N = r[n[15]], + h = s[0], + u = s[1], + P = s[2], + B = s[3]; + return ( + (1 - B) * + ((1 - P) * + ((1 - u) * (S + (v - S) * h) + u * (L + (M - L) * h)) + + P * ((1 - u) * (E + (A - E) * h) + u * (I + (w - I) * h))) + + B * + ((1 - P) * + ((1 - u) * (x + (O - x) * h) + u * (D + (R - D) * h)) + + P * ((1 - u) * (b + (F - b) * h) + u * (C + (N - C) * h))) + ); + } + for (var U = 1 << o, G = new Float32Array(U), Y = 0; Y < U; Y++) { + for (var k = Y, V = 1, X = 0; X < o; X++) + (V *= k % 2 == 0 ? 1 - s[X] : s[X]), (k /= 2); + G[Y] = V; + } + for (var z = new Float32Array(U), H = 0; H < U; H++) z[H] = r[n[H]]; + for (var W = 0, H = 0; H < U; H++) W += G[H] * z[H]; + return W; + }), + (v._$Vr = function (t, i, e, r, o, n, s, _) { + var a = i._$Q2(t, e), + h = t._$vs(), + l = t._$Tr(); + i._$zr(h, l, a); + var $ = 2 * r, + u = s; + if (a <= 0) { + var p = h[0], + f = o[p]; + if (2 == _ && 0 == s) w._$jT(f, 0, n, 0, $); + else + for (var c = 0; c < $; ) + (n[u] = f[c++]), (n[u + 1] = f[c++]), (u += _); + } else if (1 == a) + for ( + var f = o[h[0]], d = o[h[1]], g = l[0], y = 1 - g, c = 0; + c < $; + + ) + (n[u] = f[c] * y + d[c] * g), + ++c, + (n[u + 1] = f[c] * y + d[c] * g), + ++c, + (u += _); + else if (2 == a) + for ( + var f = o[h[0]], + d = o[h[1]], + m = o[h[2]], + T = o[h[3]], + g = l[0], + P = l[1], + y = 1 - g, + S = 1 - P, + v = S * y, + L = S * g, + M = P * y, + E = P * g, + c = 0; + c < $; + + ) + (n[u] = v * f[c] + L * d[c] + M * m[c] + E * T[c]), + ++c, + (n[u + 1] = v * f[c] + L * d[c] + M * m[c] + E * T[c]), + ++c, + (u += _); + else if (3 == a) + for ( + var A = o[h[0]], + I = o[h[1]], + x = o[h[2]], + O = o[h[3]], + D = o[h[4]], + R = o[h[5]], + b = o[h[6]], + F = o[h[7]], + g = l[0], + P = l[1], + C = l[2], + y = 1 - g, + S = 1 - P, + N = 1 - C, + B = N * S * y, + U = N * S * g, + G = N * P * y, + Y = N * P * g, + k = C * S * y, + V = C * S * g, + X = C * P * y, + z = C * P * g, + c = 0; + c < $; + + ) + (n[u] = + B * A[c] + + U * I[c] + + G * x[c] + + Y * O[c] + + k * D[c] + + V * R[c] + + X * b[c] + + z * F[c]), + ++c, + (n[u + 1] = + B * A[c] + + U * I[c] + + G * x[c] + + Y * O[c] + + k * D[c] + + V * R[c] + + X * b[c] + + z * F[c]), + ++c, + (u += _); + else if (4 == a) + for ( + var H = o[h[0]], + W = o[h[1]], + j = o[h[2]], + q = o[h[3]], + J = o[h[4]], + Q = o[h[5]], + Z = o[h[6]], + K = o[h[7]], + tt = o[h[8]], + it = o[h[9]], + et = o[h[10]], + rt = o[h[11]], + ot = o[h[12]], + nt = o[h[13]], + st = o[h[14]], + _t = o[h[15]], + g = l[0], + P = l[1], + C = l[2], + at = l[3], + y = 1 - g, + S = 1 - P, + N = 1 - C, + ht = 1 - at, + lt = ht * N * S * y, + $t = ht * N * S * g, + ut = ht * N * P * y, + pt = ht * N * P * g, + ft = ht * C * S * y, + ct = ht * C * S * g, + dt = ht * C * P * y, + gt = ht * C * P * g, + yt = at * N * S * y, + mt = at * N * S * g, + Tt = at * N * P * y, + Pt = at * N * P * g, + St = at * C * S * y, + vt = at * C * S * g, + Lt = at * C * P * y, + Mt = at * C * P * g, + c = 0; + c < $; + + ) + (n[u] = + lt * H[c] + + $t * W[c] + + ut * j[c] + + pt * q[c] + + ft * J[c] + + ct * Q[c] + + dt * Z[c] + + gt * K[c] + + yt * tt[c] + + mt * it[c] + + Tt * et[c] + + Pt * rt[c] + + St * ot[c] + + vt * nt[c] + + Lt * st[c] + + Mt * _t[c]), + ++c, + (n[u + 1] = + lt * H[c] + + $t * W[c] + + ut * j[c] + + pt * q[c] + + ft * J[c] + + ct * Q[c] + + dt * Z[c] + + gt * K[c] + + yt * tt[c] + + mt * it[c] + + Tt * et[c] + + Pt * rt[c] + + St * ot[c] + + vt * nt[c] + + Lt * st[c] + + Mt * _t[c]), + ++c, + (u += _); + else { + for ( + var Et = 1 << a, At = new Float32Array(Et), It = 0; + It < Et; + It++ + ) { + for (var wt = It, xt = 1, Ot = 0; Ot < a; Ot++) + (xt *= wt % 2 == 0 ? 1 - l[Ot] : l[Ot]), (wt /= 2); + At[It] = xt; + } + for (var Dt = new Float32Array(Et), Rt = 0; Rt < Et; Rt++) + Dt[Rt] = o[h[Rt]]; + for (var c = 0; c < $; ) { + for (var bt = 0, Ft = 0, Ct = c + 1, Rt = 0; Rt < Et; Rt++) + (bt += At[Rt] * Dt[Rt][c]), (Ft += At[Rt] * Dt[Rt][Ct]); + (c += 2), (n[u] = bt), (n[u + 1] = Ft), (u += _); + } + } + }), + (L.prototype._$HT = function (t, i) { + (this.x = t), (this.y = i); + }), + (L.prototype._$HT = function (t) { + (this.x = t.x), (this.y = t.y); + }), + (M._$ur = -2), + (M._$ES = 500), + (M._$wb = 2), + (M._$8S = 3), + (M._$52 = M._$ES), + (M._$R2 = M._$ES), + (M._$or = function () { + return M._$52; + }), + (M._$Pr = function () { + return M._$R2; + }), + (M.prototype.convertClipIDForV2_11 = function (t) { + var i = []; + return null == t + ? null + : 0 == t.length + ? null + : /,/.test(t) + ? (i = t.id.split(",")) + : (i.push(t.id), i); + }), + (M.prototype._$F0 = function (t) { + (this._$gP = t._$nP()), + (this._$dr = t._$nP()), + (this._$GS = t._$nP()), + (this._$qb = t._$6L()), + (this._$Lb = t._$cS()), + (this._$mS = t._$Tb()), + t.getFormatVersion() >= G._$T7 + ? ((this.clipID = t._$nP()), + (this.clipIDList = this.convertClipIDForV2_11(this.clipID))) + : (this.clipIDList = []), + this._$MS(this._$Lb); + }), + (M.prototype.getClipIDList = function () { + return this.clipIDList; + }), + (M.prototype.init = function (t) {}), + (M.prototype._$Nr = function (t, i) { + if ( + ((i._$IS[0] = !1), + (i._$Us = v._$Z2(t, this._$GS, i._$IS, this._$Lb)), + at._$Zs) + ); + else if (i._$IS[0]) return; + i._$7s = v._$br(t, this._$GS, i._$IS, this._$mS); + }), + (M.prototype._$2b = function (t, i) {}), + (M.prototype.getDrawDataID = function () { + return this._$gP; + }), + (M.prototype._$j2 = function (t) { + this._$gP = t; + }), + (M.prototype.getOpacity = function (t, i) { + return i._$7s; + }), + (M.prototype._$zS = function (t, i) { + return i._$Us; + }), + (M.prototype._$MS = function (t) { + for (var i = t.length - 1; i >= 0; --i) { + var e = t[i]; + e < M._$52 ? (M._$52 = e) : e > M._$R2 && (M._$R2 = e); + } + }), + (M.prototype.getTargetBaseDataID = function () { + return this._$dr; + }), + (M.prototype._$gs = function (t) { + this._$dr = t; + }), + (M.prototype._$32 = function () { + return null != this._$dr && this._$dr != yt._$2o(); + }), + (M.prototype.preDraw = function (t, i, e) {}), + (M.prototype.draw = function (t, i, e) {}), + (M.prototype.getType = function () {}), + (M.prototype._$B2 = function (t, i, e) {}), + (E._$ps = 32), + (E.CLIPPING_PROCESS_NONE = 0), + (E.CLIPPING_PROCESS_OVERWRITE_ALPHA = 1), + (E.CLIPPING_PROCESS_MULTIPLY_ALPHA = 2), + (E.CLIPPING_PROCESS_DRAW = 3), + (E.CLIPPING_PROCESS_CLEAR_ALPHA = 4), + (E.prototype.setChannelFlagAsColor = function (t, i) { + this.CHANNEL_COLORS[t] = i; + }), + (E.prototype.getChannelFlagAsColor = function (t) { + return this.CHANNEL_COLORS[t]; + }), + (E.prototype._$ZT = function () {}), + (E.prototype._$Uo = function (t, i, e, r, o, n, s) {}), + (E.prototype._$Rs = function () { + return -1; + }), + (E.prototype._$Ds = function (t) {}), + (E.prototype.setBaseColor = function (t, i, e, r) { + t < 0 ? (t = 0) : t > 1 && (t = 1), + i < 0 ? (i = 0) : i > 1 && (i = 1), + e < 0 ? (e = 0) : e > 1 && (e = 1), + r < 0 ? (r = 0) : r > 1 && (r = 1), + (this._$lT = t), + (this._$C0 = i), + (this._$tT = e), + (this._$WL = r); + }), + (E.prototype._$WP = function (t) { + this.culling = t; + }), + (E.prototype.setMatrix = function (t) { + for (var i = 0; i < 16; i++) this.matrix4x4[i] = t[i]; + }), + (E.prototype._$IT = function () { + return this.matrix4x4; + }), + (E.prototype.setPremultipliedAlpha = function (t) { + this.premultipliedAlpha = t; + }), + (E.prototype.isPremultipliedAlpha = function () { + return this.premultipliedAlpha; + }), + (E.prototype.setAnisotropy = function (t) { + this.anisotropy = t; + }), + (E.prototype.getAnisotropy = function () { + return this.anisotropy; + }), + (E.prototype.getClippingProcess = function () { + return this.clippingProcess; + }), + (E.prototype.setClippingProcess = function (t) { + this.clippingProcess = t; + }), + (E.prototype.setClipBufPre_clipContextForMask = function (t) { + this.clipBufPre_clipContextMask = t; + }), + (E.prototype.getClipBufPre_clipContextMask = function () { + return this.clipBufPre_clipContextMask; + }), + (E.prototype.setClipBufPre_clipContextForDraw = function (t) { + this.clipBufPre_clipContextDraw = t; + }), + (E.prototype.getClipBufPre_clipContextDraw = function () { + return this.clipBufPre_clipContextDraw; + }), + (I._$ur = -2), + (I._$c2 = 1), + (I._$_b = 2), + (I.prototype._$F0 = function (t) { + (this._$kP = t._$nP()), (this._$dr = t._$nP()); + }), + (I.prototype.readV2_opacity = function (t) { + t.getFormatVersion() >= G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 && + (this._$mS = t._$Tb()); + }), + (I.prototype.init = function (t) {}), + (I.prototype._$Nr = function (t, i) {}), + (I.prototype.interpolateOpacity = function (t, i, e, r) { + null == this._$mS + ? e.setInterpolatedOpacity(1) + : e.setInterpolatedOpacity(v._$br(t, i, r, this._$mS)); + }), + (I.prototype._$2b = function (t, i) {}), + (I.prototype._$nb = function (t, i, e, r, o, n, s) {}), + (I.prototype.getType = function () {}), + (I.prototype._$gs = function (t) { + this._$dr = t; + }), + (I.prototype._$a2 = function (t) { + this._$kP = t; + }), + (I.prototype.getTargetBaseDataID = function () { + return this._$dr; + }), + (I.prototype.getBaseDataID = function () { + return this._$kP; + }), + (I.prototype._$32 = function () { + return null != this._$dr && this._$dr != yt._$2o(); + }), + (w._$W2 = 0), + (w._$CS = w._$W2), + (w._$Mo = function () { + return !0; + }), + (w._$XP = function (t) { + try { + for (var i = getTimeMSec(); getTimeMSec() - i < t; ); + } catch (t) { + t._$Rb(); + } + }), + (w.getUserTimeMSec = function () { + return w._$CS == w._$W2 ? w.getSystemTimeMSec() : w._$CS; + }), + (w.setUserTimeMSec = function (t) { + w._$CS = t; + }), + (w.updateUserTimeMSec = function () { + return (w._$CS = w.getSystemTimeMSec()); + }), + (w.getTimeMSec = function () { + return new Date().getTime(); + }), + (w.getSystemTimeMSec = function () { + return new Date().getTime(); + }), + (w._$Q = function (t) {}), + (w._$jT = function (t, i, e, r, o) { + for (var n = 0; n < o; n++) e[r + n] = t[i + n]; + }), + (x._$ds = -2), + (x.prototype._$F0 = function (t) { + (this._$wL = t._$nP()), + (this._$VP = t._$6L()), + (this._$GP = t._$nP()); + }), + (x.prototype.getParamIndex = function (t) { + return this._$2r != t && (this._$8o = x._$ds), this._$8o; + }), + (x.prototype._$Pb = function (t, i) { + (this._$8o = t), (this._$2r = i); + }), + (x.prototype.getParamID = function () { + return this._$wL; + }), + (x.prototype._$yP = function (t) { + this._$wL = t; + }), + (x.prototype._$N2 = function () { + return this._$VP; + }), + (x.prototype._$d2 = function () { + return this._$GP; + }), + (x.prototype._$t2 = function (t, i) { + (this._$VP = t), (this._$GP = i); + }), + (x.prototype._$Lr = function () { + return this._$O2; + }), + (x.prototype._$wr = function (t) { + this._$O2 = t; + }), + (x.prototype._$SL = function () { + return this._$ri; + }), + (x.prototype._$AL = function (t) { + this._$ri = t; + }), + (O.startsWith = function (t, i, e) { + var r = i + e.length; + if (r >= t.length) return !1; + for (var o = i; o < r; o++) + if (O.getChar(t, o) != e.charAt(o - i)) return !1; + return !0; + }), + (O.getChar = function (t, i) { + return String.fromCharCode(t.getUint8(i)); + }), + (O.createString = function (t, i, e) { + for ( + var r = new ArrayBuffer(2 * e), o = new Uint16Array(r), n = 0; + n < e; + n++ + ) + o[n] = t.getUint8(i + n); + return String.fromCharCode.apply(null, o); + }), + (O._$LS = function (t, i, e, r) { + t instanceof ArrayBuffer && (t = new DataView(t)); + var o = e, + n = !1, + s = !1, + _ = 0, + a = O.getChar(t, o); + "-" == a && ((n = !0), o++); + for (var h = !1; o < i; o++) { + switch ((a = O.getChar(t, o))) { + case "0": + _ *= 10; + break; + case "1": + _ = 10 * _ + 1; + break; + case "2": + _ = 10 * _ + 2; + break; + case "3": + _ = 10 * _ + 3; + break; + case "4": + _ = 10 * _ + 4; + break; + case "5": + _ = 10 * _ + 5; + break; + case "6": + _ = 10 * _ + 6; + break; + case "7": + _ = 10 * _ + 7; + break; + case "8": + _ = 10 * _ + 8; + break; + case "9": + _ = 10 * _ + 9; + break; + case ".": + (s = !0), o++, (h = !0); + break; + default: + h = !0; + } + if (h) break; + } + if (s) + for (var l = 0.1, $ = !1; o < i; o++) { + switch ((a = O.getChar(t, o))) { + case "0": + break; + case "1": + _ += 1 * l; + break; + case "2": + _ += 2 * l; + break; + case "3": + _ += 3 * l; + break; + case "4": + _ += 4 * l; + break; + case "5": + _ += 5 * l; + break; + case "6": + _ += 6 * l; + break; + case "7": + _ += 7 * l; + break; + case "8": + _ += 8 * l; + break; + case "9": + _ += 9 * l; + break; + default: + $ = !0; + } + if (((l *= 0.1), $)) break; + } + return n && (_ = -_), (r[0] = o), _; + }), + (D.prototype._$zP = function () { + this._$Ob = new Array(); + }), + (D.prototype._$F0 = function (t) { + this._$Ob = t._$nP(); + }), + (D.prototype._$Ur = function (t) { + if (t._$WS()) return !0; + for (var i = t._$v2(), e = this._$Ob.length - 1; e >= 0; --e) { + var r = this._$Ob[e].getParamIndex(i); + if ( + (r == x._$ds && + (r = t.getParamIndex(this._$Ob[e].getParamID())), + t._$Xb(r)) + ) + return !0; + } + return !1; + }), + (D.prototype._$Q2 = function (t, i) { + for ( + var e, r, o = this._$Ob.length, n = t._$v2(), s = 0, _ = 0; + _ < o; + _++ + ) { + var a = this._$Ob[_]; + if ( + ((e = a.getParamIndex(n)), + e == x._$ds && + ((e = t.getParamIndex(a.getParamID())), a._$Pb(e, n)), + e < 0) + ) + throw new Exception("err 23242 : " + a.getParamID()); + var h = e < 0 ? 0 : t.getParamFloat(e); + r = a._$N2(); + var l, + $, + u = a._$d2(), + p = -1, + f = 0; + if (r < 1); + else if (1 == r) + (l = u[0]), + l - U._$J < h && h < l + U._$J + ? ((p = 0), (f = 0)) + : ((p = 0), (i[0] = !0)); + else if (((l = u[0]), h < l - U._$J)) (p = 0), (i[0] = !0); + else if (h < l + U._$J) p = 0; + else { + for (var c = !1, d = 1; d < r; ++d) { + if ((($ = u[d]), h < $ + U._$J)) { + $ - U._$J < h + ? (p = d) + : ((p = d - 1), (f = (h - l) / ($ - l)), s++), + (c = !0); + break; + } + l = $; + } + c || ((p = r - 1), (f = 0), (i[0] = !0)); + } + a._$wr(p), a._$AL(f); + } + return s; + }), + (D.prototype._$zr = function (t, i, e) { + var r = 1 << e; + r + 1 > U._$Qb && console.log("err 23245\n"); + for ( + var o = this._$Ob.length, n = 1, s = 1, _ = 0, a = 0; + a < r; + ++a + ) + t[a] = 0; + for (var h = 0; h < o; ++h) { + var l = this._$Ob[h]; + if (0 == l._$SL()) { + var $ = l._$Lr() * n; + if ($ < 0 && at._$3T) throw new Exception("err 23246"); + for (var a = 0; a < r; ++a) t[a] += $; + } else { + for ( + var $ = n * l._$Lr(), u = n * (l._$Lr() + 1), a = 0; + a < r; + ++a + ) + t[a] += ((a / s) | 0) % 2 == 0 ? $ : u; + (i[_++] = l._$SL()), (s *= 2); + } + n *= l._$N2(); + } + (t[r] = 65535), (i[_] = -1); + }), + (D.prototype._$h2 = function (t, i, e) { + for (var r = new Float32Array(i), o = 0; o < i; ++o) r[o] = e[o]; + var n = new x(); + n._$yP(t), n._$t2(i, r), this._$Ob.push(n); + }), + (D.prototype._$J2 = function (t) { + for (var i = t, e = this._$Ob.length, r = 0; r < e; ++r) { + var o = this._$Ob[r], + n = o._$N2(), + s = i % o._$N2(), + _ = o._$d2()[s]; + console.log("%s[%d]=%7.2f / ", o.getParamID(), s, _), (i /= n); + } + console.log("\n"); + }), + (D.prototype.getParamCount = function () { + return this._$Ob.length; + }), + (D.prototype._$zs = function () { + return this._$Ob; + }), + (R.prototype.identity = function () { + for (var t = 0; t < 16; t++) this.m[t] = t % 5 == 0 ? 1 : 0; + }), + (R.prototype.getArray = function () { + return this.m; + }), + (R.prototype.getCopyMatrix = function () { + return new Float32Array(this.m); + }), + (R.prototype.setMatrix = function (t) { + if (null != t && 16 == t.length) + for (var i = 0; i < 16; i++) this.m[i] = t[i]; + }), + (R.prototype.mult = function (t, i, e) { + return null == i + ? null + : (this == i + ? this.mult_safe(this.m, t.m, i.m, e) + : this.mult_fast(this.m, t.m, i.m, e), + i); + }), + (R.prototype.mult_safe = function (t, i, e, r) { + if (t == e) { + var o = new Array(16); + this.mult_fast(t, i, o, r); + for (var n = 15; n >= 0; --n) e[n] = o[n]; + } else this.mult_fast(t, i, e, r); + }), + (R.prototype.mult_fast = function (t, i, e, r) { + r + ? ((e[0] = t[0] * i[0] + t[4] * i[1] + t[8] * i[2]), + (e[4] = t[0] * i[4] + t[4] * i[5] + t[8] * i[6]), + (e[8] = t[0] * i[8] + t[4] * i[9] + t[8] * i[10]), + (e[12] = t[0] * i[12] + t[4] * i[13] + t[8] * i[14] + t[12]), + (e[1] = t[1] * i[0] + t[5] * i[1] + t[9] * i[2]), + (e[5] = t[1] * i[4] + t[5] * i[5] + t[9] * i[6]), + (e[9] = t[1] * i[8] + t[5] * i[9] + t[9] * i[10]), + (e[13] = t[1] * i[12] + t[5] * i[13] + t[9] * i[14] + t[13]), + (e[2] = t[2] * i[0] + t[6] * i[1] + t[10] * i[2]), + (e[6] = t[2] * i[4] + t[6] * i[5] + t[10] * i[6]), + (e[10] = t[2] * i[8] + t[6] * i[9] + t[10] * i[10]), + (e[14] = t[2] * i[12] + t[6] * i[13] + t[10] * i[14] + t[14]), + (e[3] = e[7] = e[11] = 0), + (e[15] = 1)) + : ((e[0] = + t[0] * i[0] + t[4] * i[1] + t[8] * i[2] + t[12] * i[3]), + (e[4] = t[0] * i[4] + t[4] * i[5] + t[8] * i[6] + t[12] * i[7]), + (e[8] = + t[0] * i[8] + t[4] * i[9] + t[8] * i[10] + t[12] * i[11]), + (e[12] = + t[0] * i[12] + t[4] * i[13] + t[8] * i[14] + t[12] * i[15]), + (e[1] = t[1] * i[0] + t[5] * i[1] + t[9] * i[2] + t[13] * i[3]), + (e[5] = t[1] * i[4] + t[5] * i[5] + t[9] * i[6] + t[13] * i[7]), + (e[9] = + t[1] * i[8] + t[5] * i[9] + t[9] * i[10] + t[13] * i[11]), + (e[13] = + t[1] * i[12] + t[5] * i[13] + t[9] * i[14] + t[13] * i[15]), + (e[2] = + t[2] * i[0] + t[6] * i[1] + t[10] * i[2] + t[14] * i[3]), + (e[6] = + t[2] * i[4] + t[6] * i[5] + t[10] * i[6] + t[14] * i[7]), + (e[10] = + t[2] * i[8] + t[6] * i[9] + t[10] * i[10] + t[14] * i[11]), + (e[14] = + t[2] * i[12] + t[6] * i[13] + t[10] * i[14] + t[14] * i[15]), + (e[3] = + t[3] * i[0] + t[7] * i[1] + t[11] * i[2] + t[15] * i[3]), + (e[7] = + t[3] * i[4] + t[7] * i[5] + t[11] * i[6] + t[15] * i[7]), + (e[11] = + t[3] * i[8] + t[7] * i[9] + t[11] * i[10] + t[15] * i[11]), + (e[15] = + t[3] * i[12] + t[7] * i[13] + t[11] * i[14] + t[15] * i[15])); + }), + (R.prototype.translate = function (t, i, e) { + (this.m[12] = + this.m[0] * t + this.m[4] * i + this.m[8] * e + this.m[12]), + (this.m[13] = + this.m[1] * t + this.m[5] * i + this.m[9] * e + this.m[13]), + (this.m[14] = + this.m[2] * t + this.m[6] * i + this.m[10] * e + this.m[14]), + (this.m[15] = + this.m[3] * t + this.m[7] * i + this.m[11] * e + this.m[15]); + }), + (R.prototype.scale = function (t, i, e) { + (this.m[0] *= t), + (this.m[4] *= i), + (this.m[8] *= e), + (this.m[1] *= t), + (this.m[5] *= i), + (this.m[9] *= e), + (this.m[2] *= t), + (this.m[6] *= i), + (this.m[10] *= e), + (this.m[3] *= t), + (this.m[7] *= i), + (this.m[11] *= e); + }), + (R.prototype.rotateX = function (t) { + var i = Lt.fcos(t), + e = Lt._$9(t), + r = this.m[4]; + (this.m[4] = r * i + this.m[8] * e), + (this.m[8] = r * -e + this.m[8] * i), + (r = this.m[5]), + (this.m[5] = r * i + this.m[9] * e), + (this.m[9] = r * -e + this.m[9] * i), + (r = this.m[6]), + (this.m[6] = r * i + this.m[10] * e), + (this.m[10] = r * -e + this.m[10] * i), + (r = this.m[7]), + (this.m[7] = r * i + this.m[11] * e), + (this.m[11] = r * -e + this.m[11] * i); + }), + (R.prototype.rotateY = function (t) { + var i = Lt.fcos(t), + e = Lt._$9(t), + r = this.m[0]; + (this.m[0] = r * i + this.m[8] * -e), + (this.m[8] = r * e + this.m[8] * i), + (r = this.m[1]), + (this.m[1] = r * i + this.m[9] * -e), + (this.m[9] = r * e + this.m[9] * i), + (r = m[2]), + (this.m[2] = r * i + this.m[10] * -e), + (this.m[10] = r * e + this.m[10] * i), + (r = m[3]), + (this.m[3] = r * i + this.m[11] * -e), + (this.m[11] = r * e + this.m[11] * i); + }), + (R.prototype.rotateZ = function (t) { + var i = Lt.fcos(t), + e = Lt._$9(t), + r = this.m[0]; + (this.m[0] = r * i + this.m[4] * e), + (this.m[4] = r * -e + this.m[4] * i), + (r = this.m[1]), + (this.m[1] = r * i + this.m[5] * e), + (this.m[5] = r * -e + this.m[5] * i), + (r = this.m[2]), + (this.m[2] = r * i + this.m[6] * e), + (this.m[6] = r * -e + this.m[6] * i), + (r = this.m[3]), + (this.m[3] = r * i + this.m[7] * e), + (this.m[7] = r * -e + this.m[7] * i); + }), + (b.prototype = new et()), + (b._$tP = new Object()), + (b._$27 = function () { + b._$tP.clear(); + }), + (b.getID = function (t) { + var i = b._$tP[t]; + return null == i && ((i = new b(t)), (b._$tP[t] = i)), i; + }), + (b.prototype._$3s = function () { + return new b(); + }), + (F._$kS = -1), + (F._$pS = 0), + (F._$hb = 1), + (F.STATE_IDENTITY = 0), + (F._$gb = 1), + (F._$fo = 2), + (F._$go = 4), + (F.prototype.transform = function (t, i, e) { + var r, + o, + n, + s, + _, + a, + h = 0, + l = 0; + switch (this._$hi) { + default: + return; + case F._$go | F._$fo | F._$gb: + for ( + r = this._$7, + o = this._$H, + n = this._$k, + s = this._$f, + _ = this._$g, + a = this._$w; + --e >= 0; + + ) { + var $ = t[h++], + u = t[h++]; + (i[l++] = r * $ + o * u + n), (i[l++] = s * $ + _ * u + a); + } + return; + case F._$go | F._$fo: + for ( + r = this._$7, o = this._$H, s = this._$f, _ = this._$g; + --e >= 0; + + ) { + var $ = t[h++], + u = t[h++]; + (i[l++] = r * $ + o * u), (i[l++] = s * $ + _ * u); + } + return; + case F._$go | F._$gb: + for ( + o = this._$H, n = this._$k, s = this._$f, a = this._$w; + --e >= 0; + + ) { + var $ = t[h++]; + (i[l++] = o * t[h++] + n), (i[l++] = s * $ + a); + } + return; + case F._$go: + for (o = this._$H, s = this._$f; --e >= 0; ) { + var $ = t[h++]; + (i[l++] = o * t[h++]), (i[l++] = s * $); + } + return; + case F._$fo | F._$gb: + for ( + r = this._$7, n = this._$k, _ = this._$g, a = this._$w; + --e >= 0; + + ) + (i[l++] = r * t[h++] + n), (i[l++] = _ * t[h++] + a); + return; + case F._$fo: + for (r = this._$7, _ = this._$g; --e >= 0; ) + (i[l++] = r * t[h++]), (i[l++] = _ * t[h++]); + return; + case F._$gb: + for (n = this._$k, a = this._$w; --e >= 0; ) + (i[l++] = t[h++] + n), (i[l++] = t[h++] + a); + return; + case F.STATE_IDENTITY: + return void ((t == i && h == l) || w._$jT(t, h, i, l, 2 * e)); + } + }), + (F.prototype.update = function () { + 0 == this._$H && 0 == this._$f + ? 1 == this._$7 && 1 == this._$g + ? 0 == this._$k && 0 == this._$w + ? ((this._$hi = F.STATE_IDENTITY), (this._$Z = F._$pS)) + : ((this._$hi = F._$gb), (this._$Z = F._$hb)) + : 0 == this._$k && 0 == this._$w + ? ((this._$hi = F._$fo), (this._$Z = F._$kS)) + : ((this._$hi = F._$fo | F._$gb), (this._$Z = F._$kS)) + : 0 == this._$7 && 0 == this._$g + ? 0 == this._$k && 0 == this._$w + ? ((this._$hi = F._$go), (this._$Z = F._$kS)) + : ((this._$hi = F._$go | F._$gb), (this._$Z = F._$kS)) + : 0 == this._$k && 0 == this._$w + ? ((this._$hi = F._$go | F._$fo), (this._$Z = F._$kS)) + : ((this._$hi = F._$go | F._$fo | F._$gb), (this._$Z = F._$kS)); + }), + (F.prototype._$RT = function (t) { + this._$IT(t); + var i = t[0], + e = t[2], + r = t[1], + o = t[3], + n = Math.sqrt(i * i + r * r), + s = i * o - e * r; + 0 == n + ? at._$so && console.log("affine._$RT() / rt==0") + : ((t[0] = n), + (t[1] = s / n), + (t[2] = (r * o + i * e) / s), + (t[3] = Math.atan2(r, i))); + }), + (F.prototype._$ho = function (t, i, e, r) { + var o = new Float32Array(6), + n = new Float32Array(6); + t._$RT(o), i._$RT(n); + var s = new Float32Array(6); + (s[0] = o[0] + (n[0] - o[0]) * e), + (s[1] = o[1] + (n[1] - o[1]) * e), + (s[2] = o[2] + (n[2] - o[2]) * e), + (s[3] = o[3] + (n[3] - o[3]) * e), + (s[4] = o[4] + (n[4] - o[4]) * e), + (s[5] = o[5] + (n[5] - o[5]) * e), + r._$CT(s); + }), + (F.prototype._$CT = function (t) { + var i = Math.cos(t[3]), + e = Math.sin(t[3]); + (this._$7 = t[0] * i), + (this._$f = t[0] * e), + (this._$H = t[1] * (t[2] * i - e)), + (this._$g = t[1] * (t[2] * e + i)), + (this._$k = t[4]), + (this._$w = t[5]), + this.update(); + }), + (F.prototype._$IT = function (t) { + (t[0] = this._$7), + (t[1] = this._$f), + (t[2] = this._$H), + (t[3] = this._$g), + (t[4] = this._$k), + (t[5] = this._$w); + }), + (C.prototype = new s()), + (C._$cs = "VISIBLE:"), + (C._$ar = "LAYOUT:"), + (C._$Co = 0), + (C._$D2 = []), + (C._$1T = 1), + (C.loadMotion = function (t) { + var i = new C(), + e = [0], + r = t.length; + i._$yT = 0; + for (var o = 0; o < r; ++o) { + var n = 255 & t[o]; + if ("\n" != n && "\r" != n) + if ("#" != n) + if ("$" != n) { + if ( + ("a" <= n && n <= "z") || + ("A" <= n && n <= "Z") || + "_" == n + ) { + for ( + var s = o, _ = -1; + o < r && "\r" != (n = 255 & t[o]) && "\n" != n; + ++o + ) + if ("=" == n) { + _ = o; + break; + } + if (_ >= 0) { + var a = new B(); + O.startsWith(t, s, C._$cs) + ? ((a._$RP = B._$hs), + (a._$4P = new String(t, s, _ - s))) + : O.startsWith(t, s, C._$ar) + ? ((a._$4P = new String(t, s + 7, _ - s - 7)), + O.startsWith(t, s + 7, "ANCHOR_X") + ? (a._$RP = B._$xs) + : O.startsWith(t, s + 7, "ANCHOR_Y") + ? (a._$RP = B._$us) + : O.startsWith(t, s + 7, "SCALE_X") + ? (a._$RP = B._$qs) + : O.startsWith(t, s + 7, "SCALE_Y") + ? (a._$RP = B._$Ys) + : O.startsWith(t, s + 7, "X") + ? (a._$RP = B._$ws) + : O.startsWith(t, s + 7, "Y") && + (a._$RP = B._$Ns)) + : ((a._$RP = B._$Fr), + (a._$4P = new String(t, s, _ - s))), + i.motions.push(a); + var h = 0; + for ( + C._$D2.clear(), o = _ + 1; + o < r && "\r" != (n = 255 & t[o]) && "\n" != n; + ++o + ) + if ("," != n && " " != n && "\t" != n) { + var l = O._$LS(t, r, o, e); + if (e[0] > 0) { + C._$D2.push(l), h++; + var $ = e[0]; + if ($ < o) { + console.log( + "_$n0 _$hi . @Live2DMotion loadMotion()\n" + ); + break; + } + o = $; + } + } + (a._$I0 = C._$D2._$BL()), h > i._$yT && (i._$yT = h); + } + } + } else { + for ( + var s = o, _ = -1; + o < r && "\r" != (n = 255 & t[o]) && "\n" != n; + ++o + ) + if ("=" == n) { + _ = o; + break; + } + var u = !1; + if (_ >= 0) + for ( + _ == s + 4 && + "f" == t[s + 1] && + "p" == t[s + 2] && + "s" == t[s + 3] && + (u = !0), + o = _ + 1; + o < r && "\r" != (n = 255 & t[o]) && "\n" != n; + ++o + ) + if ("," != n && " " != n && "\t" != n) { + var l = O._$LS(t, r, o, e); + e[0] > 0 && u && 5 < l && l < 121 && (i._$D0 = l), + (o = e[0]); + } + for (; o < r && "\n" != t[o] && "\r" != t[o]; ++o); + } + else for (; o < r && "\n" != t[o] && "\r" != t[o]; ++o); + } + return (i._$AS = ((1e3 * i._$yT) / i._$D0) | 0), i; + }), + (C.prototype.getDurationMSec = function () { + return this._$AS; + }), + (C.prototype.dump = function () { + for (var t = 0; t < this.motions.length; t++) { + var i = this.motions[t]; + console.log("_$wL[%s] [%d]. ", i._$4P, i._$I0.length); + for (var e = 0; e < i._$I0.length && e < 10; e++) + console.log("%5.2f ,", i._$I0[e]); + console.log("\n"); + } + }), + (C.prototype.updateParamExe = function (t, i, e, r) { + for ( + var o = i - r._$z2, + n = (o * this._$D0) / 1e3, + s = 0 | n, + _ = n - s, + a = 0; + a < this.motions.length; + a++ + ) { + var h = this.motions[a], + l = h._$I0.length, + $ = h._$4P; + if (h._$RP == B._$hs) { + var u = h._$I0[s >= l ? l - 1 : s]; + t.setParamFloat($, u); + } else if (B._$ws <= h._$RP && h._$RP <= B._$Ys); + else { + var p = t.getParamFloat($), + f = h._$I0[s >= l ? l - 1 : s], + c = h._$I0[s + 1 >= l ? l - 1 : s + 1], + d = f + (c - f) * _, + g = p + (d - p) * e; + t.setParamFloat($, g); + } + } + s >= this._$yT && + (this._$E + ? ((r._$z2 = i), this.loopFadeIn && (r._$bs = i)) + : (r._$9L = !0)); + }), + (C.prototype._$r0 = function () { + return this._$E; + }), + (C.prototype._$aL = function (t) { + this._$E = t; + }), + (C.prototype.isLoopFadeIn = function () { + return this.loopFadeIn; + }), + (C.prototype.setLoopFadeIn = function (t) { + this.loopFadeIn = t; + }), + (N.prototype.clear = function () { + this.size = 0; + }), + (N.prototype.add = function (t) { + if (this._$P.length <= this.size) { + var i = new Float32Array(2 * this.size); + w._$jT(this._$P, 0, i, 0, this.size), (this._$P = i); + } + this._$P[this.size++] = t; + }), + (N.prototype._$BL = function () { + var t = new Float32Array(this.size); + return w._$jT(this._$P, 0, t, 0, this.size), t; + }), + (B._$Fr = 0), + (B._$hs = 1), + (B._$ws = 100), + (B._$Ns = 101), + (B._$xs = 102), + (B._$us = 103), + (B._$qs = 104), + (B._$Ys = 105), + (U._$Ms = 1), + (U._$Qs = 2), + (U._$i2 = 0), + (U._$No = 2), + (U._$do = U._$Ms), + (U._$Ls = !0), + (U._$1r = 5), + (U._$Qb = 65), + (U._$J = 1e-4), + (U._$FT = 0.001), + (U._$Ss = 3), + (G._$o7 = 6), + (G._$S7 = 7), + (G._$s7 = 8), + (G._$77 = 9), + (G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 = 10), + (G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1 = 11), + (G._$T7 = G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1), + (G._$Is = -2004318072), + (G._$h0 = 0), + (G._$4L = 23), + (G._$7P = 33), + (G._$uT = function (t) { + console.log("_$bo :: _$6 _$mo _$E0 : %d\n", t); + }), + (G._$9o = function (t) { + if (t < 40) return G._$uT(t), null; + if (t < 50) return G._$uT(t), null; + if (t < 60) return G._$uT(t), null; + if (t < 100) + switch (t) { + case 65: + return new Z(); + case 66: + return new D(); + case 67: + return new x(); + case 68: + return new z(); + case 69: + return new P(); + case 70: + return new $t(); + default: + return G._$uT(t), null; + } + else if (t < 150) + switch (t) { + case 131: + return new st(); + case 133: + return new tt(); + case 136: + return new p(); + case 137: + return new ot(); + case 142: + return new j(); + } + return G._$uT(t), null; + }), + (Y._$HP = 0), + (Y._$_0 = !0); + (Y._$V2 = -1), + (Y._$W0 = -1), + (Y._$jr = !1), + (Y._$ZS = !0), + (Y._$tr = -1e6), + (Y._$lr = 1e6), + (Y._$is = 32), + (Y._$e = !1), + (Y.prototype.getDrawDataIndex = function (t) { + for (var i = this._$aS.length - 1; i >= 0; --i) + if (null != this._$aS[i] && this._$aS[i].getDrawDataID() == t) + return i; + return -1; + }), + (Y.prototype.getDrawData = function (t) { + if (t instanceof b) { + if (null == this._$Bo) { + this._$Bo = new Object(); + for (var i = this._$aS.length, e = 0; e < i; e++) { + var r = this._$aS[e], + o = r.getDrawDataID(); + null != o && (this._$Bo[o] = r); + } + } + return this._$Bo[id]; + } + return t < this._$aS.length ? this._$aS[t] : null; + }), + (Y.prototype.release = function () { + this._$3S.clear(), + this._$aS.clear(), + this._$F2.clear(), + null != this._$Bo && this._$Bo.clear(), + this._$db.clear(), + this._$8b.clear(), + this._$Hr.clear(); + }), + (Y.prototype.init = function () { + this._$co++, this._$F2.length > 0 && this.release(); + for ( + var t = this._$Ri.getModelImpl(), + i = t._$Xr(), + r = i.length, + o = new Array(), + n = new Array(), + s = 0; + s < r; + ++s + ) { + var _ = i[s]; + this._$F2.push(_), this._$Hr.push(_.init(this)); + for (var a = _.getBaseData(), h = a.length, l = 0; l < h; ++l) + o.push(a[l]); + for (var l = 0; l < h; ++l) { + var $ = a[l].init(this); + $._$l2(s), n.push($); + } + for (var u = _.getDrawData(), p = u.length, l = 0; l < p; ++l) { + var f = u[l], + c = f.init(this); + (c._$IP = s), this._$aS.push(f), this._$8b.push(c); + } + } + for (var d = o.length, g = yt._$2o(); ; ) { + for (var y = !1, s = 0; s < d; ++s) { + var m = o[s]; + if (null != m) { + var T = m.getTargetBaseDataID(); + (null == T || T == g || this.getBaseDataIndex(T) >= 0) && + (this._$3S.push(m), + this._$db.push(n[s]), + (o[s] = null), + (y = !0)); + } + } + if (!y) break; + } + var P = t._$E2(); + if (null != P) { + var S = P._$1s(); + if (null != S) + for (var v = S.length, s = 0; s < v; ++s) { + var L = S[s]; + null != L && + this._$02( + L.getParamID(), + L.getDefaultValue(), + L.getMinValue(), + L.getMaxValue() + ); + } + } + (this.clipManager = new e(this.dp_webgl)), + this.clipManager.init(this, this._$aS, this._$8b), + (this._$QT = !0); + }), + (Y.prototype.update = function () { + Y._$e && _.start("_$zL"); + for (var t = this._$_2.length, i = 0; i < t; i++) + this._$_2[i] != this._$vr[i] && + ((this._$Js[i] = Y._$ZS), (this._$vr[i] = this._$_2[i])); + var e = this._$3S.length, + r = this._$aS.length, + o = W._$or(), + n = W._$Pr(), + s = n - o + 1; + (null == this._$Ws || this._$Ws.length < s) && + ((this._$Ws = new Int16Array(s)), + (this._$Vs = new Int16Array(s))); + for (var i = 0; i < s; i++) + (this._$Ws[i] = Y._$V2), (this._$Vs[i] = Y._$V2); + (null == this._$Er || this._$Er.length < r) && + (this._$Er = new Int16Array(r)); + for (var i = 0; i < r; i++) this._$Er[i] = Y._$W0; + Y._$e && _.dump("_$zL"), Y._$e && _.start("_$UL"); + for (var a = null, h = 0; h < e; ++h) { + var l = this._$3S[h], + $ = this._$db[h]; + try { + l._$Nr(this, $), l._$2b(this, $); + } catch (t) { + null == a && (a = t); + } + } + null != a && Y._$_0 && _._$Rb(a), + Y._$e && _.dump("_$UL"), + Y._$e && _.start("_$DL"); + for (var u = null, p = 0; p < r; ++p) { + var f = this._$aS[p], + c = this._$8b[p]; + try { + if ((f._$Nr(this, c), c._$u2())) continue; + f._$2b(this, c); + var d, + g = Math.floor(f._$zS(this, c) - o); + try { + d = this._$Vs[g]; + } catch (t) { + console.log( + "_$li :: %s / %s \t\t\t\t@@_$fS\n", + t.toString(), + f.getDrawDataID().toString() + ), + (g = Math.floor(f._$zS(this, c) - o)); + continue; + } + d == Y._$V2 ? (this._$Ws[g] = p) : (this._$Er[d] = p), + (this._$Vs[g] = p); + } catch (t) { + null == u && ((u = t), at._$sT(at._$H7)); + } + } + null != u && Y._$_0 && _._$Rb(u), + Y._$e && _.dump("_$DL"), + Y._$e && _.start("_$eL"); + for (var i = this._$Js.length - 1; i >= 0; i--) + this._$Js[i] = Y._$jr; + return (this._$QT = !1), Y._$e && _.dump("_$eL"), !1; + }), + (Y.prototype.preDraw = function (t) { + null != this.clipManager && + (t._$ZT(), this.clipManager.setupClip(this, t)); + }), + (Y.prototype.draw = function (t) { + if (null == this._$Ws) + return void _._$li("call _$Ri.update() before _$Ri.draw() "); + var i = this._$Ws.length; + t._$ZT(); + for (var e = 0; e < i; ++e) { + var r = this._$Ws[e]; + if (r != Y._$V2) + for (;;) { + var o = this._$aS[r], + n = this._$8b[r]; + if (n._$yo()) { + var s = n._$IP, + a = this._$Hr[s]; + (n._$VS = a.getPartsOpacity()), o.draw(t, this, n); + } + var h = this._$Er[r]; + if (h <= r || h == Y._$W0) break; + r = h; + } + } + }), + (Y.prototype.getParamIndex = function (t) { + for (var i = this._$pb.length - 1; i >= 0; --i) + if (this._$pb[i] == t) return i; + return this._$02(t, 0, Y._$tr, Y._$lr); + }), + (Y.prototype._$BS = function (t) { + return this.getBaseDataIndex(t); + }), + (Y.prototype.getBaseDataIndex = function (t) { + for (var i = this._$3S.length - 1; i >= 0; --i) + if (null != this._$3S[i] && this._$3S[i].getBaseDataID() == t) + return i; + return -1; + }), + (Y.prototype._$UT = function (t, i) { + var e = new Float32Array(i); + return w._$jT(t, 0, e, 0, t.length), e; + }), + (Y.prototype._$02 = function (t, i, e, r) { + if (this._$qo >= this._$pb.length) { + var o = this._$pb.length, + n = new Array(2 * o); + w._$jT(this._$pb, 0, n, 0, o), + (this._$pb = n), + (this._$_2 = this._$UT(this._$_2, 2 * o)), + (this._$vr = this._$UT(this._$vr, 2 * o)), + (this._$Rr = this._$UT(this._$Rr, 2 * o)), + (this._$Or = this._$UT(this._$Or, 2 * o)); + var s = new Array(); + w._$jT(this._$Js, 0, s, 0, o), (this._$Js = s); + } + return ( + (this._$pb[this._$qo] = t), + (this._$_2[this._$qo] = i), + (this._$vr[this._$qo] = i), + (this._$Rr[this._$qo] = e), + (this._$Or[this._$qo] = r), + (this._$Js[this._$qo] = Y._$ZS), + this._$qo++ + ); + }), + (Y.prototype._$Zo = function (t, i) { + this._$3S[t] = i; + }), + (Y.prototype.setParamFloat = function (t, i) { + i < this._$Rr[t] && (i = this._$Rr[t]), + i > this._$Or[t] && (i = this._$Or[t]), + (this._$_2[t] = i); + }), + (Y.prototype.loadParam = function () { + var t = this._$_2.length; + t > this._$fs.length && (t = this._$fs.length), + w._$jT(this._$fs, 0, this._$_2, 0, t); + }), + (Y.prototype.saveParam = function () { + var t = this._$_2.length; + t > this._$fs.length && (this._$fs = new Float32Array(t)), + w._$jT(this._$_2, 0, this._$fs, 0, t); + }), + (Y.prototype._$v2 = function () { + return this._$co; + }), + (Y.prototype._$WS = function () { + return this._$QT; + }), + (Y.prototype._$Xb = function (t) { + return this._$Js[t] == Y._$ZS; + }), + (Y.prototype._$vs = function () { + return this._$Es; + }), + (Y.prototype._$Tr = function () { + return this._$ZP; + }), + (Y.prototype.getBaseData = function (t) { + return this._$3S[t]; + }), + (Y.prototype.getParamFloat = function (t) { + return this._$_2[t]; + }), + (Y.prototype.getParamMax = function (t) { + return this._$Or[t]; + }), + (Y.prototype.getParamMin = function (t) { + return this._$Rr[t]; + }), + (Y.prototype.setPartsOpacity = function (t, i) { + this._$Hr[t].setPartsOpacity(i); + }), + (Y.prototype.getPartsOpacity = function (t) { + return this._$Hr[t].getPartsOpacity(); + }), + (Y.prototype.getPartsDataIndex = function (t) { + for (var i = this._$F2.length - 1; i >= 0; --i) + if (null != this._$F2[i] && this._$F2[i]._$p2() == t) return i; + return -1; + }), + (Y.prototype._$q2 = function (t) { + return this._$db[t]; + }), + (Y.prototype._$C2 = function (t) { + return this._$8b[t]; + }), + (Y.prototype._$Bb = function (t) { + return this._$Hr[t]; + }), + (Y.prototype._$5s = function (t, i) { + for (var e = this._$Ws.length, r = t, o = 0; o < e; ++o) { + var n = this._$Ws[o]; + if (n != Y._$V2) + for (;;) { + var s = this._$8b[n]; + s._$yo() && (s._$GT()._$B2(this, s, r), (r += i)); + var _ = this._$Er[n]; + if (_ <= n || _ == Y._$W0) break; + n = _; + } + } + }), + (Y.prototype.setDrawParam = function (t) { + this.dp_webgl = t; + }), + (Y.prototype.getDrawParam = function () { + return this.dp_webgl; + }), + (k._$0T = function (t) { + return k._$0T(new _$5(t)); + }), + (k._$0T = function (t) { + if (!t.exists()) throw new _$ls(t._$3b()); + for ( + var i, + e = t.length(), + r = new Int8Array(e), + o = new _$Xs(new _$kb(t), 8192), + n = 0; + (i = o.read(r, n, e - n)) > 0; + + ) + n += i; + return r; + }), + (k._$C = function (t) { + var i = null, + e = null; + try { + (i = t instanceof Array ? t : new _$Xs(t, 8192)), + (e = new _$js()); + for (var r, o = new Int8Array(1e3); (r = i.read(o)) > 0; ) + e.write(o, 0, r); + return e._$TS(); + } finally { + null != t && t.close(), null != e && (e.flush(), e.close()); + } + }), + (V.prototype._$T2 = function () { + return w.getUserTimeMSec() + Math._$10() * (2 * this._$Br - 1); + }), + (V.prototype._$uo = function (t) { + this._$Br = t; + }), + (V.prototype._$QS = function (t, i, e) { + (this._$Dr = t), (this._$Cb = i), (this._$mr = e); + }), + (V.prototype._$7T = function (t) { + var i, + e = w.getUserTimeMSec(), + r = 0; + switch (this._$_L) { + case STATE_CLOSING: + (r = (e - this._$bb) / this._$Dr), + r >= 1 && + ((r = 1), (this._$_L = wt.STATE_CLOSED), (this._$bb = e)), + (i = 1 - r); + break; + case STATE_CLOSED: + (r = (e - this._$bb) / this._$Cb), + r >= 1 && ((this._$_L = wt.STATE_OPENING), (this._$bb = e)), + (i = 0); + break; + case STATE_OPENING: + (r = (e - this._$bb) / this._$mr), + r >= 1 && + ((r = 1), + (this._$_L = wt.STATE_INTERVAL), + (this._$12 = this._$T2())), + (i = r); + break; + case STATE_INTERVAL: + this._$12 < e && + ((this._$_L = wt.STATE_CLOSING), (this._$bb = e)), + (i = 1); + break; + case STATE_FIRST: + default: + (this._$_L = wt.STATE_INTERVAL), + (this._$12 = this._$T2()), + (i = 1); + } + this._$jo || (i = -i), + t.setParamFloat(this._$iL, i), + t.setParamFloat(this._$0L, i); + }); + var wt = function () {}; + (wt.STATE_FIRST = "STATE_FIRST"), + (wt.STATE_INTERVAL = "STATE_INTERVAL"), + (wt.STATE_CLOSING = "STATE_CLOSING"), + (wt.STATE_CLOSED = "STATE_CLOSED"), + (wt.STATE_OPENING = "STATE_OPENING"), + (X.prototype = new E()), + (X._$As = 32), + (X._$Gr = !1), + (X._$NT = null), + (X._$vS = null), + (X._$no = null), + (X._$9r = function (t) { + return new Float32Array(t); + }), + (X._$vb = function (t) { + return new Int16Array(t); + }), + (X._$cr = function (t, i) { + return ( + null == t || t._$yL() < i.length + ? ((t = X._$9r(2 * i.length)), t.put(i), t._$oT(0)) + : (t.clear(), t.put(i), t._$oT(0)), + t + ); + }), + (X._$mb = function (t, i) { + return ( + null == t || t._$yL() < i.length + ? ((t = X._$vb(2 * i.length)), t.put(i), t._$oT(0)) + : (t.clear(), t.put(i), t._$oT(0)), + t + ); + }), + (X._$Hs = function () { + return X._$Gr; + }), + (X._$as = function (t) { + X._$Gr = t; + }), + (X.prototype.setGL = function (t) { + this.gl = t; + }), + (X.prototype.setTransform = function (t) { + this.transform = t; + }), + (X.prototype._$ZT = function () {}), + (X.prototype._$Uo = function (t, i, e, r, o, n, s, _) { + if (!(n < 0.01)) { + var a = this._$U2[t], + h = n > 0.9 ? at.EXPAND_W : 0; + this.gl.drawElements(a, e, r, o, n, h, this.transform, _); + } + }), + (X.prototype._$Rs = function () { + throw new Error("_$Rs"); + }), + (X.prototype._$Ds = function (t) { + throw new Error("_$Ds"); + }), + (X.prototype._$K2 = function () { + for (var t = 0; t < this._$sb.length; t++) { + 0 != this._$sb[t] && + (this.gl._$Sr(1, this._$sb, t), (this._$sb[t] = 0)); + } + }), + (X.prototype.setTexture = function (t, i) { + this._$sb.length < t + 1 && this._$nS(t), (this._$sb[t] = i); + }), + (X.prototype.setTexture = function (t, i) { + this._$sb.length < t + 1 && this._$nS(t), (this._$U2[t] = i); + }), + (X.prototype._$nS = function (t) { + var i = Math.max(2 * this._$sb.length, t + 1 + 10), + e = new Int32Array(i); + w._$jT(this._$sb, 0, e, 0, this._$sb.length), (this._$sb = e); + var r = new Array(); + w._$jT(this._$U2, 0, r, 0, this._$U2.length), (this._$U2 = r); + }), + (z.prototype = new I()), + (z._$Xo = new Float32Array(2)), + (z._$io = new Float32Array(2)), + (z._$0o = new Float32Array(2)), + (z._$Lo = new Float32Array(2)), + (z._$To = new Float32Array(2)), + (z._$Po = new Float32Array(2)), + (z._$gT = new Array()), + (z.prototype._$zP = function () { + (this._$GS = new D()), this._$GS._$zP(), (this._$Y0 = new Array()); + }), + (z.prototype.getType = function () { + return I._$c2; + }), + (z.prototype._$F0 = function (t) { + I.prototype._$F0.call(this, t), + (this._$GS = t._$nP()), + (this._$Y0 = t._$nP()), + I.prototype.readV2_opacity.call(this, t); + }), + (z.prototype.init = function (t) { + var i = new H(this); + return (i._$Yr = new P()), this._$32() && (i._$Wr = new P()), i; + }), + (z.prototype._$Nr = function (t, i) { + this != i._$GT() && console.log("### assert!! ### "); + var e = i; + if (this._$GS._$Ur(t)) { + var r = z._$gT; + r[0] = !1; + var o = this._$GS._$Q2(t, r); + i._$Ib(r[0]), this.interpolateOpacity(t, this._$GS, i, r); + var n = t._$vs(), + s = t._$Tr(); + if ((this._$GS._$zr(n, s, o), o <= 0)) { + var _ = this._$Y0[n[0]]; + e._$Yr.init(_); + } else if (1 == o) { + var _ = this._$Y0[n[0]], + a = this._$Y0[n[1]], + h = s[0]; + (e._$Yr._$fL = _._$fL + (a._$fL - _._$fL) * h), + (e._$Yr._$gL = _._$gL + (a._$gL - _._$gL) * h), + (e._$Yr._$B0 = _._$B0 + (a._$B0 - _._$B0) * h), + (e._$Yr._$z0 = _._$z0 + (a._$z0 - _._$z0) * h), + (e._$Yr._$qT = _._$qT + (a._$qT - _._$qT) * h); + } else if (2 == o) { + var _ = this._$Y0[n[0]], + a = this._$Y0[n[1]], + l = this._$Y0[n[2]], + $ = this._$Y0[n[3]], + h = s[0], + u = s[1], + p = _._$fL + (a._$fL - _._$fL) * h, + f = l._$fL + ($._$fL - l._$fL) * h; + (e._$Yr._$fL = p + (f - p) * u), + (p = _._$gL + (a._$gL - _._$gL) * h), + (f = l._$gL + ($._$gL - l._$gL) * h), + (e._$Yr._$gL = p + (f - p) * u), + (p = _._$B0 + (a._$B0 - _._$B0) * h), + (f = l._$B0 + ($._$B0 - l._$B0) * h), + (e._$Yr._$B0 = p + (f - p) * u), + (p = _._$z0 + (a._$z0 - _._$z0) * h), + (f = l._$z0 + ($._$z0 - l._$z0) * h), + (e._$Yr._$z0 = p + (f - p) * u), + (p = _._$qT + (a._$qT - _._$qT) * h), + (f = l._$qT + ($._$qT - l._$qT) * h), + (e._$Yr._$qT = p + (f - p) * u); + } else if (3 == o) { + var c = this._$Y0[n[0]], + d = this._$Y0[n[1]], + g = this._$Y0[n[2]], + y = this._$Y0[n[3]], + m = this._$Y0[n[4]], + T = this._$Y0[n[5]], + P = this._$Y0[n[6]], + S = this._$Y0[n[7]], + h = s[0], + u = s[1], + v = s[2], + p = c._$fL + (d._$fL - c._$fL) * h, + f = g._$fL + (y._$fL - g._$fL) * h, + L = m._$fL + (T._$fL - m._$fL) * h, + M = P._$fL + (S._$fL - P._$fL) * h; + (e._$Yr._$fL = + (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), + (p = c._$gL + (d._$gL - c._$gL) * h), + (f = g._$gL + (y._$gL - g._$gL) * h), + (L = m._$gL + (T._$gL - m._$gL) * h), + (M = P._$gL + (S._$gL - P._$gL) * h), + (e._$Yr._$gL = + (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), + (p = c._$B0 + (d._$B0 - c._$B0) * h), + (f = g._$B0 + (y._$B0 - g._$B0) * h), + (L = m._$B0 + (T._$B0 - m._$B0) * h), + (M = P._$B0 + (S._$B0 - P._$B0) * h), + (e._$Yr._$B0 = + (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), + (p = c._$z0 + (d._$z0 - c._$z0) * h), + (f = g._$z0 + (y._$z0 - g._$z0) * h), + (L = m._$z0 + (T._$z0 - m._$z0) * h), + (M = P._$z0 + (S._$z0 - P._$z0) * h), + (e._$Yr._$z0 = + (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), + (p = c._$qT + (d._$qT - c._$qT) * h), + (f = g._$qT + (y._$qT - g._$qT) * h), + (L = m._$qT + (T._$qT - m._$qT) * h), + (M = P._$qT + (S._$qT - P._$qT) * h), + (e._$Yr._$qT = + (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)); + } else if (4 == o) { + var E = this._$Y0[n[0]], + A = this._$Y0[n[1]], + I = this._$Y0[n[2]], + w = this._$Y0[n[3]], + x = this._$Y0[n[4]], + O = this._$Y0[n[5]], + D = this._$Y0[n[6]], + R = this._$Y0[n[7]], + b = this._$Y0[n[8]], + F = this._$Y0[n[9]], + C = this._$Y0[n[10]], + N = this._$Y0[n[11]], + B = this._$Y0[n[12]], + U = this._$Y0[n[13]], + G = this._$Y0[n[14]], + Y = this._$Y0[n[15]], + h = s[0], + u = s[1], + v = s[2], + k = s[3], + p = E._$fL + (A._$fL - E._$fL) * h, + f = I._$fL + (w._$fL - I._$fL) * h, + L = x._$fL + (O._$fL - x._$fL) * h, + M = D._$fL + (R._$fL - D._$fL) * h, + V = b._$fL + (F._$fL - b._$fL) * h, + X = C._$fL + (N._$fL - C._$fL) * h, + H = B._$fL + (U._$fL - B._$fL) * h, + W = G._$fL + (Y._$fL - G._$fL) * h; + (e._$Yr._$fL = + (1 - k) * + ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), + (p = E._$gL + (A._$gL - E._$gL) * h), + (f = I._$gL + (w._$gL - I._$gL) * h), + (L = x._$gL + (O._$gL - x._$gL) * h), + (M = D._$gL + (R._$gL - D._$gL) * h), + (V = b._$gL + (F._$gL - b._$gL) * h), + (X = C._$gL + (N._$gL - C._$gL) * h), + (H = B._$gL + (U._$gL - B._$gL) * h), + (W = G._$gL + (Y._$gL - G._$gL) * h), + (e._$Yr._$gL = + (1 - k) * + ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), + (p = E._$B0 + (A._$B0 - E._$B0) * h), + (f = I._$B0 + (w._$B0 - I._$B0) * h), + (L = x._$B0 + (O._$B0 - x._$B0) * h), + (M = D._$B0 + (R._$B0 - D._$B0) * h), + (V = b._$B0 + (F._$B0 - b._$B0) * h), + (X = C._$B0 + (N._$B0 - C._$B0) * h), + (H = B._$B0 + (U._$B0 - B._$B0) * h), + (W = G._$B0 + (Y._$B0 - G._$B0) * h), + (e._$Yr._$B0 = + (1 - k) * + ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), + (p = E._$z0 + (A._$z0 - E._$z0) * h), + (f = I._$z0 + (w._$z0 - I._$z0) * h), + (L = x._$z0 + (O._$z0 - x._$z0) * h), + (M = D._$z0 + (R._$z0 - D._$z0) * h), + (V = b._$z0 + (F._$z0 - b._$z0) * h), + (X = C._$z0 + (N._$z0 - C._$z0) * h), + (H = B._$z0 + (U._$z0 - B._$z0) * h), + (W = G._$z0 + (Y._$z0 - G._$z0) * h), + (e._$Yr._$z0 = + (1 - k) * + ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), + (p = E._$qT + (A._$qT - E._$qT) * h), + (f = I._$qT + (w._$qT - I._$qT) * h), + (L = x._$qT + (O._$qT - x._$qT) * h), + (M = D._$qT + (R._$qT - D._$qT) * h), + (V = b._$qT + (F._$qT - b._$qT) * h), + (X = C._$qT + (N._$qT - C._$qT) * h), + (H = B._$qT + (U._$qT - B._$qT) * h), + (W = G._$qT + (Y._$qT - G._$qT) * h), + (e._$Yr._$qT = + (1 - k) * + ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + + k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))); + } else { + for ( + var j = 0 | Math.pow(2, o), q = new Float32Array(j), J = 0; + J < j; + J++ + ) { + for (var Q = J, Z = 1, K = 0; K < o; K++) + (Z *= Q % 2 == 0 ? 1 - s[K] : s[K]), (Q /= 2); + q[J] = Z; + } + for (var tt = new Array(), it = 0; it < j; it++) + tt[it] = this._$Y0[n[it]]; + for ( + var et = 0, rt = 0, ot = 0, nt = 0, st = 0, it = 0; + it < j; + it++ + ) + (et += q[it] * tt[it]._$fL), + (rt += q[it] * tt[it]._$gL), + (ot += q[it] * tt[it]._$B0), + (nt += q[it] * tt[it]._$z0), + (st += q[it] * tt[it]._$qT); + (e._$Yr._$fL = et), + (e._$Yr._$gL = rt), + (e._$Yr._$B0 = ot), + (e._$Yr._$z0 = nt), + (e._$Yr._$qT = st); + } + var _ = this._$Y0[n[0]]; + (e._$Yr.reflectX = _.reflectX), (e._$Yr.reflectY = _.reflectY); + } + }), + (z.prototype._$2b = function (t, i) { + this != i._$GT() && console.log("### assert!! ### "); + var e = i; + if ((e._$hS(!0), this._$32())) { + var r = this.getTargetBaseDataID(); + if ( + (e._$8r == I._$ur && (e._$8r = t.getBaseDataIndex(r)), + e._$8r < 0) + ) + at._$so && _._$li("_$L _$0P _$G :: %s", r), e._$hS(!1); + else { + var o = t.getBaseData(e._$8r); + if (null != o) { + var n = t._$q2(e._$8r), + s = z._$Xo; + (s[0] = e._$Yr._$fL), (s[1] = e._$Yr._$gL); + var a = z._$io; + (a[0] = 0), (a[1] = -0.1); + n._$GT().getType() == I._$c2 ? (a[1] = -10) : (a[1] = -0.1); + var h = z._$0o; + this._$Jr(t, o, n, s, a, h); + var l = Lt._$92(a, h); + o._$nb(t, n, s, s, 1, 0, 2), + (e._$Wr._$fL = s[0]), + (e._$Wr._$gL = s[1]), + (e._$Wr._$B0 = e._$Yr._$B0), + (e._$Wr._$z0 = e._$Yr._$z0), + (e._$Wr._$qT = e._$Yr._$qT - l * Lt._$NS); + var $ = n.getTotalScale(); + e.setTotalScale_notForClient($ * e._$Wr._$B0); + var u = n.getTotalOpacity(); + e.setTotalOpacity(u * e.getInterpolatedOpacity()), + (e._$Wr.reflectX = e._$Yr.reflectX), + (e._$Wr.reflectY = e._$Yr.reflectY), + e._$hS(n._$yo()); + } else e._$hS(!1); + } + } else + e.setTotalScale_notForClient(e._$Yr._$B0), + e.setTotalOpacity(e.getInterpolatedOpacity()); + }), + (z.prototype._$nb = function (t, i, e, r, o, n, s) { + this != i._$GT() && console.log("### assert!! ### "); + for ( + var _, + a, + h = i, + l = null != h._$Wr ? h._$Wr : h._$Yr, + $ = Math.sin(Lt._$bS * l._$qT), + u = Math.cos(Lt._$bS * l._$qT), + p = h.getTotalScale(), + f = l.reflectX ? -1 : 1, + c = l.reflectY ? -1 : 1, + d = u * p * f, + g = -$ * p * c, + y = $ * p * f, + m = u * p * c, + T = l._$fL, + P = l._$gL, + S = o * s, + v = n; + v < S; + v += s + ) + (_ = e[v]), + (a = e[v + 1]), + (r[v] = d * _ + g * a + T), + (r[v + 1] = y * _ + m * a + P); + }), + (z.prototype._$Jr = function (t, i, e, r, o, n) { + i != e._$GT() && console.log("### assert!! ### "); + var s = z._$Lo; + (z._$Lo[0] = r[0]), (z._$Lo[1] = r[1]), i._$nb(t, e, s, s, 1, 0, 2); + for (var _ = z._$To, a = z._$Po, h = 1, l = 0; l < 10; l++) { + if ( + ((a[0] = r[0] + h * o[0]), + (a[1] = r[1] + h * o[1]), + i._$nb(t, e, a, _, 1, 0, 2), + (_[0] -= s[0]), + (_[1] -= s[1]), + 0 != _[0] || 0 != _[1]) + ) + return (n[0] = _[0]), void (n[1] = _[1]); + if ( + ((a[0] = r[0] - h * o[0]), + (a[1] = r[1] - h * o[1]), + i._$nb(t, e, a, _, 1, 0, 2), + (_[0] -= s[0]), + (_[1] -= s[1]), + 0 != _[0] || 0 != _[1]) + ) + return ( + (_[0] = -_[0]), + (_[0] = -_[0]), + (n[0] = _[0]), + void (n[1] = _[1]) + ); + h *= 0.1; + } + at._$so && console.log("_$L0 to transform _$SP\n"); + }), + (H.prototype = new _t()), + (W.prototype = new M()), + (W._$ur = -2), + (W._$ES = 500), + (W._$wb = 2), + (W._$8S = 3), + (W._$os = 4), + (W._$52 = W._$ES), + (W._$R2 = W._$ES), + (W._$Sb = function (t) { + for (var i = t.length - 1; i >= 0; --i) { + var e = t[i]; + e < W._$52 ? (W._$52 = e) : e > W._$R2 && (W._$R2 = e); + } + }), + (W._$or = function () { + return W._$52; + }), + (W._$Pr = function () { + return W._$R2; + }), + (W.prototype._$F0 = function (t) { + (this._$gP = t._$nP()), + (this._$dr = t._$nP()), + (this._$GS = t._$nP()), + (this._$qb = t._$6L()), + (this._$Lb = t._$cS()), + (this._$mS = t._$Tb()), + t.getFormatVersion() >= G._$T7 + ? ((this.clipID = t._$nP()), + (this.clipIDList = this.convertClipIDForV2_11(this.clipID))) + : (this.clipIDList = null), + W._$Sb(this._$Lb); + }), + (W.prototype.getClipIDList = function () { + return this.clipIDList; + }), + (W.prototype._$Nr = function (t, i) { + if ( + ((i._$IS[0] = !1), + (i._$Us = v._$Z2(t, this._$GS, i._$IS, this._$Lb)), + at._$Zs) + ); + else if (i._$IS[0]) return; + i._$7s = v._$br(t, this._$GS, i._$IS, this._$mS); + }), + (W.prototype._$2b = function (t) {}), + (W.prototype.getDrawDataID = function () { + return this._$gP; + }), + (W.prototype._$j2 = function (t) { + this._$gP = t; + }), + (W.prototype.getOpacity = function (t, i) { + return i._$7s; + }), + (W.prototype._$zS = function (t, i) { + return i._$Us; + }), + (W.prototype.getTargetBaseDataID = function () { + return this._$dr; + }), + (W.prototype._$gs = function (t) { + this._$dr = t; + }), + (W.prototype._$32 = function () { + return null != this._$dr && this._$dr != yt._$2o(); + }), + (W.prototype.getType = function () {}), + (j._$42 = 0), + (j.prototype._$1b = function () { + return this._$3S; + }), + (j.prototype.getDrawDataList = function () { + return this._$aS; + }), + (j.prototype._$F0 = function (t) { + (this._$NL = t._$nP()), + (this._$aS = t._$nP()), + (this._$3S = t._$nP()); + }), + (j.prototype._$kr = function (t) { + t._$Zo(this._$3S), + t._$xo(this._$aS), + (this._$3S = null), + (this._$aS = null); + }), + (q.prototype = new i()), + (q.loadModel = function (t) { + var e = new q(); + return i._$62(e, t), e; + }), + (q.loadModel = function (t) { + var e = new q(); + return i._$62(e, t), e; + }), + (q._$to = function () { + return new q(); + }), + (q._$er = function (t) { + var i = new _$5("../_$_r/_$t0/_$Ri/_$_P._$d"); + if (0 == i.exists()) + throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + i._$PL()); + for ( + var e = [ + "../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1", + ], + r = q.loadModel(i._$3b()), + o = 0; + o < e.length; + o++ + ) { + var n = new _$5(e[o]); + if (0 == n.exists()) + throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + n._$PL()); + r.setTexture(o, _$nL._$_o(t, n._$3b())); + } + return r; + }), + (q.prototype.setGL = function (t) { + this._$zo.setGL(t); + }), + (q.prototype.setTransform = function (t) { + this._$zo.setTransform(t); + }), + (q.prototype.draw = function () { + this._$5S.draw(this._$zo); + }), + (q.prototype._$K2 = function () { + this._$zo._$K2(); + }), + (q.prototype.setTexture = function (t, i) { + null == this._$zo && + _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), + this._$zo.setTexture(t, i); + }), + (q.prototype.setTexture = function (t, i) { + null == this._$zo && + _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), + this._$zo.setTexture(t, i); + }), + (q.prototype._$Rs = function () { + return this._$zo._$Rs(); + }), + (q.prototype._$Ds = function (t) { + this._$zo._$Ds(t); + }), + (q.prototype.getDrawParam = function () { + return this._$zo; + }), + (J.prototype = new s()), + (J._$cs = "VISIBLE:"), + (J._$ar = "LAYOUT:"), + (J.MTN_PREFIX_FADEIN = "FADEIN:"), + (J.MTN_PREFIX_FADEOUT = "FADEOUT:"), + (J._$Co = 0), + (J._$1T = 1), + (J.loadMotion = function (t) { + var i = k._$C(t); + return J.loadMotion(i); + }), + (J.loadMotion = function (t) { + t instanceof ArrayBuffer && (t = new DataView(t)); + var i = new J(), + e = [0], + r = t.byteLength; + i._$yT = 0; + for (var o = 0; o < r; ++o) { + var n = Q(t, o), + s = n.charCodeAt(0); + if ("\n" != n && "\r" != n) + if ("#" != n) + if ("$" != n) { + if ( + (97 <= s && s <= 122) || + (65 <= s && s <= 90) || + "_" == n + ) { + for ( + var _ = o, a = -1; + o < r && "\r" != (n = Q(t, o)) && "\n" != n; + ++o + ) + if ("=" == n) { + a = o; + break; + } + if (a >= 0) { + var h = new B(); + O.startsWith(t, _, J._$cs) + ? ((h._$RP = B._$hs), + (h._$4P = O.createString(t, _, a - _))) + : O.startsWith(t, _, J._$ar) + ? ((h._$4P = O.createString(t, _ + 7, a - _ - 7)), + O.startsWith(t, _ + 7, "ANCHOR_X") + ? (h._$RP = B._$xs) + : O.startsWith(t, _ + 7, "ANCHOR_Y") + ? (h._$RP = B._$us) + : O.startsWith(t, _ + 7, "SCALE_X") + ? (h._$RP = B._$qs) + : O.startsWith(t, _ + 7, "SCALE_Y") + ? (h._$RP = B._$Ys) + : O.startsWith(t, _ + 7, "X") + ? (h._$RP = B._$ws) + : O.startsWith(t, _ + 7, "Y") && + (h._$RP = B._$Ns)) + : ((h._$RP = B._$Fr), + (h._$4P = O.createString(t, _, a - _))), + i.motions.push(h); + var l = 0, + $ = []; + for ( + o = a + 1; + o < r && "\r" != (n = Q(t, o)) && "\n" != n; + ++o + ) + if ("," != n && " " != n && "\t" != n) { + var u = O._$LS(t, r, o, e); + if (e[0] > 0) { + $.push(u), l++; + var p = e[0]; + if (p < o) { + console.log( + "_$n0 _$hi . @Live2DMotion loadMotion()\n" + ); + break; + } + o = p - 1; + } + } + (h._$I0 = new Float32Array($)), + l > i._$yT && (i._$yT = l); + } + } + } else { + for ( + var _ = o, a = -1; + o < r && "\r" != (n = Q(t, o)) && "\n" != n; + ++o + ) + if ("=" == n) { + a = o; + break; + } + var f = !1; + if (a >= 0) + for ( + a == _ + 4 && + "f" == Q(t, _ + 1) && + "p" == Q(t, _ + 2) && + "s" == Q(t, _ + 3) && + (f = !0), + o = a + 1; + o < r && "\r" != (n = Q(t, o)) && "\n" != n; + ++o + ) + if ("," != n && " " != n && "\t" != n) { + var u = O._$LS(t, r, o, e); + e[0] > 0 && f && 5 < u && u < 121 && (i._$D0 = u), + (o = e[0]); + } + for (; o < r && "\n" != Q(t, o) && "\r" != Q(t, o); ++o); + } + else for (; o < r && "\n" != Q(t, o) && "\r" != Q(t, o); ++o); + } + return (i._$rr = ((1e3 * i._$yT) / i._$D0) | 0), i; + }), + (J.prototype.getDurationMSec = function () { + return this._$E ? -1 : this._$rr; + }), + (J.prototype.getLoopDurationMSec = function () { + return this._$rr; + }), + (J.prototype.dump = function () { + for (var t = 0; t < this.motions.length; t++) { + var i = this.motions[t]; + console.log("_$wL[%s] [%d]. ", i._$4P, i._$I0.length); + for (var e = 0; e < i._$I0.length && e < 10; e++) + console.log("%5.2f ,", i._$I0[e]); + console.log("\n"); + } + }), + (J.prototype.updateParamExe = function (t, i, e, r) { + for ( + var o = i - r._$z2, + n = (o * this._$D0) / 1e3, + s = 0 | n, + _ = n - s, + a = 0; + a < this.motions.length; + a++ + ) { + var h = this.motions[a], + l = h._$I0.length, + $ = h._$4P; + if (h._$RP == B._$hs) { + var u = h._$I0[s >= l ? l - 1 : s]; + t.setParamFloat($, u); + } else if (B._$ws <= h._$RP && h._$RP <= B._$Ys); + else { + var p, + f = t.getParamIndex($), + c = t.getModelContext(), + d = c.getParamMax(f), + g = c.getParamMin(f), + y = 0.4 * (d - g), + m = c.getParamFloat(f), + T = h._$I0[s >= l ? l - 1 : s], + P = h._$I0[s + 1 >= l ? l - 1 : s + 1]; + p = + (T < P && P - T > y) || (T > P && T - P > y) + ? T + : T + (P - T) * _; + var S = m + (p - m) * e; + t.setParamFloat($, S); + } + } + s >= this._$yT && + (this._$E + ? ((r._$z2 = i), this.loopFadeIn && (r._$bs = i)) + : (r._$9L = !0)), + (this._$eP = e); + }), + (J.prototype._$r0 = function () { + return this._$E; + }), + (J.prototype._$aL = function (t) { + this._$E = t; + }), + (J.prototype._$S0 = function () { + return this._$D0; + }), + (J.prototype._$U0 = function (t) { + this._$D0 = t; + }), + (J.prototype.isLoopFadeIn = function () { + return this.loopFadeIn; + }), + (J.prototype.setLoopFadeIn = function (t) { + this.loopFadeIn = t; + }), + (N.prototype.clear = function () { + this.size = 0; + }), + (N.prototype.add = function (t) { + if (this._$P.length <= this.size) { + var i = new Float32Array(2 * this.size); + w._$jT(this._$P, 0, i, 0, this.size), (this._$P = i); + } + this._$P[this.size++] = t; + }), + (N.prototype._$BL = function () { + var t = new Float32Array(this.size); + return w._$jT(this._$P, 0, t, 0, this.size), t; + }), + (B._$Fr = 0), + (B._$hs = 1), + (B._$ws = 100), + (B._$Ns = 101), + (B._$xs = 102), + (B._$us = 103), + (B._$qs = 104), + (B._$Ys = 105), + (Z.prototype = new I()), + (Z._$gT = new Array()), + (Z.prototype._$zP = function () { + (this._$GS = new D()), this._$GS._$zP(); + }), + (Z.prototype._$F0 = function (t) { + I.prototype._$F0.call(this, t), + (this._$A = t._$6L()), + (this._$o = t._$6L()), + (this._$GS = t._$nP()), + (this._$Eo = t._$nP()), + I.prototype.readV2_opacity.call(this, t); + }), + (Z.prototype.init = function (t) { + var i = new K(this), + e = (this._$o + 1) * (this._$A + 1); + return ( + null != i._$Cr && (i._$Cr = null), + (i._$Cr = new Float32Array(2 * e)), + null != i._$hr && (i._$hr = null), + this._$32() + ? (i._$hr = new Float32Array(2 * e)) + : (i._$hr = null), + i + ); + }), + (Z.prototype._$Nr = function (t, i) { + var e = i; + if (this._$GS._$Ur(t)) { + var r = this._$VT(), + o = Z._$gT; + (o[0] = !1), + v._$Vr(t, this._$GS, o, r, this._$Eo, e._$Cr, 0, 2), + i._$Ib(o[0]), + this.interpolateOpacity(t, this._$GS, i, o); + } + }), + (Z.prototype._$2b = function (t, i) { + var e = i; + if ((e._$hS(!0), this._$32())) { + var r = this.getTargetBaseDataID(); + if ( + (e._$8r == I._$ur && (e._$8r = t.getBaseDataIndex(r)), + e._$8r < 0) + ) + at._$so && _._$li("_$L _$0P _$G :: %s", r), e._$hS(!1); + else { + var o = t.getBaseData(e._$8r), + n = t._$q2(e._$8r); + if (null != o && n._$yo()) { + var s = n.getTotalScale(); + e.setTotalScale_notForClient(s); + var a = n.getTotalOpacity(); + e.setTotalOpacity(a * e.getInterpolatedOpacity()), + o._$nb(t, n, e._$Cr, e._$hr, this._$VT(), 0, 2), + e._$hS(!0); + } else e._$hS(!1); + } + } else e.setTotalOpacity(e.getInterpolatedOpacity()); + }), + (Z.prototype._$nb = function (t, i, e, r, o, n, s) { + var _ = i, + a = null != _._$hr ? _._$hr : _._$Cr; + Z.transformPoints_sdk2(e, r, o, n, s, a, this._$o, this._$A); + }), + (Z.transformPoints_sdk2 = function (i, e, r, o, n, s, _, a) { + for ( + var h, + l, + $, + u = r * n, + p = 0, + f = 0, + c = 0, + d = 0, + g = 0, + y = 0, + m = !1, + T = o; + T < u; + T += n + ) { + var P, S, v, L; + if ( + ((v = i[T]), + (L = i[T + 1]), + (P = v * _), + (S = L * a), + P < 0 || S < 0 || _ <= P || a <= S) + ) { + var M = _ + 1; + if (!m) { + (m = !0), + (p = + 0.25 * + (s[2 * (0 + 0 * M)] + + s[2 * (_ + 0 * M)] + + s[2 * (0 + a * M)] + + s[2 * (_ + a * M)])), + (f = + 0.25 * + (s[2 * (0 + 0 * M) + 1] + + s[2 * (_ + 0 * M) + 1] + + s[2 * (0 + a * M) + 1] + + s[2 * (_ + a * M) + 1])); + var E = s[2 * (_ + a * M)] - s[2 * (0 + 0 * M)], + A = s[2 * (_ + a * M) + 1] - s[2 * (0 + 0 * M) + 1], + I = s[2 * (_ + 0 * M)] - s[2 * (0 + a * M)], + w = s[2 * (_ + 0 * M) + 1] - s[2 * (0 + a * M) + 1]; + (c = 0.5 * (E + I)), + (d = 0.5 * (A + w)), + (g = 0.5 * (E - I)), + (y = 0.5 * (A - w)), + (p -= 0.5 * (c + g)), + (f -= 0.5 * (d + y)); + } + if (-2 < v && v < 3 && -2 < L && L < 3) + if (v <= 0) + if (L <= 0) { + var x = s[2 * (0 + 0 * M)], + O = s[2 * (0 + 0 * M) + 1], + D = p - 2 * c, + R = f - 2 * d, + b = p - 2 * g, + F = f - 2 * y, + C = p - 2 * c - 2 * g, + N = f - 2 * d - 2 * y, + B = 0.5 * (v - -2), + U = 0.5 * (L - -2); + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else if (L >= 1) { + var b = s[2 * (0 + a * M)], + F = s[2 * (0 + a * M) + 1], + C = p - 2 * c + 1 * g, + N = f - 2 * d + 1 * y, + x = p + 3 * g, + O = f + 3 * y, + D = p - 2 * c + 3 * g, + R = f - 2 * d + 3 * y, + B = 0.5 * (v - -2), + U = 0.5 * (L - 1); + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else { + var G = 0 | S; + G == a && (G = a - 1); + var B = 0.5 * (v - -2), + U = S - G, + Y = G / a, + k = (G + 1) / a, + b = s[2 * (0 + G * M)], + F = s[2 * (0 + G * M) + 1], + x = s[2 * (0 + (G + 1) * M)], + O = s[2 * (0 + (G + 1) * M) + 1], + C = p - 2 * c + Y * g, + N = f - 2 * d + Y * y, + D = p - 2 * c + k * g, + R = f - 2 * d + k * y; + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } + else if (1 <= v) + if (L <= 0) { + var D = s[2 * (_ + 0 * M)], + R = s[2 * (_ + 0 * M) + 1], + x = p + 3 * c, + O = f + 3 * d, + C = p + 1 * c - 2 * g, + N = f + 1 * d - 2 * y, + b = p + 3 * c - 2 * g, + F = f + 3 * d - 2 * y, + B = 0.5 * (v - 1), + U = 0.5 * (L - -2); + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else if (L >= 1) { + var C = s[2 * (_ + a * M)], + N = s[2 * (_ + a * M) + 1], + b = p + 3 * c + 1 * g, + F = f + 3 * d + 1 * y, + D = p + 1 * c + 3 * g, + R = f + 1 * d + 3 * y, + x = p + 3 * c + 3 * g, + O = f + 3 * d + 3 * y, + B = 0.5 * (v - 1), + U = 0.5 * (L - 1); + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else { + var G = 0 | S; + G == a && (G = a - 1); + var B = 0.5 * (v - 1), + U = S - G, + Y = G / a, + k = (G + 1) / a, + C = s[2 * (_ + G * M)], + N = s[2 * (_ + G * M) + 1], + D = s[2 * (_ + (G + 1) * M)], + R = s[2 * (_ + (G + 1) * M) + 1], + b = p + 3 * c + Y * g, + F = f + 3 * d + Y * y, + x = p + 3 * c + k * g, + O = f + 3 * d + k * y; + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = + O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } + else if (L <= 0) { + var V = 0 | P; + V == _ && (V = _ - 1); + var B = P - V, + U = 0.5 * (L - -2), + X = V / _, + z = (V + 1) / _, + D = s[2 * (V + 0 * M)], + R = s[2 * (V + 0 * M) + 1], + x = s[2 * (V + 1 + 0 * M)], + O = s[2 * (V + 1 + 0 * M) + 1], + C = p + X * c - 2 * g, + N = f + X * d - 2 * y, + b = p + z * c - 2 * g, + F = f + z * d - 2 * y; + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else if (L >= 1) { + var V = 0 | P; + V == _ && (V = _ - 1); + var B = P - V, + U = 0.5 * (L - 1), + X = V / _, + z = (V + 1) / _, + C = s[2 * (V + a * M)], + N = s[2 * (V + a * M) + 1], + b = s[2 * (V + 1 + a * M)], + F = s[2 * (V + 1 + a * M) + 1], + D = p + X * c + 3 * g, + R = f + X * d + 3 * y, + x = p + z * c + 3 * g, + O = f + z * d + 3 * y; + B + U <= 1 + ? ((e[T] = C + (b - C) * B + (D - C) * U), + (e[T + 1] = N + (F - N) * B + (R - N) * U)) + : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), + (e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U))); + } else + t.err.printf( + "_$li calc : %.4f , %.4f\t\t\t\t\t@@BDBoxGrid\n", + v, + L + ); + else (e[T] = p + v * c + L * g), (e[T + 1] = f + v * d + L * y); + } else + (l = P - (0 | P)), + ($ = S - (0 | S)), + (h = 2 * ((0 | P) + (0 | S) * (_ + 1))), + l + $ < 1 + ? ((e[T] = + s[h] * (1 - l - $) + + s[h + 2] * l + + s[h + 2 * (_ + 1)] * $), + (e[T + 1] = + s[h + 1] * (1 - l - $) + + s[h + 3] * l + + s[h + 2 * (_ + 1) + 1] * $)) + : ((e[T] = + s[h + 2 * (_ + 1) + 2] * (l - 1 + $) + + s[h + 2 * (_ + 1)] * (1 - l) + + s[h + 2] * (1 - $)), + (e[T + 1] = + s[h + 2 * (_ + 1) + 3] * (l - 1 + $) + + s[h + 2 * (_ + 1) + 1] * (1 - l) + + s[h + 3] * (1 - $))); + } + }), + (Z.prototype.transformPoints_sdk1 = function (t, i, e, r, o, n, s) { + for ( + var _, + a, + h, + l, + $, + u, + p, + f = i, + c = this._$o, + d = this._$A, + g = o * s, + y = null != f._$hr ? f._$hr : f._$Cr, + m = n; + m < g; + m += s + ) + at._$ts + ? ((_ = e[m]), + (a = e[m + 1]), + _ < 0 ? (_ = 0) : _ > 1 && (_ = 1), + a < 0 ? (a = 0) : a > 1 && (a = 1), + (_ *= c), + (a *= d), + (h = 0 | _), + (l = 0 | a), + h > c - 1 && (h = c - 1), + l > d - 1 && (l = d - 1), + (u = _ - h), + (p = a - l), + ($ = 2 * (h + l * (c + 1)))) + : ((_ = e[m] * c), + (a = e[m + 1] * d), + (u = _ - (0 | _)), + (p = a - (0 | a)), + ($ = 2 * ((0 | _) + (0 | a) * (c + 1)))), + u + p < 1 + ? ((r[m] = + y[$] * (1 - u - p) + + y[$ + 2] * u + + y[$ + 2 * (c + 1)] * p), + (r[m + 1] = + y[$ + 1] * (1 - u - p) + + y[$ + 3] * u + + y[$ + 2 * (c + 1) + 1] * p)) + : ((r[m] = + y[$ + 2 * (c + 1) + 2] * (u - 1 + p) + + y[$ + 2 * (c + 1)] * (1 - u) + + y[$ + 2] * (1 - p)), + (r[m + 1] = + y[$ + 2 * (c + 1) + 3] * (u - 1 + p) + + y[$ + 2 * (c + 1) + 1] * (1 - u) + + y[$ + 3] * (1 - p))); + }), + (Z.prototype._$VT = function () { + return (this._$o + 1) * (this._$A + 1); + }), + (Z.prototype.getType = function () { + return I._$_b; + }), + (K.prototype = new _t()), + (tt._$42 = 0), + (tt.prototype._$zP = function () { + (this._$3S = new Array()), (this._$aS = new Array()); + }), + (tt.prototype._$F0 = function (t) { + (this._$g0 = t._$8L()), + (this.visible = t._$8L()), + (this._$NL = t._$nP()), + (this._$3S = t._$nP()), + (this._$aS = t._$nP()); + }), + (tt.prototype.init = function (t) { + var i = new it(this); + return i.setPartsOpacity(this.isVisible() ? 1 : 0), i; + }), + (tt.prototype._$6o = function (t) { + if (null == this._$3S) throw new Error("_$3S _$6 _$Wo@_$6o"); + this._$3S.push(t); + }), + (tt.prototype._$3o = function (t) { + if (null == this._$aS) throw new Error("_$aS _$6 _$Wo@_$3o"); + this._$aS.push(t); + }), + (tt.prototype._$Zo = function (t) { + this._$3S = t; + }), + (tt.prototype._$xo = function (t) { + this._$aS = t; + }), + (tt.prototype.isVisible = function () { + return this.visible; + }), + (tt.prototype._$uL = function () { + return this._$g0; + }), + (tt.prototype._$KP = function (t) { + this.visible = t; + }), + (tt.prototype._$ET = function (t) { + this._$g0 = t; + }), + (tt.prototype.getBaseData = function () { + return this._$3S; + }), + (tt.prototype.getDrawData = function () { + return this._$aS; + }), + (tt.prototype._$p2 = function () { + return this._$NL; + }), + (tt.prototype._$ob = function (t) { + this._$NL = t; + }), + (tt.prototype.getPartsID = function () { + return this._$NL; + }), + (tt.prototype._$MP = function (t) { + this._$NL = t; + }), + (it.prototype = new $()), + (it.prototype.getPartsOpacity = function () { + return this._$VS; + }), + (it.prototype.setPartsOpacity = function (t) { + this._$VS = t; + }), + (et._$L7 = function () { + u._$27(), yt._$27(), b._$27(), l._$27(); + }), + (et.prototype.toString = function () { + return this.id; + }), + (rt.prototype._$F0 = function (t) {}), + (ot.prototype._$1s = function () { + return this._$4S; + }), + (ot.prototype._$zP = function () { + this._$4S = new Array(); + }), + (ot.prototype._$F0 = function (t) { + this._$4S = t._$nP(); + }), + (ot.prototype._$Ks = function (t) { + this._$4S.push(t); + }), + (nt.tr = new gt()), + (nt._$50 = new gt()), + (nt._$Ti = new Array(0, 0)), + (nt._$Pi = new Array(0, 0)), + (nt._$B = new Array(0, 0)), + (nt.prototype._$lP = function (t, i, e, r) { + this.viewport = new Array(t, i, e, r); + }), + (nt.prototype._$bL = function () { + this.context.save(); + var t = this.viewport; + null != t && + (this.context.beginPath(), + this.context._$Li(t[0], t[1], t[2], t[3]), + this.context.clip()); + }), + (nt.prototype._$ei = function () { + this.context.restore(); + }), + (nt.prototype.drawElements = function (t, i, e, r, o, n, s, a) { + try { + o != this._$Qo && + ((this._$Qo = o), (this.context.globalAlpha = o)); + for ( + var h = i.length, + l = t.width, + $ = t.height, + u = this.context, + p = this._$xP, + f = this._$uP, + c = this._$6r, + d = this._$3r, + g = nt.tr, + y = nt._$Ti, + m = nt._$Pi, + T = nt._$B, + P = 0; + P < h; + P += 3 + ) { + u.save(); + var S = i[P], + v = i[P + 1], + L = i[P + 2], + M = p + c * e[2 * S], + E = f + d * e[2 * S + 1], + A = p + c * e[2 * v], + I = f + d * e[2 * v + 1], + w = p + c * e[2 * L], + x = f + d * e[2 * L + 1]; + s && + (s._$PS(M, E, T), + (M = T[0]), + (E = T[1]), + s._$PS(A, I, T), + (A = T[0]), + (I = T[1]), + s._$PS(w, x, T), + (w = T[0]), + (x = T[1])); + var O = l * r[2 * S], + D = $ - $ * r[2 * S + 1], + R = l * r[2 * v], + b = $ - $ * r[2 * v + 1], + F = l * r[2 * L], + C = $ - $ * r[2 * L + 1], + N = Math.atan2(b - D, R - O), + B = Math.atan2(I - E, A - M), + U = A - M, + G = I - E, + Y = Math.sqrt(U * U + G * G), + k = R - O, + V = b - D, + X = Math.sqrt(k * k + V * V), + z = Y / X; + It._$ni(F, C, O, D, R - O, b - D, -(b - D), R - O, y), + It._$ni(w, x, M, E, A - M, I - E, -(I - E), A - M, m); + var H = (m[0] - y[0]) / y[1], + W = Math.min(O, R, F), + j = Math.max(O, R, F), + q = Math.min(D, b, C), + J = Math.max(D, b, C), + Q = Math.floor(W), + Z = Math.floor(q), + K = Math.ceil(j), + tt = Math.ceil(J); + g.identity(), + g.translate(M, E), + g.rotate(B), + g.scale(1, m[1] / y[1]), + g.shear(H, 0), + g.scale(z, z), + g.rotate(-N), + g.translate(-O, -D), + g.setContext(u); + if ( + (n || (n = 1.2), + at.IGNORE_EXPAND && (n = 0), + at.USE_CACHED_POLYGON_IMAGE) + ) { + var it = a._$e0; + if ( + ((it.gl_cacheImage = it.gl_cacheImage || {}), + !it.gl_cacheImage[P]) + ) { + var et = nt.createCanvas(K - Q, tt - Z); + (at.DEBUG_DATA.LDGL_CANVAS_MB = + at.DEBUG_DATA.LDGL_CANVAS_MB || 0), + (at.DEBUG_DATA.LDGL_CANVAS_MB += (K - Q) * (tt - Z) * 4); + var rt = et.getContext("2d"); + rt.translate(-Q, -Z), + nt.clip(rt, g, n, Y, O, D, R, b, F, C, M, E, A, I, w, x), + rt.drawImage(t, 0, 0), + (it.gl_cacheImage[P] = { + cacheCanvas: et, + cacheContext: rt, + }); + } + u.drawImage(it.gl_cacheImage[P].cacheCanvas, Q, Z); + } else + at.IGNORE_CLIP || + nt.clip(u, g, n, Y, O, D, R, b, F, C, M, E, A, I, w, x), + at.USE_ADJUST_TRANSLATION && + ((W = 0), (j = l), (q = 0), (J = $)), + u.drawImage(t, W, q, j - W, J - q, W, q, j - W, J - q); + u.restore(); + } + } catch (t) { + _._$Rb(t); + } + }), + (nt.clip = function (t, i, e, r, o, n, s, _, a, h, l, $, u, p, f, c) { + e > 0.02 + ? nt.expandClip(t, i, e, r, l, $, u, p, f, c) + : nt.clipWithTransform(t, null, o, n, s, _, a, h); + }), + (nt.expandClip = function (t, i, e, r, o, n, s, _, a, h) { + var l = s - o, + $ = _ - n, + u = a - o, + p = h - n, + f = l * p - $ * u > 0 ? e : -e, + c = -$, + d = l, + g = a - s, + y = h - _, + m = -y, + T = g, + P = Math.sqrt(g * g + y * y), + S = -p, + v = u, + L = Math.sqrt(u * u + p * p), + M = o - (f * c) / r, + E = n - (f * d) / r, + A = s - (f * c) / r, + I = _ - (f * d) / r, + w = s - (f * m) / P, + x = _ - (f * T) / P, + O = a - (f * m) / P, + D = h - (f * T) / P, + R = o + (f * S) / L, + b = n + (f * v) / L, + F = a + (f * S) / L, + C = h + (f * v) / L, + N = nt._$50; + return ( + null != i._$P2(N) && + (nt.clipWithTransform(t, N, M, E, A, I, w, x, O, D, F, C, R, b), + !0) + ); + }), + (nt.clipWithTransform = function (t, i, e, r, o, n, s, a) { + if (arguments.length < 7) return void _._$li("err : @LDGL.clip()"); + if (!(arguments[1] instanceof gt)) + return void _._$li("err : a[0] is _$6 LDTransform @LDGL.clip()"); + var h = nt._$B, + l = i, + $ = arguments; + if ((t.beginPath(), l)) { + l._$PS($[2], $[3], h), t.moveTo(h[0], h[1]); + for (var u = 4; u < $.length; u += 2) + l._$PS($[u], $[u + 1], h), t.lineTo(h[0], h[1]); + } else { + t.moveTo($[2], $[3]); + for (var u = 4; u < $.length; u += 2) t.lineTo($[u], $[u + 1]); + } + t.clip(); + }), + (nt.createCanvas = function (t, i) { + var e = document.createElement("canvas"); + return ( + e.setAttribute("width", t), + e.setAttribute("height", i), + e || _._$li("err : " + e), + e + ); + }), + (nt.dumpValues = function () { + for (var t = "", i = 0; i < arguments.length; i++) + t += "[" + i + "]= " + arguments[i].toFixed(3) + " , "; + console.log(t); + }), + (st.prototype._$F0 = function (t) { + (this._$TT = t._$_T()), + (this._$LT = t._$_T()), + (this._$FS = t._$_T()), + (this._$wL = t._$nP()); + }), + (st.prototype.getMinValue = function () { + return this._$TT; + }), + (st.prototype.getMaxValue = function () { + return this._$LT; + }), + (st.prototype.getDefaultValue = function () { + return this._$FS; + }), + (st.prototype.getParamID = function () { + return this._$wL; + }), + (_t.prototype._$yo = function () { + return this._$AT && !this._$JS; + }), + (_t.prototype._$hS = function (t) { + this._$AT = t; + }), + (_t.prototype._$GT = function () { + return this._$e0; + }), + (_t.prototype._$l2 = function (t) { + this._$IP = t; + }), + (_t.prototype.getPartsIndex = function () { + return this._$IP; + }), + (_t.prototype._$x2 = function () { + return this._$JS; + }), + (_t.prototype._$Ib = function (t) { + this._$JS = t; + }), + (_t.prototype.getTotalScale = function () { + return this.totalScale; + }), + (_t.prototype.setTotalScale_notForClient = function (t) { + this.totalScale = t; + }), + (_t.prototype.getInterpolatedOpacity = function () { + return this._$7s; + }), + (_t.prototype.setInterpolatedOpacity = function (t) { + this._$7s = t; + }), + (_t.prototype.getTotalOpacity = function (t) { + return this.totalOpacity; + }), + (_t.prototype.setTotalOpacity = function (t) { + this.totalOpacity = t; + }), + (at._$2s = "2.1.00_1"), + (at._$Kr = 201001e3), + (at._$sP = !0), + (at._$so = !0), + (at._$cb = !1), + (at._$3T = !0), + (at._$Ts = !0), + (at._$fb = !0), + (at._$ts = !0), + (at.L2D_DEFORMER_EXTEND = !0), + (at._$Wb = !1); + (at._$yr = !1), + (at._$Zs = !1), + (at.L2D_NO_ERROR = 0), + (at._$i7 = 1e3), + (at._$9s = 1001), + (at._$es = 1100), + (at._$r7 = 2e3), + (at._$07 = 2001), + (at._$b7 = 2002), + (at._$H7 = 4e3), + (at.L2D_COLOR_BLEND_MODE_MULT = 0), + (at.L2D_COLOR_BLEND_MODE_ADD = 1), + (at.L2D_COLOR_BLEND_MODE_INTERPOLATE = 2), + (at._$6b = !0), + (at._$cT = 0), + (at.clippingMaskBufferSize = 256), + (at.glContext = new Array()), + (at.frameBuffers = new Array()), + (at.fTexture = new Array()), + (at.IGNORE_CLIP = !1), + (at.IGNORE_EXPAND = !1), + (at.EXPAND_W = 2), + (at.USE_ADJUST_TRANSLATION = !0), + (at.USE_CANVAS_TRANSFORM = !0), + (at.USE_CACHED_POLYGON_IMAGE = !1), + (at.DEBUG_DATA = {}), + (at.PROFILE_IOS_SPEED = { + PROFILE_NAME: "iOS Speed", + USE_ADJUST_TRANSLATION: !0, + USE_CACHED_POLYGON_IMAGE: !0, + EXPAND_W: 4, + }), + (at.PROFILE_IOS_QUALITY = { + PROFILE_NAME: "iOS HiQ", + USE_ADJUST_TRANSLATION: !0, + USE_CACHED_POLYGON_IMAGE: !1, + EXPAND_W: 2, + }), + (at.PROFILE_IOS_DEFAULT = at.PROFILE_IOS_QUALITY), + (at.PROFILE_ANDROID = { + PROFILE_NAME: "Android", + USE_ADJUST_TRANSLATION: !1, + USE_CACHED_POLYGON_IMAGE: !1, + EXPAND_W: 2, + }), + (at.PROFILE_DESKTOP = { + PROFILE_NAME: "Desktop", + USE_ADJUST_TRANSLATION: !1, + USE_CACHED_POLYGON_IMAGE: !1, + EXPAND_W: 2, + }), + (at.initProfile = function () { + Et.isIOS() + ? at.setupProfile(at.PROFILE_IOS_DEFAULT) + : Et.isAndroid() + ? at.setupProfile(at.PROFILE_ANDROID) + : at.setupProfile(at.PROFILE_DESKTOP); + }), + (at.setupProfile = function (t, i) { + if ("number" == typeof t) + switch (t) { + case 9901: + t = at.PROFILE_IOS_SPEED; + break; + case 9902: + t = at.PROFILE_IOS_QUALITY; + break; + case 9903: + t = at.PROFILE_IOS_DEFAULT; + break; + case 9904: + t = at.PROFILE_ANDROID; + break; + case 9905: + t = at.PROFILE_DESKTOP; + break; + default: + alert("profile _$6 _$Ui : " + t); + } + arguments.length < 2 && (i = !0), + i && console.log("profile : " + t.PROFILE_NAME); + for (var e in t) + (at[e] = t[e]), i && console.log(" [" + e + "] = " + t[e]); + }), + (at.init = function () { + if (at._$6b) { + console.log("Live2D %s", at._$2s), (at._$6b = !1); + !0, at.initProfile(); + } + }), + (at.getVersionStr = function () { + return at._$2s; + }), + (at.getVersionNo = function () { + return at._$Kr; + }), + (at._$sT = function (t) { + at._$cT = t; + }), + (at.getError = function () { + var t = at._$cT; + return (at._$cT = 0), t; + }), + (at.dispose = function () { + (at.glContext = []), (at.frameBuffers = []), (at.fTexture = []); + }), + (at.setGL = function (t, i) { + var e = i || 0; + at.glContext[e] = t; + }), + (at.getGL = function (t) { + return at.glContext[t]; + }), + (at.setClippingMaskBufferSize = function (t) { + at.clippingMaskBufferSize = t; + }), + (at.getClippingMaskBufferSize = function () { + return at.clippingMaskBufferSize; + }), + (at.deleteBuffer = function (t) { + at.getGL(t).deleteFramebuffer(at.frameBuffers[t].framebuffer), + delete at.frameBuffers[t], + delete at.glContext[t]; + }), + (ht._$r2 = function (t) { + return t < 0 ? 0 : t > 1 ? 1 : 0.5 - 0.5 * Math.cos(t * Lt.PI_F); + }), + (lt._$fr = -1), + (lt.prototype.toString = function () { + return this._$ib; + }), + ($t.prototype = new W()), + ($t._$42 = 0), + ($t._$Os = 30), + ($t._$ms = 0), + ($t._$ns = 1), + ($t._$_s = 2), + ($t._$gT = new Array()), + ($t.prototype._$_S = function (t) { + this._$LP = t; + }), + ($t.prototype.getTextureNo = function () { + return this._$LP; + }), + ($t.prototype._$ZL = function () { + return this._$Qi; + }), + ($t.prototype._$H2 = function () { + return this._$JP; + }), + ($t.prototype.getNumPoints = function () { + return this._$d0; + }), + ($t.prototype.getType = function () { + return W._$wb; + }), + ($t.prototype._$B2 = function (t, i, e) { + var r = i, + o = null != r._$hr ? r._$hr : r._$Cr; + switch (U._$do) { + default: + case U._$Ms: + throw new Error("_$L _$ro "); + case U._$Qs: + for (var n = this._$d0 - 1; n >= 0; --n) o[n * U._$No + 4] = e; + } + }), + ($t.prototype._$zP = function () { + (this._$GS = new D()), this._$GS._$zP(); + }), + ($t.prototype._$F0 = function (t) { + W.prototype._$F0.call(this, t), + (this._$LP = t._$6L()), + (this._$d0 = t._$6L()), + (this._$Yo = t._$6L()); + var i = t._$nP(); + this._$BP = new Int16Array(3 * this._$Yo); + for (var e = 3 * this._$Yo - 1; e >= 0; --e) this._$BP[e] = i[e]; + if ( + ((this._$Eo = t._$nP()), + (this._$Qi = t._$nP()), + t.getFormatVersion() >= G._$s7) + ) { + if (((this._$JP = t._$6L()), 0 != this._$JP)) { + if (0 != (1 & this._$JP)) { + var r = t._$6L(); + null == this._$5P && (this._$5P = new Object()), + (this._$5P._$Hb = parseInt(r)); + } + 0 != (this._$JP & $t._$Os) + ? (this._$6s = (this._$JP & $t._$Os) >> 1) + : (this._$6s = $t._$ms), + 0 != (32 & this._$JP) && (this.culling = !1); + } + } else this._$JP = 0; + }), + ($t.prototype.init = function (t) { + var i = new ut(this), + e = this._$d0 * U._$No, + r = this._$32(); + switch ( + (null != i._$Cr && (i._$Cr = null), + (i._$Cr = new Float32Array(e)), + null != i._$hr && (i._$hr = null), + (i._$hr = r ? new Float32Array(e) : null), + U._$do) + ) { + default: + case U._$Ms: + if (U._$Ls) + for (var o = this._$d0 - 1; o >= 0; --o) { + var n = o << 1; + this._$Qi[n + 1] = 1 - this._$Qi[n + 1]; + } + break; + case U._$Qs: + for (var o = this._$d0 - 1; o >= 0; --o) { + var n = o << 1, + s = o * U._$No, + _ = this._$Qi[n], + a = this._$Qi[n + 1]; + (i._$Cr[s] = _), + (i._$Cr[s + 1] = a), + (i._$Cr[s + 4] = 0), + r && + ((i._$hr[s] = _), + (i._$hr[s + 1] = a), + (i._$hr[s + 4] = 0)); + } + } + return i; + }), + ($t.prototype._$Nr = function (t, i) { + var e = i; + if ( + (this != e._$GT() && console.log("### assert!! ### "), + this._$GS._$Ur(t) && + (W.prototype._$Nr.call(this, t, e), !e._$IS[0])) + ) { + var r = $t._$gT; + (r[0] = !1), + v._$Vr( + t, + this._$GS, + r, + this._$d0, + this._$Eo, + e._$Cr, + U._$i2, + U._$No + ); + } + }), + ($t.prototype._$2b = function (t, i) { + try { + this != i._$GT() && console.log("### assert!! ### "); + var e = !1; + i._$IS[0] && (e = !0); + var r = i; + if (!e && (W.prototype._$2b.call(this, t), this._$32())) { + var o = this.getTargetBaseDataID(); + if ( + (r._$8r == W._$ur && (r._$8r = t.getBaseDataIndex(o)), + r._$8r < 0) + ) + at._$so && _._$li("_$L _$0P _$G :: %s", o); + else { + var n = t.getBaseData(r._$8r), + s = t._$q2(r._$8r); + null == n || s._$x2() + ? (r._$AT = !1) + : (n._$nb(t, s, r._$Cr, r._$hr, this._$d0, U._$i2, U._$No), + (r._$AT = !0)), + (r.baseOpacity = s.getTotalOpacity()); + } + } + } catch (t) { + throw t; + } + }), + ($t.prototype.draw = function (t, i, e) { + if ( + (this != e._$GT() && console.log("### assert!! ### "), !e._$IS[0]) + ) { + var r = e, + o = this._$LP; + o < 0 && (o = 1); + var n = this.getOpacity(i, r) * e._$VS * e.baseOpacity, + s = null != r._$hr ? r._$hr : r._$Cr; + t.setClipBufPre_clipContextForDraw(e.clipBufPre_clipContext), + t._$WP(this.culling), + t._$Uo( + o, + 3 * this._$Yo, + this._$BP, + s, + this._$Qi, + n, + this._$6s, + r + ); + } + }), + ($t.prototype.dump = function () { + console.log( + " _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n", + this._$LP, + this._$d0, + this._$Yo + ), + console.log(" _$Oi _$di = { "); + for (var t = 0; t < this._$BP.length; t++) + console.log("%5d ,", this._$BP[t]); + console.log("\n _$5i _$30"); + for (var t = 0; t < this._$Eo.length; t++) { + console.log("\n _$30[%d] = ", t); + for (var i = this._$Eo[t], e = 0; e < i.length; e++) + console.log("%6.2f, ", i[e]); + } + console.log("\n"); + }), + ($t.prototype._$72 = function (t) { + return null == this._$5P ? null : this._$5P[t]; + }), + ($t.prototype.getIndexArray = function () { + return this._$BP; + }), + (ut.prototype = new Mt()), + (ut.prototype.getTransformedPoints = function () { + return null != this._$hr ? this._$hr : this._$Cr; + }), + (pt.prototype._$HT = function (t) { + (this.x = t.x), (this.y = t.y); + }), + (pt.prototype._$HT = function (t, i) { + (this.x = t), (this.y = i); + }), + (ft.prototype = new i()), + (ft.loadModel = function (t) { + var e = new ft(); + return i._$62(e, t), e; + }), + (ft.loadModel = function (t, e) { + var r = e || 0, + o = new ft(r); + return i._$62(o, t), o; + }), + (ft._$to = function () { + return new ft(); + }), + (ft._$er = function (t) { + var i = new _$5("../_$_r/_$t0/_$Ri/_$_P._$d"); + if (0 == i.exists()) + throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + i._$PL()); + for ( + var e = [ + "../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1", + "../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1", + ], + r = ft.loadModel(i._$3b()), + o = 0; + o < e.length; + o++ + ) { + var n = new _$5(e[o]); + if (0 == n.exists()) + throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + n._$PL()); + r.setTexture(o, _$nL._$_o(t, n._$3b())); + } + return r; + }), + (ft.prototype.setGL = function (t) { + at.setGL(t); + }), + (ft.prototype.setTransform = function (t) { + this.drawParamWebGL.setTransform(t); + }), + (ft.prototype.update = function () { + this._$5S.update(), this._$5S.preDraw(this.drawParamWebGL); + }), + (ft.prototype.draw = function () { + this._$5S.draw(this.drawParamWebGL); + }), + (ft.prototype._$K2 = function () { + this.drawParamWebGL._$K2(); + }), + (ft.prototype.setTexture = function (t, i) { + null == this.drawParamWebGL && + _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), + this.drawParamWebGL.setTexture(t, i); + }), + (ft.prototype.setTexture = function (t, i) { + null == this.drawParamWebGL && + _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), + this.drawParamWebGL.setTexture(t, i); + }), + (ft.prototype._$Rs = function () { + return this.drawParamWebGL._$Rs(); + }), + (ft.prototype._$Ds = function (t) { + this.drawParamWebGL._$Ds(t); + }), + (ft.prototype.getDrawParam = function () { + return this.drawParamWebGL; + }), + (ft.prototype.setMatrix = function (t) { + this.drawParamWebGL.setMatrix(t); + }), + (ft.prototype.setPremultipliedAlpha = function (t) { + this.drawParamWebGL.setPremultipliedAlpha(t); + }), + (ft.prototype.isPremultipliedAlpha = function () { + return this.drawParamWebGL.isPremultipliedAlpha(); + }), + (ft.prototype.setAnisotropy = function (t) { + this.drawParamWebGL.setAnisotropy(t); + }), + (ft.prototype.getAnisotropy = function () { + return this.drawParamWebGL.getAnisotropy(); + }), + (ct.prototype._$tb = function () { + return this.motions; + }), + (ct.prototype.startMotion = function (t, i) { + for (var e = null, r = this.motions.length, o = 0; o < r; ++o) + null != (e = this.motions[o]) && + (e._$qS(e._$w0.getFadeOut()), + this._$eb && + _._$Ji( + "MotionQueueManager[size:%2d]->startMotion() / start _$K _$3 (m%d)\n", + r, + e._$sr + )); + if (null == t) return -1; + (e = new dt()), (e._$w0 = t), this.motions.push(e); + var n = e._$sr; + return ( + this._$eb && + _._$Ji( + "MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n", + r, + n + ), + n + ); + }), + (ct.prototype.updateParam = function (t) { + try { + for (var i = !1, e = 0; e < this.motions.length; e++) { + var r = this.motions[e]; + if (null != r) { + var o = r._$w0; + null != o + ? (o.updateParam(t, r), + (i = !0), + r.isFinished() && + (this._$eb && + _._$Ji( + "MotionQueueManager[size:%2d]->updateParam() / _$T0 _$w0 (m%d)\n", + this.motions.length - 1, + r._$sr + ), + this.motions.splice(e, 1), + e--)) + : ((this.motions = this.motions.splice(e, 1)), e--); + } else this.motions.splice(e, 1), e--; + } + return i; + } catch (t) { + return _._$li(t), !0; + } + }), + (ct.prototype.isFinished = function (t) { + if (arguments.length >= 1) { + for (var i = 0; i < this.motions.length; i++) { + var e = this.motions[i]; + if (null != e && e._$sr == t && !e.isFinished()) return !1; + } + return !0; + } + for (var i = 0; i < this.motions.length; i++) { + var e = this.motions[i]; + if (null != e) { + if (null != e._$w0) { + if (!e.isFinished()) return !1; + } else this.motions.splice(i, 1), i--; + } else this.motions.splice(i, 1), i--; + } + return !0; + }), + (ct.prototype.stopAllMotions = function () { + for (var t = 0; t < this.motions.length; t++) { + var i = this.motions[t]; + if (null != i) { + i._$w0; + this.motions.splice(t, 1), t--; + } else this.motions.splice(t, 1), t--; + } + }), + (ct.prototype._$Zr = function (t) { + this._$eb = t; + }), + (ct.prototype._$e = function () { + console.log("-- _$R --\n"); + for (var t = 0; t < this.motions.length; t++) { + var i = this.motions[t], + e = i._$w0; + console.log( + "MotionQueueEnt[%d] :: %s\n", + this.motions.length, + e.toString() + ); + } + }), + (dt._$Gs = 0), + (dt.prototype.isFinished = function () { + return this._$9L; + }), + (dt.prototype._$qS = function (t) { + var i = w.getUserTimeMSec(), + e = i + t; + (this._$Do < 0 || e < this._$Do) && (this._$Do = e); + }), + (dt.prototype._$Bs = function () { + return this._$sr; + }), + (gt.prototype.setContext = function (t) { + var i = this.m; + t.transform(i[0], i[1], i[3], i[4], i[6], i[7]); + }), + (gt.prototype.toString = function () { + for (var t = "LDTransform { ", i = 0; i < 9; i++) + t += this.m[i].toFixed(2) + " ,"; + return (t += " }"); + }), + (gt.prototype.identity = function () { + var t = this.m; + (t[0] = t[4] = t[8] = 1), + (t[1] = t[2] = t[3] = t[5] = t[6] = t[7] = 0); + }), + (gt.prototype._$PS = function (t, i, e) { + null == e && (e = new Array(0, 0)); + var r = this.m; + return ( + (e[0] = r[0] * t + r[3] * i + r[6]), + (e[1] = r[1] * t + r[4] * i + r[7]), + e + ); + }), + (gt.prototype._$P2 = function (t) { + t || (t = new gt()); + var i = this.m, + e = i[0], + r = i[1], + o = i[2], + n = i[3], + s = i[4], + _ = i[5], + a = i[6], + h = i[7], + l = i[8], + $ = + e * s * l + + r * _ * a + + o * n * h - + e * _ * h - + o * s * a - + r * n * l; + if (0 == $) return null; + var u = 1 / $; + return ( + (t.m[0] = u * (s * l - h * _)), + (t.m[1] = u * (h * o - r * l)), + (t.m[2] = u * (r * _ - s * o)), + (t.m[3] = u * (a * _ - n * l)), + (t.m[4] = u * (e * l - a * o)), + (t.m[5] = u * (n * o - e * _)), + (t.m[6] = u * (n * h - a * s)), + (t.m[7] = u * (a * r - e * h)), + (t.m[8] = u * (e * s - n * r)), + t + ); + }), + (gt.prototype.transform = function (t, i, e) { + null == e && (e = new Array(0, 0)); + var r = this.m; + return ( + (e[0] = r[0] * t + r[3] * i + r[6]), + (e[1] = r[1] * t + r[4] * i + r[7]), + e + ); + }), + (gt.prototype.translate = function (t, i) { + var e = this.m; + (e[6] = e[0] * t + e[3] * i + e[6]), + (e[7] = e[1] * t + e[4] * i + e[7]), + (e[8] = e[2] * t + e[5] * i + e[8]); + }), + (gt.prototype.scale = function (t, i) { + var e = this.m; + (e[0] *= t), + (e[1] *= t), + (e[2] *= t), + (e[3] *= i), + (e[4] *= i), + (e[5] *= i); + }), + (gt.prototype.shear = function (t, i) { + var e = this.m, + r = e[0] + e[3] * i, + o = e[1] + e[4] * i, + n = e[2] + e[5] * i; + (e[3] = e[0] * t + e[3]), + (e[4] = e[1] * t + e[4]), + (e[5] = e[2] * t + e[5]), + (e[0] = r), + (e[1] = o), + (e[2] = n); + }), + (gt.prototype.rotate = function (t) { + var i = this.m, + e = Math.cos(t), + r = Math.sin(t), + o = i[0] * e + i[3] * r, + n = i[1] * e + i[4] * r, + s = i[2] * e + i[5] * r; + (i[3] = -i[0] * r + i[3] * e), + (i[4] = -i[1] * r + i[4] * e), + (i[5] = -i[2] * r + i[5] * e), + (i[0] = o), + (i[1] = n), + (i[2] = s); + }), + (gt.prototype.concatenate = function (t) { + var i = this.m, + e = t.m, + r = i[0] * e[0] + i[3] * e[1] + i[6] * e[2], + o = i[1] * e[0] + i[4] * e[1] + i[7] * e[2], + n = i[2] * e[0] + i[5] * e[1] + i[8] * e[2], + s = i[0] * e[3] + i[3] * e[4] + i[6] * e[5], + _ = i[1] * e[3] + i[4] * e[4] + i[7] * e[5], + a = i[2] * e[3] + i[5] * e[4] + i[8] * e[5], + h = i[0] * e[6] + i[3] * e[7] + i[6] * e[8], + l = i[1] * e[6] + i[4] * e[7] + i[7] * e[8], + $ = i[2] * e[6] + i[5] * e[7] + i[8] * e[8]; + (m[0] = r), + (m[1] = o), + (m[2] = n), + (m[3] = s), + (m[4] = _), + (m[5] = a), + (m[6] = h), + (m[7] = l), + (m[8] = $); + }), + (yt.prototype = new et()), + (yt._$eT = null), + (yt._$tP = new Object()), + (yt._$2o = function () { + return null == yt._$eT && (yt._$eT = yt.getID("DST_BASE")), yt._$eT; + }), + (yt._$27 = function () { + yt._$tP.clear(), (yt._$eT = null); + }), + (yt.getID = function (t) { + var i = yt._$tP[t]; + return null == i && ((i = new yt(t)), (yt._$tP[t] = i)), i; + }), + (yt.prototype._$3s = function () { + return new yt(); + }), + (mt.prototype = new E()), + (mt._$9r = function (t) { + return new Float32Array(t); + }), + (mt._$vb = function (t) { + return new Int16Array(t); + }), + (mt._$cr = function (t, i) { + return ( + null == t || t._$yL() < i.length + ? ((t = mt._$9r(2 * i.length)), t.put(i), t._$oT(0)) + : (t.clear(), t.put(i), t._$oT(0)), + t + ); + }), + (mt._$mb = function (t, i) { + return ( + null == t || t._$yL() < i.length + ? ((t = mt._$vb(2 * i.length)), t.put(i), t._$oT(0)) + : (t.clear(), t.put(i), t._$oT(0)), + t + ); + }), + (mt._$Hs = function () { + return this._$Gr; + }), + (mt._$as = function (t) { + this._$Gr = t; + }), + (mt.prototype.getGL = function () { + return this.gl; + }), + (mt.prototype.setGL = function (t) { + this.gl = t; + }), + (mt.prototype.setTransform = function (t) { + this.transform = t; + }), + (mt.prototype._$ZT = function () { + var t = this.gl; + this.firstDraw && + (this.initShader(), + (this.firstDraw = !1), + (this.anisotropyExt = + t.getExtension("EXT_texture_filter_anisotropic") || + t.getExtension("WEBKIT_EXT_texture_filter_anisotropic") || + t.getExtension("MOZ_EXT_texture_filter_anisotropic")), + this.anisotropyExt && + (this.maxAnisotropy = t.getParameter( + this.anisotropyExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT + ))), + t.disable(t.SCISSOR_TEST), + t.disable(t.STENCIL_TEST), + t.disable(t.DEPTH_TEST), + t.frontFace(t.CW), + t.enable(t.BLEND), + t.colorMask(1, 1, 1, 1), + t.bindBuffer(t.ARRAY_BUFFER, null), + t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, null); + }), + (mt.prototype._$Uo = function (t, i, e, r, o, n, s, _) { + if (!(n < 0.01 && null == this.clipBufPre_clipContextMask)) { + var a = (n > 0.9 && at.EXPAND_W, this.gl); + if (null == this.gl) throw new Error("gl is null"); + var h = 1 * this._$C0 * n, + l = 1 * this._$tT * n, + $ = 1 * this._$WL * n, + u = this._$lT * n; + if (null != this.clipBufPre_clipContextMask) { + a.frontFace(a.CCW), + a.useProgram(this.shaderProgram), + (this._$vS = Tt(a, this._$vS, r)), + (this._$no = Pt(a, this._$no, e)), + a.enableVertexAttribArray(this.a_position_Loc), + a.vertexAttribPointer( + this.a_position_Loc, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + (this._$NT = Tt(a, this._$NT, o)), + a.activeTexture(a.TEXTURE1), + a.bindTexture(a.TEXTURE_2D, this.textures[t]), + a.uniform1i(this.s_texture0_Loc, 1), + a.enableVertexAttribArray(this.a_texCoord_Loc), + a.vertexAttribPointer( + this.a_texCoord_Loc, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + a.uniformMatrix4fv( + this.u_matrix_Loc, + !1, + this.getClipBufPre_clipContextMask().matrixForMask + ); + var p = this.getClipBufPre_clipContextMask().layoutChannelNo, + f = this.getChannelFlagAsColor(p); + a.uniform4f(this.u_channelFlag, f.r, f.g, f.b, f.a); + var c = this.getClipBufPre_clipContextMask().layoutBounds; + a.uniform4f( + this.u_baseColor_Loc, + 2 * c.x - 1, + 2 * c.y - 1, + 2 * c._$EL() - 1, + 2 * c._$5T() - 1 + ), + a.uniform1i(this.u_maskFlag_Loc, !0); + } else if (null != this.getClipBufPre_clipContextDraw()) { + a.useProgram(this.shaderProgramOff), + (this._$vS = Tt(a, this._$vS, r)), + (this._$no = Pt(a, this._$no, e)), + a.enableVertexAttribArray(this.a_position_Loc_Off), + a.vertexAttribPointer( + this.a_position_Loc_Off, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + (this._$NT = Tt(a, this._$NT, o)), + a.activeTexture(a.TEXTURE1), + a.bindTexture(a.TEXTURE_2D, this.textures[t]), + a.uniform1i(this.s_texture0_Loc_Off, 1), + a.enableVertexAttribArray(this.a_texCoord_Loc_Off), + a.vertexAttribPointer( + this.a_texCoord_Loc_Off, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + a.uniformMatrix4fv( + this.u_clipMatrix_Loc_Off, + !1, + this.getClipBufPre_clipContextDraw().matrixForDraw + ), + a.uniformMatrix4fv(this.u_matrix_Loc_Off, !1, this.matrix4x4), + a.activeTexture(a.TEXTURE2), + a.bindTexture(a.TEXTURE_2D, at.fTexture[this.glno]), + a.uniform1i(this.s_texture1_Loc_Off, 2); + var p = this.getClipBufPre_clipContextDraw().layoutChannelNo, + f = this.getChannelFlagAsColor(p); + a.uniform4f(this.u_channelFlag_Loc_Off, f.r, f.g, f.b, f.a), + a.uniform4f(this.u_baseColor_Loc_Off, h, l, $, u); + } else + a.useProgram(this.shaderProgram), + (this._$vS = Tt(a, this._$vS, r)), + (this._$no = Pt(a, this._$no, e)), + a.enableVertexAttribArray(this.a_position_Loc), + a.vertexAttribPointer( + this.a_position_Loc, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + (this._$NT = Tt(a, this._$NT, o)), + a.activeTexture(a.TEXTURE1), + a.bindTexture(a.TEXTURE_2D, this.textures[t]), + a.uniform1i(this.s_texture0_Loc, 1), + a.enableVertexAttribArray(this.a_texCoord_Loc), + a.vertexAttribPointer( + this.a_texCoord_Loc, + 2, + a.FLOAT, + !1, + 0, + 0 + ), + a.uniformMatrix4fv(this.u_matrix_Loc, !1, this.matrix4x4), + a.uniform4f(this.u_baseColor_Loc, h, l, $, u), + a.uniform1i(this.u_maskFlag_Loc, !1); + this.culling + ? this.gl.enable(a.CULL_FACE) + : this.gl.disable(a.CULL_FACE), + this.gl.enable(a.BLEND); + var d, g, y, m; + if (null != this.clipBufPre_clipContextMask) + (d = a.ONE), + (g = a.ONE_MINUS_SRC_ALPHA), + (y = a.ONE), + (m = a.ONE_MINUS_SRC_ALPHA); + else + switch (s) { + case $t._$ms: + (d = a.ONE), + (g = a.ONE_MINUS_SRC_ALPHA), + (y = a.ONE), + (m = a.ONE_MINUS_SRC_ALPHA); + break; + case $t._$ns: + (d = a.ONE), (g = a.ONE), (y = a.ZERO), (m = a.ONE); + break; + case $t._$_s: + (d = a.DST_COLOR), + (g = a.ONE_MINUS_SRC_ALPHA), + (y = a.ZERO), + (m = a.ONE); + } + a.blendEquationSeparate(a.FUNC_ADD, a.FUNC_ADD), + a.blendFuncSeparate(d, g, y, m), + this.anisotropyExt && + a.texParameteri( + a.TEXTURE_2D, + this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT, + this.maxAnisotropy + ); + var T = e.length; + a.drawElements(a.TRIANGLES, T, a.UNSIGNED_SHORT, 0), + a.bindTexture(a.TEXTURE_2D, null); + } + }), + (mt.prototype._$Rs = function () { + throw new Error("_$Rs"); + }), + (mt.prototype._$Ds = function (t) { + throw new Error("_$Ds"); + }), + (mt.prototype._$K2 = function () { + for (var t = 0; t < this.textures.length; t++) { + 0 != this.textures[t] && + (this.gl._$K2(1, this.textures, t), (this.textures[t] = null)); + } + }), + (mt.prototype.setTexture = function (t, i) { + this.textures[t] = i; + }), + (mt.prototype.initShader = function () { + var t = this.gl; + this.loadShaders2(), + (this.a_position_Loc = t.getAttribLocation( + this.shaderProgram, + "a_position" + )), + (this.a_texCoord_Loc = t.getAttribLocation( + this.shaderProgram, + "a_texCoord" + )), + (this.u_matrix_Loc = t.getUniformLocation( + this.shaderProgram, + "u_mvpMatrix" + )), + (this.s_texture0_Loc = t.getUniformLocation( + this.shaderProgram, + "s_texture0" + )), + (this.u_channelFlag = t.getUniformLocation( + this.shaderProgram, + "u_channelFlag" + )), + (this.u_baseColor_Loc = t.getUniformLocation( + this.shaderProgram, + "u_baseColor" + )), + (this.u_maskFlag_Loc = t.getUniformLocation( + this.shaderProgram, + "u_maskFlag" + )), + (this.a_position_Loc_Off = t.getAttribLocation( + this.shaderProgramOff, + "a_position" + )), + (this.a_texCoord_Loc_Off = t.getAttribLocation( + this.shaderProgramOff, + "a_texCoord" + )), + (this.u_matrix_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "u_mvpMatrix" + )), + (this.u_clipMatrix_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "u_ClipMatrix" + )), + (this.s_texture0_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "s_texture0" + )), + (this.s_texture1_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "s_texture1" + )), + (this.u_channelFlag_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "u_channelFlag" + )), + (this.u_baseColor_Loc_Off = t.getUniformLocation( + this.shaderProgramOff, + "u_baseColor" + )); + }), + (mt.prototype.disposeShader = function () { + var t = this.gl; + this.shaderProgram && + (t.deleteProgram(this.shaderProgram), + (this.shaderProgram = null)), + this.shaderProgramOff && + (t.deleteProgram(this.shaderProgramOff), + (this.shaderProgramOff = null)); + }), + (mt.prototype.compileShader = function (t, i) { + var e = this.gl, + r = i, + o = e.createShader(t); + if (null == o) return _._$Ji("_$L0 to create shader"), null; + if ( + (e.shaderSource(o, r), + e.compileShader(o), + !e.getShaderParameter(o, e.COMPILE_STATUS)) + ) { + var n = e.getShaderInfoLog(o); + return ( + _._$Ji("_$L0 to compile shader : " + n), e.deleteShader(o), null + ); + } + return o; + }), + (mt.prototype.loadShaders2 = function () { + var t = this.gl; + if (((this.shaderProgram = t.createProgram()), !this.shaderProgram)) + return !1; + if ( + ((this.shaderProgramOff = t.createProgram()), + !this.shaderProgramOff) + ) + return !1; + if ( + ((this.vertShader = this.compileShader( + t.VERTEX_SHADER, + "attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform mat4 u_mvpMatrix;void main(){ gl_Position = u_mvpMatrix * a_position; v_ClipPos = u_mvpMatrix * a_position; v_texCoord = a_texCoord;}" + )), + !this.vertShader) + ) + return _._$Ji("Vertex shader compile _$li!"), !1; + if ( + ((this.vertShaderOff = this.compileShader( + t.VERTEX_SHADER, + "attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform mat4 u_mvpMatrix;uniform mat4 u_ClipMatrix;void main(){ gl_Position = u_mvpMatrix * a_position; v_ClipPos = u_ClipMatrix * a_position; v_texCoord = a_texCoord ;}" + )), + !this.vertShaderOff) + ) + return _._$Ji("OffVertex shader compile _$li!"), !1; + if ( + ((this.fragShader = this.compileShader( + t.FRAGMENT_SHADER, + "precision mediump float;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform sampler2D s_texture0;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;uniform bool u_maskFlag;void main(){ vec4 smpColor; if(u_maskFlag){ float isInside = step(u_baseColor.x, v_ClipPos.x/v_ClipPos.w) * step(u_baseColor.y, v_ClipPos.y/v_ClipPos.w) * step(v_ClipPos.x/v_ClipPos.w, u_baseColor.z) * step(v_ClipPos.y/v_ClipPos.w, u_baseColor.w); smpColor = u_channelFlag * texture2D(s_texture0 , v_texCoord).a * isInside; }else{ smpColor = texture2D(s_texture0 , v_texCoord) * u_baseColor; } gl_FragColor = smpColor;}" + )), + !this.fragShader) + ) + return _._$Ji("Fragment shader compile _$li!"), !1; + if ( + ((this.fragShaderOff = this.compileShader( + t.FRAGMENT_SHADER, + "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 = 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;}" + )), + !this.fragShaderOff) + ) + return _._$Ji("OffFragment shader compile _$li!"), !1; + if ( + (t.attachShader(this.shaderProgram, this.vertShader), + t.attachShader(this.shaderProgram, this.fragShader), + t.attachShader(this.shaderProgramOff, this.vertShaderOff), + t.attachShader(this.shaderProgramOff, this.fragShaderOff), + t.linkProgram(this.shaderProgram), + t.linkProgram(this.shaderProgramOff), + !t.getProgramParameter(this.shaderProgram, t.LINK_STATUS)) + ) { + var i = t.getProgramInfoLog(this.shaderProgram); + return ( + _._$Ji("_$L0 to link program: " + i), + this.vertShader && + (t.deleteShader(this.vertShader), (this.vertShader = 0)), + this.fragShader && + (t.deleteShader(this.fragShader), (this.fragShader = 0)), + this.shaderProgram && + (t.deleteProgram(this.shaderProgram), + (this.shaderProgram = 0)), + this.vertShaderOff && + (t.deleteShader(this.vertShaderOff), + (this.vertShaderOff = 0)), + this.fragShaderOff && + (t.deleteShader(this.fragShaderOff), + (this.fragShaderOff = 0)), + this.shaderProgramOff && + (t.deleteProgram(this.shaderProgramOff), + (this.shaderProgramOff = 0)), + !1 + ); + } + return !0; + }), + (mt.prototype.createFramebuffer = function () { + var t = this.gl, + i = at.clippingMaskBufferSize, + e = t.createFramebuffer(); + t.bindFramebuffer(t.FRAMEBUFFER, e); + var r = t.createRenderbuffer(); + t.bindRenderbuffer(t.RENDERBUFFER, r), + t.renderbufferStorage(t.RENDERBUFFER, t.RGBA4, i, i), + t.framebufferRenderbuffer( + t.FRAMEBUFFER, + t.COLOR_ATTACHMENT0, + t.RENDERBUFFER, + r + ); + var o = t.createTexture(); + return ( + t.bindTexture(t.TEXTURE_2D, o), + t.texImage2D( + t.TEXTURE_2D, + 0, + t.RGBA, + i, + i, + 0, + t.RGBA, + t.UNSIGNED_BYTE, + null + ), + t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, t.LINEAR), + t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, t.LINEAR), + t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), + t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), + t.framebufferTexture2D( + t.FRAMEBUFFER, + t.COLOR_ATTACHMENT0, + t.TEXTURE_2D, + o, + 0 + ), + t.bindTexture(t.TEXTURE_2D, null), + t.bindRenderbuffer(t.RENDERBUFFER, null), + t.bindFramebuffer(t.FRAMEBUFFER, null), + (at.fTexture[this.glno] = o), + { + framebuffer: e, + renderbuffer: r, + texture: at.fTexture[this.glno], + } + ); + }), + (St.prototype._$fP = function () { + var t, + i, + e, + r = this._$ST(); + if (0 == (128 & r)) return 255 & r; + if (0 == (128 & (t = this._$ST()))) + return ((127 & r) << 7) | (127 & t); + if (0 == (128 & (i = this._$ST()))) + return ((127 & r) << 14) | ((127 & t) << 7) | (255 & i); + if (0 == (128 & (e = this._$ST()))) + return ( + ((127 & r) << 21) | + ((127 & t) << 14) | + ((127 & i) << 7) | + (255 & e) + ); + throw new lt("_$L _$0P _"); + }), + (St.prototype.getFormatVersion = function () { + return this._$S2; + }), + (St.prototype._$gr = function (t) { + this._$S2 = t; + }), + (St.prototype._$3L = function () { + return this._$fP(); + }), + (St.prototype._$mP = function () { + return ( + this._$zT(), (this._$F += 8), this._$T.getFloat64(this._$F - 8) + ); + }), + (St.prototype._$_T = function () { + return ( + this._$zT(), (this._$F += 4), this._$T.getFloat32(this._$F - 4) + ); + }), + (St.prototype._$6L = function () { + return ( + this._$zT(), (this._$F += 4), this._$T.getInt32(this._$F - 4) + ); + }), + (St.prototype._$ST = function () { + return this._$zT(), this._$T.getInt8(this._$F++); + }), + (St.prototype._$9T = function () { + return ( + this._$zT(), (this._$F += 2), this._$T.getInt16(this._$F - 2) + ); + }), + (St.prototype._$2T = function () { + throw (this._$zT(), (this._$F += 8), new lt("_$L _$q read long")); + }), + (St.prototype._$po = function () { + return this._$zT(), 0 != this._$T.getInt8(this._$F++); + }); + var xt = !0; + (St.prototype._$bT = function () { + this._$zT(); + var t = this._$3L(), + i = null; + if (xt) + try { + var e = new ArrayBuffer(2 * t); + i = new Uint16Array(e); + for (var r = 0; r < t; ++r) i[r] = this._$T.getUint8(this._$F++); + return String.fromCharCode.apply(null, i); + } catch (t) { + xt = !1; + } + try { + var o = new Array(); + if (null == i) + for (var r = 0; r < t; ++r) o[r] = this._$T.getUint8(this._$F++); + else for (var r = 0; r < t; ++r) o[r] = i[r]; + return String.fromCharCode.apply(null, o); + } catch (t) { + console.log("read utf8 / _$rT _$L0 !! : " + t); + } + }), + (St.prototype._$cS = function () { + this._$zT(); + for (var t = this._$3L(), i = new Int32Array(t), e = 0; e < t; e++) + (i[e] = this._$T.getInt32(this._$F)), (this._$F += 4); + return i; + }), + (St.prototype._$Tb = function () { + this._$zT(); + for ( + var t = this._$3L(), i = new Float32Array(t), e = 0; + e < t; + e++ + ) + (i[e] = this._$T.getFloat32(this._$F)), (this._$F += 4); + return i; + }), + (St.prototype._$5b = function () { + this._$zT(); + for ( + var t = this._$3L(), i = new Float64Array(t), e = 0; + e < t; + e++ + ) + (i[e] = this._$T.getFloat64(this._$F)), (this._$F += 8); + return i; + }), + (St.prototype._$nP = function () { + return this._$Jb(-1); + }), + (St.prototype._$Jb = function (t) { + if ((this._$zT(), t < 0 && (t = this._$3L()), t == G._$7P)) { + var i = this._$6L(); + if (0 <= i && i < this._$Ko.length) return this._$Ko[i]; + throw new lt("_$sL _$4i @_$m0"); + } + var e = this._$4b(t); + return this._$Ko.push(e), e; + }), + (St.prototype._$4b = function (t) { + if (0 == t) return null; + if (50 == t) { + var i = this._$bT(), + e = b.getID(i); + return e; + } + if (51 == t) { + var i = this._$bT(), + e = yt.getID(i); + return e; + } + if (134 == t) { + var i = this._$bT(), + e = l.getID(i); + return e; + } + if (60 == t) { + var i = this._$bT(), + e = u.getID(i); + return e; + } + if (t >= 48) { + var r = G._$9o(t); + return null != r ? (r._$F0(this), r) : null; + } + switch (t) { + case 1: + return this._$bT(); + case 10: + return new n(this._$6L(), !0); + case 11: + return new S( + this._$mP(), + this._$mP(), + this._$mP(), + this._$mP() + ); + case 12: + return new S( + this._$_T(), + this._$_T(), + this._$_T(), + this._$_T() + ); + case 13: + return new L(this._$mP(), this._$mP()); + case 14: + return new L(this._$_T(), this._$_T()); + case 15: + for (var o = this._$3L(), e = new Array(o), s = 0; s < o; s++) + e[s] = this._$nP(); + return e; + case 17: + var e = new F( + this._$mP(), + this._$mP(), + this._$mP(), + this._$mP(), + this._$mP(), + this._$mP() + ); + return e; + case 21: + return new h( + this._$6L(), + this._$6L(), + this._$6L(), + this._$6L() + ); + case 22: + return new pt(this._$6L(), this._$6L()); + case 23: + throw new Error("_$L _$ro "); + case 16: + case 25: + return this._$cS(); + case 26: + return this._$5b(); + case 27: + return this._$Tb(); + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 18: + case 19: + case 20: + case 24: + case 28: + throw new lt("_$6 _$q : _$nP() of 2-9 ,18,19,20,24,28 : " + t); + default: + throw new lt("_$6 _$q : _$nP() NO _$i : " + t); + } + }), + (St.prototype._$8L = function () { + return ( + 0 == this._$hL + ? (this._$v0 = this._$ST()) + : 8 == this._$hL && + ((this._$v0 = this._$ST()), (this._$hL = 0)), + 1 == ((this._$v0 >> (7 - this._$hL++)) & 1) + ); + }), + (St.prototype._$zT = function () { + 0 != this._$hL && (this._$hL = 0); + }), + (vt.prototype._$wP = function (t, i, e) { + for (var r = 0; r < e; r++) { + for (var o = 0; o < i; o++) { + var n = 2 * (o + r * i); + console.log("(% 7.3f , % 7.3f) , ", t[n], t[n + 1]); + } + console.log("\n"); + } + console.log("\n"); + }), + (Lt._$2S = Math.PI / 180), + (Lt._$bS = Math.PI / 180), + (Lt._$wS = 180 / Math.PI), + (Lt._$NS = 180 / Math.PI), + (Lt.PI_F = Math.PI), + (Lt._$kT = [ + 0, 0.012368, 0.024734, 0.037097, 0.049454, 0.061803, 0.074143, + 0.086471, 0.098786, 0.111087, 0.12337, 0.135634, 0.147877, 0.160098, + 0.172295, 0.184465, 0.196606, 0.208718, 0.220798, 0.232844, + 0.244854, 0.256827, 0.268761, 0.280654, 0.292503, 0.304308, + 0.316066, 0.327776, 0.339436, 0.351044, 0.362598, 0.374097, + 0.385538, 0.396921, 0.408243, 0.419502, 0.430697, 0.441826, + 0.452888, 0.463881, 0.474802, 0.485651, 0.496425, 0.507124, + 0.517745, 0.528287, 0.538748, 0.549126, 0.559421, 0.56963, 0.579752, + 0.589785, 0.599728, 0.609579, 0.619337, 0.629, 0.638567, 0.648036, + 0.657406, 0.666676, 0.675843, 0.684908, 0.693867, 0.70272, 0.711466, + 0.720103, 0.72863, 0.737045, 0.745348, 0.753536, 0.76161, 0.769566, + 0.777405, 0.785125, 0.792725, 0.800204, 0.807561, 0.814793, + 0.821901, 0.828884, 0.835739, 0.842467, 0.849066, 0.855535, + 0.861873, 0.868079, 0.874153, 0.880093, 0.885898, 0.891567, + 0.897101, 0.902497, 0.907754, 0.912873, 0.917853, 0.922692, 0.92739, + 0.931946, 0.936359, 0.940629, 0.944755, 0.948737, 0.952574, + 0.956265, 0.959809, 0.963207, 0.966457, 0.96956, 0.972514, 0.97532, + 0.977976, 0.980482, 0.982839, 0.985045, 0.987101, 0.989006, + 0.990759, 0.992361, 0.993811, 0.995109, 0.996254, 0.997248, + 0.998088, 0.998776, 0.999312, 0.999694, 0.999924, 1, + ]), + (Lt._$92 = function (t, i) { + var e = Math.atan2(t[1], t[0]), + r = Math.atan2(i[1], i[0]); + return Lt._$tS(e, r); + }), + (Lt._$tS = function (t, i) { + for (var e = t - i; e < -Math.PI; ) e += 2 * Math.PI; + for (; e > Math.PI; ) e -= 2 * Math.PI; + return e; + }), + (Lt._$9 = function (t) { + return Math.sin(t); + }), + (Lt.fcos = function (t) { + return Math.cos(t); + }), + (Mt.prototype._$u2 = function () { + return this._$IS[0]; + }), + (Mt.prototype._$yo = function () { + return this._$AT && !this._$IS[0]; + }), + (Mt.prototype._$GT = function () { + return this._$e0; + }), + (Et._$W2 = 0), + (Et.SYSTEM_INFO = null), + (Et.USER_AGENT = navigator.userAgent), + (Et.isIPhone = function () { + return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isIPhone; + }), + (Et.isIOS = function () { + return ( + Et.SYSTEM_INFO || Et.setup(), + Et.SYSTEM_INFO._isIPhone || Et.SYSTEM_INFO._isIPad + ); + }), + (Et.isAndroid = function () { + return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isAndroid; + }), + (Et.getOSVersion = function () { + return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO.version; + }), + (Et.getOS = function () { + return ( + Et.SYSTEM_INFO || Et.setup(), + Et.SYSTEM_INFO._isIPhone || Et.SYSTEM_INFO._isIPad + ? "iOS" + : Et.SYSTEM_INFO._isAndroid + ? "Android" + : "_$Q0 OS" + ); + }), + (Et.setup = function () { + function t(t, i) { + for ( + var e = t.substring(i).split(/[ _,;\.]/), r = 0, o = 0; + o <= 2 && !isNaN(e[o]); + o++ + ) { + var n = parseInt(e[o]); + if (n < 0 || n > 999) { + _._$li("err : " + n + " @UtHtml5.setup()"), (r = 0); + break; + } + r += n * Math.pow(1e3, 2 - o); + } + return r; + } + var i, + e = Et.USER_AGENT, + r = (Et.SYSTEM_INFO = { userAgent: e }); + if ((i = e.indexOf("iPhone OS ")) >= 0) + (r.os = "iPhone"), + (r._isIPhone = !0), + (r.version = t(e, i + "iPhone OS ".length)); + else if ((i = e.indexOf("iPad")) >= 0) { + if ((i = e.indexOf("CPU OS")) < 0) + return void _._$li(" err : " + e + " @UtHtml5.setup()"); + (r.os = "iPad"), + (r._isIPad = !0), + (r.version = t(e, i + "CPU OS ".length)); + } else + (i = e.indexOf("Android")) >= 0 + ? ((r.os = "Android"), + (r._isAndroid = !0), + (r.version = t(e, i + "Android ".length))) + : ((r.os = "-"), (r.version = -1)); + }), + (window.UtSystem = w), + (window.UtDebug = _), + (window.LDTransform = gt), + (window.LDGL = nt), + (window.Live2D = at), + (window.Live2DModelWebGL = ft), + (window.Live2DModelJS = q), + (window.Live2DMotion = J), + (window.MotionQueueManager = ct), + (window.PhysicsHair = f), + (window.AMotion = s), + (window.PartsDataID = l), + (window.DrawDataID = b), + (window.BaseDataID = yt), + (window.ParamID = u), + at.init(); + var At = !1; + })(); + }).call(i, e(7)); + }, + function (t, i) { + t.exports = { + import: function () { + throw new Error("System.import cannot be used indirectly"); + }, + }; + }, + function (t, i, e) { + "use strict"; + function r(t) { + return t && t.__esModule ? t : { default: t }; + } + function o() { + (this.models = []), + (this.count = -1), + (this.reloadFlg = !1), + Live2D.init(), + n.Live2DFramework.setPlatformManager(new _.default()); + } + Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = o); + var n = e(0), + s = e(9), + _ = r(s), + a = e(10), + h = r(a), + l = e(1), + $ = r(l); + (o.prototype.createModel = function () { + var t = new h.default(); + return this.models.push(t), t; + }), + (o.prototype.changeModel = function (t, i) { + if (this.reloadFlg) { + this.reloadFlg = !1; + this.releaseModel(0, t), + this.createModel(), + this.models[0].load(t, i); + } + }), + (o.prototype.getModel = function (t) { + return t >= this.models.length ? null : this.models[t]; + }), + (o.prototype.releaseModel = function (t, i) { + this.models.length <= t || + (this.models[t].release(i), + delete this.models[t], + this.models.splice(t, 1)); + }), + (o.prototype.numModels = function () { + return this.models.length; + }), + (o.prototype.setDrag = function (t, i) { + for (var e = 0; e < this.models.length; e++) + this.models[e].setDrag(t, i); + }), + (o.prototype.maxScaleEvent = function () { + $.default.DEBUG_LOG && console.log("Max scale event."); + for (var t = 0; t < this.models.length; t++) + this.models[t].startRandomMotion( + $.default.MOTION_GROUP_PINCH_IN, + $.default.PRIORITY_NORMAL + ); + }), + (o.prototype.minScaleEvent = function () { + $.default.DEBUG_LOG && console.log("Min scale event."); + for (var t = 0; t < this.models.length; t++) + this.models[t].startRandomMotion( + $.default.MOTION_GROUP_PINCH_OUT, + $.default.PRIORITY_NORMAL + ); + }), + (o.prototype.tapEvent = function (t, i) { + $.default.DEBUG_LOG && console.log("tapEvent view x:" + t + " y:" + i); + for (var e = 0; e < this.models.length; e++) + this.models[e].hitTest($.default.HIT_AREA_HEAD, t, i) + ? ($.default.DEBUG_LOG && console.log("Tap face."), + this.models[e].setRandomExpression()) + : this.models[e].hitTest($.default.HIT_AREA_BODY, t, i) + ? ($.default.DEBUG_LOG && + console.log("Tap body. models[" + e + "]"), + this.models[e].startRandomMotion( + $.default.MOTION_GROUP_TAP_BODY, + $.default.PRIORITY_NORMAL + )) + : this.models[e].hitTestCustom("head", t, i) + ? ($.default.DEBUG_LOG && console.log("Tap face."), + this.models[e].startRandomMotion( + $.default.MOTION_GROUP_FLICK_HEAD, + $.default.PRIORITY_NORMAL + )) + : this.models[e].hitTestCustom("body", t, i) && + ($.default.DEBUG_LOG && + console.log("Tap body. models[" + e + "]"), + this.models[e].startRandomMotion( + $.default.MOTION_GROUP_TAP_BODY, + $.default.PRIORITY_NORMAL + )); + return !0; + }); + }, + function (t, i, e) { + "use strict"; + function r() {} + Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = r); + var o = e(2); + var requestCache = {}; + (r.prototype.loadBytes = function (t, i) { + if (requestCache[t] !== undefined) { + i(requestCache[t]); + return; + } + var e = new XMLHttpRequest(); + e.open("GET", t, !0), + (e.responseType = "arraybuffer"), + (e.onload = function () { + switch (e.status) { + case 200: + requestCache[t] = e.response; + i(e.response); + break; + default: + console.error("Failed to load (" + e.status + ") : " + t); + } + }), + e.send(null); + }), + (r.prototype.loadString = function (t) { + this.loadBytes(t, function (t) { + return t; + }); + }), + (r.prototype.loadLive2DModel = function (t, i) { + var e = null; + this.loadBytes(t, function (t) { + (e = Live2DModelWebGL.loadModel(t)), i(e); + }); + }), + (r.prototype.loadTexture = function (t, i, e, r) { + var n = new Image(); + (n.crossOrigin = "Anonymous"), (n.src = e); + (n.onload = function () { + var e = (0, o.getContext)(), + s = e.createTexture(); + if (!s) + return console.error("Failed to generate gl texture name."), -1; + 0 == t.isPremultipliedAlpha() && + e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1), + e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, 1), + e.activeTexture(e.TEXTURE0), + e.bindTexture(e.TEXTURE_2D, s), + e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, n), + e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), + e.texParameteri( + e.TEXTURE_2D, + e.TEXTURE_MIN_FILTER, + e.LINEAR_MIPMAP_NEAREST + ), + e.generateMipmap(e.TEXTURE_2D), + t.setTexture(i, s), + (s = null), + "function" == typeof r && r(); + }), + (n.onerror = function () { + console.error("Failed to load image : " + e); + }); + }), + (r.prototype.jsonParseFromBytes = function (t) { + var i, + e = new Uint8Array(t, 0, 3); + return ( + (i = + 239 == e[0] && 187 == e[1] && 191 == e[2] + ? String.fromCharCode.apply(null, new Uint8Array(t, 3)) + : String.fromCharCode.apply(null, new Uint8Array(t))), + JSON.parse(i) + ); + }), + (r.prototype.log = function (t) {}); + }, + function (t, i, e) { + "use strict"; + function r(t) { + return t && t.__esModule ? t : { default: t }; + } + function o() { + n.L2DBaseModel.prototype.constructor.call(this), + (this.modelHomeDir = ""), + (this.modelSetting = null), + (this.tmpMatrix = []); + } + Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = o); + var n = e(0), + s = e(11), + _ = r(s), + a = e(1), + h = r(a), + l = e(3), + $ = r(l); + (o.prototype = new n.L2DBaseModel()), + (o.prototype.load = function (t, i, e) { + this.setUpdating(!0), + this.setInitialized(!1), + (this.modelHomeDir = i.substring(0, i.lastIndexOf("/") + 1)), + (this.modelSetting = new _.default()); + var r = this; + this.modelSetting.loadModelSetting(i, function () { + var t = r.modelHomeDir + r.modelSetting.getModelFile(); + r.loadModelData(t, function (t) { + for (var i = 0; i < r.modelSetting.getTextureNum(); i++) { + if (/^https?:\/\/|^\/\//i.test(r.modelSetting.getTextureFile(i))) + var o = r.modelSetting.getTextureFile(i); + else var o = r.modelHomeDir + r.modelSetting.getTextureFile(i); + r.loadTexture(i, o, function () { + if (r.isTexLoaded) { + if (r.modelSetting.getExpressionNum() > 0) { + r.expressions = {}; + for ( + var t = 0; + t < r.modelSetting.getExpressionNum(); + t++ + ) { + var i = r.modelSetting.getExpressionName(t), + o = + r.modelHomeDir + r.modelSetting.getExpressionFile(t); + r.loadExpression(i, o); + } + } else (r.expressionManager = null), (r.expressions = {}); + if ( + (r.eyeBlink, + null != r.modelSetting.getPhysicsFile() + ? r.loadPhysics( + r.modelHomeDir + r.modelSetting.getPhysicsFile() + ) + : (r.physics = null), + null != r.modelSetting.getPoseFile() + ? r.loadPose( + r.modelHomeDir + r.modelSetting.getPoseFile(), + function () { + r.pose.updateParam(r.live2DModel); + } + ) + : (r.pose = null), + null != r.modelSetting.getLayout()) + ) { + var n = r.modelSetting.getLayout(); + null != n.width && r.modelMatrix.setWidth(n.width), + null != n.height && r.modelMatrix.setHeight(n.height), + null != n.x && r.modelMatrix.setX(n.x), + null != n.y && r.modelMatrix.setY(n.y), + null != n.center_x && r.modelMatrix.centerX(n.center_x), + null != n.center_y && r.modelMatrix.centerY(n.center_y), + null != n.top && r.modelMatrix.top(n.top), + null != n.bottom && r.modelMatrix.bottom(n.bottom), + null != n.left && r.modelMatrix.left(n.left), + null != n.right && r.modelMatrix.right(n.right); + } + if (null != r.modelSetting.getHitAreasCustom()) { + var s = r.modelSetting.getHitAreasCustom(); + null != s.head_x && + (h.default.hit_areas_custom_head_x = s.head_x), + null != s.head_y && + (h.default.hit_areas_custom_head_y = s.head_y), + null != s.body_x && + (h.default.hit_areas_custom_body_x = s.body_x), + null != s.body_y && + (h.default.hit_areas_custom_body_y = s.body_y); + } + for (var t = 0; t < r.modelSetting.getInitParamNum(); t++) + r.live2DModel.setParamFloat( + r.modelSetting.getInitParamID(t), + r.modelSetting.getInitParamValue(t) + ); + for ( + var t = 0; + t < r.modelSetting.getInitPartsVisibleNum(); + t++ + ) + r.live2DModel.setPartsOpacity( + r.modelSetting.getInitPartsVisibleID(t), + r.modelSetting.getInitPartsVisibleValue(t) + ); + r.live2DModel.saveParam(), + r.preloadMotionGroup(h.default.MOTION_GROUP_IDLE), + r.preloadMotionGroup(h.default.MOTION_GROUP_SLEEPY), + r.mainMotionManager.stopAllMotions(), + r.setUpdating(!1), + r.setInitialized(!0), + "function" == typeof e && e(); + } + }); + } + }); + }); + }), + (o.prototype.release = function (t) { + var i = n.Live2DFramework.getPlatformManager(); + t.deleteTexture(i.texture); + }), + (o.prototype.preloadMotionGroup = function (t) { + for (var i = this, e = 0; e < this.modelSetting.getMotionNum(t); e++) { + var r = this.modelSetting.getMotionFile(t, e); + this.loadMotion(r, this.modelHomeDir + r, function (r) { + r.setFadeIn(i.modelSetting.getMotionFadeIn(t, e)), + r.setFadeOut(i.modelSetting.getMotionFadeOut(t, e)); + }); + } + }), + (o.prototype.update = function () { + if (null == this.live2DModel) + return void ( + h.default.DEBUG_LOG && console.error("Failed to update.") + ); + var t = UtSystem.getUserTimeMSec() - this.startTimeMSec, + i = t / 1e3, + e = 2 * i * Math.PI; + if (this.mainMotionManager.isFinished()) { + "1" === sessionStorage.getItem("Sleepy") + ? this.startRandomMotion( + h.default.MOTION_GROUP_SLEEPY, + h.default.PRIORITY_SLEEPY + ) + : this.startRandomMotion( + h.default.MOTION_GROUP_IDLE, + h.default.PRIORITY_IDLE + ); + } + this.live2DModel.loadParam(), + this.mainMotionManager.updateParam(this.live2DModel) || + (null != this.eyeBlink && + this.eyeBlink.updateParam(this.live2DModel)), + this.live2DModel.saveParam(), + null == this.expressionManager || + null == this.expressions || + this.expressionManager.isFinished() || + this.expressionManager.updateParam(this.live2DModel), + this.live2DModel.addToParamFloat("PARAM_ANGLE_X", 30 * this.dragX, 1), + this.live2DModel.addToParamFloat("PARAM_ANGLE_Y", 30 * this.dragY, 1), + this.live2DModel.addToParamFloat( + "PARAM_ANGLE_Z", + this.dragX * this.dragY * -30, + 1 + ), + this.live2DModel.addToParamFloat( + "PARAM_BODY_ANGLE_X", + 10 * this.dragX, + 1 + ), + this.live2DModel.addToParamFloat("PARAM_EYE_BALL_X", this.dragX, 1), + this.live2DModel.addToParamFloat("PARAM_EYE_BALL_Y", this.dragY, 1), + this.live2DModel.addToParamFloat( + "PARAM_ANGLE_X", + Number(15 * Math.sin(e / 6.5345)), + 0.5 + ), + this.live2DModel.addToParamFloat( + "PARAM_ANGLE_Y", + Number(8 * Math.sin(e / 3.5345)), + 0.5 + ), + this.live2DModel.addToParamFloat( + "PARAM_ANGLE_Z", + Number(10 * Math.sin(e / 5.5345)), + 0.5 + ), + this.live2DModel.addToParamFloat( + "PARAM_BODY_ANGLE_X", + Number(4 * Math.sin(e / 15.5345)), + 0.5 + ), + this.live2DModel.setParamFloat( + "PARAM_BREATH", + Number(0.5 + 0.5 * Math.sin(e / 3.2345)), + 1 + ), + null != this.physics && this.physics.updateParam(this.live2DModel), + null == this.lipSync && + this.live2DModel.setParamFloat( + "PARAM_MOUTH_OPEN_Y", + this.lipSyncValue + ), + null != this.pose && this.pose.updateParam(this.live2DModel), + this.live2DModel.update(); + }), + (o.prototype.setRandomExpression = function () { + var t = []; + for (var i in this.expressions) t.push(i); + var e = parseInt(Math.random() * t.length); + this.setExpression(t[e]); + }), + (o.prototype.startRandomMotion = function (t, i) { + var e = this.modelSetting.getMotionNum(t), + r = parseInt(Math.random() * e); + this.startMotion(t, r, i); + }), + (o.prototype.startMotion = function (t, i, e) { + var r = this.modelSetting.getMotionFile(t, i); + if (null == r || "" == r) + return void ( + h.default.DEBUG_LOG && console.error("Failed to motion.") + ); + if (e == h.default.PRIORITY_FORCE) + this.mainMotionManager.setReservePriority(e); + else if (!this.mainMotionManager.reserveMotion(e)) + return void ( + h.default.DEBUG_LOG && console.log("Motion is running.") + ); + var o, + n = this; + null == this.motions[t] + ? this.loadMotion(null, this.modelHomeDir + r, function (r) { + (o = r), n.setFadeInFadeOut(t, i, e, o); + }) + : ((o = this.motions[t]), n.setFadeInFadeOut(t, i, e, o)); + }), + (o.prototype.setFadeInFadeOut = function (t, i, e, r) { + var o = this.modelSetting.getMotionFile(t, i); + if ( + (r.setFadeIn(this.modelSetting.getMotionFadeIn(t, i)), + r.setFadeOut(this.modelSetting.getMotionFadeOut(t, i)), + h.default.DEBUG_LOG && console.log("Start motion : " + o), + null == this.modelSetting.getMotionSound(t, i)) + ) + this.mainMotionManager.startMotionPrio(r, e); + else { + var n = this.modelSetting.getMotionSound(t, i), + s = document.createElement("audio"); + (s.src = this.modelHomeDir + n), + h.default.DEBUG_LOG && console.log("Start sound : " + n), + s.play(), + this.mainMotionManager.startMotionPrio(r, e); + } + }), + (o.prototype.setExpression = function (t) { + var i = this.expressions[t]; + h.default.DEBUG_LOG && console.log("Expression : " + t), + this.expressionManager.startMotion(i, !1); + }), + (o.prototype.draw = function (t) { + $.default.push(), + $.default.multMatrix(this.modelMatrix.getArray()), + (this.tmpMatrix = $.default.getMatrix()), + this.live2DModel.setMatrix(this.tmpMatrix), + this.live2DModel.draw(), + $.default.pop(); + }), + (o.prototype.hitTest = function (t, i, e) { + for (var r = this.modelSetting.getHitAreaNum(), o = 0; o < r; o++) + if (t == this.modelSetting.getHitAreaName(o)) { + var n = this.modelSetting.getHitAreaID(o); + return this.hitTestSimple(n, i, e); + } + return !1; + }), + (o.prototype.hitTestCustom = function (t, i, e) { + return "head" == t + ? this.hitTestSimpleCustom( + h.default.hit_areas_custom_head_x, + h.default.hit_areas_custom_head_y, + i, + e + ) + : "body" == t && + this.hitTestSimpleCustom( + h.default.hit_areas_custom_body_x, + h.default.hit_areas_custom_body_y, + i, + e + ); + }); + }, + function (t, i, e) { + "use strict"; + function r() { + (this.NAME = "name"), + (this.ID = "id"), + (this.MODEL = "model"), + (this.TEXTURES = "textures"), + (this.HIT_AREAS = "hit_areas"), + (this.PHYSICS = "physics"), + (this.POSE = "pose"), + (this.EXPRESSIONS = "expressions"), + (this.MOTION_GROUPS = "motions"), + (this.SOUND = "sound"), + (this.FADE_IN = "fade_in"), + (this.FADE_OUT = "fade_out"), + (this.LAYOUT = "layout"), + (this.HIT_AREAS_CUSTOM = "hit_areas_custom"), + (this.INIT_PARAM = "init_param"), + (this.INIT_PARTS_VISIBLE = "init_parts_visible"), + (this.VALUE = "val"), + (this.FILE = "file"), + (this.json = {}); + } + Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = r); + var o = e(0); + (r.prototype.loadModelSetting = function (t, i) { + var e = this; + o.Live2DFramework.getPlatformManager().loadBytes(t, function (t) { + var r = String.fromCharCode.apply(null, new Uint8Array(t)); + (e.json = JSON.parse(r)), i(); + }); + }), + (r.prototype.getTextureFile = function (t) { + return null == this.json[this.TEXTURES] || + null == this.json[this.TEXTURES][t] + ? null + : this.json[this.TEXTURES][t]; + }), + (r.prototype.getModelFile = function () { + return this.json[this.MODEL]; + }), + (r.prototype.getTextureNum = function () { + return null == this.json[this.TEXTURES] + ? 0 + : this.json[this.TEXTURES].length; + }), + (r.prototype.getHitAreaNum = function () { + return null == this.json[this.HIT_AREAS] + ? 0 + : this.json[this.HIT_AREAS].length; + }), + (r.prototype.getHitAreaID = function (t) { + return null == this.json[this.HIT_AREAS] || + null == this.json[this.HIT_AREAS][t] + ? null + : this.json[this.HIT_AREAS][t][this.ID]; + }), + (r.prototype.getHitAreaName = function (t) { + return null == this.json[this.HIT_AREAS] || + null == this.json[this.HIT_AREAS][t] + ? null + : this.json[this.HIT_AREAS][t][this.NAME]; + }), + (r.prototype.getPhysicsFile = function () { + return this.json[this.PHYSICS]; + }), + (r.prototype.getPoseFile = function () { + return this.json[this.POSE]; + }), + (r.prototype.getExpressionNum = function () { + return null == this.json[this.EXPRESSIONS] + ? 0 + : this.json[this.EXPRESSIONS].length; + }), + (r.prototype.getExpressionFile = function (t) { + return null == this.json[this.EXPRESSIONS] + ? null + : this.json[this.EXPRESSIONS][t][this.FILE]; + }), + (r.prototype.getExpressionName = function (t) { + return null == this.json[this.EXPRESSIONS] + ? null + : this.json[this.EXPRESSIONS][t][this.NAME]; + }), + (r.prototype.getLayout = function () { + return this.json[this.LAYOUT]; + }), + (r.prototype.getHitAreasCustom = function () { + return this.json[this.HIT_AREAS_CUSTOM]; + }), + (r.prototype.getInitParamNum = function () { + return null == this.json[this.INIT_PARAM] + ? 0 + : this.json[this.INIT_PARAM].length; + }), + (r.prototype.getMotionNum = function (t) { + return null == this.json[this.MOTION_GROUPS] || + null == this.json[this.MOTION_GROUPS][t] + ? 0 + : this.json[this.MOTION_GROUPS][t].length; + }), + (r.prototype.getMotionFile = function (t, i) { + return null == this.json[this.MOTION_GROUPS] || + null == this.json[this.MOTION_GROUPS][t] || + null == this.json[this.MOTION_GROUPS][t][i] + ? null + : this.json[this.MOTION_GROUPS][t][i][this.FILE]; + }), + (r.prototype.getMotionSound = function (t, i) { + return null == this.json[this.MOTION_GROUPS] || + null == this.json[this.MOTION_GROUPS][t] || + null == this.json[this.MOTION_GROUPS][t][i] || + null == this.json[this.MOTION_GROUPS][t][i][this.SOUND] + ? null + : this.json[this.MOTION_GROUPS][t][i][this.SOUND]; + }), + (r.prototype.getMotionFadeIn = function (t, i) { + return null == this.json[this.MOTION_GROUPS] || + null == this.json[this.MOTION_GROUPS][t] || + null == this.json[this.MOTION_GROUPS][t][i] || + null == this.json[this.MOTION_GROUPS][t][i][this.FADE_IN] + ? 1e3 + : this.json[this.MOTION_GROUPS][t][i][this.FADE_IN]; + }), + (r.prototype.getMotionFadeOut = function (t, i) { + return null == this.json[this.MOTION_GROUPS] || + null == this.json[this.MOTION_GROUPS][t] || + null == this.json[this.MOTION_GROUPS][t][i] || + null == this.json[this.MOTION_GROUPS][t][i][this.FADE_OUT] + ? 1e3 + : this.json[this.MOTION_GROUPS][t][i][this.FADE_OUT]; + }), + (r.prototype.getInitParamID = function (t) { + return null == this.json[this.INIT_PARAM] || + null == this.json[this.INIT_PARAM][t] + ? null + : this.json[this.INIT_PARAM][t][this.ID]; + }), + (r.prototype.getInitParamValue = function (t) { + return null == this.json[this.INIT_PARAM] || + null == this.json[this.INIT_PARAM][t] + ? NaN + : this.json[this.INIT_PARAM][t][this.VALUE]; + }), + (r.prototype.getInitPartsVisibleNum = function () { + return null == this.json[this.INIT_PARTS_VISIBLE] + ? 0 + : this.json[this.INIT_PARTS_VISIBLE].length; + }), + (r.prototype.getInitPartsVisibleID = function (t) { + return null == this.json[this.INIT_PARTS_VISIBLE] || + null == this.json[this.INIT_PARTS_VISIBLE][t] + ? null + : this.json[this.INIT_PARTS_VISIBLE][t][this.ID]; + }), + (r.prototype.getInitPartsVisibleValue = function (t) { + return null == this.json[this.INIT_PARTS_VISIBLE] || + null == this.json[this.INIT_PARTS_VISIBLE][t] + ? NaN + : this.json[this.INIT_PARTS_VISIBLE][t][this.VALUE]; + }); + }, +]); diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index c6546ef..8afbed0 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -1,5 +1,5 @@ +import type { Live2dConfig } from "../context/config-context"; import { sendMessage } from "../helpers/sendMessage"; -import type { Live2dConfig } from "../types"; import { isNotEmptyString } from "../util/isString"; declare const loadlive2d: any; @@ -20,8 +20,9 @@ interface ModelResult { class Model { #apiPath: string; #config: Live2dConfig; + #live2dRootElement: HTMLElement; - constructor(config: Live2dConfig) { + constructor(root: HTMLElement, config: Live2dConfig) { const apiPath = config.apiPath; if (!isNotEmptyString(apiPath)) { throw new Error("Invalid initWidget argument!"); @@ -29,6 +30,20 @@ class Model { this.#apiPath = apiPath.endsWith("/") ? apiPath : `${apiPath}/`; this.#config = config; + this.#live2dRootElement = root; + + this._loadingModel(); + } + + private _loadingModel() { + let modelId = localStorage.getItem("modelId"); + let modelTexturesId = localStorage.getItem("modelTexturesId"); + if (modelId === null || !!this.#config.isForceUseDefaultConfig) { + // 加载指定模型的指定材质 + modelId = String(this.#config.modelId || 1); // 模型 ID + modelTexturesId = String(this.#config.modelTexturesId || 53); // 材质 ID + } + this.loadModel(Number(modelId), Number(modelTexturesId), "Live2D 模型加载中..."); } /** @@ -38,17 +53,17 @@ class Model { * @param modelTexturesId 纹理编号 * @param text 加载时的消息 */ - async loadModel(modelId: number, modelTexturesId: number, text: string) { + async loadModel(modelId: number, modelTexturesId: number, text?: string) { localStorage.setItem("modelId", String(modelId)); localStorage.setItem("modelTexturesId", String(modelTexturesId)); // 发送消息事件 - sendMessage(text, 4000, 3); + if (text) { + sendMessage(text, 4000, 3); + } loadlive2d( - "live2d", + this.#live2dRootElement, `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, - this.#config.consoleShowStatus === true - ? console.log(`[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`) - : null + console.log(`[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`) ); } diff --git a/packages/live2d/src/types/index.ts b/packages/live2d/src/types/index.ts deleted file mode 100644 index 55345db..0000000 --- a/packages/live2d/src/types/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface Live2dToggleEventDetail { - // 是否显示看板娘 - isShow: boolean; -} - -export interface Live2dMessageEventDetail { - // 消息内容 - text: string; - // 消息显示时间 - timeout: number; - // 消息优先级 - priority: number; -} \ No newline at end of file diff --git a/packages/live2d/src/util/distinctArray.ts b/packages/live2d/src/util/distinctArray.ts new file mode 100644 index 0000000..4286249 --- /dev/null +++ b/packages/live2d/src/util/distinctArray.ts @@ -0,0 +1,7 @@ +export const distinctArray = (arr: T[], key: string) => { + const map = new Map(); + for (const item of arr) { + map.set(item[key], item); + } + return [...map.values()]; +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7df699b..4286167 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: packages/live2d: dependencies: + '@lit/context': + specifier: ^1.1.3 + version: 1.1.3 '@lit/react': specifier: ^1.0.7 version: 1.0.7(@types/react@19.0.8) @@ -524,6 +527,9 @@ packages: '@lit-labs/ssr-dom-shim@1.3.0': resolution: {integrity: sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ==} + '@lit/context@1.1.3': + resolution: {integrity: sha512-Auh37F4S0PZM93HTDfZWs97mmzaQ7M3vnTc9YvxAGyP3UItSK/8Fs0vTOGT+njuvOwbKio/l8Cx/zWL4vkutpQ==} + '@lit/react@1.0.7': resolution: {integrity: sha512-cencnwwLXQKiKxjfFzSgZRngcWJzUDZi/04E0fSaF86wZgchMdvTyu+lE36DrUfvuus3bH8+xLPrhM1cTjwpzw==} peerDependencies: @@ -1757,6 +1763,10 @@ snapshots: '@lit-labs/ssr-dom-shim@1.3.0': {} + '@lit/context@1.1.3': + dependencies: + '@lit/reactive-element': 2.0.4 + '@lit/react@1.0.7(@types/react@19.0.8)': dependencies: '@types/react': 19.0.8 From c8af98bee2a152915ccd4beef9b123f59a1e8de6 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 13 Feb 2025 02:29:35 +0800 Subject: [PATCH 06/26] refactor: complete refactoring of user message registration feature --- packages/live2d/src/common/UnoLitElement.ts | 2 +- .../live2d/src/components/Live2dCanvas.tsx | 3 +- packages/live2d/src/components/Live2dTips.tsx | 12 +- .../live2d/src/components/Live2dToggle.tsx | 3 +- .../live2d/src/components/Live2dWidget.tsx | 1 - packages/live2d/src/context/config-context.ts | 54 +++-- packages/live2d/src/events/event.d.ts | 49 +++- packages/live2d/src/events/index.ts | 2 +- packages/live2d/src/events/load-tips.ts | 46 ---- packages/live2d/src/events/tip-events.ts | 217 ++++++++++++++++++ packages/live2d/src/events/types.ts | 27 --- .../live2d/src/helpers/dateWithinRange.ts | 26 +++ packages/live2d/src/helpers/getPluginTips.ts | 9 +- .../live2d/src/helpers/loadTipsResource.ts | 1 + packages/live2d/src/helpers/mergeTips.ts | 2 +- .../live2d/src/helpers/pluginTipsCovert.ts | 29 --- packages/live2d/src/helpers/sendMessage.ts | 9 +- .../live2d/src/helpers/timeWithinRange.ts | 24 ++ packages/live2d/src/live2d/model.ts | 2 +- packages/live2d/src/util/distinctArray.ts | 7 - packages/live2d/src/utils/distinctArray.ts | 9 + packages/live2d/src/utils/isNotEmpty.ts | 5 + .../live2d/src/{util => utils}/isString.ts | 0 packages/live2d/src/utils/randomSelection.ts | 9 + .../{util/UnoMixin.ts => utils/unoMixin.ts} | 0 packages/live2d/src/utils/util.ts | 37 +++ .../resources/static/js/live2d-autoload.js | 22 +- 27 files changed, 442 insertions(+), 165 deletions(-) delete mode 100644 packages/live2d/src/events/load-tips.ts create mode 100644 packages/live2d/src/events/tip-events.ts delete mode 100644 packages/live2d/src/events/types.ts create mode 100644 packages/live2d/src/helpers/dateWithinRange.ts delete mode 100644 packages/live2d/src/helpers/pluginTipsCovert.ts create mode 100644 packages/live2d/src/helpers/timeWithinRange.ts delete mode 100644 packages/live2d/src/util/distinctArray.ts create mode 100644 packages/live2d/src/utils/distinctArray.ts create mode 100644 packages/live2d/src/utils/isNotEmpty.ts rename packages/live2d/src/{util => utils}/isString.ts (100%) create mode 100644 packages/live2d/src/utils/randomSelection.ts rename packages/live2d/src/{util/UnoMixin.ts => utils/unoMixin.ts} (100%) create mode 100644 packages/live2d/src/utils/util.ts diff --git a/packages/live2d/src/common/UnoLitElement.ts b/packages/live2d/src/common/UnoLitElement.ts index bf940fc..af5257c 100644 --- a/packages/live2d/src/common/UnoLitElement.ts +++ b/packages/live2d/src/common/UnoLitElement.ts @@ -1,4 +1,4 @@ import { LitElement } from "lit"; -import { UNO } from "../util/UnoMixin"; +import { UNO } from "../utils/unoMixin"; export const UnoLitElement = UNO(LitElement) \ No newline at end of file diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index fdd32fb..5d738a3 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -7,7 +7,6 @@ import Model from "../live2d/model"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; import "../libs/live2d.min.js"; -import { LIVE2D_BEFORE_INIT_EVENT } from "../events/types.js"; export class Live2dCanvas extends UnoLitElement { @consume({ context: configContext }) @@ -32,7 +31,7 @@ export class Live2dCanvas extends UnoLitElement { super.connectedCallback(); // 发出 Live2d beforeInit 事件 window.dispatchEvent( - new CustomEvent(LIVE2D_BEFORE_INIT_EVENT, { + new CustomEvent("live2d:before-init", { detail: { config: this.config, }, diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 4e945db..af5bcf2 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -2,10 +2,6 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import { - LIVE2d_MESSAGE_EVENT, - type Live2dMessageEventDetail, -} from "../events/types"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; import { property } from "lit/decorators.js"; @@ -27,20 +23,20 @@ export class Live2dTips extends UnoLitElement { super.connectedCallback(); // 为 tips 注册 tips 相关事件 window.addEventListener( - LIVE2d_MESSAGE_EVENT, + "live2d:send-message", this.handleMessage as EventListener, ); } disconnectedCallback(): void { - super.connectedCallback(); + super.disconnectedCallback(); window.removeEventListener( - LIVE2d_MESSAGE_EVENT, + "live2d:send-message", this.handleMessage as EventListener, ); } - handleMessage(e: CustomEvent) { + handleMessage(e: CustomEvent): void { console.log(e.detail); return; } diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 8a5f007..aa46cb5 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -2,7 +2,6 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import { type Live2dToggleEventDetail, TOGGLE_CANVAS_EVENT } from "../events/types"; import { state } from "lit/decorators.js"; export class Live2dToggle extends UnoLitElement { @@ -49,7 +48,7 @@ export class Live2dToggle extends UnoLitElement { localStorage.setItem("live2d-display", Date.now().toString()); } this.dispatchEvent( - new CustomEvent(TOGGLE_CANVAS_EVENT, { + new CustomEvent("live2d:toggle-canvas", { bubbles: true, composed: true, detail: { diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index c71c272..9b9abf9 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -7,7 +7,6 @@ import { state } from "lit/decorators.js"; import "./Live2dToggle"; import "./Live2dTips"; import "./Live2dCanvas"; -import type { Live2dToggleEventDetail } from "../events/types"; export class Live2dWidget extends UnoLitElement { @state() diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index 915e1c4..8720415 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,24 +1,40 @@ import { createContext } from '@lit/context'; +export interface ObjectAny extends Record { } + +export interface TipMouseover extends ObjectAny { + selector: string; + text: string[] | string; +} + +export interface TipClick extends ObjectAny { + selector: string; + text: string[] | string; +} + +export interface TipSeason extends ObjectAny { + date: string; + text: string[] | string; +} + +export interface TipTime extends ObjectAny { + hour: string; + text: string[] | string; +} + +export interface TipMessage extends ObjectAny { + default?: string[] | string; + console?: string[] | string; + copy?: string[] | string; + visibilitychange?: string[] | string; +} + export interface TipConfig { - mouseover: { - selector: string; - text: string[] | string; - }[]; - click: { - selector: string; - text: string[] | string; - }[]; - seasons: { - date: string; - text: string[] | string; - }[]; - message: { - default?: string[] | string; - console?: string[] | string; - copy?: string[] | string; - visibilitychange?: string[] | string; - } + mouseover: TipMouseover[]; + click: TipClick[]; + seasons: TipSeason[]; + time: TipTime[]; + message: TipMessage; } export interface Live2dConfig { @@ -54,6 +70,8 @@ export interface Live2dConfig { copyContentTip: string[] | string; // 控制台打印 tips openConsoleTip: string[] | string; + // 首次打开站点是否显示 tips + firstOpenSite?: boolean [key: string]: unknown; } diff --git a/packages/live2d/src/events/event.d.ts b/packages/live2d/src/events/event.d.ts index dbb1ea5..417d7ca 100644 --- a/packages/live2d/src/events/event.d.ts +++ b/packages/live2d/src/events/event.d.ts @@ -1,8 +1,55 @@ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */ +interface CustomEvent extends Event { + /** + * Returns any custom data event was created with. Typically used for synthetic events. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) + */ + readonly detail: T; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/initCustomEvent) + */ + initCustomEvent(type: keyof GlobalEventHandlersEventMap, bubbles?: boolean, cancelable?: boolean, detail?: T): void; +} + + // 扩展全局事件映射 interface GlobalEventHandlersEventMap { + // Live2d beforeInit 事件 "live2d:before-init": CustomEvent; + // 切换 canvas 显示状态事件 "live2d:toggle-canvas": CustomEvent; + // 发送 Live2D 消息事件 "live2d:send-message": CustomEvent; -} \ No newline at end of file + + // 添加默认消息事件 + "live2d:add-default-message": CustomEvent; +} + +interface Live2dMessageEventDetail { + // 消息内容 + text: string[] | string; + // 消息显示时间 + timeout: number; + // 消息优先级 + priority: number; +} + +interface Live2dBeforeInitEventDetail { + // Live2D 配置 + config: Live2dConfig +} + +interface Live2dToggleEventDetail { + // 是否显示看板娘 + isShow: boolean; +} + +interface Live2dAddDefaultMessageEventDetail { + // 默认消息 + message: string[] | string; +} diff --git a/packages/live2d/src/events/index.ts b/packages/live2d/src/events/index.ts index 73f237c..aca30bc 100644 --- a/packages/live2d/src/events/index.ts +++ b/packages/live2d/src/events/index.ts @@ -1 +1 @@ -import "./load-tips"; \ No newline at end of file +import "./tip-events"; \ No newline at end of file diff --git a/packages/live2d/src/events/load-tips.ts b/packages/live2d/src/events/load-tips.ts deleted file mode 100644 index aed124a..0000000 --- a/packages/live2d/src/events/load-tips.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { Live2dConfig, TipConfig } from "../context/config-context"; -import { getPluginTips } from "../helpers/getPluginTips"; -import { loadTipsResource } from "../helpers/loadTipsResource"; -import { mergeTips } from "../helpers/mergeTips"; -import { isNotEmptyString } from "../util/isString"; - -window.addEventListener("live2d:before-init", async (e) => { - const config = e.detail.config; - const tips = await _loadTips(config); - console.log("tips", tips); -}) - -const _loadTips = async (config: Live2dConfig) => { - if (!config) { - return; - } - // 后台配置 tips,其中包含 mouseover 及 click 两种配置,以及单独配置的 message - const pluginTips = getPluginTips(config); - // 主题设置 tips,只会包含 mouseover 及 click 两种配置(会过滤掉其他配置) - const themeTipsResult = await loadTipsResource(config.themeTipsPath); - const themeTips: TipConfig = { - click: themeTipsResult?.click || [], - mouseover: themeTipsResult?.mouseover || [], - seasons: [], - message: {}, - }; - const fullOrDefaultTips = await _getFullOrDefaultTips(config); - // 合并三种 tips - return mergeTips({ - pluginTips, - themeTips, - fullOrDefaultTips, - }); -} - -export const _getFullOrDefaultTips = async (config: Live2dConfig): Promise => { - // 获取插件文件中的全量 tips 文件 - if (isNotEmptyString(config?.tipsPath)) { - const tipsResult = await loadTipsResource(config.tipsPath); - if (tipsResult) { - return tipsResult; - } - } - // 获取默认的 tips 文件 - return (await import("../libs/live2d-tips.json")).default; -} diff --git a/packages/live2d/src/events/tip-events.ts b/packages/live2d/src/events/tip-events.ts new file mode 100644 index 0000000..8f52fa6 --- /dev/null +++ b/packages/live2d/src/events/tip-events.ts @@ -0,0 +1,217 @@ +import type { Live2dConfig, TipClick, TipConfig, TipMessage, TipMouseover, TipSeason, TipTime } from "../context/config-context"; +import { dataWithinRange } from "../helpers/dateWithinRange"; +import { getPluginTips } from "../helpers/getPluginTips"; +import { loadTipsResource } from "../helpers/loadTipsResource"; +import { mergeTips } from "../helpers/mergeTips"; +import { sendMessage } from "../helpers/sendMessage"; +import { timeWithinRange } from "../helpers/timeWithinRange"; +import { isNotEmptyString, isString } from "../utils/isString"; +import { randomSelection } from "../utils/randomSelection"; +import { documentTitle, getReferrerDomain, hasWebsiteHome } from "../utils/util"; + +window.addEventListener("live2d:before-init", async (e) => { + const config = e.detail.config; + const tips = await _loadTips(config); + if (!tips) { + return; + } + _registerTipEventListener(config, tips); +}) + +const _getWelComeMessage = (times: TipTime[]) => { + if (hasWebsiteHome) { + for (const { hour, text } of times) { + if (timeWithinRange(hour)) { + return text; + } + } + } + + const message = `欢迎阅读「${documentTitle}」`; + const domain = getReferrerDomain(); + return domain ? `Hello!来自 ${domain} 的朋友
${message}` : message; +} + +const _welcomeEvent = (times: TipTime[]) => { + const message = _getWelComeMessage(times); + if (!message) { + return; + } + sendMessage(message, 7000, 4); +} + +const _holidayEvent = (seasons: TipSeason[]) => { + for (const { date, text } of seasons) { + if (dataWithinRange(date)) { + window.dispatchEvent( + new CustomEvent("live2d:add-default-message", { + detail: { + message: text, + } + }) + ); + } + } +} + +const _userLeaveEvent = (message: TipMessage) => { + const { visibilitychange } = message; + document.addEventListener("visibilitychange", () => { + if (!document.hidden) { + sendMessage(visibilitychange, 6000, 2); + } + }); +} + +const _userCopyEvent = (message: TipMessage) => { + const { copy } = message; + window.addEventListener("copy", () => { + sendMessage(copy, 6000, 2); + }); +} + +const _userOpenConsoleEvent = (message: TipMessage) => { + const { console } = message; + const devtools = () => { }; + devtools.toString = () => { + sendMessage(console, 6000, 2); + }; +} + +const _userClickEvent = (clicks: TipClick[]) => { + window.addEventListener("click", (event) => { + for (const { selector, text } of clicks) { + const { target } = event; + if (!target || !(target instanceof HTMLElement)) { + continue; + } + if (!target.matches(selector)) { + continue; + } + let message = randomSelection(text); + if (!message) { + continue; + } + message = message.replace("{text}", target.innerText); + sendMessage(message, 4000, 1); + return; + } + }); +} + +const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { + window.addEventListener("mouseover", (event: MouseEvent) => { + for (const { selector, text } of mouseovers) { + const { target } = event; + if (!target || !(target instanceof HTMLElement)) { + continue; + } + if (!target.matches(selector)) { + continue; + } + let message = randomSelection(text); + if (!message) { + continue; + } + message = message.replace("{text}", target.innerText); + sendMessage(message, 4000, 1); + return; + } + }); +} + +/** + * 监听用户是否处于活动状态,如果用户长时间不活动,则向 Live2d 发送消息 + */ +const _userActionEvent = (message: TipMessage) => { + let userAction = false; + let userActionTimer: number | undefined; + const defaultMessage = message.default; + const idleMessage: string[] = isString(defaultMessage) ? [defaultMessage] : (defaultMessage || []); + + window.addEventListener("mousemove", () => { + userAction = true; + }); + window.addEventListener("keydown", () => { + userAction = true; + }); + window.addEventListener("live2d:add-default-message", (ev) => { + const message = ev.detail.message; + if (Array.isArray(message)) { + idleMessage.push(...message); + } else { + idleMessage.push(message); + } + }) + setInterval(() => { + if (userAction) { + userAction = false; + clearInterval(userActionTimer); + userActionTimer = undefined; + return; + } + if (userActionTimer) { + return; + } + userActionTimer = setInterval(() => { + sendMessage(message.default, 6000, 2); + }, 20000); + }, 1000); +} + +const _registerTipEventListener = (config: Live2dConfig, tips: TipConfig) => { + // 首次进入页面时 + if (config.firstOpenSite) { + _welcomeEvent(tips.time) + } + // 节日事件 + _holidayEvent(tips.seasons); + // 用户是否活动事件 + _userActionEvent(tips.message); + // 注册用户鼠标悬停事件 + _userMouseoverEvent(tips.mouseover); + // 注册用户点击事件 + _userClickEvent(tips.click); + // 用户打开控制台事件 + _userOpenConsoleEvent(tips.message); + // 用户复制内容事件 + _userCopyEvent(tips.message); + // 用户离开页面事件 + _userLeaveEvent(tips.message); +} + +const _loadTips = async (config: Live2dConfig) => { + if (!config) { + return; + } + // 后台配置 tips,其中包含 mouseover 及 click 两种配置,以及单独配置的 message + const pluginTips = getPluginTips(config); + // 主题设置 tips,只会包含 mouseover 及 click 两种配置(会过滤掉其他配置) + const themeTipsResult = await loadTipsResource(config.themeTipsPath); + const themeTips: TipConfig = { + click: themeTipsResult?.click || [], + mouseover: themeTipsResult?.mouseover || [], + seasons: [], + time: [], + message: {}, + }; + const fullOrDefaultTips = await _getFullOrDefaultTips(config); + // 合并三种 tips + return mergeTips({ + pluginTips, + themeTips, + fullOrDefaultTips, + }); +} + +export const _getFullOrDefaultTips = async (config: Live2dConfig): Promise => { + // 获取插件文件中的全量 tips 文件 + if (isNotEmptyString(config?.tipsPath)) { + const tipsResult = await loadTipsResource(config.tipsPath); + if (tipsResult) { + return tipsResult; + } + } + // 获取默认的 tips 文件 + return (await import("../libs/live2d-tips.json")).default; +} diff --git a/packages/live2d/src/events/types.ts b/packages/live2d/src/events/types.ts deleted file mode 100644 index 1658fd1..0000000 --- a/packages/live2d/src/events/types.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { Live2dConfig } from "../context/config-context"; - -// Live2d beforeInit 事件 -export const LIVE2D_BEFORE_INIT_EVENT = 'live2d:before-init'; -export type Live2dBeforeInitEventDetail = { - // Live2D 配置 - config: Live2dConfig -} - - -// 切换 canvas 显示状态事件 -export const TOGGLE_CANVAS_EVENT = 'live2d:toggle-canvas'; -export type Live2dToggleEventDetail = { - // 是否显示看板娘 - isShow: boolean; -} - -// 发送 Live2D 消息事件 -export const LIVE2d_MESSAGE_EVENT = 'live2d:send-message'; -export type Live2dMessageEventDetail = { - // 消息内容 - text: string; - // 消息显示时间 - timeout: number; - // 消息优先级 - priority: number; -} diff --git a/packages/live2d/src/helpers/dateWithinRange.ts b/packages/live2d/src/helpers/dateWithinRange.ts new file mode 100644 index 0000000..cd86302 --- /dev/null +++ b/packages/live2d/src/helpers/dateWithinRange.ts @@ -0,0 +1,26 @@ +const RANGE_SEPARATOR = '-'; +const DATE_SEPARATOR = '/'; + +/** + * 检查指定的日期是否在当前日期范围内。 + * + * @param date 指定的日期格式为 `MM/DD` 或 `MM/DD-MM/DD`。 + * @returns 如果日期在当前范围内则返回 true, 否则返回 false。 + */ +export const dataWithinRange = (date: string): boolean => { + const now = new Date(); + const currentMonth = now.getMonth() + 1; + const currentDate = now.getDate(); + + const [startDate, endDate = startDate] = date.split(RANGE_SEPARATOR); + + const [startMonth, startDay] = startDate.split(DATE_SEPARATOR).map(Number); + const [endMonth, endDay] = endDate.split(DATE_SEPARATOR).map(Number); + + return ( + startMonth <= currentMonth && + currentMonth <= endMonth && + startDay <= currentDate && + currentDate <= endDay + ); +} diff --git a/packages/live2d/src/helpers/getPluginTips.ts b/packages/live2d/src/helpers/getPluginTips.ts index 423e61b..ae7e8a8 100644 --- a/packages/live2d/src/helpers/getPluginTips.ts +++ b/packages/live2d/src/helpers/getPluginTips.ts @@ -1,4 +1,5 @@ import type { Live2dConfig, TipConfig } from "../context/config-context"; +import { isNotEmpty } from "../utils/isNotEmpty"; /** * 整合插件配置中的 tips 元素。 @@ -21,6 +22,7 @@ export const getPluginTips = (config: Live2dConfig): TipConfig => { seasons: [], click: [], mouseover: [], + time: [], message: {}, }; // selector @@ -42,11 +44,14 @@ export const getPluginTips = (config: Live2dConfig): TipConfig => { } } // message - if (tips.message) { + if (isNotEmpty(config.backSiteTip)) { tips.message.visibilitychange = config.backSiteTip; + } + if (isNotEmpty(config.copyContentTip)) { tips.message.copy = config.copyContentTip; + } + if (isNotEmpty(config.openConsoleTip)) { tips.message.console = config.openConsoleTip; } - return tips; } \ No newline at end of file diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts index e0fa4af..893d151 100644 --- a/packages/live2d/src/helpers/loadTipsResource.ts +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -12,6 +12,7 @@ export function loadTipsResource(url?: string) { click: [], seasons: [], message: {}, + time: [], }; return new Promise((resolve) => { diff --git a/packages/live2d/src/helpers/mergeTips.ts b/packages/live2d/src/helpers/mergeTips.ts index 3a4eb0e..f31507e 100644 --- a/packages/live2d/src/helpers/mergeTips.ts +++ b/packages/live2d/src/helpers/mergeTips.ts @@ -1,5 +1,5 @@ import type { TipConfig } from "../context/config-context"; -import { distinctArray } from "../util/distinctArray"; +import { distinctArray } from "../utils/distinctArray"; /** * 合并各个渠道的 tips,根据获取位置不同,合并时优先级也不同。优先级按高到低的顺序为 diff --git a/packages/live2d/src/helpers/pluginTipsCovert.ts b/packages/live2d/src/helpers/pluginTipsCovert.ts deleted file mode 100644 index ea50cfd..0000000 --- a/packages/live2d/src/helpers/pluginTipsCovert.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { Live2dConfig } from "../context/config-context"; - -export function backendConfigConvert(config: Live2dConfig) { - const tips = { - click: [], - mouseover: [], - message: {}, - }; - // selector - if (!!config["selectorTips"]) { - config["selectorTips"].forEach((item) => { - let texts = item["messageTexts"].map((text) => text.message); - let obj = { - selector: item["selector"], - text: texts, - }; - if (item["mouseAction"] === "click") { - tips.click.push(obj); - } else { - tips.mouseover.push(obj); - } - }); - } - // message - tips.message.visibilitychange = config["backSiteTip"]; - tips.message.copy = config["copyContentTip"]; - tips.message.console = config["openConsoleTip"]; - return tips; -}; \ No newline at end of file diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index 3ce33ec..af62b97 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -1,13 +1,14 @@ -import { LIVE2d_MESSAGE_EVENT } from "../events/types"; - /** * 向 Live2D 发送消息事件 * @param text * @param timeout * @param priority */ -export function sendMessage(text: string, timeout = 3000, priority = 0) { - const event = new CustomEvent(LIVE2d_MESSAGE_EVENT, { +export function sendMessage(text: string | string[] | undefined, timeout = 3000, priority = 0) { + if (!text) { + return; + } + const event = new CustomEvent("live2d", { detail: { text, timeout, diff --git a/packages/live2d/src/helpers/timeWithinRange.ts b/packages/live2d/src/helpers/timeWithinRange.ts new file mode 100644 index 0000000..d329dcc --- /dev/null +++ b/packages/live2d/src/helpers/timeWithinRange.ts @@ -0,0 +1,24 @@ +const SEPARATOR = "-"; + +/** + * 判断当前是否在指定时间范围内。 + * + * @param hour 指定的时间范围格式为 `HH-HH`。 + * @returns 如果当前时间在指定范围内则返回 true, 否则返回 false。 + */ +export const timeWithinRange = (hour: string): boolean => { + const spiltTime = hour.split(SEPARATOR); + const now = new Date(); + const after = Number.parseInt(spiltTime[0]); + const before = Number.parseInt(spiltTime[1]) || after; + + + if (after < 0 || before > 23 || after > before) { + throw new Error("时间范围不正确"); + } + + if (after <= now.getHours() && now.getHours() <= before) { + return true; + } + return false; +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index 8afbed0..d19ea4f 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -1,6 +1,6 @@ import type { Live2dConfig } from "../context/config-context"; import { sendMessage } from "../helpers/sendMessage"; -import { isNotEmptyString } from "../util/isString"; +import { isNotEmptyString } from "../utils/isString"; declare const loadlive2d: any; diff --git a/packages/live2d/src/util/distinctArray.ts b/packages/live2d/src/util/distinctArray.ts deleted file mode 100644 index 4286249..0000000 --- a/packages/live2d/src/util/distinctArray.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const distinctArray = (arr: T[], key: string) => { - const map = new Map(); - for (const item of arr) { - map.set(item[key], item); - } - return [...map.values()]; -} \ No newline at end of file diff --git a/packages/live2d/src/utils/distinctArray.ts b/packages/live2d/src/utils/distinctArray.ts new file mode 100644 index 0000000..4edeb81 --- /dev/null +++ b/packages/live2d/src/utils/distinctArray.ts @@ -0,0 +1,9 @@ +import type { ObjectAny } from "../context/config-context"; + +export const distinctArray = (arr: T[], key: keyof T) => { + const map = new Map(); + for (const item of arr) { + map.set(item[key], item); + } + return [...map.values()]; +} \ No newline at end of file diff --git a/packages/live2d/src/utils/isNotEmpty.ts b/packages/live2d/src/utils/isNotEmpty.ts new file mode 100644 index 0000000..85d492f --- /dev/null +++ b/packages/live2d/src/utils/isNotEmpty.ts @@ -0,0 +1,5 @@ +export const isNotEmpty = (value: T[] | T | null | undefined): value is T[] | T => { + return value !== null && value !== undefined && (Array.isArray(value) ? value.length > 0 : + typeof value === 'string' ? value.trim() !== '' : true + ); +} \ No newline at end of file diff --git a/packages/live2d/src/util/isString.ts b/packages/live2d/src/utils/isString.ts similarity index 100% rename from packages/live2d/src/util/isString.ts rename to packages/live2d/src/utils/isString.ts diff --git a/packages/live2d/src/utils/randomSelection.ts b/packages/live2d/src/utils/randomSelection.ts new file mode 100644 index 0000000..80d678b --- /dev/null +++ b/packages/live2d/src/utils/randomSelection.ts @@ -0,0 +1,9 @@ +export const randomSelection = (obj: T | T[]): T | undefined => { + if (Array.isArray(obj)) { + if (obj.length === 0) { + return undefined; + } + return obj[Math.floor(Math.random() * obj.length)]; + } + return obj; +}; \ No newline at end of file diff --git a/packages/live2d/src/util/UnoMixin.ts b/packages/live2d/src/utils/unoMixin.ts similarity index 100% rename from packages/live2d/src/util/UnoMixin.ts rename to packages/live2d/src/utils/unoMixin.ts diff --git a/packages/live2d/src/utils/util.ts b/packages/live2d/src/utils/util.ts new file mode 100644 index 0000000..9fa44eb --- /dev/null +++ b/packages/live2d/src/utils/util.ts @@ -0,0 +1,37 @@ +export const hasWebsiteHome = location.hostname === "/"; + +export const documentTitle = document.title.split(" - ")[0]; + +export const isReferrer = document.referrer === ""; + +export const getReferrer = () => { + if (isReferrer) { + return; + } + return new URL(document.referrer); +} + +export const getReferrerDomain = () => { + const Domains: Record = { + baidu: "百度", + so: "360搜索", + google: "谷歌搜索", + bing: "必应", + yahoo: "雅虎", + sogou: "搜狗", + haosou: "好搜", + } + const referrer = getReferrer(); + if (!referrer) { + return; + } + const { hostname } = referrer; + if (location.hostname === hostname) { + return; + } + const domain = hostname.split(".")[1]; + if (Domains[domain]) { + return Domains[domain]; + } + return hostname; +} \ No newline at end of file diff --git a/src/main/resources/static/js/live2d-autoload.js b/src/main/resources/static/js/live2d-autoload.js index 20ad5aa..bc62ce8 100644 --- a/src/main/resources/static/js/live2d-autoload.js +++ b/src/main/resources/static/js/live2d-autoload.js @@ -210,7 +210,7 @@ function Live2d() { modelId = this.#config["modelId"] || 1; // 模型 ID modelTexturesId = this.#config["modelTexturesId"] || 53; // 材质 ID } - + if (this.#config["consoleShowStatu"]) { eval( (function (p, a, c, k, e, r) { @@ -568,19 +568,13 @@ function Live2d() { * @param time 时间 * @returns {string|*} */ - message.welcomeMessage = function (time) { - // referrer 内获取的网页 - const domains = { - baidu: "百度", - so: "360搜索", - google: "谷歌搜索", - }; + message.welcomeMessage = (time) => { // 如果是主页 if (location.pathname === "/") { - for (let { hour, text } of time) { - const now = new Date(), - after = hour.split("-")[0], - before = hour.split("-")[1] || after; + for (const { hour, text } of time) { + const now = new Date(); + const after = hour.split("-")[0]; + const before = hour.split("-")[1] || after; if (after <= now.getHours() && now.getHours() <= before) { return text; } @@ -589,8 +583,8 @@ function Live2d() { const text = `欢迎阅读「${document.title.split(" - ")[0]}」`; let from; if (document.referrer !== "") { - const referrer = new URL(document.referrer), - domain = referrer.hostname.split(".")[1]; + const referrer = new URL(document.referrer); + const domain = referrer.hostname.split(".")[1]; if (location.hostname === referrer.hostname) return text; if (domain in domains) { from = domains[domain]; From fb3b429491225b38d5fcd4079589414ff8cd938b Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Sun, 16 Feb 2025 18:37:36 +0800 Subject: [PATCH 07/26] feat: complete tips functionality --- package.json | 4 -- packages/live2d/src/components/Live2dTips.tsx | 64 +++++++++++++++---- .../live2d/src/components/Live2dWidget.tsx | 8 ++- packages/live2d/src/events/tip-events.ts | 18 +++--- packages/live2d/src/helpers/sendMessage.ts | 2 +- packages/live2d/uno.config.ts | 27 +++++++- 6 files changed, 92 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 1065b22..7344e8b 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,6 @@ { "name": "plugin-live2d", "private": true, - "scripts": { - "build": "pnpm run build:packages", - "example:dev": "pnpm dev --filter ./packages/** " - }, "author": { "name": "LIlGG", "url": "https://github.com/LIlGG" diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index af5bcf2..0fecdfe 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -4,41 +4,77 @@ import { createComponent } from "@lit/react"; import React from "react"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; -import { property } from "lit/decorators.js"; +import { property, state } from "lit/decorators.js"; +import { isNotEmpty } from "../utils/isNotEmpty"; +import { randomSelection } from "../utils/randomSelection"; +import { unsafeHTML } from "lit/directives/unsafe-html.js"; +import { classMap } from "lit/directives/class-map.js"; export class Live2dTips extends UnoLitElement { @consume({ context: configContext }) @property({ attribute: false }) public config?: Live2dConfig; + @state() + private _isShow = false; + @state() + private _message = ""; + private priority = -1; + private messageTimer: number | null = null; + + constructor() { + super(); + this._isShow = false; + this._message = ""; + } + render(): TemplateResult { + const classes = { + "opacity-100": this._isShow, + "opacity-0": !this._isShow, + }; return html` -
- +
+ ${unsafeHTML(this._message)}
`; } - + connectedCallback(): void { super.connectedCallback(); // 为 tips 注册 tips 相关事件 - window.addEventListener( - "live2d:send-message", - this.handleMessage as EventListener, - ); + window.addEventListener("live2d:send-message", this.handleMessage.bind(this)); } disconnectedCallback(): void { super.disconnectedCallback(); - window.removeEventListener( - "live2d:send-message", - this.handleMessage as EventListener, - ); + window.removeEventListener("live2d:send-message", this.handleMessage.bind(this)); } handleMessage(e: CustomEvent): void { - console.log(e.detail); - return; + const { text, timeout, priority } = e.detail; + if (!isNotEmpty(text)) { + return; + } + if (priority < this.priority) { + return; + } + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + const message = randomSelection(text); + if (!isNotEmpty(message)) { + return; + } + this.priority = priority; + this._message = message; + this._isShow = true; + this.messageTimer = setTimeout(() => { + this._isShow = false; + this.priority = -1; + }, timeout); } } diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 9b9abf9..b06bdd1 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -21,9 +21,11 @@ export class Live2dWidget extends UnoLitElement { renderLive2dWidget() { if (this._isShow) { - return html`
- - + return html`
+
+ + +
`; } } diff --git a/packages/live2d/src/events/tip-events.ts b/packages/live2d/src/events/tip-events.ts index 8f52fa6..8b26ddb 100644 --- a/packages/live2d/src/events/tip-events.ts +++ b/packages/live2d/src/events/tip-events.ts @@ -80,11 +80,12 @@ const _userOpenConsoleEvent = (message: TipMessage) => { const _userClickEvent = (clicks: TipClick[]) => { window.addEventListener("click", (event) => { + const path = event.composedPath(); + const target = path[0]; + if (!(target instanceof HTMLElement)) { + return; + } for (const { selector, text } of clicks) { - const { target } = event; - if (!target || !(target instanceof HTMLElement)) { - continue; - } if (!target.matches(selector)) { continue; } @@ -101,11 +102,12 @@ const _userClickEvent = (clicks: TipClick[]) => { const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { window.addEventListener("mouseover", (event: MouseEvent) => { + const path = event.composedPath(); + const target = path[0]; + if (!(target instanceof HTMLElement)) { + return; + } for (const { selector, text } of mouseovers) { - const { target } = event; - if (!target || !(target instanceof HTMLElement)) { - continue; - } if (!target.matches(selector)) { continue; } diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index af62b97..72c2412 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -8,7 +8,7 @@ export function sendMessage(text: string | string[] | undefined, timeout = 3000, if (!text) { return; } - const event = new CustomEvent("live2d", { + const event = new CustomEvent("live2d:send-message", { detail: { text, timeout, diff --git a/packages/live2d/uno.config.ts b/packages/live2d/uno.config.ts index 0127cd9..89d51ec 100644 --- a/packages/live2d/uno.config.ts +++ b/packages/live2d/uno.config.ts @@ -10,5 +10,30 @@ export default defineConfig({ ['writing-vertical-rl', { "writing-mode": "vertical-rl" }] - ] + ], + theme: { + backgroundColor: { + tips: 'rgba(236, 217, 188, .5)', + }, + borderColor: { + tips: 'rgba(224, 186, 140, .62)', + }, + boxShadow: { + tips: '0 3px 15px 2px rgba(191, 158, 118, .2)' + }, + animation: { + keyframes: { + shake: '{2%{transform:translate(.5px,-1.5px) rotate(-.5deg);}4%{transform:translate(.5px,1.5px) rotate(1.5deg);}6%{transform:translate(1.5px,1.5px) rotate(1.5deg);}8%{transform:translate(2.5px,1.5px) rotate(.5deg);}10%{transform:translate(.5px,2.5px) rotate(.5deg);}12%{transform:translate(1.5px,1.5px) rotate(.5deg);}14%{transform:translate(.5px,.5px) rotate(.5deg);}16%{transform:translate(-1.5px,-.5px) rotate(1.5deg);}18%{transform:translate(.5px,.5px) rotate(1.5deg);}20%{transform:translate(2.5px,2.5px) rotate(1.5deg);}22%{transform:translate(.5px,-1.5px) rotate(1.5deg);}24%{transform:translate(-1.5px,1.5px) rotate(-.5deg);}26%{transform:translate(1.5px,.5px) rotate(1.5deg);}28%{transform:translate(-.5px,-.5px) rotate(-.5deg);}30%{transform:translate(1.5px,-.5px) rotate(-.5deg);}32%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}34%{transform:translate(2.5px,2.5px) rotate(-.5deg);}36%{transform:translate(.5px,-1.5px) rotate(.5deg);}38%{transform:translate(2.5px,-.5px) rotate(-.5deg);}40%{transform:translate(-.5px,2.5px) rotate(.5deg);}42%{transform:translate(-1.5px,2.5px) rotate(.5deg);}44%{transform:translate(-1.5px,1.5px) rotate(.5deg);}46%{transform:translate(1.5px,-.5px) rotate(-.5deg);}48%{transform:translate(2.5px,-.5px) rotate(.5deg);}50%{transform:translate(-1.5px,1.5px) rotate(.5deg);}52%{transform:translate(-.5px,1.5px) rotate(.5deg);}54%{transform:translate(-1.5px,1.5px) rotate(.5deg);}56%{transform:translate(.5px,2.5px) rotate(1.5deg);}58%{transform:translate(2.5px,2.5px) rotate(.5deg);}60%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}62%{transform:translate(-1.5px,.5px) rotate(1.5deg);}64%{transform:translate(-1.5px,1.5px) rotate(1.5deg);}66%{transform:translate(.5px,2.5px) rotate(1.5deg);}68%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}70%{transform:translate(2.5px,2.5px) rotate(.5deg);}72%{transform:translate(-.5px,-1.5px) rotate(1.5deg);}74%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}76%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}78%{transform:translate(-1.5px,2.5px) rotate(.5deg);}80%{transform:translate(-1.5px,.5px) rotate(-.5deg);}82%{transform:translate(-1.5px,.5px) rotate(-.5deg);}84%{transform:translate(-.5px,.5px) rotate(1.5deg);}86%{transform:translate(2.5px,1.5px) rotate(.5deg);}88%{transform:translate(-1.5px,.5px) rotate(1.5deg);}90%{transform:translate(-1.5px,-.5px) rotate(-.5deg);}92%{transform:translate(-1.5px,-1.5px) rotate(1.5deg);}94%{transform:translate(.5px,.5px) rotate(-.5deg);}96%{transform:translate(2.5px,-.5px) rotate(-.5deg);}98%{transform:translate(-1.5px,-1.5px) rotate(-.5deg);}0%,100%{transform:translate(0,0) rotate(0);}}' + }, + durations: { + shake: "50s" + }, + timingFns: { + shake: 'ease-in-out', + }, + counts: { + shake: 'infinite', + }, + } + } }); \ No newline at end of file From 6a472419506085e1c0d590a464c3565a90477446 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Wed, 19 Feb 2025 01:19:09 +0800 Subject: [PATCH 08/26] refactor: preliminary completion of all tools refactoring --- packages/live2d/package.json | 1 + .../live2d/src/components/Live2dContext.tsx | 2 +- .../live2d/src/components/Live2dTools.tsx | 21 +- .../live2d/src/components/Live2dWidget.tsx | 19 +- packages/live2d/src/context/config-context.ts | 31 +- packages/live2d/src/libs/asteroids.min.js | 640 ++++++++++++++++++ packages/live2d/src/live2d/tools/ai-chat.ts | 20 + packages/live2d/src/live2d/tools/asteroids.ts | 29 + .../live2d/src/live2d/tools/custom-tool.ts | 39 ++ packages/live2d/src/live2d/tools/hitokoto.ts | 73 ++ packages/live2d/src/live2d/tools/info.ts | 21 + .../live2d/src/live2d/tools/screenshot.ts | 29 + .../live2d/src/live2d/tools/switch-model.ts | 20 + .../live2d/src/live2d/tools/switch-texture.ts | 20 + packages/live2d/src/live2d/tools/tools.ts | 19 + packages/live2d/tsconfig.json | 57 +- 16 files changed, 1001 insertions(+), 40 deletions(-) create mode 100644 packages/live2d/src/libs/asteroids.min.js create mode 100644 packages/live2d/src/live2d/tools/ai-chat.ts create mode 100644 packages/live2d/src/live2d/tools/asteroids.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool.ts create mode 100644 packages/live2d/src/live2d/tools/hitokoto.ts create mode 100644 packages/live2d/src/live2d/tools/info.ts create mode 100644 packages/live2d/src/live2d/tools/screenshot.ts create mode 100644 packages/live2d/src/live2d/tools/switch-model.ts create mode 100644 packages/live2d/src/live2d/tools/switch-texture.ts create mode 100644 packages/live2d/src/live2d/tools/tools.ts diff --git a/packages/live2d/package.json b/packages/live2d/package.json index b3af2c0..1ea064e 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -23,6 +23,7 @@ "@lit/context": "^1.1.3", "@lit/react": "^1.0.7", "lit": "^3.2.1", + "query-string": "^9.1.1", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index 651e769..bb45232 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -9,7 +9,7 @@ import "../events"; export class Live2dContext extends UnoLitElement { @provide({ context: configContext }) - logger = { + config = { apiPath: "https://live2d.fghrsh.net/api", live2dLocation: "right", consoleShowStatus: false, diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 7731bb9..65821ef 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -2,21 +2,28 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; +import { consume } from "@lit/context"; +import { configContext, type Live2dConfig } from "../context/config-context"; +import { property } from "lit/decorators.js"; export class Live2dTools extends UnoLitElement { - render(): TemplateResult { - return html` + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + render(): TemplateResult { + return html`
`; - } + } } customElements.define("live2d-tools", Live2dTools); export const Live2dToolsComponent = createComponent({ - tagName: "live2d-tools", - elementClass: Live2dTools, - react: React, -}) \ No newline at end of file + tagName: "live2d-tools", + elementClass: Live2dTools, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index b06bdd1..289a3c4 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -2,13 +2,19 @@ import { html, type TemplateResult } from "lit"; import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; -import { state } from "lit/decorators.js"; - +import { property, state } from "lit/decorators.js"; +import { consume } from "@lit/context"; +import { configContext, type Live2dConfig } from "../context/config-context"; import "./Live2dToggle"; import "./Live2dTips"; import "./Live2dCanvas"; +import "./Live2dTools"; export class Live2dWidget extends UnoLitElement { + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + @state() private _isShow = false; @@ -19,12 +25,19 @@ export class Live2dWidget extends UnoLitElement { `; } + renderLive2dTools() { + if (this.config?.isTools) { + return html``; + } + } + renderLive2dWidget() { if (this._isShow) { return html`
-
+
+ ${this.renderLive2dTools()}
`; } diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index 8720415..f75eb62 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -37,15 +37,40 @@ export interface TipConfig { message: TipMessage; } -export interface Live2dConfig { +export interface Live2dToolsConfig { + // 是否显示右侧工具栏 + isTools?: boolean; + // openai 图标 + openaiIcon?: string; + // 一言图标 + hitokotoIcon?: string; + // 一言API + hitokotoApi?: string; + // 小宇宙游戏图标 + asteroidsIcon?: string; + // 切换模型图标 + switchModelIcon?: string; + // 切换纹理图标 + switchTextureIcon?: string; + // 截图生成的图片名称 + screenshotName?: string; + // 截图图标 + screenshotIcon?: string; + // 信息图标 + infoIcon?: string; + // 信息站点地址 + infoSite?: string; + // 退出 Live2d 图标 + exitIcon?: string; +} + +export interface Live2dConfig extends Live2dToolsConfig { // Live2d API 路径 apiPath: string; // Live2d 定位 live2dLocation: "left" | "right"; // 是否在控制台显示状态 consoleShowStatus?: boolean; - // 是否显示右侧工具栏 - isTools?: boolean; // 是否强制使用默认配置 isForceUseDefaultConfig?: boolean; // 模型编号 diff --git a/packages/live2d/src/libs/asteroids.min.js b/packages/live2d/src/libs/asteroids.min.js new file mode 100644 index 0000000..78fc3ca --- /dev/null +++ b/packages/live2d/src/libs/asteroids.min.js @@ -0,0 +1,640 @@ +// http://www.websiteasteroids.com +function Asteroids() { + if (!window.ASTEROIDS) window.ASTEROIDS = { + enemiesKilled: 0 + }; + class Vector { + constructor(x, y) { + if (typeof x === "Object") { + this.x = x.x; + this.y = x.y; + } else { + this.x = x; + this.y = y; + } + } + cp() { + return new Vector(this.x, this.y); + } + mul(factor) { + this.x *= factor; + this.y *= factor; + return this; + } + mulNew(factor) { + return new Vector(this.x * factor, this.y * factor); + } + add(vec) { + this.x += vec.x; + this.y += vec.y; + return this; + } + addNew(vec) { + return new Vector(this.x + vec.x, this.y + vec.y); + } + sub(vec) { + this.x -= vec.x; + this.y -= vec.y; + return this; + } + subNew(vec) { + return new Vector(this.x - vec.x, this.y - vec.y); + } + rotate(angle) { + const x = this.x, y = this.y; + this.x = x * Math.cos(angle) - Math.sin(angle) * y; + this.y = x * Math.sin(angle) + Math.cos(angle) * y; + return this; + } + rotateNew(angle) { + return this.cp().rotate(angle); + } + setAngle(angle) { + const l = this.len(); + this.x = Math.cos(angle) * l; + this.y = Math.sin(angle) * l; + return this; + } + setAngleNew(angle) { + return this.cp().setAngle(angle); + } + setLength(length) { + const l = this.len(); + if (l) this.mul(length / l); + else this.x = this.y = length; + return this; + } + setLengthNew(length) { + return this.cp().setLength(length); + } + normalize() { + const l = this.len(); + this.x /= l; + this.y /= l; + return this; + } + normalizeNew() { + return this.cp().normalize(); + } + angle() { + return Math.atan2(this.y, this.x); + } + collidesWith(rect) { + return this.x > rect.x && this.y > rect.y && this.x < rect.x + rect.width && this.y < rect.y + rect.height; + } + len() { + const l = Math.sqrt(this.x * this.x + this.y * this.y); + if (l < 0.005 && l > -0.005) return 0; + return l; + } + is(test) { + return typeof test === "object" && this.x === test.x && this.y === test.y; + } + toString() { + return "[Vector(" + this.x + ", " + this.y + ") angle: " + this.angle() + ", length: " + this.len() + "]"; + } + } + + class Line { + constructor(p1, p2) { + this.p1 = p1; + this.p2 = p2; + } + shift(pos) { + this.p1.add(pos); + this.p2.add(pos); + } + intersectsWithRect(rect) { + const LL = new Vector(rect.x, rect.y + rect.height); + const UL = new Vector(rect.x, rect.y); + const LR = new Vector(rect.x + rect.width, rect.y + rect.height); + const UR = new Vector(rect.x + rect.width, rect.y); + if (this.p1.x > LL.x && this.p1.x < UR.x && this.p1.y < LL.y && this.p1.y > UR.y && this.p2.x > LL.x && this.p2.x < UR.x && this.p2.y < LL.y && this.p2.y > UR.y) return true; + if (this.intersectsLine(new Line(UL, LL))) return true; + if (this.intersectsLine(new Line(LL, LR))) return true; + if (this.intersectsLine(new Line(UL, UR))) return true; + if (this.intersectsLine(new Line(UR, LR))) return true; + return false; + } + intersectsLine(line2) { + const v1 = this.p1, v2 = this.p2; + const v3 = line2.p1, v4 = line2.p2; + const denom = ((v4.y - v3.y) * (v2.x - v1.x)) - ((v4.x - v3.x) * (v2.y - v1.y)); + const numerator = ((v4.x - v3.x) * (v1.y - v3.y)) - ((v4.y - v3.y) * (v1.x - v3.x)); + const numerator2 = ((v2.x - v1.x) * (v1.y - v3.y)) - ((v2.y - v1.y) * (v1.x - v3.x)); + if (denom === 0.0) { + return false; + } + const ua = numerator / denom; + const ub = numerator2 / denom; + return (ua >= 0.0 && ua <= 1.0 && ub >= 0.0 && ub <= 1.0); + } + } + const that = this; + const isIE = !! window.ActiveXObject; + let w = document.documentElement.clientWidth, h = document.documentElement.clientHeight; + const playerWidth = 20, playerHeight = 30; + const playerVerts = [ + [-1 * playerHeight / 2, -1 * playerWidth / 2], + [-1 * playerHeight / 2, playerWidth / 2], + [playerHeight / 2, 0] + ]; + const ignoredTypes = ["HTML", "HEAD", "BODY", "SCRIPT", "TITLE", "META", "STYLE", "LINK", "SHAPE", "LINE", "GROUP", "IMAGE", "STROKE", "FILL", "SKEW", "PATH", "TEXTPATH"]; + const hiddenTypes = ["BR", "HR"]; + const FPS = 50; + const acc = 300; + const maxSpeed = 600; + const rotSpeed = 360; + const bulletSpeed = 700; + const particleSpeed = 400; + const timeBetweenFire = 150; + const timeBetweenBlink = 250; + const bulletRadius = 2; + const maxParticles = isIE ? 20 : 40; + const maxBullets = isIE ? 10 : 20; + this.flame = { + r: [], + y: [] + }; + this.toggleBlinkStyle = function() { + if (this.updated.blink.isActive) { + document.body.classList.remove("ASTEROIDSBLINK"); + } else { + document.body.classList.add("ASTEROIDSBLINK"); + } + this.updated.blink.isActive = !this.updated.blink.isActive; + }; + addStylesheet(".ASTEROIDSBLINK .ASTEROIDSYEAHENEMY", "outline: 2px dotted red;"); + this.pos = new Vector(100, 100); + this.lastPos = false; + this.vel = new Vector(0, 0); + this.dir = new Vector(0, 1); + this.keysPressed = {}; + this.firedAt = false; + this.updated = { + enemies: false, + flame: new Date().getTime(), + blink: { + time: 0, + isActive: false + } + }; + this.scrollPos = new Vector(0, 0); + this.bullets = []; + this.enemies = []; + this.dying = []; + this.totalEnemies = 0; + this.particles = []; + + function updateEnemyIndex() { + for (let enemy of that.enemies) { + enemy.classList.remove("ASTEROIDSYEAHENEMY"); + } + const all = document.body.getElementsByTagName("*"); + that.enemies = []; + for (let i = 0, el; el = all[i]; i++) { + if (!(ignoredTypes.includes(el.tagName.toUpperCase())) && el.prefix !== "g_vml_" && hasOnlyTextualChildren(el) && el.className !== "ASTEROIDSYEAH" && el.offsetHeight > 0) { + el.aSize = size(el); + that.enemies.push(el); + el.classList.add("ASTEROIDSYEAHENEMY"); + if (!el.aAdded) { + el.aAdded = true; + that.totalEnemies++; + } + } + } + }; + updateEnemyIndex(); + let createFlames; + (function() { + const rWidth = playerWidth, rIncrease = playerWidth * 0.1, yWidth = playerWidth * 0.6, yIncrease = yWidth * 0.2, halfR = rWidth / 2, halfY = yWidth / 2, halfPlayerHeight = playerHeight / 2; + createFlames = function() { + that.flame.r = [ + [-1 * halfPlayerHeight, -1 * halfR] + ]; + that.flame.y = [ + [-1 * halfPlayerHeight, -1 * halfY] + ]; + for (let x = 0; x < rWidth; x += rIncrease) { + that.flame.r.push([-random(2, 7) - halfPlayerHeight, x - halfR]); + } + that.flame.r.push([-1 * halfPlayerHeight, halfR]); + for (let x = 0; x < yWidth; x += yIncrease) { + that.flame.y.push([-random(2, 7) - halfPlayerHeight, x - halfY]); + } + that.flame.y.push([-1 * halfPlayerHeight, halfY]); + }; + })(); + createFlames(); + + function radians(deg) { + return deg * Math.PI / 180; + }; + + function random(from, to) { + return Math.floor(Math.random() * (to + 1) + from); + }; + + function boundsCheck(vec) { + if (vec.x > w) vec.x = 0; + else if (vec.x < 0) vec.x = w; + if (vec.y > h) vec.y = 0; + else if (vec.y < 0) vec.y = h; + }; + + function size(element) { + let el = element, left = 0, top = 0; + do { + left += el.offsetLeft || 0; + top += el.offsetTop || 0; + el = el.offsetParent; + } while (el); + return { + x: left, + y: top, + width: element.offsetWidth || 10, + height: element.offsetHeight || 10 + }; + }; + + function applyVisibility(vis) { + for (let p of window.ASTEROIDSPLAYERS) { + p.gameContainer.style.visibility = vis; + } + } + + function getElementFromPoint(x, y) { + applyVisibility("hidden"); + let element = document.elementFromPoint(x, y); + if (!element) { + applyVisibility("visible"); + return false; + } + if (element.nodeType === 3) element = element.parentNode; + applyVisibility("visible"); + return element; + }; + + function addParticles(startPos) { + const time = new Date().getTime(); + const amount = maxParticles; + for (let i = 0; i < amount; i++) { + that.particles.push({ + dir: (new Vector(Math.random() * 20 - 10, Math.random() * 20 - 10)).normalize(), + pos: startPos.cp(), + cameAlive: time + }); + } + }; + + function setScore() { + that.points.innerHTML = window.ASTEROIDS.enemiesKilled * 10; + }; + + function hasOnlyTextualChildren(element) { + if (element.offsetLeft < -100 && element.offsetWidth > 0 && element.offsetHeight > 0) return false; + if (hiddenTypes.includes(element.tagName)) return true; + if (element.offsetWidth === 0 && element.offsetHeight === 0) return false; + for (let i = 0; i < element.childNodes.length; i++) { + if (!(hiddenTypes.includes(element.childNodes[i].tagName)) && element.childNodes[i].childNodes.length !== 0) return false; + } + return true; + }; + + function addStylesheet(selector, rules) { + const stylesheet = document.createElement("style"); + stylesheet.rel = "stylesheet"; + stylesheet.id = "ASTEROIDSYEAHSTYLES"; + try { + stylesheet.innerHTML = selector + "{" + rules + "}"; + } catch (e) { + stylesheet.styleSheet.addRule(selector, rules); + } + document.getElementsByTagName("head")[0].appendChild(stylesheet); + }; + + function removeStylesheet(name) { + const stylesheet = document.getElementById(name); + if (stylesheet) { + stylesheet.parentNode.removeChild(stylesheet); + } + }; + this.gameContainer = document.createElement("div"); + this.gameContainer.className = "ASTEROIDSYEAH"; + document.body.appendChild(this.gameContainer); + this.canvas = document.createElement("canvas"); + this.canvas.setAttribute("width", w); + this.canvas.setAttribute("height", h); + this.canvas.className = "ASTEROIDSYEAH"; + Object.assign(this.canvas.style, { + width: w + "px", + height: h + "px", + position: "fixed", + top: "0px", + left: "0px", + bottom: "0px", + right: "0px", + zIndex: "10000" + }); + this.canvas.addEventListener("mousedown", function(e) { + const message = document.createElement("span"); + message.style.position = "absolute"; + message.style.color = "red"; + message.innerHTML = "Press Esc to Quit"; + document.body.appendChild(message); + const x = e.pageX || (e.clientX + document.documentElement.scrollLeft); + const y = e.pageY || (e.clientY + document.documentElement.scrollTop); + message.style.left = x - message.offsetWidth / 2 + "px"; + message.style.top = y - message.offsetHeight / 2 + "px"; + setTimeout(function() { + try { + message.parentNode.removeChild(message); + } catch (e) {} + }, 1000); + }, false); + const eventResize = function() { + that.canvas.style.display = "none"; + w = document.documentElement.clientWidth; + h = document.documentElement.clientHeight; + that.canvas.setAttribute("width", w); + that.canvas.setAttribute("height", h); + Object.assign(that.canvas.style, { + display: "block", + width: w + "px", + height: h + "px" + }); + }; + window.addEventListener("resize", eventResize, false); + this.gameContainer.appendChild(this.canvas); + this.ctx = this.canvas.getContext("2d"); + this.ctx.fillStyle = "black"; + this.ctx.strokeStyle = "black"; + if (!document.getElementById("ASTEROIDS-NAVIGATION")) { + this.navigation = document.createElement("div"); + this.navigation.id = "ASTEROIDS-NAVIGATION"; + this.navigation.className = "ASTEROIDSYEAH"; + Object.assign(this.navigation.style, { + fontFamily: "Arial,sans-serif", + position: "fixed", + zIndex: "10001", + bottom: "20px", + right: "10px", + textAlign: "right" + }); + this.navigation.innerHTML = "(Press Esc to Quit) "; + this.gameContainer.appendChild(this.navigation); + this.points = document.createElement("span"); + this.points.id = "ASTEROIDS-POINTS"; + this.points.style.font = "28pt Arial, sans-serif"; + this.points.style.fontWeight = "bold"; + this.points.className = "ASTEROIDSYEAH"; + this.navigation.appendChild(this.points); + } else { + this.navigation = document.getElementById("ASTEROIDS-NAVIGATION"); + this.points = document.getElementById("ASTEROIDS-POINTS"); + } + setScore(); + const eventKeydown = function(event) { + that.keysPressed[event.key] = true; + switch (event.key) { + case " ": + that.firedAt = 1; + break; + } + if (["ArrowUp", "ArrowDown", "ArrowRight", "ArrowLeft", " ", "b", "w", "a", "s", "d"].includes(event.key)) { + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.returnValue = false; + event.cancelBubble = true; + return false; + } + }; + document.addEventListener("keydown", eventKeydown, false); + const eventKeypress = function(event) { + if (["ArrowUp", "ArrowDown", "ArrowRight", "ArrowLeft", " ", "w", "a", "s", "d"].includes(event.key)) { + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.returnValue = false; + event.cancelBubble = true; + return false; + } + }; + document.addEventListener("keypress", eventKeypress, false); + const eventKeyup = function(event) { + that.keysPressed[event.key] = false; + if (["ArrowUp", "ArrowDown", "ArrowRight", "ArrowLeft", " ", "b", "w", "a", "s", "d"].includes(event.key)) { + if (event.preventDefault) event.preventDefault(); + if (event.stopPropagation) event.stopPropagation(); + event.returnValue = false; + event.cancelBubble = true; + return false; + } + }; + document.addEventListener("keyup", eventKeyup, false); + this.ctx.clear = function() { + this.clearRect(0, 0, w, h); + }; + this.ctx.clear(); + this.ctx.drawLine = function(xFrom, yFrom, xTo, yTo) { + this.beginPath(); + this.moveTo(xFrom, yFrom); + this.lineTo(xTo, yTo); + this.lineTo(xTo + 1, yTo + 1); + this.closePath(); + this.fill(); + }; + this.ctx.tracePoly = function(verts) { + this.beginPath(); + this.moveTo(verts[0][0], verts[0][1]); + for (let i = 1; i < verts.length; i++) + this.lineTo(verts[i][0], verts[i][1]); + this.closePath(); + }; + this.ctx.drawPlayer = function() { + this.save(); + this.translate(that.pos.x, that.pos.y); + this.rotate(that.dir.angle()); + this.tracePoly(playerVerts); + this.fillStyle = "white"; + this.fill(); + this.tracePoly(playerVerts); + this.stroke(); + this.restore(); + }; + this.ctx.drawBullets = function(bullets) { + for (let i = 0; i < bullets.length; i++) { + this.beginPath(); + this.arc(bullets[i].pos.x, bullets[i].pos.y, bulletRadius, 0, Math.PI * 2, true); + this.closePath(); + this.fill(); + } + }; + const randomParticleColor = function() { + return (["red", "yellow"])[random(0, 1)]; + }; + this.ctx.drawParticles = function(particles) { + const oldColor = this.fillStyle; + for (let i = 0; i < particles.length; i++) { + this.fillStyle = randomParticleColor(); + this.drawLine(particles[i].pos.x, particles[i].pos.y, particles[i].pos.x - particles[i].dir.x * 10, particles[i].pos.y - particles[i].dir.y * 10); + } + this.fillStyle = oldColor; + }; + this.ctx.drawFlames = function(flame) { + this.save(); + this.translate(that.pos.x, that.pos.y); + this.rotate(that.dir.angle()); + const oldColor = this.strokeStyle; + this.strokeStyle = "red"; + this.tracePoly(flame.r); + this.stroke(); + this.strokeStyle = "yellow"; + this.tracePoly(flame.y); + this.stroke(); + this.strokeStyle = oldColor; + this.restore(); + } + addParticles(this.pos); + document.body.classList.add("ASTEROIDSYEAH"); + let lastUpdate = new Date().getTime(); + function updateFunc() { + that.update.call(that); + }; + setTimeout(updateFunc, 1000 / FPS); + this.update = function() { + let forceChange = false; + const nowTime = new Date().getTime(); + const tDelta = (nowTime - lastUpdate) / 1000; + lastUpdate = nowTime; + let drawFlame = false; + if (nowTime - this.updated.flame > 50) { + createFlames(); + this.updated.flame = nowTime; + } + this.scrollPos.x = window.pageXOffset || document.documentElement.scrollLeft; + this.scrollPos.y = window.pageYOffset || document.documentElement.scrollTop; + if ((this.keysPressed["ArrowUp"]) || (this.keysPressed["w"])) { + this.vel.add(this.dir.mulNew(acc * tDelta)); + drawFlame = true; + } else { + this.vel.mul(0.96); + } + if ((this.keysPressed["ArrowLeft"]) || (this.keysPressed["a"])) { + forceChange = true; + this.dir.rotate(radians(rotSpeed * tDelta * -1)); + } + if ((this.keysPressed["ArrowRight"]) || (this.keysPressed["d"])) { + forceChange = true; + this.dir.rotate(radians(rotSpeed * tDelta)); + } + if (this.keysPressed[" "] && nowTime - this.firedAt > timeBetweenFire) { + this.bullets.unshift({ + dir: this.dir.cp(), + pos: this.pos.cp(), + startVel: this.vel.cp(), + cameAlive: nowTime + }); + this.firedAt = nowTime; + if (this.bullets.length > maxBullets) { + this.bullets.pop(); + } + } + if (this.keysPressed["b"]) { + if (!this.updated.enemies) { + updateEnemyIndex(); + this.updated.enemies = true; + } + forceChange = true; + this.updated.blink.time += tDelta * 1000; + if (this.updated.blink.time > timeBetweenBlink) { + this.toggleBlinkStyle(); + this.updated.blink.time = 0; + } + } else { + this.updated.enemies = false; + } + if (this.keysPressed["Escape"]) { + destroy.apply(this); + return; + } + if (this.vel.len() > maxSpeed) { + this.vel.setLength(maxSpeed); + } + this.pos.add(this.vel.mulNew(tDelta)); + if (this.pos.x > w) { + window.scrollTo(this.scrollPos.x + 50, this.scrollPos.y); + this.pos.x = 0; + } else if (this.pos.x < 0) { + window.scrollTo(this.scrollPos.x - 50, this.scrollPos.y); + this.pos.x = w; + } + if (this.pos.y > h) { + window.scrollTo(this.scrollPos.x, this.scrollPos.y + h * 0.75); + this.pos.y = 0; + } else if (this.pos.y < 0) { + window.scrollTo(this.scrollPos.x, this.scrollPos.y - h * 0.75); + this.pos.y = h; + } + for (let i = this.bullets.length - 1; i >= 0; i--) { + if (nowTime - this.bullets[i].cameAlive > 2000) { + this.bullets.splice(i, 1); + forceChange = true; + continue; + } + const bulletVel = this.bullets[i].dir.setLengthNew(bulletSpeed * tDelta).add(this.bullets[i].startVel.mulNew(tDelta)); + this.bullets[i].pos.add(bulletVel); + boundsCheck(this.bullets[i].pos); + const murdered = getElementFromPoint(this.bullets[i].pos.x, this.bullets[i].pos.y); + if (murdered && murdered.tagName && !(ignoredTypes.includes(murdered.tagName.toUpperCase())) && hasOnlyTextualChildren(murdered) && murdered.className !== "ASTEROIDSYEAH") { + addParticles(this.bullets[i].pos); + this.dying.push(murdered); + this.bullets.splice(i, 1); + continue; + } + } + if (this.dying.length) { + for (let i = this.dying.length - 1; i >= 0; i--) { + try { + if (this.dying[i].parentNode) window.ASTEROIDS.enemiesKilled++; + this.dying[i].parentNode.removeChild(this.dying[i]); + } catch (e) {} + } + setScore(); + this.dying = []; + } + for (let i = this.particles.length - 1; i >= 0; i--) { + this.particles[i].pos.add(this.particles[i].dir.mulNew(particleSpeed * tDelta * Math.random())); + if (nowTime - this.particles[i].cameAlive > 1000) { + this.particles.splice(i, 1); + forceChange = true; + continue; + } + } + if (forceChange || this.bullets.length !== 0 || this.particles.length !== 0 || !this.pos.is(this.lastPos) || this.vel.len() > 0) { + this.ctx.clear(); + this.ctx.drawPlayer(); + if (drawFlame) this.ctx.drawFlames(that.flame); + if (this.bullets.length) { + this.ctx.drawBullets(this.bullets); + } + if (this.particles.length) { + this.ctx.drawParticles(this.particles); + } + } + this.lastPos = this.pos; + setTimeout(updateFunc, 1000 / FPS); + } + + function destroy() { + document.removeEventListener("keydown", eventKeydown, false); + document.removeEventListener("keypress", eventKeypress, false); + document.removeEventListener("keyup", eventKeyup, false); + window.removeEventListener("resize", eventResize, false); + removeStylesheet("ASTEROIDSYEAHSTYLES"); + document.body.classList.remove("ASTEROIDSYEAH"); + this.gameContainer.parentNode.removeChild(this.gameContainer); + }; +} + +if (!window.ASTEROIDSPLAYERS) window.ASTEROIDSPLAYERS = []; +window.ASTEROIDSPLAYERS.push(new Asteroids()); \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/ai-chat.ts b/packages/live2d/src/live2d/tools/ai-chat.ts new file mode 100644 index 0000000..a239136 --- /dev/null +++ b/packages/live2d/src/live2d/tools/ai-chat.ts @@ -0,0 +1,20 @@ +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +/** + * AI 聊天工具 + */ +export class AIChatTool extends Tool { + name() { + return "AIChat"; + } + + icon() { + const icon = this.getConfig().aiChatUrl; + return isNotEmptyString(icon) ? icon : "ph-chats-circle-fill"; + } + + execute() { + // TODO: 打开 AI 聊天 + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/asteroids.ts b/packages/live2d/src/live2d/tools/asteroids.ts new file mode 100644 index 0000000..d96a4b1 --- /dev/null +++ b/packages/live2d/src/live2d/tools/asteroids.ts @@ -0,0 +1,29 @@ +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +declare global { + interface Window { + ASTEROIDSPLAYERS: unknown[]; + } +} + +/** + * 小宇宙小游戏工具 + */ +export class AsteroidsTool extends Tool { + name() { + return "Asteroids"; + } + + icon() { + const icon = this.getConfig().asteroidsIcon; + return isNotEmptyString(icon) ? icon : "ph-paper-plane-tilt-fill"; + } + + execute() { + // @ts-ignore + import("@libs/asteroids.min.js").then((module) => { + new module.default(); + }); + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts new file mode 100644 index 0000000..53e56eb --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -0,0 +1,39 @@ +import type { Live2dConfig } from "context/config-context"; +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; +import { _getFullOrDefaultTips } from '../../events/tip-events'; + +export type CustomToolConfig = { + name: string; + icon?: string; + execute: () => void; +} + +/** + * 自定义工具 + */ +export class CustomTool extends Tool { + _name: string; + _icon?: string; + _execute: () => void; + + constructor(config: Live2dConfig, { name, icon, execute }: CustomToolConfig) { + super(config); + this._name = name; + this._icon = icon; + this._execute = execute; + } + + name() { + return this._name; + } + + icon() { + const icon = this._icon; + return isNotEmptyString(icon) ? icon : "ph-question-fill"; + } + + execute() { + this._execute.bind(this)(); + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/hitokoto.ts b/packages/live2d/src/live2d/tools/hitokoto.ts new file mode 100644 index 0000000..5ef04f8 --- /dev/null +++ b/packages/live2d/src/live2d/tools/hitokoto.ts @@ -0,0 +1,73 @@ +import queryString from "query-string"; +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; +import { sendMessage } from "../../helpers/sendMessage"; + +/** + * 一言工具,使用一言接口获取一句话 + * 如需使用自定义的接口,则需要满足 hitokoto 的接口规范。 + * + * @link https://developer.hitokoto.cn/sentence/demo.html + */ +export class HitokotoTool extends Tool { + _default_api = "https://v1.hitokoto.cn"; + + name() { + return "Hitokoto"; + } + + icon() { + const icon = this.getConfig().aiChatUrl; + return isNotEmptyString(icon) ? icon : "ph-chat-circle-fill"; + } + + async execute() { + const { hitokoto, description } = await this._getHitokotoMessage() || {}; + if (isNotEmptyString(hitokoto)) { + sendMessage(hitokoto, 6000, 2); + setTimeout(() => { + sendMessage(description, 4000, 2); + }, 6000); + } + } + + private async _getHitokotoMessage(): Promise<{ hitokoto: string, description: string } | undefined> { + const unverifiedApi = this.getConfig().hitokotoApi || this._default_api; + const parsedApi = queryString.parseUrl(unverifiedApi); + const newParams = { ...parsedApi.query, encode: "json", charset: "utf-8" }; + const hitokotoApi = `${parsedApi.url}?${queryString.stringify(newParams)}`; + const { hitokoto, from, creator } = await this._fetchHitokoto(hitokotoApi); + if (isNotEmptyString(hitokoto)) { + return { + hitokoto: "hitokoto", + description: `这句一言来自 「${from}」,是 ${creator} 在 hitokoto.cn 投稿的。` + } + } + } + + private _fetchHitokoto(hitokotoApi: string): Promise { + return fetch(hitokotoApi) + .then(res => res.json()) + .then((result: HitokotoResult) => { + return result; + }); + } +} + +/** + * @link https://developer.hitokoto.cn/sentence/#%E8%BF%94%E5%9B%9E%E4%BF%A1%E6%81%AF + */ +export type HitokotoResult = { + id?: number; + hitokoto?: string; + type?: string; + from?: string; + from_who?: string; + creator?: string; + creator_uid?: number; + reviewer?: number; + uuid?: string; + commit_from?: string; + created_at?: string; + length?: number; +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/info.ts b/packages/live2d/src/live2d/tools/info.ts new file mode 100644 index 0000000..8629ca4 --- /dev/null +++ b/packages/live2d/src/live2d/tools/info.ts @@ -0,0 +1,21 @@ +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +/** + * 前往站点工具 + */ +export class InfoTool extends Tool { + name() { + return "InfoTool"; + } + + icon() { + const icon = this.getConfig().infoIcon; + return isNotEmptyString(icon) ? icon : "ph-info-fill"; + } + + execute() { + const siteUrl = this.getConfig().infoSite || "https://github.com/LIlGG/plugin-live2d"; + window.open(siteUrl); + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/screenshot.ts b/packages/live2d/src/live2d/tools/screenshot.ts new file mode 100644 index 0000000..8d9ccb9 --- /dev/null +++ b/packages/live2d/src/live2d/tools/screenshot.ts @@ -0,0 +1,29 @@ +import { sendMessage } from "helpers/sendMessage"; +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +declare const Live2D: { + captureName: string; + captureFrame: boolean; +}; + +/** + * 截图工具 + */ +export class ScreenshotTool extends Tool { + name() { + return "Screenshot"; + } + + icon() { + const icon = this.getConfig().screenshotIcon; + return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; + } + + execute() { + sendMessage("照好了嘛,是不是很可爱呢?", 6000, 2); + const screenshotName = this.getConfig().screenshotName || 'live2d'; + Live2D.captureName = `${screenshotName}.png`; + Live2D.captureFrame = true; + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/switch-model.ts b/packages/live2d/src/live2d/tools/switch-model.ts new file mode 100644 index 0000000..52cc0f2 --- /dev/null +++ b/packages/live2d/src/live2d/tools/switch-model.ts @@ -0,0 +1,20 @@ +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +/** + * 切换模型工具 + */ +export class SwitchModelTool extends Tool { + name() { + return "SwitchModel"; + } + + icon() { + const icon = this.getConfig().switchModelIcon; + return isNotEmptyString(icon) ? icon : "ph-dress-fill"; + } + + execute() { + console.log("Model switch event emitted."); + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/switch-texture.ts b/packages/live2d/src/live2d/tools/switch-texture.ts new file mode 100644 index 0000000..a54b70d --- /dev/null +++ b/packages/live2d/src/live2d/tools/switch-texture.ts @@ -0,0 +1,20 @@ +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; + +/** + * 切换纹理工具 + */ +export class SwitchTextureTool extends Tool { + name() { + return "SwitchTexture"; + } + + icon() { + const icon = this.getConfig().switchTextureIcon; + return isNotEmptyString(icon) ? icon : "ph-camera-fill"; + } + + execute() { + // 发出切换模型的事件 + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/tools.ts b/packages/live2d/src/live2d/tools/tools.ts new file mode 100644 index 0000000..40cb404 --- /dev/null +++ b/packages/live2d/src/live2d/tools/tools.ts @@ -0,0 +1,19 @@ +import type { Live2dConfig } from "../../context/config-context"; + +export abstract class Tool { + private _config: Live2dConfig; + + constructor(config: Live2dConfig) { + this._config = config; + } + + abstract name(): string; + + abstract icon(): string; + + abstract execute(): void; + + protected getConfig(): Live2dConfig { + return this._config; + } +} \ No newline at end of file diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 0b26a03..7becaa1 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -1,31 +1,36 @@ { - "compilerOptions": { - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "jsx": "react-jsx", - "target": "ES2020", - "noEmit": true, - "skipLibCheck": true, + "compilerOptions": { + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", + "target": "ES2020", + "noEmit": true, + "skipLibCheck": true, - /* modules */ - "module": "ESNext", - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, + /* modules */ + "module": "ESNext", + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, - "experimentalDecorators": true, - "useDefineForClassFields": false, - "plugins": [ - { - "name": "ts-lit-plugin" - } - ] - }, - "include": ["src"] + "experimentalDecorators": true, + "useDefineForClassFields": false, + "plugins": [ + { + "name": "ts-lit-plugin" + } + ], + "baseUrl": "./src", + "paths": { + "@libs/*": ["libs/*"], // 定义别名 + "@utils/*": ["utils/*"] + } + }, + "include": ["src"] } From 874b8ffd64fbf21327f719b535784cbc848be2f9 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 20 Feb 2025 01:33:21 +0800 Subject: [PATCH 09/26] refactor: restructure Live2D events --- .../live2d/src/components/Live2dCanvas.tsx | 9 +- packages/live2d/src/components/Live2dTips.tsx | 3 +- .../live2d/src/components/Live2dToggle.tsx | 100 +++++++++--------- .../live2d/src/components/Live2dTools.tsx | 27 ++--- .../live2d/src/components/Live2dWidget.tsx | 4 +- .../live2d/src/events/add-default-message.ts | 23 ++++ packages/live2d/src/events/before-init.ts | 23 ++++ packages/live2d/src/events/event.d.ts | 55 ---------- packages/live2d/src/events/send-message.ts | 28 +++++ packages/live2d/src/events/tip-events.ts | 12 +-- packages/live2d/src/events/toggle-canvas.ts | 26 +++++ packages/live2d/src/events/types.ts | 5 + .../live2d/src/live2d/tools/custom-tool.ts | 4 +- packages/live2d/src/live2d/tools/exit.ts | 26 +++++ packages/live2d/tsconfig.json | 4 +- pnpm-lock.yaml | 31 ++++++ 16 files changed, 243 insertions(+), 137 deletions(-) create mode 100644 packages/live2d/src/events/add-default-message.ts create mode 100644 packages/live2d/src/events/before-init.ts delete mode 100644 packages/live2d/src/events/event.d.ts create mode 100644 packages/live2d/src/events/send-message.ts create mode 100644 packages/live2d/src/events/toggle-canvas.ts create mode 100644 packages/live2d/src/events/types.ts create mode 100644 packages/live2d/src/live2d/tools/exit.ts diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 5d738a3..134ab68 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -7,6 +7,7 @@ import Model from "../live2d/model"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; import "../libs/live2d.min.js"; +import { BeforeInitEvent } from "../events/before-init.js"; export class Live2dCanvas extends UnoLitElement { @consume({ context: configContext }) @@ -30,13 +31,7 @@ export class Live2dCanvas extends UnoLitElement { connectedCallback(): void { super.connectedCallback(); // 发出 Live2d beforeInit 事件 - window.dispatchEvent( - new CustomEvent("live2d:before-init", { - detail: { - config: this.config, - }, - }), - ); + window.dispatchEvent(new BeforeInitEvent({ config: this.config })); } protected firstUpdated(_changedProperties: PropertyValues): void { diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 0fecdfe..552ad2f 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -9,6 +9,7 @@ import { isNotEmpty } from "../utils/isNotEmpty"; import { randomSelection } from "../utils/randomSelection"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { classMap } from "lit/directives/class-map.js"; +import { SendMessageEvent } from "../events/send-message"; export class Live2dTips extends UnoLitElement { @consume({ context: configContext }) @@ -52,7 +53,7 @@ export class Live2dTips extends UnoLitElement { window.removeEventListener("live2d:send-message", this.handleMessage.bind(this)); } - handleMessage(e: CustomEvent): void { + handleMessage(e: SendMessageEvent): void { const { text, timeout, priority } = e.detail; if (!isNotEmpty(text)) { return; diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index aa46cb5..209faa0 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -3,66 +3,68 @@ import { UnoLitElement } from "../common/UnoLitElement"; import { createComponent } from "@lit/react"; import React from "react"; import { state } from "lit/decorators.js"; +import { ToggleCanvasEvent } from "../events/toggle-canvas"; export class Live2dToggle extends UnoLitElement { - @state() - // 当前工具栏是否显示 - private _isShow = false; + @state() + // 当前工具栏是否显示 + private _isShow = false; - connectedCallback(): void { - super.connectedCallback(); - this.addEventListener("click", this.handleClick); + connectedCallback(): void { + super.connectedCallback(); + this.addEventListener("click", this.handleClick); - // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 - const live2dDisplay = localStorage.getItem("live2d-display"); - if (live2dDisplay) { - if (Date.now() - Number.parseInt(live2dDisplay) <= 24 * 60 * 60 * 1000) { - this.triggerToggleLive2d(false); - return; - } - } - this.triggerToggleLive2d(true); - } + // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 + const live2dDisplay = localStorage.getItem("live2d-display"); + if (live2dDisplay) { + if (Date.now() - Number.parseInt(live2dDisplay) <= 24 * 60 * 60 * 1000) { + this.triggerToggleLive2d(false); + return; + } + } + this.triggerToggleLive2d(true); + } - disconnectedCallback(): void { - super.disconnectedCallback(); - this.removeEventListener("click", this.handleClick); - } + disconnectedCallback(): void { + super.disconnectedCallback(); + this.removeEventListener("click", this.handleClick); + } - render(): TemplateResult { - return html`
- 看板娘 -
`; - } + render(): TemplateResult { + return html`
+ 看板娘 +
`; + } - handleClick() { - this.triggerToggleLive2d(!!this._isShow); - } + handleClick() { + this.triggerToggleLive2d(!!this._isShow); + } - triggerToggleLive2d(isShow: boolean) { - // 当前切换栏与 Live2d 的显示状态相反 - this._isShow = !isShow; - if (isShow) { - localStorage.removeItem("live2d-display"); - } else { - localStorage.setItem("live2d-display", Date.now().toString()); - } - this.dispatchEvent( - new CustomEvent("live2d:toggle-canvas", { - bubbles: true, - composed: true, - detail: { - isShow, - }, - }), - ); - } + triggerToggleLive2d(isShow: boolean) { + // 当前切换栏与 Live2d 的显示状态相反 + this._isShow = !isShow; + if (isShow) { + localStorage.removeItem("live2d-display"); + } else { + localStorage.setItem("live2d-display", Date.now().toString()); + } + this.dispatchEvent( + new ToggleCanvasEvent({ + isShow, + }) + ); + } } customElements.define("live2d-toggle", Live2dToggle); export const Live2dToggleComponent = createComponent({ - tagName: "live2d-toggle", - elementClass: Live2dToggle, - react: React, + tagName: "live2d-toggle", + elementClass: Live2dToggle, + react: React, }); diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 65821ef..5f14ab4 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -7,23 +7,24 @@ import { configContext, type Live2dConfig } from "../context/config-context"; import { property } from "lit/decorators.js"; export class Live2dTools extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; - render(): TemplateResult { - return html` -
- -
- `; - } + constructor() { + super(); + console.log("Live2dTools constructor", this.config); + } + + render(): TemplateResult { + return html`
`; + } } customElements.define("live2d-tools", Live2dTools); export const Live2dToolsComponent = createComponent({ - tagName: "live2d-tools", - elementClass: Live2dTools, - react: React, + tagName: "live2d-tools", + elementClass: Live2dTools, + react: React, }); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 289a3c4..6fd1414 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -9,6 +9,7 @@ import "./Live2dToggle"; import "./Live2dTips"; import "./Live2dCanvas"; import "./Live2dTools"; +import { ToggleCanvasEvent } from "../events/toggle-canvas"; export class Live2dWidget extends UnoLitElement { @consume({ context: configContext }) @@ -43,7 +44,8 @@ export class Live2dWidget extends UnoLitElement { } } - handleToggleWidget(e: CustomEvent) { + handleToggleWidget(e: ToggleCanvasEvent) { + console.log(e); this._isShow = e.detail.isShow; } } diff --git a/packages/live2d/src/events/add-default-message.ts b/packages/live2d/src/events/add-default-message.ts new file mode 100644 index 0000000..b00a15f --- /dev/null +++ b/packages/live2d/src/events/add-default-message.ts @@ -0,0 +1,23 @@ +import { Live2dEvent } from "./types"; + +export const ADD_DEFAULT_MESSAGE_EVENT_NAME = "live2d:add-default-message" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [ADD_DEFAULT_MESSAGE_EVENT_NAME]: AddDefaultMessageEvent; + } +} + +export interface Live2dAddDefaultMessageEventDetail { + // 默认消息 + message: string[] | string; +} + +/** + * 添加默认消息事件 + */ +export class AddDefaultMessageEvent extends Live2dEvent { + constructor(detail: Live2dAddDefaultMessageEventDetail) { + super(ADD_DEFAULT_MESSAGE_EVENT_NAME, detail); + } +} \ No newline at end of file diff --git a/packages/live2d/src/events/before-init.ts b/packages/live2d/src/events/before-init.ts new file mode 100644 index 0000000..7d62f1c --- /dev/null +++ b/packages/live2d/src/events/before-init.ts @@ -0,0 +1,23 @@ +import { Live2dConfig } from "context/config-context"; +import { Live2dEvent } from "./types"; + +export const BEFORE_INIT_EVENT_NAME = "live2d:before-init" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [BEFORE_INIT_EVENT_NAME]: BeforeInitEvent; + } +} + +export interface Live2dBeforeInitEventDetail { + config?: Live2dConfig +} + +/** + * Live2d 初始化前事件 + */ +export class BeforeInitEvent extends Live2dEvent { + constructor(detail: Live2dBeforeInitEventDetail) { + super(BEFORE_INIT_EVENT_NAME, detail); + } +} diff --git a/packages/live2d/src/events/event.d.ts b/packages/live2d/src/events/event.d.ts deleted file mode 100644 index 417d7ca..0000000 --- a/packages/live2d/src/events/event.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */ -interface CustomEvent extends Event { - /** - * Returns any custom data event was created with. Typically used for synthetic events. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) - */ - readonly detail: T; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/initCustomEvent) - */ - initCustomEvent(type: keyof GlobalEventHandlersEventMap, bubbles?: boolean, cancelable?: boolean, detail?: T): void; -} - - -// 扩展全局事件映射 -interface GlobalEventHandlersEventMap { - // Live2d beforeInit 事件 - "live2d:before-init": CustomEvent; - - // 切换 canvas 显示状态事件 - "live2d:toggle-canvas": CustomEvent; - - // 发送 Live2D 消息事件 - "live2d:send-message": CustomEvent; - - // 添加默认消息事件 - "live2d:add-default-message": CustomEvent; -} - -interface Live2dMessageEventDetail { - // 消息内容 - text: string[] | string; - // 消息显示时间 - timeout: number; - // 消息优先级 - priority: number; -} - -interface Live2dBeforeInitEventDetail { - // Live2D 配置 - config: Live2dConfig -} - -interface Live2dToggleEventDetail { - // 是否显示看板娘 - isShow: boolean; -} - -interface Live2dAddDefaultMessageEventDetail { - // 默认消息 - message: string[] | string; -} diff --git a/packages/live2d/src/events/send-message.ts b/packages/live2d/src/events/send-message.ts new file mode 100644 index 0000000..126642a --- /dev/null +++ b/packages/live2d/src/events/send-message.ts @@ -0,0 +1,28 @@ +import { Live2dEvent } from "./types"; + +export const SEND_MESSAGE_EVENT_NAME = "live2d:send-message" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [SEND_MESSAGE_EVENT_NAME]: SendMessageEvent; + } +} + +export interface Live2dMessageEventDetail { + // 消息内容 + text: string[] | string; + // 消息显示时间 + timeout: number; + // 消息优先级 + priority: number; +} + + +/** + * 发送消息事件 + */ +export class SendMessageEvent extends Live2dEvent { + constructor(detail: Live2dMessageEventDetail) { + super(SEND_MESSAGE_EVENT_NAME, detail); + } +} diff --git a/packages/live2d/src/events/tip-events.ts b/packages/live2d/src/events/tip-events.ts index 8b26ddb..372b1d1 100644 --- a/packages/live2d/src/events/tip-events.ts +++ b/packages/live2d/src/events/tip-events.ts @@ -8,9 +8,13 @@ import { timeWithinRange } from "../helpers/timeWithinRange"; import { isNotEmptyString, isString } from "../utils/isString"; import { randomSelection } from "../utils/randomSelection"; import { documentTitle, getReferrerDomain, hasWebsiteHome } from "../utils/util"; +import { AddDefaultMessageEvent } from "./add-default-message"; window.addEventListener("live2d:before-init", async (e) => { const config = e.detail.config; + if (!config) { + return; + } const tips = await _loadTips(config); if (!tips) { return; @@ -43,13 +47,7 @@ const _welcomeEvent = (times: TipTime[]) => { const _holidayEvent = (seasons: TipSeason[]) => { for (const { date, text } of seasons) { if (dataWithinRange(date)) { - window.dispatchEvent( - new CustomEvent("live2d:add-default-message", { - detail: { - message: text, - } - }) - ); + window.dispatchEvent(new AddDefaultMessageEvent({ message: text })); } } } diff --git a/packages/live2d/src/events/toggle-canvas.ts b/packages/live2d/src/events/toggle-canvas.ts new file mode 100644 index 0000000..3c107d5 --- /dev/null +++ b/packages/live2d/src/events/toggle-canvas.ts @@ -0,0 +1,26 @@ +import { Live2dEvent } from "./types"; + +export const TOGGLE_CANVAS_EVENT_NAME = "live2d:toggle-canvas" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [TOGGLE_CANVAS_EVENT_NAME]: ToggleCanvasEvent; + } +} + +export interface Live2dToggleCanvasEventDetail { + // 是否显示看板娘 + isShow: boolean; +} + +/** + * 切换 canvas 显示状态事件 + */ +export class ToggleCanvasEvent extends Live2dEvent { + constructor(detail: Live2dToggleCanvasEventDetail) { + super(TOGGLE_CANVAS_EVENT_NAME, detail, { + bubbles: true, + composed: true, + }); + } +} diff --git a/packages/live2d/src/events/types.ts b/packages/live2d/src/events/types.ts new file mode 100644 index 0000000..a79b7e9 --- /dev/null +++ b/packages/live2d/src/events/types.ts @@ -0,0 +1,5 @@ +export abstract class Live2dEvent extends CustomEvent { + constructor(type: string, detail: T, options?: EventInit) { + super(type, { detail, ...options }); + } +} \ No newline at end of file diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index 53e56eb..41bf65f 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -1,7 +1,7 @@ import type { Live2dConfig } from "context/config-context"; -import { isNotEmptyString } from "../../utils/isString"; +import { isNotEmptyString } from "utils/isString"; import { Tool } from "./tools"; -import { _getFullOrDefaultTips } from '../../events/tip-events'; +import { _getFullOrDefaultTips } from '../events/tip-events'; export type CustomToolConfig = { name: string; diff --git a/packages/live2d/src/live2d/tools/exit.ts b/packages/live2d/src/live2d/tools/exit.ts new file mode 100644 index 0000000..6bde45b --- /dev/null +++ b/packages/live2d/src/live2d/tools/exit.ts @@ -0,0 +1,26 @@ +import { sendMessage } from "helpers/sendMessage"; +import { isNotEmptyString } from "@utils/isString"; +import { Tool } from "./tools"; +import { ToggleCanvasEvent } from "../events/toggle-canvas"; + +/** + * 退出 Live2d 工具 + */ +export class ExitTool extends Tool { + name() { + return "ExitTool"; + } + + icon() { + const icon = this.getConfig().exitIcon; + return isNotEmptyString(icon) ? icon : "ph-x-bold"; + } + + execute() { + sendMessage("愿你有一天能与重要的人重逢。", 2000, 4); + setTimeout(() => { + // 触发退出 Live2d 事件 + window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); + }, 3000) + } +} \ No newline at end of file diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 7becaa1..3107442 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -28,8 +28,8 @@ ], "baseUrl": "./src", "paths": { - "@libs/*": ["libs/*"], // 定义别名 - "@utils/*": ["utils/*"] + "@libs/*": ["libs/*"], + "@utils/*": ["utils/*"], } }, "include": ["src"] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4286167..9acb9aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,6 +26,9 @@ importers: lit: specifier: ^3.2.1 version: 3.2.1 + query-string: + specifier: ^9.1.1 + version: 9.1.1 react: specifier: ^19.0.0 version: 19.0.0 @@ -916,6 +919,10 @@ packages: supports-color: optional: true + decode-uri-component@0.4.1: + resolution: {integrity: sha512-+8VxcR21HhTy8nOt6jf20w0c9CADrw1O8d+VZ/YzzCt4bJ3uBjw+D1q2osAB8RnpwwaeYBxy0HyKQxD5JBMuuQ==} + engines: {node: '>=14.16'} + defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} @@ -979,6 +986,10 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + filter-obj@5.1.0: + resolution: {integrity: sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==} + engines: {node: '>=14.16'} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1164,6 +1175,10 @@ packages: resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} engines: {node: ^10 || ^12 || >=14} + query-string@9.1.1: + resolution: {integrity: sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==} + engines: {node: '>=18'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -1228,6 +1243,10 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + split-on-first@3.0.0: + resolution: {integrity: sha512-qxQJTx2ryR0Dw0ITYyekNQWpz6f8dGd7vffGNflQQ3Iqj9NJ6qiZ7ELpZsJ/QBhIVAiDfXdag3+Gp8RvWa62AA==} + engines: {node: '>=12'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -2227,6 +2246,8 @@ snapshots: dependencies: ms: 2.1.3 + decode-uri-component@0.4.1: {} + defu@6.1.4: {} destr@2.0.3: {} @@ -2326,6 +2347,8 @@ snapshots: dependencies: to-regex-range: 5.0.1 + filter-obj@5.1.0: {} + fsevents@2.3.3: optional: true @@ -2495,6 +2518,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + query-string@9.1.1: + dependencies: + decode-uri-component: 0.4.1 + filter-obj: 5.1.0 + split-on-first: 3.0.0 + queue-microtask@1.2.3: {} react-dom@19.0.0(react@19.0.0): @@ -2568,6 +2597,8 @@ snapshots: source-map@0.6.1: optional: true + split-on-first@3.0.0: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 From c0124d233d6e721a68e33792d23d7d407107c3e4 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Tue, 25 Feb 2025 01:01:06 +0800 Subject: [PATCH 10/26] feat: complete most functionalities of the toolbar --- packages/live2d/package.json | 1 + .../live2d/src/components/Live2dCanvas.tsx | 2 +- .../live2d/src/components/Live2dTools.tsx | 86 +++++++++++++++++-- .../live2d/src/components/Live2dWidget.tsx | 65 +++++++------- packages/live2d/src/context/config-context.ts | 5 ++ packages/live2d/src/helpers/sendMessage.ts | 25 +++--- packages/live2d/src/live2d/tools/ai-chat.ts | 6 +- packages/live2d/src/live2d/tools/asteroids.ts | 9 +- .../live2d/src/live2d/tools/custom-tool.ts | 32 +++++-- packages/live2d/src/live2d/tools/exit.ts | 14 ++- packages/live2d/src/live2d/tools/hitokoto.ts | 22 ++--- packages/live2d/src/live2d/tools/index.ts | 25 ++++++ packages/live2d/src/live2d/tools/info.ts | 11 ++- .../live2d/src/live2d/tools/screenshot.ts | 12 ++- .../live2d/src/live2d/tools/switch-model.ts | 6 +- .../live2d/src/live2d/tools/switch-texture.ts | 8 +- packages/live2d/src/live2d/tools/tools.ts | 10 ++- packages/live2d/tsconfig.json | 9 +- packages/live2d/tsconfig.tsbuildinfo | 2 +- packages/live2d/vite.config.ts | 36 +++++--- 20 files changed, 251 insertions(+), 135 deletions(-) create mode 100644 packages/live2d/src/live2d/tools/index.ts diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 1ea064e..0c484a4 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -22,6 +22,7 @@ "dependencies": { "@lit/context": "^1.1.3", "@lit/react": "^1.0.7", + "iconify-icon": "^2.3.0", "lit": "^3.2.1", "query-string": "^9.1.1", "react": "^19.0.0", diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 134ab68..bfacf06 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -22,7 +22,7 @@ export class Live2dCanvas extends UnoLitElement { render(): TemplateResult { return html` - + `; diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 5f14ab4..7b80d3c 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -4,20 +4,94 @@ import { createComponent } from "@lit/react"; import React from "react"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; -import { property } from "lit/decorators.js"; +import { property, state } from "lit/decorators.js"; +import type { Tool } from "../live2d/tools/tools"; +import { CustomTool } from "../live2d/tools/custom-tool"; +import presetTools from "../live2d/tools"; +import "iconify-icon"; export class Live2dTools extends UnoLitElement { @consume({ context: configContext }) @property({ attribute: false }) public config?: Live2dConfig; - constructor() { - super(); - console.log("Live2dTools constructor", this.config); - } + @state() + private _tools: Tool[] = []; render(): TemplateResult { - return html`
`; + return html`
+ ${this._tools.map(this.renderTool)} +
`; + } + + renderTool(tool: Tool): TemplateResult { + return html` tool.execute()} + > + + `; + } + + connectedCallback(): void { + super.connectedCallback(); + // 根据配置生成对应的工具 + this.initializeTools(); + } + + private initializeTools(): void { + // 获取预设工具 + const presetTools = this.getPresetTools(); + // 获取自定义工具 + const customTools = this.getCustomTools(); + // 合并所有工具,并按照 priority 排序 + const tools = [...presetTools, ...customTools].sort( + (a, b) => b.priority - a.priority + ); + this._tools.push(...tools); + } + + private getCustomTools(): Tool[] { + if (!this.config) { + return []; + } + const customTools = this.config?.customTools; + if (!customTools || customTools.length === 0) { + return []; + } + const mountTool: Tool[] = []; + for (const tool of customTools) { + const customTool = new CustomTool(this.config, tool); + mountTool.push(customTool); + } + return mountTool; + } + + // 获取预设工具 + private getPresetTools(): Tool[] { + if (!this.config) { + return []; + } + const mountTool: Tool[] = []; + const tools = this.config?.tools; + if (!tools || tools.length === 0) { + // 加载所有预设工具 + for (const Tool of presetTools) { + mountTool.push(new Tool(this.config)); + } + return mountTool; + } + + for (const toolName of tools) { + const ToolClass = presetTools.find((t) => t.name === toolName); + if (ToolClass) { + mountTool.push(new ToolClass(this.config)); + } + } + return mountTool; } } diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 6fd1414..99a977b 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -12,48 +12,51 @@ import "./Live2dTools"; import { ToggleCanvasEvent } from "../events/toggle-canvas"; export class Live2dWidget extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; - - @state() - private _isShow = false; - - render(): TemplateResult { - return html` - - ${this.renderLive2dWidget()} + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _isShow = false; + + render(): TemplateResult { + return html` + + ${this.renderLive2dWidget()} `; - } - - renderLive2dTools() { - if (this.config?.isTools) { - return html``; - } - } - - renderLive2dWidget() { - if (this._isShow) { - return html`
+ } + + renderLive2dTools() { + if (this.config?.isTools) { + return html``; + } + } + + renderLive2dWidget() { + if (this._isShow) { + return html`
${this.renderLive2dTools()}
`; - } - } + } + } - handleToggleWidget(e: ToggleCanvasEvent) { - console.log(e); - this._isShow = e.detail.isShow; - } + handleToggleWidget(e: ToggleCanvasEvent) { + this._isShow = e.detail.isShow; + } } customElements.define("live2d-widget", Live2dWidget); export const Live2dWidgetComponent = createComponent({ - tagName: "live2d-widget", - elementClass: Live2dWidget, - react: React, + tagName: "live2d-widget", + elementClass: Live2dWidget, + react: React, }); diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index f75eb62..c6cec15 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,4 +1,5 @@ import { createContext } from '@lit/context'; +import { CustomToolConfig } from 'live2d/tools/custom-tool'; export interface ObjectAny extends Record { } @@ -40,6 +41,10 @@ export interface TipConfig { export interface Live2dToolsConfig { // 是否显示右侧工具栏 isTools?: boolean; + // 显示的预设工具 + tools?: string[]; + // 自定义工具 + customTools?: CustomToolConfig[]; // openai 图标 openaiIcon?: string; // 一言图标 diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index 72c2412..edc36b2 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -1,19 +1,18 @@ +import { SendMessageEvent } from "../events/send-message"; + /** * 向 Live2D 发送消息事件 - * @param text - * @param timeout - * @param priority + * @param text + * @param timeout + * @param priority */ -export function sendMessage(text: string | string[] | undefined, timeout = 3000, priority = 0) { +export function sendMessage( + text: string | string[] | undefined, + timeout = 3000, + priority = 0 +) { if (!text) { return; } - const event = new CustomEvent("live2d:send-message", { - detail: { - text, - timeout, - priority, - }, - }); - window.dispatchEvent(event); -} \ No newline at end of file + window.dispatchEvent(new SendMessageEvent({ text, timeout, priority })); +} diff --git a/packages/live2d/src/live2d/tools/ai-chat.ts b/packages/live2d/src/live2d/tools/ai-chat.ts index a239136..c7c3090 100644 --- a/packages/live2d/src/live2d/tools/ai-chat.ts +++ b/packages/live2d/src/live2d/tools/ai-chat.ts @@ -5,9 +5,7 @@ import { Tool } from "./tools"; * AI 聊天工具 */ export class AIChatTool extends Tool { - name() { - return "AIChat"; - } + priority = 100; icon() { const icon = this.getConfig().aiChatUrl; @@ -17,4 +15,4 @@ export class AIChatTool extends Tool { execute() { // TODO: 打开 AI 聊天 } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/asteroids.ts b/packages/live2d/src/live2d/tools/asteroids.ts index d96a4b1..561150b 100644 --- a/packages/live2d/src/live2d/tools/asteroids.ts +++ b/packages/live2d/src/live2d/tools/asteroids.ts @@ -11,10 +11,7 @@ declare global { * 小宇宙小游戏工具 */ export class AsteroidsTool extends Tool { - name() { - return "Asteroids"; - } - + priority = 80; icon() { const icon = this.getConfig().asteroidsIcon; return isNotEmptyString(icon) ? icon : "ph-paper-plane-tilt-fill"; @@ -22,8 +19,8 @@ export class AsteroidsTool extends Tool { execute() { // @ts-ignore - import("@libs/asteroids.min.js").then((module) => { + import("../../libs/asteroids.min.js").then((module) => { new module.default(); }); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index 41bf65f..94591ff 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -1,27 +1,32 @@ -import type { Live2dConfig } from "context/config-context"; -import { isNotEmptyString } from "utils/isString"; +import type { Live2dConfig } from "../../context/config-context"; +import { isNotEmptyString } from "../../utils/isString"; import { Tool } from "./tools"; -import { _getFullOrDefaultTips } from '../events/tip-events'; export type CustomToolConfig = { name: string; icon?: string; - execute: () => void; -} + priority?: number; + execute: ((config: Live2dConfig) => void) | string; +}; /** * 自定义工具 */ export class CustomTool extends Tool { + priority: number; _name: string; _icon?: string; - _execute: () => void; + _execute: ((config: Live2dConfig) => void) | string; - constructor(config: Live2dConfig, { name, icon, execute }: CustomToolConfig) { + constructor( + config: Live2dConfig, + { name, icon, execute, priority }: CustomToolConfig + ) { super(config); this._name = name; this._icon = icon; this._execute = execute; + this.priority = priority || 0; } name() { @@ -34,6 +39,15 @@ export class CustomTool extends Tool { } execute() { - this._execute.bind(this)(); + if (typeof this._execute === "string") { + const customClass = new Function(` + return class { + ${this._execute} + } + `)(); + new customClass().execute.bind(this)(this.getConfig()); + return; + } + this._execute.bind(this)(this.getConfig()); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/exit.ts b/packages/live2d/src/live2d/tools/exit.ts index 6bde45b..1c26186 100644 --- a/packages/live2d/src/live2d/tools/exit.ts +++ b/packages/live2d/src/live2d/tools/exit.ts @@ -1,15 +1,13 @@ -import { sendMessage } from "helpers/sendMessage"; -import { isNotEmptyString } from "@utils/isString"; +import { sendMessage } from "../../helpers/sendMessage"; +import { isNotEmptyString } from "../../utils/isString"; import { Tool } from "./tools"; -import { ToggleCanvasEvent } from "../events/toggle-canvas"; +import { ToggleCanvasEvent } from "../../events/toggle-canvas"; /** * 退出 Live2d 工具 */ export class ExitTool extends Tool { - name() { - return "ExitTool"; - } + priority = 10; icon() { const icon = this.getConfig().exitIcon; @@ -21,6 +19,6 @@ export class ExitTool extends Tool { setTimeout(() => { // 触发退出 Live2d 事件 window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); - }, 3000) + }, 3000); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/hitokoto.ts b/packages/live2d/src/live2d/tools/hitokoto.ts index 5ef04f8..c9dc296 100644 --- a/packages/live2d/src/live2d/tools/hitokoto.ts +++ b/packages/live2d/src/live2d/tools/hitokoto.ts @@ -6,15 +6,13 @@ import { sendMessage } from "../../helpers/sendMessage"; /** * 一言工具,使用一言接口获取一句话 * 如需使用自定义的接口,则需要满足 hitokoto 的接口规范。 - * + * * @link https://developer.hitokoto.cn/sentence/demo.html */ export class HitokotoTool extends Tool { - _default_api = "https://v1.hitokoto.cn"; + priority = 90; - name() { - return "Hitokoto"; - } + _default_api = "https://v1.hitokoto.cn"; icon() { const icon = this.getConfig().aiChatUrl; @@ -22,7 +20,7 @@ export class HitokotoTool extends Tool { } async execute() { - const { hitokoto, description } = await this._getHitokotoMessage() || {}; + const { hitokoto, description } = (await this._getHitokotoMessage()) || {}; if (isNotEmptyString(hitokoto)) { sendMessage(hitokoto, 6000, 2); setTimeout(() => { @@ -31,7 +29,9 @@ export class HitokotoTool extends Tool { } } - private async _getHitokotoMessage(): Promise<{ hitokoto: string, description: string } | undefined> { + private async _getHitokotoMessage(): Promise< + { hitokoto: string; description: string } | undefined + > { const unverifiedApi = this.getConfig().hitokotoApi || this._default_api; const parsedApi = queryString.parseUrl(unverifiedApi); const newParams = { ...parsedApi.query, encode: "json", charset: "utf-8" }; @@ -40,14 +40,14 @@ export class HitokotoTool extends Tool { if (isNotEmptyString(hitokoto)) { return { hitokoto: "hitokoto", - description: `这句一言来自 「${from}」,是 ${creator} 在 hitokoto.cn 投稿的。` - } + description: `这句一言来自 「${from}」,是 ${creator} 在 hitokoto.cn 投稿的。`, + }; } } private _fetchHitokoto(hitokotoApi: string): Promise { return fetch(hitokotoApi) - .then(res => res.json()) + .then((res) => res.json()) .then((result: HitokotoResult) => { return result; }); @@ -70,4 +70,4 @@ export type HitokotoResult = { commit_from?: string; created_at?: string; length?: number; -} \ No newline at end of file +}; diff --git a/packages/live2d/src/live2d/tools/index.ts b/packages/live2d/src/live2d/tools/index.ts new file mode 100644 index 0000000..32ba4a3 --- /dev/null +++ b/packages/live2d/src/live2d/tools/index.ts @@ -0,0 +1,25 @@ +import type { Live2dConfig } from "../../context/config-context"; +import { AIChatTool } from "./ai-chat"; +import { AsteroidsTool } from "./asteroids"; +import { ExitTool } from "./exit"; +import { HitokotoTool } from "./hitokoto"; +import { InfoTool } from "./info"; +import { ScreenshotTool } from "./screenshot"; +import { SwitchModelTool } from "./switch-model"; +import { SwitchTextureTool } from "./switch-texture"; +import type { Tool } from "./tools"; + +export type ToolConstructor = new (config: Live2dConfig) => Tool; + +export const presetTools: ToolConstructor[] = [ + AsteroidsTool, + AIChatTool, + HitokotoTool, + ExitTool, + InfoTool, + ScreenshotTool, + SwitchModelTool, + SwitchTextureTool, +]; + +export default presetTools; diff --git a/packages/live2d/src/live2d/tools/info.ts b/packages/live2d/src/live2d/tools/info.ts index 8629ca4..6ea0a9e 100644 --- a/packages/live2d/src/live2d/tools/info.ts +++ b/packages/live2d/src/live2d/tools/info.ts @@ -5,17 +5,16 @@ import { Tool } from "./tools"; * 前往站点工具 */ export class InfoTool extends Tool { - name() { - return "InfoTool"; - } - + priority = 40; + icon() { const icon = this.getConfig().infoIcon; return isNotEmptyString(icon) ? icon : "ph-info-fill"; } execute() { - const siteUrl = this.getConfig().infoSite || "https://github.com/LIlGG/plugin-live2d"; + const siteUrl = + this.getConfig().infoSite || "https://github.com/LIlGG/plugin-live2d"; window.open(siteUrl); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/screenshot.ts b/packages/live2d/src/live2d/tools/screenshot.ts index 8d9ccb9..f8174b6 100644 --- a/packages/live2d/src/live2d/tools/screenshot.ts +++ b/packages/live2d/src/live2d/tools/screenshot.ts @@ -1,4 +1,4 @@ -import { sendMessage } from "helpers/sendMessage"; +import { sendMessage } from "../../helpers/sendMessage"; import { isNotEmptyString } from "../../utils/isString"; import { Tool } from "./tools"; @@ -11,19 +11,17 @@ declare const Live2D: { * 截图工具 */ export class ScreenshotTool extends Tool { - name() { - return "Screenshot"; - } + priority = 50; icon() { const icon = this.getConfig().screenshotIcon; - return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; + return isNotEmptyString(icon) ? icon : "ph-camera-fill"; } execute() { sendMessage("照好了嘛,是不是很可爱呢?", 6000, 2); - const screenshotName = this.getConfig().screenshotName || 'live2d'; + const screenshotName = this.getConfig().screenshotName || "live2d"; Live2D.captureName = `${screenshotName}.png`; Live2D.captureFrame = true; } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/switch-model.ts b/packages/live2d/src/live2d/tools/switch-model.ts index 52cc0f2..23fdabe 100644 --- a/packages/live2d/src/live2d/tools/switch-model.ts +++ b/packages/live2d/src/live2d/tools/switch-model.ts @@ -5,9 +5,7 @@ import { Tool } from "./tools"; * 切换模型工具 */ export class SwitchModelTool extends Tool { - name() { - return "SwitchModel"; - } + priority = 70; icon() { const icon = this.getConfig().switchModelIcon; @@ -17,4 +15,4 @@ export class SwitchModelTool extends Tool { execute() { console.log("Model switch event emitted."); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/switch-texture.ts b/packages/live2d/src/live2d/tools/switch-texture.ts index a54b70d..05cc176 100644 --- a/packages/live2d/src/live2d/tools/switch-texture.ts +++ b/packages/live2d/src/live2d/tools/switch-texture.ts @@ -5,16 +5,14 @@ import { Tool } from "./tools"; * 切换纹理工具 */ export class SwitchTextureTool extends Tool { - name() { - return "SwitchTexture"; - } + priority = 60; icon() { const icon = this.getConfig().switchTextureIcon; - return isNotEmptyString(icon) ? icon : "ph-camera-fill"; + return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; } execute() { // 发出切换模型的事件 } -} \ No newline at end of file +} diff --git a/packages/live2d/src/live2d/tools/tools.ts b/packages/live2d/src/live2d/tools/tools.ts index 40cb404..89ba292 100644 --- a/packages/live2d/src/live2d/tools/tools.ts +++ b/packages/live2d/src/live2d/tools/tools.ts @@ -2,12 +2,18 @@ import type { Live2dConfig } from "../../context/config-context"; export abstract class Tool { private _config: Live2dConfig; + /** + * 优先级, 数字越大越靠前 + */ + abstract priority: number; constructor(config: Live2dConfig) { this._config = config; } - abstract name(): string; + name(): string { + return this.constructor.name; + } abstract icon(): string; @@ -16,4 +22,4 @@ export abstract class Tool { protected getConfig(): Live2dConfig { return this._config; } -} \ No newline at end of file +} diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 3107442..29206d7 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -25,12 +25,7 @@ { "name": "ts-lit-plugin" } - ], - "baseUrl": "./src", - "paths": { - "@libs/*": ["libs/*"], - "@utils/*": ["utils/*"], - } + ] }, - "include": ["src"] + "include": ["src/**/*"] } diff --git a/packages/live2d/tsconfig.tsbuildinfo b/packages/live2d/tsconfig.tsbuildinfo index da9ec8e..7049d32 100644 --- a/packages/live2d/tsconfig.tsbuildinfo +++ b/packages/live2d/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/common/unolitelement.ts","./src/components/live2dtoggle.tsx","./src/events/index.ts","./src/styles/unocss.global.css.d.ts","./src/util/unomixin.ts"],"version":"5.7.3"} \ No newline at end of file +{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/send-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/types.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/live2d/model.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/styles/unocss.global.css.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"errors":true,"version":"5.7.3"} \ No newline at end of file diff --git a/packages/live2d/vite.config.ts b/packages/live2d/vite.config.ts index 896637b..1f816ed 100644 --- a/packages/live2d/vite.config.ts +++ b/packages/live2d/vite.config.ts @@ -1,24 +1,32 @@ -import { defineConfig } from 'vite' -import { resolve } from 'node:path' -import react from '@vitejs/plugin-react' +import { defineConfig } from "vite"; +import { resolve } from "node:path"; +import react from "@vitejs/plugin-react"; export default defineConfig({ - plugins: [react({ - babel: { - parserOpts: { - plugins: ['decorators-legacy'], + plugins: [ + react({ + babel: { + parserOpts: { + plugins: ["decorators-legacy"], + }, }, - }, - })], + }), + ], build: { lib: { - entry: resolve(__dirname, 'src/index.ts'), - name: 'Live2d', - fileName: 'live2d', + entry: resolve(__dirname, "src/index.ts"), + name: "Live2d", + fileName: "live2d", }, rollupOptions: { - external: ['react', 'react-dom'], + external: ["react", "react-dom"], + }, + }, + + server: { + fs: { + strict: false } } -}) +}); From e319113371e741da6b7ca2216a628d7f99efc15f Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Sat, 1 Mar 2025 11:05:17 +0800 Subject: [PATCH 11/26] feat: add Cubism2 and Cubism4 as rendering engines --- packages/live2d/package.json | 2 + .../live2d/src/components/Live2dCanvas.tsx | 65 +- .../live2d/src/components/Live2dContext.tsx | 28 +- packages/live2d/src/libs/live2d.min.js | 8121 +---------------- .../live2d/src/libs/live2dcubismcore.min.js | 9 + packages/live2d/src/live2d/model.ts | 59 +- packages/live2d/tsconfig.json | 3 +- pnpm-lock.yaml | 1072 ++- 8 files changed, 1173 insertions(+), 8186 deletions(-) create mode 100644 packages/live2d/src/libs/live2dcubismcore.min.js diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 0c484a4..25b6a73 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -24,6 +24,8 @@ "@lit/react": "^1.0.7", "iconify-icon": "^2.3.0", "lit": "^3.2.1", + "pixi-live2d-display": "^0.4.0", + "pixi.js": "^6.5.2", "query-string": "^9.1.1", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index bfacf06..99ad580 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -6,46 +6,49 @@ import { property, query, state } from "lit/decorators.js"; import Model from "../live2d/model"; import { consume } from "@lit/context"; import { configContext, type Live2dConfig } from "../context/config-context"; -import "../libs/live2d.min.js"; import { BeforeInitEvent } from "../events/before-init.js"; export class Live2dCanvas extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; - - @state() - private _model: unknown; - - @query("#live2d") - private _live2d; - - render(): TemplateResult { - return html` - - - + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _model: unknown; + + @query("#live2d") + private _live2d; + + render(): TemplateResult { + return html` + + `; - } + } - connectedCallback(): void { - super.connectedCallback(); - // 发出 Live2d beforeInit 事件 + connectedCallback(): void { + super.connectedCallback(); + // 发出 Live2d beforeInit 事件 window.dispatchEvent(new BeforeInitEvent({ config: this.config })); - } - - protected firstUpdated(_changedProperties: PropertyValues): void { - super.firstUpdated(_changedProperties); - if (this.config && this._live2d) { - this._model = new Model(this._live2d, this.config); - } - } + } + + protected firstUpdated(_changedProperties: PropertyValues): void { + super.firstUpdated(_changedProperties); + if (this.config && this._live2d) { + this._model = new Model(this._live2d, this.config); + } + } } customElements.define("live2d-canvas", Live2dCanvas); export const Live2dCanvasComponent = createComponent({ - tagName: "live2d-canvas", - elementClass: Live2dCanvas, - react: React, + tagName: "live2d-canvas", + elementClass: Live2dCanvas, + react: React, }); diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index bb45232..9ddaaa3 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -8,25 +8,23 @@ import { configContext, type Live2dConfig } from "../context/config-context"; import "../events"; export class Live2dContext extends UnoLitElement { - @provide({ context: configContext }) - config = { - apiPath: "https://live2d.fghrsh.net/api", - live2dLocation: "right", - consoleShowStatus: false, - isTools: true, - } as Live2dConfig; + @provide({ context: configContext }) + config = { + apiPath: "https://live2d.fghrsh.net/api", + live2dLocation: "right", + consoleShowStatus: false, + isTools: true, + } as Live2dConfig; - render(): TemplateResult { - return html` - - `; - } + render(): TemplateResult { + return html` `; + } } customElements.define("live2d-context", Live2dContext); export const Live2dContextComponent = createComponent({ - tagName: "live2d-context", - elementClass: Live2dContext, - react: React, + tagName: "live2d-context", + elementClass: Live2dContext, + react: React, }); diff --git a/packages/live2d/src/libs/live2d.min.js b/packages/live2d/src/libs/live2d.min.js index 156325a..c3ed3bc 100644 --- a/packages/live2d/src/libs/live2d.min.js +++ b/packages/live2d/src/libs/live2d.min.js @@ -1,8121 +1,2 @@ -!(function (t) { - function i(r) { - if (e[r]) return e[r].exports; - var o = (e[r] = { i: r, l: !1, exports: {} }); - return t[r].call(o.exports, o, o.exports, i), (o.l = !0), o.exports; - } - var e = {}; - (i.m = t), - (i.c = e), - (i.d = function (t, e, r) { - i.o(t, e) || - Object.defineProperty(t, e, { - configurable: !1, - enumerable: !0, - get: r, - }); - }), - (i.n = function (t) { - var e = - t && t.__esModule - ? function () { - return t.default; - } - : function () { - return t; - }; - return i.d(e, "a", e), e; - }), - (i.o = function (t, i) { - return Object.prototype.hasOwnProperty.call(t, i); - }), - (i.p = ""), - i((i.s = 4)); -})([ - function (t, i, e) { - "use strict"; - function r() { - (this.live2DModel = null), - (this.modelMatrix = null), - (this.eyeBlink = null), - (this.physics = null), - (this.pose = null), - (this.debugMode = !1), - (this.initialized = !1), - (this.updating = !1), - (this.alpha = 1), - (this.accAlpha = 0), - (this.lipSync = !1), - (this.lipSyncValue = 0), - (this.accelX = 0), - (this.accelY = 0), - (this.accelZ = 0), - (this.dragX = 0), - (this.dragY = 0), - (this.startTimeMSec = null), - (this.mainMotionManager = new h()), - (this.expressionManager = new h()), - (this.motions = {}), - (this.expressions = {}), - (this.isTexLoaded = !1); - } - function o() { - AMotion.prototype.constructor.call(this), (this.paramList = new Array()); - } - function n() { - (this.id = ""), (this.type = -1), (this.value = null); - } - function s() { - (this.nextBlinkTime = null), - (this.stateStartTime = null), - (this.blinkIntervalMsec = null), - (this.eyeState = g.STATE_FIRST), - (this.blinkIntervalMsec = 4e3), - (this.closingMotionMsec = 100), - (this.closedMotionMsec = 50), - (this.openingMotionMsec = 150), - (this.closeIfZero = !0), - (this.eyeID_L = "PARAM_EYE_L_OPEN"), - (this.eyeID_R = "PARAM_EYE_R_OPEN"); - } - function _() { - (this.tr = new Float32Array(16)), this.identity(); - } - function a(t, i) { - _.prototype.constructor.call(this), (this.width = t), (this.height = i); - } - function h() { - MotionQueueManager.prototype.constructor.call(this), - (this.currentPriority = null), - (this.reservePriority = null), - (this.super = MotionQueueManager.prototype); - } - function l() { - (this.physicsList = new Array()), - (this.startTimeMSec = UtSystem.getUserTimeMSec()); - } - function $() { - (this.lastTime = 0), - (this.lastModel = null), - (this.partsGroups = new Array()); - } - function u(t) { - (this.paramIndex = -1), - (this.partsIndex = -1), - (this.link = null), - (this.id = t); - } - function p() { - (this.EPSILON = 0.01), - (this.faceTargetX = 0), - (this.faceTargetY = 0), - (this.faceX = 0), - (this.faceY = 0), - (this.faceVX = 0), - (this.faceVY = 0), - (this.lastTimeSec = 0); - } - function f() { - _.prototype.constructor.call(this), - (this.screenLeft = null), - (this.screenRight = null), - (this.screenTop = null), - (this.screenBottom = null), - (this.maxLeft = null), - (this.maxRight = null), - (this.maxTop = null), - (this.maxBottom = null), - (this.max = Number.MAX_VALUE), - (this.min = 0); - } - function c() {} - var d = 0; - (r.prototype.getModelMatrix = function () { - return this.modelMatrix; - }), - (r.prototype.setAlpha = function (t) { - t > 0.999 && (t = 1), t < 0.001 && (t = 0), (this.alpha = t); - }), - (r.prototype.getAlpha = function () { - return this.alpha; - }), - (r.prototype.isInitialized = function () { - return this.initialized; - }), - (r.prototype.setInitialized = function (t) { - this.initialized = t; - }), - (r.prototype.isUpdating = function () { - return this.updating; - }), - (r.prototype.setUpdating = function (t) { - this.updating = t; - }), - (r.prototype.getLive2DModel = function () { - return this.live2DModel; - }), - (r.prototype.setLipSync = function (t) { - this.lipSync = t; - }), - (r.prototype.setLipSyncValue = function (t) { - this.lipSyncValue = t; - }), - (r.prototype.setAccel = function (t, i, e) { - (this.accelX = t), (this.accelY = i), (this.accelZ = e); - }), - (r.prototype.setDrag = function (t, i) { - (this.dragX = t), (this.dragY = i); - }), - (r.prototype.getMainMotionManager = function () { - return this.mainMotionManager; - }), - (r.prototype.getExpressionManager = function () { - return this.expressionManager; - }), - (r.prototype.loadModelData = function (t, i) { - var e = c.getPlatformManager(); - this.debugMode && e.log("Load model : " + t); - var r = this; - e.loadLive2DModel(t, function (t) { - if ( - ((r.live2DModel = t), - r.live2DModel.saveParam(), - 0 != Live2D.getError()) - ) - return void console.error("Error : Failed to loadModelData()."); - (r.modelMatrix = new a( - r.live2DModel.getCanvasWidth(), - r.live2DModel.getCanvasHeight() - )), - r.modelMatrix.setWidth(2), - r.modelMatrix.setCenterPosition(0, 0), - i(r.live2DModel); - }); - }), - (r.prototype.loadTexture = function (t, i, e) { - d++; - var r = c.getPlatformManager(); - this.debugMode && r.log("Load Texture : " + i); - var o = this; - r.loadTexture(this.live2DModel, t, i, function () { - d--, 0 == d && (o.isTexLoaded = !0), "function" == typeof e && e(); - }); - }), - (r.prototype.loadMotion = function (t, i, e) { - var r = c.getPlatformManager(); - this.debugMode && r.log("Load Motion : " + i); - var o = null, - n = this; - r.loadBytes(i, function (i) { - (o = Live2DMotion.loadMotion(i)), - null != t && (n.motions[t] = o), - e(o); - }); - }), - (r.prototype.loadExpression = function (t, i, e) { - var r = c.getPlatformManager(); - this.debugMode && r.log("Load Expression : " + i); - var n = this; - r.loadBytes(i, function (i) { - null != t && (n.expressions[t] = o.loadJson(i)), - "function" == typeof e && e(); - }); - }), - (r.prototype.loadPose = function (t, i) { - var e = c.getPlatformManager(); - this.debugMode && e.log("Load Pose : " + t); - var r = this; - try { - e.loadBytes(t, function (t) { - (r.pose = $.load(t)), "function" == typeof i && i(); - }); - } catch (t) { - console.warn(t); - } - }), - (r.prototype.loadPhysics = function (t) { - var i = c.getPlatformManager(); - this.debugMode && i.log("Load Physics : " + t); - var e = this; - try { - i.loadBytes(t, function (t) { - e.physics = l.load(t); - }); - } catch (t) { - console.warn(t); - } - }), - (r.prototype.hitTestSimple = function (t, i, e) { - if (null === this.live2DModel) return !1; - var r = this.live2DModel.getDrawDataIndex(t); - if (r < 0) return !1; - for ( - var o = this.live2DModel.getTransformedPoints(r), - n = this.live2DModel.getCanvasWidth(), - s = 0, - _ = this.live2DModel.getCanvasHeight(), - a = 0, - h = 0; - h < o.length; - h += 2 - ) { - var l = o[h], - $ = o[h + 1]; - l < n && (n = l), - l > s && (s = l), - $ < _ && (_ = $), - $ > a && (a = $); - } - var u = this.modelMatrix.invertTransformX(i), - p = this.modelMatrix.invertTransformY(e); - return n <= u && u <= s && _ <= p && p <= a; - }), - (r.prototype.hitTestSimpleCustom = function (t, i, e, r) { - return ( - null !== this.live2DModel && - e >= t[0] && - e <= i[0] && - r <= t[1] && - r >= i[1] - ); - }), - (o.prototype = new AMotion()), - (o.EXPRESSION_DEFAULT = "DEFAULT"), - (o.TYPE_SET = 0), - (o.TYPE_ADD = 1), - (o.TYPE_MULT = 2), - (o.loadJson = function (t) { - var i = new o(), - e = c.getPlatformManager(), - r = e.jsonParseFromBytes(t); - if ( - (i.setFadeIn(parseInt(r.fade_in) > 0 ? parseInt(r.fade_in) : 1e3), - i.setFadeOut(parseInt(r.fade_out) > 0 ? parseInt(r.fade_out) : 1e3), - null == r.params) - ) - return i; - var s = r.params, - _ = s.length; - i.paramList = []; - for (var a = 0; a < _; a++) { - var h = s[a], - l = h.id.toString(), - $ = parseFloat(h.val), - u = o.TYPE_ADD, - p = null != h.calc ? h.calc.toString() : "add"; - if ( - (u = - "add" === p - ? o.TYPE_ADD - : "mult" === p - ? o.TYPE_MULT - : "set" === p - ? o.TYPE_SET - : o.TYPE_ADD) == o.TYPE_ADD - ) { - var f = null == h.def ? 0 : parseFloat(h.def); - $ -= f; - } else if (u == o.TYPE_MULT) { - var f = null == h.def ? 1 : parseFloat(h.def); - 0 == f && (f = 1), ($ /= f); - } - var d = new n(); - (d.id = l), (d.type = u), (d.value = $), i.paramList.push(d); - } - return i; - }), - (o.prototype.updateParamExe = function (t, i, e, r) { - for (var n = this.paramList.length - 1; n >= 0; --n) { - var s = this.paramList[n]; - s.type == o.TYPE_ADD - ? t.addToParamFloat(s.id, s.value, e) - : s.type == o.TYPE_MULT - ? t.multParamFloat(s.id, s.value, e) - : s.type == o.TYPE_SET && t.setParamFloat(s.id, s.value, e); - } - }), - (s.prototype.calcNextBlink = function () { - return ( - UtSystem.getUserTimeMSec() + - Math.random() * (2 * this.blinkIntervalMsec - 1) - ); - }), - (s.prototype.setInterval = function (t) { - this.blinkIntervalMsec = t; - }), - (s.prototype.setEyeMotion = function (t, i, e) { - (this.closingMotionMsec = t), - (this.closedMotionMsec = i), - (this.openingMotionMsec = e); - }), - (s.prototype.updateParam = function (t) { - var i, - e = UtSystem.getUserTimeMSec(), - r = 0; - switch (this.eyeState) { - case g.STATE_CLOSING: - (r = (e - this.stateStartTime) / this.closingMotionMsec), - r >= 1 && - ((r = 1), - (this.eyeState = g.STATE_CLOSED), - (this.stateStartTime = e)), - (i = 1 - r); - break; - case g.STATE_CLOSED: - (r = (e - this.stateStartTime) / this.closedMotionMsec), - r >= 1 && - ((this.eyeState = g.STATE_OPENING), (this.stateStartTime = e)), - (i = 0); - break; - case g.STATE_OPENING: - (r = (e - this.stateStartTime) / this.openingMotionMsec), - r >= 1 && - ((r = 1), - (this.eyeState = g.STATE_INTERVAL), - (this.nextBlinkTime = this.calcNextBlink())), - (i = r); - break; - case g.STATE_INTERVAL: - this.nextBlinkTime < e && - ((this.eyeState = g.STATE_CLOSING), (this.stateStartTime = e)), - (i = 1); - break; - case g.STATE_FIRST: - default: - (this.eyeState = g.STATE_INTERVAL), - (this.nextBlinkTime = this.calcNextBlink()), - (i = 1); - } - this.closeIfZero || (i = -i), - t.setParamFloat(this.eyeID_L, i), - t.setParamFloat(this.eyeID_R, i); - }); - var g = function () {}; - (g.STATE_FIRST = "STATE_FIRST"), - (g.STATE_INTERVAL = "STATE_INTERVAL"), - (g.STATE_CLOSING = "STATE_CLOSING"), - (g.STATE_CLOSED = "STATE_CLOSED"), - (g.STATE_OPENING = "STATE_OPENING"), - (_.mul = function (t, i, e) { - var r, - o, - n, - s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (r = 0; r < 4; r++) - for (o = 0; o < 4; o++) - for (n = 0; n < 4; n++) s[r + 4 * o] += t[r + 4 * n] * i[n + 4 * o]; - for (r = 0; r < 16; r++) e[r] = s[r]; - }), - (_.prototype.identity = function () { - for (var t = 0; t < 16; t++) this.tr[t] = t % 5 == 0 ? 1 : 0; - }), - (_.prototype.getArray = function () { - return this.tr; - }), - (_.prototype.getCopyMatrix = function () { - return new Float32Array(this.tr); - }), - (_.prototype.setMatrix = function (t) { - if (null != this.tr && this.tr.length == this.tr.length) - for (var i = 0; i < 16; i++) this.tr[i] = t[i]; - }), - (_.prototype.getScaleX = function () { - return this.tr[0]; - }), - (_.prototype.getScaleY = function () { - return this.tr[5]; - }), - (_.prototype.transformX = function (t) { - return (this.tr[0] * t * 8) / 3 + this.tr[12]; - }), - (_.prototype.transformY = function (t) { - return (this.tr[5] * t * 8) / 3 + this.tr[13]; - }), - (_.prototype.invertTransformX = function (t) { - return (t - this.tr[12]) / this.tr[0]; - }), - (_.prototype.invertTransformY = function (t) { - return (t - this.tr[13]) / this.tr[5]; - }), - (_.prototype.multTranslate = function (t, i) { - var e = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1]; - _.mul(e, this.tr, this.tr); - }), - (_.prototype.translate = function (t, i) { - (this.tr[12] = t), (this.tr[13] = i); - }), - (_.prototype.translateX = function (t) { - this.tr[12] = t; - }), - (_.prototype.translateY = function (t) { - this.tr[13] = t; - }), - (_.prototype.multScale = function (t, i) { - var e = [t, 0, 0, 0, 0, i, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; - _.mul(e, this.tr, this.tr); - }), - (_.prototype.scale = function (t, i) { - (this.tr[0] = t), (this.tr[5] = i); - }), - (a.prototype = new _()), - (a.prototype.setPosition = function (t, i) { - this.translate(t, i); - }), - (a.prototype.setCenterPosition = function (t, i) { - var e = this.width * this.getScaleX(), - r = this.height * this.getScaleY(); - this.translate(t - e / 2, i - r / 2); - }), - (a.prototype.top = function (t) { - this.setY(t); - }), - (a.prototype.bottom = function (t) { - var i = this.height * this.getScaleY(); - this.translateY(t - i); - }), - (a.prototype.left = function (t) { - this.setX(t); - }), - (a.prototype.right = function (t) { - var i = this.width * this.getScaleX(); - this.translateX(t - i); - }), - (a.prototype.centerX = function (t) { - var i = this.width * this.getScaleX(); - this.translateX(t - i / 2); - }), - (a.prototype.centerY = function (t) { - var i = this.height * this.getScaleY(); - this.translateY(t - i / 2); - }), - (a.prototype.setX = function (t) { - this.translateX(t); - }), - (a.prototype.setY = function (t) { - this.translateY(t); - }), - (a.prototype.setHeight = function (t) { - var i = t / this.height, - e = -i; - this.scale(i, e); - }), - (a.prototype.setWidth = function (t) { - var i = t / this.width, - e = -i; - this.scale(i, e); - }), - (h.prototype = new MotionQueueManager()), - (h.prototype.getCurrentPriority = function () { - return this.currentPriority; - }), - (h.prototype.getReservePriority = function () { - return this.reservePriority; - }), - (h.prototype.reserveMotion = function (t) { - return ( - !(this.reservePriority >= t) && - !(this.currentPriority >= t) && - ((this.reservePriority = t), !0) - ); - }), - (h.prototype.setReservePriority = function (t) { - this.reservePriority = t; - }), - (h.prototype.updateParam = function (t) { - var i = MotionQueueManager.prototype.updateParam.call(this, t); - return this.isFinished() && (this.currentPriority = 0), i; - }), - (h.prototype.startMotionPrio = function (t, i) { - return ( - i == this.reservePriority && (this.reservePriority = 0), - (this.currentPriority = i), - this.startMotion(t, !1) - ); - }), - (l.load = function (t) { - for ( - var i = new l(), - e = c.getPlatformManager(), - r = e.jsonParseFromBytes(t), - o = r.physics_hair, - n = o.length, - s = 0; - s < n; - s++ - ) { - var _ = o[s], - a = new PhysicsHair(), - h = _.setup, - $ = parseFloat(h.length), - u = parseFloat(h.regist), - p = parseFloat(h.mass); - a.setup($, u, p); - for (var f = _.src, d = f.length, g = 0; g < d; g++) { - var y = f[g], - m = y.id, - T = PhysicsHair.Src.SRC_TO_X, - P = y.ptype; - "x" === P - ? (T = PhysicsHair.Src.SRC_TO_X) - : "y" === P - ? (T = PhysicsHair.Src.SRC_TO_Y) - : "angle" === P - ? (T = PhysicsHair.Src.SRC_TO_G_ANGLE) - : UtDebug.error("live2d", "Invalid parameter:PhysicsHair.Src"); - var S = parseFloat(y.scale), - v = parseFloat(y.weight); - a.addSrcParam(T, m, S, v); - } - for (var L = _.targets, M = L.length, g = 0; g < M; g++) { - var E = L[g], - m = E.id, - T = PhysicsHair.Target.TARGET_FROM_ANGLE, - P = E.ptype; - "angle" === P - ? (T = PhysicsHair.Target.TARGET_FROM_ANGLE) - : "angle_v" === P - ? (T = PhysicsHair.Target.TARGET_FROM_ANGLE_V) - : UtDebug.error("live2d", "Invalid parameter:PhysicsHair.Target"); - var S = parseFloat(E.scale), - v = parseFloat(E.weight); - a.addTargetParam(T, m, S, v); - } - i.physicsList.push(a); - } - return i; - }), - (l.prototype.updateParam = function (t) { - for ( - var i = UtSystem.getUserTimeMSec() - this.startTimeMSec, e = 0; - e < this.physicsList.length; - e++ - ) - this.physicsList[e].update(t, i); - }), - ($.load = function (t) { - for ( - var i = new $(), - e = c.getPlatformManager(), - r = e.jsonParseFromBytes(t), - o = r.parts_visible, - n = o.length, - s = 0; - s < n; - s++ - ) { - for ( - var _ = o[s], a = _.group, h = a.length, l = new Array(), p = 0; - p < h; - p++ - ) { - var f = a[p], - d = new u(f.id); - if (((l[p] = d), null != f.link)) { - var g = f.link, - y = g.length; - d.link = new Array(); - for (var m = 0; m < y; m++) { - var T = new u(g[m]); - d.link.push(T); - } - } - } - i.partsGroups.push(l); - } - return i; - }), - ($.prototype.updateParam = function (t) { - if (null != t) { - t != this.lastModel && this.initParam(t), (this.lastModel = t); - var i = UtSystem.getUserTimeMSec(), - e = 0 == this.lastTime ? 0 : (i - this.lastTime) / 1e3; - (this.lastTime = i), e < 0 && (e = 0); - for (var r = 0; r < this.partsGroups.length; r++) - this.normalizePartsOpacityGroup(t, this.partsGroups[r], e), - this.copyOpacityOtherParts(t, this.partsGroups[r]); - } - }), - ($.prototype.initParam = function (t) { - if (null != t) - for (var i = 0; i < this.partsGroups.length; i++) - for (var e = this.partsGroups[i], r = 0; r < e.length; r++) { - e[r].initIndex(t); - var o = e[r].partsIndex, - n = e[r].paramIndex; - if (!(o < 0)) { - var s = 0 != t.getParamFloat(n); - if ( - (t.setPartsOpacity(o, s ? 1 : 0), - t.setParamFloat(n, s ? 1 : 0), - null != e[r].link) - ) - for (var _ = 0; _ < e[r].link.length; _++) - e[r].link[_].initIndex(t); - } - } - }), - ($.prototype.normalizePartsOpacityGroup = function (t, i, e) { - for (var r = -1, o = 1, n = 0; n < i.length; n++) { - var s = i[n].partsIndex, - _ = i[n].paramIndex; - if (!(s < 0) && 0 != t.getParamFloat(_)) { - if (r >= 0) break; - (r = n), - (o = t.getPartsOpacity(s)), - (o += e / 0.5), - o > 1 && (o = 1); - } - } - r < 0 && ((r = 0), (o = 1)); - for (var n = 0; n < i.length; n++) { - var s = i[n].partsIndex; - if (!(s < 0)) - if (r == n) t.setPartsOpacity(s, o); - else { - var a, - h = t.getPartsOpacity(s); - a = o < 0.5 ? (-0.5 * o) / 0.5 + 1 : (0.5 * (1 - o)) / 0.5; - var l = (1 - a) * (1 - o); - l > 0.15 && (a = 1 - 0.15 / (1 - o)), - h > a && (h = a), - t.setPartsOpacity(s, h); - } - } - }), - ($.prototype.copyOpacityOtherParts = function (t, i) { - for (var e = 0; e < i.length; e++) { - var r = i[e]; - if (null != r.link && !(r.partsIndex < 0)) - for ( - var o = t.getPartsOpacity(r.partsIndex), n = 0; - n < r.link.length; - n++ - ) { - var s = r.link[n]; - s.partsIndex < 0 || t.setPartsOpacity(s.partsIndex, o); - } - } - }), - (u.prototype.initIndex = function (t) { - (this.paramIndex = t.getParamIndex("VISIBLE:" + this.id)), - (this.partsIndex = t.getPartsDataIndex(PartsDataID.getID(this.id))), - t.setParamFloat(this.paramIndex, 1); - }), - (p.FRAME_RATE = 30), - (p.prototype.setPoint = function (t, i) { - (this.faceTargetX = t), (this.faceTargetY = i); - }), - (p.prototype.getX = function () { - return this.faceX; - }), - (p.prototype.getY = function () { - return this.faceY; - }), - (p.prototype.update = function () { - var t = 40 / 7.5 / p.FRAME_RATE; - if (0 == this.lastTimeSec) - return void (this.lastTimeSec = UtSystem.getUserTimeMSec()); - var i = UtSystem.getUserTimeMSec(), - e = ((i - this.lastTimeSec) * p.FRAME_RATE) / 1e3; - this.lastTimeSec = i; - var r = 0.15 * p.FRAME_RATE, - o = (e * t) / r, - n = this.faceTargetX - this.faceX, - s = this.faceTargetY - this.faceY; - if (!(Math.abs(n) <= this.EPSILON && Math.abs(s) <= this.EPSILON)) { - var _ = Math.sqrt(n * n + s * s), - a = (t * n) / _, - h = (t * s) / _, - l = a - this.faceVX, - $ = h - this.faceVY, - u = Math.sqrt(l * l + $ * $); - (u < -o || u > o) && ((l *= o / u), ($ *= o / u), (u = o)), - (this.faceVX += l), - (this.faceVY += $); - var f = 0.5 * (Math.sqrt(o * o + 16 * o * _ - 8 * o * _) - o), - c = Math.sqrt( - this.faceVX * this.faceVX + this.faceVY * this.faceVY - ); - c > f && ((this.faceVX *= f / c), (this.faceVY *= f / c)), - (this.faceX += this.faceVX), - (this.faceY += this.faceVY); - } - }), - (f.prototype = new _()), - (f.prototype.getMaxScale = function () { - return this.max; - }), - (f.prototype.getMinScale = function () { - return this.min; - }), - (f.prototype.setMaxScale = function (t) { - this.max = t; - }), - (f.prototype.setMinScale = function (t) { - this.min = t; - }), - (f.prototype.isMaxScale = function () { - return this.getScaleX() == this.max; - }), - (f.prototype.isMinScale = function () { - return this.getScaleX() == this.min; - }), - (f.prototype.adjustTranslate = function (t, i) { - this.tr[0] * this.maxLeft + (this.tr[12] + t) > this.screenLeft && - (t = this.screenLeft - this.tr[0] * this.maxLeft - this.tr[12]), - this.tr[0] * this.maxRight + (this.tr[12] + t) < this.screenRight && - (t = this.screenRight - this.tr[0] * this.maxRight - this.tr[12]), - this.tr[5] * this.maxTop + (this.tr[13] + i) < this.screenTop && - (i = this.screenTop - this.tr[5] * this.maxTop - this.tr[13]), - this.tr[5] * this.maxBottom + (this.tr[13] + i) > this.screenBottom && - (i = this.screenBottom - this.tr[5] * this.maxBottom - this.tr[13]); - var e = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1]; - _.mul(e, this.tr, this.tr); - }), - (f.prototype.adjustScale = function (t, i, e) { - var r = e * this.tr[0]; - r < this.min - ? this.tr[0] > 0 && (e = this.min / this.tr[0]) - : r > this.max && this.tr[0] > 0 && (e = this.max / this.tr[0]); - var o = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, i, 0, 1], - n = [e, 0, 0, 0, 0, e, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], - s = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -t, -i, 0, 1]; - _.mul(s, this.tr, this.tr), - _.mul(n, this.tr, this.tr), - _.mul(o, this.tr, this.tr); - }), - (f.prototype.setScreenRect = function (t, i, e, r) { - (this.screenLeft = t), - (this.screenRight = i), - (this.screenTop = r), - (this.screenBottom = e); - }), - (f.prototype.setMaxScreenRect = function (t, i, e, r) { - (this.maxLeft = t), - (this.maxRight = i), - (this.maxTop = r), - (this.maxBottom = e); - }), - (f.prototype.getScreenLeft = function () { - return this.screenLeft; - }), - (f.prototype.getScreenRight = function () { - return this.screenRight; - }), - (f.prototype.getScreenBottom = function () { - return this.screenBottom; - }), - (f.prototype.getScreenTop = function () { - return this.screenTop; - }), - (f.prototype.getMaxLeft = function () { - return this.maxLeft; - }), - (f.prototype.getMaxRight = function () { - return this.maxRight; - }), - (f.prototype.getMaxBottom = function () { - return this.maxBottom; - }), - (f.prototype.getMaxTop = function () { - return this.maxTop; - }), - (c.platformManager = null), - (c.getPlatformManager = function () { - return c.platformManager; - }), - (c.setPlatformManager = function (t) { - c.platformManager = t; - }), - (t.exports = { - L2DTargetPoint: p, - Live2DFramework: c, - L2DViewMatrix: f, - L2DPose: $, - L2DPartsParam: u, - L2DPhysics: l, - L2DMotionManager: h, - L2DModelMatrix: a, - L2DMatrix44: _, - EYE_STATE: g, - L2DEyeBlink: s, - L2DExpressionParam: n, - L2DExpressionMotion: o, - L2DBaseModel: r, - }); - }, - function (t, i, e) { - "use strict"; - var r = { - DEBUG_LOG: !1, - DEBUG_MOUSE_LOG: !1, - DEBUG_DRAW_HIT_AREA: !1, - DEBUG_DRAW_ALPHA_MODEL: !1, - VIEW_MAX_SCALE: 2, - VIEW_MIN_SCALE: 0.8, - VIEW_LOGICAL_LEFT: -1, - VIEW_LOGICAL_RIGHT: 1, - VIEW_LOGICAL_MAX_LEFT: -2, - VIEW_LOGICAL_MAX_RIGHT: 2, - VIEW_LOGICAL_MAX_BOTTOM: -2, - VIEW_LOGICAL_MAX_TOP: 2, - PRIORITY_NONE: 0, - PRIORITY_IDLE: 1, - PRIORITY_SLEEPY: 2, - PRIORITY_NORMAL: 3, - PRIORITY_FORCE: 4, - MOTION_GROUP_IDLE: "idle", - MOTION_GROUP_SLEEPY: "sleepy", - MOTION_GROUP_TAP_BODY: "tap_body", - MOTION_GROUP_FLICK_HEAD: "flick_head", - MOTION_GROUP_PINCH_IN: "pinch_in", - MOTION_GROUP_PINCH_OUT: "pinch_out", - MOTION_GROUP_SHAKE: "shake", - HIT_AREA_HEAD: "head", - HIT_AREA_BODY: "body", - }; - t.exports = r; - }, - function (t, i, e) { - "use strict"; - function r(t) { - n = t; - } - function o() { - return n; - } - Object.defineProperty(i, "__esModule", { value: !0 }), - (i.setContext = r), - (i.getContext = o); - var n = void 0; - }, - function (t, i, e) { - "use strict"; - function r() {} - (r.matrixStack = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), - (r.depth = 0), - (r.currentMatrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), - (r.tmp = new Array(16)), - (r.reset = function () { - this.depth = 0; - }), - (r.loadIdentity = function () { - for (var t = 0; t < 16; t++) this.currentMatrix[t] = t % 5 == 0 ? 1 : 0; - }), - (r.push = function () { - var t = (this.depth, 16 * (this.depth + 1)); - this.matrixStack.length < t + 16 && (this.matrixStack.length = t + 16); - for (var i = 0; i < 16; i++) - this.matrixStack[t + i] = this.currentMatrix[i]; - this.depth++; - }), - (r.pop = function () { - --this.depth < 0 && - (myError("Invalid matrix stack."), (this.depth = 0)); - for (var t = 16 * this.depth, i = 0; i < 16; i++) - this.currentMatrix[i] = this.matrixStack[t + i]; - }), - (r.getMatrix = function () { - return this.currentMatrix; - }), - (r.multMatrix = function (t) { - var i, e, r; - for (i = 0; i < 16; i++) this.tmp[i] = 0; - for (i = 0; i < 4; i++) - for (e = 0; e < 4; e++) - for (r = 0; r < 4; r++) - this.tmp[i + 4 * e] += - this.currentMatrix[i + 4 * r] * t[r + 4 * e]; - for (i = 0; i < 16; i++) this.currentMatrix[i] = this.tmp[i]; - }), - (t.exports = r); - }, - function (t, i, e) { - t.exports = e(5); - }, - function (t, i, e) { - "use strict"; - function r(t) { - return t && t.__esModule ? t : { default: t }; - } - function o(t) { - (C = t), - C.addEventListener && - (window.addEventListener("click", g), - window.addEventListener("mousedown", g), - window.addEventListener("mousemove", g), - window.addEventListener("mouseup", g), - document.addEventListener("mouseout", g), - window.addEventListener("touchstart", y), - window.addEventListener("touchend", y), - window.addEventListener("touchmove", y)); - } - function n(t) { - var i = C.width, - e = C.height; - N = new M.L2DTargetPoint(); - var r = e / i, - o = w.default.VIEW_LOGICAL_LEFT, - n = w.default.VIEW_LOGICAL_RIGHT, - _ = -r, - h = r; - if ( - ((window.Live2D.captureFrame = !1), - (B = new M.L2DViewMatrix()), - B.setScreenRect(o, n, _, h), - B.setMaxScreenRect( - w.default.VIEW_LOGICAL_MAX_LEFT, - w.default.VIEW_LOGICAL_MAX_RIGHT, - w.default.VIEW_LOGICAL_MAX_BOTTOM, - w.default.VIEW_LOGICAL_MAX_TOP - ), - B.setMaxScale(w.default.VIEW_MAX_SCALE), - B.setMinScale(w.default.VIEW_MIN_SCALE), - (U = new M.L2DMatrix44()), - U.multScale(1, i / e), - (G = new M.L2DMatrix44()), - G.multTranslate(-i / 2, -e / 2), - G.multScale(2 / i, -2 / i), - (F = v()), - (0, D.setContext)(F), - !F) - ) - return ( - console.error("Failed to create WebGL context."), - void ( - window.WebGLRenderingContext && - console.error( - "Your browser don't support WebGL, check https://get.webgl.org/ for futher information." - ) - ) - ); - window.Live2D.setGL(F), F.clearColor(0, 0, 0, 0), a(t), s(); - } - function s() { - b || - ((b = !0), - (function t() { - _(); - var i = - window.requestAnimationFrame || - window.mozRequestAnimationFrame || - window.webkitRequestAnimationFrame || - window.msRequestAnimationFrame; - if (window.Live2D.captureFrame) { - window.Live2D.captureFrame = !1; - var e = document.createElement("a"); - document.body.appendChild(e), - e.setAttribute("type", "hidden"), - (e.href = C.toDataURL()), - (e.download = window.Live2D.captureName || "live2d.png"), - e.click(); - } - i(t, C); - })()); - } - function _() { - O.default.reset(), - O.default.loadIdentity(), - N.update(), - R.setDrag(N.getX(), N.getY()), - F.clear(F.COLOR_BUFFER_BIT), - O.default.multMatrix(U.getArray()), - O.default.multMatrix(B.getArray()), - O.default.push(); - for (var t = 0; t < R.numModels(); t++) { - var i = R.getModel(t); - if (null == i) return; - i.initialized && !i.updating && (i.update(), i.draw(F)); - } - O.default.pop(); - } - function a(t) { - (R.reloadFlg = !0), R.count++, R.changeModel(F, t); - } - function h(t, i) { - return t.x * i.x + t.y * i.y; - } - function l(t, i) { - var e = Math.sqrt(t * t + i * i); - return { x: t / e, y: i / e }; - } - function $(t, i, e) { - function r(t, i) { - return (180 * Math.acos(h({ x: 0, y: 1 }, l(t, i)))) / Math.PI; - } - if ( - i.x < e.left + e.width && - i.y < e.top + e.height && - i.x > e.left && - i.y > e.top - ) - return i; - var o = t.x - i.x, - n = t.y - i.y, - s = r(o, n); - i.x < t.x && (s = 360 - s); - var _ = 360 - r(e.left - t.x, -1 * (e.top - t.y)), - a = 360 - r(e.left - t.x, -1 * (e.top + e.height - t.y)), - $ = r(e.left + e.width - t.x, -1 * (e.top - t.y)), - u = r(e.left + e.width - t.x, -1 * (e.top + e.height - t.y)), - p = n / o, - f = {}; - if (s < $) { - var c = e.top - t.y, - d = c / p; - f = { y: t.y + c, x: t.x + d }; - } else if (s < u) { - var g = e.left + e.width - t.x, - y = g * p; - f = { y: t.y + y, x: t.x + g }; - } else if (s < a) { - var m = e.top + e.height - t.y, - T = m / p; - f = { y: t.y + m, x: t.x + T }; - } else if (s < _) { - var P = t.x - e.left, - S = P * p; - f = { y: t.y - S, x: t.x - P }; - } else { - var v = e.top - t.y, - L = v / p; - f = { y: t.y + v, x: t.x + L }; - } - return f; - } - function u(t) { - Y = !0; - var i = C.getBoundingClientRect(), - e = P(t.clientX - i.left), - r = S(t.clientY - i.top), - o = $( - { x: i.left + i.width / 2, y: i.top + i.height * X }, - { x: t.clientX, y: t.clientY }, - i - ), - n = m(o.x - i.left), - s = T(o.y - i.top); - w.default.DEBUG_MOUSE_LOG && - console.log( - "onMouseMove device( x:" + - t.clientX + - " y:" + - t.clientY + - " ) view( x:" + - n + - " y:" + - s + - ")" - ), - (k = e), - (V = r), - N.setPoint(n, s); - } - function p(t) { - Y = !0; - var i = C.getBoundingClientRect(), - e = P(t.clientX - i.left), - r = S(t.clientY - i.top), - o = $( - { x: i.left + i.width / 2, y: i.top + i.height * X }, - { x: t.clientX, y: t.clientY }, - i - ), - n = m(o.x - i.left), - s = T(o.y - i.top); - w.default.DEBUG_MOUSE_LOG && - console.log( - "onMouseDown device( x:" + - t.clientX + - " y:" + - t.clientY + - " ) view( x:" + - n + - " y:" + - s + - ")" - ), - (k = e), - (V = r), - R.tapEvent(n, s); - } - function f(t) { - var i = C.getBoundingClientRect(), - e = P(t.clientX - i.left), - r = S(t.clientY - i.top), - o = $( - { x: i.left + i.width / 2, y: i.top + i.height * X }, - { x: t.clientX, y: t.clientY }, - i - ), - n = m(o.x - i.left), - s = T(o.y - i.top); - w.default.DEBUG_MOUSE_LOG && - console.log( - "onMouseMove device( x:" + - t.clientX + - " y:" + - t.clientY + - " ) view( x:" + - n + - " y:" + - s + - ")" - ), - Y && ((k = e), (V = r), N.setPoint(n, s)); - } - function c() { - Y && (Y = !1), N.setPoint(0, 0); - } - function d() { - w.default.DEBUG_LOG && console.log("Set Session Storage."), - sessionStorage.setItem("Sleepy", "1"); - } - function g(t) { - if ("mousewheel" == t.type); - else if ("mousedown" == t.type) p(t); - else if ("mousemove" == t.type) { - var i = sessionStorage.getItem("Sleepy"); - "1" === i && sessionStorage.setItem("Sleepy", "0"), u(t); - } else if ("mouseup" == t.type) { - if ("button" in t && 0 != t.button) return; - } else if ("mouseout" == t.type) { - w.default.DEBUG_LOG && console.log("Mouse out Window."), c(); - var e = sessionStorage.getItem("SleepyTimer"); - window.clearTimeout(e), - (e = window.setTimeout(d, 5e4)), - sessionStorage.setItem("SleepyTimer", e); - } - } - function y(t) { - var i = t.touches[0]; - "touchstart" == t.type - ? 1 == t.touches.length && u(i) - : "touchmove" == t.type - ? f(i) - : "touchend" == t.type && c(); - } - function m(t) { - var i = G.transformX(t); - return B.invertTransformX(i); - } - function T(t) { - var i = G.transformY(t); - return B.invertTransformY(i); - } - function P(t) { - return G.transformX(t); - } - function S(t) { - return G.transformY(t); - } - function v() { - for ( - var t = ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"], - i = 0; - i < t.length; - i++ - ) - try { - var e = C.getContext(t[i], { premultipliedAlpha: !0 }); - if (e) return e; - } catch (t) {} - return null; - } - function L(t, i, e) { - (X = void 0 === e ? 0.5 : e), o(t), n(i); - } - e(6); - var M = e(0), - E = e(8), - A = r(E), - I = e(1), - w = r(I), - x = e(3), - O = r(x), - D = e(2), - R = (window.navigator.platform.toLowerCase(), new A.default()), - b = !1, - F = null, - C = null, - N = null, - B = null, - U = null, - G = null, - Y = !1, - k = 0, - V = 0, - X = 0.5; - window.loadlive2d = L; - }, - function (t, i, e) { - "use strict"; - (function (t) { - !(function () { - function i() { - At || - ((this._$MT = null), - (this._$5S = null), - (this._$NP = 0), - i._$42++, - (this._$5S = new Y(this))); - } - function e(t) { - if (!At) { - (this.clipContextList = new Array()), - (this.glcontext = t.gl), - (this.dp_webgl = t), - (this.curFrameNo = 0), - (this.firstError_clipInNotUpdate = !0), - (this.colorBuffer = 0), - (this.isInitGLFBFunc = !1), - (this.tmpBoundsOnModel = new S()), - at.glContext.length > at.frameBuffers.length && - (this.curFrameNo = this.getMaskRenderTexture()), - (this.tmpModelToViewMatrix = new R()), - (this.tmpMatrix2 = new R()), - (this.tmpMatrixForMask = new R()), - (this.tmpMatrixForDraw = new R()), - (this.CHANNEL_COLORS = new Array()); - var i = new A(); - (i = new A()), - (i.r = 0), - (i.g = 0), - (i.b = 0), - (i.a = 1), - this.CHANNEL_COLORS.push(i), - (i = new A()), - (i.r = 1), - (i.g = 0), - (i.b = 0), - (i.a = 0), - this.CHANNEL_COLORS.push(i), - (i = new A()), - (i.r = 0), - (i.g = 1), - (i.b = 0), - (i.a = 0), - this.CHANNEL_COLORS.push(i), - (i = new A()), - (i.r = 0), - (i.g = 0), - (i.b = 1), - (i.a = 0), - this.CHANNEL_COLORS.push(i); - for (var e = 0; e < this.CHANNEL_COLORS.length; e++) - this.dp_webgl.setChannelFlagAsColor(e, this.CHANNEL_COLORS[e]); - } - } - function r(t, i, e) { - (this.clipIDList = new Array()), - (this.clipIDList = e), - (this.clippingMaskDrawIndexList = new Array()); - for (var r = 0; r < e.length; r++) - this.clippingMaskDrawIndexList.push(i.getDrawDataIndex(e[r])); - (this.clippedDrawContextList = new Array()), - (this.isUsing = !0), - (this.layoutChannelNo = 0), - (this.layoutBounds = new S()), - (this.allClippedDrawRect = new S()), - (this.matrixForMask = new Float32Array(16)), - (this.matrixForDraw = new Float32Array(16)), - (this.owner = t); - } - function o(t, i) { - (this._$gP = t), (this.drawDataIndex = i); - } - function n() { - At || (this.color = null); - } - function s() { - At || - ((this._$dP = null), - (this._$eo = null), - (this._$V0 = null), - (this._$dP = 1e3), - (this._$eo = 1e3), - (this._$V0 = 1), - this._$a0()); - } - function _() {} - function a() { - (this._$r = null), (this._$0S = null); - } - function h() { - At || - ((this.x = null), - (this.y = null), - (this.width = null), - (this.height = null)); - } - function l(t) { - At || et.prototype.constructor.call(this, t); - } - function $() {} - function u(t) { - At || et.prototype.constructor.call(this, t); - } - function p() { - At || - ((this._$vo = null), - (this._$F2 = null), - (this._$ao = 400), - (this._$1S = 400), - p._$42++); - } - function f() { - At || - ((this.p1 = new c()), - (this.p2 = new c()), - (this._$Fo = 0), - (this._$Db = 0), - (this._$L2 = 0), - (this._$M2 = 0), - (this._$ks = 0), - (this._$9b = 0), - (this._$iP = 0), - (this._$iT = 0), - (this._$lL = new Array()), - (this._$qP = new Array()), - this.setup(0.3, 0.5, 0.1)); - } - function c() { - (this._$p = 1), - (this.x = 0), - (this.y = 0), - (this.vx = 0), - (this.vy = 0), - (this.ax = 0), - (this.ay = 0), - (this.fx = 0), - (this.fy = 0), - (this._$s0 = 0), - (this._$70 = 0), - (this._$7L = 0), - (this._$HL = 0); - } - function d(t, i, e) { - (this._$wL = null), - (this.scale = null), - (this._$V0 = null), - (this._$wL = t), - (this.scale = i), - (this._$V0 = e); - } - function g(t, i, e, r) { - d.prototype.constructor.call(this, i, e, r), - (this._$tL = null), - (this._$tL = t); - } - function y(t, i, e) { - (this._$wL = null), - (this.scale = null), - (this._$V0 = null), - (this._$wL = t), - (this.scale = i), - (this._$V0 = e); - } - function T(t, i, e, r) { - y.prototype.constructor.call(this, i, e, r), - (this._$YP = null), - (this._$YP = t); - } - function P() { - At || - ((this._$fL = 0), - (this._$gL = 0), - (this._$B0 = 1), - (this._$z0 = 1), - (this._$qT = 0), - (this.reflectX = !1), - (this.reflectY = !1)); - } - function S() { - At || - ((this.x = null), - (this.y = null), - (this.width = null), - (this.height = null)); - } - function v() {} - function L() { - At || ((this.x = null), (this.y = null)); - } - function M() { - At || - ((this._$gP = null), - (this._$dr = null), - (this._$GS = null), - (this._$qb = null), - (this._$Lb = null), - (this._$mS = null), - (this.clipID = null), - (this.clipIDList = new Array())); - } - function E() { - At || - ((this._$Eb = E._$ps), - (this._$lT = 1), - (this._$C0 = 1), - (this._$tT = 1), - (this._$WL = 1), - (this.culling = !1), - (this.matrix4x4 = new Float32Array(16)), - (this.premultipliedAlpha = !1), - (this.anisotropy = 0), - (this.clippingProcess = E.CLIPPING_PROCESS_NONE), - (this.clipBufPre_clipContextMask = null), - (this.clipBufPre_clipContextDraw = null), - (this.CHANNEL_COLORS = new Array())); - } - function A() { - At || - ((this.a = 1), - (this.r = 1), - (this.g = 1), - (this.b = 1), - (this.scale = 1), - (this._$ho = 1), - (this.blendMode = at.L2D_COLOR_BLEND_MODE_MULT)); - } - function I() { - At || - ((this._$kP = null), - (this._$dr = null), - (this._$Ai = !0), - (this._$mS = null)); - } - function w() {} - function x() { - At || - ((this._$VP = 0), - (this._$wL = null), - (this._$GP = null), - (this._$8o = x._$ds), - (this._$2r = -1), - (this._$O2 = 0), - (this._$ri = 0)); - } - function O() {} - function D() { - At || (this._$Ob = null); - } - function R() { - (this.m = new Float32Array(16)), this.identity(); - } - function b(t) { - At || et.prototype.constructor.call(this, t); - } - function F() { - At || - ((this._$7 = 1), - (this._$f = 0), - (this._$H = 0), - (this._$g = 1), - (this._$k = 0), - (this._$w = 0), - (this._$hi = STATE_IDENTITY), - (this._$Z = _$pS)); - } - function C() { - At || - (s.prototype.constructor.call(this), - (this.motions = new Array()), - (this._$7r = null), - (this._$7r = C._$Co++), - (this._$D0 = 30), - (this._$yT = 0), - (this._$E = !0), - (this.loopFadeIn = !0), - (this._$AS = -1), - _$a0()); - } - function N() { - (this._$P = new Float32Array(100)), (this.size = 0); - } - function B() { - (this._$4P = null), (this._$I0 = null), (this._$RP = null); - } - function U() {} - function G() {} - function Y(t) { - At || - ((this._$QT = !0), - (this._$co = -1), - (this._$qo = 0), - (this._$pb = new Array(Y._$is)), - (this._$_2 = new Float32Array(Y._$is)), - (this._$vr = new Float32Array(Y._$is)), - (this._$Rr = new Float32Array(Y._$is)), - (this._$Or = new Float32Array(Y._$is)), - (this._$fs = new Float32Array(Y._$is)), - (this._$Js = new Array(Y._$is)), - (this._$3S = new Array()), - (this._$aS = new Array()), - (this._$Bo = null), - (this._$F2 = new Array()), - (this._$db = new Array()), - (this._$8b = new Array()), - (this._$Hr = new Array()), - (this._$Ws = null), - (this._$Vs = null), - (this._$Er = null), - (this._$Es = new Int16Array(U._$Qb)), - (this._$ZP = new Float32Array(2 * U._$1r)), - (this._$Ri = t), - (this._$b0 = Y._$HP++), - (this.clipManager = null), - (this.dp_webgl = null)); - } - function k() {} - function V() { - At || - ((this._$12 = null), - (this._$bb = null), - (this._$_L = null), - (this._$jo = null), - (this._$iL = null), - (this._$0L = null), - (this._$Br = null), - (this._$Dr = null), - (this._$Cb = null), - (this._$mr = null), - (this._$_L = wt.STATE_FIRST), - (this._$Br = 4e3), - (this._$Dr = 100), - (this._$Cb = 50), - (this._$mr = 150), - (this._$jo = !0), - (this._$iL = "PARAM_EYE_L_OPEN"), - (this._$0L = "PARAM_EYE_R_OPEN")); - } - function X() { - At || - (E.prototype.constructor.call(this), - (this._$sb = new Int32Array(X._$As)), - (this._$U2 = new Array()), - (this.transform = null), - (this.gl = null), - null == X._$NT && - ((X._$NT = X._$9r(256)), - (X._$vS = X._$9r(256)), - (X._$no = X._$vb(256)))); - } - function z() { - At || - (I.prototype.constructor.call(this), - (this._$GS = null), - (this._$Y0 = null)); - } - function H(t) { - _t.prototype.constructor.call(this, t), - (this._$8r = I._$ur), - (this._$Yr = null), - (this._$Wr = null); - } - function W() { - At || - (M.prototype.constructor.call(this), - (this._$gP = null), - (this._$dr = null), - (this._$GS = null), - (this._$qb = null), - (this._$Lb = null), - (this._$mS = null)); - } - function j() { - At || - ((this._$NL = null), - (this._$3S = null), - (this._$aS = null), - j._$42++); - } - function q() { - At || (i.prototype.constructor.call(this), (this._$zo = new X())); - } - function J() { - At || - (s.prototype.constructor.call(this), - (this.motions = new Array()), - (this._$o2 = null), - (this._$7r = J._$Co++), - (this._$D0 = 30), - (this._$yT = 0), - (this._$E = !1), - (this.loopFadeIn = !0), - (this._$rr = -1), - (this._$eP = 0)); - } - function Q(t, i) { - return String.fromCharCode(t.getUint8(i)); - } - function N() { - (this._$P = new Float32Array(100)), (this.size = 0); - } - function B() { - (this._$4P = null), (this._$I0 = null), (this._$RP = null); - } - function Z() { - At || - (I.prototype.constructor.call(this), - (this._$o = 0), - (this._$A = 0), - (this._$GS = null), - (this._$Eo = null)); - } - function K(t) { - _t.prototype.constructor.call(this, t), - (this._$8r = I._$ur), - (this._$Cr = null), - (this._$hr = null); - } - function tt() { - At || - ((this.visible = !0), - (this._$g0 = !1), - (this._$NL = null), - (this._$3S = null), - (this._$aS = null), - tt._$42++); - } - function it(t) { - (this._$VS = null), (this._$e0 = null), (this._$e0 = t); - } - function et(t) { - At || (this.id = t); - } - function rt() {} - function ot() { - At || (this._$4S = null); - } - function nt(t, i) { - (this.canvas = t), - (this.context = i), - (this.viewport = new Array(0, 0, t.width, t.height)), - (this._$6r = 1), - (this._$xP = 0), - (this._$3r = 1), - (this._$uP = 0), - (this._$Qo = -1), - (this.cacheImages = {}); - } - function st() { - At || - ((this._$TT = null), - (this._$LT = null), - (this._$FS = null), - (this._$wL = null)); - } - function _t(t) { - At || - ((this._$e0 = null), - (this._$IP = null), - (this._$JS = !1), - (this._$AT = !0), - (this._$e0 = t), - (this.totalScale = 1), - (this._$7s = 1), - (this.totalOpacity = 1)); - } - function at() {} - function ht() {} - function lt(t) { - At || (this._$ib = t); - } - function $t() { - At || - (W.prototype.constructor.call(this), - (this._$LP = -1), - (this._$d0 = 0), - (this._$Yo = 0), - (this._$JP = null), - (this._$5P = null), - (this._$BP = null), - (this._$Eo = null), - (this._$Qi = null), - (this._$6s = $t._$ms), - (this.culling = !0), - (this.gl_cacheImage = null), - (this.instanceNo = $t._$42++)); - } - function ut(t) { - Mt.prototype.constructor.call(this, t), - (this._$8r = W._$ur), - (this._$Cr = null), - (this._$hr = null); - } - function pt() { - At || ((this.x = null), (this.y = null)); - } - function ft(t) { - At || - (i.prototype.constructor.call(this), - (this.drawParamWebGL = new mt(t)), - this.drawParamWebGL.setGL(at.getGL(t))); - } - function ct() { - At || - ((this.motions = null), - (this._$eb = !1), - (this.motions = new Array())); - } - function dt() { - (this._$w0 = null), - (this._$AT = !0), - (this._$9L = !1), - (this._$z2 = -1), - (this._$bs = -1), - (this._$Do = -1), - (this._$sr = null), - (this._$sr = dt._$Gs++); - } - function gt() { - this.m = new Array(1, 0, 0, 0, 1, 0, 0, 0, 1); - } - function yt(t) { - At || et.prototype.constructor.call(this, t); - } - function mt(t) { - At || - (E.prototype.constructor.call(this), - (this.textures = new Array()), - (this.transform = null), - (this.gl = null), - (this.glno = t), - (this.firstDraw = !0), - (this.anisotropyExt = null), - (this.maxAnisotropy = 0), - (this._$As = 32), - (this._$Gr = !1), - (this._$NT = null), - (this._$vS = null), - (this._$no = null), - (this.vertShader = null), - (this.fragShader = null), - (this.vertShaderOff = null), - (this.fragShaderOff = null)); - } - function Tt(t, i, e) { - return ( - null == i && (i = t.createBuffer()), - t.bindBuffer(t.ARRAY_BUFFER, i), - t.bufferData(t.ARRAY_BUFFER, e, t.DYNAMIC_DRAW), - i - ); - } - function Pt(t, i, e) { - return ( - null == i && (i = t.createBuffer()), - t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, i), - t.bufferData(t.ELEMENT_ARRAY_BUFFER, e, t.DYNAMIC_DRAW), - i - ); - } - function St(t) { - At || - ((this._$P = new Int8Array(8)), - (this._$R0 = new DataView(this._$P.buffer)), - (this._$3i = new Int8Array(1e3)), - (this._$hL = 0), - (this._$v0 = 0), - (this._$S2 = 0), - (this._$Ko = new Array()), - (this._$T = t), - (this._$F = 0)); - } - function vt() {} - function Lt() {} - function Mt(t) { - At || - ((this._$e0 = null), - (this._$IP = null), - (this._$Us = null), - (this._$7s = null), - (this._$IS = [!1]), - (this._$VS = null), - (this._$AT = !0), - (this.baseOpacity = 1), - (this.clipBufPre_clipContext = null), - (this._$e0 = t)); - } - function Et() {} - var At = !0; - (i._$0s = 1), - (i._$4s = 2), - (i._$42 = 0), - (i._$62 = function (t, e) { - try { - if ( - (e instanceof ArrayBuffer && (e = new DataView(e)), - !(e instanceof DataView)) - ) - throw new lt( - "_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer" - ); - var r, - o = new St(e), - n = o._$ST(), - s = o._$ST(), - a = o._$ST(); - if (109 != n || 111 != s || 99 != a) - throw new lt("_$gi _$C _$li , _$Q0 _$P0."); - if (((r = o._$ST()), o._$gr(r), r > G._$T7)) { - t._$NP |= i._$4s; - throw new lt( - "_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : " + - G._$T7 + - " < _$f0 : " + - r + - " )@_$SS#loadModel()\n" - ); - } - var h = o._$nP(); - if (r >= G._$s7) { - var l = o._$9T(), - $ = o._$9T(); - if (-30584 != l || -30584 != $) - throw ( - ((t._$NP |= i._$0s), - new lt("_$gi _$C _$li , _$0 _$6 _$Ui.")) - ); - } - t._$KS(h); - var u = t.getModelContext(); - u.setDrawParam(t.getDrawParam()), u.init(); - } catch (t) { - _._$Rb(t); - } - }), - (i.prototype._$KS = function (t) { - this._$MT = t; - }), - (i.prototype.getModelImpl = function () { - return ( - null == this._$MT && ((this._$MT = new p()), this._$MT._$zP()), - this._$MT - ); - }), - (i.prototype.getCanvasWidth = function () { - return null == this._$MT ? 0 : this._$MT.getCanvasWidth(); - }), - (i.prototype.getCanvasHeight = function () { - return null == this._$MT ? 0 : this._$MT.getCanvasHeight(); - }), - (i.prototype.getParamFloat = function (t) { - return ( - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), - this._$5S.getParamFloat(t) - ); - }), - (i.prototype.setParamFloat = function (t, i, e) { - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), - arguments.length < 3 && (e = 1), - this._$5S.setParamFloat( - t, - this._$5S.getParamFloat(t) * (1 - e) + i * e - ); - }), - (i.prototype.addToParamFloat = function (t, i, e) { - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), - arguments.length < 3 && (e = 1), - this._$5S.setParamFloat(t, this._$5S.getParamFloat(t) + i * e); - }), - (i.prototype.multParamFloat = function (t, i, e) { - "number" != typeof t && (t = this._$5S.getParamIndex(u.getID(t))), - arguments.length < 3 && (e = 1), - this._$5S.setParamFloat( - t, - this._$5S.getParamFloat(t) * (1 + (i - 1) * e) - ); - }), - (i.prototype.getParamIndex = function (t) { - return this._$5S.getParamIndex(u.getID(t)); - }), - (i.prototype.loadParam = function () { - this._$5S.loadParam(); - }), - (i.prototype.saveParam = function () { - this._$5S.saveParam(); - }), - (i.prototype.init = function () { - this._$5S.init(); - }), - (i.prototype.update = function () { - this._$5S.update(); - }), - (i.prototype._$Rs = function () { - return _._$li("_$60 _$PT _$Rs()"), -1; - }), - (i.prototype._$Ds = function (t) { - _._$li("_$60 _$PT _$SS#_$Ds() \n"); - }), - (i.prototype._$K2 = function () {}), - (i.prototype.draw = function () {}), - (i.prototype.getModelContext = function () { - return this._$5S; - }), - (i.prototype._$s2 = function () { - return this._$NP; - }), - (i.prototype._$P7 = function (t, i, e, r) { - var o = -1, - n = 0, - s = this; - if (0 != e) - if (1 == t.length) { - var _ = t[0], - a = 0 != s.getParamFloat(_), - h = i[0], - l = s.getPartsOpacity(h), - $ = e / r; - a ? (l += $) > 1 && (l = 1) : (l -= $) < 0 && (l = 0), - s.setPartsOpacity(h, l); - } else { - for (var u = 0; u < t.length; u++) { - var _ = t[u], - p = 0 != s.getParamFloat(_); - if (p) { - if (o >= 0) break; - o = u; - var h = i[u]; - (n = s.getPartsOpacity(h)), (n += e / r), n > 1 && (n = 1); - } - } - o < 0 && - (console.log("No _$wi _$q0/ _$U default[%s]", t[0]), - (o = 0), - (n = 1), - s.loadParam(), - s.setParamFloat(t[o], n), - s.saveParam()); - for (var u = 0; u < t.length; u++) { - var h = i[u]; - if (o == u) s.setPartsOpacity(h, n); - else { - var f, - c = s.getPartsOpacity(h); - f = n < 0.5 ? (-0.5 * n) / 0.5 + 1 : (0.5 * (1 - n)) / 0.5; - var d = (1 - f) * (1 - n); - d > 0.15 && (f = 1 - 0.15 / (1 - n)), - c > f && (c = f), - s.setPartsOpacity(h, c); - } - } - } - else - for (var u = 0; u < t.length; u++) { - var _ = t[u], - h = i[u], - p = 0 != s.getParamFloat(_); - s.setPartsOpacity(h, p ? 1 : 0); - } - }), - (i.prototype.setPartsOpacity = function (t, i) { - "number" != typeof t && - (t = this._$5S.getPartsDataIndex(l.getID(t))), - this._$5S.setPartsOpacity(t, i); - }), - (i.prototype.getPartsDataIndex = function (t) { - return ( - t instanceof l || (t = l.getID(t)), this._$5S.getPartsDataIndex(t) - ); - }), - (i.prototype.getPartsOpacity = function (t) { - return ( - "number" != typeof t && - (t = this._$5S.getPartsDataIndex(l.getID(t))), - t < 0 ? 0 : this._$5S.getPartsOpacity(t) - ); - }), - (i.prototype.getDrawParam = function () {}), - (i.prototype.getDrawDataIndex = function (t) { - return this._$5S.getDrawDataIndex(b.getID(t)); - }), - (i.prototype.getDrawData = function (t) { - return this._$5S.getDrawData(t); - }), - (i.prototype.getTransformedPoints = function (t) { - var i = this._$5S._$C2(t); - return i instanceof ut ? i.getTransformedPoints() : null; - }), - (i.prototype.getIndexArray = function (t) { - if (t < 0 || t >= this._$5S._$aS.length) return null; - var i = this._$5S._$aS[t]; - return null != i && i.getType() == W._$wb && i instanceof $t - ? i.getIndexArray() - : null; - }), - (e.CHANNEL_COUNT = 4), - (e.RENDER_TEXTURE_USE_MIPMAP = !1), - (e.NOT_USED_FRAME = -100), - (e.prototype._$L7 = function () { - if ( - (this.tmpModelToViewMatrix && (this.tmpModelToViewMatrix = null), - this.tmpMatrix2 && (this.tmpMatrix2 = null), - this.tmpMatrixForMask && (this.tmpMatrixForMask = null), - this.tmpMatrixForDraw && (this.tmpMatrixForDraw = null), - this.tmpBoundsOnModel && (this.tmpBoundsOnModel = null), - this.CHANNEL_COLORS) - ) { - for (var t = this.CHANNEL_COLORS.length - 1; t >= 0; --t) - this.CHANNEL_COLORS.splice(t, 1); - this.CHANNEL_COLORS = []; - } - this.releaseShader(); - }), - (e.prototype.releaseShader = function () { - for (var t = at.frameBuffers.length, i = 0; i < t; i++) - this.gl.deleteFramebuffer(at.frameBuffers[i].framebuffer); - (at.frameBuffers = []), (at.glContext = []); - }), - (e.prototype.init = function (t, i, e) { - for (var o = 0; o < i.length; o++) { - var n = i[o].getClipIDList(); - if (null != n) { - var s = this.findSameClip(n); - null == s && - ((s = new r(this, t, n)), this.clipContextList.push(s)); - var _ = i[o].getDrawDataID(), - a = t.getDrawDataIndex(_); - s.addClippedDrawData(_, a); - e[o].clipBufPre_clipContext = s; - } - } - }), - (e.prototype.getMaskRenderTexture = function () { - var t = null; - return ( - (t = this.dp_webgl.createFramebuffer()), - (at.frameBuffers[this.dp_webgl.glno] = t), - this.dp_webgl.glno - ); - }), - (e.prototype.setupClip = function (t, i) { - for (var e = 0, r = 0; r < this.clipContextList.length; r++) { - var o = this.clipContextList[r]; - this.calcClippedDrawTotalBounds(t, o), o.isUsing && e++; - } - if (e > 0) { - var n = i.gl.getParameter(i.gl.FRAMEBUFFER_BINDING), - s = new Array(4); - (s[0] = 0), - (s[1] = 0), - (s[2] = i.gl.canvas.width), - (s[3] = i.gl.canvas.height), - i.gl.viewport( - 0, - 0, - at.clippingMaskBufferSize, - at.clippingMaskBufferSize - ), - this.setupLayoutBounds(e), - i.gl.bindFramebuffer( - i.gl.FRAMEBUFFER, - at.frameBuffers[this.curFrameNo].framebuffer - ), - i.gl.clearColor(0, 0, 0, 0), - i.gl.clear(i.gl.COLOR_BUFFER_BIT); - for (var r = 0; r < this.clipContextList.length; r++) { - var o = this.clipContextList[r], - _ = o.allClippedDrawRect, - a = (o.layoutChannelNo, o.layoutBounds); - this.tmpBoundsOnModel._$jL(_), - this.tmpBoundsOnModel.expand(0.05 * _.width, 0.05 * _.height); - var h = a.width / this.tmpBoundsOnModel.width, - l = a.height / this.tmpBoundsOnModel.height; - this.tmpMatrix2.identity(), - this.tmpMatrix2.translate(-1, -1, 0), - this.tmpMatrix2.scale(2, 2, 1), - this.tmpMatrix2.translate(a.x, a.y, 0), - this.tmpMatrix2.scale(h, l, 1), - this.tmpMatrix2.translate( - -this.tmpBoundsOnModel.x, - -this.tmpBoundsOnModel.y, - 0 - ), - this.tmpMatrixForMask.setMatrix(this.tmpMatrix2.m), - this.tmpMatrix2.identity(), - this.tmpMatrix2.translate(a.x, a.y, 0), - this.tmpMatrix2.scale(h, l, 1), - this.tmpMatrix2.translate( - -this.tmpBoundsOnModel.x, - -this.tmpBoundsOnModel.y, - 0 - ), - this.tmpMatrixForDraw.setMatrix(this.tmpMatrix2.m); - for ( - var $ = this.tmpMatrixForMask.getArray(), u = 0; - u < 16; - u++ - ) - o.matrixForMask[u] = $[u]; - for ( - var p = this.tmpMatrixForDraw.getArray(), u = 0; - u < 16; - u++ - ) - o.matrixForDraw[u] = p[u]; - for ( - var f = o.clippingMaskDrawIndexList.length, c = 0; - c < f; - c++ - ) { - var d = o.clippingMaskDrawIndexList[c], - g = t.getDrawData(d), - y = t._$C2(d); - i.setClipBufPre_clipContextForMask(o), g.draw(i, t, y); - } - } - i.gl.bindFramebuffer(i.gl.FRAMEBUFFER, n), - i.setClipBufPre_clipContextForMask(null), - i.gl.viewport(s[0], s[1], s[2], s[3]); - } - }), - (e.prototype.getColorBuffer = function () { - return this.colorBuffer; - }), - (e.prototype.findSameClip = function (t) { - for (var i = 0; i < this.clipContextList.length; i++) { - var e = this.clipContextList[i], - r = e.clipIDList.length; - if (r == t.length) { - for (var o = 0, n = 0; n < r; n++) - for (var s = e.clipIDList[n], _ = 0; _ < r; _++) - if (t[_] == s) { - o++; - break; - } - if (o == r) return e; - } - } - return null; - }), - (e.prototype.calcClippedDrawTotalBounds = function (t, i) { - for ( - var e = t._$Ri.getModelImpl().getCanvasWidth(), - r = t._$Ri.getModelImpl().getCanvasHeight(), - o = e > r ? e : r, - n = o, - s = o, - _ = 0, - a = 0, - h = i.clippedDrawContextList.length, - l = 0; - l < h; - l++ - ) { - var $ = i.clippedDrawContextList[l], - u = $.drawDataIndex, - p = t._$C2(u); - if (p._$yo()) { - for ( - var f = p.getTransformedPoints(), - c = f.length, - d = [], - g = [], - y = 0, - m = U._$i2; - m < c; - m += U._$No - ) - (d[y] = f[m]), (g[y] = f[m + 1]), y++; - var T = Math.min.apply(null, d), - P = Math.min.apply(null, g), - S = Math.max.apply(null, d), - v = Math.max.apply(null, g); - T < n && (n = T), - P < s && (s = P), - S > _ && (_ = S), - v > a && (a = v); - } - } - if (n == o) - (i.allClippedDrawRect.x = 0), - (i.allClippedDrawRect.y = 0), - (i.allClippedDrawRect.width = 0), - (i.allClippedDrawRect.height = 0), - (i.isUsing = !1); - else { - var L = _ - n, - M = a - s; - (i.allClippedDrawRect.x = n), - (i.allClippedDrawRect.y = s), - (i.allClippedDrawRect.width = L), - (i.allClippedDrawRect.height = M), - (i.isUsing = !0); - } - }), - (e.prototype.setupLayoutBounds = function (t) { - var i = t / e.CHANNEL_COUNT, - r = t % e.CHANNEL_COUNT; - (i = ~~i), (r = ~~r); - for (var o = 0, n = 0; n < e.CHANNEL_COUNT; n++) { - var s = i + (n < r ? 1 : 0); - if (0 == s); - else if (1 == s) { - var a = this.clipContextList[o++]; - (a.layoutChannelNo = n), - (a.layoutBounds.x = 0), - (a.layoutBounds.y = 0), - (a.layoutBounds.width = 1), - (a.layoutBounds.height = 1); - } else if (2 == s) - for (var h = 0; h < s; h++) { - var l = h % 2, - $ = 0; - l = ~~l; - var a = this.clipContextList[o++]; - (a.layoutChannelNo = n), - (a.layoutBounds.x = 0.5 * l), - (a.layoutBounds.y = 0), - (a.layoutBounds.width = 0.5), - (a.layoutBounds.height = 1); - } - else if (s <= 4) - for (var h = 0; h < s; h++) { - var l = h % 2, - $ = h / 2; - (l = ~~l), ($ = ~~$); - var a = this.clipContextList[o++]; - (a.layoutChannelNo = n), - (a.layoutBounds.x = 0.5 * l), - (a.layoutBounds.y = 0.5 * $), - (a.layoutBounds.width = 0.5), - (a.layoutBounds.height = 0.5); - } - else if (s <= 9) - for (var h = 0; h < s; h++) { - var l = h % 3, - $ = h / 3; - (l = ~~l), ($ = ~~$); - var a = this.clipContextList[o++]; - (a.layoutChannelNo = n), - (a.layoutBounds.x = l / 3), - (a.layoutBounds.y = $ / 3), - (a.layoutBounds.width = 1 / 3), - (a.layoutBounds.height = 1 / 3); - } - else _._$li("_$6 _$0P mask count : %d", s); - } - }), - (r.prototype.addClippedDrawData = function (t, i) { - var e = new o(t, i); - this.clippedDrawContextList.push(e); - }), - (s._$JT = function (t, i, e) { - var r = t / i, - o = e / i, - n = o, - s = 1 - (1 - o) * (1 - o), - _ = 1 - (1 - n) * (1 - n), - a = - (1 / 3) * (1 - o) * s + - (n * (2 / 3) + (1 / 3) * (1 - n)) * (1 - s), - h = - (n + (2 / 3) * (1 - n)) * _ + - (o * (1 / 3) + (2 / 3) * (1 - o)) * (1 - _), - l = 1 - 3 * h + 3 * a - 0, - $ = 3 * h - 6 * a + 0, - u = 3 * a - 0; - if (r <= 0) return 0; - if (r >= 1) return 1; - var p = r, - f = p * p; - return l * (p * f) + $ * f + u * p + 0; - }), - (s.prototype._$a0 = function () {}), - (s.prototype.setFadeIn = function (t) { - this._$dP = t; - }), - (s.prototype.setFadeOut = function (t) { - this._$eo = t; - }), - (s.prototype._$pT = function (t) { - this._$V0 = t; - }), - (s.prototype.getFadeOut = function () { - return this._$eo; - }), - (s.prototype._$4T = function () { - return this._$eo; - }), - (s.prototype._$mT = function () { - return this._$V0; - }), - (s.prototype.getDurationMSec = function () { - return -1; - }), - (s.prototype.getLoopDurationMSec = function () { - return -1; - }), - (s.prototype.updateParam = function (t, i) { - if (i._$AT && !i._$9L) { - var e = w.getUserTimeMSec(); - if (i._$z2 < 0) { - (i._$z2 = e), (i._$bs = e); - var r = this.getDurationMSec(); - i._$Do < 0 && (i._$Do = r <= 0 ? -1 : i._$z2 + r); - } - var o = this._$V0; - (o = - o * - (0 == this._$dP ? 1 : ht._$r2((e - i._$bs) / this._$dP)) * - (0 == this._$eo || i._$Do < 0 - ? 1 - : ht._$r2((i._$Do - e) / this._$eo))), - (0 <= o && o <= 1) || console.log("### assert!! ### "), - this.updateParamExe(t, e, o, i), - i._$Do > 0 && i._$Do < e && (i._$9L = !0); - } - }), - (s.prototype.updateParamExe = function (t, i, e, r) {}), - (_._$8s = 0), - (_._$fT = new Object()), - (_.start = function (t) { - var i = _._$fT[t]; - null == i && ((i = new a()), (i._$r = t), (_._$fT[t] = i)), - (i._$0S = w.getSystemTimeMSec()); - }), - (_.dump = function (t) { - var i = _._$fT[t]; - if (null != i) { - var e = w.getSystemTimeMSec(), - r = e - i._$0S; - return console.log(t + " : " + r + "ms"), r; - } - return -1; - }), - (_.end = function (t) { - var i = _._$fT[t]; - if (null != i) { - return w.getSystemTimeMSec() - i._$0S; - } - return -1; - }), - (_._$li = function (t, i) { - console.log("_$li : " + t + "\n", i); - }), - (_._$Ji = function (t, i) { - console.log(t, i); - }), - (_._$dL = function (t, i) { - console.log(t, i), console.log("\n"); - }), - (_._$KL = function (t, i) { - for (var e = 0; e < i; e++) - e % 16 == 0 && e > 0 - ? console.log("\n") - : e % 8 == 0 && e > 0 && console.log(" "), - console.log("%02X ", 255 & t[e]); - console.log("\n"); - }), - (_._$nr = function (t, i, e) { - console.log("%s\n", t); - for (var r = i.length, o = 0; o < r; ++o) - console.log("%5d", i[o]), - console.log("%s\n", e), - console.log(","); - console.log("\n"); - }), - (_._$Rb = function (t) { - console.log("dump exception : " + t), - console.log("stack :: " + t.stack); - }), - (h.prototype._$8P = function () { - return 0.5 * (this.x + this.x + this.width); - }), - (h.prototype._$6P = function () { - return 0.5 * (this.y + this.y + this.height); - }), - (h.prototype._$EL = function () { - return this.x + this.width; - }), - (h.prototype._$5T = function () { - return this.y + this.height; - }), - (h.prototype._$jL = function (t, i, e, r) { - (this.x = t), (this.y = i), (this.width = e), (this.height = r); - }), - (h.prototype._$jL = function (t) { - (this.x = t.x), - (this.y = t.y), - (this.width = t.width), - (this.height = t.height); - }), - (l.prototype = new et()), - (l._$tP = new Object()), - (l._$27 = function () { - l._$tP.clear(); - }), - (l.getID = function (t) { - var i = l._$tP[t]; - return null == i && ((i = new l(t)), (l._$tP[t] = i)), i; - }), - (l.prototype._$3s = function () { - return new l(); - }), - (u.prototype = new et()), - (u._$tP = new Object()), - (u._$27 = function () { - u._$tP.clear(); - }), - (u.getID = function (t) { - var i = u._$tP[t]; - return null == i && ((i = new u(t)), (u._$tP[t] = i)), i; - }), - (u.prototype._$3s = function () { - return new u(); - }), - (p._$42 = 0), - (p.prototype._$zP = function () { - null == this._$vo && (this._$vo = new ot()), - null == this._$F2 && (this._$F2 = new Array()); - }), - (p.prototype.getCanvasWidth = function () { - return this._$ao; - }), - (p.prototype.getCanvasHeight = function () { - return this._$1S; - }), - (p.prototype._$F0 = function (t) { - (this._$vo = t._$nP()), - (this._$F2 = t._$nP()), - (this._$ao = t._$6L()), - (this._$1S = t._$6L()); - }), - (p.prototype._$6S = function (t) { - this._$F2.push(t); - }), - (p.prototype._$Xr = function () { - return this._$F2; - }), - (p.prototype._$E2 = function () { - return this._$vo; - }), - (f.prototype.setup = function (t, i, e) { - (this._$ks = this._$Yb()), - this.p2._$xT(), - 3 == arguments.length && - ((this._$Fo = t), - (this._$L2 = i), - (this.p1._$p = e), - (this.p2._$p = e), - (this.p2.y = t), - this.setup()); - }), - (f.prototype.getPhysicsPoint1 = function () { - return this.p1; - }), - (f.prototype.getPhysicsPoint2 = function () { - return this.p2; - }), - (f.prototype._$qr = function () { - return this._$Db; - }), - (f.prototype._$pr = function (t) { - this._$Db = t; - }), - (f.prototype._$5r = function () { - return this._$M2; - }), - (f.prototype._$Cs = function () { - return this._$9b; - }), - (f.prototype._$Yb = function () { - return ( - (-180 * - Math.atan2(this.p1.x - this.p2.x, -(this.p1.y - this.p2.y))) / - Math.PI - ); - }), - (f.prototype.addSrcParam = function (t, i, e, r) { - var o = new g(t, i, e, r); - this._$lL.push(o); - }), - (f.prototype.addTargetParam = function (t, i, e, r) { - var o = new T(t, i, e, r); - this._$qP.push(o); - }), - (f.prototype.update = function (t, i) { - if (0 == this._$iP) - return ( - (this._$iP = this._$iT = i), - void (this._$Fo = Math.sqrt( - (this.p1.x - this.p2.x) * (this.p1.x - this.p2.x) + - (this.p1.y - this.p2.y) * (this.p1.y - this.p2.y) - )) - ); - var e = (i - this._$iT) / 1e3; - if (0 != e) { - for (var r = this._$lL.length - 1; r >= 0; --r) { - this._$lL[r]._$oP(t, this); - } - this._$oo(t, e), - (this._$M2 = this._$Yb()), - (this._$9b = (this._$M2 - this._$ks) / e), - (this._$ks = this._$M2); - } - for (var r = this._$qP.length - 1; r >= 0; --r) { - this._$qP[r]._$YS(t, this); - } - this._$iT = i; - }), - (f.prototype._$oo = function (t, i) { - i < 0.033 && (i = 0.033); - var e = 1 / i; - (this.p1.vx = (this.p1.x - this.p1._$s0) * e), - (this.p1.vy = (this.p1.y - this.p1._$70) * e), - (this.p1.ax = (this.p1.vx - this.p1._$7L) * e), - (this.p1.ay = (this.p1.vy - this.p1._$HL) * e), - (this.p1.fx = this.p1.ax * this.p1._$p), - (this.p1.fy = this.p1.ay * this.p1._$p), - this.p1._$xT(); - var r, - o, - n = -Math.atan2(this.p1.y - this.p2.y, this.p1.x - this.p2.x), - s = Math.cos(n), - _ = Math.sin(n), - a = 9.8 * this.p2._$p, - h = this._$Db * Lt._$bS, - l = a * Math.cos(n - h); - (r = l * _), (o = l * s); - var $ = -this.p1.fx * _ * _, - u = -this.p1.fy * _ * s, - p = -this.p2.vx * this._$L2, - f = -this.p2.vy * this._$L2; - (this.p2.fx = r + $ + p), - (this.p2.fy = o + u + f), - (this.p2.ax = this.p2.fx / this.p2._$p), - (this.p2.ay = this.p2.fy / this.p2._$p), - (this.p2.vx += this.p2.ax * i), - (this.p2.vy += this.p2.ay * i), - (this.p2.x += this.p2.vx * i), - (this.p2.y += this.p2.vy * i); - var c = Math.sqrt( - (this.p1.x - this.p2.x) * (this.p1.x - this.p2.x) + - (this.p1.y - this.p2.y) * (this.p1.y - this.p2.y) - ); - (this.p2.x = this.p1.x + (this._$Fo * (this.p2.x - this.p1.x)) / c), - (this.p2.y = - this.p1.y + (this._$Fo * (this.p2.y - this.p1.y)) / c), - (this.p2.vx = (this.p2.x - this.p2._$s0) * e), - (this.p2.vy = (this.p2.y - this.p2._$70) * e), - this.p2._$xT(); - }), - (c.prototype._$xT = function () { - (this._$s0 = this.x), - (this._$70 = this.y), - (this._$7L = this.vx), - (this._$HL = this.vy); - }), - (d.prototype._$oP = function (t, i) {}), - (g.prototype = new d()), - (g.prototype._$oP = function (t, i) { - var e = this.scale * t.getParamFloat(this._$wL), - r = i.getPhysicsPoint1(); - switch (this._$tL) { - default: - case f.Src.SRC_TO_X: - r.x = r.x + (e - r.x) * this._$V0; - break; - case f.Src.SRC_TO_Y: - r.y = r.y + (e - r.y) * this._$V0; - break; - case f.Src.SRC_TO_G_ANGLE: - var o = i._$qr(); - (o += (e - o) * this._$V0), i._$pr(o); - } - }), - (y.prototype._$YS = function (t, i) {}), - (T.prototype = new y()), - (T.prototype._$YS = function (t, i) { - switch (this._$YP) { - default: - case f.Target.TARGET_FROM_ANGLE: - t.setParamFloat(this._$wL, this.scale * i._$5r(), this._$V0); - break; - case f.Target.TARGET_FROM_ANGLE_V: - t.setParamFloat(this._$wL, this.scale * i._$Cs(), this._$V0); - } - }), - (f.Src = function () {}), - (f.Src.SRC_TO_X = "SRC_TO_X"), - (f.Src.SRC_TO_Y = "SRC_TO_Y"), - (f.Src.SRC_TO_G_ANGLE = "SRC_TO_G_ANGLE"), - (f.Target = function () {}), - (f.Target.TARGET_FROM_ANGLE = "TARGET_FROM_ANGLE"), - (f.Target.TARGET_FROM_ANGLE_V = "TARGET_FROM_ANGLE_V"), - (P.prototype.init = function (t) { - (this._$fL = t._$fL), - (this._$gL = t._$gL), - (this._$B0 = t._$B0), - (this._$z0 = t._$z0), - (this._$qT = t._$qT), - (this.reflectX = t.reflectX), - (this.reflectY = t.reflectY); - }), - (P.prototype._$F0 = function (t) { - (this._$fL = t._$_T()), - (this._$gL = t._$_T()), - (this._$B0 = t._$_T()), - (this._$z0 = t._$_T()), - (this._$qT = t._$_T()), - t.getFormatVersion() >= G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 && - ((this.reflectX = t._$po()), (this.reflectY = t._$po())); - }), - (P.prototype._$e = function () {}); - var It = function () {}; - (It._$ni = function (t, i, e, r, o, n, s, _, a) { - var h = s * n - _ * o; - if (0 == h) return null; - var l, - $ = ((t - e) * n - (i - r) * o) / h; - return ( - (l = 0 != o ? (t - e - $ * s) / o : (i - r - $ * _) / n), - isNaN(l) && - ((l = (t - e - $ * s) / o), - isNaN(l) && (l = (i - r - $ * _) / n), - isNaN(l) && - (console.log("a is NaN @UtVector#_$ni() "), - console.log("v1x : " + o), - console.log("v1x != 0 ? " + (0 != o)))), - null == a ? new Array(l, $) : ((a[0] = l), (a[1] = $), a) - ); - }), - (S.prototype._$8P = function () { - return this.x + 0.5 * this.width; - }), - (S.prototype._$6P = function () { - return this.y + 0.5 * this.height; - }), - (S.prototype._$EL = function () { - return this.x + this.width; - }), - (S.prototype._$5T = function () { - return this.y + this.height; - }), - (S.prototype._$jL = function (t, i, e, r) { - (this.x = t), (this.y = i), (this.width = e), (this.height = r); - }), - (S.prototype._$jL = function (t) { - (this.x = t.x), - (this.y = t.y), - (this.width = t.width), - (this.height = t.height); - }), - (S.prototype.contains = function (t, i) { - return ( - this.x <= this.x && - this.y <= this.y && - this.x <= this.x + this.width && - this.y <= this.y + this.height - ); - }), - (S.prototype.expand = function (t, i) { - (this.x -= t), - (this.y -= i), - (this.width += 2 * t), - (this.height += 2 * i); - }), - (v._$Z2 = function (t, i, e, r) { - var o = i._$Q2(t, e), - n = t._$vs(), - s = t._$Tr(); - if ((i._$zr(n, s, o), o <= 0)) return r[n[0]]; - if (1 == o) { - var _ = r[n[0]], - a = r[n[1]], - h = s[0]; - return (_ + (a - _) * h) | 0; - } - if (2 == o) { - var _ = r[n[0]], - a = r[n[1]], - l = r[n[2]], - $ = r[n[3]], - h = s[0], - u = s[1], - p = (_ + (a - _) * h) | 0, - f = (l + ($ - l) * h) | 0; - return (p + (f - p) * u) | 0; - } - if (3 == o) { - var c = r[n[0]], - d = r[n[1]], - g = r[n[2]], - y = r[n[3]], - m = r[n[4]], - T = r[n[5]], - P = r[n[6]], - S = r[n[7]], - h = s[0], - u = s[1], - v = s[2], - _ = (c + (d - c) * h) | 0, - a = (g + (y - g) * h) | 0, - l = (m + (T - m) * h) | 0, - $ = (P + (S - P) * h) | 0, - p = (_ + (a - _) * u) | 0, - f = (l + ($ - l) * u) | 0; - return (p + (f - p) * v) | 0; - } - if (4 == o) { - var L = r[n[0]], - M = r[n[1]], - E = r[n[2]], - A = r[n[3]], - I = r[n[4]], - w = r[n[5]], - x = r[n[6]], - O = r[n[7]], - D = r[n[8]], - R = r[n[9]], - b = r[n[10]], - F = r[n[11]], - C = r[n[12]], - N = r[n[13]], - B = r[n[14]], - U = r[n[15]], - h = s[0], - u = s[1], - v = s[2], - G = s[3], - c = (L + (M - L) * h) | 0, - d = (E + (A - E) * h) | 0, - g = (I + (w - I) * h) | 0, - y = (x + (O - x) * h) | 0, - m = (D + (R - D) * h) | 0, - T = (b + (F - b) * h) | 0, - P = (C + (N - C) * h) | 0, - S = (B + (U - B) * h) | 0, - _ = (c + (d - c) * u) | 0, - a = (g + (y - g) * u) | 0, - l = (m + (T - m) * u) | 0, - $ = (P + (S - P) * u) | 0, - p = (_ + (a - _) * v) | 0, - f = (l + ($ - l) * v) | 0; - return (p + (f - p) * G) | 0; - } - for (var Y = 1 << o, k = new Float32Array(Y), V = 0; V < Y; V++) { - for (var X = V, z = 1, H = 0; H < o; H++) - (z *= X % 2 == 0 ? 1 - s[H] : s[H]), (X /= 2); - k[V] = z; - } - for (var W = new Float32Array(Y), j = 0; j < Y; j++) W[j] = r[n[j]]; - for (var q = 0, j = 0; j < Y; j++) q += k[j] * W[j]; - return (q + 0.5) | 0; - }), - (v._$br = function (t, i, e, r) { - var o = i._$Q2(t, e), - n = t._$vs(), - s = t._$Tr(); - if ((i._$zr(n, s, o), o <= 0)) return r[n[0]]; - if (1 == o) { - var _ = r[n[0]], - a = r[n[1]], - h = s[0]; - return _ + (a - _) * h; - } - if (2 == o) { - var _ = r[n[0]], - a = r[n[1]], - l = r[n[2]], - $ = r[n[3]], - h = s[0], - u = s[1]; - return (1 - u) * (_ + (a - _) * h) + u * (l + ($ - l) * h); - } - if (3 == o) { - var p = r[n[0]], - f = r[n[1]], - c = r[n[2]], - d = r[n[3]], - g = r[n[4]], - y = r[n[5]], - m = r[n[6]], - T = r[n[7]], - h = s[0], - u = s[1], - P = s[2]; - return ( - (1 - P) * - ((1 - u) * (p + (f - p) * h) + u * (c + (d - c) * h)) + - P * ((1 - u) * (g + (y - g) * h) + u * (m + (T - m) * h)) - ); - } - if (4 == o) { - var S = r[n[0]], - v = r[n[1]], - L = r[n[2]], - M = r[n[3]], - E = r[n[4]], - A = r[n[5]], - I = r[n[6]], - w = r[n[7]], - x = r[n[8]], - O = r[n[9]], - D = r[n[10]], - R = r[n[11]], - b = r[n[12]], - F = r[n[13]], - C = r[n[14]], - N = r[n[15]], - h = s[0], - u = s[1], - P = s[2], - B = s[3]; - return ( - (1 - B) * - ((1 - P) * - ((1 - u) * (S + (v - S) * h) + u * (L + (M - L) * h)) + - P * ((1 - u) * (E + (A - E) * h) + u * (I + (w - I) * h))) + - B * - ((1 - P) * - ((1 - u) * (x + (O - x) * h) + u * (D + (R - D) * h)) + - P * ((1 - u) * (b + (F - b) * h) + u * (C + (N - C) * h))) - ); - } - for (var U = 1 << o, G = new Float32Array(U), Y = 0; Y < U; Y++) { - for (var k = Y, V = 1, X = 0; X < o; X++) - (V *= k % 2 == 0 ? 1 - s[X] : s[X]), (k /= 2); - G[Y] = V; - } - for (var z = new Float32Array(U), H = 0; H < U; H++) z[H] = r[n[H]]; - for (var W = 0, H = 0; H < U; H++) W += G[H] * z[H]; - return W; - }), - (v._$Vr = function (t, i, e, r, o, n, s, _) { - var a = i._$Q2(t, e), - h = t._$vs(), - l = t._$Tr(); - i._$zr(h, l, a); - var $ = 2 * r, - u = s; - if (a <= 0) { - var p = h[0], - f = o[p]; - if (2 == _ && 0 == s) w._$jT(f, 0, n, 0, $); - else - for (var c = 0; c < $; ) - (n[u] = f[c++]), (n[u + 1] = f[c++]), (u += _); - } else if (1 == a) - for ( - var f = o[h[0]], d = o[h[1]], g = l[0], y = 1 - g, c = 0; - c < $; - ) - (n[u] = f[c] * y + d[c] * g), - ++c, - (n[u + 1] = f[c] * y + d[c] * g), - ++c, - (u += _); - else if (2 == a) - for ( - var f = o[h[0]], - d = o[h[1]], - m = o[h[2]], - T = o[h[3]], - g = l[0], - P = l[1], - y = 1 - g, - S = 1 - P, - v = S * y, - L = S * g, - M = P * y, - E = P * g, - c = 0; - c < $; - - ) - (n[u] = v * f[c] + L * d[c] + M * m[c] + E * T[c]), - ++c, - (n[u + 1] = v * f[c] + L * d[c] + M * m[c] + E * T[c]), - ++c, - (u += _); - else if (3 == a) - for ( - var A = o[h[0]], - I = o[h[1]], - x = o[h[2]], - O = o[h[3]], - D = o[h[4]], - R = o[h[5]], - b = o[h[6]], - F = o[h[7]], - g = l[0], - P = l[1], - C = l[2], - y = 1 - g, - S = 1 - P, - N = 1 - C, - B = N * S * y, - U = N * S * g, - G = N * P * y, - Y = N * P * g, - k = C * S * y, - V = C * S * g, - X = C * P * y, - z = C * P * g, - c = 0; - c < $; - - ) - (n[u] = - B * A[c] + - U * I[c] + - G * x[c] + - Y * O[c] + - k * D[c] + - V * R[c] + - X * b[c] + - z * F[c]), - ++c, - (n[u + 1] = - B * A[c] + - U * I[c] + - G * x[c] + - Y * O[c] + - k * D[c] + - V * R[c] + - X * b[c] + - z * F[c]), - ++c, - (u += _); - else if (4 == a) - for ( - var H = o[h[0]], - W = o[h[1]], - j = o[h[2]], - q = o[h[3]], - J = o[h[4]], - Q = o[h[5]], - Z = o[h[6]], - K = o[h[7]], - tt = o[h[8]], - it = o[h[9]], - et = o[h[10]], - rt = o[h[11]], - ot = o[h[12]], - nt = o[h[13]], - st = o[h[14]], - _t = o[h[15]], - g = l[0], - P = l[1], - C = l[2], - at = l[3], - y = 1 - g, - S = 1 - P, - N = 1 - C, - ht = 1 - at, - lt = ht * N * S * y, - $t = ht * N * S * g, - ut = ht * N * P * y, - pt = ht * N * P * g, - ft = ht * C * S * y, - ct = ht * C * S * g, - dt = ht * C * P * y, - gt = ht * C * P * g, - yt = at * N * S * y, - mt = at * N * S * g, - Tt = at * N * P * y, - Pt = at * N * P * g, - St = at * C * S * y, - vt = at * C * S * g, - Lt = at * C * P * y, - Mt = at * C * P * g, - c = 0; - c < $; - - ) - (n[u] = - lt * H[c] + - $t * W[c] + - ut * j[c] + - pt * q[c] + - ft * J[c] + - ct * Q[c] + - dt * Z[c] + - gt * K[c] + - yt * tt[c] + - mt * it[c] + - Tt * et[c] + - Pt * rt[c] + - St * ot[c] + - vt * nt[c] + - Lt * st[c] + - Mt * _t[c]), - ++c, - (n[u + 1] = - lt * H[c] + - $t * W[c] + - ut * j[c] + - pt * q[c] + - ft * J[c] + - ct * Q[c] + - dt * Z[c] + - gt * K[c] + - yt * tt[c] + - mt * it[c] + - Tt * et[c] + - Pt * rt[c] + - St * ot[c] + - vt * nt[c] + - Lt * st[c] + - Mt * _t[c]), - ++c, - (u += _); - else { - for ( - var Et = 1 << a, At = new Float32Array(Et), It = 0; - It < Et; - It++ - ) { - for (var wt = It, xt = 1, Ot = 0; Ot < a; Ot++) - (xt *= wt % 2 == 0 ? 1 - l[Ot] : l[Ot]), (wt /= 2); - At[It] = xt; - } - for (var Dt = new Float32Array(Et), Rt = 0; Rt < Et; Rt++) - Dt[Rt] = o[h[Rt]]; - for (var c = 0; c < $; ) { - for (var bt = 0, Ft = 0, Ct = c + 1, Rt = 0; Rt < Et; Rt++) - (bt += At[Rt] * Dt[Rt][c]), (Ft += At[Rt] * Dt[Rt][Ct]); - (c += 2), (n[u] = bt), (n[u + 1] = Ft), (u += _); - } - } - }), - (L.prototype._$HT = function (t, i) { - (this.x = t), (this.y = i); - }), - (L.prototype._$HT = function (t) { - (this.x = t.x), (this.y = t.y); - }), - (M._$ur = -2), - (M._$ES = 500), - (M._$wb = 2), - (M._$8S = 3), - (M._$52 = M._$ES), - (M._$R2 = M._$ES), - (M._$or = function () { - return M._$52; - }), - (M._$Pr = function () { - return M._$R2; - }), - (M.prototype.convertClipIDForV2_11 = function (t) { - var i = []; - return null == t - ? null - : 0 == t.length - ? null - : /,/.test(t) - ? (i = t.id.split(",")) - : (i.push(t.id), i); - }), - (M.prototype._$F0 = function (t) { - (this._$gP = t._$nP()), - (this._$dr = t._$nP()), - (this._$GS = t._$nP()), - (this._$qb = t._$6L()), - (this._$Lb = t._$cS()), - (this._$mS = t._$Tb()), - t.getFormatVersion() >= G._$T7 - ? ((this.clipID = t._$nP()), - (this.clipIDList = this.convertClipIDForV2_11(this.clipID))) - : (this.clipIDList = []), - this._$MS(this._$Lb); - }), - (M.prototype.getClipIDList = function () { - return this.clipIDList; - }), - (M.prototype.init = function (t) {}), - (M.prototype._$Nr = function (t, i) { - if ( - ((i._$IS[0] = !1), - (i._$Us = v._$Z2(t, this._$GS, i._$IS, this._$Lb)), - at._$Zs) - ); - else if (i._$IS[0]) return; - i._$7s = v._$br(t, this._$GS, i._$IS, this._$mS); - }), - (M.prototype._$2b = function (t, i) {}), - (M.prototype.getDrawDataID = function () { - return this._$gP; - }), - (M.prototype._$j2 = function (t) { - this._$gP = t; - }), - (M.prototype.getOpacity = function (t, i) { - return i._$7s; - }), - (M.prototype._$zS = function (t, i) { - return i._$Us; - }), - (M.prototype._$MS = function (t) { - for (var i = t.length - 1; i >= 0; --i) { - var e = t[i]; - e < M._$52 ? (M._$52 = e) : e > M._$R2 && (M._$R2 = e); - } - }), - (M.prototype.getTargetBaseDataID = function () { - return this._$dr; - }), - (M.prototype._$gs = function (t) { - this._$dr = t; - }), - (M.prototype._$32 = function () { - return null != this._$dr && this._$dr != yt._$2o(); - }), - (M.prototype.preDraw = function (t, i, e) {}), - (M.prototype.draw = function (t, i, e) {}), - (M.prototype.getType = function () {}), - (M.prototype._$B2 = function (t, i, e) {}), - (E._$ps = 32), - (E.CLIPPING_PROCESS_NONE = 0), - (E.CLIPPING_PROCESS_OVERWRITE_ALPHA = 1), - (E.CLIPPING_PROCESS_MULTIPLY_ALPHA = 2), - (E.CLIPPING_PROCESS_DRAW = 3), - (E.CLIPPING_PROCESS_CLEAR_ALPHA = 4), - (E.prototype.setChannelFlagAsColor = function (t, i) { - this.CHANNEL_COLORS[t] = i; - }), - (E.prototype.getChannelFlagAsColor = function (t) { - return this.CHANNEL_COLORS[t]; - }), - (E.prototype._$ZT = function () {}), - (E.prototype._$Uo = function (t, i, e, r, o, n, s) {}), - (E.prototype._$Rs = function () { - return -1; - }), - (E.prototype._$Ds = function (t) {}), - (E.prototype.setBaseColor = function (t, i, e, r) { - t < 0 ? (t = 0) : t > 1 && (t = 1), - i < 0 ? (i = 0) : i > 1 && (i = 1), - e < 0 ? (e = 0) : e > 1 && (e = 1), - r < 0 ? (r = 0) : r > 1 && (r = 1), - (this._$lT = t), - (this._$C0 = i), - (this._$tT = e), - (this._$WL = r); - }), - (E.prototype._$WP = function (t) { - this.culling = t; - }), - (E.prototype.setMatrix = function (t) { - for (var i = 0; i < 16; i++) this.matrix4x4[i] = t[i]; - }), - (E.prototype._$IT = function () { - return this.matrix4x4; - }), - (E.prototype.setPremultipliedAlpha = function (t) { - this.premultipliedAlpha = t; - }), - (E.prototype.isPremultipliedAlpha = function () { - return this.premultipliedAlpha; - }), - (E.prototype.setAnisotropy = function (t) { - this.anisotropy = t; - }), - (E.prototype.getAnisotropy = function () { - return this.anisotropy; - }), - (E.prototype.getClippingProcess = function () { - return this.clippingProcess; - }), - (E.prototype.setClippingProcess = function (t) { - this.clippingProcess = t; - }), - (E.prototype.setClipBufPre_clipContextForMask = function (t) { - this.clipBufPre_clipContextMask = t; - }), - (E.prototype.getClipBufPre_clipContextMask = function () { - return this.clipBufPre_clipContextMask; - }), - (E.prototype.setClipBufPre_clipContextForDraw = function (t) { - this.clipBufPre_clipContextDraw = t; - }), - (E.prototype.getClipBufPre_clipContextDraw = function () { - return this.clipBufPre_clipContextDraw; - }), - (I._$ur = -2), - (I._$c2 = 1), - (I._$_b = 2), - (I.prototype._$F0 = function (t) { - (this._$kP = t._$nP()), (this._$dr = t._$nP()); - }), - (I.prototype.readV2_opacity = function (t) { - t.getFormatVersion() >= G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 && - (this._$mS = t._$Tb()); - }), - (I.prototype.init = function (t) {}), - (I.prototype._$Nr = function (t, i) {}), - (I.prototype.interpolateOpacity = function (t, i, e, r) { - null == this._$mS - ? e.setInterpolatedOpacity(1) - : e.setInterpolatedOpacity(v._$br(t, i, r, this._$mS)); - }), - (I.prototype._$2b = function (t, i) {}), - (I.prototype._$nb = function (t, i, e, r, o, n, s) {}), - (I.prototype.getType = function () {}), - (I.prototype._$gs = function (t) { - this._$dr = t; - }), - (I.prototype._$a2 = function (t) { - this._$kP = t; - }), - (I.prototype.getTargetBaseDataID = function () { - return this._$dr; - }), - (I.prototype.getBaseDataID = function () { - return this._$kP; - }), - (I.prototype._$32 = function () { - return null != this._$dr && this._$dr != yt._$2o(); - }), - (w._$W2 = 0), - (w._$CS = w._$W2), - (w._$Mo = function () { - return !0; - }), - (w._$XP = function (t) { - try { - for (var i = getTimeMSec(); getTimeMSec() - i < t; ); - } catch (t) { - t._$Rb(); - } - }), - (w.getUserTimeMSec = function () { - return w._$CS == w._$W2 ? w.getSystemTimeMSec() : w._$CS; - }), - (w.setUserTimeMSec = function (t) { - w._$CS = t; - }), - (w.updateUserTimeMSec = function () { - return (w._$CS = w.getSystemTimeMSec()); - }), - (w.getTimeMSec = function () { - return new Date().getTime(); - }), - (w.getSystemTimeMSec = function () { - return new Date().getTime(); - }), - (w._$Q = function (t) {}), - (w._$jT = function (t, i, e, r, o) { - for (var n = 0; n < o; n++) e[r + n] = t[i + n]; - }), - (x._$ds = -2), - (x.prototype._$F0 = function (t) { - (this._$wL = t._$nP()), - (this._$VP = t._$6L()), - (this._$GP = t._$nP()); - }), - (x.prototype.getParamIndex = function (t) { - return this._$2r != t && (this._$8o = x._$ds), this._$8o; - }), - (x.prototype._$Pb = function (t, i) { - (this._$8o = t), (this._$2r = i); - }), - (x.prototype.getParamID = function () { - return this._$wL; - }), - (x.prototype._$yP = function (t) { - this._$wL = t; - }), - (x.prototype._$N2 = function () { - return this._$VP; - }), - (x.prototype._$d2 = function () { - return this._$GP; - }), - (x.prototype._$t2 = function (t, i) { - (this._$VP = t), (this._$GP = i); - }), - (x.prototype._$Lr = function () { - return this._$O2; - }), - (x.prototype._$wr = function (t) { - this._$O2 = t; - }), - (x.prototype._$SL = function () { - return this._$ri; - }), - (x.prototype._$AL = function (t) { - this._$ri = t; - }), - (O.startsWith = function (t, i, e) { - var r = i + e.length; - if (r >= t.length) return !1; - for (var o = i; o < r; o++) - if (O.getChar(t, o) != e.charAt(o - i)) return !1; - return !0; - }), - (O.getChar = function (t, i) { - return String.fromCharCode(t.getUint8(i)); - }), - (O.createString = function (t, i, e) { - for ( - var r = new ArrayBuffer(2 * e), o = new Uint16Array(r), n = 0; - n < e; - n++ - ) - o[n] = t.getUint8(i + n); - return String.fromCharCode.apply(null, o); - }), - (O._$LS = function (t, i, e, r) { - t instanceof ArrayBuffer && (t = new DataView(t)); - var o = e, - n = !1, - s = !1, - _ = 0, - a = O.getChar(t, o); - "-" == a && ((n = !0), o++); - for (var h = !1; o < i; o++) { - switch ((a = O.getChar(t, o))) { - case "0": - _ *= 10; - break; - case "1": - _ = 10 * _ + 1; - break; - case "2": - _ = 10 * _ + 2; - break; - case "3": - _ = 10 * _ + 3; - break; - case "4": - _ = 10 * _ + 4; - break; - case "5": - _ = 10 * _ + 5; - break; - case "6": - _ = 10 * _ + 6; - break; - case "7": - _ = 10 * _ + 7; - break; - case "8": - _ = 10 * _ + 8; - break; - case "9": - _ = 10 * _ + 9; - break; - case ".": - (s = !0), o++, (h = !0); - break; - default: - h = !0; - } - if (h) break; - } - if (s) - for (var l = 0.1, $ = !1; o < i; o++) { - switch ((a = O.getChar(t, o))) { - case "0": - break; - case "1": - _ += 1 * l; - break; - case "2": - _ += 2 * l; - break; - case "3": - _ += 3 * l; - break; - case "4": - _ += 4 * l; - break; - case "5": - _ += 5 * l; - break; - case "6": - _ += 6 * l; - break; - case "7": - _ += 7 * l; - break; - case "8": - _ += 8 * l; - break; - case "9": - _ += 9 * l; - break; - default: - $ = !0; - } - if (((l *= 0.1), $)) break; - } - return n && (_ = -_), (r[0] = o), _; - }), - (D.prototype._$zP = function () { - this._$Ob = new Array(); - }), - (D.prototype._$F0 = function (t) { - this._$Ob = t._$nP(); - }), - (D.prototype._$Ur = function (t) { - if (t._$WS()) return !0; - for (var i = t._$v2(), e = this._$Ob.length - 1; e >= 0; --e) { - var r = this._$Ob[e].getParamIndex(i); - if ( - (r == x._$ds && - (r = t.getParamIndex(this._$Ob[e].getParamID())), - t._$Xb(r)) - ) - return !0; - } - return !1; - }), - (D.prototype._$Q2 = function (t, i) { - for ( - var e, r, o = this._$Ob.length, n = t._$v2(), s = 0, _ = 0; - _ < o; - _++ - ) { - var a = this._$Ob[_]; - if ( - ((e = a.getParamIndex(n)), - e == x._$ds && - ((e = t.getParamIndex(a.getParamID())), a._$Pb(e, n)), - e < 0) - ) - throw new Exception("err 23242 : " + a.getParamID()); - var h = e < 0 ? 0 : t.getParamFloat(e); - r = a._$N2(); - var l, - $, - u = a._$d2(), - p = -1, - f = 0; - if (r < 1); - else if (1 == r) - (l = u[0]), - l - U._$J < h && h < l + U._$J - ? ((p = 0), (f = 0)) - : ((p = 0), (i[0] = !0)); - else if (((l = u[0]), h < l - U._$J)) (p = 0), (i[0] = !0); - else if (h < l + U._$J) p = 0; - else { - for (var c = !1, d = 1; d < r; ++d) { - if ((($ = u[d]), h < $ + U._$J)) { - $ - U._$J < h - ? (p = d) - : ((p = d - 1), (f = (h - l) / ($ - l)), s++), - (c = !0); - break; - } - l = $; - } - c || ((p = r - 1), (f = 0), (i[0] = !0)); - } - a._$wr(p), a._$AL(f); - } - return s; - }), - (D.prototype._$zr = function (t, i, e) { - var r = 1 << e; - r + 1 > U._$Qb && console.log("err 23245\n"); - for ( - var o = this._$Ob.length, n = 1, s = 1, _ = 0, a = 0; - a < r; - ++a - ) - t[a] = 0; - for (var h = 0; h < o; ++h) { - var l = this._$Ob[h]; - if (0 == l._$SL()) { - var $ = l._$Lr() * n; - if ($ < 0 && at._$3T) throw new Exception("err 23246"); - for (var a = 0; a < r; ++a) t[a] += $; - } else { - for ( - var $ = n * l._$Lr(), u = n * (l._$Lr() + 1), a = 0; - a < r; - ++a - ) - t[a] += ((a / s) | 0) % 2 == 0 ? $ : u; - (i[_++] = l._$SL()), (s *= 2); - } - n *= l._$N2(); - } - (t[r] = 65535), (i[_] = -1); - }), - (D.prototype._$h2 = function (t, i, e) { - for (var r = new Float32Array(i), o = 0; o < i; ++o) r[o] = e[o]; - var n = new x(); - n._$yP(t), n._$t2(i, r), this._$Ob.push(n); - }), - (D.prototype._$J2 = function (t) { - for (var i = t, e = this._$Ob.length, r = 0; r < e; ++r) { - var o = this._$Ob[r], - n = o._$N2(), - s = i % o._$N2(), - _ = o._$d2()[s]; - console.log("%s[%d]=%7.2f / ", o.getParamID(), s, _), (i /= n); - } - console.log("\n"); - }), - (D.prototype.getParamCount = function () { - return this._$Ob.length; - }), - (D.prototype._$zs = function () { - return this._$Ob; - }), - (R.prototype.identity = function () { - for (var t = 0; t < 16; t++) this.m[t] = t % 5 == 0 ? 1 : 0; - }), - (R.prototype.getArray = function () { - return this.m; - }), - (R.prototype.getCopyMatrix = function () { - return new Float32Array(this.m); - }), - (R.prototype.setMatrix = function (t) { - if (null != t && 16 == t.length) - for (var i = 0; i < 16; i++) this.m[i] = t[i]; - }), - (R.prototype.mult = function (t, i, e) { - return null == i - ? null - : (this == i - ? this.mult_safe(this.m, t.m, i.m, e) - : this.mult_fast(this.m, t.m, i.m, e), - i); - }), - (R.prototype.mult_safe = function (t, i, e, r) { - if (t == e) { - var o = new Array(16); - this.mult_fast(t, i, o, r); - for (var n = 15; n >= 0; --n) e[n] = o[n]; - } else this.mult_fast(t, i, e, r); - }), - (R.prototype.mult_fast = function (t, i, e, r) { - r - ? ((e[0] = t[0] * i[0] + t[4] * i[1] + t[8] * i[2]), - (e[4] = t[0] * i[4] + t[4] * i[5] + t[8] * i[6]), - (e[8] = t[0] * i[8] + t[4] * i[9] + t[8] * i[10]), - (e[12] = t[0] * i[12] + t[4] * i[13] + t[8] * i[14] + t[12]), - (e[1] = t[1] * i[0] + t[5] * i[1] + t[9] * i[2]), - (e[5] = t[1] * i[4] + t[5] * i[5] + t[9] * i[6]), - (e[9] = t[1] * i[8] + t[5] * i[9] + t[9] * i[10]), - (e[13] = t[1] * i[12] + t[5] * i[13] + t[9] * i[14] + t[13]), - (e[2] = t[2] * i[0] + t[6] * i[1] + t[10] * i[2]), - (e[6] = t[2] * i[4] + t[6] * i[5] + t[10] * i[6]), - (e[10] = t[2] * i[8] + t[6] * i[9] + t[10] * i[10]), - (e[14] = t[2] * i[12] + t[6] * i[13] + t[10] * i[14] + t[14]), - (e[3] = e[7] = e[11] = 0), - (e[15] = 1)) - : ((e[0] = - t[0] * i[0] + t[4] * i[1] + t[8] * i[2] + t[12] * i[3]), - (e[4] = t[0] * i[4] + t[4] * i[5] + t[8] * i[6] + t[12] * i[7]), - (e[8] = - t[0] * i[8] + t[4] * i[9] + t[8] * i[10] + t[12] * i[11]), - (e[12] = - t[0] * i[12] + t[4] * i[13] + t[8] * i[14] + t[12] * i[15]), - (e[1] = t[1] * i[0] + t[5] * i[1] + t[9] * i[2] + t[13] * i[3]), - (e[5] = t[1] * i[4] + t[5] * i[5] + t[9] * i[6] + t[13] * i[7]), - (e[9] = - t[1] * i[8] + t[5] * i[9] + t[9] * i[10] + t[13] * i[11]), - (e[13] = - t[1] * i[12] + t[5] * i[13] + t[9] * i[14] + t[13] * i[15]), - (e[2] = - t[2] * i[0] + t[6] * i[1] + t[10] * i[2] + t[14] * i[3]), - (e[6] = - t[2] * i[4] + t[6] * i[5] + t[10] * i[6] + t[14] * i[7]), - (e[10] = - t[2] * i[8] + t[6] * i[9] + t[10] * i[10] + t[14] * i[11]), - (e[14] = - t[2] * i[12] + t[6] * i[13] + t[10] * i[14] + t[14] * i[15]), - (e[3] = - t[3] * i[0] + t[7] * i[1] + t[11] * i[2] + t[15] * i[3]), - (e[7] = - t[3] * i[4] + t[7] * i[5] + t[11] * i[6] + t[15] * i[7]), - (e[11] = - t[3] * i[8] + t[7] * i[9] + t[11] * i[10] + t[15] * i[11]), - (e[15] = - t[3] * i[12] + t[7] * i[13] + t[11] * i[14] + t[15] * i[15])); - }), - (R.prototype.translate = function (t, i, e) { - (this.m[12] = - this.m[0] * t + this.m[4] * i + this.m[8] * e + this.m[12]), - (this.m[13] = - this.m[1] * t + this.m[5] * i + this.m[9] * e + this.m[13]), - (this.m[14] = - this.m[2] * t + this.m[6] * i + this.m[10] * e + this.m[14]), - (this.m[15] = - this.m[3] * t + this.m[7] * i + this.m[11] * e + this.m[15]); - }), - (R.prototype.scale = function (t, i, e) { - (this.m[0] *= t), - (this.m[4] *= i), - (this.m[8] *= e), - (this.m[1] *= t), - (this.m[5] *= i), - (this.m[9] *= e), - (this.m[2] *= t), - (this.m[6] *= i), - (this.m[10] *= e), - (this.m[3] *= t), - (this.m[7] *= i), - (this.m[11] *= e); - }), - (R.prototype.rotateX = function (t) { - var i = Lt.fcos(t), - e = Lt._$9(t), - r = this.m[4]; - (this.m[4] = r * i + this.m[8] * e), - (this.m[8] = r * -e + this.m[8] * i), - (r = this.m[5]), - (this.m[5] = r * i + this.m[9] * e), - (this.m[9] = r * -e + this.m[9] * i), - (r = this.m[6]), - (this.m[6] = r * i + this.m[10] * e), - (this.m[10] = r * -e + this.m[10] * i), - (r = this.m[7]), - (this.m[7] = r * i + this.m[11] * e), - (this.m[11] = r * -e + this.m[11] * i); - }), - (R.prototype.rotateY = function (t) { - var i = Lt.fcos(t), - e = Lt._$9(t), - r = this.m[0]; - (this.m[0] = r * i + this.m[8] * -e), - (this.m[8] = r * e + this.m[8] * i), - (r = this.m[1]), - (this.m[1] = r * i + this.m[9] * -e), - (this.m[9] = r * e + this.m[9] * i), - (r = m[2]), - (this.m[2] = r * i + this.m[10] * -e), - (this.m[10] = r * e + this.m[10] * i), - (r = m[3]), - (this.m[3] = r * i + this.m[11] * -e), - (this.m[11] = r * e + this.m[11] * i); - }), - (R.prototype.rotateZ = function (t) { - var i = Lt.fcos(t), - e = Lt._$9(t), - r = this.m[0]; - (this.m[0] = r * i + this.m[4] * e), - (this.m[4] = r * -e + this.m[4] * i), - (r = this.m[1]), - (this.m[1] = r * i + this.m[5] * e), - (this.m[5] = r * -e + this.m[5] * i), - (r = this.m[2]), - (this.m[2] = r * i + this.m[6] * e), - (this.m[6] = r * -e + this.m[6] * i), - (r = this.m[3]), - (this.m[3] = r * i + this.m[7] * e), - (this.m[7] = r * -e + this.m[7] * i); - }), - (b.prototype = new et()), - (b._$tP = new Object()), - (b._$27 = function () { - b._$tP.clear(); - }), - (b.getID = function (t) { - var i = b._$tP[t]; - return null == i && ((i = new b(t)), (b._$tP[t] = i)), i; - }), - (b.prototype._$3s = function () { - return new b(); - }), - (F._$kS = -1), - (F._$pS = 0), - (F._$hb = 1), - (F.STATE_IDENTITY = 0), - (F._$gb = 1), - (F._$fo = 2), - (F._$go = 4), - (F.prototype.transform = function (t, i, e) { - var r, - o, - n, - s, - _, - a, - h = 0, - l = 0; - switch (this._$hi) { - default: - return; - case F._$go | F._$fo | F._$gb: - for ( - r = this._$7, - o = this._$H, - n = this._$k, - s = this._$f, - _ = this._$g, - a = this._$w; - --e >= 0; - - ) { - var $ = t[h++], - u = t[h++]; - (i[l++] = r * $ + o * u + n), (i[l++] = s * $ + _ * u + a); - } - return; - case F._$go | F._$fo: - for ( - r = this._$7, o = this._$H, s = this._$f, _ = this._$g; - --e >= 0; - - ) { - var $ = t[h++], - u = t[h++]; - (i[l++] = r * $ + o * u), (i[l++] = s * $ + _ * u); - } - return; - case F._$go | F._$gb: - for ( - o = this._$H, n = this._$k, s = this._$f, a = this._$w; - --e >= 0; - - ) { - var $ = t[h++]; - (i[l++] = o * t[h++] + n), (i[l++] = s * $ + a); - } - return; - case F._$go: - for (o = this._$H, s = this._$f; --e >= 0; ) { - var $ = t[h++]; - (i[l++] = o * t[h++]), (i[l++] = s * $); - } - return; - case F._$fo | F._$gb: - for ( - r = this._$7, n = this._$k, _ = this._$g, a = this._$w; - --e >= 0; - - ) - (i[l++] = r * t[h++] + n), (i[l++] = _ * t[h++] + a); - return; - case F._$fo: - for (r = this._$7, _ = this._$g; --e >= 0; ) - (i[l++] = r * t[h++]), (i[l++] = _ * t[h++]); - return; - case F._$gb: - for (n = this._$k, a = this._$w; --e >= 0; ) - (i[l++] = t[h++] + n), (i[l++] = t[h++] + a); - return; - case F.STATE_IDENTITY: - return void ((t == i && h == l) || w._$jT(t, h, i, l, 2 * e)); - } - }), - (F.prototype.update = function () { - 0 == this._$H && 0 == this._$f - ? 1 == this._$7 && 1 == this._$g - ? 0 == this._$k && 0 == this._$w - ? ((this._$hi = F.STATE_IDENTITY), (this._$Z = F._$pS)) - : ((this._$hi = F._$gb), (this._$Z = F._$hb)) - : 0 == this._$k && 0 == this._$w - ? ((this._$hi = F._$fo), (this._$Z = F._$kS)) - : ((this._$hi = F._$fo | F._$gb), (this._$Z = F._$kS)) - : 0 == this._$7 && 0 == this._$g - ? 0 == this._$k && 0 == this._$w - ? ((this._$hi = F._$go), (this._$Z = F._$kS)) - : ((this._$hi = F._$go | F._$gb), (this._$Z = F._$kS)) - : 0 == this._$k && 0 == this._$w - ? ((this._$hi = F._$go | F._$fo), (this._$Z = F._$kS)) - : ((this._$hi = F._$go | F._$fo | F._$gb), (this._$Z = F._$kS)); - }), - (F.prototype._$RT = function (t) { - this._$IT(t); - var i = t[0], - e = t[2], - r = t[1], - o = t[3], - n = Math.sqrt(i * i + r * r), - s = i * o - e * r; - 0 == n - ? at._$so && console.log("affine._$RT() / rt==0") - : ((t[0] = n), - (t[1] = s / n), - (t[2] = (r * o + i * e) / s), - (t[3] = Math.atan2(r, i))); - }), - (F.prototype._$ho = function (t, i, e, r) { - var o = new Float32Array(6), - n = new Float32Array(6); - t._$RT(o), i._$RT(n); - var s = new Float32Array(6); - (s[0] = o[0] + (n[0] - o[0]) * e), - (s[1] = o[1] + (n[1] - o[1]) * e), - (s[2] = o[2] + (n[2] - o[2]) * e), - (s[3] = o[3] + (n[3] - o[3]) * e), - (s[4] = o[4] + (n[4] - o[4]) * e), - (s[5] = o[5] + (n[5] - o[5]) * e), - r._$CT(s); - }), - (F.prototype._$CT = function (t) { - var i = Math.cos(t[3]), - e = Math.sin(t[3]); - (this._$7 = t[0] * i), - (this._$f = t[0] * e), - (this._$H = t[1] * (t[2] * i - e)), - (this._$g = t[1] * (t[2] * e + i)), - (this._$k = t[4]), - (this._$w = t[5]), - this.update(); - }), - (F.prototype._$IT = function (t) { - (t[0] = this._$7), - (t[1] = this._$f), - (t[2] = this._$H), - (t[3] = this._$g), - (t[4] = this._$k), - (t[5] = this._$w); - }), - (C.prototype = new s()), - (C._$cs = "VISIBLE:"), - (C._$ar = "LAYOUT:"), - (C._$Co = 0), - (C._$D2 = []), - (C._$1T = 1), - (C.loadMotion = function (t) { - var i = new C(), - e = [0], - r = t.length; - i._$yT = 0; - for (var o = 0; o < r; ++o) { - var n = 255 & t[o]; - if ("\n" != n && "\r" != n) - if ("#" != n) - if ("$" != n) { - if ( - ("a" <= n && n <= "z") || - ("A" <= n && n <= "Z") || - "_" == n - ) { - for ( - var s = o, _ = -1; - o < r && "\r" != (n = 255 & t[o]) && "\n" != n; - ++o - ) - if ("=" == n) { - _ = o; - break; - } - if (_ >= 0) { - var a = new B(); - O.startsWith(t, s, C._$cs) - ? ((a._$RP = B._$hs), - (a._$4P = new String(t, s, _ - s))) - : O.startsWith(t, s, C._$ar) - ? ((a._$4P = new String(t, s + 7, _ - s - 7)), - O.startsWith(t, s + 7, "ANCHOR_X") - ? (a._$RP = B._$xs) - : O.startsWith(t, s + 7, "ANCHOR_Y") - ? (a._$RP = B._$us) - : O.startsWith(t, s + 7, "SCALE_X") - ? (a._$RP = B._$qs) - : O.startsWith(t, s + 7, "SCALE_Y") - ? (a._$RP = B._$Ys) - : O.startsWith(t, s + 7, "X") - ? (a._$RP = B._$ws) - : O.startsWith(t, s + 7, "Y") && - (a._$RP = B._$Ns)) - : ((a._$RP = B._$Fr), - (a._$4P = new String(t, s, _ - s))), - i.motions.push(a); - var h = 0; - for ( - C._$D2.clear(), o = _ + 1; - o < r && "\r" != (n = 255 & t[o]) && "\n" != n; - ++o - ) - if ("," != n && " " != n && "\t" != n) { - var l = O._$LS(t, r, o, e); - if (e[0] > 0) { - C._$D2.push(l), h++; - var $ = e[0]; - if ($ < o) { - console.log( - "_$n0 _$hi . @Live2DMotion loadMotion()\n" - ); - break; - } - o = $; - } - } - (a._$I0 = C._$D2._$BL()), h > i._$yT && (i._$yT = h); - } - } - } else { - for ( - var s = o, _ = -1; - o < r && "\r" != (n = 255 & t[o]) && "\n" != n; - ++o - ) - if ("=" == n) { - _ = o; - break; - } - var u = !1; - if (_ >= 0) - for ( - _ == s + 4 && - "f" == t[s + 1] && - "p" == t[s + 2] && - "s" == t[s + 3] && - (u = !0), - o = _ + 1; - o < r && "\r" != (n = 255 & t[o]) && "\n" != n; - ++o - ) - if ("," != n && " " != n && "\t" != n) { - var l = O._$LS(t, r, o, e); - e[0] > 0 && u && 5 < l && l < 121 && (i._$D0 = l), - (o = e[0]); - } - for (; o < r && "\n" != t[o] && "\r" != t[o]; ++o); - } - else for (; o < r && "\n" != t[o] && "\r" != t[o]; ++o); - } - return (i._$AS = ((1e3 * i._$yT) / i._$D0) | 0), i; - }), - (C.prototype.getDurationMSec = function () { - return this._$AS; - }), - (C.prototype.dump = function () { - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t]; - console.log("_$wL[%s] [%d]. ", i._$4P, i._$I0.length); - for (var e = 0; e < i._$I0.length && e < 10; e++) - console.log("%5.2f ,", i._$I0[e]); - console.log("\n"); - } - }), - (C.prototype.updateParamExe = function (t, i, e, r) { - for ( - var o = i - r._$z2, - n = (o * this._$D0) / 1e3, - s = 0 | n, - _ = n - s, - a = 0; - a < this.motions.length; - a++ - ) { - var h = this.motions[a], - l = h._$I0.length, - $ = h._$4P; - if (h._$RP == B._$hs) { - var u = h._$I0[s >= l ? l - 1 : s]; - t.setParamFloat($, u); - } else if (B._$ws <= h._$RP && h._$RP <= B._$Ys); - else { - var p = t.getParamFloat($), - f = h._$I0[s >= l ? l - 1 : s], - c = h._$I0[s + 1 >= l ? l - 1 : s + 1], - d = f + (c - f) * _, - g = p + (d - p) * e; - t.setParamFloat($, g); - } - } - s >= this._$yT && - (this._$E - ? ((r._$z2 = i), this.loopFadeIn && (r._$bs = i)) - : (r._$9L = !0)); - }), - (C.prototype._$r0 = function () { - return this._$E; - }), - (C.prototype._$aL = function (t) { - this._$E = t; - }), - (C.prototype.isLoopFadeIn = function () { - return this.loopFadeIn; - }), - (C.prototype.setLoopFadeIn = function (t) { - this.loopFadeIn = t; - }), - (N.prototype.clear = function () { - this.size = 0; - }), - (N.prototype.add = function (t) { - if (this._$P.length <= this.size) { - var i = new Float32Array(2 * this.size); - w._$jT(this._$P, 0, i, 0, this.size), (this._$P = i); - } - this._$P[this.size++] = t; - }), - (N.prototype._$BL = function () { - var t = new Float32Array(this.size); - return w._$jT(this._$P, 0, t, 0, this.size), t; - }), - (B._$Fr = 0), - (B._$hs = 1), - (B._$ws = 100), - (B._$Ns = 101), - (B._$xs = 102), - (B._$us = 103), - (B._$qs = 104), - (B._$Ys = 105), - (U._$Ms = 1), - (U._$Qs = 2), - (U._$i2 = 0), - (U._$No = 2), - (U._$do = U._$Ms), - (U._$Ls = !0), - (U._$1r = 5), - (U._$Qb = 65), - (U._$J = 1e-4), - (U._$FT = 0.001), - (U._$Ss = 3), - (G._$o7 = 6), - (G._$S7 = 7), - (G._$s7 = 8), - (G._$77 = 9), - (G.LIVE2D_FORMAT_VERSION_V2_10_SDK2 = 10), - (G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1 = 11), - (G._$T7 = G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1), - (G._$Is = -2004318072), - (G._$h0 = 0), - (G._$4L = 23), - (G._$7P = 33), - (G._$uT = function (t) { - console.log("_$bo :: _$6 _$mo _$E0 : %d\n", t); - }), - (G._$9o = function (t) { - if (t < 40) return G._$uT(t), null; - if (t < 50) return G._$uT(t), null; - if (t < 60) return G._$uT(t), null; - if (t < 100) - switch (t) { - case 65: - return new Z(); - case 66: - return new D(); - case 67: - return new x(); - case 68: - return new z(); - case 69: - return new P(); - case 70: - return new $t(); - default: - return G._$uT(t), null; - } - else if (t < 150) - switch (t) { - case 131: - return new st(); - case 133: - return new tt(); - case 136: - return new p(); - case 137: - return new ot(); - case 142: - return new j(); - } - return G._$uT(t), null; - }), - (Y._$HP = 0), - (Y._$_0 = !0); - (Y._$V2 = -1), - (Y._$W0 = -1), - (Y._$jr = !1), - (Y._$ZS = !0), - (Y._$tr = -1e6), - (Y._$lr = 1e6), - (Y._$is = 32), - (Y._$e = !1), - (Y.prototype.getDrawDataIndex = function (t) { - for (var i = this._$aS.length - 1; i >= 0; --i) - if (null != this._$aS[i] && this._$aS[i].getDrawDataID() == t) - return i; - return -1; - }), - (Y.prototype.getDrawData = function (t) { - if (t instanceof b) { - if (null == this._$Bo) { - this._$Bo = new Object(); - for (var i = this._$aS.length, e = 0; e < i; e++) { - var r = this._$aS[e], - o = r.getDrawDataID(); - null != o && (this._$Bo[o] = r); - } - } - return this._$Bo[id]; - } - return t < this._$aS.length ? this._$aS[t] : null; - }), - (Y.prototype.release = function () { - this._$3S.clear(), - this._$aS.clear(), - this._$F2.clear(), - null != this._$Bo && this._$Bo.clear(), - this._$db.clear(), - this._$8b.clear(), - this._$Hr.clear(); - }), - (Y.prototype.init = function () { - this._$co++, this._$F2.length > 0 && this.release(); - for ( - var t = this._$Ri.getModelImpl(), - i = t._$Xr(), - r = i.length, - o = new Array(), - n = new Array(), - s = 0; - s < r; - ++s - ) { - var _ = i[s]; - this._$F2.push(_), this._$Hr.push(_.init(this)); - for (var a = _.getBaseData(), h = a.length, l = 0; l < h; ++l) - o.push(a[l]); - for (var l = 0; l < h; ++l) { - var $ = a[l].init(this); - $._$l2(s), n.push($); - } - for (var u = _.getDrawData(), p = u.length, l = 0; l < p; ++l) { - var f = u[l], - c = f.init(this); - (c._$IP = s), this._$aS.push(f), this._$8b.push(c); - } - } - for (var d = o.length, g = yt._$2o(); ; ) { - for (var y = !1, s = 0; s < d; ++s) { - var m = o[s]; - if (null != m) { - var T = m.getTargetBaseDataID(); - (null == T || T == g || this.getBaseDataIndex(T) >= 0) && - (this._$3S.push(m), - this._$db.push(n[s]), - (o[s] = null), - (y = !0)); - } - } - if (!y) break; - } - var P = t._$E2(); - if (null != P) { - var S = P._$1s(); - if (null != S) - for (var v = S.length, s = 0; s < v; ++s) { - var L = S[s]; - null != L && - this._$02( - L.getParamID(), - L.getDefaultValue(), - L.getMinValue(), - L.getMaxValue() - ); - } - } - (this.clipManager = new e(this.dp_webgl)), - this.clipManager.init(this, this._$aS, this._$8b), - (this._$QT = !0); - }), - (Y.prototype.update = function () { - Y._$e && _.start("_$zL"); - for (var t = this._$_2.length, i = 0; i < t; i++) - this._$_2[i] != this._$vr[i] && - ((this._$Js[i] = Y._$ZS), (this._$vr[i] = this._$_2[i])); - var e = this._$3S.length, - r = this._$aS.length, - o = W._$or(), - n = W._$Pr(), - s = n - o + 1; - (null == this._$Ws || this._$Ws.length < s) && - ((this._$Ws = new Int16Array(s)), - (this._$Vs = new Int16Array(s))); - for (var i = 0; i < s; i++) - (this._$Ws[i] = Y._$V2), (this._$Vs[i] = Y._$V2); - (null == this._$Er || this._$Er.length < r) && - (this._$Er = new Int16Array(r)); - for (var i = 0; i < r; i++) this._$Er[i] = Y._$W0; - Y._$e && _.dump("_$zL"), Y._$e && _.start("_$UL"); - for (var a = null, h = 0; h < e; ++h) { - var l = this._$3S[h], - $ = this._$db[h]; - try { - l._$Nr(this, $), l._$2b(this, $); - } catch (t) { - null == a && (a = t); - } - } - null != a && Y._$_0 && _._$Rb(a), - Y._$e && _.dump("_$UL"), - Y._$e && _.start("_$DL"); - for (var u = null, p = 0; p < r; ++p) { - var f = this._$aS[p], - c = this._$8b[p]; - try { - if ((f._$Nr(this, c), c._$u2())) continue; - f._$2b(this, c); - var d, - g = Math.floor(f._$zS(this, c) - o); - try { - d = this._$Vs[g]; - } catch (t) { - console.log( - "_$li :: %s / %s \t\t\t\t@@_$fS\n", - t.toString(), - f.getDrawDataID().toString() - ), - (g = Math.floor(f._$zS(this, c) - o)); - continue; - } - d == Y._$V2 ? (this._$Ws[g] = p) : (this._$Er[d] = p), - (this._$Vs[g] = p); - } catch (t) { - null == u && ((u = t), at._$sT(at._$H7)); - } - } - null != u && Y._$_0 && _._$Rb(u), - Y._$e && _.dump("_$DL"), - Y._$e && _.start("_$eL"); - for (var i = this._$Js.length - 1; i >= 0; i--) - this._$Js[i] = Y._$jr; - return (this._$QT = !1), Y._$e && _.dump("_$eL"), !1; - }), - (Y.prototype.preDraw = function (t) { - null != this.clipManager && - (t._$ZT(), this.clipManager.setupClip(this, t)); - }), - (Y.prototype.draw = function (t) { - if (null == this._$Ws) - return void _._$li("call _$Ri.update() before _$Ri.draw() "); - var i = this._$Ws.length; - t._$ZT(); - for (var e = 0; e < i; ++e) { - var r = this._$Ws[e]; - if (r != Y._$V2) - for (;;) { - var o = this._$aS[r], - n = this._$8b[r]; - if (n._$yo()) { - var s = n._$IP, - a = this._$Hr[s]; - (n._$VS = a.getPartsOpacity()), o.draw(t, this, n); - } - var h = this._$Er[r]; - if (h <= r || h == Y._$W0) break; - r = h; - } - } - }), - (Y.prototype.getParamIndex = function (t) { - for (var i = this._$pb.length - 1; i >= 0; --i) - if (this._$pb[i] == t) return i; - return this._$02(t, 0, Y._$tr, Y._$lr); - }), - (Y.prototype._$BS = function (t) { - return this.getBaseDataIndex(t); - }), - (Y.prototype.getBaseDataIndex = function (t) { - for (var i = this._$3S.length - 1; i >= 0; --i) - if (null != this._$3S[i] && this._$3S[i].getBaseDataID() == t) - return i; - return -1; - }), - (Y.prototype._$UT = function (t, i) { - var e = new Float32Array(i); - return w._$jT(t, 0, e, 0, t.length), e; - }), - (Y.prototype._$02 = function (t, i, e, r) { - if (this._$qo >= this._$pb.length) { - var o = this._$pb.length, - n = new Array(2 * o); - w._$jT(this._$pb, 0, n, 0, o), - (this._$pb = n), - (this._$_2 = this._$UT(this._$_2, 2 * o)), - (this._$vr = this._$UT(this._$vr, 2 * o)), - (this._$Rr = this._$UT(this._$Rr, 2 * o)), - (this._$Or = this._$UT(this._$Or, 2 * o)); - var s = new Array(); - w._$jT(this._$Js, 0, s, 0, o), (this._$Js = s); - } - return ( - (this._$pb[this._$qo] = t), - (this._$_2[this._$qo] = i), - (this._$vr[this._$qo] = i), - (this._$Rr[this._$qo] = e), - (this._$Or[this._$qo] = r), - (this._$Js[this._$qo] = Y._$ZS), - this._$qo++ - ); - }), - (Y.prototype._$Zo = function (t, i) { - this._$3S[t] = i; - }), - (Y.prototype.setParamFloat = function (t, i) { - i < this._$Rr[t] && (i = this._$Rr[t]), - i > this._$Or[t] && (i = this._$Or[t]), - (this._$_2[t] = i); - }), - (Y.prototype.loadParam = function () { - var t = this._$_2.length; - t > this._$fs.length && (t = this._$fs.length), - w._$jT(this._$fs, 0, this._$_2, 0, t); - }), - (Y.prototype.saveParam = function () { - var t = this._$_2.length; - t > this._$fs.length && (this._$fs = new Float32Array(t)), - w._$jT(this._$_2, 0, this._$fs, 0, t); - }), - (Y.prototype._$v2 = function () { - return this._$co; - }), - (Y.prototype._$WS = function () { - return this._$QT; - }), - (Y.prototype._$Xb = function (t) { - return this._$Js[t] == Y._$ZS; - }), - (Y.prototype._$vs = function () { - return this._$Es; - }), - (Y.prototype._$Tr = function () { - return this._$ZP; - }), - (Y.prototype.getBaseData = function (t) { - return this._$3S[t]; - }), - (Y.prototype.getParamFloat = function (t) { - return this._$_2[t]; - }), - (Y.prototype.getParamMax = function (t) { - return this._$Or[t]; - }), - (Y.prototype.getParamMin = function (t) { - return this._$Rr[t]; - }), - (Y.prototype.setPartsOpacity = function (t, i) { - this._$Hr[t].setPartsOpacity(i); - }), - (Y.prototype.getPartsOpacity = function (t) { - return this._$Hr[t].getPartsOpacity(); - }), - (Y.prototype.getPartsDataIndex = function (t) { - for (var i = this._$F2.length - 1; i >= 0; --i) - if (null != this._$F2[i] && this._$F2[i]._$p2() == t) return i; - return -1; - }), - (Y.prototype._$q2 = function (t) { - return this._$db[t]; - }), - (Y.prototype._$C2 = function (t) { - return this._$8b[t]; - }), - (Y.prototype._$Bb = function (t) { - return this._$Hr[t]; - }), - (Y.prototype._$5s = function (t, i) { - for (var e = this._$Ws.length, r = t, o = 0; o < e; ++o) { - var n = this._$Ws[o]; - if (n != Y._$V2) - for (;;) { - var s = this._$8b[n]; - s._$yo() && (s._$GT()._$B2(this, s, r), (r += i)); - var _ = this._$Er[n]; - if (_ <= n || _ == Y._$W0) break; - n = _; - } - } - }), - (Y.prototype.setDrawParam = function (t) { - this.dp_webgl = t; - }), - (Y.prototype.getDrawParam = function () { - return this.dp_webgl; - }), - (k._$0T = function (t) { - return k._$0T(new _$5(t)); - }), - (k._$0T = function (t) { - if (!t.exists()) throw new _$ls(t._$3b()); - for ( - var i, - e = t.length(), - r = new Int8Array(e), - o = new _$Xs(new _$kb(t), 8192), - n = 0; - (i = o.read(r, n, e - n)) > 0; - - ) - n += i; - return r; - }), - (k._$C = function (t) { - var i = null, - e = null; - try { - (i = t instanceof Array ? t : new _$Xs(t, 8192)), - (e = new _$js()); - for (var r, o = new Int8Array(1e3); (r = i.read(o)) > 0; ) - e.write(o, 0, r); - return e._$TS(); - } finally { - null != t && t.close(), null != e && (e.flush(), e.close()); - } - }), - (V.prototype._$T2 = function () { - return w.getUserTimeMSec() + Math._$10() * (2 * this._$Br - 1); - }), - (V.prototype._$uo = function (t) { - this._$Br = t; - }), - (V.prototype._$QS = function (t, i, e) { - (this._$Dr = t), (this._$Cb = i), (this._$mr = e); - }), - (V.prototype._$7T = function (t) { - var i, - e = w.getUserTimeMSec(), - r = 0; - switch (this._$_L) { - case STATE_CLOSING: - (r = (e - this._$bb) / this._$Dr), - r >= 1 && - ((r = 1), (this._$_L = wt.STATE_CLOSED), (this._$bb = e)), - (i = 1 - r); - break; - case STATE_CLOSED: - (r = (e - this._$bb) / this._$Cb), - r >= 1 && ((this._$_L = wt.STATE_OPENING), (this._$bb = e)), - (i = 0); - break; - case STATE_OPENING: - (r = (e - this._$bb) / this._$mr), - r >= 1 && - ((r = 1), - (this._$_L = wt.STATE_INTERVAL), - (this._$12 = this._$T2())), - (i = r); - break; - case STATE_INTERVAL: - this._$12 < e && - ((this._$_L = wt.STATE_CLOSING), (this._$bb = e)), - (i = 1); - break; - case STATE_FIRST: - default: - (this._$_L = wt.STATE_INTERVAL), - (this._$12 = this._$T2()), - (i = 1); - } - this._$jo || (i = -i), - t.setParamFloat(this._$iL, i), - t.setParamFloat(this._$0L, i); - }); - var wt = function () {}; - (wt.STATE_FIRST = "STATE_FIRST"), - (wt.STATE_INTERVAL = "STATE_INTERVAL"), - (wt.STATE_CLOSING = "STATE_CLOSING"), - (wt.STATE_CLOSED = "STATE_CLOSED"), - (wt.STATE_OPENING = "STATE_OPENING"), - (X.prototype = new E()), - (X._$As = 32), - (X._$Gr = !1), - (X._$NT = null), - (X._$vS = null), - (X._$no = null), - (X._$9r = function (t) { - return new Float32Array(t); - }), - (X._$vb = function (t) { - return new Int16Array(t); - }), - (X._$cr = function (t, i) { - return ( - null == t || t._$yL() < i.length - ? ((t = X._$9r(2 * i.length)), t.put(i), t._$oT(0)) - : (t.clear(), t.put(i), t._$oT(0)), - t - ); - }), - (X._$mb = function (t, i) { - return ( - null == t || t._$yL() < i.length - ? ((t = X._$vb(2 * i.length)), t.put(i), t._$oT(0)) - : (t.clear(), t.put(i), t._$oT(0)), - t - ); - }), - (X._$Hs = function () { - return X._$Gr; - }), - (X._$as = function (t) { - X._$Gr = t; - }), - (X.prototype.setGL = function (t) { - this.gl = t; - }), - (X.prototype.setTransform = function (t) { - this.transform = t; - }), - (X.prototype._$ZT = function () {}), - (X.prototype._$Uo = function (t, i, e, r, o, n, s, _) { - if (!(n < 0.01)) { - var a = this._$U2[t], - h = n > 0.9 ? at.EXPAND_W : 0; - this.gl.drawElements(a, e, r, o, n, h, this.transform, _); - } - }), - (X.prototype._$Rs = function () { - throw new Error("_$Rs"); - }), - (X.prototype._$Ds = function (t) { - throw new Error("_$Ds"); - }), - (X.prototype._$K2 = function () { - for (var t = 0; t < this._$sb.length; t++) { - 0 != this._$sb[t] && - (this.gl._$Sr(1, this._$sb, t), (this._$sb[t] = 0)); - } - }), - (X.prototype.setTexture = function (t, i) { - this._$sb.length < t + 1 && this._$nS(t), (this._$sb[t] = i); - }), - (X.prototype.setTexture = function (t, i) { - this._$sb.length < t + 1 && this._$nS(t), (this._$U2[t] = i); - }), - (X.prototype._$nS = function (t) { - var i = Math.max(2 * this._$sb.length, t + 1 + 10), - e = new Int32Array(i); - w._$jT(this._$sb, 0, e, 0, this._$sb.length), (this._$sb = e); - var r = new Array(); - w._$jT(this._$U2, 0, r, 0, this._$U2.length), (this._$U2 = r); - }), - (z.prototype = new I()), - (z._$Xo = new Float32Array(2)), - (z._$io = new Float32Array(2)), - (z._$0o = new Float32Array(2)), - (z._$Lo = new Float32Array(2)), - (z._$To = new Float32Array(2)), - (z._$Po = new Float32Array(2)), - (z._$gT = new Array()), - (z.prototype._$zP = function () { - (this._$GS = new D()), this._$GS._$zP(), (this._$Y0 = new Array()); - }), - (z.prototype.getType = function () { - return I._$c2; - }), - (z.prototype._$F0 = function (t) { - I.prototype._$F0.call(this, t), - (this._$GS = t._$nP()), - (this._$Y0 = t._$nP()), - I.prototype.readV2_opacity.call(this, t); - }), - (z.prototype.init = function (t) { - var i = new H(this); - return (i._$Yr = new P()), this._$32() && (i._$Wr = new P()), i; - }), - (z.prototype._$Nr = function (t, i) { - this != i._$GT() && console.log("### assert!! ### "); - var e = i; - if (this._$GS._$Ur(t)) { - var r = z._$gT; - r[0] = !1; - var o = this._$GS._$Q2(t, r); - i._$Ib(r[0]), this.interpolateOpacity(t, this._$GS, i, r); - var n = t._$vs(), - s = t._$Tr(); - if ((this._$GS._$zr(n, s, o), o <= 0)) { - var _ = this._$Y0[n[0]]; - e._$Yr.init(_); - } else if (1 == o) { - var _ = this._$Y0[n[0]], - a = this._$Y0[n[1]], - h = s[0]; - (e._$Yr._$fL = _._$fL + (a._$fL - _._$fL) * h), - (e._$Yr._$gL = _._$gL + (a._$gL - _._$gL) * h), - (e._$Yr._$B0 = _._$B0 + (a._$B0 - _._$B0) * h), - (e._$Yr._$z0 = _._$z0 + (a._$z0 - _._$z0) * h), - (e._$Yr._$qT = _._$qT + (a._$qT - _._$qT) * h); - } else if (2 == o) { - var _ = this._$Y0[n[0]], - a = this._$Y0[n[1]], - l = this._$Y0[n[2]], - $ = this._$Y0[n[3]], - h = s[0], - u = s[1], - p = _._$fL + (a._$fL - _._$fL) * h, - f = l._$fL + ($._$fL - l._$fL) * h; - (e._$Yr._$fL = p + (f - p) * u), - (p = _._$gL + (a._$gL - _._$gL) * h), - (f = l._$gL + ($._$gL - l._$gL) * h), - (e._$Yr._$gL = p + (f - p) * u), - (p = _._$B0 + (a._$B0 - _._$B0) * h), - (f = l._$B0 + ($._$B0 - l._$B0) * h), - (e._$Yr._$B0 = p + (f - p) * u), - (p = _._$z0 + (a._$z0 - _._$z0) * h), - (f = l._$z0 + ($._$z0 - l._$z0) * h), - (e._$Yr._$z0 = p + (f - p) * u), - (p = _._$qT + (a._$qT - _._$qT) * h), - (f = l._$qT + ($._$qT - l._$qT) * h), - (e._$Yr._$qT = p + (f - p) * u); - } else if (3 == o) { - var c = this._$Y0[n[0]], - d = this._$Y0[n[1]], - g = this._$Y0[n[2]], - y = this._$Y0[n[3]], - m = this._$Y0[n[4]], - T = this._$Y0[n[5]], - P = this._$Y0[n[6]], - S = this._$Y0[n[7]], - h = s[0], - u = s[1], - v = s[2], - p = c._$fL + (d._$fL - c._$fL) * h, - f = g._$fL + (y._$fL - g._$fL) * h, - L = m._$fL + (T._$fL - m._$fL) * h, - M = P._$fL + (S._$fL - P._$fL) * h; - (e._$Yr._$fL = - (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), - (p = c._$gL + (d._$gL - c._$gL) * h), - (f = g._$gL + (y._$gL - g._$gL) * h), - (L = m._$gL + (T._$gL - m._$gL) * h), - (M = P._$gL + (S._$gL - P._$gL) * h), - (e._$Yr._$gL = - (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), - (p = c._$B0 + (d._$B0 - c._$B0) * h), - (f = g._$B0 + (y._$B0 - g._$B0) * h), - (L = m._$B0 + (T._$B0 - m._$B0) * h), - (M = P._$B0 + (S._$B0 - P._$B0) * h), - (e._$Yr._$B0 = - (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), - (p = c._$z0 + (d._$z0 - c._$z0) * h), - (f = g._$z0 + (y._$z0 - g._$z0) * h), - (L = m._$z0 + (T._$z0 - m._$z0) * h), - (M = P._$z0 + (S._$z0 - P._$z0) * h), - (e._$Yr._$z0 = - (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)), - (p = c._$qT + (d._$qT - c._$qT) * h), - (f = g._$qT + (y._$qT - g._$qT) * h), - (L = m._$qT + (T._$qT - m._$qT) * h), - (M = P._$qT + (S._$qT - P._$qT) * h), - (e._$Yr._$qT = - (1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)); - } else if (4 == o) { - var E = this._$Y0[n[0]], - A = this._$Y0[n[1]], - I = this._$Y0[n[2]], - w = this._$Y0[n[3]], - x = this._$Y0[n[4]], - O = this._$Y0[n[5]], - D = this._$Y0[n[6]], - R = this._$Y0[n[7]], - b = this._$Y0[n[8]], - F = this._$Y0[n[9]], - C = this._$Y0[n[10]], - N = this._$Y0[n[11]], - B = this._$Y0[n[12]], - U = this._$Y0[n[13]], - G = this._$Y0[n[14]], - Y = this._$Y0[n[15]], - h = s[0], - u = s[1], - v = s[2], - k = s[3], - p = E._$fL + (A._$fL - E._$fL) * h, - f = I._$fL + (w._$fL - I._$fL) * h, - L = x._$fL + (O._$fL - x._$fL) * h, - M = D._$fL + (R._$fL - D._$fL) * h, - V = b._$fL + (F._$fL - b._$fL) * h, - X = C._$fL + (N._$fL - C._$fL) * h, - H = B._$fL + (U._$fL - B._$fL) * h, - W = G._$fL + (Y._$fL - G._$fL) * h; - (e._$Yr._$fL = - (1 - k) * - ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + - k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), - (p = E._$gL + (A._$gL - E._$gL) * h), - (f = I._$gL + (w._$gL - I._$gL) * h), - (L = x._$gL + (O._$gL - x._$gL) * h), - (M = D._$gL + (R._$gL - D._$gL) * h), - (V = b._$gL + (F._$gL - b._$gL) * h), - (X = C._$gL + (N._$gL - C._$gL) * h), - (H = B._$gL + (U._$gL - B._$gL) * h), - (W = G._$gL + (Y._$gL - G._$gL) * h), - (e._$Yr._$gL = - (1 - k) * - ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + - k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), - (p = E._$B0 + (A._$B0 - E._$B0) * h), - (f = I._$B0 + (w._$B0 - I._$B0) * h), - (L = x._$B0 + (O._$B0 - x._$B0) * h), - (M = D._$B0 + (R._$B0 - D._$B0) * h), - (V = b._$B0 + (F._$B0 - b._$B0) * h), - (X = C._$B0 + (N._$B0 - C._$B0) * h), - (H = B._$B0 + (U._$B0 - B._$B0) * h), - (W = G._$B0 + (Y._$B0 - G._$B0) * h), - (e._$Yr._$B0 = - (1 - k) * - ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + - k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), - (p = E._$z0 + (A._$z0 - E._$z0) * h), - (f = I._$z0 + (w._$z0 - I._$z0) * h), - (L = x._$z0 + (O._$z0 - x._$z0) * h), - (M = D._$z0 + (R._$z0 - D._$z0) * h), - (V = b._$z0 + (F._$z0 - b._$z0) * h), - (X = C._$z0 + (N._$z0 - C._$z0) * h), - (H = B._$z0 + (U._$z0 - B._$z0) * h), - (W = G._$z0 + (Y._$z0 - G._$z0) * h), - (e._$Yr._$z0 = - (1 - k) * - ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + - k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))), - (p = E._$qT + (A._$qT - E._$qT) * h), - (f = I._$qT + (w._$qT - I._$qT) * h), - (L = x._$qT + (O._$qT - x._$qT) * h), - (M = D._$qT + (R._$qT - D._$qT) * h), - (V = b._$qT + (F._$qT - b._$qT) * h), - (X = C._$qT + (N._$qT - C._$qT) * h), - (H = B._$qT + (U._$qT - B._$qT) * h), - (W = G._$qT + (Y._$qT - G._$qT) * h), - (e._$Yr._$qT = - (1 - k) * - ((1 - v) * (p + (f - p) * u) + v * (L + (M - L) * u)) + - k * ((1 - v) * (V + (X - V) * u) + v * (H + (W - H) * u))); - } else { - for ( - var j = 0 | Math.pow(2, o), q = new Float32Array(j), J = 0; - J < j; - J++ - ) { - for (var Q = J, Z = 1, K = 0; K < o; K++) - (Z *= Q % 2 == 0 ? 1 - s[K] : s[K]), (Q /= 2); - q[J] = Z; - } - for (var tt = new Array(), it = 0; it < j; it++) - tt[it] = this._$Y0[n[it]]; - for ( - var et = 0, rt = 0, ot = 0, nt = 0, st = 0, it = 0; - it < j; - it++ - ) - (et += q[it] * tt[it]._$fL), - (rt += q[it] * tt[it]._$gL), - (ot += q[it] * tt[it]._$B0), - (nt += q[it] * tt[it]._$z0), - (st += q[it] * tt[it]._$qT); - (e._$Yr._$fL = et), - (e._$Yr._$gL = rt), - (e._$Yr._$B0 = ot), - (e._$Yr._$z0 = nt), - (e._$Yr._$qT = st); - } - var _ = this._$Y0[n[0]]; - (e._$Yr.reflectX = _.reflectX), (e._$Yr.reflectY = _.reflectY); - } - }), - (z.prototype._$2b = function (t, i) { - this != i._$GT() && console.log("### assert!! ### "); - var e = i; - if ((e._$hS(!0), this._$32())) { - var r = this.getTargetBaseDataID(); - if ( - (e._$8r == I._$ur && (e._$8r = t.getBaseDataIndex(r)), - e._$8r < 0) - ) - at._$so && _._$li("_$L _$0P _$G :: %s", r), e._$hS(!1); - else { - var o = t.getBaseData(e._$8r); - if (null != o) { - var n = t._$q2(e._$8r), - s = z._$Xo; - (s[0] = e._$Yr._$fL), (s[1] = e._$Yr._$gL); - var a = z._$io; - (a[0] = 0), (a[1] = -0.1); - n._$GT().getType() == I._$c2 ? (a[1] = -10) : (a[1] = -0.1); - var h = z._$0o; - this._$Jr(t, o, n, s, a, h); - var l = Lt._$92(a, h); - o._$nb(t, n, s, s, 1, 0, 2), - (e._$Wr._$fL = s[0]), - (e._$Wr._$gL = s[1]), - (e._$Wr._$B0 = e._$Yr._$B0), - (e._$Wr._$z0 = e._$Yr._$z0), - (e._$Wr._$qT = e._$Yr._$qT - l * Lt._$NS); - var $ = n.getTotalScale(); - e.setTotalScale_notForClient($ * e._$Wr._$B0); - var u = n.getTotalOpacity(); - e.setTotalOpacity(u * e.getInterpolatedOpacity()), - (e._$Wr.reflectX = e._$Yr.reflectX), - (e._$Wr.reflectY = e._$Yr.reflectY), - e._$hS(n._$yo()); - } else e._$hS(!1); - } - } else - e.setTotalScale_notForClient(e._$Yr._$B0), - e.setTotalOpacity(e.getInterpolatedOpacity()); - }), - (z.prototype._$nb = function (t, i, e, r, o, n, s) { - this != i._$GT() && console.log("### assert!! ### "); - for ( - var _, - a, - h = i, - l = null != h._$Wr ? h._$Wr : h._$Yr, - $ = Math.sin(Lt._$bS * l._$qT), - u = Math.cos(Lt._$bS * l._$qT), - p = h.getTotalScale(), - f = l.reflectX ? -1 : 1, - c = l.reflectY ? -1 : 1, - d = u * p * f, - g = -$ * p * c, - y = $ * p * f, - m = u * p * c, - T = l._$fL, - P = l._$gL, - S = o * s, - v = n; - v < S; - v += s - ) - (_ = e[v]), - (a = e[v + 1]), - (r[v] = d * _ + g * a + T), - (r[v + 1] = y * _ + m * a + P); - }), - (z.prototype._$Jr = function (t, i, e, r, o, n) { - i != e._$GT() && console.log("### assert!! ### "); - var s = z._$Lo; - (z._$Lo[0] = r[0]), (z._$Lo[1] = r[1]), i._$nb(t, e, s, s, 1, 0, 2); - for (var _ = z._$To, a = z._$Po, h = 1, l = 0; l < 10; l++) { - if ( - ((a[0] = r[0] + h * o[0]), - (a[1] = r[1] + h * o[1]), - i._$nb(t, e, a, _, 1, 0, 2), - (_[0] -= s[0]), - (_[1] -= s[1]), - 0 != _[0] || 0 != _[1]) - ) - return (n[0] = _[0]), void (n[1] = _[1]); - if ( - ((a[0] = r[0] - h * o[0]), - (a[1] = r[1] - h * o[1]), - i._$nb(t, e, a, _, 1, 0, 2), - (_[0] -= s[0]), - (_[1] -= s[1]), - 0 != _[0] || 0 != _[1]) - ) - return ( - (_[0] = -_[0]), - (_[0] = -_[0]), - (n[0] = _[0]), - void (n[1] = _[1]) - ); - h *= 0.1; - } - at._$so && console.log("_$L0 to transform _$SP\n"); - }), - (H.prototype = new _t()), - (W.prototype = new M()), - (W._$ur = -2), - (W._$ES = 500), - (W._$wb = 2), - (W._$8S = 3), - (W._$os = 4), - (W._$52 = W._$ES), - (W._$R2 = W._$ES), - (W._$Sb = function (t) { - for (var i = t.length - 1; i >= 0; --i) { - var e = t[i]; - e < W._$52 ? (W._$52 = e) : e > W._$R2 && (W._$R2 = e); - } - }), - (W._$or = function () { - return W._$52; - }), - (W._$Pr = function () { - return W._$R2; - }), - (W.prototype._$F0 = function (t) { - (this._$gP = t._$nP()), - (this._$dr = t._$nP()), - (this._$GS = t._$nP()), - (this._$qb = t._$6L()), - (this._$Lb = t._$cS()), - (this._$mS = t._$Tb()), - t.getFormatVersion() >= G._$T7 - ? ((this.clipID = t._$nP()), - (this.clipIDList = this.convertClipIDForV2_11(this.clipID))) - : (this.clipIDList = null), - W._$Sb(this._$Lb); - }), - (W.prototype.getClipIDList = function () { - return this.clipIDList; - }), - (W.prototype._$Nr = function (t, i) { - if ( - ((i._$IS[0] = !1), - (i._$Us = v._$Z2(t, this._$GS, i._$IS, this._$Lb)), - at._$Zs) - ); - else if (i._$IS[0]) return; - i._$7s = v._$br(t, this._$GS, i._$IS, this._$mS); - }), - (W.prototype._$2b = function (t) {}), - (W.prototype.getDrawDataID = function () { - return this._$gP; - }), - (W.prototype._$j2 = function (t) { - this._$gP = t; - }), - (W.prototype.getOpacity = function (t, i) { - return i._$7s; - }), - (W.prototype._$zS = function (t, i) { - return i._$Us; - }), - (W.prototype.getTargetBaseDataID = function () { - return this._$dr; - }), - (W.prototype._$gs = function (t) { - this._$dr = t; - }), - (W.prototype._$32 = function () { - return null != this._$dr && this._$dr != yt._$2o(); - }), - (W.prototype.getType = function () {}), - (j._$42 = 0), - (j.prototype._$1b = function () { - return this._$3S; - }), - (j.prototype.getDrawDataList = function () { - return this._$aS; - }), - (j.prototype._$F0 = function (t) { - (this._$NL = t._$nP()), - (this._$aS = t._$nP()), - (this._$3S = t._$nP()); - }), - (j.prototype._$kr = function (t) { - t._$Zo(this._$3S), - t._$xo(this._$aS), - (this._$3S = null), - (this._$aS = null); - }), - (q.prototype = new i()), - (q.loadModel = function (t) { - var e = new q(); - return i._$62(e, t), e; - }), - (q.loadModel = function (t) { - var e = new q(); - return i._$62(e, t), e; - }), - (q._$to = function () { - return new q(); - }), - (q._$er = function (t) { - var i = new _$5("../_$_r/_$t0/_$Ri/_$_P._$d"); - if (0 == i.exists()) - throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + i._$PL()); - for ( - var e = [ - "../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1", - ], - r = q.loadModel(i._$3b()), - o = 0; - o < e.length; - o++ - ) { - var n = new _$5(e[o]); - if (0 == n.exists()) - throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + n._$PL()); - r.setTexture(o, _$nL._$_o(t, n._$3b())); - } - return r; - }), - (q.prototype.setGL = function (t) { - this._$zo.setGL(t); - }), - (q.prototype.setTransform = function (t) { - this._$zo.setTransform(t); - }), - (q.prototype.draw = function () { - this._$5S.draw(this._$zo); - }), - (q.prototype._$K2 = function () { - this._$zo._$K2(); - }), - (q.prototype.setTexture = function (t, i) { - null == this._$zo && - _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), - this._$zo.setTexture(t, i); - }), - (q.prototype.setTexture = function (t, i) { - null == this._$zo && - _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), - this._$zo.setTexture(t, i); - }), - (q.prototype._$Rs = function () { - return this._$zo._$Rs(); - }), - (q.prototype._$Ds = function (t) { - this._$zo._$Ds(t); - }), - (q.prototype.getDrawParam = function () { - return this._$zo; - }), - (J.prototype = new s()), - (J._$cs = "VISIBLE:"), - (J._$ar = "LAYOUT:"), - (J.MTN_PREFIX_FADEIN = "FADEIN:"), - (J.MTN_PREFIX_FADEOUT = "FADEOUT:"), - (J._$Co = 0), - (J._$1T = 1), - (J.loadMotion = function (t) { - var i = k._$C(t); - return J.loadMotion(i); - }), - (J.loadMotion = function (t) { - t instanceof ArrayBuffer && (t = new DataView(t)); - var i = new J(), - e = [0], - r = t.byteLength; - i._$yT = 0; - for (var o = 0; o < r; ++o) { - var n = Q(t, o), - s = n.charCodeAt(0); - if ("\n" != n && "\r" != n) - if ("#" != n) - if ("$" != n) { - if ( - (97 <= s && s <= 122) || - (65 <= s && s <= 90) || - "_" == n - ) { - for ( - var _ = o, a = -1; - o < r && "\r" != (n = Q(t, o)) && "\n" != n; - ++o - ) - if ("=" == n) { - a = o; - break; - } - if (a >= 0) { - var h = new B(); - O.startsWith(t, _, J._$cs) - ? ((h._$RP = B._$hs), - (h._$4P = O.createString(t, _, a - _))) - : O.startsWith(t, _, J._$ar) - ? ((h._$4P = O.createString(t, _ + 7, a - _ - 7)), - O.startsWith(t, _ + 7, "ANCHOR_X") - ? (h._$RP = B._$xs) - : O.startsWith(t, _ + 7, "ANCHOR_Y") - ? (h._$RP = B._$us) - : O.startsWith(t, _ + 7, "SCALE_X") - ? (h._$RP = B._$qs) - : O.startsWith(t, _ + 7, "SCALE_Y") - ? (h._$RP = B._$Ys) - : O.startsWith(t, _ + 7, "X") - ? (h._$RP = B._$ws) - : O.startsWith(t, _ + 7, "Y") && - (h._$RP = B._$Ns)) - : ((h._$RP = B._$Fr), - (h._$4P = O.createString(t, _, a - _))), - i.motions.push(h); - var l = 0, - $ = []; - for ( - o = a + 1; - o < r && "\r" != (n = Q(t, o)) && "\n" != n; - ++o - ) - if ("," != n && " " != n && "\t" != n) { - var u = O._$LS(t, r, o, e); - if (e[0] > 0) { - $.push(u), l++; - var p = e[0]; - if (p < o) { - console.log( - "_$n0 _$hi . @Live2DMotion loadMotion()\n" - ); - break; - } - o = p - 1; - } - } - (h._$I0 = new Float32Array($)), - l > i._$yT && (i._$yT = l); - } - } - } else { - for ( - var _ = o, a = -1; - o < r && "\r" != (n = Q(t, o)) && "\n" != n; - ++o - ) - if ("=" == n) { - a = o; - break; - } - var f = !1; - if (a >= 0) - for ( - a == _ + 4 && - "f" == Q(t, _ + 1) && - "p" == Q(t, _ + 2) && - "s" == Q(t, _ + 3) && - (f = !0), - o = a + 1; - o < r && "\r" != (n = Q(t, o)) && "\n" != n; - ++o - ) - if ("," != n && " " != n && "\t" != n) { - var u = O._$LS(t, r, o, e); - e[0] > 0 && f && 5 < u && u < 121 && (i._$D0 = u), - (o = e[0]); - } - for (; o < r && "\n" != Q(t, o) && "\r" != Q(t, o); ++o); - } - else for (; o < r && "\n" != Q(t, o) && "\r" != Q(t, o); ++o); - } - return (i._$rr = ((1e3 * i._$yT) / i._$D0) | 0), i; - }), - (J.prototype.getDurationMSec = function () { - return this._$E ? -1 : this._$rr; - }), - (J.prototype.getLoopDurationMSec = function () { - return this._$rr; - }), - (J.prototype.dump = function () { - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t]; - console.log("_$wL[%s] [%d]. ", i._$4P, i._$I0.length); - for (var e = 0; e < i._$I0.length && e < 10; e++) - console.log("%5.2f ,", i._$I0[e]); - console.log("\n"); - } - }), - (J.prototype.updateParamExe = function (t, i, e, r) { - for ( - var o = i - r._$z2, - n = (o * this._$D0) / 1e3, - s = 0 | n, - _ = n - s, - a = 0; - a < this.motions.length; - a++ - ) { - var h = this.motions[a], - l = h._$I0.length, - $ = h._$4P; - if (h._$RP == B._$hs) { - var u = h._$I0[s >= l ? l - 1 : s]; - t.setParamFloat($, u); - } else if (B._$ws <= h._$RP && h._$RP <= B._$Ys); - else { - var p, - f = t.getParamIndex($), - c = t.getModelContext(), - d = c.getParamMax(f), - g = c.getParamMin(f), - y = 0.4 * (d - g), - m = c.getParamFloat(f), - T = h._$I0[s >= l ? l - 1 : s], - P = h._$I0[s + 1 >= l ? l - 1 : s + 1]; - p = - (T < P && P - T > y) || (T > P && T - P > y) - ? T - : T + (P - T) * _; - var S = m + (p - m) * e; - t.setParamFloat($, S); - } - } - s >= this._$yT && - (this._$E - ? ((r._$z2 = i), this.loopFadeIn && (r._$bs = i)) - : (r._$9L = !0)), - (this._$eP = e); - }), - (J.prototype._$r0 = function () { - return this._$E; - }), - (J.prototype._$aL = function (t) { - this._$E = t; - }), - (J.prototype._$S0 = function () { - return this._$D0; - }), - (J.prototype._$U0 = function (t) { - this._$D0 = t; - }), - (J.prototype.isLoopFadeIn = function () { - return this.loopFadeIn; - }), - (J.prototype.setLoopFadeIn = function (t) { - this.loopFadeIn = t; - }), - (N.prototype.clear = function () { - this.size = 0; - }), - (N.prototype.add = function (t) { - if (this._$P.length <= this.size) { - var i = new Float32Array(2 * this.size); - w._$jT(this._$P, 0, i, 0, this.size), (this._$P = i); - } - this._$P[this.size++] = t; - }), - (N.prototype._$BL = function () { - var t = new Float32Array(this.size); - return w._$jT(this._$P, 0, t, 0, this.size), t; - }), - (B._$Fr = 0), - (B._$hs = 1), - (B._$ws = 100), - (B._$Ns = 101), - (B._$xs = 102), - (B._$us = 103), - (B._$qs = 104), - (B._$Ys = 105), - (Z.prototype = new I()), - (Z._$gT = new Array()), - (Z.prototype._$zP = function () { - (this._$GS = new D()), this._$GS._$zP(); - }), - (Z.prototype._$F0 = function (t) { - I.prototype._$F0.call(this, t), - (this._$A = t._$6L()), - (this._$o = t._$6L()), - (this._$GS = t._$nP()), - (this._$Eo = t._$nP()), - I.prototype.readV2_opacity.call(this, t); - }), - (Z.prototype.init = function (t) { - var i = new K(this), - e = (this._$o + 1) * (this._$A + 1); - return ( - null != i._$Cr && (i._$Cr = null), - (i._$Cr = new Float32Array(2 * e)), - null != i._$hr && (i._$hr = null), - this._$32() - ? (i._$hr = new Float32Array(2 * e)) - : (i._$hr = null), - i - ); - }), - (Z.prototype._$Nr = function (t, i) { - var e = i; - if (this._$GS._$Ur(t)) { - var r = this._$VT(), - o = Z._$gT; - (o[0] = !1), - v._$Vr(t, this._$GS, o, r, this._$Eo, e._$Cr, 0, 2), - i._$Ib(o[0]), - this.interpolateOpacity(t, this._$GS, i, o); - } - }), - (Z.prototype._$2b = function (t, i) { - var e = i; - if ((e._$hS(!0), this._$32())) { - var r = this.getTargetBaseDataID(); - if ( - (e._$8r == I._$ur && (e._$8r = t.getBaseDataIndex(r)), - e._$8r < 0) - ) - at._$so && _._$li("_$L _$0P _$G :: %s", r), e._$hS(!1); - else { - var o = t.getBaseData(e._$8r), - n = t._$q2(e._$8r); - if (null != o && n._$yo()) { - var s = n.getTotalScale(); - e.setTotalScale_notForClient(s); - var a = n.getTotalOpacity(); - e.setTotalOpacity(a * e.getInterpolatedOpacity()), - o._$nb(t, n, e._$Cr, e._$hr, this._$VT(), 0, 2), - e._$hS(!0); - } else e._$hS(!1); - } - } else e.setTotalOpacity(e.getInterpolatedOpacity()); - }), - (Z.prototype._$nb = function (t, i, e, r, o, n, s) { - var _ = i, - a = null != _._$hr ? _._$hr : _._$Cr; - Z.transformPoints_sdk2(e, r, o, n, s, a, this._$o, this._$A); - }), - (Z.transformPoints_sdk2 = function (i, e, r, o, n, s, _, a) { - for ( - var h, - l, - $, - u = r * n, - p = 0, - f = 0, - c = 0, - d = 0, - g = 0, - y = 0, - m = !1, - T = o; - T < u; - T += n - ) { - var P, S, v, L; - if ( - ((v = i[T]), - (L = i[T + 1]), - (P = v * _), - (S = L * a), - P < 0 || S < 0 || _ <= P || a <= S) - ) { - var M = _ + 1; - if (!m) { - (m = !0), - (p = - 0.25 * - (s[2 * (0 + 0 * M)] + - s[2 * (_ + 0 * M)] + - s[2 * (0 + a * M)] + - s[2 * (_ + a * M)])), - (f = - 0.25 * - (s[2 * (0 + 0 * M) + 1] + - s[2 * (_ + 0 * M) + 1] + - s[2 * (0 + a * M) + 1] + - s[2 * (_ + a * M) + 1])); - var E = s[2 * (_ + a * M)] - s[2 * (0 + 0 * M)], - A = s[2 * (_ + a * M) + 1] - s[2 * (0 + 0 * M) + 1], - I = s[2 * (_ + 0 * M)] - s[2 * (0 + a * M)], - w = s[2 * (_ + 0 * M) + 1] - s[2 * (0 + a * M) + 1]; - (c = 0.5 * (E + I)), - (d = 0.5 * (A + w)), - (g = 0.5 * (E - I)), - (y = 0.5 * (A - w)), - (p -= 0.5 * (c + g)), - (f -= 0.5 * (d + y)); - } - if (-2 < v && v < 3 && -2 < L && L < 3) - if (v <= 0) - if (L <= 0) { - var x = s[2 * (0 + 0 * M)], - O = s[2 * (0 + 0 * M) + 1], - D = p - 2 * c, - R = f - 2 * d, - b = p - 2 * g, - F = f - 2 * y, - C = p - 2 * c - 2 * g, - N = f - 2 * d - 2 * y, - B = 0.5 * (v - -2), - U = 0.5 * (L - -2); - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else if (L >= 1) { - var b = s[2 * (0 + a * M)], - F = s[2 * (0 + a * M) + 1], - C = p - 2 * c + 1 * g, - N = f - 2 * d + 1 * y, - x = p + 3 * g, - O = f + 3 * y, - D = p - 2 * c + 3 * g, - R = f - 2 * d + 3 * y, - B = 0.5 * (v - -2), - U = 0.5 * (L - 1); - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else { - var G = 0 | S; - G == a && (G = a - 1); - var B = 0.5 * (v - -2), - U = S - G, - Y = G / a, - k = (G + 1) / a, - b = s[2 * (0 + G * M)], - F = s[2 * (0 + G * M) + 1], - x = s[2 * (0 + (G + 1) * M)], - O = s[2 * (0 + (G + 1) * M) + 1], - C = p - 2 * c + Y * g, - N = f - 2 * d + Y * y, - D = p - 2 * c + k * g, - R = f - 2 * d + k * y; - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } - else if (1 <= v) - if (L <= 0) { - var D = s[2 * (_ + 0 * M)], - R = s[2 * (_ + 0 * M) + 1], - x = p + 3 * c, - O = f + 3 * d, - C = p + 1 * c - 2 * g, - N = f + 1 * d - 2 * y, - b = p + 3 * c - 2 * g, - F = f + 3 * d - 2 * y, - B = 0.5 * (v - 1), - U = 0.5 * (L - -2); - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else if (L >= 1) { - var C = s[2 * (_ + a * M)], - N = s[2 * (_ + a * M) + 1], - b = p + 3 * c + 1 * g, - F = f + 3 * d + 1 * y, - D = p + 1 * c + 3 * g, - R = f + 1 * d + 3 * y, - x = p + 3 * c + 3 * g, - O = f + 3 * d + 3 * y, - B = 0.5 * (v - 1), - U = 0.5 * (L - 1); - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else { - var G = 0 | S; - G == a && (G = a - 1); - var B = 0.5 * (v - 1), - U = S - G, - Y = G / a, - k = (G + 1) / a, - C = s[2 * (_ + G * M)], - N = s[2 * (_ + G * M) + 1], - D = s[2 * (_ + (G + 1) * M)], - R = s[2 * (_ + (G + 1) * M) + 1], - b = p + 3 * c + Y * g, - F = f + 3 * d + Y * y, - x = p + 3 * c + k * g, - O = f + 3 * d + k * y; - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = - O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } - else if (L <= 0) { - var V = 0 | P; - V == _ && (V = _ - 1); - var B = P - V, - U = 0.5 * (L - -2), - X = V / _, - z = (V + 1) / _, - D = s[2 * (V + 0 * M)], - R = s[2 * (V + 0 * M) + 1], - x = s[2 * (V + 1 + 0 * M)], - O = s[2 * (V + 1 + 0 * M) + 1], - C = p + X * c - 2 * g, - N = f + X * d - 2 * y, - b = p + z * c - 2 * g, - F = f + z * d - 2 * y; - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else if (L >= 1) { - var V = 0 | P; - V == _ && (V = _ - 1); - var B = P - V, - U = 0.5 * (L - 1), - X = V / _, - z = (V + 1) / _, - C = s[2 * (V + a * M)], - N = s[2 * (V + a * M) + 1], - b = s[2 * (V + 1 + a * M)], - F = s[2 * (V + 1 + a * M) + 1], - D = p + X * c + 3 * g, - R = f + X * d + 3 * y, - x = p + z * c + 3 * g, - O = f + z * d + 3 * y; - B + U <= 1 - ? ((e[T] = C + (b - C) * B + (D - C) * U), - (e[T + 1] = N + (F - N) * B + (R - N) * U)) - : ((e[T] = x + (D - x) * (1 - B) + (b - x) * (1 - U)), - (e[T + 1] = O + (R - O) * (1 - B) + (F - O) * (1 - U))); - } else - t.err.printf( - "_$li calc : %.4f , %.4f\t\t\t\t\t@@BDBoxGrid\n", - v, - L - ); - else (e[T] = p + v * c + L * g), (e[T + 1] = f + v * d + L * y); - } else - (l = P - (0 | P)), - ($ = S - (0 | S)), - (h = 2 * ((0 | P) + (0 | S) * (_ + 1))), - l + $ < 1 - ? ((e[T] = - s[h] * (1 - l - $) + - s[h + 2] * l + - s[h + 2 * (_ + 1)] * $), - (e[T + 1] = - s[h + 1] * (1 - l - $) + - s[h + 3] * l + - s[h + 2 * (_ + 1) + 1] * $)) - : ((e[T] = - s[h + 2 * (_ + 1) + 2] * (l - 1 + $) + - s[h + 2 * (_ + 1)] * (1 - l) + - s[h + 2] * (1 - $)), - (e[T + 1] = - s[h + 2 * (_ + 1) + 3] * (l - 1 + $) + - s[h + 2 * (_ + 1) + 1] * (1 - l) + - s[h + 3] * (1 - $))); - } - }), - (Z.prototype.transformPoints_sdk1 = function (t, i, e, r, o, n, s) { - for ( - var _, - a, - h, - l, - $, - u, - p, - f = i, - c = this._$o, - d = this._$A, - g = o * s, - y = null != f._$hr ? f._$hr : f._$Cr, - m = n; - m < g; - m += s - ) - at._$ts - ? ((_ = e[m]), - (a = e[m + 1]), - _ < 0 ? (_ = 0) : _ > 1 && (_ = 1), - a < 0 ? (a = 0) : a > 1 && (a = 1), - (_ *= c), - (a *= d), - (h = 0 | _), - (l = 0 | a), - h > c - 1 && (h = c - 1), - l > d - 1 && (l = d - 1), - (u = _ - h), - (p = a - l), - ($ = 2 * (h + l * (c + 1)))) - : ((_ = e[m] * c), - (a = e[m + 1] * d), - (u = _ - (0 | _)), - (p = a - (0 | a)), - ($ = 2 * ((0 | _) + (0 | a) * (c + 1)))), - u + p < 1 - ? ((r[m] = - y[$] * (1 - u - p) + - y[$ + 2] * u + - y[$ + 2 * (c + 1)] * p), - (r[m + 1] = - y[$ + 1] * (1 - u - p) + - y[$ + 3] * u + - y[$ + 2 * (c + 1) + 1] * p)) - : ((r[m] = - y[$ + 2 * (c + 1) + 2] * (u - 1 + p) + - y[$ + 2 * (c + 1)] * (1 - u) + - y[$ + 2] * (1 - p)), - (r[m + 1] = - y[$ + 2 * (c + 1) + 3] * (u - 1 + p) + - y[$ + 2 * (c + 1) + 1] * (1 - u) + - y[$ + 3] * (1 - p))); - }), - (Z.prototype._$VT = function () { - return (this._$o + 1) * (this._$A + 1); - }), - (Z.prototype.getType = function () { - return I._$_b; - }), - (K.prototype = new _t()), - (tt._$42 = 0), - (tt.prototype._$zP = function () { - (this._$3S = new Array()), (this._$aS = new Array()); - }), - (tt.prototype._$F0 = function (t) { - (this._$g0 = t._$8L()), - (this.visible = t._$8L()), - (this._$NL = t._$nP()), - (this._$3S = t._$nP()), - (this._$aS = t._$nP()); - }), - (tt.prototype.init = function (t) { - var i = new it(this); - return i.setPartsOpacity(this.isVisible() ? 1 : 0), i; - }), - (tt.prototype._$6o = function (t) { - if (null == this._$3S) throw new Error("_$3S _$6 _$Wo@_$6o"); - this._$3S.push(t); - }), - (tt.prototype._$3o = function (t) { - if (null == this._$aS) throw new Error("_$aS _$6 _$Wo@_$3o"); - this._$aS.push(t); - }), - (tt.prototype._$Zo = function (t) { - this._$3S = t; - }), - (tt.prototype._$xo = function (t) { - this._$aS = t; - }), - (tt.prototype.isVisible = function () { - return this.visible; - }), - (tt.prototype._$uL = function () { - return this._$g0; - }), - (tt.prototype._$KP = function (t) { - this.visible = t; - }), - (tt.prototype._$ET = function (t) { - this._$g0 = t; - }), - (tt.prototype.getBaseData = function () { - return this._$3S; - }), - (tt.prototype.getDrawData = function () { - return this._$aS; - }), - (tt.prototype._$p2 = function () { - return this._$NL; - }), - (tt.prototype._$ob = function (t) { - this._$NL = t; - }), - (tt.prototype.getPartsID = function () { - return this._$NL; - }), - (tt.prototype._$MP = function (t) { - this._$NL = t; - }), - (it.prototype = new $()), - (it.prototype.getPartsOpacity = function () { - return this._$VS; - }), - (it.prototype.setPartsOpacity = function (t) { - this._$VS = t; - }), - (et._$L7 = function () { - u._$27(), yt._$27(), b._$27(), l._$27(); - }), - (et.prototype.toString = function () { - return this.id; - }), - (rt.prototype._$F0 = function (t) {}), - (ot.prototype._$1s = function () { - return this._$4S; - }), - (ot.prototype._$zP = function () { - this._$4S = new Array(); - }), - (ot.prototype._$F0 = function (t) { - this._$4S = t._$nP(); - }), - (ot.prototype._$Ks = function (t) { - this._$4S.push(t); - }), - (nt.tr = new gt()), - (nt._$50 = new gt()), - (nt._$Ti = new Array(0, 0)), - (nt._$Pi = new Array(0, 0)), - (nt._$B = new Array(0, 0)), - (nt.prototype._$lP = function (t, i, e, r) { - this.viewport = new Array(t, i, e, r); - }), - (nt.prototype._$bL = function () { - this.context.save(); - var t = this.viewport; - null != t && - (this.context.beginPath(), - this.context._$Li(t[0], t[1], t[2], t[3]), - this.context.clip()); - }), - (nt.prototype._$ei = function () { - this.context.restore(); - }), - (nt.prototype.drawElements = function (t, i, e, r, o, n, s, a) { - try { - o != this._$Qo && - ((this._$Qo = o), (this.context.globalAlpha = o)); - for ( - var h = i.length, - l = t.width, - $ = t.height, - u = this.context, - p = this._$xP, - f = this._$uP, - c = this._$6r, - d = this._$3r, - g = nt.tr, - y = nt._$Ti, - m = nt._$Pi, - T = nt._$B, - P = 0; - P < h; - P += 3 - ) { - u.save(); - var S = i[P], - v = i[P + 1], - L = i[P + 2], - M = p + c * e[2 * S], - E = f + d * e[2 * S + 1], - A = p + c * e[2 * v], - I = f + d * e[2 * v + 1], - w = p + c * e[2 * L], - x = f + d * e[2 * L + 1]; - s && - (s._$PS(M, E, T), - (M = T[0]), - (E = T[1]), - s._$PS(A, I, T), - (A = T[0]), - (I = T[1]), - s._$PS(w, x, T), - (w = T[0]), - (x = T[1])); - var O = l * r[2 * S], - D = $ - $ * r[2 * S + 1], - R = l * r[2 * v], - b = $ - $ * r[2 * v + 1], - F = l * r[2 * L], - C = $ - $ * r[2 * L + 1], - N = Math.atan2(b - D, R - O), - B = Math.atan2(I - E, A - M), - U = A - M, - G = I - E, - Y = Math.sqrt(U * U + G * G), - k = R - O, - V = b - D, - X = Math.sqrt(k * k + V * V), - z = Y / X; - It._$ni(F, C, O, D, R - O, b - D, -(b - D), R - O, y), - It._$ni(w, x, M, E, A - M, I - E, -(I - E), A - M, m); - var H = (m[0] - y[0]) / y[1], - W = Math.min(O, R, F), - j = Math.max(O, R, F), - q = Math.min(D, b, C), - J = Math.max(D, b, C), - Q = Math.floor(W), - Z = Math.floor(q), - K = Math.ceil(j), - tt = Math.ceil(J); - g.identity(), - g.translate(M, E), - g.rotate(B), - g.scale(1, m[1] / y[1]), - g.shear(H, 0), - g.scale(z, z), - g.rotate(-N), - g.translate(-O, -D), - g.setContext(u); - if ( - (n || (n = 1.2), - at.IGNORE_EXPAND && (n = 0), - at.USE_CACHED_POLYGON_IMAGE) - ) { - var it = a._$e0; - if ( - ((it.gl_cacheImage = it.gl_cacheImage || {}), - !it.gl_cacheImage[P]) - ) { - var et = nt.createCanvas(K - Q, tt - Z); - (at.DEBUG_DATA.LDGL_CANVAS_MB = - at.DEBUG_DATA.LDGL_CANVAS_MB || 0), - (at.DEBUG_DATA.LDGL_CANVAS_MB += (K - Q) * (tt - Z) * 4); - var rt = et.getContext("2d"); - rt.translate(-Q, -Z), - nt.clip(rt, g, n, Y, O, D, R, b, F, C, M, E, A, I, w, x), - rt.drawImage(t, 0, 0), - (it.gl_cacheImage[P] = { - cacheCanvas: et, - cacheContext: rt, - }); - } - u.drawImage(it.gl_cacheImage[P].cacheCanvas, Q, Z); - } else - at.IGNORE_CLIP || - nt.clip(u, g, n, Y, O, D, R, b, F, C, M, E, A, I, w, x), - at.USE_ADJUST_TRANSLATION && - ((W = 0), (j = l), (q = 0), (J = $)), - u.drawImage(t, W, q, j - W, J - q, W, q, j - W, J - q); - u.restore(); - } - } catch (t) { - _._$Rb(t); - } - }), - (nt.clip = function (t, i, e, r, o, n, s, _, a, h, l, $, u, p, f, c) { - e > 0.02 - ? nt.expandClip(t, i, e, r, l, $, u, p, f, c) - : nt.clipWithTransform(t, null, o, n, s, _, a, h); - }), - (nt.expandClip = function (t, i, e, r, o, n, s, _, a, h) { - var l = s - o, - $ = _ - n, - u = a - o, - p = h - n, - f = l * p - $ * u > 0 ? e : -e, - c = -$, - d = l, - g = a - s, - y = h - _, - m = -y, - T = g, - P = Math.sqrt(g * g + y * y), - S = -p, - v = u, - L = Math.sqrt(u * u + p * p), - M = o - (f * c) / r, - E = n - (f * d) / r, - A = s - (f * c) / r, - I = _ - (f * d) / r, - w = s - (f * m) / P, - x = _ - (f * T) / P, - O = a - (f * m) / P, - D = h - (f * T) / P, - R = o + (f * S) / L, - b = n + (f * v) / L, - F = a + (f * S) / L, - C = h + (f * v) / L, - N = nt._$50; - return ( - null != i._$P2(N) && - (nt.clipWithTransform(t, N, M, E, A, I, w, x, O, D, F, C, R, b), - !0) - ); - }), - (nt.clipWithTransform = function (t, i, e, r, o, n, s, a) { - if (arguments.length < 7) return void _._$li("err : @LDGL.clip()"); - if (!(arguments[1] instanceof gt)) - return void _._$li("err : a[0] is _$6 LDTransform @LDGL.clip()"); - var h = nt._$B, - l = i, - $ = arguments; - if ((t.beginPath(), l)) { - l._$PS($[2], $[3], h), t.moveTo(h[0], h[1]); - for (var u = 4; u < $.length; u += 2) - l._$PS($[u], $[u + 1], h), t.lineTo(h[0], h[1]); - } else { - t.moveTo($[2], $[3]); - for (var u = 4; u < $.length; u += 2) t.lineTo($[u], $[u + 1]); - } - t.clip(); - }), - (nt.createCanvas = function (t, i) { - var e = document.createElement("canvas"); - return ( - e.setAttribute("width", t), - e.setAttribute("height", i), - e || _._$li("err : " + e), - e - ); - }), - (nt.dumpValues = function () { - for (var t = "", i = 0; i < arguments.length; i++) - t += "[" + i + "]= " + arguments[i].toFixed(3) + " , "; - console.log(t); - }), - (st.prototype._$F0 = function (t) { - (this._$TT = t._$_T()), - (this._$LT = t._$_T()), - (this._$FS = t._$_T()), - (this._$wL = t._$nP()); - }), - (st.prototype.getMinValue = function () { - return this._$TT; - }), - (st.prototype.getMaxValue = function () { - return this._$LT; - }), - (st.prototype.getDefaultValue = function () { - return this._$FS; - }), - (st.prototype.getParamID = function () { - return this._$wL; - }), - (_t.prototype._$yo = function () { - return this._$AT && !this._$JS; - }), - (_t.prototype._$hS = function (t) { - this._$AT = t; - }), - (_t.prototype._$GT = function () { - return this._$e0; - }), - (_t.prototype._$l2 = function (t) { - this._$IP = t; - }), - (_t.prototype.getPartsIndex = function () { - return this._$IP; - }), - (_t.prototype._$x2 = function () { - return this._$JS; - }), - (_t.prototype._$Ib = function (t) { - this._$JS = t; - }), - (_t.prototype.getTotalScale = function () { - return this.totalScale; - }), - (_t.prototype.setTotalScale_notForClient = function (t) { - this.totalScale = t; - }), - (_t.prototype.getInterpolatedOpacity = function () { - return this._$7s; - }), - (_t.prototype.setInterpolatedOpacity = function (t) { - this._$7s = t; - }), - (_t.prototype.getTotalOpacity = function (t) { - return this.totalOpacity; - }), - (_t.prototype.setTotalOpacity = function (t) { - this.totalOpacity = t; - }), - (at._$2s = "2.1.00_1"), - (at._$Kr = 201001e3), - (at._$sP = !0), - (at._$so = !0), - (at._$cb = !1), - (at._$3T = !0), - (at._$Ts = !0), - (at._$fb = !0), - (at._$ts = !0), - (at.L2D_DEFORMER_EXTEND = !0), - (at._$Wb = !1); - (at._$yr = !1), - (at._$Zs = !1), - (at.L2D_NO_ERROR = 0), - (at._$i7 = 1e3), - (at._$9s = 1001), - (at._$es = 1100), - (at._$r7 = 2e3), - (at._$07 = 2001), - (at._$b7 = 2002), - (at._$H7 = 4e3), - (at.L2D_COLOR_BLEND_MODE_MULT = 0), - (at.L2D_COLOR_BLEND_MODE_ADD = 1), - (at.L2D_COLOR_BLEND_MODE_INTERPOLATE = 2), - (at._$6b = !0), - (at._$cT = 0), - (at.clippingMaskBufferSize = 256), - (at.glContext = new Array()), - (at.frameBuffers = new Array()), - (at.fTexture = new Array()), - (at.IGNORE_CLIP = !1), - (at.IGNORE_EXPAND = !1), - (at.EXPAND_W = 2), - (at.USE_ADJUST_TRANSLATION = !0), - (at.USE_CANVAS_TRANSFORM = !0), - (at.USE_CACHED_POLYGON_IMAGE = !1), - (at.DEBUG_DATA = {}), - (at.PROFILE_IOS_SPEED = { - PROFILE_NAME: "iOS Speed", - USE_ADJUST_TRANSLATION: !0, - USE_CACHED_POLYGON_IMAGE: !0, - EXPAND_W: 4, - }), - (at.PROFILE_IOS_QUALITY = { - PROFILE_NAME: "iOS HiQ", - USE_ADJUST_TRANSLATION: !0, - USE_CACHED_POLYGON_IMAGE: !1, - EXPAND_W: 2, - }), - (at.PROFILE_IOS_DEFAULT = at.PROFILE_IOS_QUALITY), - (at.PROFILE_ANDROID = { - PROFILE_NAME: "Android", - USE_ADJUST_TRANSLATION: !1, - USE_CACHED_POLYGON_IMAGE: !1, - EXPAND_W: 2, - }), - (at.PROFILE_DESKTOP = { - PROFILE_NAME: "Desktop", - USE_ADJUST_TRANSLATION: !1, - USE_CACHED_POLYGON_IMAGE: !1, - EXPAND_W: 2, - }), - (at.initProfile = function () { - Et.isIOS() - ? at.setupProfile(at.PROFILE_IOS_DEFAULT) - : Et.isAndroid() - ? at.setupProfile(at.PROFILE_ANDROID) - : at.setupProfile(at.PROFILE_DESKTOP); - }), - (at.setupProfile = function (t, i) { - if ("number" == typeof t) - switch (t) { - case 9901: - t = at.PROFILE_IOS_SPEED; - break; - case 9902: - t = at.PROFILE_IOS_QUALITY; - break; - case 9903: - t = at.PROFILE_IOS_DEFAULT; - break; - case 9904: - t = at.PROFILE_ANDROID; - break; - case 9905: - t = at.PROFILE_DESKTOP; - break; - default: - alert("profile _$6 _$Ui : " + t); - } - arguments.length < 2 && (i = !0), - i && console.log("profile : " + t.PROFILE_NAME); - for (var e in t) - (at[e] = t[e]), i && console.log(" [" + e + "] = " + t[e]); - }), - (at.init = function () { - if (at._$6b) { - console.log("Live2D %s", at._$2s), (at._$6b = !1); - !0, at.initProfile(); - } - }), - (at.getVersionStr = function () { - return at._$2s; - }), - (at.getVersionNo = function () { - return at._$Kr; - }), - (at._$sT = function (t) { - at._$cT = t; - }), - (at.getError = function () { - var t = at._$cT; - return (at._$cT = 0), t; - }), - (at.dispose = function () { - (at.glContext = []), (at.frameBuffers = []), (at.fTexture = []); - }), - (at.setGL = function (t, i) { - var e = i || 0; - at.glContext[e] = t; - }), - (at.getGL = function (t) { - return at.glContext[t]; - }), - (at.setClippingMaskBufferSize = function (t) { - at.clippingMaskBufferSize = t; - }), - (at.getClippingMaskBufferSize = function () { - return at.clippingMaskBufferSize; - }), - (at.deleteBuffer = function (t) { - at.getGL(t).deleteFramebuffer(at.frameBuffers[t].framebuffer), - delete at.frameBuffers[t], - delete at.glContext[t]; - }), - (ht._$r2 = function (t) { - return t < 0 ? 0 : t > 1 ? 1 : 0.5 - 0.5 * Math.cos(t * Lt.PI_F); - }), - (lt._$fr = -1), - (lt.prototype.toString = function () { - return this._$ib; - }), - ($t.prototype = new W()), - ($t._$42 = 0), - ($t._$Os = 30), - ($t._$ms = 0), - ($t._$ns = 1), - ($t._$_s = 2), - ($t._$gT = new Array()), - ($t.prototype._$_S = function (t) { - this._$LP = t; - }), - ($t.prototype.getTextureNo = function () { - return this._$LP; - }), - ($t.prototype._$ZL = function () { - return this._$Qi; - }), - ($t.prototype._$H2 = function () { - return this._$JP; - }), - ($t.prototype.getNumPoints = function () { - return this._$d0; - }), - ($t.prototype.getType = function () { - return W._$wb; - }), - ($t.prototype._$B2 = function (t, i, e) { - var r = i, - o = null != r._$hr ? r._$hr : r._$Cr; - switch (U._$do) { - default: - case U._$Ms: - throw new Error("_$L _$ro "); - case U._$Qs: - for (var n = this._$d0 - 1; n >= 0; --n) o[n * U._$No + 4] = e; - } - }), - ($t.prototype._$zP = function () { - (this._$GS = new D()), this._$GS._$zP(); - }), - ($t.prototype._$F0 = function (t) { - W.prototype._$F0.call(this, t), - (this._$LP = t._$6L()), - (this._$d0 = t._$6L()), - (this._$Yo = t._$6L()); - var i = t._$nP(); - this._$BP = new Int16Array(3 * this._$Yo); - for (var e = 3 * this._$Yo - 1; e >= 0; --e) this._$BP[e] = i[e]; - if ( - ((this._$Eo = t._$nP()), - (this._$Qi = t._$nP()), - t.getFormatVersion() >= G._$s7) - ) { - if (((this._$JP = t._$6L()), 0 != this._$JP)) { - if (0 != (1 & this._$JP)) { - var r = t._$6L(); - null == this._$5P && (this._$5P = new Object()), - (this._$5P._$Hb = parseInt(r)); - } - 0 != (this._$JP & $t._$Os) - ? (this._$6s = (this._$JP & $t._$Os) >> 1) - : (this._$6s = $t._$ms), - 0 != (32 & this._$JP) && (this.culling = !1); - } - } else this._$JP = 0; - }), - ($t.prototype.init = function (t) { - var i = new ut(this), - e = this._$d0 * U._$No, - r = this._$32(); - switch ( - (null != i._$Cr && (i._$Cr = null), - (i._$Cr = new Float32Array(e)), - null != i._$hr && (i._$hr = null), - (i._$hr = r ? new Float32Array(e) : null), - U._$do) - ) { - default: - case U._$Ms: - if (U._$Ls) - for (var o = this._$d0 - 1; o >= 0; --o) { - var n = o << 1; - this._$Qi[n + 1] = 1 - this._$Qi[n + 1]; - } - break; - case U._$Qs: - for (var o = this._$d0 - 1; o >= 0; --o) { - var n = o << 1, - s = o * U._$No, - _ = this._$Qi[n], - a = this._$Qi[n + 1]; - (i._$Cr[s] = _), - (i._$Cr[s + 1] = a), - (i._$Cr[s + 4] = 0), - r && - ((i._$hr[s] = _), - (i._$hr[s + 1] = a), - (i._$hr[s + 4] = 0)); - } - } - return i; - }), - ($t.prototype._$Nr = function (t, i) { - var e = i; - if ( - (this != e._$GT() && console.log("### assert!! ### "), - this._$GS._$Ur(t) && - (W.prototype._$Nr.call(this, t, e), !e._$IS[0])) - ) { - var r = $t._$gT; - (r[0] = !1), - v._$Vr( - t, - this._$GS, - r, - this._$d0, - this._$Eo, - e._$Cr, - U._$i2, - U._$No - ); - } - }), - ($t.prototype._$2b = function (t, i) { - try { - this != i._$GT() && console.log("### assert!! ### "); - var e = !1; - i._$IS[0] && (e = !0); - var r = i; - if (!e && (W.prototype._$2b.call(this, t), this._$32())) { - var o = this.getTargetBaseDataID(); - if ( - (r._$8r == W._$ur && (r._$8r = t.getBaseDataIndex(o)), - r._$8r < 0) - ) - at._$so && _._$li("_$L _$0P _$G :: %s", o); - else { - var n = t.getBaseData(r._$8r), - s = t._$q2(r._$8r); - null == n || s._$x2() - ? (r._$AT = !1) - : (n._$nb(t, s, r._$Cr, r._$hr, this._$d0, U._$i2, U._$No), - (r._$AT = !0)), - (r.baseOpacity = s.getTotalOpacity()); - } - } - } catch (t) { - throw t; - } - }), - ($t.prototype.draw = function (t, i, e) { - if ( - (this != e._$GT() && console.log("### assert!! ### "), !e._$IS[0]) - ) { - var r = e, - o = this._$LP; - o < 0 && (o = 1); - var n = this.getOpacity(i, r) * e._$VS * e.baseOpacity, - s = null != r._$hr ? r._$hr : r._$Cr; - t.setClipBufPre_clipContextForDraw(e.clipBufPre_clipContext), - t._$WP(this.culling), - t._$Uo( - o, - 3 * this._$Yo, - this._$BP, - s, - this._$Qi, - n, - this._$6s, - r - ); - } - }), - ($t.prototype.dump = function () { - console.log( - " _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n", - this._$LP, - this._$d0, - this._$Yo - ), - console.log(" _$Oi _$di = { "); - for (var t = 0; t < this._$BP.length; t++) - console.log("%5d ,", this._$BP[t]); - console.log("\n _$5i _$30"); - for (var t = 0; t < this._$Eo.length; t++) { - console.log("\n _$30[%d] = ", t); - for (var i = this._$Eo[t], e = 0; e < i.length; e++) - console.log("%6.2f, ", i[e]); - } - console.log("\n"); - }), - ($t.prototype._$72 = function (t) { - return null == this._$5P ? null : this._$5P[t]; - }), - ($t.prototype.getIndexArray = function () { - return this._$BP; - }), - (ut.prototype = new Mt()), - (ut.prototype.getTransformedPoints = function () { - return null != this._$hr ? this._$hr : this._$Cr; - }), - (pt.prototype._$HT = function (t) { - (this.x = t.x), (this.y = t.y); - }), - (pt.prototype._$HT = function (t, i) { - (this.x = t), (this.y = i); - }), - (ft.prototype = new i()), - (ft.loadModel = function (t) { - var e = new ft(); - return i._$62(e, t), e; - }), - (ft.loadModel = function (t, e) { - var r = e || 0, - o = new ft(r); - return i._$62(o, t), o; - }), - (ft._$to = function () { - return new ft(); - }), - (ft._$er = function (t) { - var i = new _$5("../_$_r/_$t0/_$Ri/_$_P._$d"); - if (0 == i.exists()) - throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + i._$PL()); - for ( - var e = [ - "../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1", - "../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1", - ], - r = ft.loadModel(i._$3b()), - o = 0; - o < e.length; - o++ - ) { - var n = new _$5(e[o]); - if (0 == n.exists()) - throw new _$ls("_$t0 _$_ _$6 _$Ui :: " + n._$PL()); - r.setTexture(o, _$nL._$_o(t, n._$3b())); - } - return r; - }), - (ft.prototype.setGL = function (t) { - at.setGL(t); - }), - (ft.prototype.setTransform = function (t) { - this.drawParamWebGL.setTransform(t); - }), - (ft.prototype.update = function () { - this._$5S.update(), this._$5S.preDraw(this.drawParamWebGL); - }), - (ft.prototype.draw = function () { - this._$5S.draw(this.drawParamWebGL); - }), - (ft.prototype._$K2 = function () { - this.drawParamWebGL._$K2(); - }), - (ft.prototype.setTexture = function (t, i) { - null == this.drawParamWebGL && - _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), - this.drawParamWebGL.setTexture(t, i); - }), - (ft.prototype.setTexture = function (t, i) { - null == this.drawParamWebGL && - _._$li("_$Yi for QT _$ki / _$XS() is _$6 _$ui!!"), - this.drawParamWebGL.setTexture(t, i); - }), - (ft.prototype._$Rs = function () { - return this.drawParamWebGL._$Rs(); - }), - (ft.prototype._$Ds = function (t) { - this.drawParamWebGL._$Ds(t); - }), - (ft.prototype.getDrawParam = function () { - return this.drawParamWebGL; - }), - (ft.prototype.setMatrix = function (t) { - this.drawParamWebGL.setMatrix(t); - }), - (ft.prototype.setPremultipliedAlpha = function (t) { - this.drawParamWebGL.setPremultipliedAlpha(t); - }), - (ft.prototype.isPremultipliedAlpha = function () { - return this.drawParamWebGL.isPremultipliedAlpha(); - }), - (ft.prototype.setAnisotropy = function (t) { - this.drawParamWebGL.setAnisotropy(t); - }), - (ft.prototype.getAnisotropy = function () { - return this.drawParamWebGL.getAnisotropy(); - }), - (ct.prototype._$tb = function () { - return this.motions; - }), - (ct.prototype.startMotion = function (t, i) { - for (var e = null, r = this.motions.length, o = 0; o < r; ++o) - null != (e = this.motions[o]) && - (e._$qS(e._$w0.getFadeOut()), - this._$eb && - _._$Ji( - "MotionQueueManager[size:%2d]->startMotion() / start _$K _$3 (m%d)\n", - r, - e._$sr - )); - if (null == t) return -1; - (e = new dt()), (e._$w0 = t), this.motions.push(e); - var n = e._$sr; - return ( - this._$eb && - _._$Ji( - "MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n", - r, - n - ), - n - ); - }), - (ct.prototype.updateParam = function (t) { - try { - for (var i = !1, e = 0; e < this.motions.length; e++) { - var r = this.motions[e]; - if (null != r) { - var o = r._$w0; - null != o - ? (o.updateParam(t, r), - (i = !0), - r.isFinished() && - (this._$eb && - _._$Ji( - "MotionQueueManager[size:%2d]->updateParam() / _$T0 _$w0 (m%d)\n", - this.motions.length - 1, - r._$sr - ), - this.motions.splice(e, 1), - e--)) - : ((this.motions = this.motions.splice(e, 1)), e--); - } else this.motions.splice(e, 1), e--; - } - return i; - } catch (t) { - return _._$li(t), !0; - } - }), - (ct.prototype.isFinished = function (t) { - if (arguments.length >= 1) { - for (var i = 0; i < this.motions.length; i++) { - var e = this.motions[i]; - if (null != e && e._$sr == t && !e.isFinished()) return !1; - } - return !0; - } - for (var i = 0; i < this.motions.length; i++) { - var e = this.motions[i]; - if (null != e) { - if (null != e._$w0) { - if (!e.isFinished()) return !1; - } else this.motions.splice(i, 1), i--; - } else this.motions.splice(i, 1), i--; - } - return !0; - }), - (ct.prototype.stopAllMotions = function () { - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t]; - if (null != i) { - i._$w0; - this.motions.splice(t, 1), t--; - } else this.motions.splice(t, 1), t--; - } - }), - (ct.prototype._$Zr = function (t) { - this._$eb = t; - }), - (ct.prototype._$e = function () { - console.log("-- _$R --\n"); - for (var t = 0; t < this.motions.length; t++) { - var i = this.motions[t], - e = i._$w0; - console.log( - "MotionQueueEnt[%d] :: %s\n", - this.motions.length, - e.toString() - ); - } - }), - (dt._$Gs = 0), - (dt.prototype.isFinished = function () { - return this._$9L; - }), - (dt.prototype._$qS = function (t) { - var i = w.getUserTimeMSec(), - e = i + t; - (this._$Do < 0 || e < this._$Do) && (this._$Do = e); - }), - (dt.prototype._$Bs = function () { - return this._$sr; - }), - (gt.prototype.setContext = function (t) { - var i = this.m; - t.transform(i[0], i[1], i[3], i[4], i[6], i[7]); - }), - (gt.prototype.toString = function () { - for (var t = "LDTransform { ", i = 0; i < 9; i++) - t += this.m[i].toFixed(2) + " ,"; - return (t += " }"); - }), - (gt.prototype.identity = function () { - var t = this.m; - (t[0] = t[4] = t[8] = 1), - (t[1] = t[2] = t[3] = t[5] = t[6] = t[7] = 0); - }), - (gt.prototype._$PS = function (t, i, e) { - null == e && (e = new Array(0, 0)); - var r = this.m; - return ( - (e[0] = r[0] * t + r[3] * i + r[6]), - (e[1] = r[1] * t + r[4] * i + r[7]), - e - ); - }), - (gt.prototype._$P2 = function (t) { - t || (t = new gt()); - var i = this.m, - e = i[0], - r = i[1], - o = i[2], - n = i[3], - s = i[4], - _ = i[5], - a = i[6], - h = i[7], - l = i[8], - $ = - e * s * l + - r * _ * a + - o * n * h - - e * _ * h - - o * s * a - - r * n * l; - if (0 == $) return null; - var u = 1 / $; - return ( - (t.m[0] = u * (s * l - h * _)), - (t.m[1] = u * (h * o - r * l)), - (t.m[2] = u * (r * _ - s * o)), - (t.m[3] = u * (a * _ - n * l)), - (t.m[4] = u * (e * l - a * o)), - (t.m[5] = u * (n * o - e * _)), - (t.m[6] = u * (n * h - a * s)), - (t.m[7] = u * (a * r - e * h)), - (t.m[8] = u * (e * s - n * r)), - t - ); - }), - (gt.prototype.transform = function (t, i, e) { - null == e && (e = new Array(0, 0)); - var r = this.m; - return ( - (e[0] = r[0] * t + r[3] * i + r[6]), - (e[1] = r[1] * t + r[4] * i + r[7]), - e - ); - }), - (gt.prototype.translate = function (t, i) { - var e = this.m; - (e[6] = e[0] * t + e[3] * i + e[6]), - (e[7] = e[1] * t + e[4] * i + e[7]), - (e[8] = e[2] * t + e[5] * i + e[8]); - }), - (gt.prototype.scale = function (t, i) { - var e = this.m; - (e[0] *= t), - (e[1] *= t), - (e[2] *= t), - (e[3] *= i), - (e[4] *= i), - (e[5] *= i); - }), - (gt.prototype.shear = function (t, i) { - var e = this.m, - r = e[0] + e[3] * i, - o = e[1] + e[4] * i, - n = e[2] + e[5] * i; - (e[3] = e[0] * t + e[3]), - (e[4] = e[1] * t + e[4]), - (e[5] = e[2] * t + e[5]), - (e[0] = r), - (e[1] = o), - (e[2] = n); - }), - (gt.prototype.rotate = function (t) { - var i = this.m, - e = Math.cos(t), - r = Math.sin(t), - o = i[0] * e + i[3] * r, - n = i[1] * e + i[4] * r, - s = i[2] * e + i[5] * r; - (i[3] = -i[0] * r + i[3] * e), - (i[4] = -i[1] * r + i[4] * e), - (i[5] = -i[2] * r + i[5] * e), - (i[0] = o), - (i[1] = n), - (i[2] = s); - }), - (gt.prototype.concatenate = function (t) { - var i = this.m, - e = t.m, - r = i[0] * e[0] + i[3] * e[1] + i[6] * e[2], - o = i[1] * e[0] + i[4] * e[1] + i[7] * e[2], - n = i[2] * e[0] + i[5] * e[1] + i[8] * e[2], - s = i[0] * e[3] + i[3] * e[4] + i[6] * e[5], - _ = i[1] * e[3] + i[4] * e[4] + i[7] * e[5], - a = i[2] * e[3] + i[5] * e[4] + i[8] * e[5], - h = i[0] * e[6] + i[3] * e[7] + i[6] * e[8], - l = i[1] * e[6] + i[4] * e[7] + i[7] * e[8], - $ = i[2] * e[6] + i[5] * e[7] + i[8] * e[8]; - (m[0] = r), - (m[1] = o), - (m[2] = n), - (m[3] = s), - (m[4] = _), - (m[5] = a), - (m[6] = h), - (m[7] = l), - (m[8] = $); - }), - (yt.prototype = new et()), - (yt._$eT = null), - (yt._$tP = new Object()), - (yt._$2o = function () { - return null == yt._$eT && (yt._$eT = yt.getID("DST_BASE")), yt._$eT; - }), - (yt._$27 = function () { - yt._$tP.clear(), (yt._$eT = null); - }), - (yt.getID = function (t) { - var i = yt._$tP[t]; - return null == i && ((i = new yt(t)), (yt._$tP[t] = i)), i; - }), - (yt.prototype._$3s = function () { - return new yt(); - }), - (mt.prototype = new E()), - (mt._$9r = function (t) { - return new Float32Array(t); - }), - (mt._$vb = function (t) { - return new Int16Array(t); - }), - (mt._$cr = function (t, i) { - return ( - null == t || t._$yL() < i.length - ? ((t = mt._$9r(2 * i.length)), t.put(i), t._$oT(0)) - : (t.clear(), t.put(i), t._$oT(0)), - t - ); - }), - (mt._$mb = function (t, i) { - return ( - null == t || t._$yL() < i.length - ? ((t = mt._$vb(2 * i.length)), t.put(i), t._$oT(0)) - : (t.clear(), t.put(i), t._$oT(0)), - t - ); - }), - (mt._$Hs = function () { - return this._$Gr; - }), - (mt._$as = function (t) { - this._$Gr = t; - }), - (mt.prototype.getGL = function () { - return this.gl; - }), - (mt.prototype.setGL = function (t) { - this.gl = t; - }), - (mt.prototype.setTransform = function (t) { - this.transform = t; - }), - (mt.prototype._$ZT = function () { - var t = this.gl; - this.firstDraw && - (this.initShader(), - (this.firstDraw = !1), - (this.anisotropyExt = - t.getExtension("EXT_texture_filter_anisotropic") || - t.getExtension("WEBKIT_EXT_texture_filter_anisotropic") || - t.getExtension("MOZ_EXT_texture_filter_anisotropic")), - this.anisotropyExt && - (this.maxAnisotropy = t.getParameter( - this.anisotropyExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT - ))), - t.disable(t.SCISSOR_TEST), - t.disable(t.STENCIL_TEST), - t.disable(t.DEPTH_TEST), - t.frontFace(t.CW), - t.enable(t.BLEND), - t.colorMask(1, 1, 1, 1), - t.bindBuffer(t.ARRAY_BUFFER, null), - t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, null); - }), - (mt.prototype._$Uo = function (t, i, e, r, o, n, s, _) { - if (!(n < 0.01 && null == this.clipBufPre_clipContextMask)) { - var a = (n > 0.9 && at.EXPAND_W, this.gl); - if (null == this.gl) throw new Error("gl is null"); - var h = 1 * this._$C0 * n, - l = 1 * this._$tT * n, - $ = 1 * this._$WL * n, - u = this._$lT * n; - if (null != this.clipBufPre_clipContextMask) { - a.frontFace(a.CCW), - a.useProgram(this.shaderProgram), - (this._$vS = Tt(a, this._$vS, r)), - (this._$no = Pt(a, this._$no, e)), - a.enableVertexAttribArray(this.a_position_Loc), - a.vertexAttribPointer( - this.a_position_Loc, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - (this._$NT = Tt(a, this._$NT, o)), - a.activeTexture(a.TEXTURE1), - a.bindTexture(a.TEXTURE_2D, this.textures[t]), - a.uniform1i(this.s_texture0_Loc, 1), - a.enableVertexAttribArray(this.a_texCoord_Loc), - a.vertexAttribPointer( - this.a_texCoord_Loc, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - a.uniformMatrix4fv( - this.u_matrix_Loc, - !1, - this.getClipBufPre_clipContextMask().matrixForMask - ); - var p = this.getClipBufPre_clipContextMask().layoutChannelNo, - f = this.getChannelFlagAsColor(p); - a.uniform4f(this.u_channelFlag, f.r, f.g, f.b, f.a); - var c = this.getClipBufPre_clipContextMask().layoutBounds; - a.uniform4f( - this.u_baseColor_Loc, - 2 * c.x - 1, - 2 * c.y - 1, - 2 * c._$EL() - 1, - 2 * c._$5T() - 1 - ), - a.uniform1i(this.u_maskFlag_Loc, !0); - } else if (null != this.getClipBufPre_clipContextDraw()) { - a.useProgram(this.shaderProgramOff), - (this._$vS = Tt(a, this._$vS, r)), - (this._$no = Pt(a, this._$no, e)), - a.enableVertexAttribArray(this.a_position_Loc_Off), - a.vertexAttribPointer( - this.a_position_Loc_Off, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - (this._$NT = Tt(a, this._$NT, o)), - a.activeTexture(a.TEXTURE1), - a.bindTexture(a.TEXTURE_2D, this.textures[t]), - a.uniform1i(this.s_texture0_Loc_Off, 1), - a.enableVertexAttribArray(this.a_texCoord_Loc_Off), - a.vertexAttribPointer( - this.a_texCoord_Loc_Off, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - a.uniformMatrix4fv( - this.u_clipMatrix_Loc_Off, - !1, - this.getClipBufPre_clipContextDraw().matrixForDraw - ), - a.uniformMatrix4fv(this.u_matrix_Loc_Off, !1, this.matrix4x4), - a.activeTexture(a.TEXTURE2), - a.bindTexture(a.TEXTURE_2D, at.fTexture[this.glno]), - a.uniform1i(this.s_texture1_Loc_Off, 2); - var p = this.getClipBufPre_clipContextDraw().layoutChannelNo, - f = this.getChannelFlagAsColor(p); - a.uniform4f(this.u_channelFlag_Loc_Off, f.r, f.g, f.b, f.a), - a.uniform4f(this.u_baseColor_Loc_Off, h, l, $, u); - } else - a.useProgram(this.shaderProgram), - (this._$vS = Tt(a, this._$vS, r)), - (this._$no = Pt(a, this._$no, e)), - a.enableVertexAttribArray(this.a_position_Loc), - a.vertexAttribPointer( - this.a_position_Loc, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - (this._$NT = Tt(a, this._$NT, o)), - a.activeTexture(a.TEXTURE1), - a.bindTexture(a.TEXTURE_2D, this.textures[t]), - a.uniform1i(this.s_texture0_Loc, 1), - a.enableVertexAttribArray(this.a_texCoord_Loc), - a.vertexAttribPointer( - this.a_texCoord_Loc, - 2, - a.FLOAT, - !1, - 0, - 0 - ), - a.uniformMatrix4fv(this.u_matrix_Loc, !1, this.matrix4x4), - a.uniform4f(this.u_baseColor_Loc, h, l, $, u), - a.uniform1i(this.u_maskFlag_Loc, !1); - this.culling - ? this.gl.enable(a.CULL_FACE) - : this.gl.disable(a.CULL_FACE), - this.gl.enable(a.BLEND); - var d, g, y, m; - if (null != this.clipBufPre_clipContextMask) - (d = a.ONE), - (g = a.ONE_MINUS_SRC_ALPHA), - (y = a.ONE), - (m = a.ONE_MINUS_SRC_ALPHA); - else - switch (s) { - case $t._$ms: - (d = a.ONE), - (g = a.ONE_MINUS_SRC_ALPHA), - (y = a.ONE), - (m = a.ONE_MINUS_SRC_ALPHA); - break; - case $t._$ns: - (d = a.ONE), (g = a.ONE), (y = a.ZERO), (m = a.ONE); - break; - case $t._$_s: - (d = a.DST_COLOR), - (g = a.ONE_MINUS_SRC_ALPHA), - (y = a.ZERO), - (m = a.ONE); - } - a.blendEquationSeparate(a.FUNC_ADD, a.FUNC_ADD), - a.blendFuncSeparate(d, g, y, m), - this.anisotropyExt && - a.texParameteri( - a.TEXTURE_2D, - this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT, - this.maxAnisotropy - ); - var T = e.length; - a.drawElements(a.TRIANGLES, T, a.UNSIGNED_SHORT, 0), - a.bindTexture(a.TEXTURE_2D, null); - } - }), - (mt.prototype._$Rs = function () { - throw new Error("_$Rs"); - }), - (mt.prototype._$Ds = function (t) { - throw new Error("_$Ds"); - }), - (mt.prototype._$K2 = function () { - for (var t = 0; t < this.textures.length; t++) { - 0 != this.textures[t] && - (this.gl._$K2(1, this.textures, t), (this.textures[t] = null)); - } - }), - (mt.prototype.setTexture = function (t, i) { - this.textures[t] = i; - }), - (mt.prototype.initShader = function () { - var t = this.gl; - this.loadShaders2(), - (this.a_position_Loc = t.getAttribLocation( - this.shaderProgram, - "a_position" - )), - (this.a_texCoord_Loc = t.getAttribLocation( - this.shaderProgram, - "a_texCoord" - )), - (this.u_matrix_Loc = t.getUniformLocation( - this.shaderProgram, - "u_mvpMatrix" - )), - (this.s_texture0_Loc = t.getUniformLocation( - this.shaderProgram, - "s_texture0" - )), - (this.u_channelFlag = t.getUniformLocation( - this.shaderProgram, - "u_channelFlag" - )), - (this.u_baseColor_Loc = t.getUniformLocation( - this.shaderProgram, - "u_baseColor" - )), - (this.u_maskFlag_Loc = t.getUniformLocation( - this.shaderProgram, - "u_maskFlag" - )), - (this.a_position_Loc_Off = t.getAttribLocation( - this.shaderProgramOff, - "a_position" - )), - (this.a_texCoord_Loc_Off = t.getAttribLocation( - this.shaderProgramOff, - "a_texCoord" - )), - (this.u_matrix_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "u_mvpMatrix" - )), - (this.u_clipMatrix_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "u_ClipMatrix" - )), - (this.s_texture0_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "s_texture0" - )), - (this.s_texture1_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "s_texture1" - )), - (this.u_channelFlag_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "u_channelFlag" - )), - (this.u_baseColor_Loc_Off = t.getUniformLocation( - this.shaderProgramOff, - "u_baseColor" - )); - }), - (mt.prototype.disposeShader = function () { - var t = this.gl; - this.shaderProgram && - (t.deleteProgram(this.shaderProgram), - (this.shaderProgram = null)), - this.shaderProgramOff && - (t.deleteProgram(this.shaderProgramOff), - (this.shaderProgramOff = null)); - }), - (mt.prototype.compileShader = function (t, i) { - var e = this.gl, - r = i, - o = e.createShader(t); - if (null == o) return _._$Ji("_$L0 to create shader"), null; - if ( - (e.shaderSource(o, r), - e.compileShader(o), - !e.getShaderParameter(o, e.COMPILE_STATUS)) - ) { - var n = e.getShaderInfoLog(o); - return ( - _._$Ji("_$L0 to compile shader : " + n), e.deleteShader(o), null - ); - } - return o; - }), - (mt.prototype.loadShaders2 = function () { - var t = this.gl; - if (((this.shaderProgram = t.createProgram()), !this.shaderProgram)) - return !1; - if ( - ((this.shaderProgramOff = t.createProgram()), - !this.shaderProgramOff) - ) - return !1; - if ( - ((this.vertShader = this.compileShader( - t.VERTEX_SHADER, - "attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform mat4 u_mvpMatrix;void main(){ gl_Position = u_mvpMatrix * a_position; v_ClipPos = u_mvpMatrix * a_position; v_texCoord = a_texCoord;}" - )), - !this.vertShader) - ) - return _._$Ji("Vertex shader compile _$li!"), !1; - if ( - ((this.vertShaderOff = this.compileShader( - t.VERTEX_SHADER, - "attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform mat4 u_mvpMatrix;uniform mat4 u_ClipMatrix;void main(){ gl_Position = u_mvpMatrix * a_position; v_ClipPos = u_ClipMatrix * a_position; v_texCoord = a_texCoord ;}" - )), - !this.vertShaderOff) - ) - return _._$Ji("OffVertex shader compile _$li!"), !1; - if ( - ((this.fragShader = this.compileShader( - t.FRAGMENT_SHADER, - "precision mediump float;varying vec2 v_texCoord;varying vec4 v_ClipPos;uniform sampler2D s_texture0;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;uniform bool u_maskFlag;void main(){ vec4 smpColor; if(u_maskFlag){ float isInside = step(u_baseColor.x, v_ClipPos.x/v_ClipPos.w) * step(u_baseColor.y, v_ClipPos.y/v_ClipPos.w) * step(v_ClipPos.x/v_ClipPos.w, u_baseColor.z) * step(v_ClipPos.y/v_ClipPos.w, u_baseColor.w); smpColor = u_channelFlag * texture2D(s_texture0 , v_texCoord).a * isInside; }else{ smpColor = texture2D(s_texture0 , v_texCoord) * u_baseColor; } gl_FragColor = smpColor;}" - )), - !this.fragShader) - ) - return _._$Ji("Fragment shader compile _$li!"), !1; - if ( - ((this.fragShaderOff = this.compileShader( - t.FRAGMENT_SHADER, - "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 = 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;}" - )), - !this.fragShaderOff) - ) - return _._$Ji("OffFragment shader compile _$li!"), !1; - if ( - (t.attachShader(this.shaderProgram, this.vertShader), - t.attachShader(this.shaderProgram, this.fragShader), - t.attachShader(this.shaderProgramOff, this.vertShaderOff), - t.attachShader(this.shaderProgramOff, this.fragShaderOff), - t.linkProgram(this.shaderProgram), - t.linkProgram(this.shaderProgramOff), - !t.getProgramParameter(this.shaderProgram, t.LINK_STATUS)) - ) { - var i = t.getProgramInfoLog(this.shaderProgram); - return ( - _._$Ji("_$L0 to link program: " + i), - this.vertShader && - (t.deleteShader(this.vertShader), (this.vertShader = 0)), - this.fragShader && - (t.deleteShader(this.fragShader), (this.fragShader = 0)), - this.shaderProgram && - (t.deleteProgram(this.shaderProgram), - (this.shaderProgram = 0)), - this.vertShaderOff && - (t.deleteShader(this.vertShaderOff), - (this.vertShaderOff = 0)), - this.fragShaderOff && - (t.deleteShader(this.fragShaderOff), - (this.fragShaderOff = 0)), - this.shaderProgramOff && - (t.deleteProgram(this.shaderProgramOff), - (this.shaderProgramOff = 0)), - !1 - ); - } - return !0; - }), - (mt.prototype.createFramebuffer = function () { - var t = this.gl, - i = at.clippingMaskBufferSize, - e = t.createFramebuffer(); - t.bindFramebuffer(t.FRAMEBUFFER, e); - var r = t.createRenderbuffer(); - t.bindRenderbuffer(t.RENDERBUFFER, r), - t.renderbufferStorage(t.RENDERBUFFER, t.RGBA4, i, i), - t.framebufferRenderbuffer( - t.FRAMEBUFFER, - t.COLOR_ATTACHMENT0, - t.RENDERBUFFER, - r - ); - var o = t.createTexture(); - return ( - t.bindTexture(t.TEXTURE_2D, o), - t.texImage2D( - t.TEXTURE_2D, - 0, - t.RGBA, - i, - i, - 0, - t.RGBA, - t.UNSIGNED_BYTE, - null - ), - t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, t.LINEAR), - t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, t.LINEAR), - t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), - t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), - t.framebufferTexture2D( - t.FRAMEBUFFER, - t.COLOR_ATTACHMENT0, - t.TEXTURE_2D, - o, - 0 - ), - t.bindTexture(t.TEXTURE_2D, null), - t.bindRenderbuffer(t.RENDERBUFFER, null), - t.bindFramebuffer(t.FRAMEBUFFER, null), - (at.fTexture[this.glno] = o), - { - framebuffer: e, - renderbuffer: r, - texture: at.fTexture[this.glno], - } - ); - }), - (St.prototype._$fP = function () { - var t, - i, - e, - r = this._$ST(); - if (0 == (128 & r)) return 255 & r; - if (0 == (128 & (t = this._$ST()))) - return ((127 & r) << 7) | (127 & t); - if (0 == (128 & (i = this._$ST()))) - return ((127 & r) << 14) | ((127 & t) << 7) | (255 & i); - if (0 == (128 & (e = this._$ST()))) - return ( - ((127 & r) << 21) | - ((127 & t) << 14) | - ((127 & i) << 7) | - (255 & e) - ); - throw new lt("_$L _$0P _"); - }), - (St.prototype.getFormatVersion = function () { - return this._$S2; - }), - (St.prototype._$gr = function (t) { - this._$S2 = t; - }), - (St.prototype._$3L = function () { - return this._$fP(); - }), - (St.prototype._$mP = function () { - return ( - this._$zT(), (this._$F += 8), this._$T.getFloat64(this._$F - 8) - ); - }), - (St.prototype._$_T = function () { - return ( - this._$zT(), (this._$F += 4), this._$T.getFloat32(this._$F - 4) - ); - }), - (St.prototype._$6L = function () { - return ( - this._$zT(), (this._$F += 4), this._$T.getInt32(this._$F - 4) - ); - }), - (St.prototype._$ST = function () { - return this._$zT(), this._$T.getInt8(this._$F++); - }), - (St.prototype._$9T = function () { - return ( - this._$zT(), (this._$F += 2), this._$T.getInt16(this._$F - 2) - ); - }), - (St.prototype._$2T = function () { - throw (this._$zT(), (this._$F += 8), new lt("_$L _$q read long")); - }), - (St.prototype._$po = function () { - return this._$zT(), 0 != this._$T.getInt8(this._$F++); - }); - var xt = !0; - (St.prototype._$bT = function () { - this._$zT(); - var t = this._$3L(), - i = null; - if (xt) - try { - var e = new ArrayBuffer(2 * t); - i = new Uint16Array(e); - for (var r = 0; r < t; ++r) i[r] = this._$T.getUint8(this._$F++); - return String.fromCharCode.apply(null, i); - } catch (t) { - xt = !1; - } - try { - var o = new Array(); - if (null == i) - for (var r = 0; r < t; ++r) o[r] = this._$T.getUint8(this._$F++); - else for (var r = 0; r < t; ++r) o[r] = i[r]; - return String.fromCharCode.apply(null, o); - } catch (t) { - console.log("read utf8 / _$rT _$L0 !! : " + t); - } - }), - (St.prototype._$cS = function () { - this._$zT(); - for (var t = this._$3L(), i = new Int32Array(t), e = 0; e < t; e++) - (i[e] = this._$T.getInt32(this._$F)), (this._$F += 4); - return i; - }), - (St.prototype._$Tb = function () { - this._$zT(); - for ( - var t = this._$3L(), i = new Float32Array(t), e = 0; - e < t; - e++ - ) - (i[e] = this._$T.getFloat32(this._$F)), (this._$F += 4); - return i; - }), - (St.prototype._$5b = function () { - this._$zT(); - for ( - var t = this._$3L(), i = new Float64Array(t), e = 0; - e < t; - e++ - ) - (i[e] = this._$T.getFloat64(this._$F)), (this._$F += 8); - return i; - }), - (St.prototype._$nP = function () { - return this._$Jb(-1); - }), - (St.prototype._$Jb = function (t) { - if ((this._$zT(), t < 0 && (t = this._$3L()), t == G._$7P)) { - var i = this._$6L(); - if (0 <= i && i < this._$Ko.length) return this._$Ko[i]; - throw new lt("_$sL _$4i @_$m0"); - } - var e = this._$4b(t); - return this._$Ko.push(e), e; - }), - (St.prototype._$4b = function (t) { - if (0 == t) return null; - if (50 == t) { - var i = this._$bT(), - e = b.getID(i); - return e; - } - if (51 == t) { - var i = this._$bT(), - e = yt.getID(i); - return e; - } - if (134 == t) { - var i = this._$bT(), - e = l.getID(i); - return e; - } - if (60 == t) { - var i = this._$bT(), - e = u.getID(i); - return e; - } - if (t >= 48) { - var r = G._$9o(t); - return null != r ? (r._$F0(this), r) : null; - } - switch (t) { - case 1: - return this._$bT(); - case 10: - return new n(this._$6L(), !0); - case 11: - return new S( - this._$mP(), - this._$mP(), - this._$mP(), - this._$mP() - ); - case 12: - return new S( - this._$_T(), - this._$_T(), - this._$_T(), - this._$_T() - ); - case 13: - return new L(this._$mP(), this._$mP()); - case 14: - return new L(this._$_T(), this._$_T()); - case 15: - for (var o = this._$3L(), e = new Array(o), s = 0; s < o; s++) - e[s] = this._$nP(); - return e; - case 17: - var e = new F( - this._$mP(), - this._$mP(), - this._$mP(), - this._$mP(), - this._$mP(), - this._$mP() - ); - return e; - case 21: - return new h( - this._$6L(), - this._$6L(), - this._$6L(), - this._$6L() - ); - case 22: - return new pt(this._$6L(), this._$6L()); - case 23: - throw new Error("_$L _$ro "); - case 16: - case 25: - return this._$cS(); - case 26: - return this._$5b(); - case 27: - return this._$Tb(); - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 18: - case 19: - case 20: - case 24: - case 28: - throw new lt("_$6 _$q : _$nP() of 2-9 ,18,19,20,24,28 : " + t); - default: - throw new lt("_$6 _$q : _$nP() NO _$i : " + t); - } - }), - (St.prototype._$8L = function () { - return ( - 0 == this._$hL - ? (this._$v0 = this._$ST()) - : 8 == this._$hL && - ((this._$v0 = this._$ST()), (this._$hL = 0)), - 1 == ((this._$v0 >> (7 - this._$hL++)) & 1) - ); - }), - (St.prototype._$zT = function () { - 0 != this._$hL && (this._$hL = 0); - }), - (vt.prototype._$wP = function (t, i, e) { - for (var r = 0; r < e; r++) { - for (var o = 0; o < i; o++) { - var n = 2 * (o + r * i); - console.log("(% 7.3f , % 7.3f) , ", t[n], t[n + 1]); - } - console.log("\n"); - } - console.log("\n"); - }), - (Lt._$2S = Math.PI / 180), - (Lt._$bS = Math.PI / 180), - (Lt._$wS = 180 / Math.PI), - (Lt._$NS = 180 / Math.PI), - (Lt.PI_F = Math.PI), - (Lt._$kT = [ - 0, 0.012368, 0.024734, 0.037097, 0.049454, 0.061803, 0.074143, - 0.086471, 0.098786, 0.111087, 0.12337, 0.135634, 0.147877, 0.160098, - 0.172295, 0.184465, 0.196606, 0.208718, 0.220798, 0.232844, - 0.244854, 0.256827, 0.268761, 0.280654, 0.292503, 0.304308, - 0.316066, 0.327776, 0.339436, 0.351044, 0.362598, 0.374097, - 0.385538, 0.396921, 0.408243, 0.419502, 0.430697, 0.441826, - 0.452888, 0.463881, 0.474802, 0.485651, 0.496425, 0.507124, - 0.517745, 0.528287, 0.538748, 0.549126, 0.559421, 0.56963, 0.579752, - 0.589785, 0.599728, 0.609579, 0.619337, 0.629, 0.638567, 0.648036, - 0.657406, 0.666676, 0.675843, 0.684908, 0.693867, 0.70272, 0.711466, - 0.720103, 0.72863, 0.737045, 0.745348, 0.753536, 0.76161, 0.769566, - 0.777405, 0.785125, 0.792725, 0.800204, 0.807561, 0.814793, - 0.821901, 0.828884, 0.835739, 0.842467, 0.849066, 0.855535, - 0.861873, 0.868079, 0.874153, 0.880093, 0.885898, 0.891567, - 0.897101, 0.902497, 0.907754, 0.912873, 0.917853, 0.922692, 0.92739, - 0.931946, 0.936359, 0.940629, 0.944755, 0.948737, 0.952574, - 0.956265, 0.959809, 0.963207, 0.966457, 0.96956, 0.972514, 0.97532, - 0.977976, 0.980482, 0.982839, 0.985045, 0.987101, 0.989006, - 0.990759, 0.992361, 0.993811, 0.995109, 0.996254, 0.997248, - 0.998088, 0.998776, 0.999312, 0.999694, 0.999924, 1, - ]), - (Lt._$92 = function (t, i) { - var e = Math.atan2(t[1], t[0]), - r = Math.atan2(i[1], i[0]); - return Lt._$tS(e, r); - }), - (Lt._$tS = function (t, i) { - for (var e = t - i; e < -Math.PI; ) e += 2 * Math.PI; - for (; e > Math.PI; ) e -= 2 * Math.PI; - return e; - }), - (Lt._$9 = function (t) { - return Math.sin(t); - }), - (Lt.fcos = function (t) { - return Math.cos(t); - }), - (Mt.prototype._$u2 = function () { - return this._$IS[0]; - }), - (Mt.prototype._$yo = function () { - return this._$AT && !this._$IS[0]; - }), - (Mt.prototype._$GT = function () { - return this._$e0; - }), - (Et._$W2 = 0), - (Et.SYSTEM_INFO = null), - (Et.USER_AGENT = navigator.userAgent), - (Et.isIPhone = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isIPhone; - }), - (Et.isIOS = function () { - return ( - Et.SYSTEM_INFO || Et.setup(), - Et.SYSTEM_INFO._isIPhone || Et.SYSTEM_INFO._isIPad - ); - }), - (Et.isAndroid = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO._isAndroid; - }), - (Et.getOSVersion = function () { - return Et.SYSTEM_INFO || Et.setup(), Et.SYSTEM_INFO.version; - }), - (Et.getOS = function () { - return ( - Et.SYSTEM_INFO || Et.setup(), - Et.SYSTEM_INFO._isIPhone || Et.SYSTEM_INFO._isIPad - ? "iOS" - : Et.SYSTEM_INFO._isAndroid - ? "Android" - : "_$Q0 OS" - ); - }), - (Et.setup = function () { - function t(t, i) { - for ( - var e = t.substring(i).split(/[ _,;\.]/), r = 0, o = 0; - o <= 2 && !isNaN(e[o]); - o++ - ) { - var n = parseInt(e[o]); - if (n < 0 || n > 999) { - _._$li("err : " + n + " @UtHtml5.setup()"), (r = 0); - break; - } - r += n * Math.pow(1e3, 2 - o); - } - return r; - } - var i, - e = Et.USER_AGENT, - r = (Et.SYSTEM_INFO = { userAgent: e }); - if ((i = e.indexOf("iPhone OS ")) >= 0) - (r.os = "iPhone"), - (r._isIPhone = !0), - (r.version = t(e, i + "iPhone OS ".length)); - else if ((i = e.indexOf("iPad")) >= 0) { - if ((i = e.indexOf("CPU OS")) < 0) - return void _._$li(" err : " + e + " @UtHtml5.setup()"); - (r.os = "iPad"), - (r._isIPad = !0), - (r.version = t(e, i + "CPU OS ".length)); - } else - (i = e.indexOf("Android")) >= 0 - ? ((r.os = "Android"), - (r._isAndroid = !0), - (r.version = t(e, i + "Android ".length))) - : ((r.os = "-"), (r.version = -1)); - }), - (window.UtSystem = w), - (window.UtDebug = _), - (window.LDTransform = gt), - (window.LDGL = nt), - (window.Live2D = at), - (window.Live2DModelWebGL = ft), - (window.Live2DModelJS = q), - (window.Live2DMotion = J), - (window.MotionQueueManager = ct), - (window.PhysicsHair = f), - (window.AMotion = s), - (window.PartsDataID = l), - (window.DrawDataID = b), - (window.BaseDataID = yt), - (window.ParamID = u), - at.init(); - var At = !1; - })(); - }).call(i, e(7)); - }, - function (t, i) { - t.exports = { - import: function () { - throw new Error("System.import cannot be used indirectly"); - }, - }; - }, - function (t, i, e) { - "use strict"; - function r(t) { - return t && t.__esModule ? t : { default: t }; - } - function o() { - (this.models = []), - (this.count = -1), - (this.reloadFlg = !1), - Live2D.init(), - n.Live2DFramework.setPlatformManager(new _.default()); - } - Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = o); - var n = e(0), - s = e(9), - _ = r(s), - a = e(10), - h = r(a), - l = e(1), - $ = r(l); - (o.prototype.createModel = function () { - var t = new h.default(); - return this.models.push(t), t; - }), - (o.prototype.changeModel = function (t, i) { - if (this.reloadFlg) { - this.reloadFlg = !1; - this.releaseModel(0, t), - this.createModel(), - this.models[0].load(t, i); - } - }), - (o.prototype.getModel = function (t) { - return t >= this.models.length ? null : this.models[t]; - }), - (o.prototype.releaseModel = function (t, i) { - this.models.length <= t || - (this.models[t].release(i), - delete this.models[t], - this.models.splice(t, 1)); - }), - (o.prototype.numModels = function () { - return this.models.length; - }), - (o.prototype.setDrag = function (t, i) { - for (var e = 0; e < this.models.length; e++) - this.models[e].setDrag(t, i); - }), - (o.prototype.maxScaleEvent = function () { - $.default.DEBUG_LOG && console.log("Max scale event."); - for (var t = 0; t < this.models.length; t++) - this.models[t].startRandomMotion( - $.default.MOTION_GROUP_PINCH_IN, - $.default.PRIORITY_NORMAL - ); - }), - (o.prototype.minScaleEvent = function () { - $.default.DEBUG_LOG && console.log("Min scale event."); - for (var t = 0; t < this.models.length; t++) - this.models[t].startRandomMotion( - $.default.MOTION_GROUP_PINCH_OUT, - $.default.PRIORITY_NORMAL - ); - }), - (o.prototype.tapEvent = function (t, i) { - $.default.DEBUG_LOG && console.log("tapEvent view x:" + t + " y:" + i); - for (var e = 0; e < this.models.length; e++) - this.models[e].hitTest($.default.HIT_AREA_HEAD, t, i) - ? ($.default.DEBUG_LOG && console.log("Tap face."), - this.models[e].setRandomExpression()) - : this.models[e].hitTest($.default.HIT_AREA_BODY, t, i) - ? ($.default.DEBUG_LOG && - console.log("Tap body. models[" + e + "]"), - this.models[e].startRandomMotion( - $.default.MOTION_GROUP_TAP_BODY, - $.default.PRIORITY_NORMAL - )) - : this.models[e].hitTestCustom("head", t, i) - ? ($.default.DEBUG_LOG && console.log("Tap face."), - this.models[e].startRandomMotion( - $.default.MOTION_GROUP_FLICK_HEAD, - $.default.PRIORITY_NORMAL - )) - : this.models[e].hitTestCustom("body", t, i) && - ($.default.DEBUG_LOG && - console.log("Tap body. models[" + e + "]"), - this.models[e].startRandomMotion( - $.default.MOTION_GROUP_TAP_BODY, - $.default.PRIORITY_NORMAL - )); - return !0; - }); - }, - function (t, i, e) { - "use strict"; - function r() {} - Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = r); - var o = e(2); - var requestCache = {}; - (r.prototype.loadBytes = function (t, i) { - if (requestCache[t] !== undefined) { - i(requestCache[t]); - return; - } - var e = new XMLHttpRequest(); - e.open("GET", t, !0), - (e.responseType = "arraybuffer"), - (e.onload = function () { - switch (e.status) { - case 200: - requestCache[t] = e.response; - i(e.response); - break; - default: - console.error("Failed to load (" + e.status + ") : " + t); - } - }), - e.send(null); - }), - (r.prototype.loadString = function (t) { - this.loadBytes(t, function (t) { - return t; - }); - }), - (r.prototype.loadLive2DModel = function (t, i) { - var e = null; - this.loadBytes(t, function (t) { - (e = Live2DModelWebGL.loadModel(t)), i(e); - }); - }), - (r.prototype.loadTexture = function (t, i, e, r) { - var n = new Image(); - (n.crossOrigin = "Anonymous"), (n.src = e); - (n.onload = function () { - var e = (0, o.getContext)(), - s = e.createTexture(); - if (!s) - return console.error("Failed to generate gl texture name."), -1; - 0 == t.isPremultipliedAlpha() && - e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1), - e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, 1), - e.activeTexture(e.TEXTURE0), - e.bindTexture(e.TEXTURE_2D, s), - e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, n), - e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), - e.texParameteri( - e.TEXTURE_2D, - e.TEXTURE_MIN_FILTER, - e.LINEAR_MIPMAP_NEAREST - ), - e.generateMipmap(e.TEXTURE_2D), - t.setTexture(i, s), - (s = null), - "function" == typeof r && r(); - }), - (n.onerror = function () { - console.error("Failed to load image : " + e); - }); - }), - (r.prototype.jsonParseFromBytes = function (t) { - var i, - e = new Uint8Array(t, 0, 3); - return ( - (i = - 239 == e[0] && 187 == e[1] && 191 == e[2] - ? String.fromCharCode.apply(null, new Uint8Array(t, 3)) - : String.fromCharCode.apply(null, new Uint8Array(t))), - JSON.parse(i) - ); - }), - (r.prototype.log = function (t) {}); - }, - function (t, i, e) { - "use strict"; - function r(t) { - return t && t.__esModule ? t : { default: t }; - } - function o() { - n.L2DBaseModel.prototype.constructor.call(this), - (this.modelHomeDir = ""), - (this.modelSetting = null), - (this.tmpMatrix = []); - } - Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = o); - var n = e(0), - s = e(11), - _ = r(s), - a = e(1), - h = r(a), - l = e(3), - $ = r(l); - (o.prototype = new n.L2DBaseModel()), - (o.prototype.load = function (t, i, e) { - this.setUpdating(!0), - this.setInitialized(!1), - (this.modelHomeDir = i.substring(0, i.lastIndexOf("/") + 1)), - (this.modelSetting = new _.default()); - var r = this; - this.modelSetting.loadModelSetting(i, function () { - var t = r.modelHomeDir + r.modelSetting.getModelFile(); - r.loadModelData(t, function (t) { - for (var i = 0; i < r.modelSetting.getTextureNum(); i++) { - if (/^https?:\/\/|^\/\//i.test(r.modelSetting.getTextureFile(i))) - var o = r.modelSetting.getTextureFile(i); - else var o = r.modelHomeDir + r.modelSetting.getTextureFile(i); - r.loadTexture(i, o, function () { - if (r.isTexLoaded) { - if (r.modelSetting.getExpressionNum() > 0) { - r.expressions = {}; - for ( - var t = 0; - t < r.modelSetting.getExpressionNum(); - t++ - ) { - var i = r.modelSetting.getExpressionName(t), - o = - r.modelHomeDir + r.modelSetting.getExpressionFile(t); - r.loadExpression(i, o); - } - } else (r.expressionManager = null), (r.expressions = {}); - if ( - (r.eyeBlink, - null != r.modelSetting.getPhysicsFile() - ? r.loadPhysics( - r.modelHomeDir + r.modelSetting.getPhysicsFile() - ) - : (r.physics = null), - null != r.modelSetting.getPoseFile() - ? r.loadPose( - r.modelHomeDir + r.modelSetting.getPoseFile(), - function () { - r.pose.updateParam(r.live2DModel); - } - ) - : (r.pose = null), - null != r.modelSetting.getLayout()) - ) { - var n = r.modelSetting.getLayout(); - null != n.width && r.modelMatrix.setWidth(n.width), - null != n.height && r.modelMatrix.setHeight(n.height), - null != n.x && r.modelMatrix.setX(n.x), - null != n.y && r.modelMatrix.setY(n.y), - null != n.center_x && r.modelMatrix.centerX(n.center_x), - null != n.center_y && r.modelMatrix.centerY(n.center_y), - null != n.top && r.modelMatrix.top(n.top), - null != n.bottom && r.modelMatrix.bottom(n.bottom), - null != n.left && r.modelMatrix.left(n.left), - null != n.right && r.modelMatrix.right(n.right); - } - if (null != r.modelSetting.getHitAreasCustom()) { - var s = r.modelSetting.getHitAreasCustom(); - null != s.head_x && - (h.default.hit_areas_custom_head_x = s.head_x), - null != s.head_y && - (h.default.hit_areas_custom_head_y = s.head_y), - null != s.body_x && - (h.default.hit_areas_custom_body_x = s.body_x), - null != s.body_y && - (h.default.hit_areas_custom_body_y = s.body_y); - } - for (var t = 0; t < r.modelSetting.getInitParamNum(); t++) - r.live2DModel.setParamFloat( - r.modelSetting.getInitParamID(t), - r.modelSetting.getInitParamValue(t) - ); - for ( - var t = 0; - t < r.modelSetting.getInitPartsVisibleNum(); - t++ - ) - r.live2DModel.setPartsOpacity( - r.modelSetting.getInitPartsVisibleID(t), - r.modelSetting.getInitPartsVisibleValue(t) - ); - r.live2DModel.saveParam(), - r.preloadMotionGroup(h.default.MOTION_GROUP_IDLE), - r.preloadMotionGroup(h.default.MOTION_GROUP_SLEEPY), - r.mainMotionManager.stopAllMotions(), - r.setUpdating(!1), - r.setInitialized(!0), - "function" == typeof e && e(); - } - }); - } - }); - }); - }), - (o.prototype.release = function (t) { - var i = n.Live2DFramework.getPlatformManager(); - t.deleteTexture(i.texture); - }), - (o.prototype.preloadMotionGroup = function (t) { - for (var i = this, e = 0; e < this.modelSetting.getMotionNum(t); e++) { - var r = this.modelSetting.getMotionFile(t, e); - this.loadMotion(r, this.modelHomeDir + r, function (r) { - r.setFadeIn(i.modelSetting.getMotionFadeIn(t, e)), - r.setFadeOut(i.modelSetting.getMotionFadeOut(t, e)); - }); - } - }), - (o.prototype.update = function () { - if (null == this.live2DModel) - return void ( - h.default.DEBUG_LOG && console.error("Failed to update.") - ); - var t = UtSystem.getUserTimeMSec() - this.startTimeMSec, - i = t / 1e3, - e = 2 * i * Math.PI; - if (this.mainMotionManager.isFinished()) { - "1" === sessionStorage.getItem("Sleepy") - ? this.startRandomMotion( - h.default.MOTION_GROUP_SLEEPY, - h.default.PRIORITY_SLEEPY - ) - : this.startRandomMotion( - h.default.MOTION_GROUP_IDLE, - h.default.PRIORITY_IDLE - ); - } - this.live2DModel.loadParam(), - this.mainMotionManager.updateParam(this.live2DModel) || - (null != this.eyeBlink && - this.eyeBlink.updateParam(this.live2DModel)), - this.live2DModel.saveParam(), - null == this.expressionManager || - null == this.expressions || - this.expressionManager.isFinished() || - this.expressionManager.updateParam(this.live2DModel), - this.live2DModel.addToParamFloat("PARAM_ANGLE_X", 30 * this.dragX, 1), - this.live2DModel.addToParamFloat("PARAM_ANGLE_Y", 30 * this.dragY, 1), - this.live2DModel.addToParamFloat( - "PARAM_ANGLE_Z", - this.dragX * this.dragY * -30, - 1 - ), - this.live2DModel.addToParamFloat( - "PARAM_BODY_ANGLE_X", - 10 * this.dragX, - 1 - ), - this.live2DModel.addToParamFloat("PARAM_EYE_BALL_X", this.dragX, 1), - this.live2DModel.addToParamFloat("PARAM_EYE_BALL_Y", this.dragY, 1), - this.live2DModel.addToParamFloat( - "PARAM_ANGLE_X", - Number(15 * Math.sin(e / 6.5345)), - 0.5 - ), - this.live2DModel.addToParamFloat( - "PARAM_ANGLE_Y", - Number(8 * Math.sin(e / 3.5345)), - 0.5 - ), - this.live2DModel.addToParamFloat( - "PARAM_ANGLE_Z", - Number(10 * Math.sin(e / 5.5345)), - 0.5 - ), - this.live2DModel.addToParamFloat( - "PARAM_BODY_ANGLE_X", - Number(4 * Math.sin(e / 15.5345)), - 0.5 - ), - this.live2DModel.setParamFloat( - "PARAM_BREATH", - Number(0.5 + 0.5 * Math.sin(e / 3.2345)), - 1 - ), - null != this.physics && this.physics.updateParam(this.live2DModel), - null == this.lipSync && - this.live2DModel.setParamFloat( - "PARAM_MOUTH_OPEN_Y", - this.lipSyncValue - ), - null != this.pose && this.pose.updateParam(this.live2DModel), - this.live2DModel.update(); - }), - (o.prototype.setRandomExpression = function () { - var t = []; - for (var i in this.expressions) t.push(i); - var e = parseInt(Math.random() * t.length); - this.setExpression(t[e]); - }), - (o.prototype.startRandomMotion = function (t, i) { - var e = this.modelSetting.getMotionNum(t), - r = parseInt(Math.random() * e); - this.startMotion(t, r, i); - }), - (o.prototype.startMotion = function (t, i, e) { - var r = this.modelSetting.getMotionFile(t, i); - if (null == r || "" == r) - return void ( - h.default.DEBUG_LOG && console.error("Failed to motion.") - ); - if (e == h.default.PRIORITY_FORCE) - this.mainMotionManager.setReservePriority(e); - else if (!this.mainMotionManager.reserveMotion(e)) - return void ( - h.default.DEBUG_LOG && console.log("Motion is running.") - ); - var o, - n = this; - null == this.motions[t] - ? this.loadMotion(null, this.modelHomeDir + r, function (r) { - (o = r), n.setFadeInFadeOut(t, i, e, o); - }) - : ((o = this.motions[t]), n.setFadeInFadeOut(t, i, e, o)); - }), - (o.prototype.setFadeInFadeOut = function (t, i, e, r) { - var o = this.modelSetting.getMotionFile(t, i); - if ( - (r.setFadeIn(this.modelSetting.getMotionFadeIn(t, i)), - r.setFadeOut(this.modelSetting.getMotionFadeOut(t, i)), - h.default.DEBUG_LOG && console.log("Start motion : " + o), - null == this.modelSetting.getMotionSound(t, i)) - ) - this.mainMotionManager.startMotionPrio(r, e); - else { - var n = this.modelSetting.getMotionSound(t, i), - s = document.createElement("audio"); - (s.src = this.modelHomeDir + n), - h.default.DEBUG_LOG && console.log("Start sound : " + n), - s.play(), - this.mainMotionManager.startMotionPrio(r, e); - } - }), - (o.prototype.setExpression = function (t) { - var i = this.expressions[t]; - h.default.DEBUG_LOG && console.log("Expression : " + t), - this.expressionManager.startMotion(i, !1); - }), - (o.prototype.draw = function (t) { - $.default.push(), - $.default.multMatrix(this.modelMatrix.getArray()), - (this.tmpMatrix = $.default.getMatrix()), - this.live2DModel.setMatrix(this.tmpMatrix), - this.live2DModel.draw(), - $.default.pop(); - }), - (o.prototype.hitTest = function (t, i, e) { - for (var r = this.modelSetting.getHitAreaNum(), o = 0; o < r; o++) - if (t == this.modelSetting.getHitAreaName(o)) { - var n = this.modelSetting.getHitAreaID(o); - return this.hitTestSimple(n, i, e); - } - return !1; - }), - (o.prototype.hitTestCustom = function (t, i, e) { - return "head" == t - ? this.hitTestSimpleCustom( - h.default.hit_areas_custom_head_x, - h.default.hit_areas_custom_head_y, - i, - e - ) - : "body" == t && - this.hitTestSimpleCustom( - h.default.hit_areas_custom_body_x, - h.default.hit_areas_custom_body_y, - i, - e - ); - }); - }, - function (t, i, e) { - "use strict"; - function r() { - (this.NAME = "name"), - (this.ID = "id"), - (this.MODEL = "model"), - (this.TEXTURES = "textures"), - (this.HIT_AREAS = "hit_areas"), - (this.PHYSICS = "physics"), - (this.POSE = "pose"), - (this.EXPRESSIONS = "expressions"), - (this.MOTION_GROUPS = "motions"), - (this.SOUND = "sound"), - (this.FADE_IN = "fade_in"), - (this.FADE_OUT = "fade_out"), - (this.LAYOUT = "layout"), - (this.HIT_AREAS_CUSTOM = "hit_areas_custom"), - (this.INIT_PARAM = "init_param"), - (this.INIT_PARTS_VISIBLE = "init_parts_visible"), - (this.VALUE = "val"), - (this.FILE = "file"), - (this.json = {}); - } - Object.defineProperty(i, "__esModule", { value: !0 }), (i.default = r); - var o = e(0); - (r.prototype.loadModelSetting = function (t, i) { - var e = this; - o.Live2DFramework.getPlatformManager().loadBytes(t, function (t) { - var r = String.fromCharCode.apply(null, new Uint8Array(t)); - (e.json = JSON.parse(r)), i(); - }); - }), - (r.prototype.getTextureFile = function (t) { - return null == this.json[this.TEXTURES] || - null == this.json[this.TEXTURES][t] - ? null - : this.json[this.TEXTURES][t]; - }), - (r.prototype.getModelFile = function () { - return this.json[this.MODEL]; - }), - (r.prototype.getTextureNum = function () { - return null == this.json[this.TEXTURES] - ? 0 - : this.json[this.TEXTURES].length; - }), - (r.prototype.getHitAreaNum = function () { - return null == this.json[this.HIT_AREAS] - ? 0 - : this.json[this.HIT_AREAS].length; - }), - (r.prototype.getHitAreaID = function (t) { - return null == this.json[this.HIT_AREAS] || - null == this.json[this.HIT_AREAS][t] - ? null - : this.json[this.HIT_AREAS][t][this.ID]; - }), - (r.prototype.getHitAreaName = function (t) { - return null == this.json[this.HIT_AREAS] || - null == this.json[this.HIT_AREAS][t] - ? null - : this.json[this.HIT_AREAS][t][this.NAME]; - }), - (r.prototype.getPhysicsFile = function () { - return this.json[this.PHYSICS]; - }), - (r.prototype.getPoseFile = function () { - return this.json[this.POSE]; - }), - (r.prototype.getExpressionNum = function () { - return null == this.json[this.EXPRESSIONS] - ? 0 - : this.json[this.EXPRESSIONS].length; - }), - (r.prototype.getExpressionFile = function (t) { - return null == this.json[this.EXPRESSIONS] - ? null - : this.json[this.EXPRESSIONS][t][this.FILE]; - }), - (r.prototype.getExpressionName = function (t) { - return null == this.json[this.EXPRESSIONS] - ? null - : this.json[this.EXPRESSIONS][t][this.NAME]; - }), - (r.prototype.getLayout = function () { - return this.json[this.LAYOUT]; - }), - (r.prototype.getHitAreasCustom = function () { - return this.json[this.HIT_AREAS_CUSTOM]; - }), - (r.prototype.getInitParamNum = function () { - return null == this.json[this.INIT_PARAM] - ? 0 - : this.json[this.INIT_PARAM].length; - }), - (r.prototype.getMotionNum = function (t) { - return null == this.json[this.MOTION_GROUPS] || - null == this.json[this.MOTION_GROUPS][t] - ? 0 - : this.json[this.MOTION_GROUPS][t].length; - }), - (r.prototype.getMotionFile = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || - null == this.json[this.MOTION_GROUPS][t] || - null == this.json[this.MOTION_GROUPS][t][i] - ? null - : this.json[this.MOTION_GROUPS][t][i][this.FILE]; - }), - (r.prototype.getMotionSound = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || - null == this.json[this.MOTION_GROUPS][t] || - null == this.json[this.MOTION_GROUPS][t][i] || - null == this.json[this.MOTION_GROUPS][t][i][this.SOUND] - ? null - : this.json[this.MOTION_GROUPS][t][i][this.SOUND]; - }), - (r.prototype.getMotionFadeIn = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || - null == this.json[this.MOTION_GROUPS][t] || - null == this.json[this.MOTION_GROUPS][t][i] || - null == this.json[this.MOTION_GROUPS][t][i][this.FADE_IN] - ? 1e3 - : this.json[this.MOTION_GROUPS][t][i][this.FADE_IN]; - }), - (r.prototype.getMotionFadeOut = function (t, i) { - return null == this.json[this.MOTION_GROUPS] || - null == this.json[this.MOTION_GROUPS][t] || - null == this.json[this.MOTION_GROUPS][t][i] || - null == this.json[this.MOTION_GROUPS][t][i][this.FADE_OUT] - ? 1e3 - : this.json[this.MOTION_GROUPS][t][i][this.FADE_OUT]; - }), - (r.prototype.getInitParamID = function (t) { - return null == this.json[this.INIT_PARAM] || - null == this.json[this.INIT_PARAM][t] - ? null - : this.json[this.INIT_PARAM][t][this.ID]; - }), - (r.prototype.getInitParamValue = function (t) { - return null == this.json[this.INIT_PARAM] || - null == this.json[this.INIT_PARAM][t] - ? NaN - : this.json[this.INIT_PARAM][t][this.VALUE]; - }), - (r.prototype.getInitPartsVisibleNum = function () { - return null == this.json[this.INIT_PARTS_VISIBLE] - ? 0 - : this.json[this.INIT_PARTS_VISIBLE].length; - }), - (r.prototype.getInitPartsVisibleID = function (t) { - return null == this.json[this.INIT_PARTS_VISIBLE] || - null == this.json[this.INIT_PARTS_VISIBLE][t] - ? null - : this.json[this.INIT_PARTS_VISIBLE][t][this.ID]; - }), - (r.prototype.getInitPartsVisibleValue = function (t) { - return null == this.json[this.INIT_PARTS_VISIBLE] || - null == this.json[this.INIT_PARTS_VISIBLE][t] - ? NaN - : this.json[this.INIT_PARTS_VISIBLE][t][this.VALUE]; - }); - }, -]); +(function(){var j=true;function aa(){if(j){return;}this._$MT=null;this._$5S=null;this._$NP=0;aa._$42++;this._$5S=new y(this);}aa._$0s=1;aa._$4s=2;aa._$42=0;aa._$62=function(aQ,aU){try{if(aU instanceof ArrayBuffer){aU=new DataView(aU);}if(!(aU instanceof DataView)){throw new J("_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer");}var aS=new K(aU);var aM=aS._$ST();var aK=aS._$ST();var aJ=aS._$ST();var aN;if(aM==109&&aK==111&&aJ==99){aN=aS._$ST();}else{throw new J("_$gi _$C _$li , _$Q0 _$P0.");}aS._$gr(aN);if(aN>ay._$T7){aQ._$NP|=aa._$4s;var aR=ay._$T7;var aI="_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : "+aR+" < _$f0 : "+aN+" )@_$SS#loadModel()\n";throw new J(aI);}var aL=aS._$nP();if(aN>=ay._$s7){var aH=aS._$9T();var aT=aS._$9T();if(aH!=-30584||aT!=-30584){aQ._$NP|=aa._$0s;throw new J("_$gi _$C _$li , _$0 _$6 _$Ui.");}}aQ._$KS(aL);var aP=aQ.getModelContext();aP.setDrawParam(aQ.getDrawParam());aP.init();}catch(aO){q._$Rb(aO);}};aa.prototype._$KS=function(aH){this._$MT=aH;};aa.prototype.getModelImpl=function(){if(this._$MT==null){this._$MT=new w();this._$MT._$zP();}return this._$MT;};aa.prototype.getCanvasWidth=function(){if(this._$MT==null){return 0;}return this._$MT.getCanvasWidth();};aa.prototype.getCanvasHeight=function(){if(this._$MT==null){return 0;}return this._$MT.getCanvasHeight();};aa.prototype.getParamFloat=function(aH){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}return this._$5S.getParamFloat(aH);};aa.prototype.setParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)*(1-aI)+aJ*aI);};aa.prototype.addToParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)+aJ*aI);};aa.prototype.multParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)*(1+(aJ-1)*aI));};aa.prototype.getParamIndex=function(aH){return this._$5S.getParamIndex(z.getID(aH));};aa.prototype.loadParam=function(){this._$5S.loadParam();};aa.prototype.saveParam=function(){this._$5S.saveParam();};aa.prototype.init=function(){this._$5S.init();};aa.prototype.update=function(){this._$5S.update();};aa.prototype._$Rs=function(){q._$li("_$60 _$PT _$Rs()");return -1;};aa.prototype._$Ds=function(aH){q._$li("_$60 _$PT _$SS#_$Ds() \n");};aa.prototype._$K2=function(){};aa.prototype.draw=function(){};aa.prototype.getModelContext=function(){return this._$5S;};aa.prototype._$s2=function(){return this._$NP;};aa.prototype._$P7=function(aK,aR,aH,a0){var aU=-1;var aY=0;var aM=this;var aJ=0.5;var aI=0.15;var aX=true;if(aH==0){for(var aV=0;aV1){aQ=1;}}else{aQ-=aW;if(aQ<0){aQ=0;}}aM.setPartsOpacity(aO,aQ);}else{for(var aV=0;aV=0){break;}aU=aV;var aO=aR[aV];aY=aM.getPartsOpacity(aO);aY+=aH/a0;if(aY>1){aY=1;}}}if(aU<0){console.log("No _$wi _$q0/ _$U default[%s]",aK[0]);aU=0;aY=1;aM.loadParam();aM.setParamFloat(aK[aU],aY);aM.saveParam();}for(var aV=0;aVaI){aZ=1-aI/(1-aY);}}if(aL>aZ){aL=aZ;}aM.setPartsOpacity(aO,aL);}}}}};aa.prototype.setPartsOpacity=function(aI,aH){if(typeof aI!="number"){aI=this._$5S.getPartsDataIndex(i.getID(aI));}this._$5S.setPartsOpacity(aI,aH);};aa.prototype.getPartsDataIndex=function(aH){if(!(aH instanceof i)){aH=i.getID(aH);}return this._$5S.getPartsDataIndex(aH);};aa.prototype.getPartsOpacity=function(aH){if(typeof aH!="number"){aH=this._$5S.getPartsDataIndex(i.getID(aH));}if(aH<0){return 0;}return this._$5S.getPartsOpacity(aH);};aa.prototype.getDrawParam=function(){};aa.prototype.getDrawDataIndex=function(aH){return this._$5S.getDrawDataIndex(Z.getID(aH));};aa.prototype.getDrawData=function(aH){return this._$5S.getDrawData(aH);};aa.prototype.getTransformedPoints=function(aH){var aI=this._$5S._$C2(aH);if(aI instanceof ag){return(aI).getTransformedPoints();}return null;};aa.prototype.getIndexArray=function(aI){if(aI<0||aI>=this._$5S._$aS.length){return null;}var aH=this._$5S._$aS[aI];if(aH!=null&&aH.getType()==a._$wb){if(aH instanceof b){return aH.getIndexArray();}}return null;};function W(aJ){if(j){return;}this.clipContextList=new Array();this.glcontext=aJ.gl;this.dp_webgl=aJ;this.curFrameNo=0;this.firstError_clipInNotUpdate=true;this.colorBuffer=0;this.isInitGLFBFunc=false;this.tmpBoundsOnModel=new av();if(Q.glContext.length>Q.frameBuffers.length){this.curFrameNo=this.getMaskRenderTexture();}else{}this.tmpModelToViewMatrix=new ac();this.tmpMatrix2=new ac();this.tmpMatrixForMask=new ac();this.tmpMatrixForDraw=new ac();this.CHANNEL_COLORS=new Array();var aI=new o();aI=new o();aI.r=0;aI.g=0;aI.b=0;aI.a=1;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=1;aI.g=0;aI.b=0;aI.a=0;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=0;aI.g=1;aI.b=0;aI.a=0;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=0;aI.g=0;aI.b=1;aI.a=0;this.CHANNEL_COLORS.push(aI);for(var aH=0;aH=0;--aH){this.CHANNEL_COLORS.splice(aH,1);}this.CHANNEL_COLORS=[];}this.releaseShader();};W.prototype.releaseShader=function(){var aI=Q.frameBuffers.length;for(var aH=0;aH0){var aM=aQ.gl.getParameter(aQ.gl.FRAMEBUFFER_BINDING);var aW=new Array(4);aW[0]=0;aW[1]=0;aW[2]=aQ.gl.canvas.width;aW[3]=aQ.gl.canvas.height;aQ.gl.viewport(0,0,Q.clippingMaskBufferSize,Q.clippingMaskBufferSize);this.setupLayoutBounds(aK);aQ.gl.bindFramebuffer(aQ.gl.FRAMEBUFFER,Q.frameBuffers[this.curFrameNo].framebuffer);aQ.gl.clearColor(0,0,0,0);aQ.gl.clear(aQ.gl.COLOR_BUFFER_BIT);for(var aO=0;aOa5?aU:a5;var aT=aJ;var aR=aJ;var aS=0;var aP=0;var aL=aV.clippedDrawContextList.length;for(var aM=0;aMaS){aS=a0;}if(aZ>aP){aP=aZ;}}}if(aT==aJ){aV.allClippedDrawRect.x=0;aV.allClippedDrawRect.y=0;aV.allClippedDrawRect.width=0;aV.allClippedDrawRect.height=0;aV.isUsing=false;}else{var aQ=aS-aT;var aY=aP-aR;aV.allClippedDrawRect.x=aT;aV.allClippedDrawRect.y=aR;aV.allClippedDrawRect.width=aQ;aV.allClippedDrawRect.height=aY;aV.isUsing=true;}};W.prototype.setupLayoutBounds=function(aQ){var aI=aQ/W.CHANNEL_COUNT;var aP=aQ%W.CHANNEL_COUNT;aI=~~aI;aP=~~aP;var aH=0;for(var aJ=0;aJ=1){return 1;}}var aS=aQ;var aI=aS*aS;var aH=aS*aI;var aT=aY*aH+aX*aI+aW*aS+aV;return aT;};ah.prototype._$a0=function(){};ah.prototype.setFadeIn=function(aH){this._$dP=aH;};ah.prototype.setFadeOut=function(aH){this._$eo=aH;};ah.prototype._$pT=function(aH){this._$V0=aH;};ah.prototype.getFadeOut=function(){return this._$eo;};ah.prototype._$4T=function(){return this._$eo;};ah.prototype._$mT=function(){return this._$V0;};ah.prototype.getDurationMSec=function(){return -1;};ah.prototype.getLoopDurationMSec=function(){return -1;};ah.prototype.updateParam=function(aJ,aN){if(!aN._$AT||aN._$9L){return;}var aL=P.getUserTimeMSec();if(aN._$z2<0){aN._$z2=aL;aN._$bs=aL;var aM=this.getDurationMSec();if(aN._$Do<0){aN._$Do=(aM<=0)?-1:aN._$z2+aM;}}var aI=this._$V0;var aH=(this._$dP==0)?1:A._$r2(((aL-aN._$bs)/(this._$dP)));var aK=(this._$eo==0||aN._$Do<0)?1:A._$r2(((aN._$Do-aL)/(this._$eo)));aI=aI*aH*aK;if(!((0<=aI&&aI<=1))){console.log("### assert!! ### ");}this.updateParamExe(aJ,aL,aI,aN);if(aN._$Do>0&&aN._$Do0){console.log("\n");}else{if(aH%8==0&&aH>0){console.log(" ");}}console.log("%02X ",(aJ[aH]&255));}console.log("\n");};q._$nr=function(aL,aI,aK){console.log("%s\n",aL);var aH=aI.length;for(var aJ=0;aJ=0;--aJ){var aM=this._$lL[aJ];aM._$oP(aI,this);}this._$oo(aI,aK);this._$M2=this._$Yb();this._$9b=(this._$M2-this._$ks)/aK;this._$ks=this._$M2;}for(var aJ=this._$qP.length-1;aJ>=0;--aJ){var aH=this._$qP[aJ];aH._$YS(aI,this);}this._$iT=aL;};u.prototype._$oo=function(aN,aI){if(aI<0.033){aI=0.033;}var aU=1/aI;this.p1.vx=(this.p1.x-this.p1._$s0)*aU;this.p1.vy=(this.p1.y-this.p1._$70)*aU;this.p1.ax=(this.p1.vx-this.p1._$7L)*aU;this.p1.ay=(this.p1.vy-this.p1._$HL)*aU;this.p1.fx=this.p1.ax*this.p1._$p;this.p1.fy=this.p1.ay*this.p1._$p;this.p1._$xT();var aM=-(Math.atan2((this.p1.y-this.p2.y),this.p1.x-this.p2.x));var aL;var aV;var aR=Math.cos(aM);var aH=Math.sin(aM);var aW=9.8*this.p2._$p;var aQ=(this._$Db*aC._$bS);var aP=(aW*Math.cos(aM-aQ));aL=(aP*aH);aV=(aP*aR);var aK=(-this.p1.fx*aH*aH);var aT=(-this.p1.fy*aH*aR);var aJ=((-this.p2.vx*this._$L2));var aS=((-this.p2.vy*this._$L2));this.p2.fx=((aL+aK+aJ));this.p2.fy=((aV+aT+aS));this.p2.ax=this.p2.fx/this.p2._$p;this.p2.ay=this.p2.fy/this.p2._$p;this.p2.vx+=this.p2.ax*aI;this.p2.vy+=this.p2.ay*aI;this.p2.x+=this.p2.vx*aI;this.p2.y+=this.p2.vy*aI;var aO=(Math.sqrt((this.p1.x-this.p2.x)*(this.p1.x-this.p2.x)+(this.p1.y-this.p2.y)*(this.p1.y-this.p2.y)));this.p2.x=this.p1.x+this._$Fo*(this.p2.x-this.p1.x)/aO;this.p2.y=this.p1.y+this._$Fo*(this.p2.y-this.p1.y)/aO;this.p2.vx=(this.p2.x-this.p2._$s0)*aU;this.p2.vy=(this.p2.y-this.p2._$70)*aU;this.p2._$xT();};function N(){this._$p=1;this.x=0;this.y=0;this.vx=0;this.vy=0;this.ax=0;this.ay=0;this.fx=0;this.fy=0;this._$s0=0;this._$70=0;this._$7L=0;this._$HL=0;}N.prototype._$xT=function(){this._$s0=this.x;this._$70=this.y;this._$7L=this.vx;this._$HL=this.vy;};function at(aJ,aI,aH){this._$wL=null;this.scale=null;this._$V0=null;this._$wL=aJ;this.scale=aI;this._$V0=aH;}at.prototype._$oP=function(aI,aH){};function h(aJ,aK,aI,aH){at.prototype.constructor.call(this,aK,aI,aH);this._$tL=null;this._$tL=aJ;}h.prototype=new at();h.prototype._$oP=function(aJ,aH){var aK=this.scale*aJ.getParamFloat(this._$wL);var aL=aH.getPhysicsPoint1();switch(this._$tL){default:case u.Src.SRC_TO_X:aL.x=aL.x+(aK-aL.x)*this._$V0;break;case u.Src.SRC_TO_Y:aL.y=aL.y+(aK-aL.y)*this._$V0;break;case u.Src.SRC_TO_G_ANGLE:var aI=aH._$qr();aI=aI+(aK-aI)*this._$V0;aH._$pr(aI);break;}};function d(aJ,aI,aH){this._$wL=null;this.scale=null;this._$V0=null;this._$wL=aJ;this.scale=aI;this._$V0=aH;}d.prototype._$YS=function(aI,aH){};function aF(aI,aK,aJ,aH){d.prototype.constructor.call(this,aK,aJ,aH);this._$YP=null;this._$YP=aI;}aF.prototype=new d();aF.prototype._$YS=function(aI,aH){switch(this._$YP){default:case u.Target.TARGET_FROM_ANGLE:aI.setParamFloat(this._$wL,this.scale*aH._$5r(),this._$V0);break;case u.Target.TARGET_FROM_ANGLE_V:aI.setParamFloat(this._$wL,this.scale*aH._$Cs(),this._$V0);break;}};u.Src=function(){};u.Src.SRC_TO_X="SRC_TO_X";u.Src.SRC_TO_Y="SRC_TO_Y";u.Src.SRC_TO_G_ANGLE="SRC_TO_G_ANGLE";u.Target=function(){};u.Target.TARGET_FROM_ANGLE="TARGET_FROM_ANGLE";u.Target.TARGET_FROM_ANGLE_V="TARGET_FROM_ANGLE_V";function X(){if(j){return;}this._$fL=0;this._$gL=0;this._$B0=1;this._$z0=1;this._$qT=0;this.reflectX=false;this.reflectY=false;}X.prototype.init=function(aH){this._$fL=aH._$fL;this._$gL=aH._$gL;this._$B0=aH._$B0;this._$z0=aH._$z0;this._$qT=aH._$qT;this.reflectX=aH.reflectX;this.reflectY=aH.reflectY;};X.prototype._$F0=function(aH){this._$fL=aH._$_T();this._$gL=aH._$_T();this._$B0=aH._$_T();this._$z0=aH._$_T();this._$qT=aH._$_T();if(aH.getFormatVersion()>=ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2){this.reflectX=aH._$po();this.reflectY=aH._$po();}};X.prototype._$e=function(){};var ad=function(){};ad._$ni=function(aL,aJ,aR,aQ,aK,aI,aH,aS,aN){var aM=(aH*aI-aS*aK);if(aM==0){return null;}else{var aO=((aL-aR)*aI-(aJ-aQ)*aK)/aM;var aP;if(aK!=0){aP=(aL-aR-aO*aH)/aK;}else{aP=(aJ-aQ-aO*aS)/aI;}if(isNaN(aP)){aP=(aL-aR-aO*aH)/aK;if(isNaN(aP)){aP=(aJ-aQ-aO*aS)/aI;}if(isNaN(aP)){console.log("a is NaN @UtVector#_$ni() ");console.log("v1x : "+aK);console.log("v1x != 0 ? "+(aK!=0));}}if(aN==null){return new Array(aP,aO);}else{aN[0]=aP;aN[1]=aO;return aN;}}};function av(){if(j){return;}this.x=null;this.y=null;this.width=null;this.height=null;}av.prototype._$8P=function(){return this.x+0.5*this.width;};av.prototype._$6P=function(){return this.y+0.5*this.height;};av.prototype._$EL=function(){return this.x+this.width;};av.prototype._$5T=function(){return this.y+this.height;};av.prototype._$jL=function(aI,aK,aJ,aH){this.x=aI;this.y=aK;this.width=aJ;this.height=aH;};av.prototype._$jL=function(aH){this.x=aH.x;this.y=aH.y;this.width=aH.width;this.height=aH.height;};av.prototype.contains=function(aH,aI){return this.x<=this.x&&this.y<=this.y&&(this.x<=this.x+this.width)&&(this.y<=this.y+this.height);};av.prototype.expand=function(aH,aI){this.x-=aH;this.y-=aI;this.width+=aH*2;this.height+=aI*2;};function aG(){}aG._$Z2=function(bb,bo,bp,a2){var a1=bo._$Q2(bb,bp);var a3=bb._$vs();var ba=bb._$Tr();bo._$zr(a3,ba,a1);if(a1<=0){return a2[a3[0]];}else{if(a1==1){var bj=a2[a3[0]];var bi=a2[a3[1]];var a9=ba[0];return(bj+(bi-bj)*a9)|0;}else{if(a1==2){var bj=a2[a3[0]];var bi=a2[a3[1]];var a0=a2[a3[2]];var aZ=a2[a3[3]];var a9=ba[0];var a8=ba[1];var br=(bj+(bi-bj)*a9)|0;var bq=(a0+(aZ-a0)*a9)|0;return(br+(bq-br)*a8)|0;}else{if(a1==3){var aP=a2[a3[0]];var aO=a2[a3[1]];var bn=a2[a3[2]];var bm=a2[a3[3]];var aK=a2[a3[4]];var aJ=a2[a3[5]];var bg=a2[a3[6]];var bf=a2[a3[7]];var a9=ba[0];var a8=ba[1];var a6=ba[2];var bj=(aP+(aO-aP)*a9)|0;var bi=(bn+(bm-bn)*a9)|0;var a0=(aK+(aJ-aK)*a9)|0;var aZ=(bg+(bf-bg)*a9)|0;var br=(bj+(bi-bj)*a8)|0;var bq=(a0+(aZ-a0)*a8)|0;return(br+(bq-br)*a6)|0;}else{if(a1==4){var aT=a2[a3[0]];var aS=a2[a3[1]];var bu=a2[a3[2]];var bt=a2[a3[3]];var aN=a2[a3[4]];var aM=a2[a3[5]];var bl=a2[a3[6]];var bk=a2[a3[7]];var be=a2[a3[8]];var bc=a2[a3[9]];var aX=a2[a3[10]];var aW=a2[a3[11]];var a7=a2[a3[12]];var a5=a2[a3[13]];var aR=a2[a3[14]];var aQ=a2[a3[15]];var a9=ba[0];var a8=ba[1];var a6=ba[2];var a4=ba[3];var aP=(aT+(aS-aT)*a9)|0;var aO=(bu+(bt-bu)*a9)|0;var bn=(aN+(aM-aN)*a9)|0;var bm=(bl+(bk-bl)*a9)|0;var aK=(be+(bc-be)*a9)|0;var aJ=(aX+(aW-aX)*a9)|0;var bg=(a7+(a5-a7)*a9)|0;var bf=(aR+(aQ-aR)*a9)|0;var bj=(aP+(aO-aP)*a8)|0;var bi=(bn+(bm-bn)*a8)|0;var a0=(aK+(aJ-aK)*a8)|0;var aZ=(bg+(bf-bg)*a8)|0;var br=(bj+(bi-bj)*a6)|0;var bq=(a0+(aZ-a0)*a6)|0;return(br+(bq-br)*a4)|0;}else{var aV=1<=ay._$T7){this.clipID=aH._$nP();this.clipIDList=this.convertClipIDForV2_11(this.clipID);}else{this.clipIDList=[];}this._$MS(this._$Lb);};ae.prototype.getClipIDList=function(){return this.clipIDList;};ae.prototype.init=function(aH){};ae.prototype._$Nr=function(aH,aI){aI._$IS[0]=false;aI._$Us=aG._$Z2(aH,this._$GS,aI._$IS,this._$Lb);if(Q._$Zs){}else{if(aI._$IS[0]){return;}}aI._$7s=aG._$br(aH,this._$GS,aI._$IS,this._$mS);};ae.prototype._$2b=function(aH,aI){};ae.prototype.getDrawDataID=function(){return this._$gP;};ae.prototype._$j2=function(aH){this._$gP=aH;};ae.prototype.getOpacity=function(aH,aI){return aI._$7s;};ae.prototype._$zS=function(aH,aI){return aI._$Us;};ae.prototype._$MS=function(aJ){for(var aI=aJ.length-1;aI>=0;--aI){var aH=aJ[aI];if(aHae._$R2){ae._$R2=aH;}}}};ae.prototype.getTargetBaseDataID=function(){return this._$dr;};ae.prototype._$gs=function(aH){this._$dr=aH;};ae.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};ae.prototype.preDraw=function(aJ,aH,aI){};ae.prototype.draw=function(aJ,aH,aI){};ae.prototype.getType=function(){};ae.prototype._$B2=function(aI,aH,aJ){};function ax(){if(j){return;}this._$Eb=ax._$ps;this._$lT=1;this._$C0=1;this._$tT=1;this._$WL=1;this.culling=false;this.matrix4x4=new Float32Array(16);this.premultipliedAlpha=false;this.anisotropy=0;this.clippingProcess=ax.CLIPPING_PROCESS_NONE;this.clipBufPre_clipContextMask=null;this.clipBufPre_clipContextDraw=null;this.CHANNEL_COLORS=new Array();}ax._$ps=32;ax.CLIPPING_PROCESS_NONE=0;ax.CLIPPING_PROCESS_OVERWRITE_ALPHA=1;ax.CLIPPING_PROCESS_MULTIPLY_ALPHA=2;ax.CLIPPING_PROCESS_DRAW=3;ax.CLIPPING_PROCESS_CLEAR_ALPHA=4;ax.prototype.setChannelFlagAsColor=function(aH,aI){this.CHANNEL_COLORS[aH]=aI;};ax.prototype.getChannelFlagAsColor=function(aH){return this.CHANNEL_COLORS[aH];};ax.prototype._$ZT=function(){};ax.prototype._$Uo=function(aM,aK,aJ,aL,aN,aI,aH){};ax.prototype._$Rs=function(){return -1;};ax.prototype._$Ds=function(aH){};ax.prototype.setBaseColor=function(aK,aJ,aI,aH){if(aK<0){aK=0;}else{if(aK>1){aK=1;}}if(aJ<0){aJ=0;}else{if(aJ>1){aJ=1;}}if(aI<0){aI=0;}else{if(aI>1){aI=1;}}if(aH<0){aH=0;}else{if(aH>1){aH=1;}}this._$lT=aK;this._$C0=aJ;this._$tT=aI;this._$WL=aH;};ax.prototype._$WP=function(aH){this.culling=aH;};ax.prototype.setMatrix=function(aH){for(var aI=0;aI<16;aI++){this.matrix4x4[aI]=aH[aI];}};ax.prototype._$IT=function(){return this.matrix4x4;};ax.prototype.setPremultipliedAlpha=function(aH){this.premultipliedAlpha=aH;};ax.prototype.isPremultipliedAlpha=function(){return this.premultipliedAlpha;};ax.prototype.setAnisotropy=function(aH){this.anisotropy=aH;};ax.prototype.getAnisotropy=function(){return this.anisotropy;};ax.prototype.getClippingProcess=function(){return this.clippingProcess;};ax.prototype.setClippingProcess=function(aH){this.clippingProcess=aH;};ax.prototype.setClipBufPre_clipContextForMask=function(aH){this.clipBufPre_clipContextMask=aH;};ax.prototype.getClipBufPre_clipContextMask=function(){return this.clipBufPre_clipContextMask;};ax.prototype.setClipBufPre_clipContextForDraw=function(aH){this.clipBufPre_clipContextDraw=aH;};ax.prototype.getClipBufPre_clipContextDraw=function(){return this.clipBufPre_clipContextDraw;};function o(){if(j){return;}this.a=1;this.r=1;this.g=1;this.b=1;this.scale=1;this._$ho=1;this.blendMode=Q.L2D_COLOR_BLEND_MODE_MULT;}function c(){if(j){return;}this._$kP=null;this._$dr=null;this._$Ai=true;this._$mS=null;}c._$ur=-2;c._$c2=1;c._$_b=2;c.prototype._$F0=function(aH){this._$kP=aH._$nP();this._$dr=aH._$nP();};c.prototype.readV2_opacity=function(aH){if(aH.getFormatVersion()>=ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2){this._$mS=aH._$Tb();}};c.prototype.init=function(aH){};c.prototype._$Nr=function(aI,aH){};c.prototype.interpolateOpacity=function(aJ,aK,aI,aH){if(this._$mS==null){aI.setInterpolatedOpacity(1);}else{aI.setInterpolatedOpacity(aG._$br(aJ,aK,aH,this._$mS));}};c.prototype._$2b=function(aI,aH){};c.prototype._$nb=function(aL,aK,aM,aH,aI,aJ,aN){};c.prototype.getType=function(){};c.prototype._$gs=function(aH){this._$dr=aH;};c.prototype._$a2=function(aH){this._$kP=aH;};c.prototype.getTargetBaseDataID=function(){return this._$dr;};c.prototype.getBaseDataID=function(){return this._$kP;};c.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};function P(){}P._$W2=0;P._$CS=P._$W2;P._$Mo=function(){return true;};P._$XP=function(aI){try{var aJ=getTimeMSec();while(getTimeMSec()-aJ=aJ.length){return false;}for(var aI=aL;aI=0;--aJ){var aI=this._$Ob[aJ].getParamIndex(aH);if(aI==aA._$ds){aI=aK.getParamIndex(this._$Ob[aJ].getParamID());}if(aK._$Xb(aI)){return true;}}return false;};g.prototype._$Q2=function(aL,aV){var aX=this._$Ob.length;var aJ=aL._$v2();var aN=0;var aI;var aQ;for(var aK=0;aKaw._$Qb){console.log("err 23245\n");}var aS=this._$Ob.length;var aK=1;var aH=1;var aJ=0;for(var aQ=0;aQ=0;--aK){aM[aK]=aL[aK];}}else{this.mult_fast(aI,aH,aM,aJ);}};ac.prototype.mult_fast=function(aI,aH,aK,aJ){if(aJ){aK[0]=aI[0]*aH[0]+aI[4]*aH[1]+aI[8]*aH[2];aK[4]=aI[0]*aH[4]+aI[4]*aH[5]+aI[8]*aH[6];aK[8]=aI[0]*aH[8]+aI[4]*aH[9]+aI[8]*aH[10];aK[12]=aI[0]*aH[12]+aI[4]*aH[13]+aI[8]*aH[14]+aI[12];aK[1]=aI[1]*aH[0]+aI[5]*aH[1]+aI[9]*aH[2];aK[5]=aI[1]*aH[4]+aI[5]*aH[5]+aI[9]*aH[6];aK[9]=aI[1]*aH[8]+aI[5]*aH[9]+aI[9]*aH[10];aK[13]=aI[1]*aH[12]+aI[5]*aH[13]+aI[9]*aH[14]+aI[13];aK[2]=aI[2]*aH[0]+aI[6]*aH[1]+aI[10]*aH[2];aK[6]=aI[2]*aH[4]+aI[6]*aH[5]+aI[10]*aH[6];aK[10]=aI[2]*aH[8]+aI[6]*aH[9]+aI[10]*aH[10];aK[14]=aI[2]*aH[12]+aI[6]*aH[13]+aI[10]*aH[14]+aI[14];aK[3]=aK[7]=aK[11]=0;aK[15]=1;}else{aK[0]=aI[0]*aH[0]+aI[4]*aH[1]+aI[8]*aH[2]+aI[12]*aH[3];aK[4]=aI[0]*aH[4]+aI[4]*aH[5]+aI[8]*aH[6]+aI[12]*aH[7];aK[8]=aI[0]*aH[8]+aI[4]*aH[9]+aI[8]*aH[10]+aI[12]*aH[11];aK[12]=aI[0]*aH[12]+aI[4]*aH[13]+aI[8]*aH[14]+aI[12]*aH[15];aK[1]=aI[1]*aH[0]+aI[5]*aH[1]+aI[9]*aH[2]+aI[13]*aH[3];aK[5]=aI[1]*aH[4]+aI[5]*aH[5]+aI[9]*aH[6]+aI[13]*aH[7];aK[9]=aI[1]*aH[8]+aI[5]*aH[9]+aI[9]*aH[10]+aI[13]*aH[11];aK[13]=aI[1]*aH[12]+aI[5]*aH[13]+aI[9]*aH[14]+aI[13]*aH[15];aK[2]=aI[2]*aH[0]+aI[6]*aH[1]+aI[10]*aH[2]+aI[14]*aH[3];aK[6]=aI[2]*aH[4]+aI[6]*aH[5]+aI[10]*aH[6]+aI[14]*aH[7];aK[10]=aI[2]*aH[8]+aI[6]*aH[9]+aI[10]*aH[10]+aI[14]*aH[11];aK[14]=aI[2]*aH[12]+aI[6]*aH[13]+aI[10]*aH[14]+aI[14]*aH[15];aK[3]=aI[3]*aH[0]+aI[7]*aH[1]+aI[11]*aH[2]+aI[15]*aH[3];aK[7]=aI[3]*aH[4]+aI[7]*aH[5]+aI[11]*aH[6]+aI[15]*aH[7];aK[11]=aI[3]*aH[8]+aI[7]*aH[9]+aI[11]*aH[10]+aI[15]*aH[11];aK[15]=aI[3]*aH[12]+aI[7]*aH[13]+aI[11]*aH[14]+aI[15]*aH[15];}};ac.prototype.translate=function(aH,aJ,aI){this.m[12]=this.m[0]*aH+this.m[4]*aJ+this.m[8]*aI+this.m[12];this.m[13]=this.m[1]*aH+this.m[5]*aJ+this.m[9]*aI+this.m[13];this.m[14]=this.m[2]*aH+this.m[6]*aJ+this.m[10]*aI+this.m[14];this.m[15]=this.m[3]*aH+this.m[7]*aJ+this.m[11]*aI+this.m[15];};ac.prototype.scale=function(aJ,aI,aH){this.m[0]*=aJ;this.m[4]*=aI;this.m[8]*=aH;this.m[1]*=aJ;this.m[5]*=aI;this.m[9]*=aH;this.m[2]*=aJ;this.m[6]*=aI;this.m[10]*=aH;this.m[3]*=aJ;this.m[7]*=aI;this.m[11]*=aH;};ac.prototype.rotateX=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[4];this.m[4]=aI*aK+this.m[8]*aJ;this.m[8]=aI*-aJ+this.m[8]*aK;aI=this.m[5];this.m[5]=aI*aK+this.m[9]*aJ;this.m[9]=aI*-aJ+this.m[9]*aK;aI=this.m[6];this.m[6]=aI*aK+this.m[10]*aJ;this.m[10]=aI*-aJ+this.m[10]*aK;aI=this.m[7];this.m[7]=aI*aK+this.m[11]*aJ;this.m[11]=aI*-aJ+this.m[11]*aK;};ac.prototype.rotateY=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[0];this.m[0]=aI*aK+this.m[8]*-aJ;this.m[8]=aI*aJ+this.m[8]*aK;aI=this.m[1];this.m[1]=aI*aK+this.m[9]*-aJ;this.m[9]=aI*aJ+this.m[9]*aK;aI=m[2];this.m[2]=aI*aK+this.m[10]*-aJ;this.m[10]=aI*aJ+this.m[10]*aK;aI=m[3];this.m[3]=aI*aK+this.m[11]*-aJ;this.m[11]=aI*aJ+this.m[11]*aK;};ac.prototype.rotateZ=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[0];this.m[0]=aI*aK+this.m[4]*aJ;this.m[4]=aI*-aJ+this.m[4]*aK;aI=this.m[1];this.m[1]=aI*aK+this.m[5]*aJ;this.m[5]=aI*-aJ+this.m[5]*aK;aI=this.m[2];this.m[2]=aI*aK+this.m[6]*aJ;this.m[6]=aI*-aJ+this.m[6]*aK;aI=this.m[3];this.m[3]=aI*aK+this.m[7]*aJ;this.m[7]=aI*-aJ+this.m[7]*aK;};function Z(aH){if(j){return;}ak.prototype.constructor.call(this,aH);}Z.prototype=new ak();Z._$tP=new Object();Z._$27=function(){Z._$tP.clear();};Z.getID=function(aH){var aI=Z._$tP[aH];if(aI==null){aI=new Z(aH);Z._$tP[aH]=aI;}return aI;};Z.prototype._$3s=function(){return new Z();};function aD(){if(j){return;}this._$7=1;this._$f=0;this._$H=0;this._$g=1;this._$k=0;this._$w=0;this._$hi=STATE_IDENTITY;this._$Z=_$pS;}aD._$kS=-1;aD._$pS=0;aD._$hb=1;aD.STATE_IDENTITY=0;aD._$gb=1;aD._$fo=2;aD._$go=4;aD.prototype.transform=function(aK,aI,aH){var aT,aS,aR,aM,aL,aJ;var aQ=0;var aN=0;switch(this._$hi){default:return;case (aD._$go|aD._$fo|aD._$gb):aT=this._$7;aS=this._$H;aR=this._$k;aM=this._$f;aL=this._$g;aJ=this._$w;while(--aH>=0){var aP=aK[aQ++];var aO=aK[aQ++];aI[aN++]=(aT*aP+aS*aO+aR);aI[aN++]=(aM*aP+aL*aO+aJ);}return;case (aD._$go|aD._$fo):aT=this._$7;aS=this._$H;aM=this._$f;aL=this._$g;while(--aH>=0){var aP=aK[aQ++];var aO=aK[aQ++];aI[aN++]=(aT*aP+aS*aO);aI[aN++]=(aM*aP+aL*aO);}return;case (aD._$go|aD._$gb):aS=this._$H;aR=this._$k;aM=this._$f;aJ=this._$w;while(--aH>=0){var aP=aK[aQ++];aI[aN++]=(aS*aK[aQ++]+aR);aI[aN++]=(aM*aP+aJ);}return;case (aD._$go):aS=this._$H;aM=this._$f;while(--aH>=0){var aP=aK[aQ++];aI[aN++]=(aS*aK[aQ++]);aI[aN++]=(aM*aP);}return;case (aD._$fo|aD._$gb):aT=this._$7;aR=this._$k;aL=this._$g;aJ=this._$w;while(--aH>=0){aI[aN++]=(aT*aK[aQ++]+aR);aI[aN++]=(aL*aK[aQ++]+aJ);}return;case (aD._$fo):aT=this._$7;aL=this._$g;while(--aH>=0){aI[aN++]=(aT*aK[aQ++]);aI[aN++]=(aL*aK[aQ++]);}return;case (aD._$gb):aR=this._$k;aJ=this._$w;while(--aH>=0){aI[aN++]=(aK[aQ++]+aR);aI[aN++]=(aK[aQ++]+aJ);}return;case (aD.STATE_IDENTITY):if(aK!=aI||aQ!=aN){P._$jT(aK,aQ,aI,aN,aH*2);}return;}};aD.prototype.update=function(){if(this._$H==0&&this._$f==0){if(this._$7==1&&this._$g==1){if(this._$k==0&&this._$w==0){this._$hi=aD.STATE_IDENTITY;this._$Z=aD._$pS;}else{this._$hi=aD._$gb;this._$Z=aD._$hb;}}else{if(this._$k==0&&this._$w==0){this._$hi=aD._$fo;this._$Z=aD._$kS;}else{this._$hi=(aD._$fo|aD._$gb);this._$Z=aD._$kS;}}}else{if(this._$7==0&&this._$g==0){if(this._$k==0&&this._$w==0){this._$hi=aD._$go;this._$Z=aD._$kS;}else{this._$hi=(aD._$go|aD._$gb);this._$Z=aD._$kS;}}else{if(this._$k==0&&this._$w==0){this._$hi=(aD._$go|aD._$fo);this._$Z=aD._$kS;}else{this._$hi=(aD._$go|aD._$fo|aD._$gb);this._$Z=aD._$kS;}}}};aD.prototype._$RT=function(aK){this._$IT(aK);var aJ=aK[0];var aH=aK[2];var aN=aK[1];var aM=aK[3];var aI=Math.sqrt(aJ*aJ+aN*aN);var aL=aJ*aM-aH*aN;if(aI==0){if(Q._$so){console.log("affine._$RT() / rt==0");}}else{aK[0]=aI;aK[1]=aL/aI;aK[2]=(aN*aM+aJ*aH)/aL;aK[3]=Math.atan2(aN,aJ);}};aD.prototype._$ho=function(aN,aM,aI,aH){var aL=new Float32Array(6);var aK=new Float32Array(6);aN._$RT(aL);aM._$RT(aK);var aJ=new Float32Array(6);aJ[0]=aL[0]+(aK[0]-aL[0])*aI;aJ[1]=aL[1]+(aK[1]-aL[1])*aI;aJ[2]=aL[2]+(aK[2]-aL[2])*aI;aJ[3]=aL[3]+(aK[3]-aL[3])*aI;aJ[4]=aL[4]+(aK[4]-aL[4])*aI;aJ[5]=aL[5]+(aK[5]-aL[5])*aI;aH._$CT(aJ);};aD.prototype._$CT=function(aJ){var aI=Math.cos(aJ[3]);var aH=Math.sin(aJ[3]);this._$7=aJ[0]*aI;this._$f=aJ[0]*aH;this._$H=aJ[1]*(aJ[2]*aI-aH);this._$g=aJ[1]*(aJ[2]*aH+aI);this._$k=aJ[4];this._$w=aJ[5];this.update();};aD.prototype._$IT=function(aH){aH[0]=this._$7;aH[1]=this._$f;aH[2]=this._$H;aH[3]=this._$g;aH[4]=this._$k;aH[5]=this._$w;};function Y(){if(j){return;}ah.prototype.constructor.call(this);this.motions=new Array();this._$7r=null;this._$7r=Y._$Co++;this._$D0=30;this._$yT=0;this._$E=true;this.loopFadeIn=true;this._$AS=-1;_$a0();}Y.prototype=new ah();Y._$cs="VISIBLE:";Y._$ar="LAYOUT:";Y._$Co=0;Y._$D2=[];Y._$1T=1;Y.loadMotion=function(aR){var aM=new Y();var aI=[0];var aP=aR.length;aM._$yT=0;for(var aJ=0;aJ=0){if(aK==aT+4&&aR[aT+1]=="f"&&aR[aT+2]=="p"&&aR[aT+3]=="s"){aO=true;}for(aJ=aK+1;aJ0){if(aO&&5=0){var aN=new t();if(G.startsWith(aR,aT,Y._$cs)){aN._$RP=t._$hs;aN._$4P=new String(aR,aT,aK-aT);}else{if(G.startsWith(aR,aT,Y._$ar)){aN._$4P=new String(aR,aT+7,aK-aT-7);if(G.startsWith(aR,aT+7,"ANCHOR_X")){aN._$RP=t._$xs;}else{if(G.startsWith(aR,aT+7,"ANCHOR_Y")){aN._$RP=t._$us;}else{if(G.startsWith(aR,aT+7,"SCALE_X")){aN._$RP=t._$qs;}else{if(G.startsWith(aR,aT+7,"SCALE_Y")){aN._$RP=t._$Ys;}else{if(G.startsWith(aR,aT+7,"X")){aN._$RP=t._$ws;}else{if(G.startsWith(aR,aT+7,"Y")){aN._$RP=t._$Ns;}}}}}}}else{aN._$RP=t._$Fr;aN._$4P=new String(aR,aT,aK-aT);}}aM.motions.push(aN);var aS=0;Y._$D2.clear();for(aJ=aK+1;aJ0){Y._$D2.push(aL);aS++;var aH=aI[0];if(aHaM._$yT){aM._$yT=aS;}}}}aM._$AS=((1000*aM._$yT)/aM._$D0)|0;return aM;};Y.prototype.getDurationMSec=function(){return this._$AS;};Y.prototype.dump=function(){for(var aJ=0;aJ=aK?aK-1:aJ)];aH.setParamFloat(aQ,aT);}else{if(t._$ws<=aS._$RP&&aS._$RP<=t._$Ys){}else{var aR=aH.getParamFloat(aQ);var aY=aS._$I0[(aJ>=aK?aK-1:aJ)];var aW=aS._$I0[(aJ+1>=aK?aK-1:aJ+1)];var aI=aY+(aW-aY)*aP;var aN=aR+(aI-aR)*aO;aH.setParamFloat(aQ,aN);}}}if(aJ>=this._$yT){if(this._$E){aX._$z2=aL;if(this.loopFadeIn){aX._$bs=aL;}}else{aX._$9L=true;}}};Y.prototype._$r0=function(){return this._$E;};Y.prototype._$aL=function(aH){this._$E=aH;};Y.prototype.isLoopFadeIn=function(){return this.loopFadeIn;};Y.prototype.setLoopFadeIn=function(aH){this.loopFadeIn=aH;};function aE(){this._$P=new Float32Array(100);this.size=0;}aE.prototype.clear=function(){this.size=0;};aE.prototype.add=function(aI){if(this._$P.length<=this.size){var aH=new Float32Array(this.size*2);P._$jT(this._$P,0,aH,0,this.size);this._$P=aH;}this._$P[this.size++]=aI;};aE.prototype._$BL=function(){var aH=new Float32Array(this.size);P._$jT(this._$P,0,aH,0,this.size);return aH;};function t(){this._$4P=null;this._$I0=null;this._$RP=null;}t._$Fr=0;t._$hs=1;t._$ws=100;t._$Ns=101;t._$xs=102;t._$us=103;t._$qs=104;t._$Ys=105;function aw(){}aw._$Ms=1;aw._$Qs=2;aw._$i2=0;aw._$No=2;aw._$do=aw._$Ms;aw._$Ls=true;aw._$1r=5;aw._$Qb=65;aw._$J=0.0001;aw._$FT=0.001;aw._$Ss=3;function ay(){}ay._$o7=6;ay._$S7=7;ay._$s7=8;ay._$77=9;ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2=10;ay.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1=11;ay._$T7=ay.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1;ay._$Is=-2004318072;ay._$h0=0;ay._$4L=23;ay._$7P=33;ay._$uT=function(aH){console.log("_$bo :: _$6 _$mo _$E0 : %d\n",aH);};ay._$9o=function(aH){if(aH<40){ay._$uT(aH);return null;}else{if(aH<50){ay._$uT(aH);return null;}else{if(aH<60){ay._$uT(aH);return null;}else{if(aH<100){switch(aH){case 65:return new E();case 66:return new g();case 67:return new aA();case 68:return new ab();case 69:return new X();case 70:return new b();default:ay._$uT(aH);return null;}}else{if(aH<150){switch(aH){case 131:return new f();case 133:return new s();case 136:return new w();case 137:return new an();case 142:return new aq();}}}}}}ay._$uT(aH);return null;};function y(aH){if(j){return;}this._$QT=true;this._$co=-1;this._$qo=0;this._$pb=new Array(y._$is);this._$_2=new Float32Array(y._$is);this._$vr=new Float32Array(y._$is);this._$Rr=new Float32Array(y._$is);this._$Or=new Float32Array(y._$is);this._$fs=new Float32Array(y._$is);this._$Js=new Array(y._$is);this._$3S=new Array();this._$aS=new Array();this._$Bo=null;this._$F2=new Array();this._$db=new Array();this._$8b=new Array();this._$Hr=new Array();this._$Ws=null;this._$Vs=null;this._$Er=null;this._$Es=new Int16Array(aw._$Qb);this._$ZP=new Float32Array(aw._$1r*2);this._$Ri=aH;this._$b0=y._$HP++;this.clipManager=null;this.dp_webgl=null;}y._$HP=0;y._$_0=true;y._$V2=-1;y._$W0=-1;y._$jr=false;y._$ZS=true;y._$tr=(-1000000);y._$lr=(1000000);y._$is=32;y._$e=false;y.prototype.getDrawDataIndex=function(aI){for(var aH=this._$aS.length-1;aH>=0;--aH){if(this._$aS[aH]!=null&&this._$aS[aH].getDrawDataID()==aI){return aH;}}return -1;};y.prototype.getDrawData=function(aH){if(aH instanceof Z){if(this._$Bo==null){this._$Bo=new Object();var aJ=this._$aS.length;for(var aI=0;aI0){this.release();}var aO=this._$Ri.getModelImpl();var aT=aO._$Xr();var aS=aT.length;var aH=new Array();var a3=new Array();for(var aV=0;aV=0){this._$3S.push(aL);this._$db.push(a3[aV]);aH[aV]=null;aX=true;}}if(!aX){break;}}var aI=aO._$E2();if(aI!=null){var aJ=aI._$1s();if(aJ!=null){var aW=aJ.length;for(var aV=0;aV=0;aW--){this._$Js[aW]=y._$jr;}this._$QT=false;if(y._$e){q.dump("_$eL");}return aX;};y.prototype.preDraw=function(aH){if(this.clipManager!=null){aH._$ZT();this.clipManager.setupClip(this,aH);}};y.prototype.draw=function(aM){if(this._$Ws==null){q._$li("call _$Ri.update() before _$Ri.draw() ");return;}var aP=this._$Ws.length;aM._$ZT();for(var aK=0;aK=0;--aI){if(this._$pb[aI]==aH){return aI;}}return this._$02(aH,0,y._$tr,y._$lr);};y.prototype._$BS=function(aH){return this.getBaseDataIndex(aH);};y.prototype.getBaseDataIndex=function(aH){for(var aI=this._$3S.length-1;aI>=0;--aI){if(this._$3S[aI]!=null&&this._$3S[aI].getBaseDataID()==aH){return aI;}}return -1;};y.prototype._$UT=function(aJ,aH){var aI=new Float32Array(aH);P._$jT(aJ,0,aI,0,aJ.length);return aI;};y.prototype._$02=function(aN,aM,aL,aH){if(this._$qo>=this._$pb.length){var aK=this._$pb.length;var aJ=new Array(aK*2);P._$jT(this._$pb,0,aJ,0,aK);this._$pb=aJ;this._$_2=this._$UT(this._$_2,aK*2);this._$vr=this._$UT(this._$vr,aK*2);this._$Rr=this._$UT(this._$Rr,aK*2);this._$Or=this._$UT(this._$Or,aK*2);var aI=new Array();P._$jT(this._$Js,0,aI,0,aK);this._$Js=aI;}this._$pb[this._$qo]=aN;this._$_2[this._$qo]=aM;this._$vr[this._$qo]=aM;this._$Rr[this._$qo]=aL;this._$Or[this._$qo]=aH;this._$Js[this._$qo]=y._$ZS;return this._$qo++;};y.prototype._$Zo=function(aI,aH){this._$3S[aI]=aH;};y.prototype.setParamFloat=function(aH,aI){if(aIthis._$Or[aH]){aI=this._$Or[aH];}this._$_2[aH]=aI;};y.prototype.loadParam=function(){var aH=this._$_2.length;if(aH>this._$fs.length){aH=this._$fs.length;}P._$jT(this._$fs,0,this._$_2,0,aH);};y.prototype.saveParam=function(){var aH=this._$_2.length;if(aH>this._$fs.length){this._$fs=new Float32Array(aH);}P._$jT(this._$_2,0,this._$fs,0,aH);};y.prototype._$v2=function(){return this._$co;};y.prototype._$WS=function(){return this._$QT;};y.prototype._$Xb=function(aH){return this._$Js[aH]==y._$ZS;};y.prototype._$vs=function(){return this._$Es;};y.prototype._$Tr=function(){return this._$ZP;};y.prototype.getBaseData=function(aH){return this._$3S[aH];};y.prototype.getParamFloat=function(aH){return this._$_2[aH];};y.prototype.getParamMax=function(aH){return this._$Or[aH];};y.prototype.getParamMin=function(aH){return this._$Rr[aH];};y.prototype.setPartsOpacity=function(aJ,aH){var aI=this._$Hr[aJ];aI.setPartsOpacity(aH);};y.prototype.getPartsOpacity=function(aI){var aH=this._$Hr[aI];return aH.getPartsOpacity();};y.prototype.getPartsDataIndex=function(aI){for(var aH=this._$F2.length-1;aH>=0;--aH){if(this._$F2[aH]!=null&&this._$F2[aH]._$p2()==aI){return aH;}}return -1;};y.prototype._$q2=function(aH){return this._$db[aH];};y.prototype._$C2=function(aH){return this._$8b[aH];};y.prototype._$Bb=function(aH){return this._$Hr[aH];};y.prototype._$5s=function(aO,aK){var aJ=this._$Ws.length;var aN=aO;for(var aL=0;aL0){aL+=aK;}return aI;};ap._$C=function(aJ){var aI=null;var aL=null;try{aI=(aJ instanceof Array)?aJ:new _$Xs(aJ,8192);aL=new _$js();var aM=1000;var aK;var aH=new Int8Array(aM);while((aK=aI.read(aH))>0){aL.write(aH,0,aK);}return aL._$TS();}finally{if(aJ!=null){aJ.close();}if(aL!=null){aL.flush();aL.close();}}};function ar(){if(j){return;}this._$12=null;this._$bb=null;this._$_L=null;this._$jo=null;this._$iL=null;this._$0L=null;this._$Br=null;this._$Dr=null;this._$Cb=null;this._$mr=null;this._$_L=az.STATE_FIRST;this._$Br=4000;this._$Dr=100;this._$Cb=50;this._$mr=150;this._$jo=true;this._$iL="PARAM_EYE_L_OPEN";this._$0L="PARAM_EYE_R_OPEN";}ar.prototype._$T2=function(){var aI=P.getUserTimeMSec();var aH=Math._$10();return(aI+aH*(2*this._$Br-1));};ar.prototype._$uo=function(aH){this._$Br=aH;};ar.prototype._$QS=function(aI,aH,aJ){this._$Dr=aI;this._$Cb=aH;this._$mr=aJ;};ar.prototype._$7T=function(aI){var aK=P.getUserTimeMSec();var aH;var aJ=0;switch(this._$_L){case STATE_CLOSING:aJ=(aK-this._$bb)/this._$Dr;if(aJ>=1){aJ=1;this._$_L=az.STATE_CLOSED;this._$bb=aK;}aH=1-aJ;break;case STATE_CLOSED:aJ=(aK-this._$bb)/this._$Cb;if(aJ>=1){this._$_L=az.STATE_OPENING;this._$bb=aK;}aH=0;break;case STATE_OPENING:aJ=(aK-this._$bb)/this._$mr;if(aJ>=1){aJ=1;this._$_L=az.STATE_INTERVAL;this._$12=this._$T2();}aH=aJ;break;case STATE_INTERVAL:if(this._$120.9?Q.EXPAND_W:0;this.gl.drawElements(aL,aP,aI,aQ,aM,aN,this.transform,aJ);};x.prototype._$Rs=function(){throw new Error("_$Rs");};x.prototype._$Ds=function(aH){throw new Error("_$Ds");};x.prototype._$K2=function(){for(var aH=0;aH=0;--aI){var aH=aJ[aI];if(aHa._$R2){a._$R2=aH;}}}};a._$or=function(){return a._$52;};a._$Pr=function(){return a._$R2;};a.prototype._$F0=function(aH){this._$gP=aH._$nP();this._$dr=aH._$nP();this._$GS=aH._$nP();this._$qb=aH._$6L();this._$Lb=aH._$cS();this._$mS=aH._$Tb();if(aH.getFormatVersion()>=ay._$T7){this.clipID=aH._$nP();this.clipIDList=this.convertClipIDForV2_11(this.clipID);}else{this.clipIDList=null;}a._$Sb(this._$Lb);};a.prototype.getClipIDList=function(){return this.clipIDList;};a.prototype._$Nr=function(aI,aH){aH._$IS[0]=false;aH._$Us=aG._$Z2(aI,this._$GS,aH._$IS,this._$Lb);if(Q._$Zs){}else{if(aH._$IS[0]){return;}}aH._$7s=aG._$br(aI,this._$GS,aH._$IS,this._$mS);};a.prototype._$2b=function(aH){};a.prototype.getDrawDataID=function(){return this._$gP;};a.prototype._$j2=function(aH){this._$gP=aH;};a.prototype.getOpacity=function(aH,aI){return aI._$7s;};a.prototype._$zS=function(aH,aI){return aI._$Us;};a.prototype.getTargetBaseDataID=function(){return this._$dr;};a.prototype._$gs=function(aH){this._$dr=aH;};a.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};a.prototype.getType=function(){};function aq(){if(j){return;}this._$NL=null;this._$3S=null;this._$aS=null;aq._$42++;}aq._$42=0;aq.prototype._$1b=function(){return this._$3S;};aq.prototype.getDrawDataList=function(){return this._$aS;};aq.prototype._$F0=function(aH){this._$NL=aH._$nP();this._$aS=aH._$nP();this._$3S=aH._$nP();};aq.prototype._$kr=function(aH){aH._$Zo(this._$3S);aH._$xo(this._$aS);this._$3S=null;this._$aS=null;};function v(){if(j){return;}aa.prototype.constructor.call(this);this._$zo=new x();}v.prototype=new aa();v.loadModel=function(aI){var aH=new v();aa._$62(aH,aI);return aH;};v.loadModel=function(aI){var aH=new v();aa._$62(aH,aI);return aH;};v._$to=function(){var aH=new v();return aH;};v._$er=function(aM){var aJ=new _$5("../_$_r/_$t0/_$Ri/_$_P._$d");if(aJ.exists()==false){throw new _$ls("_$t0 _$_ _$6 _$Ui :: "+aJ._$PL());}var aH=["../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1"];var aK=v.loadModel(aJ._$3b());for(var aI=0;aI=0){if(aK==aV+4&&p(aT,aV+1)=="f"&&p(aT,aV+2)=="p"&&p(aT,aV+3)=="s"){aP=true;}for(aJ=aK+1;aJ0){if(aP&&5=0){var aO=new t();if(G.startsWith(aT,aV,ao._$cs)){aO._$RP=t._$hs;aO._$4P=G.createString(aT,aV,aK-aV);}else{if(G.startsWith(aT,aV,ao._$ar)){aO._$4P=G.createString(aT,aV+7,aK-aV-7);if(G.startsWith(aT,aV+7,"ANCHOR_X")){aO._$RP=t._$xs;}else{if(G.startsWith(aT,aV+7,"ANCHOR_Y")){aO._$RP=t._$us;}else{if(G.startsWith(aT,aV+7,"SCALE_X")){aO._$RP=t._$qs;}else{if(G.startsWith(aT,aV+7,"SCALE_Y")){aO._$RP=t._$Ys;}else{if(G.startsWith(aT,aV+7,"X")){aO._$RP=t._$ws;}else{if(G.startsWith(aT,aV+7,"Y")){aO._$RP=t._$Ns;}}}}}}}else{aO._$RP=t._$Fr;aO._$4P=G.createString(aT,aV,aK-aV);}}aN.motions.push(aO);var aU=0;var aR=[];for(aJ=aK+1;aJ0){aR.push(aM);aU++;var aH=aI[0];if(aHaN._$yT){aN._$yT=aU;}}}}aN._$rr=((1000*aN._$yT)/aN._$D0)|0;return aN;};ao.prototype.getDurationMSec=function(){return this._$E?-1:this._$rr;};ao.prototype.getLoopDurationMSec=function(){return this._$rr;};ao.prototype.dump=function(){for(var aJ=0;aJ=aL?aL-1:aK)];aJ.setParamFloat(aT,aX);}else{if(t._$ws<=aV._$RP&&aV._$RP<=t._$Ys){}else{var aH=aJ.getParamIndex(aT);var a4=aJ.getModelContext();var aY=a4.getParamMax(aH);var aW=a4.getParamMin(aH);var aM=0.4;var aS=aM*(aY-aW);var aU=a4.getParamFloat(aH);var a2=aV._$I0[(aK>=aL?aL-1:aK)];var a1=aV._$I0[(aK+1>=aL?aL-1:aK+1)];var aI;if((a2aS)||(a2>a1&&a2-a1>aS)){aI=a2;}else{aI=a2+(a1-a2)*aR;}var aP=aU+(aI-aU)*aQ;aJ.setParamFloat(aT,aP);}}}if(aK>=this._$yT){if(this._$E){a3._$z2=aN;if(this.loopFadeIn){a3._$bs=aN;}}else{a3._$9L=true;}}this._$eP=aQ;};ao.prototype._$r0=function(){return this._$E;};ao.prototype._$aL=function(aH){this._$E=aH;};ao.prototype._$S0=function(){return this._$D0;};ao.prototype._$U0=function(aH){this._$D0=aH;};ao.prototype.isLoopFadeIn=function(){return this.loopFadeIn;};ao.prototype.setLoopFadeIn=function(aH){this.loopFadeIn=aH;};function aE(){this._$P=new Float32Array(100);this.size=0;}aE.prototype.clear=function(){this.size=0;};aE.prototype.add=function(aI){if(this._$P.length<=this.size){var aH=new Float32Array(this.size*2);P._$jT(this._$P,0,aH,0,this.size);this._$P=aH;}this._$P[this.size++]=aI;};aE.prototype._$BL=function(){var aH=new Float32Array(this.size);P._$jT(this._$P,0,aH,0,this.size);return aH;};function t(){this._$4P=null;this._$I0=null;this._$RP=null;}t._$Fr=0;t._$hs=1;t._$ws=100;t._$Ns=101;t._$xs=102;t._$us=103;t._$qs=104;t._$Ys=105;function E(){if(j){return;}c.prototype.constructor.call(this);this._$o=0;this._$A=0;this._$GS=null;this._$Eo=null;}E.prototype=new c();E._$gT=new Array();E.prototype._$zP=function(){this._$GS=new g();this._$GS._$zP();};E.prototype._$F0=function(aH){c.prototype._$F0.call(this,aH);this._$A=aH._$6L();this._$o=aH._$6L();this._$GS=aH._$nP();this._$Eo=aH._$nP();c.prototype.readV2_opacity.call(this,aH);};E.prototype.init=function(aH){var aI=new H(this);var aJ=(this._$o+1)*(this._$A+1);if(aI._$Cr!=null){aI._$Cr=null;}aI._$Cr=new Float32Array(aJ*2);if(aI._$hr!=null){aI._$hr=null;}if(this._$32()){aI._$hr=new Float32Array(aJ*2);}else{aI._$hr=null;}return aI;};E.prototype._$Nr=function(aJ,aI){var aK=aI;if(!this._$GS._$Ur(aJ)){return;}var aL=this._$VT();var aH=E._$gT;aH[0]=false;aG._$Vr(aJ,this._$GS,aH,aL,this._$Eo,aK._$Cr,0,2);aI._$Ib(aH[0]);this.interpolateOpacity(aJ,this._$GS,aI,aH);};E.prototype._$2b=function(aK,aJ){var aL=aJ;aL._$hS(true);if(!this._$32()){aL.setTotalOpacity(aL.getInterpolatedOpacity());}else{var aH=this.getTargetBaseDataID();if(aL._$8r==c._$ur){aL._$8r=aK.getBaseDataIndex(aH);}if(aL._$8r<0){if(Q._$so){q._$li("_$L _$0P _$G :: %s",aH);}aL._$hS(false);}else{var aN=aK.getBaseData(aL._$8r);var aI=aK._$q2(aL._$8r);if(aN!=null&&aI._$yo()){var aM=aI.getTotalScale();aL.setTotalScale_notForClient(aM);var aO=aI.getTotalOpacity();aL.setTotalOpacity(aO*aL.getInterpolatedOpacity());aN._$nb(aK,aI,aL._$Cr,aL._$hr,this._$VT(),0,2);aL._$hS(true);}else{aL._$hS(false);}}}};E.prototype._$nb=function(aL,aI,aH,aM,aO,aK,aJ){if(true){var aN=aI;var aP=(aN._$hr!=null)?aN._$hr:aN._$Cr;E.transformPoints_sdk2(aH,aM,aO,aK,aJ,aP,this._$o,this._$A);}else{this.transformPoints_sdk1(aL,aI,aH,aM,aO,aK,aJ);}};E.transformPoints_sdk2=function(a0,bc,a5,aP,aI,aR,aQ,aU){var aW=a5*aI;var aV;var bn,bm;var aT=0;var aS=0;var bl=0;var bk=0;var bf=0;var be=0;var aZ=false;for(var ba=aP;ba=1){var aK=aR[((0)+(aU)*a1)*2];var aJ=aR[((0)+(aU)*a1)*2+1];var aO=aT-2*bl+1*bf;var aN=aS-2*bk+1*be;var a3=aT+3*bf;var a2=aS+3*be;var a8=aT-2*bl+3*bf;var a6=aS-2*bk+3*be;var bj=0.5*(a4-(-2));var bi=0.5*(aX-(1));if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{var aH=(a7|0);if(aH==aU){aH=aU-1;}var bj=0.5*(a4-(-2));var bi=a7-aH;var bb=aH/aU;var a9=(aH+1)/aU;var aK=aR[((0)+(aH)*a1)*2];var aJ=aR[((0)+(aH)*a1)*2+1];var a3=aR[((0)+(aH+1)*a1)*2];var a2=aR[((0)+(aH+1)*a1)*2+1];var aO=aT-2*bl+bb*bf;var aN=aS-2*bk+bb*be;var a8=aT-2*bl+a9*bf;var a6=aS-2*bk+a9*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}}}else{if(1<=a4){if(aX<=0){var a8=aR[((aQ)+(0)*a1)*2];var a6=aR[((aQ)+(0)*a1)*2+1];var a3=aT+3*bl;var a2=aS+3*bk;var aO=aT+1*bl-2*bf;var aN=aS+1*bk-2*be;var aK=aT+3*bl-2*bf;var aJ=aS+3*bk-2*be;var bj=0.5*(a4-(1));var bi=0.5*(aX-(-2));if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{if(aX>=1){var aO=aR[((aQ)+(aU)*a1)*2];var aN=aR[((aQ)+(aU)*a1)*2+1];var aK=aT+3*bl+1*bf;var aJ=aS+3*bk+1*be;var a8=aT+1*bl+3*bf;var a6=aS+1*bk+3*be;var a3=aT+3*bl+3*bf;var a2=aS+3*bk+3*be;var bj=0.5*(a4-(1));var bi=0.5*(aX-(1));if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{var aH=(a7|0);if(aH==aU){aH=aU-1;}var bj=0.5*(a4-(1));var bi=a7-aH;var bb=aH/aU;var a9=(aH+1)/aU;var aO=aR[((aQ)+(aH)*a1)*2];var aN=aR[((aQ)+(aH)*a1)*2+1];var a8=aR[((aQ)+(aH+1)*a1)*2];var a6=aR[((aQ)+(aH+1)*a1)*2+1];var aK=aT+3*bl+bb*bf;var aJ=aS+3*bk+bb*be;var a3=aT+3*bl+a9*bf;var a2=aS+3*bk+a9*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}}}else{if(aX<=0){var aY=(bd|0);if(aY==aQ){aY=aQ-1;}var bj=bd-aY;var bi=0.5*(aX-(-2));var bp=aY/aQ;var bo=(aY+1)/aQ;var a8=aR[((aY)+(0)*a1)*2];var a6=aR[((aY)+(0)*a1)*2+1];var a3=aR[((aY+1)+(0)*a1)*2];var a2=aR[((aY+1)+(0)*a1)*2+1];var aO=aT+bp*bl-2*bf;var aN=aS+bp*bk-2*be;var aK=aT+bo*bl-2*bf;var aJ=aS+bo*bk-2*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{if(aX>=1){var aY=(bd|0);if(aY==aQ){aY=aQ-1;}var bj=bd-aY;var bi=0.5*(aX-(1));var bp=aY/aQ;var bo=(aY+1)/aQ;var aO=aR[((aY)+(aU)*a1)*2];var aN=aR[((aY)+(aU)*a1)*2+1];var aK=aR[((aY+1)+(aU)*a1)*2];var aJ=aR[((aY+1)+(aU)*a1)*2+1];var a8=aT+bp*bl+3*bf;var a6=aS+bp*bk+3*be;var a3=aT+bo*bl+3*bf;var a2=aS+bo*bk+3*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{System.err.printf("_$li calc : %.4f , %.4f @@BDBoxGrid\n",a4,aX);}}}}}else{bc[ba]=aT+a4*bl+aX*bf;bc[ba+1]=aS+a4*bk+aX*be;}}else{bn=bd-(bd|0);bm=a7-(a7|0);aV=2*((bd|0)+((a7|0))*(aQ+1));if(bn+bm<1){bc[ba]=aR[aV]*(1-bn-bm)+aR[aV+2]*bn+aR[aV+2*(aQ+1)]*bm;bc[ba+1]=aR[aV+1]*(1-bn-bm)+aR[aV+3]*bn+aR[aV+2*(aQ+1)+1]*bm;}else{bc[ba]=aR[aV+2*(aQ+1)+2]*(bn-1+bm)+aR[aV+2*(aQ+1)]*(1-bn)+aR[aV+2]*(1-bm);bc[ba+1]=aR[aV+2*(aQ+1)+3]*(bn-1+bm)+aR[aV+2*(aQ+1)+1]*(1-bn)+aR[aV+3]*(1-bm);}}}};E.prototype.transformPoints_sdk1=function(aJ,aR,aL,a0,aU,aP,aZ){var aH=aR;var aO,aN;var aM=this._$o;var aQ=this._$A;var aI=aU*aZ;var aS,aY;var aV;var aX,aW;var aT=(aH._$hr!=null)?aH._$hr:aH._$Cr;for(var aK=aP;aK1){aO=1;}}if(aN<0){aN=0;}else{if(aN>1){aN=1;}}aO*=aM;aN*=aQ;aS=(aO|0);aY=(aN|0);if(aS>aM-1){aS=aM-1;}if(aY>aQ-1){aY=aQ-1;}aX=aO-aS;aW=aN-aY;aV=2*(aS+aY*(aM+1));}else{aO=aL[aK]*aM;aN=aL[aK+1]*aQ;aX=aO-(aO|0);aW=aN-(aN|0);aV=2*((aO|0)+(aN|0)*(aM+1));}if(aX+aW<1){a0[aK]=aT[aV]*(1-aX-aW)+aT[aV+2]*aX+aT[aV+2*(aM+1)]*aW;a0[aK+1]=aT[aV+1]*(1-aX-aW)+aT[aV+3]*aX+aT[aV+2*(aM+1)+1]*aW;}else{a0[aK]=aT[aV+2*(aM+1)+2]*(aX-1+aW)+aT[aV+2*(aM+1)]*(1-aX)+aT[aV+2]*(1-aW);a0[aK+1]=aT[aV+2*(aM+1)+3]*(aX-1+aW)+aT[aV+2*(aM+1)+1]*(1-aX)+aT[aV+3]*(1-aW);}}};E.prototype._$VT=function(){return(this._$o+1)*(this._$A+1);};E.prototype.getType=function(){return c._$_b;};function H(aH){B.prototype.constructor.call(this,aH);this._$8r=c._$ur;this._$Cr=null;this._$hr=null;}H.prototype=new B();function s(){if(j){return;}this.visible=true;this._$g0=false;this._$NL=null;this._$3S=null;this._$aS=null;s._$42++;}s._$42=0;s.prototype._$zP=function(){this._$3S=new Array();this._$aS=new Array();};s.prototype._$F0=function(aH){this._$g0=aH._$8L();this.visible=aH._$8L();this._$NL=aH._$nP();this._$3S=aH._$nP();this._$aS=aH._$nP();};s.prototype.init=function(aI){var aH=new aj(this);aH.setPartsOpacity(this.isVisible()?1:0);return aH;};s.prototype._$6o=function(aH){if(this._$3S==null){throw new Error("_$3S _$6 _$Wo@_$6o");}this._$3S.push(aH);};s.prototype._$3o=function(aH){if(this._$aS==null){throw new Error("_$aS _$6 _$Wo@_$3o");}this._$aS.push(aH);};s.prototype._$Zo=function(aH){this._$3S=aH;};s.prototype._$xo=function(aH){this._$aS=aH;};s.prototype.isVisible=function(){return this.visible;};s.prototype._$uL=function(){return this._$g0;};s.prototype._$KP=function(aH){this.visible=aH;};s.prototype._$ET=function(aH){this._$g0=aH;};s.prototype.getBaseData=function(){return this._$3S;};s.prototype.getDrawData=function(){return this._$aS;};s.prototype._$p2=function(){return this._$NL;};s.prototype._$ob=function(aH){this._$NL=aH;};s.prototype.getPartsID=function(){return this._$NL;};s.prototype._$MP=function(aH){this._$NL=aH;};function aj(aH){this._$VS=null;this._$e0=null;this._$e0=aH;}aj.prototype=new S();aj.prototype.getPartsOpacity=function(){return this._$VS;};aj.prototype.setPartsOpacity=function(aH){this._$VS=aH;};function ak(aH){if(j){return;}this.id=aH;}ak._$L7=function(){z._$27();n._$27();Z._$27();i._$27();};ak.prototype.toString=function(){return this.id;};function D(){}D.prototype._$F0=function(aH){};function an(){if(j){return;}this._$4S=null;}an.prototype._$1s=function(){return this._$4S;};an.prototype._$zP=function(){this._$4S=new Array();};an.prototype._$F0=function(aH){this._$4S=aH._$nP();};an.prototype._$Ks=function(aH){this._$4S.push(aH);};function au(aH,aI){this.canvas=aH;this.context=aI;this.viewport=new Array(0,0,aH.width,aH.height);this._$6r=1;this._$xP=0;this._$3r=1;this._$uP=0;this._$Qo=-1;this.cacheImages={};}au.tr=new am();au._$50=new am();au._$Ti=new Array(0,0);au._$Pi=new Array(0,0);au._$B=new Array(0,0);au.prototype._$lP=function(aI,aK,aJ,aH){this.viewport=new Array(aI,aK,aJ,aH);};au.prototype._$bL=function(){this.context.save();var aH=this.viewport;if(aH!=null){this.context.beginPath();this.context._$Li(aH[0],aH[1],aH[2],aH[3]);this.context.clip();}};au.prototype._$ei=function(){this.context.restore();};au.prototype.drawElements=function(bc,bm,aX,aJ,bA,aM,bl,bz){try{if(bA!=this._$Qo){this._$Qo=bA;this.context.globalAlpha=bA;}var a2=bm.length;var aP=bc.width;var a5=bc.height;var bE=this.context;var a7=this._$xP;var a6=this._$uP;var a1=this._$6r;var aZ=this._$3r;var bD=au.tr;var aI=au._$Ti;var aH=au._$Pi;var bu=au._$B;for(var by=0;by0.02){au.expandClip(aK,aJ,aV,aI,aO,aN,aH,aW,aS,aR);}else{au.clipWithTransform(aK,null,aM,aL,aU,aT,aQ,aP);}};au.expandClip=function(aV,bg,aK,a3,aJ,aI,be,ba,aZ,aX){var aP=be-aJ;var aO=ba-aI;var bi=aZ-aJ;var bh=aX-aI;var bj=aP*bh-aO*bi>0?aK:-aK;var aL=-aO;var aH=aP;var bc=aZ-be;var a8=aX-ba;var a7=-a8;var a6=bc;var aQ=Math.sqrt(bc*bc+a8*a8);var bf=-bh;var bb=bi;var a2=Math.sqrt(bi*bi+bh*bh);var bd=aJ-bj*aL/a3;var a9=aI-bj*aH/a3;var aY=be-bj*aL/a3;var aW=ba-bj*aH/a3;var a5=be-bj*a7/aQ;var a4=ba-bj*a6/aQ;var aS=aZ-bj*a7/aQ;var aR=aX-bj*a6/aQ;var aN=aJ+bj*bf/a2;var aM=aI+bj*bb/a2;var a1=aZ+bj*bf/a2;var a0=aX+bj*bb/a2;var aU=au._$50;var aT=bg._$P2(aU);if(aT==null){return false;}au.clipWithTransform(aV,aU,bd,a9,aY,aW,a5,a4,aS,aR,a1,a0,aN,aM);return true;};au.clipWithTransform=function(aH,aI,aS,aN,aQ,aK,aP,aJ){if(arguments.length<(1+3*2)){q._$li("err : @LDGL.clip()");return;}if(!(arguments[1] instanceof am)){q._$li("err : a[0] is _$6 LDTransform @LDGL.clip()");return;}var aM=au._$B;var aO=aI;var aR=arguments;aH.beginPath();if(aO){aO._$PS(aR[2],aR[3],aM);aH.moveTo(aM[0],aM[1]);for(var aL=4;aL1){return 1;}}return(0.5-0.5*Math.cos(aH*aC.PI_F));};function J(aH){if(j){return;}this._$ib=aH;}J._$fr=-1;J.prototype.toString=function(){return this._$ib;};function b(){if(j){return;}a.prototype.constructor.call(this);this._$LP=-1;this._$d0=0;this._$Yo=0;this._$JP=null;this._$5P=null;this._$BP=null;this._$Eo=null;this._$Qi=null;this._$6s=b._$ms;this.culling=true;this.gl_cacheImage=null;this.instanceNo=b._$42++;}b.prototype=new a();b._$42=0;b._$Os=30;b._$ms=0;b._$ns=1;b._$_s=2;b._$gT=new Array();b.prototype._$_S=function(aH){this._$LP=aH;};b.prototype.getTextureNo=function(){return this._$LP;};b.prototype._$ZL=function(){return this._$Qi;};b.prototype._$H2=function(){return this._$JP;};b.prototype.getNumPoints=function(){return this._$d0;};b.prototype.getType=function(){return a._$wb;};b.prototype._$B2=function(aL,aH,aO){var aM=aH;var aN=(aM._$hr!=null)?aM._$hr:aM._$Cr;var aK=aw._$do;switch(aK){default:case aw._$Ms:throw new Error("_$L _$ro ");case aw._$Qs:for(var aJ=this._$d0-1;aJ>=0;--aJ){var aI=aJ*aw._$No;aN[aI+4]=aO;}break;}};b.prototype._$zP=function(){this._$GS=new g();this._$GS._$zP();};b.prototype._$F0=function(aK){a.prototype._$F0.call(this,aK);this._$LP=aK._$6L();this._$d0=aK._$6L();this._$Yo=aK._$6L();var aH=aK._$nP();this._$BP=new Int16Array(this._$Yo*3);for(var aJ=this._$Yo*3-1;aJ>=0;--aJ){this._$BP[aJ]=aH[aJ];}this._$Eo=aK._$nP();this._$Qi=aK._$nP();if(aK.getFormatVersion()>=ay._$s7){this._$JP=aK._$6L();if(this._$JP!=0){if((this._$JP&1)!=0){var aI=aK._$6L();if(this._$5P==null){this._$5P=new Object();}this._$5P._$Hb=parseInt(aI);}if((this._$JP&b._$Os)!=0){this._$6s=(this._$JP&b._$Os)>>1;}else{this._$6s=b._$ms;}if((this._$JP&32)!=0){this.culling=false;}}}else{this._$JP=0;}};b.prototype.init=function(aL){var aN=new ag(this);var aI=this._$d0*aw._$No;var aH=this._$32();if(aN._$Cr!=null){aN._$Cr=null;}aN._$Cr=new Float32Array(aI);if(aN._$hr!=null){aN._$hr=null;}aN._$hr=aH?new Float32Array(aI):null;var aM=aw._$do;switch(aM){default:case aw._$Ms:if(aw._$Ls){for(var aJ=this._$d0-1;aJ>=0;--aJ){var aO=aJ<<1;this._$Qi[aO+1]=1-this._$Qi[aO+1];}}break;case aw._$Qs:for(var aJ=this._$d0-1;aJ>=0;--aJ){var aO=aJ<<1;var aK=aJ*aw._$No;var aQ=this._$Qi[aO];var aP=this._$Qi[aO+1];aN._$Cr[aK]=aQ;aN._$Cr[aK+1]=aP;aN._$Cr[aK+4]=0;if(aH){aN._$hr[aK]=aQ;aN._$hr[aK+1]=aP;aN._$hr[aK+4]=0;}}break;}return aN;};b.prototype._$Nr=function(aJ,aH){var aK=aH;if(!((this==aK._$GT()))){console.log("### assert!! ### ");}if(!this._$GS._$Ur(aJ)){return;}a.prototype._$Nr.call(this,aJ,aK);if(aK._$IS[0]){return;}var aI=b._$gT;aI[0]=false;aG._$Vr(aJ,this._$GS,aI,this._$d0,this._$Eo,aK._$Cr,aw._$i2,aw._$No);};b.prototype._$2b=function(aK,aI){try{if(!((this==aI._$GT()))){console.log("### assert!! ### ");}var aL=false;if(aI._$IS[0]){aL=true;}var aM=aI;if(!aL){a.prototype._$2b.call(this,aK);if(this._$32()){var aH=this.getTargetBaseDataID();if(aM._$8r==a._$ur){aM._$8r=aK.getBaseDataIndex(aH);}if(aM._$8r<0){if(Q._$so){q._$li("_$L _$0P _$G :: %s",aH);}}else{var aO=aK.getBaseData(aM._$8r);var aJ=aK._$q2(aM._$8r);if(aO!=null&&!aJ._$x2()){aO._$nb(aK,aJ,aM._$Cr,aM._$hr,this._$d0,aw._$i2,aw._$No);aM._$AT=true;}else{aM._$AT=false;}aM.baseOpacity=aJ.getTotalOpacity();}}}}catch(aN){throw aN;}};b.prototype.draw=function(aN,aK,aI){if(!((this==aI._$GT()))){console.log("### assert!! ### ");}if(aI._$IS[0]){return;}var aL=aI;var aJ=this._$LP;if(aJ<0){aJ=1;}var aH=this.getOpacity(aK,aL)*aI._$VS*aI.baseOpacity;var aM=(aL._$hr!=null)?aL._$hr:aL._$Cr;aN.setClipBufPre_clipContextForDraw(aI.clipBufPre_clipContext);aN._$WP(this.culling);aN._$Uo(aJ,3*this._$Yo,this._$BP,aM,this._$Qi,aH,this._$6s,aL);};b.prototype.dump=function(){console.log(" _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n",this._$LP,this._$d0,this._$Yo);console.log(" _$Oi _$di = { ");for(var aJ=0;aJstartMotion() / start _$K _$3 (m%d)\n",aH,aL._$sr);}}if(aJ==null){return -1;}aL=new M();aL._$w0=aJ;this.motions.push(aL);var aN=aL._$sr;if(this._$eb){q._$Ji("MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n",aH,aN);}return aN;};V.prototype.updateParam=function(aJ){try{var aI=false;for(var aK=0;aKupdateParam() / _$T0 _$w0 (m%d)\n",this.motions.length-1,aL._$sr);}this.motions.splice(aK,1);aK--;}else{}}return aI;}catch(aM){q._$li(aM);return true;}};V.prototype.isFinished=function(aK){if(arguments.length>=1){for(var aI=0;aI0.9?Q.EXPAND_W:0;var a0=this.gl;if(this.gl==null){throw new Error("gl is null");}var a1=false;var aQ=1;var aP=1;var a3=1;var aZ=1;var aW=this._$C0*aP*aN;var a2=this._$tT*a3*aN;var a5=this._$WL*aZ*aN;var a7=this._$lT*aN;if(this.clipBufPre_clipContextMask!=null){a0.frontFace(a0.CCW);a0.useProgram(this.shaderProgram);this._$vS=T(a0,this._$vS,aU);this._$no=L(a0,this._$no,aL);a0.enableVertexAttribArray(this.a_position_Loc);a0.vertexAttribPointer(this.a_position_Loc,2,a0.FLOAT,false,0,0);this._$NT=T(a0,this._$NT,aV);a0.activeTexture(a0.TEXTURE1);a0.bindTexture(a0.TEXTURE_2D,this.textures[aS]);a0.uniform1i(this.s_texture0_Loc,1);a0.enableVertexAttribArray(this.a_texCoord_Loc);a0.vertexAttribPointer(this.a_texCoord_Loc,2,a0.FLOAT,false,0,0);a0.uniformMatrix4fv(this.u_matrix_Loc,false,this.getClipBufPre_clipContextMask().matrixForMask);var aY=this.getClipBufPre_clipContextMask().layoutChannelNo;var a4=this.getChannelFlagAsColor(aY);a0.uniform4f(this.u_channelFlag,a4.r,a4.g,a4.b,a4.a);var aI=this.getClipBufPre_clipContextMask().layoutBounds;a0.uniform4f(this.u_baseColor_Loc,aI.x*2-1,aI.y*2-1,aI._$EL()*2-1,aI._$5T()*2-1);a0.uniform1i(this.u_maskFlag_Loc,true);}else{a1=this.getClipBufPre_clipContextDraw()!=null;if(a1){a0.useProgram(this.shaderProgramOff);this._$vS=T(a0,this._$vS,aU);this._$no=L(a0,this._$no,aL);a0.enableVertexAttribArray(this.a_position_Loc_Off);a0.vertexAttribPointer(this.a_position_Loc_Off,2,a0.FLOAT,false,0,0);this._$NT=T(a0,this._$NT,aV);a0.activeTexture(a0.TEXTURE1);a0.bindTexture(a0.TEXTURE_2D,this.textures[aS]);a0.uniform1i(this.s_texture0_Loc_Off,1);a0.enableVertexAttribArray(this.a_texCoord_Loc_Off);a0.vertexAttribPointer(this.a_texCoord_Loc_Off,2,a0.FLOAT,false,0,0);a0.uniformMatrix4fv(this.u_clipMatrix_Loc_Off,false,this.getClipBufPre_clipContextDraw().matrixForDraw);a0.uniformMatrix4fv(this.u_matrix_Loc_Off,false,this.matrix4x4);a0.activeTexture(a0.TEXTURE2);a0.bindTexture(a0.TEXTURE_2D,Q.fTexture[this.glno]);a0.uniform1i(this.s_texture1_Loc_Off,2);var aY=this.getClipBufPre_clipContextDraw().layoutChannelNo;var a4=this.getChannelFlagAsColor(aY);a0.uniform4f(this.u_channelFlag_Loc_Off,a4.r,a4.g,a4.b,a4.a);a0.uniform4f(this.u_baseColor_Loc_Off,aW,a2,a5,a7);}else{a0.useProgram(this.shaderProgram);this._$vS=T(a0,this._$vS,aU);this._$no=L(a0,this._$no,aL);a0.enableVertexAttribArray(this.a_position_Loc);a0.vertexAttribPointer(this.a_position_Loc,2,a0.FLOAT,false,0,0);this._$NT=T(a0,this._$NT,aV);a0.activeTexture(a0.TEXTURE1);a0.bindTexture(a0.TEXTURE_2D,this.textures[aS]);a0.uniform1i(this.s_texture0_Loc,1);a0.enableVertexAttribArray(this.a_texCoord_Loc);a0.vertexAttribPointer(this.a_texCoord_Loc,2,a0.FLOAT,false,0,0);a0.uniformMatrix4fv(this.u_matrix_Loc,false,this.matrix4x4);a0.uniform4f(this.u_baseColor_Loc,aW,a2,a5,a7);a0.uniform1i(this.u_maskFlag_Loc,false);}}if(this.culling){this.gl.enable(a0.CULL_FACE);}else{this.gl.disable(a0.CULL_FACE);}this.gl.enable(a0.BLEND);var a6;var aX;var aR;var aK;if(this.clipBufPre_clipContextMask!=null){a6=a0.ONE;aX=a0.ONE_MINUS_SRC_ALPHA;aR=a0.ONE;aK=a0.ONE_MINUS_SRC_ALPHA;}else{switch(aM){case b._$ms:a6=a0.ONE;aX=a0.ONE_MINUS_SRC_ALPHA;aR=a0.ONE;aK=a0.ONE_MINUS_SRC_ALPHA;break;case b._$ns:a6=a0.ONE;aX=a0.ONE;aR=a0.ZERO;aK=a0.ONE;break;case b._$_s:a6=a0.DST_COLOR;aX=a0.ONE_MINUS_SRC_ALPHA;aR=a0.ZERO;aK=a0.ONE;break;}}a0.blendEquationSeparate(a0.FUNC_ADD,a0.FUNC_ADD);a0.blendFuncSeparate(a6,aX,aR,aK);if(this.anisotropyExt){a0.texParameteri(a0.TEXTURE_2D,this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT,this.maxAnisotropy);}var aJ=aL.length;a0.drawElements(a0.TRIANGLES,aJ,a0.UNSIGNED_SHORT,0);a0.bindTexture(a0.TEXTURE_2D,null);};function T(aJ,aH,aI){if(aH==null){aH=aJ.createBuffer();}aJ.bindBuffer(aJ.ARRAY_BUFFER,aH);aJ.bufferData(aJ.ARRAY_BUFFER,aI,aJ.DYNAMIC_DRAW);return aH;}function L(aJ,aH,aI){if(aH==null){aH=aJ.createBuffer();}aJ.bindBuffer(aJ.ELEMENT_ARRAY_BUFFER,aH);aJ.bufferData(aJ.ELEMENT_ARRAY_BUFFER,aI,aJ.DYNAMIC_DRAW);return aH;}C.prototype._$Rs=function(){throw new Error("_$Rs");};C.prototype._$Ds=function(aH){throw new Error("_$Ds");};C.prototype._$K2=function(){for(var aH=0;aH=48){var aL=ay._$9o(aN);if(aL!=null){aL._$F0(this);return aL;}else{return null;}}switch(aN){case 1:return this._$bT();case 10:var aM=this._$6L();return new I(aM,true);case 11:return new av(this._$mP(),this._$mP(),this._$mP(),this._$mP());case 12:return new av(this._$_T(),this._$_T(),this._$_T(),this._$_T());case 13:return new e(this._$mP(),this._$mP());case 14:return new e(this._$_T(),this._$_T());case 15:var aH=this._$3L();var aI=new Array(aH);for(var aJ=0;aJ>(7-this._$hL++))&1)==1;};K.prototype._$zT=function(){if(this._$hL!=0){this._$hL=0;}};function ai(){}ai.prototype._$wP=function(aM,aI,aK){for(var aL=0;aLMath.PI){aJ-=2*Math.PI;}return aJ;};aC._$9=function(aH){return Math.sin(aH);};aC.fcos=function(aH){return Math.cos(aH);};function aB(aH){if(j){return;}this._$e0=null;this._$IP=null;this._$Us=null;this._$7s=null;this._$IS=[false];this._$VS=null;this._$AT=true;this.baseOpacity=1;this.clipBufPre_clipContext=null;this._$e0=aH;}aB.prototype._$u2=function(){return this._$IS[0];};aB.prototype._$yo=function(){return this._$AT&&!this._$IS[0];};aB.prototype._$GT=function(){return this._$e0;};function r(){}r._$W2=0;r.SYSTEM_INFO=null;r.USER_AGENT=navigator.userAgent;r.isIPhone=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO._isIPhone;};r.isIOS=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO._isIPhone||r.SYSTEM_INFO._isIPad;};r.isAndroid=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO._isAndroid;};r.getOSVersion=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO.version;};r.getOS=function(){if(!r.SYSTEM_INFO){r.setup();}if(r.SYSTEM_INFO._isIPhone||r.SYSTEM_INFO._isIPad){return"iOS";}if(r.SYSTEM_INFO._isAndroid){return"Android";}else{return"_$Q0 OS";}};r.setup=function(){var aK=r.USER_AGENT;function aI(aO,aR){var aN=aO.substring(aR).split(/[ _,;\.]/);var aQ=0;for(var aM=0;aM<=2;aM++){if(isNaN(aN[aM])){break;}var aP=parseInt(aN[aM]);if(aP<0||aP>999){q._$li("err : "+aP+" @UtHtml5.setup()");aQ=0;break;}aQ+=aP*Math.pow(1000,(2-aM));}return aQ;}var aL;var aH;var aJ=r.SYSTEM_INFO={userAgent:aK};if((aL=aK.indexOf("iPhone OS "))>=0){aJ.os="iPhone";aJ._isIPhone=true;aJ.version=aI(aK,aL+"iPhone OS ".length);}else{if((aL=aK.indexOf("iPad"))>=0){aL=aK.indexOf("CPU OS");if(aL<0){q._$li(" err : "+aK+" @UtHtml5.setup()");return;}aJ.os="iPad";aJ._isIPad=true;aJ.version=aI(aK,aL+"CPU OS ".length);}else{if((aL=aK.indexOf("Android"))>=0){aJ.os="Android";aJ._isAndroid=true;aJ.version=aI(aK,aL+"Android ".length);}else{aJ.os="-";aJ.version=-1;}}}};window.UtSystem=P;window.UtDebug=q;window.LDTransform=am;window.LDGL=au;window.Live2D=Q;window.Live2DModelWebGL=l;window.Live2DModelJS=v;window.Live2DMotion=ao;window.MotionQueueManager=V;window.PhysicsHair=u;window.AMotion=ah;window.PartsDataID=i;window.DrawDataID=Z;window.BaseDataID=n;window.ParamID=z;Q.init();var j=false;})(); \ No newline at end of file diff --git a/packages/live2d/src/libs/live2dcubismcore.min.js b/packages/live2d/src/libs/live2dcubismcore.min.js new file mode 100644 index 0000000..036b654 --- /dev/null +++ b/packages/live2d/src/libs/live2dcubismcore.min.js @@ -0,0 +1,9 @@ +/** + * Live2D Cubism Core + * (C) 2019 Live2D Inc. All rights reserved. + * + * This file is licensed pursuant to the license agreement below. + * This file corresponds to the "Redistributable Code" in the agreement. + * https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html + */ +var Live2DCubismCore;!function(Live2DCubismCore){var _scriptDir,_csm=function(){function _csm(){}return _csm.getVersion=function(){return _em.ccall("csmGetVersion","number",[],[])},_csm.getLatestMocVersion=function(){return _em.ccall("csmGetLatestMocVersion","number",[],[])},_csm.getMocVersion=function(moc,mocSize){return _em.ccall("csmGetMocVersion","number",["number","number"],[moc,mocSize])},_csm.getLogFunction=function(){return _em.ccall("csmGetLogFunction","number",[],[])},_csm.getSizeofModel=function(moc){return _em.ccall("csmGetSizeofModel","number",["number"],[moc])},_csm.reviveMocInPlace=function(memory,mocSize){return _em.ccall("csmReviveMocInPlace","number",["number","number"],[memory,mocSize])},_csm.initializeModelInPlace=function(moc,memory,modelSize){return _em.ccall("csmInitializeModelInPlace","number",["number","number","number"],[moc,memory,modelSize])},_csm.hasMocConsistency=function(memory,mocSize){return _em.ccall("csmHasMocConsistency","number",["number","number"],[memory,mocSize])},_csm.getParameterCount=function(model){return _em.ccall("csmGetParameterCount","number",["number"],[model])},_csm.getParameterIds=function(model){return _em.ccall("csmGetParameterIds","number",["number"],[model])},_csm.getParameterMinimumValues=function(model){return _em.ccall("csmGetParameterMinimumValues","number",["number"],[model])},_csm.getParameterTypes=function(model){return _em.ccall("csmGetParameterTypes","number",["number"],[model])},_csm.getParameterMaximumValues=function(model){return _em.ccall("csmGetParameterMaximumValues","number",["number"],[model])},_csm.getParameterDefaultValues=function(model){return _em.ccall("csmGetParameterDefaultValues","number",["number"],[model])},_csm.getParameterValues=function(model){return _em.ccall("csmGetParameterValues","number",["number"],[model])},_csm.getParameterKeyCounts=function(model){return _em.ccall("csmGetParameterKeyCounts","number",["number"],[model])},_csm.getParameterKeyValues=function(model){return _em.ccall("csmGetParameterKeyValues","number",["number"],[model])},_csm.getPartCount=function(model){return _em.ccall("csmGetPartCount","number",["number"],[model])},_csm.getPartIds=function(model){return _em.ccall("csmGetPartIds","number",["number"],[model])},_csm.getPartOpacities=function(model){return _em.ccall("csmGetPartOpacities","number",["number"],[model])},_csm.getPartParentPartIndices=function(model){return _em.ccall("csmGetPartParentPartIndices","number",["number"],[model])},_csm.getDrawableCount=function(model){return _em.ccall("csmGetDrawableCount","number",["number"],[model])},_csm.getDrawableIds=function(model){return _em.ccall("csmGetDrawableIds","number",["number"],[model])},_csm.getDrawableConstantFlags=function(model){return _em.ccall("csmGetDrawableConstantFlags","number",["number"],[model])},_csm.getDrawableDynamicFlags=function(model){return _em.ccall("csmGetDrawableDynamicFlags","number",["number"],[model])},_csm.getDrawableTextureIndices=function(model){return _em.ccall("csmGetDrawableTextureIndices","number",["number"],[model])},_csm.getDrawableDrawOrders=function(model){return _em.ccall("csmGetDrawableDrawOrders","number",["number"],[model])},_csm.getDrawableRenderOrders=function(model){return _em.ccall("csmGetDrawableRenderOrders","number",["number"],[model])},_csm.getDrawableOpacities=function(model){return _em.ccall("csmGetDrawableOpacities","number",["number"],[model])},_csm.getDrawableMaskCounts=function(model){return _em.ccall("csmGetDrawableMaskCounts","number",["number"],[model])},_csm.getDrawableMasks=function(model){return _em.ccall("csmGetDrawableMasks","number",["number"],[model])},_csm.getDrawableVertexCounts=function(model){return _em.ccall("csmGetDrawableVertexCounts","number",["number"],[model])},_csm.getDrawableVertexPositions=function(model){return _em.ccall("csmGetDrawableVertexPositions","number",["number"],[model])},_csm.getDrawableVertexUvs=function(model){return _em.ccall("csmGetDrawableVertexUvs","number",["number"],[model])},_csm.getDrawableIndexCounts=function(model){return _em.ccall("csmGetDrawableIndexCounts","number",["number"],[model])},_csm.getDrawableIndices=function(model){return _em.ccall("csmGetDrawableIndices","number",["number"],[model])},_csm.getDrawableMultiplyColors=function(model){return _em.ccall("csmGetDrawableMultiplyColors","number",["number"],[model])},_csm.getDrawableScreenColors=function(model){return _em.ccall("csmGetDrawableScreenColors","number",["number"],[model])},_csm.getDrawableParentPartIndices=function(model){return _em.ccall("csmGetDrawableParentPartIndices","number",["number"],[model])},_csm.mallocMoc=function(mocSize){return _em.ccall("csmMallocMoc","number",["number"],[mocSize])},_csm.mallocModelAndInitialize=function(moc){return _em.ccall("csmMallocModelAndInitialize","number",["number"],[moc])},_csm.malloc=function(size){return _em.ccall("csmMalloc","number",["number"],[size])},_csm.setLogFunction=function(handler){_em.ccall("csmSetLogFunction",null,["number"],[handler])},_csm.updateModel=function(model){_em.ccall("csmUpdateModel",null,["number"],[model])},_csm.readCanvasInfo=function(model,outSizeInPixels,outOriginInPixels,outPixelsPerUnit){_em.ccall("csmReadCanvasInfo",null,["number","number","number","number"],[model,outSizeInPixels,outOriginInPixels,outPixelsPerUnit])},_csm.resetDrawableDynamicFlags=function(model){_em.ccall("csmResetDrawableDynamicFlags",null,["number"],[model])},_csm.free=function(memory){_em.ccall("csmFree",null,["number"],[memory])},_csm.initializeAmountOfMemory=function(size){_em.ccall("csmInitializeAmountOfMemory",null,["number"],[size])},_csm}(),Version=(Live2DCubismCore.AlignofMoc=64,Live2DCubismCore.AlignofModel=16,Live2DCubismCore.MocVersion_Unknown=0,Live2DCubismCore.MocVersion_30=1,Live2DCubismCore.MocVersion_33=2,Live2DCubismCore.MocVersion_40=3,Live2DCubismCore.MocVersion_42=4,Live2DCubismCore.MocVersion_50=5,Live2DCubismCore.ParameterType_Normal=0,Live2DCubismCore.ParameterType_BlendShape=1,function(){function Version(){}return Version.csmGetVersion=function(){return _csm.getVersion()},Version.csmGetLatestMocVersion=function(){return _csm.getLatestMocVersion()},Version.csmGetMocVersion=function(moc,mocBytes){return _csm.getMocVersion(moc._ptr,mocBytes.byteLength)},Version}()),Version=(Live2DCubismCore.Version=Version,function(){function Logging(){}return Logging.csmSetLogFunction=function(handler){Logging.logFunction=handler;handler=_em.addFunction(Logging.wrapLogFunction,"vi");_csm.setLogFunction(handler)},Logging.csmGetLogFunction=function(){return Logging.logFunction},Logging.wrapLogFunction=function(messagePtr){messagePtr=_em.UTF8ToString(messagePtr);Logging.logFunction(messagePtr)},Logging}()),Version=(Live2DCubismCore.Logging=Version,function(){function Moc(mocBytes){var memory=_csm.mallocMoc(mocBytes.byteLength);memory&&(new Uint8Array(_em.HEAPU8.buffer,memory,mocBytes.byteLength).set(new Uint8Array(mocBytes)),this._ptr=_csm.reviveMocInPlace(memory,mocBytes.byteLength),this._ptr||_csm.free(memory))}return Moc.prototype.hasMocConsistency=function(mocBytes){var memory=_csm.mallocMoc(mocBytes.byteLength);if(memory)return new Uint8Array(_em.HEAPU8.buffer,memory,mocBytes.byteLength).set(new Uint8Array(mocBytes)),mocBytes=_csm.hasMocConsistency(memory,mocBytes.byteLength),_csm.free(memory),mocBytes},Moc.fromArrayBuffer=function(buffer){return buffer&&(buffer=new Moc(buffer))._ptr?buffer:null},Moc.prototype._release=function(){_csm.free(this._ptr),this._ptr=0},Moc}()),Version=(Live2DCubismCore.Moc=Version,function(){function Model(moc){this._ptr=_csm.mallocModelAndInitialize(moc._ptr),this._ptr&&(this.parameters=new Parameters(this._ptr),this.parts=new Parts(this._ptr),this.drawables=new Drawables(this._ptr),this.canvasinfo=new CanvasInfo(this._ptr))}return Model.fromMoc=function(moc){moc=new Model(moc);return moc._ptr?moc:null},Model.prototype.update=function(){_csm.updateModel(this._ptr)},Model.prototype.release=function(){_csm.free(this._ptr),this._ptr=0},Model}()),CanvasInfo=(Live2DCubismCore.Model=Version,function(modelPtr){var _canvasSize_data,_canvasSize_dataPtr,_canvasSize_nDataBytes,_canvasOrigin_dataPtr,_canvasOrigin_nDataBytes,_canvasPPU_nDataBytes,_canvasPPU_dataPtr;modelPtr&&(_canvasSize_nDataBytes=(_canvasSize_data=new Float32Array(2)).length*_canvasSize_data.BYTES_PER_ELEMENT,_canvasSize_dataPtr=_csm.malloc(_canvasSize_nDataBytes),(_canvasSize_dataPtr=new Uint8Array(_em.HEAPU8.buffer,_canvasSize_dataPtr,_canvasSize_nDataBytes)).set(new Uint8Array(_canvasSize_data.buffer)),_canvasOrigin_nDataBytes=(_canvasSize_nDataBytes=new Float32Array(2)).length*_canvasSize_nDataBytes.BYTES_PER_ELEMENT,_canvasOrigin_dataPtr=_csm.malloc(_canvasOrigin_nDataBytes),(_canvasOrigin_dataPtr=new Uint8Array(_em.HEAPU8.buffer,_canvasOrigin_dataPtr,_canvasOrigin_nDataBytes)).set(new Uint8Array(_canvasSize_nDataBytes.buffer)),_canvasPPU_nDataBytes=(_canvasOrigin_nDataBytes=new Float32Array(1)).length*_canvasOrigin_nDataBytes.BYTES_PER_ELEMENT,_canvasPPU_dataPtr=_csm.malloc(_canvasPPU_nDataBytes),(_canvasPPU_dataPtr=new Uint8Array(_em.HEAPU8.buffer,_canvasPPU_dataPtr,_canvasPPU_nDataBytes)).set(new Uint8Array(_canvasOrigin_nDataBytes.buffer)),_csm.readCanvasInfo(modelPtr,_canvasSize_dataPtr.byteOffset,_canvasOrigin_dataPtr.byteOffset,_canvasPPU_dataPtr.byteOffset),_canvasSize_data=new Float32Array(_canvasSize_dataPtr.buffer,_canvasSize_dataPtr.byteOffset,_canvasSize_dataPtr.length),_canvasSize_nDataBytes=new Float32Array(_canvasOrigin_dataPtr.buffer,_canvasOrigin_dataPtr.byteOffset,_canvasOrigin_dataPtr.length),_canvasOrigin_nDataBytes=new Float32Array(_canvasPPU_dataPtr.buffer,_canvasPPU_dataPtr.byteOffset,_canvasPPU_dataPtr.length),this.CanvasWidth=_canvasSize_data[0],this.CanvasHeight=_canvasSize_data[1],this.CanvasOriginX=_canvasSize_nDataBytes[0],this.CanvasOriginY=_canvasSize_nDataBytes[1],this.PixelsPerUnit=_canvasOrigin_nDataBytes[0],_csm.free(_canvasSize_dataPtr.byteOffset),_csm.free(_canvasOrigin_dataPtr.byteOffset),_csm.free(_canvasPPU_dataPtr.byteOffset))}),Parameters=(Live2DCubismCore.CanvasInfo=CanvasInfo,function(modelPtr){this.count=_csm.getParameterCount(modelPtr),length=_csm.getParameterCount(modelPtr),this.ids=new Array(length);for(var length,length2,_ids=new Uint32Array(_em.HEAPU32.buffer,_csm.getParameterIds(modelPtr),length),i=0;i<_ids.length;i++)this.ids[i]=_em.UTF8ToString(_ids[i]);length=_csm.getParameterCount(modelPtr),this.minimumValues=new Float32Array(_em.HEAPF32.buffer,_csm.getParameterMinimumValues(modelPtr),length),length=_csm.getParameterCount(modelPtr),this.types=new Int32Array(_em.HEAP32.buffer,_csm.getParameterTypes(modelPtr),length),length=_csm.getParameterCount(modelPtr),this.maximumValues=new Float32Array(_em.HEAPF32.buffer,_csm.getParameterMaximumValues(modelPtr),length),length=_csm.getParameterCount(modelPtr),this.defaultValues=new Float32Array(_em.HEAPF32.buffer,_csm.getParameterDefaultValues(modelPtr),length),length=_csm.getParameterCount(modelPtr),this.values=new Float32Array(_em.HEAPF32.buffer,_csm.getParameterValues(modelPtr),length),length=_csm.getParameterCount(modelPtr),this.keyCounts=new Int32Array(_em.HEAP32.buffer,_csm.getParameterKeyCounts(modelPtr),length),length=_csm.getParameterCount(modelPtr),length2=new Int32Array(_em.HEAP32.buffer,_csm.getParameterKeyCounts(modelPtr),length),this.keyValues=new Array(length);for(var _keyValues=new Uint32Array(_em.HEAPU32.buffer,_csm.getParameterKeyValues(modelPtr),length),i=0;i<_keyValues.length;i++)this.keyValues[i]=new Float32Array(_em.HEAPF32.buffer,_keyValues[i],length2[i])}),Parts=(Live2DCubismCore.Parameters=Parameters,function(modelPtr){this.count=_csm.getPartCount(modelPtr),length=_csm.getPartCount(modelPtr),this.ids=new Array(length);for(var length,_ids=new Uint32Array(_em.HEAPU32.buffer,_csm.getPartIds(modelPtr),length),i=0;i<_ids.length;i++)this.ids[i]=_em.UTF8ToString(_ids[i]);length=_csm.getPartCount(modelPtr),this.opacities=new Float32Array(_em.HEAPF32.buffer,_csm.getPartOpacities(modelPtr),length),length=_csm.getPartCount(modelPtr),this.parentIndices=new Int32Array(_em.HEAP32.buffer,_csm.getPartParentPartIndices(modelPtr),length)}),Drawables=(Live2DCubismCore.Parts=Parts,function(){function Drawables(modelPtr){this._modelPtr=modelPtr;for(var length,length2=null,_ids=(this.count=_csm.getDrawableCount(modelPtr),length=_csm.getDrawableCount(modelPtr),this.ids=new Array(length),new Uint32Array(_em.HEAPU32.buffer,_csm.getDrawableIds(modelPtr),length)),i=0;i<_ids.length;i++)this.ids[i]=_em.UTF8ToString(_ids[i]);length=_csm.getDrawableCount(modelPtr),this.constantFlags=new Uint8Array(_em.HEAPU8.buffer,_csm.getDrawableConstantFlags(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.dynamicFlags=new Uint8Array(_em.HEAPU8.buffer,_csm.getDrawableDynamicFlags(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.textureIndices=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableTextureIndices(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.drawOrders=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableDrawOrders(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.renderOrders=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableRenderOrders(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.opacities=new Float32Array(_em.HEAPF32.buffer,_csm.getDrawableOpacities(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.maskCounts=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableMaskCounts(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.vertexCounts=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableVertexCounts(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.indexCounts=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableIndexCounts(modelPtr),length),length=_csm.getDrawableCount(modelPtr),this.multiplyColors=new Float32Array(_em.HEAPF32.buffer,_csm.getDrawableMultiplyColors(modelPtr),4*length),length=_csm.getDrawableCount(modelPtr),this.screenColors=new Float32Array(_em.HEAPF32.buffer,_csm.getDrawableScreenColors(modelPtr),4*length),length=_csm.getDrawableCount(modelPtr),this.parentPartIndices=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableParentPartIndices(modelPtr),length),length=_csm.getDrawableCount(modelPtr),length2=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableMaskCounts(modelPtr),length),this.masks=new Array(length);for(var _masks=new Uint32Array(_em.HEAPU32.buffer,_csm.getDrawableMasks(modelPtr),length),i=0;i<_masks.length;i++)this.masks[i]=new Int32Array(_em.HEAP32.buffer,_masks[i],length2[i]);length=_csm.getDrawableCount(modelPtr),length2=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableVertexCounts(modelPtr),length),this.vertexPositions=new Array(length);for(var _vertexPositions=new Uint32Array(_em.HEAPU32.buffer,_csm.getDrawableVertexPositions(modelPtr),length),i=0;i<_vertexPositions.length;i++)this.vertexPositions[i]=new Float32Array(_em.HEAPF32.buffer,_vertexPositions[i],2*length2[i]);length=_csm.getDrawableCount(modelPtr),length2=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableVertexCounts(modelPtr),length),this.vertexUvs=new Array(length);for(var _vertexUvs=new Uint32Array(_em.HEAPU32.buffer,_csm.getDrawableVertexUvs(modelPtr),length),i=0;i<_vertexUvs.length;i++)this.vertexUvs[i]=new Float32Array(_em.HEAPF32.buffer,_vertexUvs[i],2*length2[i]);length=_csm.getDrawableCount(modelPtr),length2=new Int32Array(_em.HEAP32.buffer,_csm.getDrawableIndexCounts(modelPtr),length),this.indices=new Array(length);for(var _indices=new Uint32Array(_em.HEAPU32.buffer,_csm.getDrawableIndices(modelPtr),length),i=0;i<_indices.length;i++)this.indices[i]=new Uint16Array(_em.HEAPU16.buffer,_indices[i],length2[i])}return Drawables.prototype.resetDynamicFlags=function(){_csm.resetDrawableDynamicFlags(this._modelPtr)},Drawables}()),Version=(Live2DCubismCore.Drawables=Drawables,function(){function Utils(){}return Utils.hasBlendAdditiveBit=function(bitfield){return 1==(1&bitfield)},Utils.hasBlendMultiplicativeBit=function(bitfield){return 2==(2&bitfield)},Utils.hasIsDoubleSidedBit=function(bitfield){return 4==(4&bitfield)},Utils.hasIsInvertedMaskBit=function(bitfield){return 8==(8&bitfield)},Utils.hasIsVisibleBit=function(bitfield){return 1==(1&bitfield)},Utils.hasVisibilityDidChangeBit=function(bitfield){return 2==(2&bitfield)},Utils.hasOpacityDidChangeBit=function(bitfield){return 4==(4&bitfield)},Utils.hasDrawOrderDidChangeBit=function(bitfield){return 8==(8&bitfield)},Utils.hasRenderOrderDidChangeBit=function(bitfield){return 16==(16&bitfield)},Utils.hasVertexPositionsDidChangeBit=function(bitfield){return 32==(32&bitfield)},Utils.hasBlendColorDidChangeBit=function(bitfield){return 64==(64&bitfield)},Utils}()),Version=(Live2DCubismCore.Utils=Version,function(){function Memory(){}return Memory.initializeAmountOfMemory=function(size){16777216>2]+(Ln<<5)|0)>>2],Pn=q[a+60>>2]+w(Wn,24)|0,Ln=(ko=q[Pn+8>>2])+-1|0,xo=(qo=q[Pn+4>>2])+-1|0,yo=uo=(Wn=q[q[a+152>>2]+(Wn<<2)>>2])+(ko<<3)|0,zo=vo=Wn+((to=w(qo,lo=ko+1|0))<<3)|0,Ao=wo=Wn+(ko+to<<3)|0,Io=q[Pn+12>>2],ro=x(0|qo),so=x(0|ko),a=0;Vn=u[4+(Pn=(oo=a<<3)+Mn|0)>>2],Rn=x(Vn*ro),Xn=u[Pn>>2],Qn=x(Xn*so),Pn=Vn>=x(1),Rn=!(Vn=x(1)|Xn>2],Bo=u[Wn+4>>2],Yn=x(ao-Bo),Co=u[4+yo>>2],Do=u[4+zo>>2],Zn=x(Co-Do),bo=x(x(Yn-Zn)*x(.5)),Eo=u[wo>>2],Fo=u[Wn>>2],_n=x(Eo-Fo),Go=u[uo>>2],Ho=u[vo>>2],$n=x(Go-Ho),co=x(x(_n-$n)*x(.5)),Zn=x(x(Zn+Yn)*x(.5)),$n=x(x($n+_n)*x(.5)),Jo=1,Yn=x(x(x(x(x(Bo+Co)+Do)+ao)*x(.25))-x(Yn*x(.5))),_n=x(x(x(x(x(Fo+Go)+Ho)+Eo)*x(.25))-x(_n*x(.5)))),Vnx(-2)^1|(Xnx(-2)^1)?(u[Nn+oo>>2]=x(Vn*co)+x(x(Xn*$n)+_n),Qn=x(Vn*bo),x(x(Xn*Zn)+Yn)):(Xn<=x(0)?Vn<=x(0)?(Un=x(x(Vn+x(2))*x(.5)),Tn=x(x(Xn+x(2))*x(.5)),Qn=x(bo+bo),mo=x(Yn-Qn),Rn=x(co+co),no=x(_n-Rn),io=x(Yn-x(Zn+Zn)),eo=x(io-Qn),jo=x(_n-x($n+$n)),fo=x(jo-Rn),go=u[Wn+4>>2],ho=u[Wn>>2]):Pn?(Qn=x(bo*x(3)),Rn=x(Yn-x(Zn+Zn)),io=x(Qn+Rn),eo=x(co*x(3)),fo=x(_n-x($n+$n)),jo=x(eo+fo),Un=x(x(Vn+x(-1))*x(.5)),Tn=x(x(Xn+x(2))*x(.5)),go=x(Qn+Yn),ho=x(eo+_n),eo=x(bo+Rn),fo=x(co+fo),mo=u[4+zo>>2],no=u[vo>>2]):(Qn=x(Yn-x(Zn+Zn)),Pn=xo,Sn=x(y(Rn))>2],no=u[Pn>>2],Pn=Wn+(w(Sn,lo)<<3)|0,go=u[Pn+4>>2],ho=u[Pn>>2]):Xn>=x(1)?Vn<=x(0)?(Un=x(x(Vn+x(2))*x(.5)),Tn=x(x(Xn+x(-1))*x(.5)),Qn=x(bo+bo),eo=x(x(Zn+Yn)-Qn),Rn=x(co+co),fo=x(x($n+_n)-Rn),go=x(x(Zn*x(3))+Yn),mo=x(go-Qn),ho=x(x($n*x(3))+_n),no=x(ho-Rn),io=u[4+yo>>2],jo=u[uo>>2]):Pn?(Qn=x(bo*x(3)),io=x(Qn+x(Zn+Yn)),Rn=x(co*x(3)),jo=x(Rn+x($n+_n)),ao=Qn,Qn=x(x(Zn*x(3))+Yn),go=x(ao+Qn),ao=Rn,Rn=x(x($n*x(3))+_n),ho=x(ao+Rn),Un=x(x(Vn+x(-1))*x(.5)),Tn=x(x(Xn+x(-1))*x(.5)),mo=x(bo+Qn),no=x(co+Rn),eo=u[4+Ao>>2],fo=u[wo>>2]):(Qn=x(x(Zn*x(3))+Yn),Pn=xo,Sn=x(y(Rn))>2],fo=u[Pn>>2],Pn=Wn+(w(Sn,lo)+ko<<3)|0,io=u[Pn+4>>2],jo=u[Pn>>2]):Vn<=x(0)?(Un=x(x(Vn+x(2))*x(.5)),Pn=Ln,Sn=x(y(Rn=Qn))>2],jo=u[Pn>>2],go=u[4+(Pn=Wn+(Sn<<3)|0)>>2],ho=u[Pn>>2]):Pn?(ao=Rn=x(bo*x(3)),Pn=Ln,Sn=x(y(Qn))>2],fo=u[Pn>>2],mo=u[4+(Pn=Wn+(Sn+to<<3)|0)>>2],no=u[Pn>>2]):(v[16+po>>3]=Vn,q[po>>2]=a,v[8+po>>3]=Xn,Y(4,1107,po)),x(Tn+Un)<=x(1)?(u[Nn+oo>>2]=x(fo+x(x(no-fo)*Tn))+x(x(jo-fo)*Un),Qn=x(eo+x(x(mo-eo)*Tn)),x(x(io-eo)*Un)):(Qn=x(x(1)-Tn),Rn=x(x(1)-Un),u[Nn+oo>>2]=x(ho+x(x(jo-ho)*Qn))+x(x(no-ho)*Rn),Qn=x(go+x(x(io-go)*Qn)),x(x(mo-go)*Rn)))):(Pn=x(y(ao=Rn))>2]=x(x(x(Qn*x(Rn*u[Sn>>2]))+x(Qn*x(Tn*u[Sn+8>>2])))+x(Un*x(Rn*u[Pn>>2])))+x(Un*x(Tn*u[Pn+8>>2])),Qn=x(x(x(Qn*x(Rn*u[Sn+4>>2]))+x(Qn*x(Tn*u[Sn+12>>2])))+x(Un*x(Rn*u[Pn+4>>2]))),x(Un*x(Tn*u[Pn+12>>2]))):x(Tn+Un)<=x(1)?(Qn=x(x(x(1)-Tn)-Un),Sn=Wn+(Pn<<3)|0,Pn=Wn+(Pn+lo<<3)|0,u[Nn+oo>>2]=x(x(Qn*u[Sn>>2])+x(Tn*u[Sn+8>>2]))+x(Un*u[Pn>>2]),Qn=x(x(Qn*u[Sn+4>>2])+x(Tn*u[Sn+12>>2])),x(Un*u[Pn+4>>2])):(Qn=x(x(Tn+x(-1))+Un),Sn=Wn+(Pn+lo<<3)|0,Rn=x(x(1)-Tn),Vn=x(x(1)-Un),Pn=Wn+(Pn<<3)|0,u[Nn+oo>>2]=x(x(Qn*u[Sn+8>>2])+x(Rn*u[Sn>>2]))+x(Vn*u[Pn+8>>2]),Qn=x(x(Qn*u[Sn+12>>2])+x(Rn*u[Sn+4>>2])),x(Vn*u[Pn+12>>2]))),u[4+(Nn+oo|0)>>2]=Qn+Rn,(0|On)!=(0|(a=a+1|0)););L=32+po|0},n[2]=function(a,mh){a|=0,mh|=0;var Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=x(0),Jh=0,Kh=0,Mh=(x(0),0),Nh=0,Gh=q[a+320>>2],Dh=q[a+316>>2],Hh=q[a+308>>2];-1==(0|(Eh=q[8+(Fh=Hh+(mh<<5)|0)>>2]))?(q[(Nh=Dh)+(Dh=mh<<2)>>2]=q[q[a+148>>2]+(q[Fh+16>>2]<<2)>>2],q[Dh+Gh>>2]=1065353216):(Jh=q[Fh+16>>2],Kh=q[q[a+152>>2]+(Jh<<2)>>2],n[q[24+(Hh+(Eh<<5)|0)>>2]](a,Eh,Kh,Kh,q[16+(q[a+60>>2]+w(Jh,24)|0)>>2]),Ih=u[q[a+148>>2]+(q[Fh+16>>2]<<2)>>2],Fh=q[Fh+8>>2]<<2,u[(Eh=mh<<2)+Dh>>2]=Ih*u[Fh+Dh>>2],q[Eh+Gh>>2]=q[Fh+Gh>>2]),4<=r[q[a>>2]+4|0]&&(Gh=mh<<2,Dh=q[a+308>>2]+(mh<<5)|0,Eh=q[Dh+16>>2]<<2,Fh=q[a+328>>2],mh=q[a+324>>2],-1==(0|(Hh=q[Dh+8>>2]))?(Hh=q[a+156>>2],q[(Dh=Gh<<2)+mh>>2]=q[Hh+(Eh<<=2)>>2],q[(Jh=4|Dh)+mh>>2]=q[(Kh=4|Eh)+Hh>>2],q[(Mh=8|Dh)+mh>>2]=q[Hh+(Nh=8|Eh)>>2],q[mh+((Gh|=3)<<2)>>2]=1065353216,a=q[a+160>>2],q[Dh+Fh>>2]=q[a+Eh>>2],q[Fh+Jh>>2]=q[a+Kh>>2],q[Fh+Mh>>2]=q[a+Nh>>2]):(Eh=(Kh=Eh<<2)+q[a+156>>2]|0,u[(Dh=(Jh=Gh<<2)+mh|0)>>2]=u[Eh>>2]*u[(Hh=(Mh=Hh<<4)+mh|0)>>2],u[Dh+4>>2]=u[Eh+4>>2]*u[Hh+4>>2],u[Dh+8>>2]=u[Eh+8>>2]*u[Hh+8>>2],q[mh+((Gh|=3)<<2)>>2]=1065353216,a=Kh+q[a+160>>2]|0,Nh=u[a>>2],Ih=u[(Dh=Fh+Mh|0)>>2],u[(mh=Fh+Jh|0)>>2]=x(Nh+Ih)-x(Nh*Ih),Nh=u[a+4>>2],Ih=u[Dh+4>>2],u[mh+4>>2]=x(Nh+Ih)-x(Nh*Ih),Nh=u[a+8>>2],Ih=u[Dh+8>>2],u[mh+8>>2]=x(Nh+Ih)-x(Nh*Ih)),q[Fh+(Gh<<2)>>2]=1065353216)},n[3]=function(a,Sm,un,xn,yn){a|=0,Sm|=0,un|=0,xn|=0,yn|=0;var Dn,En,Fn,Hn,In,zn=0,zn=(x(0),x(0),x(0),x(0),x(0),x(0),x(0),x(0),(Sm=q[16+(q[a+308>>2]+(Sm<<5)|0)>>2])<<2),Bn=function(a){var El,Hl,Fl,Gl,Dl=x(0);L=Fl=L-16|0,j(a);a:if((El=2147483647&(Gl=b[0]))>>>0<=1061752794)Dl=x(1),El>>>0<964689920||(Dl=ba(+a));else if(El>>>0<=1081824209)Hl=+a,Dl=1075235812<=El>>>0?x(-ba(((0|Gl)<0?3.141592653589793:-3.141592653589793)+Hl)):aa((0|Gl)<=-1?1.5707963267948966+Hl:1.5707963267948966-Hl);else if(El>>>0<=1088565717)Dl=1085271520<=El>>>0?ba(+a+((0|Gl)<0?6.283185307179586:-6.283185307179586)):aa((0|Gl)<=-1?-4.71238898038469-+a:+a-4.71238898038469);else if(Dl=x(a-a),!(2139095040<=El>>>0))if((El=3&Da(a,8+Fl|0))>>>0<=2){switch(El-1|0){default:Dl=ba(v[8+Fl>>3]);break a;case 0:Dl=aa(-v[8+Fl>>3]);break a;case 1:}Dl=x(-ba(v[8+Fl>>3]))}else Dl=aa(v[8+Fl>>3]);return L=16+Fl|0,Dl}(An=x(x(x(u[4+(q[a+168>>2]+w(Sm,12)|0)>>2]+u[zn+q[a+284>>2]>>2])*x(3.1415927410125732))/x(180))),Cn=u[zn+q[a+272>>2]>>2],Gn=q[zn+q[a+292>>2]>>2],An=function(a){var Vk,Al,Cl,Bl=0;L=Al=L-16|0,j(a);a:if((Vk=2147483647&(Cl=b[0]))>>>0<=1061752794)Vk>>>0<964689920||(a=aa(+a));else if(Vk>>>0<=1081824209)Bl=+a,a=Vk>>>0<=1075235811?(0|Cl)<=-1?x(-ba(Bl+1.5707963267948966)):ba(Bl+-1.5707963267948966):aa(-(((0|Cl)<0?3.141592653589793:-3.141592653589793)+Bl));else if(Vk>>>0<=1088565717)Bl=+a,a=Vk>>>0<=1085271519?(0|Cl)<=-1?ba(Bl+4.71238898038469):x(-ba(Bl+-4.71238898038469)):aa(((0|Cl)<0?6.283185307179586:-6.283185307179586)+Bl);else if(2139095040<=Vk>>>0)a=x(a-a);else if((Vk=3&Da(a,8+Al|0))>>>0<=2){switch(Vk-1|0){default:a=aa(v[8+Al>>3]);break a;case 0:a=ba(v[8+Al>>3]);break a;case 1:}a=aa(-v[8+Al>>3])}else a=x(-ba(v[8+Al>>3]));return L=16+Al|0,a}(An);if((Sm=0)<(0|yn))for(Bn=x(Cn*Bn),En=x(Gn?-1:1),Hn=x(Bn*En),Dn=q[zn+q[a+288>>2]>>2]?x(-1):x(1),In=x(x(Cn*An)*Dn),Bn=x(Bn*Dn),Cn=x(x(Cn*x(-An))*En),An=u[zn+q[a+280>>2]>>2],En=u[zn+q[a+276>>2]>>2];zn=(a=Sm<<3)+xn|0,Dn=u[(a=a+un|0)>>2],Fn=u[a+4>>2],u[zn+4>>2]=An+x(x(In*Dn)+x(Hn*Fn)),u[zn>>2]=En+x(x(Bn*Dn)+x(Cn*Fn)),(0|yn)!=(0|(Sm=Sm+1|0)););},n[4]=function(a,mh){a|=0,mh|=0;var yh,zh,Ah,Bh,Ch,nh,oh=0,ph=0,qh=0,rh=x(0),sh=0,th=0,uh=x(0),vh=0,wh=0,xh=0;if(x(0),x(0),x(0),x(0),L=nh=L+-64|0,vh=q[a+320>>2],wh=q[a+316>>2],ph=q[a+308>>2],-1==(0|(sh=q[8+(qh=ph+(mh<<5)|0)>>2])))oh=q[qh+16>>2]<<2,q[(ph=mh<<2)+wh>>2]=q[oh+q[a+268>>2]>>2],q[ph+vh>>2]=q[oh+q[a+272>>2]>>2];else{oh=q[qh+16>>2]<<2,xh=q[oh+q[a+276>>2]>>2],q[24+nh>>2]=xh,oh=q[oh+q[a+280>>2]>>2],q[28+nh>>2]=oh,q[16+nh>>2]=0,zh=1==q[12+(th=ph+(sh<<5)|0)>>2]?x(-10):x(-.10000000149011612),u[20+nh>>2]=zh,q[60+nh>>2]=oh,q[56+nh>>2]=xh,n[q[th+24>>2]](a,sh,56+nh|0,48+nh|0,1),rh=x(1),ph=9;b:{for(;;){if(oh=ph,uh=x(rh*x(0)),u[32+nh>>2]=uh+u[56+nh>>2],yh=x(zh*rh),u[36+nh>>2]=yh+u[60+nh>>2],n[q[th+24>>2]](a,sh,32+nh|0,40+nh|0,1),Ah=x(u[44+nh>>2]-u[52+nh>>2]),u[44+nh>>2]=Ah,Bh=x(u[40+nh>>2]-u[48+nh>>2]),u[40+nh>>2]=Bh,Ah!=x(0)||Bh!=x(0)){ph=q[44+nh>>2],q[8+nh>>2]=q[40+nh>>2],q[12+nh>>2]=ph;break b}if(u[32+nh>>2]=u[56+nh>>2]-uh,u[36+nh>>2]=u[60+nh>>2]-yh,n[q[th+24>>2]](a,sh,32+nh|0,40+nh|0,1),uh=x(u[40+nh>>2]-u[48+nh>>2]),u[40+nh>>2]=uh,yh=x(u[44+nh>>2]-u[52+nh>>2]),(u[44+nh>>2]=yh)!=x(0)||uh!=x(0)){u[12+nh>>2]=-yh,u[8+nh>>2]=-uh;break b}if(ph=oh+-1|0,rh=x(rh*x(.10000000149011612)),!oh)break}Y(3,1311,0)}rh=function(a,ji){var ki=x(0);if((ki=x(Ba(u[4+a>>2],u[a>>2])-Ba(u[4+ji>>2],u[ji>>2])))x(3.1415927410125732))for(;(ki=x(ki+x(-6.2831854820251465)))>x(3.1415927410125732););return ki}(16+nh|0,8+nh|0),n[q[th+24>>2]](a,q[qh+8>>2],24+nh|0,24+nh|0,1),ph=q[qh+16>>2]<<2,q[ph+q[a+276>>2]>>2]=q[24+nh>>2],q[ph+q[a+280>>2]>>2]=q[28+nh>>2],oh=ph+q[a+284>>2]|0,u[oh>>2]=u[oh>>2]+x(x(rh*x(-180))/x(3.1415927410125732)),qh=q[qh+8>>2]<<2,u[(oh=mh<<2)+wh>>2]=u[ph+q[a+268>>2]>>2]*u[qh+wh>>2],ph=ph+q[a+272>>2]|0,rh=x(u[ph>>2]*u[qh+vh>>2]),u[oh+vh>>2]=rh,u[ph>>2]=rh}4<=r[q[a>>2]+4|0]&&(oh=mh<<2,qh=q[a+308>>2]+(mh<<5)|0,sh=q[qh+16>>2]<<2,ph=q[a+328>>2],mh=q[a+324>>2],-1==(0|(th=q[qh+8>>2]))?(th=q[a+296>>2],q[(qh=oh<<2)+mh>>2]=q[th+(sh<<=2)>>2],q[(vh=4|qh)+mh>>2]=q[(wh=4|sh)+th>>2],q[(xh=8|qh)+mh>>2]=q[th+(Ch=8|sh)>>2],q[mh+((oh|=3)<<2)>>2]=1065353216,a=q[a+300>>2],q[ph+qh>>2]=q[a+sh>>2],q[ph+vh>>2]=q[a+wh>>2],q[ph+xh>>2]=q[a+Ch>>2]):(sh=(wh=sh<<2)+q[a+296>>2]|0,u[(qh=(vh=oh<<2)+mh|0)>>2]=u[sh>>2]*u[(th=(xh=th<<4)+mh|0)>>2],u[qh+4>>2]=u[sh+4>>2]*u[th+4>>2],u[qh+8>>2]=u[sh+8>>2]*u[th+8>>2],q[mh+((oh|=3)<<2)>>2]=1065353216,a=wh+q[a+300>>2]|0,rh=u[a>>2],uh=u[(qh=ph+xh|0)>>2],u[(mh=ph+vh|0)>>2]=x(rh+uh)-x(rh*uh),rh=u[a+4>>2],uh=u[qh+4>>2],u[mh+4>>2]=x(rh+uh)-x(rh*uh),rh=u[a+8>>2],uh=u[qh+8>>2],u[mh+8>>2]=x(rh+uh)-x(rh*uh)),q[ph+(oh<<2)>>2]=1065353216),L=64+nh|0},n[5]=function(a,Vk){return a|=0,Vk|=0,x(0),x(0),0|((a=u[a>>2])<(Vk=u[Vk>>2])?-1:Vk>2])))for(_j=q[a+12>>2],Zj=q[a+20>>2];u[(Wj=Vj<<2)+_j>>2]=u[vj+Wj>>2]*u[Wj+Zj>>2],(0|(Vj=Vj+1|0))<(0|Yj););if(!((0|(Yj=q[a>>2]))<1))if(_j=q[a+4>>2],yj)for(Wj=vj=0;;){if(q[yj>>2]){if((0|(Vj=q[(Zj=vj<<2)+q[a+16>>2]>>2]))<1)Xj=x(0);else for($j=Vj+Wj|0,ak=q[a+12>>2],Xj=x(0),Vj=Wj;Xj=x(Xj+u[ak+(Vj<<2)>>2]),(0|(Vj=Vj+1|0))<(0|$j););u[xj+Zj>>2]=Xj}if(yj=yj+4|0,Wj=q[_j+(vj<<2)>>2]+Wj|0,!((0|(vj=vj+1|0))<(0|Yj)))break}else for(Zj=q[a+16>>2],vj=yj=0;;){if((0|(Vj=q[(Wj=yj<<2)+Zj>>2]))<=0)Xj=x(0);else for($j=vj+Vj|0,ak=q[a+12>>2],Xj=x(0),Vj=vj;Xj=x(Xj+u[ak+(Vj<<2)>>2]),(0|(Vj=Vj+1|0))<(0|$j););if(u[xj+Wj>>2]=Xj,vj=q[Wj+_j>>2]+vj|0,!((0|(yj=yj+1|0))<(0|Yj)))break}},n[7]=function(a,vj,xj,yj){a|=0,vj|=0,xj|=0,yj|=0;var zj=0,Aj=x(0),Qj=0,Rj=0,Sj=0,Tj=0,Uj=0;if(1<=(0|(Tj=q[a+8>>2])))for(Rj=q[a+12>>2],Sj=q[a+20>>2];u[(Qj=zj<<2)+Rj>>2]=u[vj+Qj>>2]*u[Qj+Sj>>2],(0|(zj=zj+1|0))<(0|Tj););if(!((0|(zj=q[a>>2]))<1))if(Tj=q[a+4>>2],yj)for(Qj=vj=0;;){if(q[yj>>2]){if((0|(zj=q[(Rj=vj<<2)+q[a+16>>2]>>2]))<1)Aj=x(0);else for(Sj=zj+Qj|0,Uj=q[a+12>>2],Aj=x(0),zj=Qj;Aj=x(Aj+u[Uj+(zj<<2)>>2]),(0|(zj=zj+1|0))<(0|Sj););zj=xj+Rj|0,Aj=x(Aj+x(.0010000000474974513)),Rj=x(y(Aj))>2]=Rj,zj=q[a>>2]}if(yj=yj+4|0,Qj=q[Tj+(vj<<2)>>2]+Qj|0,!((0|(vj=vj+1|0))<(0|zj)))break}else for(Rj=q[a+16>>2],vj=yj=0;;){if((0|(zj=q[(Qj=yj<<2)+Rj>>2]))<=0)Aj=x(0);else for(Sj=vj+zj|0,Uj=q[a+12>>2],Aj=x(0),zj=vj;Aj=x(Aj+u[Uj+(zj<<2)>>2]),(0|(zj=zj+1|0))<(0|Sj););if(zj=xj+Qj|0,Aj=x(Aj+x(.0010000000474974513)),Sj=x(y(Aj))>2]=Sj,vj=q[Qj+Tj>>2]+vj|0,!((0|(yj=yj+1|0))>2]))break}},n[8]=function(a,vj,xj,yj,zj,Aj){a|=0,vj|=0,xj|=0,yj|=0,zj|=0,Aj|=0;var Oj,Pj,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Kj=0,Lj=0,Mj=x(0),Nj=0,Jj=q[a>>2];if(!((0|Jj)<1))if(Oj=zj<<2,Pj=q[a+4>>2],Aj)for(;;){if(q[Aj>>2]&&(Dj=q[(Bj=Ej<<2)+q[a+16>>2]>>2],Hj=q[xj+Bj>>2],Cj=q[yj+Bj>>2],(Bj=(0|(Ij=w(Cj,zj)))<1)||ca(Hj,0,w(Cj,Oj)),!(Bj|(0|Dj)<1)))for(Kj=Dj+Gj|0,Lj=q[a+20>>2],Bj=Gj;;){for(Mj=u[(Cj=Bj<<2)+Lj>>2],Nj=q[vj+Cj>>2],Fj=0;u[(Cj=(Dj=Fj<<2)+Hj|0)>>2]=u[Cj>>2]+x(Mj*u[Dj+Nj>>2]),(0|Ij)!=(0|(Fj=Fj+1|0)););if(!((0|(Bj=Bj+1|0))<(0|Kj)))break}if(Aj=Aj+4|0,Gj=q[(Ej<<2)+Pj>>2]+Gj|0,!((0|(Ej=Ej+1|0))<(0|Jj)))break}else for(Aj=0;;){if(Dj=q[(Ej=Aj<<2)+q[a+16>>2]>>2],Hj=q[xj+Ej>>2],Cj=q[yj+Ej>>2],(Bj=(0|(Ij=w(Cj,zj)))<1)||ca(Hj,0,w(Cj,Oj)),!(Bj|(0|Dj)<=0))for(Kj=Dj+Gj|0,Lj=q[a+20>>2],Bj=Gj;;){for(Mj=u[(Cj=Bj<<2)+Lj>>2],Nj=q[vj+Cj>>2],Fj=0;u[(Cj=(Dj=Fj<<2)+Hj|0)>>2]=u[Cj>>2]+x(Mj*u[Dj+Nj>>2]),(0|Ij)!=(0|(Fj=Fj+1|0)););if(!((0|(Bj=Bj+1|0))<(0|Kj)))break}if(Gj=q[Ej+Pj>>2]+Gj|0,!((0|(Aj=Aj+1|0))<(0|Jj)))break}},n[9]=function(a){var Me,Ne,Oe,Ie=0,Je=0,Ke=0,Le=0;if(!(q[(a|=0)+648>>2]||(0|(Ie=q[a+332>>2]))<1))for(Ne=(Je=q[a+336>>2])+w(Ie,20)|0,Ie=q[a+424>>2],Le=q[a+444>>2];;){if(q[Ie>>2]&&!((0|(Ke=q[Je+16>>2]))<(a=1)))for(Ke<<=1,Oe=q[Le>>2];u[(Me=(a<<2)+Oe|0)>>2]=-u[Me>>2],(0|(a=a+2|0))<(0|Ke););if(Le=Le+4|0,Ie=Ie+4|0,!((Je=Je+20|0)>>>0>>0))break}},n[10]=function(a,Sm,un){var wn;return $(wn=q[20+(a|=0)>>2],Sm|=0,Sm=(un|=0)>>>0<(Sm=q[a+16>>2]-wn|0)>>>0?un:Sm),q[a+20>>2]=Sm+q[a+20>>2],0|un},n[11]=function(a,Il,Rm,Sm,Tm,Um){a|=0,Il=+Il,Rm|=0,Sm|=0,Tm|=0,Um|=0;var fn,qn,Zm,kn,Vm=0,Wm=0,Xm=0,Ym=0,_m=0,$m=0,an=0,bn=0,cn=0,dn=0,en=0,gn=0,hn=0,jn=0,mn=0;if(q[44+(L=Zm=L-560|0)>>2]=0,h(+Il),Vm=0|b[1],qn=4294967295>>0?0:1,kn=(0|Vm)<-1||(0|Vm)<=-1&&qn?(h(Il=-Il),Vm=0|b[1],b[0],jn=1,3840):2048&Tm?(jn=1,3843):(jn=1&Tm)?3846:3841,2146435072==(2146435072&Vm))_(a,32,Rm,$m=jn+3|0,-65537&Tm),Z(a,kn,jn),Sm=Um>>>5&1,Z(a,Il!=Il?Sm?3867:3871:Sm?3859:3863,3);else if(Il=function Ja(a,ic){var kc,lc,jc=0;if(h(+a),jc=0|b[1],kc=0|b[0],2047!=(0|(jc=(lc=jc)>>>20&2047))){if(!jc)return jc=ic,ic=0==a?0:(a=Ja(0x10000000000000000*a,ic),q[ic>>2]+-64|0),q[jc>>2]=ic,a;q[ic>>2]=jc+-1022,f(0,0|kc),f(1,-2146435073&lc|1071644672),a=+g()}return a}(Il,44+Zm|0),0!=(Il+=Il)&&(q[44+Zm>>2]=q[44+Zm>>2]+-1),fn=16+Zm|0,97==(0|(qn=32|Um))){if(en=(dn=32&Um)?9+kn|0:kn,!(11>>0)&&(Vm=12-Sm|0)){for(gn=8;gn*=16,Vm=Vm+-1|0;);Il=45==r[0|en]?-(gn+(-Il-gn)):Il+gn-gn}for((0|fn)==(0|(Vm=ga((Xm=(Vm=q[44+Zm>>2])>>31)^Vm+Xm,0,fn)))&&(o[15+Zm|0]=48,Vm=15+Zm|0),_m=2|jn,Xm=q[44+Zm>>2],o[0|(cn=Vm+-2|0)]=Um+15,o[Vm+-1|0]=(0|Xm)<0?45:43,Vm=8&Tm,Wm=16+Zm|0;Um=Wm,bn=dn,Xm=y(Il)<2147483648?~~Il:-2147483648,o[0|Wm]=bn|r[Xm+3824|0],1!=((Wm=Um+1|0)-(16+Zm|0)|0)|(0==(Il=16*(Il-(0|Xm)))?!(Vm|0<(0|Sm)):0)||(o[Um+1|0]=46,Wm=Um+2|0),0!=Il;);_(a,32,Rm,$m=(Um=!Sm|(0|Sm)<=((Wm-Zm|0)-18|0)?((fn-(16+Zm|0)|0)-cn|0)+Wm|0:2+((Sm+fn|0)-cn|0)|0)+_m|0,Tm),Z(a,en,_m),_(a,48,Rm,$m,65536^Tm),Z(a,16+Zm|0,Sm=Wm-(16+Zm|0)|0),_(a,48,Um-((Vm=Sm)+(Sm=fn-cn|0)|0)|0,0,0),Z(a,cn,Sm)}else{for(Vm=(0|Sm)<0,0==Il?Ym=q[44+Zm>>2]:(Ym=q[44+Zm>>2]+-28|0,q[44+Zm>>2]=Ym,Il*=268435456),an=Vm?6:Sm,Xm=dn=(0|Ym)<0?48+Zm|0:336+Zm|0;Xm=(Sm=Xm)+4|0,0!=(Il=1e9*(Il-((q[Sm>>2]=Vm=Il<4294967296&0<=Il?~~Il>>>0:0)>>>0))););if((0|Ym)<1)Vm=Xm,Wm=dn;else for(Wm=dn;;){if(cn=(0|Ym)<29?Ym:29,!((Vm=Xm+-4|0)>>>0>>0)){for(Sm=cn,bn=0;mn=bn,bn=q[(en=Vm)>>2],_m=31&Sm,_m=32<=(63&Sm)>>>($m=0)?(Ym=bn<<_m,0):(Ym=(1<<_m)-1&bn>>>32-_m,bn<<_m),$m=Ym+$m|0,$m=(bn=mn+_m|0)>>>0<_m>>>0?$m+1|0:$m,mn=en,en=bd(bn=cd(_m=bn,$m,1e9),M,1e9),q[mn>>2]=_m-en,Wm>>>0<=(Vm=Vm+-4|0)>>>0;);(Sm=bn)&&(q[(Wm=Wm+-4|0)>>2]=Sm)}for(;Wm>>>0<(Vm=Xm)>>>0&&!q[(Xm=Vm+-4|0)>>2];);if(Ym=q[44+Zm>>2]-cn|0,Xm=Vm,!(0<(0|(q[44+Zm>>2]=Ym))))break}if((0|Ym)<=-1)for(hn=1+((an+25|0)/9|0)|0,cn=102==(0|qn);;){if(bn=(0|Ym)<-9?9:0-Ym|0,Vm>>>0<=Wm>>>0)Wm=q[Wm>>2]?Wm:Wm+4|0;else{for(en=1e9>>>bn,_m=-1<>2],q[Xm>>2]=(Sm>>>bn)+Ym,Ym=w(en,Sm&_m),(Xm=Xm+4|0)>>>0>>0;);Wm=q[Wm>>2]?Wm:Wm+4|0,Ym&&(q[Vm>>2]=Ym,Vm=Vm+4|0)}if(Ym=bn+q[44+Zm>>2]|0,Vm=(0|hn)>2?Sm+(hn<<2)|0:Vm,!((0|(q[44+Zm>>2]=Ym))<0))break}if(!(Vm>>>(Xm=0)<=Wm>>>0||(Xm=w(dn-Wm>>2,9),(Sm=q[Wm>>2])>>>0<(Ym=10))))for(;Xm=Xm+1|0,(Ym=w(Ym,10))>>>0<=Sm>>>0;);if((0|(Sm=(an-(102==(0|qn)?0:Xm)|0)-(103==(0|qn)&0!=(0|an))|0))<(w(Vm-dn>>2,9)+-9|0)){if($m=(dn+((Sm=(0|(_m=Sm+9216|0))/9|0)<<2)|0)-4092|0,Ym=10,(0|(Sm=1+(_m-w(Sm,9)|0)|0))<=8)for(;Ym=w(Ym,10),9!=(0|(Sm=Sm+1|0)););if(hn=$m+4|0,((cn=(en=q[$m>>2])-w(Ym,_m=(en>>>0)/(Ym>>>0)|0)|0)||(0|hn)!=(0|Vm))&&(gn=cn>>>0<(Sm=Ym>>>1)>>>0?.5:(0|Vm)==(0|hn)&&(0|Sm)==(0|cn)?1:1.5,Il=1&_m?9007199254740994:9007199254740992,!jn|45!=r[0|kn]||(gn=-gn,Il=-Il),q[$m>>2]=Sm=en-cn|0,Il+gn!=Il)){if(1e9<=(q[$m>>2]=Sm=Sm+Ym|0)>>>0)for(;($m=$m+-4|(q[$m>>2]=0))>>>0>>0&&(q[(Wm=Wm+-4|0)>>2]=0),Sm=q[$m>>2]+1|0,999999999<(q[$m>>2]=Sm)>>>0;);if(Xm=w(dn-Wm>>2,9),!((Sm=q[Wm>>2])>>>0<(Ym=10)))for(;Xm=Xm+1|0,(Ym=w(Ym,10))>>>0<=Sm>>>0;);}Vm=(Sm=$m+4|0)>>>0>>0?Sm:Vm}j:{for(;;){if((cn=Vm)>>>(en=0)<=Wm>>>0)break j;if(q[(Vm=cn+-4|0)>>2])break}en=1}if(103!=(0|qn))_m=8&Tm;else if(an=((Sm=(0|Xm)<(0|(Vm=an||1))&-5<(0|Xm))?-1^Xm:-1)+Vm|0,Um=(Sm?-1:-2)+Um|0,!(_m=8&Tm)){if(Vm=9,en&&(_m=q[cn+-4>>2])&&!((_m>>>(Vm=0))%(Sm=10)))for(;Vm=Vm+1|0,!((_m>>>0)%((Sm=w(Sm,10))>>>0)););Sm=w(cn-dn>>2,9)+-9|0,an=102==(32|Um)?((_m=0)|an)<(0|(Sm=0<(0|(Sm=Sm-Vm|0))?Sm:0))?an:Sm:((_m=0)|an)<(0|(Sm=0<(0|(Sm=(Sm+Xm|0)-Vm|0))?Sm:0))?an:Sm}if($m=0!=(0|(Ym=an|_m)),Sm=a,mn=Rm,Vm=0<(0|Xm)?Xm:0,102!=(0|(bn=32|Um))){if((fn-(Vm=ga((Vm=Xm>>31)+Xm^Vm,0,fn))|0)<=1)for(;o[0|(Vm=Vm+-1|0)]=48,(fn-Vm|0)<2;);o[0|(hn=Vm+-2|0)]=Um,o[Vm+-1|0]=(0|Xm)<0?45:43,Vm=fn-hn|0}if(_(Sm,32,mn,$m=1+(Vm+($m+(an+jn|0)|0)|0)|0,Tm),Z(a,kn,jn),_(a,48,Rm,$m,65536^Tm),102==(0|bn)){for(Sm=16+Zm|8,Xm=16+Zm|9,Wm=Um=dn>>>0>>0?dn:Wm;;){if(Vm=ga(q[Wm>>2],0,Xm),(0|Um)!=(0|Wm)){if(!(Vm>>>0<=16+Zm>>>0))for(;o[0|(Vm=Vm+-1|0)]=48,16+Zm>>>0>>0;);}else(0|Vm)==(0|Xm)&&(o[24+Zm|0]=48,Vm=Sm);if(Z(a,Vm,Xm-Vm|0),!((Wm=Wm+4|0)>>>0<=dn>>>0))break}Ym&&Z(a,3875,1);p:if(!((0|an)<1|cn>>>0<=Wm>>>0))for(;;){if(16+Zm>>>0<(Vm=ga(q[Wm>>2],0,Xm))>>>0)for(;o[0|(Vm=Vm+-1|0)]=48,16+Zm>>>0>>0;);if(Z(a,Vm,(0|an)<9?an:9),an=an+-9|0,cn>>>0<=(Wm=Wm+4|0)>>>0)break p;if(!(0<(0|an)))break}_(a,48,an+9|0,9,0)}else{q:if(!((0|an)<0))for(Um=en?cn:Wm+4|0,Sm=16+Zm|8,dn=16+Zm|9,Xm=Wm;;){if((0|dn)==(0|(Vm=ga(q[Xm>>2],0,dn)))&&(o[24+Zm|0]=48,Vm=Sm),(0|Wm)!=(0|Xm)){if(!(Vm>>>0<=16+Zm>>>0))for(;o[0|(Vm=Vm+-1|0)]=48,16+Zm>>>0>>0;);}else Z(a,Vm,1),Vm=Vm+1|0,(0|an)<1&&!_m||Z(a,3875,1);if(Z(a,bn=Vm,(0|(Vm=dn-Vm|0))<(0|an)?Vm:an),an=an-Vm|0,Um>>>0<=(Xm=Xm+4|0)>>>0)break q;if(!(-1<(0|an)))break}_(a,48,an+18|0,18,0),Z(a,hn,fn-hn|0)}}return _(a,32,Rm,$m,8192^Tm),L=560+Zm|0,0|((0|$m)<(0|Rm)?Rm:$m)},n[12]=function(a,Il){a|=0;var Am=Il|=0;Il=q[Il>>2]+15&-16,q[Am>>2]=Il+16,Am=a,a=function(a,Il,Jl,$l){var fm,cm,am=0,bm=0,dm=0,em=0;return L=cm=L-32|0,am=(em=am=2147483647&$l)-1006698496|0,bm=am=(fm=bm=dm=Jl)>>>0<0?am+1|0:am,am=em-1140785152|0,(0|(am=dm>>>0<0?am+1|0:am))==(0|bm)&fm>>>0>>0|bm>>>0>>0?(am=$l<<4|Jl>>>28,Jl=Jl<<4|Il>>>28,134217728==(0|(dm=Il&=268435455))&1<=a>>>0|134217728>>0?(am=am+1073741824|0,(a=Jl+1|0)>>>0<1&&(am=am+1|0),bm=a):(am=am-(((bm=Jl)>>>0<0)+-1073741824|0)|0,a|134217728^dm||((a=bm+(1&bm)|0)>>>0>>0&&(am=am+1|0),bm=a))):(!dm&2147418112==(0|em)?!(a|Il):2147418112==(0|em)&dm>>>0<0|em>>>0<2147418112)?(am=2146435072,1140785151==((bm=0)|em)&4294967295>>0|1140785151>>0||(dm=em>>>16)>>>(am=0)<15249||(function(a,Il,Jl,Am,Bm,Cm){var Jm,Km,Hm=0,Im=0;64&Cm?(Il=31&(Jl=Cm-64|0),Il=32<=(63&Jl)>>>0?(Jl=0,Bm>>>Il):(Jl=Bm>>>Il,((1<>>Il),Bm=Am=0):Cm&&(Im=Bm,Hm=31&(Km=64-Cm|0),Km=32<=(63&Km)>>>0?(Im=Am<>>32-Hm|Im<>>0?(Hm=0,Jl>>>Il):(Hm=Jl>>>Il,((1<>>Il),Il|=Km,Jl=Hm|Im,Hm=Am,Am=31&Cm,Am=32<=(63&Cm)>>>0?(Im=0,Bm>>>Am):(Im=Bm>>>Am,((1<>>Am),Bm=Im),q[a>>2]=Il,q[4+a>>2]=Jl,q[8+a>>2]=Am,q[12+a>>2]=Bm}(cm,a,Il,Jl,am=65535&$l|65536,15361-dm|0),function(a,Il,Jl,Am,Bm,Cm){var Fm,Dm,Em=0;64&Cm?(Am=Il,Il=31&(Bm=Cm+-64|0),32<=(63&Bm)>>>0?(Bm=Am<>>32-Il|Jl<>>0?(Em=Dm<>>32-Am|Bm<>>0?(Cm=0,Am>>>=Bm):(Cm=Am>>>Bm,Am=((1<>>Bm),Am|=Dm,Bm=Cm|Em,Cm=Il,Il=31&Fm,Il=32<=(63&Fm)>>>0?(Em=Cm<>>32-Il|Jl<>2]=Il,q[4+a>>2]=Jl,q[8+a>>2]=Am,q[12+a>>2]=Bm}(16+cm|0,a,Il,Jl,am,dm+-15233|0),Jl=q[4+cm>>2],a=q[8+cm>>2],am=q[12+cm>>2]<<4|a>>>28,bm=a<<4|Jl>>>28,134217728==(0|(Jl=a=268435455&Jl))&1<=(Il=q[cm>>2]|(0!=(q[16+cm>>2]|q[24+cm>>2])|0!=(q[20+cm>>2]|q[28+cm>>2])))>>>0|134217728>>0?((a=bm+1|0)>>>0<1&&(am=am+1|0),bm=a):Il|134217728^Jl||((a=bm+(1&bm)|0)>>>0>>0&&(am=am+1|0),bm=a))):(bm=Jl<<4|Il>>>28,am=524287&(am=$l<<4|Jl>>>28)|2146959360),L=32+cm|0,f(0,0|bm),f(1,-2147483648&$l|am),+g()}(q[Il>>2],q[Il+4>>2],q[Il+8>>2],q[Il+12>>2]),v[Am>>3]=a},n[13]=function(a){return 0},n[14]=function(a,Il,Am){Il|=0,Am|=0;var Om,Cm,Bm=0,Lm=0,Mm=0,Nm=0;for(L=Cm=L-32|0,Bm=q[28+(a|=0)>>2],q[16+Cm>>2]=Bm,Mm=q[a+20>>2],q[28+Cm>>2]=Am,q[24+Cm>>2]=Il,Mm=(q[20+Cm>>2]=Il=Mm-Bm|0)+Am|0,Nm=2,Il=16+Cm|0;;){a:{if((Lm=(Bm=0)|K(q[a+60>>2],0|Il,0|Nm,12+Cm|0))&&(q[2086]=Lm,Bm=-1),(0|(Bm=Bm?q[12+Cm>>2]=-1:q[12+Cm>>2]))==(0|Mm))Il=q[a+44>>2],q[a+28>>2]=Il,q[a+20>>2]=Il,q[a+16>>2]=Il+q[a+48>>2],a=Am;else{if(-1<(0|Bm))break a;q[a+28>>2]=0,q[a+16>>2]=0,q[a+20>>2]=0,q[a>>2]=32|q[a>>2],2!=((a=0)|Nm)&&(a=Am-q[Il+4>>2]|0)}return L=32+Cm|0,0|a}Lm=q[Il+4>>2],q[(Il=(Om=Lm>>>0>>0)?Il+8|0:Il)>>2]=(Lm=Bm-(Om?Lm:0)|0)+q[Il>>2],q[Il+4>>2]=q[Il+4>>2]-Lm,Mm=Mm-Bm|0,Nm=Nm-Om|0}},n[15]=function(a,Il,Am,Bm){return M=0},{d:function(){},e:function(){return q[1805]},f:function(){return 83886080},g:function(){return 5},h:function(a,vj){return vj|=0,L=vj=L-16|0,a=(a|=0)?sa(a)?(Y(4,2150,0),0):r[a+4|0]:(q[vj+4>>2]=1444,q[vj>>2]=2267,Y(4,1294,vj),0),L=vj+16|0,0|a},i:function(a,vj){var wj;return vj|=0,L=wj=L-48|0,a=(a|=0)?(a+63&-64)!=(0|a)?(q[36+wj>>2]=1522,q[32+wj>>2]=2284,Y(4,1294,32+wj|0),0):(vj+63&-64)==(0|vj)&&vj?function(a,Vk){var pl,Wk=0,Xk=0,Yk=0,Zk=0,_k=0,$k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0;L=_k=(pl=Xk=L)-704&-64;a:if(Vk>>>0<=1343)Y(4,1235,0);else if(sa(a))Y(4,1469,0);else if(Xk=r[0|(nl=a+4|0)]){if(!(6<=Xk>>>0)){(jl=1==(0|!r[a+5|0]))||(da(nl,1),X(a- -64|0,4,160)),ca(_k- -64|0,0,640),na(a,_k- -64|0),Xk=a+Vk|0,Vk=q[_k+64>>2];b:{c:{d:{if(5<=(il=r[a+4|0])>>>0){if(Vk>>>0>>0|Xk>>>0>>0)break c;if((Zk=Vk+256|0)>>>0>>0)break c;if(Zk>>>0<=Xk>>>0)break d;break c}if(Vk>>>0>>0|Xk>>>0>>0)break c;if((Zk=Vk+128|0)>>>0>>0|Xk>>>0>>0)break c}if(!((Yk=q[_k+68>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Yk=Yk- -64|0)>>>0>>0|Xk>>>0>>0||(0|(dl=q[Vk>>2]))<0||(Zk=q[_k+72>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=(Wk=Zk)+(Zk=dl<<2)|0)>>>0>>0|Xk>>>0>>0||(al=q[_k+76>>2])>>>0>>0|Xk>>>0>>0|al>>>0>>0||(Wk=(dl<<6)+al|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+80>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+84>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+88>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+92>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+96>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+100>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+4>>2]))<0||(Zk=q[_k+104>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||($k=(Yk=Zk)+(Zk=Wk<<2)|0)>>>0>>0|Xk>>>0<$k>>>0||(Yk=q[_k+108>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0<$k>>>0||(Wk=Yk+(Wk<<6)|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+112>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+116>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+120>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+124>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+128>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+132>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+136>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+8>>2]))<0||(Zk=q[_k+140>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=(el=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+144>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+el|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+148>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+el|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+156>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+el|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+160>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+el|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+164>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+el|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+12>>2]))<0||(Zk=q[_k+172>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=(fl=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+176>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+fl|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+180>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+fl|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+188>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=Zk+fl|0)>>>0>>0|Xk>>>0>>0||(0|(Yk=q[Vk+16>>2]))<0||(Zk=q[_k+192>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||($k=(Wk=Zk)+(Zk=Yk<<2)|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+196>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+200>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+204>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+208>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+(Yk<<6)|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+212>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+216>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+220>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+228>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+232>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+236>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+240>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+244>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Zk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+248>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||(Wk=Wk+Yk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+252>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+256>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+260>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+264>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+268>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Yk=q[_k+272>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(0|($k=q[Vk+20>>2]))<0||(Yk=q[_k+276>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0||(gl=(Wk=Yk)+(Yk=$k<<2)|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+280>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||($k=Wk+($k<<6)|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+284>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+288>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+292>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+296>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+300>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+308>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+312>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+Yk|0)>>>0>>0|Xk>>>0<$k>>>0||(0|(gl=q[Vk+24>>2]))<0||(Wk=q[_k+336>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+(gl<<2)|0)>>>0>>0|Xk>>>0<$k>>>0||(0|(gl=q[Vk+28>>2]))<0||(Wk=q[_k+340>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=(ll=gl<<2)+Wk|0)>>>0>>0|Xk>>>0<$k>>>0||(Wk=q[_k+344>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||($k=Wk+ll|0)>>>0>>0|Xk>>>0<$k>>>0||(0|(gl=q[Vk+32>>2]))<0||(Wk=q[_k+356>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0<$k>>>0||(gl=($k=gl<<2)+Wk|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+360>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+364>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+368>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+372>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+376>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+380>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(gl=Wk+$k|0)>>>0>>0|Xk>>>0>>0||(0|(bl=q[Vk+36>>2]))<0||(Wk=q[_k+392>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=(gl=bl<<2)+Wk|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+396>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+gl|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+400>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+gl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+40>>2]))<0||(Wk=q[_k+412>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+44>>2]))<0||(Wk=q[_k+424>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+48>>2]))<0||(Wk=q[_k+428>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=(cl<<=2)+Wk|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+432>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+cl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+52>>2]))<0||(Wk=q[_k+416>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=(cl<<=2)+Wk|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+420>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+cl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+56>>2]))<0||(Wk=q[_k+552>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+60>>2]))<0||(Wk=q[_k+556>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+64>>2]))<0||(Wk=q[_k+560>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<1)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+68>>2]))<0||(Wk=q[_k+564>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+72>>2]))<0||(Wk=q[_k+568>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(cl=(bl=Wk)+(Wk=cl<<2)|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+572>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+576>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+580>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+584>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(bl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+76>>2]))<0||(Wk=q[_k+588>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(cl=(bl=cl<<2)+Wk|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+592>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+596>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+80>>2]))<0||(Wk=q[_k+600>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(hl=(bl=Wk)+(Wk=cl<<2)|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+604>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=bl+(cl<<6)|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+608>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+612>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+616>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+620>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+624>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+628>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(cl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(bl=q[_k+632>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0||(bl=Wk+bl|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+84>>2]))<0||(Wk=q[_k+636>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0||(Wk=q[_k+640>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(bl=Wk+(cl<<1)|0)>>>0>>0|Xk>>>0>>0||(0|(cl=q[Vk+88>>2]))<0||(Wk=q[_k+644>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0||(Wk=Wk+(cl<<2)|0)>>>0>>0|Xk>>>0>>0)){if(!(il>>>0<2)){if((bl=q[_k+168>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0)break c;if((Wk=bl+el|0)>>>0>>0|Xk>>>0>>0)break c;if(!(il>>>0<4)){if((bl=q[_k+324>>2])>>>0>>0|Xk>>>0>>0|bl>>>0>>0)break c;if((bl=Yk+bl|0)>>>0>>0|Xk>>>0>>0)break c;if((Wk=q[_k+328>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0)break c;if((bl=Wk+Yk|0)>>>0>>0|Xk>>>0>>0)break c;if((Wk=q[_k+332>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0)break c;if((bl=Wk+Yk|0)>>>0>>0|Xk>>>0>>0)break c;if((Wk=q[_k+152>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0)break c;if((el=Wk+el|0)>>>0>>0|Xk>>>0>>0)break c;if((Wk=q[_k+184>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0)break c;if((el=Wk+fl|0)>>>0>>0|Xk>>>0>>0)break c;if((Wk=q[_k+224>>2])>>>0>>0|Xk>>>0>>0|Wk>>>0>>0)break c;if((Wk=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(el=q[Vk+92>>2]))<0)break c;if((Zk=q[_k+648>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((el=(Wk=el<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+652>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((el=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+656>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(el=q[Vk+96>>2]))<0)break c;if((Zk=q[_k+660>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((el=(Wk=el<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+664>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((el=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+668>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+304>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+316>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+320>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+100>>2]))<0)break c;if((Zk=q[_k+436>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+440>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+444>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+104>>2]))<0)break c;if((Zk=q[_k+448>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=(Yk=Zk)+(Zk=Wk<<2)|0)>>>0>>0|Xk>>>0>>0)break c;if((Yk=q[_k+452>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Yk=q[_k+456>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Yk=q[_k+460>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Yk=q[_k+464>>2])>>>0>>0|Xk>>>0>>0|Yk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+108>>2]))<0)break c;if((Zk=q[_k+480>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+484>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+488>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+112>>2]))<0)break c;if((Zk=q[_k+504>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+508>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+512>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+116>>2]))<0)break c;if((Zk=q[_k+528>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Zk+(Wk<<2)|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+120>>2]))<0)break c;if((Zk=q[_k+532>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+536>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+540>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((0|(Wk=q[Vk+124>>2]))<0)break c;if((Zk=q[_k+544>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Yk=(Wk<<=2)+Zk|0)>>>0>>0|Xk>>>0>>0)break c;if((Zk=q[_k+548>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0)break c;if((Wk=Wk+Zk|0)>>>0>>0|Xk>>>0>>0)break c}}if(il>>>0<5)break b;if(!((Zk=q[_k+348>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+ll|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+352>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+ll|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+384>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+$k|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+388>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+$k|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+404>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+gl|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+408>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Zk+gl|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+128>>2]))<0||(Zk=q[_k+468>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+472>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+476>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+132>>2]))<0||(Zk=q[_k+492>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+496>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+500>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Yk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(0|(Wk=q[Vk+136>>2]))<0||(Zk=q[_k+516>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=(Yk=Wk<<2)+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+520>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Wk=Yk+Zk|0)>>>0>>0|Xk>>>0>>0||(Zk=q[_k+524>>2])>>>0>>0|Xk>>>0>>0|Zk>>>0>>0||(Zk=Yk+Zk|0)>>>0>>0)&&Zk>>>0<=Xk>>>0)break b}}Y(4,1760,0),da(nl,1),X(a- -64|0,4,160);break a}jl||(ya(a),o[a+5|0]=0,Vk=q[_k+64>>2],dl=q[Vk>>2],al=q[_k+76>>2],il=r[a+4|0]);f:{if((a=0)<(0|dl)){for(;;){if(63>>0)break f;if((0|dl)==(0|(a=a+1|0)))break}if(Wk=Vk+48|0,(Xk=0)<(0|(a=q[Vk>>2]))){for(Zk=q[Vk+48>>2],Yk=q[_k+80>>2];;){if((0|(al=q[Yk+(Xk<<2)>>2]))<0|(0|Zk)<=(0|al))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(gl=Vk+24|0,Zk=q[Vk+24>>2],$k=q[_k+88>>2],dl=q[_k+84>>2],Xk=0;;){if(Yk=q[(al=Xk<<2)+$k>>2]){if((0|Yk)<0|(0|Zk)<(0|Yk))break f;if((0|(al=q[al+dl>>2]))<0|(0|Zk)<=(0|al))break f;if((Yk=Yk+al|0)>>>31|(0|Zk)<(0|Yk))break f}if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+92>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+96>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+100>>2];;){if((0|(Yk=q[Zk+(Xk<<2)>>2]))<-1|(0|a)<=(0|Yk))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}}else gl=Vk+24|0}else gl=Vk+24|0,Wk=Vk+48|0;if((a=0)<(0|(Xk=q[Vk+4>>2]))){for(Zk=q[_k+108>>2];;){if(63>>0)break f;if((0|Xk)==(0|(a=a+1|0)))break}if($k=(Zk=q[Vk+48>>2])+-1|0,!(((Xk=0)|(a=q[Vk+4>>2]))<=0)){for(Yk=q[_k+112>>2];;){if((0|(al=q[Yk+(Xk<<2)>>2]))<0|(0|Zk)<=(0|al))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+116>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+120>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Zk=q[Vk>>2],Xk=0,Yk=q[_k+124>>2];;){if((0|(al=q[Yk+(Xk<<2)>>2]))<-1|(0|Zk)<=(0|al))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+128>>2];;){if((0|(Yk=q[Zk+(Xk<<2)>>2]))<-1|(0|a)<=(0|Yk))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Zk=q[_k+132>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Yk=Vk+8|0,al=Vk+12|0,dl=q[_k+136>>2],Xk=0;;){if(1<(fl=q[(el=Xk<<2)+Zk>>2])>>>0)break f;if((0|(el=q[dl+el>>2]))<0|(0|el)>=q[(fl-1|0?Yk:al)>>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}}}else $k=q[Wk>>2]+-1|0;if((a=0)<(0|(Xk=q[Vk+8>>2]))){for(Zk=q[_k+140>>2];;){if((0|(Yk=q[Zk+(a<<2)>>2]))<0|(0|$k)<(0|Yk))break f;if((0|Xk)==(0|(a=a+1|0)))break}for(ll=Vk+28|0,Zk=q[Vk+28>>2],dl=q[_k+148>>2],el=q[_k+144>>2],a=0;;){if(Yk=q[(al=a<<2)+dl>>2]){if((0|Yk)<0|(0|Zk)<(0|Yk))break f;if((0|(al=q[al+el>>2]))<0|(0|Zk)<=(0|al))break f;if((Yk=Yk+al|0)>>>31|(0|Zk)<(0|Yk))break f}if((0|Xk)==(0|(a=a+1|0)))break}for(a=0,Yk=q[_k+156>>2],al=q[_k+164>>2],dl=q[_k+160>>2];;){if((0|(el=q[(Zk=a<<2)+dl>>2]))<1)break f;if((0|(fl=q[Zk+al>>2]))<1)break f;if((0|(Zk=q[Yk+Zk>>2]))<1|(0|Zk)!=(0|w(fl+1|0,el+1|0)))break f;if((0|Xk)==(0|(a=a+1|0)))break}}else ll=Vk+28|0;if((a=0)<(0|(Yk=q[Vk+12>>2]))){for(Xk=q[_k+172>>2];;){if((0|(Zk=q[Xk+(a<<2)>>2]))<0|(0|$k)<(0|Zk))break f;if((0|Yk)==(0|(a=a+1|0)))break}for(bl=Vk+32|0,Xk=q[Vk+32>>2],$k=q[_k+180>>2],dl=q[_k+176>>2],a=0;;){if(Zk=q[(al=a<<2)+$k>>2]){if((0|Zk)<0|(0|Xk)<(0|Zk))break f;if((0|(al=q[al+dl>>2]))<0|(0|Xk)<=(0|al))break f;if((Zk=Zk+al|0)>>>31|(0|Xk)<(0|Zk))break f}if((0|Yk)==(0|(a=a+1|0)))break}}else bl=Vk+32|0;Zk=Vk+16|0;m:{n:{if(!(((a=0)|(Xk=q[Vk+16>>2]))<=0)){for(Yk=q[_k+208>>2];;){if(63>>0)break f;if((0|Xk)==(0|(a=a+1|0)))break}if(!(((Xk=0)|(a=q[Zk>>2]))<=0)){for(Yk=q[Wk>>2],al=q[_k+212>>2];;){if((0|($k=q[al+(Xk<<2)>>2]))<0|(0|Yk)<=(0|$k))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(nl=Vk+36|0,Yk=q[Vk+36>>2],dl=q[_k+220>>2],el=q[_k+216>>2],Xk=0;;){if(al=q[($k=Xk<<2)+dl>>2]){if((0|al)<0|(0|Yk)<(0|al))break f;if((0|($k=q[$k+el>>2]))<0|(0|Yk)<=(0|$k))break f;if((al=al+$k|0)>>>31|(0|Yk)<(0|al))break f}if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Yk=q[_k+228>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Yk=q[_k+232>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Yk=q[Vk>>2],Xk=0,al=q[_k+236>>2];;){if((0|($k=q[al+(Xk<<2)>>2]))<-1|(0|Yk)<=(0|$k))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Yk=q[Vk+4>>2],Xk=0,al=q[_k+240>>2];;){if((0|($k=q[al+(Xk<<2)>>2]))<-1|(0|Yk)<=(0|$k))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Yk=q[_k+244>>2],Xk=0;;){if(q[Yk+(Xk<<2)>>2]<0)break f;if((0|a)==(0|(Xk=Xk+1|0)))break}break n}}al=Vk+68|0,nl=Vk+36|0;break m}for(Yk=q[_k+252>>2],Xk=0;;){if(q[Yk+(Xk<<2)>>2]<0)break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(al=q[Vk+60>>2],Xk=0,$k=q[_k+256>>2];;){if((dl=q[(dl=Xk<<2)+$k>>2]+(q[Yk+dl>>2]<<1)|0)>>>31|(0|al)<(0|dl))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Yk=q[Vk+64>>2],dl=q[_k+264>>2],el=q[_k+260>>2],Xk=0;;){if(al=q[($k=Xk<<2)+dl>>2]){if((0|al)<0|(0|Yk)<(0|al))break f;if((0|($k=q[$k+el>>2]))<0|(0|Yk)<=(0|$k))break f;if((al=al+$k|0)>>>31|(0|Yk)<(0|al))break f}if((0|a)==(0|(Xk=Xk+1|0)))break}for(al=Vk+68|0,Yk=q[Vk+68>>2],el=q[_k+272>>2],fl=q[_k+268>>2],Xk=0;;){if($k=q[(dl=Xk<<2)+el>>2]){if((0|$k)<0|(0|Yk)<(0|$k))break f;if((0|(dl=q[dl+fl>>2]))<0|(0|Yk)<=(0|dl))break f;if(($k=$k+dl|0)>>>31|(0|Yk)<(0|$k))break f}if((0|a)==(0|(Xk=Xk+1|0)))break}}p:{q:{if(!(((a=0)|(Xk=q[Vk+20>>2]))<=0)){for(Yk=q[_k+280>>2];;){if(63>>0)break f;if((0|Xk)==(0|(a=a+1|0)))break}if(!(((a=0)|(Xk=q[Vk+20>>2]))<=0)){for(Yk=q[_k+296>>2];;){if(1>2])break f;if((0|Xk)==(0|(a=a+1|0)))break}for(Yk=q[_k+300>>2],a=0;;){if(q[Yk+(a<<2)>>2]<0)break f;if((0|Xk)==(0|(a=a+1|0)))break}break q}}a=q[Vk+52>>2];break p}for(a=q[Vk+52>>2],el=q[_k+312>>2],fl=q[_k+308>>2],$k=0;;){if(Yk=q[(dl=$k<<2)+el>>2]){if((0|Yk)<0|(0|a)<(0|Yk))break f;if((0|(dl=q[dl+fl>>2]))<0|(0|a)<=(0|dl))break f;if((Yk=Yk+dl|0)>>>31|(0|a)<(0|Yk))break f}if((0|Xk)==(0|($k=$k+1|0)))break}}if(Yk=q[Vk+40>>2],(Xk=0)<(0|($k=q[Vk+8>>2])))for(dl=q[_k+344>>2],el=q[_k+156>>2];;){if((fl=q[(fl=Xk<<2)+dl>>2]+(q[el+fl>>2]<<1)|0)>>>31|(0|Yk)<(0|fl))break f;if((0|$k)==(0|(Xk=Xk+1|0)))break}if((Xk=0)<(0|($k=q[bl>>2]))){for(dl=q[_k+376>>2];;){if(1>2])break f;if((0|$k)==(0|(Xk=Xk+1|0)))break}for(Xk=0,dl=q[_k+380>>2];;){if(1>2])break f;if((0|$k)==(0|(Xk=Xk+1|0)))break}}if((Xk=0)<(0|($k=q[Zk>>2])))for(dl=q[_k+400>>2],el=q[_k+252>>2];;){if((fl=q[(fl=Xk<<2)+dl>>2]+(q[el+fl>>2]<<1)|0)>>>31|(0|Yk)<(0|fl))break f;if((0|$k)==(0|(Xk=Xk+1|0)))break}if((Xk=0)<(0|(Yk=q[Vk+44>>2])))for(dl=q[_k+424>>2];;){if((0|(el=q[dl+(Xk<<2)>>2]))<0|(0|a)<=(0|el))break f;if((0|Yk)==(0|(Xk=Xk+1|0)))break}if(1<=(0|(el=q[Wk>>2])))for(Xk=0,fl=q[_k+432>>2],cl=q[_k+428>>2];;){if(Wk=q[(dl=Xk<<2)+fl>>2]){if((0|Wk)<0|(0|Yk)<(0|Wk))break f;if((0|(dl=q[cl+dl>>2]))<0|(0|Yk)<=(0|dl))break f;if((Wk=Wk+dl|0)>>>31|(0|Yk)<(0|Wk))break f}if((0|el)==(0|(Xk=Xk+1|0)))break}if(1<=(0|a))for(Yk=q[Vk+56>>2],Xk=0,el=q[_k+420>>2],fl=q[_k+416>>2];;){if(Wk=q[(dl=Xk<<2)+el>>2]){if((0|Wk)<0|(0|Yk)<(0|Wk))break f;if((0|(dl=q[dl+fl>>2]))<0|(0|Yk)<=(0|dl))break f;if((Wk=Wk+dl|0)>>>31|(0|Yk)<(0|Wk))break f}if((0|(Xk=Xk+1|0))==(0|a))break}if((a=0)<(0|(Xk=q[al>>2])))for(Yk=q[_k+564>>2];;){if((0|(al=q[Yk+(a<<2)>>2]))<-1|(0|$k)<=(0|al))break f;if((0|Xk)==(0|(a=a+1|0)))break}if(a=q[Vk+76>>2],1<=(0|(al=q[Vk+72>>2])))for(Xk=0,$k=q[_k+572>>2],dl=q[_k+568>>2];;){if(Yk=q[(Wk=Xk<<2)+$k>>2]){if((0|Yk)<0|(0|a)<(0|Yk))break f;if((0|(Wk=q[Wk+dl>>2]))<0|(0|a)<=(0|Wk))break f;if((Yk=Wk+Yk|0)>>>31|(0|a)<(0|Yk))break f}if((0|al)==(0|(Xk=Xk+1|0)))break}if((Xk=0)<(0|a)){for(Yk=q[_k+588>>2];;){if(1>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Wk=q[_k+592>>2],Xk=0;;){if(1<(dl=q[($k=Xk<<2)+Yk>>2])>>>0)break f;if((0|($k=q[Wk+$k>>2]))<0|(0|$k)>=q[(dl-1|0?Zk:Vk)>>2])break f;if((0|a)==(0|(Xk=Xk+1|0)))break}for(Xk=0,Yk=q[_k+596>>2];;){if((0|(Wk=q[Yk+(Xk<<2)>>2]))<-1|(0|al)<=(0|Wk))break f;if((0|a)==(0|(Xk=Xk+1|0)))break}}s:{if(!(((a=0)|($k=q[Vk+80>>2]))<=0)){for(Xk=q[_k+604>>2];;){if(63>>0)break f;if((0|$k)==(0|(a=a+1|0)))break}if(!(((a=0)|($k=q[Vk+80>>2]))<=0)){for(Xk=q[Vk+48>>2],Yk=q[_k+608>>2];;){if((0|(al=q[Yk+(a<<2)>>2]))<0|(0|Xk)<=(0|al))break f;if((0|$k)==(0|(a=a+1|0)))break}for(el=q[Vk+88>>2],al=q[_k+616>>2],Wk=q[_k+612>>2],a=0;;){if(Xk=q[(Yk=a<<2)+al>>2]){if((0|Xk)<0|(0|el)<(0|Xk))break f;if((0|(Yk=q[Wk+Yk>>2]))<0|(0|el)<=(0|Yk))break f;if((Xk=Xk+Yk|0)>>>31|(0|el)<(0|Xk))break f}if((0|$k)==(0|(a=a+1|0)))break}for(Zk=q[Zk>>2],al=q[_k+620>>2],a=0;;){if((0|(Xk=q[al+(a<<2)>>2]))<0|(0|Zk)<=(0|Xk))break f;if((0|$k)==(0|(a=a+1|0)))break}for(Wk=q[_k+624>>2],a=0;;){if((0|(Xk=q[Wk+(a<<2)>>2]))<0|(0|Zk)<=(0|Xk))break f;if((0|$k)==(0|(a=a+1|0)))break}for(Xk=q[Vk+84>>2],dl=q[_k+632>>2],fl=q[_k+628>>2],a=0;;){if(Yk=q[(cl=a<<2)+dl>>2]){if((0|Yk)<0|(0|Xk)<(0|Yk))break f;if((0|(cl=q[cl+fl>>2]))<0|(0|Xk)<=(0|cl))break f;if((Yk=Yk+cl|0)>>>31|(0|Xk)<(0|Yk))break f}if((0|$k)==(0|(a=a+1|0)))break}for(hl=q[_k+640>>2],Xk=q[_k+252>>2],Yk=0;;){if(0<(0|(jl=q[(a=Yk<<2)+dl>>2])))for(cl=hl+(q[a+fl>>2]<<1)|0,ol=q[Xk+(q[a+Wk>>2]<<2)>>2],kl=q[Xk+(q[a+al>>2]<<2)>>2],a=0;;){if((0|ol)<=s[cl+(2|(ml=a<<1))>>1]|(0|kl)<=s[cl+ml>>1])break f;if(!((0|(a=a+2|0))<(0|jl)))break}if((0|$k)==(0|(Yk=Yk+1|0)))break}break s}}Zk=q[Vk+16>>2],el=q[Vk+88>>2]}if(!((255&il)>>>0<2)){if((a=0)<(0|(dl=q[Vk+8>>2])))for(Xk=q[_k+168>>2];;){if(1>2])break f;if((0|dl)==(0|(a=a+1|0)))break}if(!((255&il)>>>0<4)){if(al=q[Vk+56>>2],1<=(0|(fl=q[Vk+20>>2])))for(Wk=q[_k+332>>2],cl=q[_k+328>>2],a=0;;){if(Xk=q[(Yk=a<<2)+Wk>>2]){if((0|Xk)<0|(0|al)<(0|Xk))break f;if((0|(Yk=q[Yk+cl>>2]))<0|(0|al)<=(0|Yk))break f;if((Xk=Xk+Yk|0)>>>31|(0|al)<(0|Xk))break f}if((0|fl)==(0|(a=a+1|0)))break}if((0|(a=q[Vk+92>>2]))!=q[Vk+96>>2])break f;if(1<=(0|dl))for(cl=q[_k+152>>2],Xk=0,hl=q[_k+148>>2];;){if(Yk=q[(Wk=Xk<<2)+hl>>2]){if((0|Yk)<0|(0|a)<(0|Yk))break f;if((0|(Wk=q[Wk+cl>>2]))<0|(0|a)<=(0|Wk))break f;if((Yk=Wk+Yk|0)>>>31|(0|a)<(0|Yk))break f}if((0|dl)==(0|(Xk=Xk+1|0)))break}if(1<=(0|(ol=q[Vk+12>>2])))for(cl=q[_k+184>>2],Xk=0,hl=q[_k+180>>2];;){if(Yk=q[(Wk=Xk<<2)+hl>>2]){if((0|Yk)<0|(0|a)<(0|Yk))break f;if((0|(Wk=q[Wk+cl>>2]))<0|(0|a)<=(0|Wk))break f;if((Yk=Wk+Yk|0)>>>31|(0|a)<(0|Yk))break f}if((0|ol)==(0|(Xk=Xk+1|0)))break}if(1<=(0|Zk))for(cl=q[_k+224>>2],Xk=0,hl=q[_k+220>>2];;){if(Yk=q[(Wk=Xk<<2)+hl>>2]){if((0|Yk)<0|(0|a)<(0|Yk))break f;if((0|(Wk=q[Wk+cl>>2]))<0|(0|a)<=(0|Wk))break f;if((Yk=Wk+Yk|0)>>>31|(0|a)<(0|Yk))break f}if((0|Zk)==(0|(Xk=Xk+1|0)))break}if((Xk=0)<(0|fl)){for(Yk=q[_k+304>>2];;){if(1>2])break f;if((0|fl)==(0|(Xk=Xk+1|0)))break}for(Yk=q[Vk+100>>2],hl=q[_k+320>>2],jl=q[_k+316>>2],Xk=0;;){if(Wk=q[(cl=Xk<<2)+hl>>2]){if((0|Wk)<0|(0|Yk)<(0|Wk))break f;if((0|(cl=q[cl+jl>>2]))<0|(0|Yk)<=(0|cl))break f;if((Wk=Wk+cl|0)>>>31|(0|Yk)<(0|Wk))break f}if((0|fl)==(0|(Xk=Xk+1|0)))break}}else Yk=q[Vk+100>>2];if(1<=(0|Yk)){for(cl=q[_k+440>>2],Xk=0,jl=q[_k+436>>2];;){if(Wk=q[(hl=Xk<<2)+cl>>2]){if((0|Wk)<0|(0|al)<(0|Wk))break f;if((0|(hl=q[hl+jl>>2]))<0|(0|al)<=(0|hl))break f;if((Wk=Wk+hl|0)>>>31|(0|al)<(0|Wk))break f}if((0|Yk)==(0|(Xk=Xk+1|0)))break}for(al=q[_k+444>>2],Xk=0;;){if((0|(hl=q[(Wk=Xk<<2)+al>>2]))<0|(0|hl)>=q[Wk+cl>>2])break f;if((0|Yk)==(0|(Xk=Xk+1|0)))break}}if((al=0)<(0|(Xk=q[Vk+104>>2]))){for(Wk=q[_k+448>>2];;){if((0|(cl=q[Wk+(al<<2)>>2]))<0|(0|Yk)<=(0|cl))break f;if((0|Xk)==(0|(al=al+1|0)))break}for(Wk=q[Vk+116>>2],hl=q[_k+464>>2],jl=q[_k+460>>2],Yk=0;;){if(al=q[(cl=Yk<<2)+hl>>2]){if((0|al)<0|(0|Wk)<(0|al))break f;if((0|(cl=q[cl+jl>>2]))<0|(0|Wk)<=(0|cl))break f;if((al=al+cl|0)>>>31|(0|Wk)<(0|al))break f}if((0|Xk)==(0|(Yk=Yk+1|0)))break}}else Wk=q[Vk+116>>2];if((Yk=0)<(0|(cl=q[Vk+108>>2]))){for(al=q[_k+480>>2];;){if((0|(hl=q[al+(Yk<<2)>>2]))<0|(0|dl)<=(0|hl))break f;if((0|cl)==(0|(Yk=Yk+1|0)))break}for(hl=q[_k+488>>2],kl=q[_k+484>>2],Yk=0;;){if(al=q[(dl=Yk<<2)+hl>>2]){if((0|al)<0|(0|Xk)<(0|al))break f;if((0|(dl=q[dl+kl>>2]))<0|(0|Xk)<=(0|dl))break f;if((al=al+dl|0)>>>31|(0|Xk)<(0|al))break f}if((0|cl)==(0|(Yk=Yk+1|0)))break}for(hl=q[ll>>2],Yk=q[_k+456>>2],dl=q[_k+452>>2],al=0;;){if(ml=q[kl+(al<<2)>>2]<<2,jl=q[ml+Yk>>2]){if((0|jl)<0|(0|hl)<(0|jl))break f;if((0|(ml=q[dl+ml>>2]))<0|(0|hl)<=(0|ml))break f;if((0|(jl=jl+ml|0))<0|(0|hl)<(0|jl))break f}if((0|cl)==(0|(al=al+1|0)))break}}else Yk=q[_k+456>>2],dl=q[_k+452>>2];if((al=0)<(0|(cl=q[Vk+112>>2]))){for(hl=q[_k+504>>2];;){if((0|(jl=q[hl+(al<<2)>>2]))<0|(0|Zk)<=(0|jl))break f;if((0|cl)==(0|(al=al+1|0)))break}for(kl=q[_k+512>>2],jl=q[_k+508>>2],Zk=0;;){if(al=q[(hl=Zk<<2)+kl>>2]){if((0|al)<0|(0|Xk)<(0|al))break f;if((0|(hl=q[hl+jl>>2]))<0|(0|Xk)<=(0|hl))break f;if((al=al+hl|0)>>>31|(0|Xk)<(0|al))break f}if((0|cl)==(0|(Zk=Zk+1|0)))break}for(al=q[nl>>2],Zk=0;;){if(kl=q[jl+(Zk<<2)>>2]<<2,hl=q[kl+Yk>>2]){if((0|hl)<0|(0|al)<(0|hl))break f;if((0|(kl=q[dl+kl>>2]))<0|(0|al)<=(0|kl))break f;if((0|(hl=hl+kl|0))<0|(0|al)<(0|hl))break f}if((0|cl)==(0|(Zk=Zk+1|0)))break}}if(al=q[Vk+120>>2],(Zk=0)<(0|Wk))for(cl=q[_k+528>>2];;){if((0|(hl=q[cl+(Zk<<2)>>2]))<0|(0|al)<=(0|hl))break f;if((0|(Zk=Zk+1|0))==(0|Wk))break}if((Zk=0)<(0|al)){for(Wk=q[_k+532>>2];;){if((0|(cl=q[Wk+(Zk<<2)>>2]))<-1|(0|fl)<=(0|cl))break f;if((0|al)==(0|(Zk=Zk+1|0)))break}for(Wk=q[Vk+124>>2],hl=q[_k+540>>2],jl=q[_k+536>>2],Zk=0;;){if(fl=q[(cl=Zk<<2)+hl>>2]){if((0|fl)<0|(0|Wk)<(0|fl))break f;if((0|(cl=q[cl+jl>>2]))<0|(0|Wk)<=(0|cl))break f;if((fl=cl+fl|0)>>>31|(0|Wk)<(0|fl))break f}if((0|al)==(0|(Zk=Zk+1|0)))break}}if(!((255&il)>>>0<5)){if((Zk=0)<(0|(il=q[ll>>2]))){for(al=q[_k+348>>2];;){if((0|(Wk=q[al+(Zk<<2)>>2]))<0|(0|a)<(0|Wk))break f;if((0|il)==(0|(Zk=Zk+1|0)))break}for(al=q[_k+352>>2],Zk=0;;){if((0|(Wk=q[al+(Zk<<2)>>2]))<0|(0|a)<(0|Wk))break f;if((0|il)==(0|(Zk=Zk+1|0)))break}}if((il=0)<(0|(Zk=q[bl>>2]))){for(al=q[_k+384>>2];;){if((0|(Wk=q[al+(il<<2)>>2]))<0|(0|a)<(0|Wk))break f;if((0|Zk)==(0|(il=il+1|0)))break}for(al=q[_k+388>>2],il=0;;){if((0|(Wk=q[al+(il<<2)>>2]))<0|(0|a)<(0|Wk))break f;if((0|Zk)==(0|(il=il+1|0)))break}}if((il=0)<(0|(al=q[nl>>2]))){for(Wk=q[_k+404>>2];;){if((0|(fl=q[Wk+(il<<2)>>2]))<0|(0|a)<(0|fl))break f;if((0|al)==(0|(il=il+1|0)))break}for(Wk=q[_k+408>>2],il=0;;){if((0|(fl=q[Wk+(il<<2)>>2]))<0|(0|a)<(0|fl))break f;if((0|al)==(0|(il=il+1|0)))break}}if((a=0)<(0|(il=q[Vk+128>>2]))){for(al=q[Vk>>2],Wk=q[_k+468>>2];;){if((0|(fl=q[Wk+(a<<2)>>2]))<0|(0|al)<=(0|fl))break f;if((0|il)==(0|(a=a+1|0)))break}for(ll=q[_k+476>>2],fl=q[_k+472>>2],a=0;;){if(al=q[(Wk=a<<2)+ll>>2]){if((0|al)<0|(0|Xk)<(0|al))break f;if((0|(Wk=q[Wk+fl>>2]))<0|(0|Xk)<=(0|Wk))break f;if((al=Wk+al|0)>>>31|(0|Xk)<(0|al))break f}if((0|il)==(0|(a=a+1|0)))break}for(al=q[gl>>2],a=0;;){if(gl=q[fl+(a<<2)>>2]<<2,Wk=q[gl+Yk>>2]){if((0|Wk)<0|(0|al)<(0|Wk))break f;if((0|(gl=q[dl+gl>>2]))<0|(0|al)<=(0|gl))break f;if((0|(Wk=Wk+gl|0))<0|(0|al)<(0|Wk))break f}if((0|il)==(0|(a=a+1|0)))break}}if((a=0)<(0|(il=q[Vk+132>>2]))){for(al=q[_k+492>>2];;){if((0|(Wk=q[al+(a<<2)>>2]))<0|(0|ol)<=(0|Wk))break f;if((0|il)==(0|(a=a+1|0)))break}for(gl=q[_k+500>>2],Wk=q[_k+496>>2],a=0;;){if(al=q[(fl=a<<2)+gl>>2]){if((0|al)<0|(0|Xk)<(0|al))break f;if((0|(fl=q[Wk+fl>>2]))<0|(0|Xk)<=(0|fl))break f;if((al=al+fl|0)>>>31|(0|Xk)<(0|al))break f}if((0|il)==(0|(a=a+1|0)))break}for(a=0;;){if(fl=q[Wk+(a<<2)>>2]<<2,al=q[fl+Yk>>2]){if((0|al)<0|(0|Zk)<(0|al))break f;if((0|(fl=q[dl+fl>>2]))<0|(0|Zk)<=(0|fl))break f;if((0|(al=al+fl|0))<0|(0|Zk)<(0|al))break f}if((0|il)==(0|(a=a+1|0)))break}}if(!(((a=0)|(Vk=q[Vk+136>>2]))<=0)){for(Zk=q[_k+516>>2];;){if((0|(il=q[Zk+(a<<2)>>2]))<0|(0|$k)<=(0|il))break f;if((0|Vk)==(0|(a=a+1|0)))break}for(al=q[_k+524>>2],Zk=q[_k+520>>2],a=0;;){if(_k=q[(il=a<<2)+al>>2]){if((0|_k)<0|(0|Xk)<(0|_k))break f;if((0|(il=q[Zk+il>>2]))<0|(0|Xk)<=(0|il))break f;if((_k=_k+il|0)>>>31|(0|Xk)<(0|_k))break f}if((0|Vk)==(0|(a=a+1|0)))break}for(a=0;;){if(_k=q[Zk+(a<<2)>>2]<<2,Xk=q[_k+Yk>>2]){if((0|Xk)<0|(0|el)<(0|Xk))break f;if((0|(_k=q[_k+dl>>2]))<0|(0|el)<=(0|_k))break f;if((0|(Xk=Xk+_k|0))<0|(0|el)<(0|Xk))break f}if((0|Vk)==(0|(a=a+1|0)))break}}}}}return L=pl,1}return Y(4,1846,0),L=pl,0}q[_k+52>>2]=Xk,q[_k+48>>2]=5,Y(4,1640,_k+48|0)}else q[_k+32>>2]=Xk,Y(4,1554,_k+32|0);return L=pl,0}(a,vj):(q[20+wj>>2]=1621,q[16+wj>>2]=2284,Y(4,1294,16+wj|0),0):(q[4+wj>>2]=1444,q[wj>>2]=2284,Y(4,1294,wj),0),L=48+wj|0,0|a},j:function(a){q[1805]=a|=0},k:function(a,ej){var fj;return ej|=0,L=fj=L-48|0,a=(a|=0)?(a+63&-64)!=(0|a)?(q[36+fj>>2]=1522,q[32+fj>>2]=2305,Y(4,1294,32+fj|0),0):(ej+63&-64)==(0|ej)&&ej?function(a){var Qk,Tk,Uk,Uh,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Rk=0,Sk=0;q[24+(L=Qk=L-32|0)>>2]=0,q[16+Qk>>2]=5,q[20+Qk>>2]=0,Ka(16+(L=Uh=L-272|0)|0,2227,q[12+Uh>>2]=16+Qk|0),function(a){var Hc;q[(L=Hc=L-16|0)>>2]=a,function(a,Il){var Jl;q[12+(L=Jl=L-16|0)>>2]=Il,Ia(a,1432,Il,0,0),L=16+Jl|0}(q[970],Hc),L=16+Hc|0}(16+Uh|0),L=272+Uh|0;a:{if(sa(a))Y(4,1932,0);else{if(!(6<=(Mk=r[a+4|0])>>>0)){if(1!=(0|!r[a+5|0])?(da(a+4|0,1),X(a- -64|0,4,160),na(a,a+704|(o[a+5|0]=0)),ya(a)):na(a,a+704|0),r[7224]||(q[1807]=6,o[7224]=1,q[1808]=7,q[1809]=8,q[1810]=9),Lk=q[a+704>>2],1<=(0|(Mk=q[Lk+16>>2]))){for(Sk=(Nk=q[a+912>>2])+(Mk<<2)|0,Ok=q[a+908>>2];;){Rk=q[a+1204>>2]+(q[Ok>>2]<<2)|0;d:if(!(((Lk=0)|(Kk=(Mk=q[Nk>>2])+-1|0))<1))e:for(;;){for(;;){if(q[(Pk=Rk+(Lk<<2)|0)>>2]<=-1){if(function(a,Vk,ql){var rl=0,sl=0;a:if((0|a)!=(0|Vk)){if(!(a>>>0>>0&&Vk>>>0<(sl=a+ql|0)>>>0))return $(a,Vk,ql);if(rl=3&(a^Vk),a>>>0>>0){if(!rl){if(3&a)for(;;){if(!ql)break a;if(o[0|a]=r[0|Vk],Vk=Vk+1|0,ql=ql+-1|0,!(3&(a=a+1|0)))break}if(!(ql>>>0<=3)){for(rl=ql;q[a>>2]=q[Vk>>2],Vk=Vk+4|0,a=a+4|0,3<(rl=rl+-4|0)>>>0;);ql&=3}}if(ql)for(;o[0|a]=r[0|Vk],a=a+1|0,Vk=Vk+1|0,ql=ql+-1|0;);}else{if(!rl){if(3&sl)for(;;){if(!ql)break a;if(o[0|(rl=(ql=ql+-1|0)+a|0)]=r[Vk+ql|0],!(3&rl))break}if(!(ql>>>0<=3))for(;q[(ql=ql+-4|0)+a>>2]=q[Vk+ql>>2],3>>0;);}if(ql)for(;o[(ql=ql+-1|0)+a|0]=r[Vk+ql|0],ql;);}}}(Pk,Pk+4|0,(-1^Lk)+Mk<<2),(0|Lk)<(0|(Kk=(Mk=Kk)+-1|0)))continue e;break d}if(!((0|(Lk=Lk+1|0))<(0|Kk)))break}break}if(Lk=Nk,0<(0|Mk)&&(Mk=q[Rk+(Kk<<2)>>2]<0?Kk:Mk),q[Lk>>2]=Mk,Ok=Ok+4|0,!((Nk=Nk+4|0)>>>0>>0))break}Lk=q[a+704>>2]}if(1<=q[Lk>>2])for(Kk=0;q[q[a+712>>2]+(Kk<<2)>>2]=q[a+716>>2]+(Kk<<6),Lk=q[a+704>>2],(0|(Kk=Kk+1|0))>2];);if(1<=q[Lk+4>>2])for(Kk=0;q[q[a+744>>2]+(Kk<<2)>>2]=q[a+748>>2]+(Kk<<6),Lk=q[a+704>>2],(0|(Kk=Kk+1|0))>2];);if(1<=q[Lk+16>>2])for(Kk=0;q[(Mk=Kk<<2)+q[a+832>>2]>>2]=q[a+848>>2]+(Kk<<6),q[Mk+q[a+836>>2]>>2]=q[a+1196>>2]+(q[Mk+q[a+896>>2]>>2]<<2),q[Mk+q[a+840>>2]>>2]=q[a+1200>>2]+(q[Mk+q[a+900>>2]>>2]<<1),q[Mk+q[a+844>>2]>>2]=q[a+1204>>2]+(q[Mk+q[a+908>>2]>>2]<<2),Lk=q[a+704>>2],(0|(Kk=Kk+1|0))>2];);if(1<=q[Lk+20>>2])for(Kk=0;q[q[a+916>>2]+(Kk<<2)>>2]=q[a+920>>2]+(Kk<<6),Lk=q[a+704>>2],(0|(Kk=Kk+1|0))>2];);if(1<=q[Lk+80>>2])for(Kk=0;q[q[a+1240>>2]+(Kk<<2)>>2]=q[a+1244>>2]+(Kk<<6),Lk=q[a+704>>2],(0|(Kk=Kk+1|0))>2];);if(1&o[q[a+708>>2]+20|0])break a;if((0|(Nk=q[Lk+16>>2]))<1)break a;for(Kk=q[a+904>>2],Rk=q[a+900>>2],Pk=q[a+1200>>2],Ok=0;;){if(0<(0|(Sk=q[(Mk=Ok<<2)+Kk>>2]+-1|0)))for(Tk=Pk+(q[Mk+Rk>>2]<<1)|0,Lk=0;Uk=s[(Mk=Tk+(Lk<<1)|0)>>1],p[Mk>>1]=s[Mk+4>>1],p[Mk+4>>1]=Uk,(0|(Lk=Lk+3|0))<(0|Sk););if((0|Nk)==(0|(Ok=Ok+1|0)))break}for(Mk=q[a+892>>2],Ok=q[a+896>>2],Rk=q[a+1196>>2],Kk=0;;){if(1<=(0|(Pk=q[(Lk=Kk<<2)+Mk>>2])))for(Pk=(Lk=Rk+(q[Lk+Ok>>2]<<2)|0)+(Pk<<3)|0,Lk=Lk+4|0;u[Lk>>2]=x(1)-u[Lk>>2],(Lk=Lk+8|0)>>>0>>0;);if((0|Nk)==(0|(Kk=Kk+1|0)))break}break a}q[4+Qk>>2]=Mk,q[Qk>>2]=5,Y(4,2023,Qk)}a=0}return L=32+Qk|0,a}(a):(q[20+fj>>2]=1621,q[16+fj>>2]=2305,Y(4,1294,16+fj|0),0):(q[4+fj>>2]=1444,q[fj>>2]=2305,Y(4,1294,fj),0),L=48+fj|0,0|a},l:function(a,ej,fj,gj){var hj;ej|=0,fj|=0,gj|=0,L=hj=L+-64|0,(a|=0)?ej?fj?gj?(a=q[q[a>>2]+708>>2],q[ej>>2]=q[a+12>>2],q[ej+4>>2]=q[a+16>>2],q[fj>>2]=q[a+4>>2],q[fj+4>>2]=q[a+8>>2],q[gj>>2]=q[a>>2]):(q[52+hj>>2]=1995,q[48+hj>>2]=2325,Y(4,1294,48+hj|0)):(q[36+hj>>2]=1903,q[32+hj>>2]=2325,Y(4,1294,32+hj|0)):(q[20+hj>>2]=1819,q[16+hj>>2]=2325,Y(4,1294,16+hj|0)):(q[4+hj>>2]=1740,q[hj>>2]=2325,Y(4,1294,hj)),L=64+hj|0},m:xa,n:wa,o:function(a){var dj;L=dj=L-16|0,(a|=0)?ua(a):(q[4+dj>>2]=1740,q[dj>>2]=2387,Y(4,1294,dj)),L=16+dj|0},p:function(a){var cj;return L=cj=L-16|0,a=(a|=0)?q[a+540>>2]:(q[4+cj>>2]=1740,q[cj>>2]=2402,Y(4,1294,cj),-1),L=16+cj|0,0|a},q:function(a){var bj;return L=bj=L-16|0,a=(a|=0)?q[q[a>>2]+916>>2]:(q[4+bj>>2]=1740,q[bj>>2]=2423,Y(4,1294,bj),0),L=16+bj|0,0|a},r:function(a){var aj;return L=aj=L-16|0,a=(a|=0)?q[a+548>>2]:(q[4+aj>>2]=1740,q[aj>>2]=2442,Y(4,1294,aj),0),L=16+aj|0,0|a},s:function(a){var $i;return L=$i=L-16|0,a=(a|=0)?q[q[a>>2]+928>>2]:(q[4+$i>>2]=1740,q[$i>>2]=2463,Y(4,1294,$i),0),L=16+$i|0,0|a},t:function(a){var _i;return L=_i=L-16|0,a=(a|=0)?q[q[a>>2]+924>>2]:(q[4+_i>>2]=1740,q[_i>>2]=2492,Y(4,1294,_i),0),L=16+_i|0,0|a},u:function(a){var Zi;return L=Zi=L-16|0,a=(a|=0)?q[q[a>>2]+932>>2]:(q[4+Zi>>2]=1740,q[Zi>>2]=2521,Y(4,1294,Zi),0),L=16+Zi|0,0|a},v:function(a){var Yi;return L=Yi=L-16|0,a=(a|=0)?q[a+552>>2]:(q[4+Yi>>2]=1740,q[Yi>>2]=2550,Y(4,1294,Yi),0),L=16+Yi|0,0|a},w:function(a){var Xi;return L=Xi=L-16|0,a=(a|=0)?q[a+4>>2]:(q[4+Xi>>2]=1740,q[Xi>>2]=2572,Y(4,1294,Xi),-1),L=16+Xi|0,0|a},x:function(a){var Wi;return L=Wi=L-16|0,a=(a|=0)?q[q[a>>2]+712>>2]:(q[4+Wi>>2]=1740,q[Wi>>2]=2588,Y(4,1294,Wi),0),L=16+Wi|0,0|a},y:function(a){var Vi;return L=Vi=L-16|0,a=(a|=0)?q[a+52>>2]:(q[4+Vi>>2]=1740,q[Vi>>2]=2602,Y(4,1294,Vi),0),L=16+Vi|0,0|a},z:function(a){var Ui;return L=Ui=L-16|0,a=(a|=0)?q[q[a>>2]+740>>2]:(q[4+Ui>>2]=1740,q[Ui>>2]=2622,Y(4,1294,Ui),0),L=16+Ui|0,0|a},A:function(a){var Ti;return L=Ti=L-16|0,a=(a|=0)?q[a+332>>2]:(q[4+Ti>>2]=1740,q[Ti>>2]=2650,Y(4,1294,Ti),-1),L=16+Ti|0,0|a},B:function(a){var Si;return L=Si=L-16|0,a=(a|=0)?q[q[a>>2]+832>>2]:(q[4+Si>>2]=1740,q[Si>>2]=2670,Y(4,1294,Si),0),L=16+Si|0,0|a},C:function(a){var Ri;return L=Ri=L-16|0,a=(a|=0)?q[q[a>>2]+888>>2]:(q[4+Ri>>2]=1740,q[Ri>>2]=2688,Y(4,1294,Ri),0),L=16+Ri|0,0|a},D:function(a){var Qi;return L=Qi=L-16|0,a=(a|=0)?q[a+432>>2]:(q[4+Qi>>2]=1740,q[Qi>>2]=2716,Y(4,1294,Qi),0),L=16+Qi|0,0|a},E:function(a){var Pi;return L=Pi=L-16|0,a=(a|=0)?q[q[a>>2]+884>>2]:(q[4+Pi>>2]=1740,q[Pi>>2]=2743,Y(4,1294,Pi),0),L=16+Pi|0,0|a},F:function(a){var Oi;return L=Oi=L-16|0,a=(a|=0)?q[a+440>>2]:(q[4+Oi>>2]=1740,q[Oi>>2]=2772,Y(4,1294,Oi),0),L=16+Oi|0,0|a},G:function(a){var Ni;return L=Ni=L-16|0,a=(a|=0)?q[a+436>>2]:(q[4+Ni>>2]=1740,q[Ni>>2]=2797,Y(4,1294,Ni),0),L=16+Ni|0,0|a},H:function(a){var Mi;return L=Mi=L-16|0,a=(a|=0)?q[a+448>>2]:(q[4+Mi>>2]=1740,q[Mi>>2]=2824,Y(4,1294,Mi),0),L=16+Mi|0,0|a},I:function(a){var Li;return L=Li=L-16|0,a=(a|=0)?q[q[a>>2]+912>>2]:(q[4+Li>>2]=1740,q[Li>>2]=2848,Y(4,1294,Li),0),L=16+Li|0,0|a},J:function(a){var Ki;return L=Ki=L-16|0,a=(a|=0)?q[q[a>>2]+844>>2]:(q[4+Ki>>2]=1740,q[Ki>>2]=2873,Y(4,1294,Ki),0),L=16+Ki|0,0|a},K:function(a){var Ji;return L=Ji=L-16|0,a=(a|=0)?q[q[a>>2]+892>>2]:(q[4+Ji>>2]=1740,q[Ji>>2]=2893,Y(4,1294,Ji),0),L=16+Ji|0,0|a},L:function(a){var Ii;return L=Ii=L-16|0,a=(a|=0)?q[a+444>>2]:(q[4+Ii>>2]=1740,q[Ii>>2]=2920,Y(4,1294,Ii),0),L=16+Ii|0,0|a},M:function(a){var si;return L=si=L-16|0,a=(a|=0)?q[q[a>>2]+836>>2]:(q[4+si>>2]=1740,q[si>>2]=2950,Y(4,1294,si),0),L=16+si|0,0|a},N:function(a){var ri;return L=ri=L-16|0,a=(a|=0)?q[q[a>>2]+904>>2]:(q[4+ri>>2]=1740,q[ri>>2]=2974,Y(4,1294,ri),0),L=16+ri|0,0|a},O:function(a){var qi;return L=qi=L-16|0,a=(a|=0)?q[q[a>>2]+840>>2]:(q[4+qi>>2]=1740,q[qi>>2]=3e3,Y(4,1294,qi),0),L=16+qi|0,0|a},P:function(a){var pi;return L=pi=L-16|0,a=(a|=0)?q[a+452>>2]:(q[4+pi>>2]=1740,q[pi>>2]=3022,Y(4,1294,pi),0),L=16+pi|0,0|a},Q:function(a){var oi;return L=oi=L-16|0,a=(a|=0)?q[a+456>>2]:(q[4+oi>>2]=1740,q[oi>>2]=3051,Y(4,1294,oi),0),L=16+oi|0,0|a},R:function(a){var ni;return L=ni=L-16|0,a=(a|=0)?q[q[a>>2]+876>>2]:(q[4+ni>>2]=1740,q[ni>>2]=3078,Y(4,1294,ni),0),L=16+ni|0,0|a},S:function(a){var mi;L=mi=L-16|0,(a|=0)?q[a+428>>2]=1:(q[4+mi>>2]=1740,q[mi>>2]=3110,Y(4,1294,mi)),L=16+mi|0},T:function(a){var li;return L=li=L-16|0,a=(a|=0)?q[a+640>>2]:(q[4+li>>2]=1740,q[li>>2]=3139,Y(4,1294,li),0),L=16+li|0,0|a},U:function(a){var ji;return L=ji=L-16|0,a=(a|=0)?q[a+636>>2]:(q[4+ji>>2]=1740,q[ji>>2]=3164,Y(4,1294,ji),0),L=16+ji|0,0|a},V:function(a){var Fc;return oa(12+(L=Fc=L-16|0)|0,64,a|=0),L=16+Fc|0,q[12+Fc>>2]},W:function(a){var Ec,Cc,Dc=0;return L=Cc=L-16|0,!(a|=0)||oa(12+Cc|0,16,Ec=xa(a))||(Dc=wa(a,q[12+Cc>>2],Ec))||(pa(q[12+Cc>>2]),Dc=0),L=16+Cc|0,0|Dc},X:function(a){return 0|qa(a|=0)},Y:function(a){pa(a|=0)},Z:function(a){var Sm;oa(12+(L=Sm=L-16|0)|0,64,a|=0),pa(q[12+Sm>>2]),L=16+Sm|0},_:function(){return 0|L},$:function(a){return 0|(L=L-(0|a)&-16)},aa:function(a){L=0|a},ba:function(a){return 0|(a=0|(a|=0),(P=0|N())<(a=P+(a|=0)|0)&&a<65536&&(a=new ArrayBuffer(w(a,65536)),(S=new global.Int8Array(a)).set(o),o=S,o=new global.Int8Array(a),p=new global.Int16Array(a),q=new global.Int32Array(a),r=new global.Uint8Array(a),s=new global.Uint16Array(a),t=new global.Uint32Array(a),u=new global.Float32Array(a),v=new global.Float64Array(a),buffer=a,m.buffer=a),P);var S,P},ca:function(a,Vk){n[a|=0](Vk|=0)}};function X(a,b,c){var e,f,d=0;if(c)for(;;){if(c=c+-1|0,a>>>0<(d=(e=a+b|0)-1|0)>>>0)for(;f=r[0|a],o[0|a]=r[0|d],o[0|d]=f,(a=a+1|0)>>>0<(d=d+-1|0)>>>0;);if(a=e,!c)break}}function Y(a,b,c){var g;L=g=L-272|0,t[1804]>a>>>0||(a=q[1805])&&(Ka(16+g|0,b,q[12+g>>2]=c),n[a](16+g|0)),L=272+g|0}function Z(a,b,c){32&r[0|a]||!function(a,Rm,Sm){var Tm=0,Um=0,tn=0;a:{if(!(Tm=q[Sm+16>>2])){if(function(a){var Rm;return Rm=r[a+74|0],o[a+74|0]=Rm+-1|Rm,8&(Rm=q[a>>2])?(q[a>>2]=32|Rm,1):(q[a+4>>2]=0,q[a+8>>2]=0,Rm=q[a+44>>2],q[a+28>>2]=Rm,q[a+20>>2]=Rm,q[a+16>>2]=Rm+q[a+48>>2],0)}(Sm))break a;Tm=q[Sm+16>>2]}if(Tm-(tn=q[Sm+20>>2])>>>0>>0)return n[q[Sm+36>>2]](Sm,a,Rm);b:if(!(o[Sm+75|0]<0)){for(Tm=Rm;;){if(!(Um=Tm))break b;if(10==r[(Tm=Um+-1|0)+a|0])break}if(n[q[Sm+36>>2]](Sm,a,Um)>>>0>>0)break a;Rm=Rm-Um|0,a=a+Um|0,tn=q[Sm+20>>2]}$(tn,a,Rm),q[Sm+20>>2]=q[Sm+20>>2]+Rm}}(b,c,a)}function _(a,b,c,h,i){var k,l,j;if(L=j=L-256|0,!(73728&i|(0|c)<=(0|h))){if(ca(j,b,(k=(i=c-h|0)>>>0<256)?i:256),b=a,l=j,!k){for(c=c-h|0;Z(a,j,256),255<(i=i+-256|0)>>>0;);i=255&c}Z(b,l,i)}L=256+j|0}function $(a,b,c){var h,i=0;if(8192<=c>>>0)I(0|a,0|b,0|c);else{if(h=a+c|0,3&(a^b))if(h>>>0<4)c=a;else if((i=h-4|0)>>>0>>0)c=a;else for(c=a;o[0|c]=r[0|b],o[c+1|0]=r[b+1|0],o[c+2|0]=r[b+2|0],o[c+3|0]=r[b+3|0],b=b+4|0,(c=c+4|0)>>>0<=i>>>0;);else{b:if((0|c)<1)c=a;else if(3&a)for(c=a;;){if(o[0|c]=r[0|b],b=b+1|0,h>>>0<=(c=c+1|0)>>>0)break b;if(!(3&c))break}else c=a;if(!((a=-4&h)>>>0<64||(i=a+-64|0)>>>0>>0))for(;q[c>>2]=q[b>>2],q[c+4>>2]=q[b+4>>2],q[c+8>>2]=q[b+8>>2],q[c+12>>2]=q[b+12>>2],q[c+16>>2]=q[b+16>>2],q[c+20>>2]=q[b+20>>2],q[c+24>>2]=q[b+24>>2],q[c+28>>2]=q[b+28>>2],q[c+32>>2]=q[b+32>>2],q[c+36>>2]=q[b+36>>2],q[c+40>>2]=q[b+40>>2],q[c+44>>2]=q[b+44>>2],q[c+48>>2]=q[b+48>>2],q[c+52>>2]=q[b+52>>2],q[c+56>>2]=q[b+56>>2],q[c+60>>2]=q[b+60>>2],b=b- -64|0,(c=c- -64|0)>>>0<=i>>>0;);if(!(a>>>0<=c>>>0))for(;q[c>>2]=q[b>>2],b=b+4|0,(c=c+4|0)>>>0>>0;);}if(c>>>0>>0)for(;o[0|c]=r[0|b],b=b+1|0,(0|h)!=(0|(c=c+1|0)););}}function aa(a){var b,c;return x((b=a*a)*b*(c=b*a)*(2718311493989822e-21*b-.00019839334836096632)+(c*(.008333329385889463*b-.16666666641626524)+a))}function ba(a){var m;return x(-.499999997251031*(a*=a)+1+.04166662332373906*(m=a*a)+a*m*(2439044879627741e-20*a-.001388676377460993))}function ca(a,n,p){var r,s,t,u;if(p&&(o[(r=a+p|0)-1|0]=n,o[0|a]=n,!(p>>>0<3||(o[r-2|0]=n,o[a+1|0]=n,o[r-3|0]=n,o[a+2|0]=n,p>>>0<7)||(o[r-4|0]=n,o[a+3|0]=n,p>>>0<9)||(s=(r=0-a&3)+a|0,n=w(255&n,16843009),q[s>>2]=n,q[(r=(p=p-r&-4)+s|0)-4>>2]=n,p>>>0<9)||(q[8+s>>2]=n,q[4+s>>2]=n,q[r-8>>2]=n,q[r-12>>2]=n,p>>>0<25)||(q[24+s>>2]=n,q[20+s>>2]=n,q[16+s>>2]=n,q[12+s>>2]=n,q[r-16>>2]=n,q[r-20>>2]=n,q[r-24>>2]=n,q[r-28>>2]=n,(p=p-(u=4&s|24)|0)>>>0<32))))for(t=r=n,n=s+u|0;q[n+24>>2]=t,q[n+28>>2]=r,q[n+16>>2]=t,q[n+20>>2]=r,q[n+8>>2]=t,q[n+12>>2]=r,q[n>>2]=t,q[n+4>>2]=r,n=n+32|0,31<(p=p+-32|0)>>>0;);return a}function da(a,n){var p;if(a>>>0<(n=(a+n|0)-1|0)>>>0)for(;p=r[0|a],o[0|a]=r[0|n],o[0|n]=p,(a=a+1|0)>>>0<(n=n+-1|0)>>>0;);}function ea(a){var n,o=N();return(a=(n=q[2216])+a|0)>>>0<=o<<16>>>0||J(0|a)?(q[2216]=a,n):(q[2086]=48,-1)}function fa(a,v,y,z,B,C,D){var H,I,K,N,Q,R,S,O,P,J,E=0,F=x(0),G=x(0),M=x(0);if(x(0),x(0),x(0),x(0),L=J=L-16|0,1<=(0|a))for(R=w(a,12)+v|0;;){if(1<=(0|(I=q[v+4>>2])))for(S=(a=q[v+8>>2])+w(I,48)|0,I=(H=q[v>>2]<<4)+D|0,K=(8|H)+D|0,H=(4|H)+D|0;(E=q[a+8>>2])&&((O=E+-1|0)>>>0<=1?(P=(q[a+4>>2]<<2)+y|0,E=q[P+(q[a+12>>2]<<2)>>2]<<2,F=u[E+C>>2],Q=u[B+E>>2],G=u[z+E>>2],O-1?(M=G,G=u[a+20>>2],u[I>>2]=u[I>>2]+x(u[a+44>>2]*x(M*G)),u[H>>2]=u[H>>2]+x(x(Q*G)*u[a+44>>2]),u[K>>2]=u[K>>2]+x(x(F*G)*u[a+44>>2])):(E=q[(q[a+16>>2]<<2)+P>>2]<<2,O=u[E+C>>2],P=u[B+E>>2],M=G,G=u[a+20>>2],N=u[a+24>>2],u[I>>2]=u[I>>2]+x(u[a+44>>2]*x(x(M*G)+x(u[z+E>>2]*N))),u[H>>2]=u[H>>2]+x(x(x(Q*G)+x(P*N))*u[a+44>>2]),u[K>>2]=u[K>>2]+x(x(x(F*G)+x(O*N))*u[a+44>>2]))):(q[J>>2]=E,Y(4,1024,J))),(a=a+48|0)>>>0>>0;);if(a=(q[v>>2]<<4)+D|0,F=u[a>>2],u[a>>2]=F>2],u[a+4>>2]=F>2],u[a+8>>2]=F>>0>>0))break}L=16+J|0}function ga(a,q,v){var y,z,x=0;if(1==(0|q)&a>>>0<0|q>>>0<1)x=a;else for(;y=bd(x=cd(a,q,10),z=M,10),o[0|(v=v+-1|0)]=a-y|48,y=9==(0|q)&4294967295>>0|9>>0,a=x,q=z,y;);if(x)for(;o[0|(v=v+-1|0)]=x-w(a=(x>>>0)/10|0,10)|48,q=9>>0,x=a,q;);return v}function ha(a){return a+-48>>>0<10}function ia(a){var q;return(q=La(a,64))?q-a|0:64}function ja(a,v){var w=0;return 1024<=(0|v)?(a*=898846567431158e293,v=(0|(w=v+-1023|0))<1024?w:(a*=898846567431158e293,((0|v)<3069?v:3069)+-2046|0)):-1023<(0|v)||(a*=22250738585072014e-324,v=-1023<(0|(w=v+1022|0))?w:(a*=22250738585072014e-324,(-3066<(0|v)?v:-3066)+2044|0)),f(0,0),f(1,v+1023<<20),a*+g()}function ka(a,v){var A=0,C=a,B=v>>>0<=31?(A=q[a+4>>2],q[a>>2]):(A=q[a>>2],q[a+4>>2]=A,v=v+-32|(q[a>>2]=0),0);q[C>>2]=B<>2]=A<>>32-v}function la(a,v,D,V,W){var X,Y=0,Z=0,_=0;L=X=L-240|0,Y=q[v>>2],q[232+X>>2]=Y,v=q[v+4>>2],q[X>>2]=a,Z=1;a:{b:{c:{if(((q[236+X>>2]=v)||1!=(0|Y))&&(Y=a-q[(D<<2)+W>>2]|0,!((0|n[5](Y,a))<1))){for(_=!V;;){e:{if(v=Y,!(!_|(0|D)<2)){if(V=q[((D<<2)+W|0)-8>>2],-1<(0|n[5](Y=a+-4|0,v)))break e;if(-1<(0|n[5](Y-V|0,v)))break e}if(q[(Z<<2)+X>>2]=v,Z=Z+1|0,ma(232+X|0,a=Oa(232+X|0)),D=a+D|0,!q[236+X>>2]&&1==q[232+X>>2])break b;if(_=1,Y=(a=v)-q[(D<<2)+W>>2]|(V=0),0<(0|n[5](Y,q[X>>2])))continue;break c}break}v=a;break b}v=a}if(V)break a}Na(X,Z),ta(v,D,W)}L=240+X|0}function ma(a,v){var D=0,V=a,L=v>>>0<=31?(D=q[a>>2],q[a+4>>2]):(D=q[a+4>>2],q[a+4>>2]=0,q[a>>2]=D,v=v+-32|0,0);q[V+4>>2]=L>>>v,q[a>>2]=L<<32-v|D>>>v}function na(a,v){var W=r[a+4|0];q[v>>2]=q[a+64>>2]+a,q[v+4>>2]=q[a+68>>2]+a,q[v+8>>2]=q[a+72>>2]+a,q[v+12>>2]=q[a+76>>2]+a,q[v+16>>2]=q[a+80>>2]+a,q[v+20>>2]=q[a+84>>2]+a,q[v+24>>2]=q[a+88>>2]+a,q[v+28>>2]=q[a+92>>2]+a,q[v+32>>2]=q[a+96>>2]+a,q[v+36>>2]=q[a+100>>2]+a,q[v+40>>2]=q[a+104>>2]+a,q[v+44>>2]=q[a+108>>2]+a,q[v+48>>2]=q[a+112>>2]+a,q[v+52>>2]=q[a+116>>2]+a,q[v+56>>2]=q[a+120>>2]+a,q[v+60>>2]=q[a+124>>2]+a,q[v- -64>>2]=q[a+128>>2]+a,q[v+68>>2]=q[a+132>>2]+a,q[v+72>>2]=q[a+136>>2]+a,q[v+76>>2]=q[a+140>>2]+a,q[v+80>>2]=q[a+144>>2]+a,q[v+84>>2]=q[a+148>>2]+a,q[v+92>>2]=q[a+152>>2]+a,q[v+96>>2]=q[a+156>>2]+a,q[v+100>>2]=q[a+160>>2]+a,q[v+108>>2]=q[a+164>>2]+a,q[v+112>>2]=q[a+168>>2]+a,q[v+116>>2]=q[a+172>>2]+a,q[v+124>>2]=q[a+176>>2]+a,q[v+128>>2]=q[a+180>>2]+a,q[v+132>>2]=q[a+184>>2]+a,q[v+136>>2]=q[a+188>>2]+a,q[v+140>>2]=q[a+192>>2]+a,q[v+144>>2]=q[a+196>>2]+a,q[v+148>>2]=q[a+200>>2]+a,q[v+152>>2]=q[a+204>>2]+a,q[v+156>>2]=q[a+208>>2]+a,q[v+164>>2]=q[a+212>>2]+a,q[v+168>>2]=q[a+216>>2]+a,q[v+172>>2]=q[a+220>>2]+a,q[v+176>>2]=q[a+224>>2]+a,q[v+180>>2]=q[a+228>>2]+a,q[v+184>>2]=q[a+232>>2]+a,q[v+188>>2]=q[a+236>>2]+a,q[v+192>>2]=q[a+240>>2]+a,q[v+196>>2]=q[a+244>>2]+a,q[v+200>>2]=q[a+248>>2]+a,q[v+204>>2]=q[a+252>>2]+a,q[v+208>>2]=q[a+256>>2]+a,q[v+212>>2]=q[a+260>>2]+a,q[v+216>>2]=q[a+264>>2]+a,q[v+220>>2]=q[a+268>>2]+a,q[v+224>>2]=q[a+272>>2]+a,q[v+228>>2]=q[a+276>>2]+a,q[v+232>>2]=q[a+280>>2]+a,q[v+236>>2]=q[a+284>>2]+a,q[v+244>>2]=q[a+288>>2]+a,q[v+248>>2]=q[a+292>>2]+a,q[v+272>>2]=q[a+296>>2]+a,q[v+276>>2]=q[a+300>>2]+a,q[v+280>>2]=q[a+304>>2]+a,q[v+292>>2]=q[a+308>>2]+a,q[v+296>>2]=q[a+312>>2]+a,q[v+300>>2]=q[a+316>>2]+a,q[v+304>>2]=q[a+320>>2]+a,q[v+308>>2]=q[a+324>>2]+a,q[v+312>>2]=q[a+328>>2]+a,q[v+316>>2]=q[a+332>>2]+a,q[v+328>>2]=q[a+336>>2]+a,q[v+332>>2]=q[a+340>>2]+a,q[v+336>>2]=q[a+344>>2]+a,q[v+348>>2]=q[a+348>>2]+a,q[v+360>>2]=q[a+352>>2]+a,q[v+364>>2]=q[a+356>>2]+a,q[v+368>>2]=q[a+360>>2]+a,q[v+352>>2]=q[a+364>>2]+a,q[v+356>>2]=q[a+368>>2]+a,q[v+488>>2]=q[a+372>>2]+a,q[v+492>>2]=q[a+376>>2]+a,q[v+496>>2]=q[a+380>>2]+a,q[v+500>>2]=q[a+384>>2]+a,q[v+504>>2]=q[a+388>>2]+a,q[v+508>>2]=q[a+392>>2]+a,q[v+512>>2]=q[a+396>>2]+a,q[v+516>>2]=q[a+400>>2]+a,q[v+520>>2]=q[a+404>>2]+a,q[v+524>>2]=q[a+408>>2]+a,q[v+528>>2]=q[a+412>>2]+a,q[v+532>>2]=q[a+416>>2]+a,q[v+536>>2]=q[a+420>>2]+a,q[v+540>>2]=q[a+424>>2]+a,q[v+544>>2]=q[a+428>>2]+a,q[v+548>>2]=q[a+432>>2]+a,q[v+552>>2]=q[a+436>>2]+a,q[v+556>>2]=q[a+440>>2]+a,q[v+560>>2]=q[a+444>>2]+a,q[v+564>>2]=q[a+448>>2]+a,q[v+568>>2]=q[a+452>>2]+a,q[v+572>>2]=q[a+456>>2]+a,q[v+576>>2]=q[a+460>>2]+a,q[v+580>>2]=q[a+464>>2]+a,W>>>0<2||(q[v+104>>2]=q[a+468>>2]+a,W>>>0<4)||(q[v+260>>2]=q[a+472>>2]+a,q[v+264>>2]=q[a+476>>2]+a,q[v+268>>2]=q[a+480>>2]+a,q[v+88>>2]=q[a+484>>2]+a,q[v+120>>2]=q[a+488>>2]+a,q[v+160>>2]=q[a+492>>2]+a,q[v+584>>2]=q[a+496>>2]+a,q[v+588>>2]=q[a+500>>2]+a,q[v+592>>2]=q[a+504>>2]+a,q[v+596>>2]=q[a+508>>2]+a,q[v+600>>2]=q[a+512>>2]+a,q[v+604>>2]=q[a+516>>2]+a,q[v+240>>2]=q[a+520>>2]+a,q[v+252>>2]=q[a+524>>2]+a,q[v+256>>2]=q[a+528>>2]+a,q[v+372>>2]=q[a+532>>2]+a,q[v+376>>2]=q[a+536>>2]+a,q[v+380>>2]=q[a+540>>2]+a,q[v+384>>2]=q[a+544>>2]+a,q[v+388>>2]=q[a+548>>2]+a,q[v+392>>2]=q[a+552>>2]+a,q[v+396>>2]=q[a+556>>2]+a,q[v+400>>2]=q[a+560>>2]+a,q[v+416>>2]=q[a+564>>2]+a,q[v+420>>2]=q[a+568>>2]+a,q[v+424>>2]=q[a+572>>2]+a,q[v+440>>2]=q[a+576>>2]+a,q[v+444>>2]=q[a+580>>2]+a,q[v+448>>2]=q[a+584>>2]+a,q[v+464>>2]=q[a+588>>2]+a,q[v+468>>2]=q[a+592>>2]+a,q[v+472>>2]=q[a+596>>2]+a,q[v+476>>2]=q[a+600>>2]+a,q[v+480>>2]=q[a+604>>2]+a,q[v+484>>2]=q[a+608>>2]+a,4!=(0|W)&&(q[v+284>>2]=q[a+612>>2]+a,q[v+288>>2]=q[a+616>>2]+a,q[v+320>>2]=q[a+620>>2]+a,q[v+324>>2]=q[a+624>>2]+a,q[v+340>>2]=q[a+628>>2]+a,q[v+344>>2]=q[a+632>>2]+a,q[v+404>>2]=q[a+636>>2]+a,q[v+408>>2]=q[a+640>>2]+a,q[v+412>>2]=q[a+644>>2]+a,q[v+428>>2]=q[a+648>>2]+a,q[v+432>>2]=q[a+652>>2]+a,q[v+436>>2]=q[a+656>>2]+a,q[v+452>>2]=q[a+660>>2]+a,q[v+456>>2]=q[a+664>>2]+a,q[v+460>>2]=q[a+668>>2]+a))}function oa(a,v,$){var aa=0;a:{if(8==(0|v))v=qa($);else{if(aa=28,3&v|1!=(0|function(a){for(var $o=0,ap=0;ap=$o,a;)a&=a-1,$o=$o+1|0;return ap}(v>>>2)))break a;if(aa=48,-64-v>>>0<$>>>0)break a;v=function(a,Vk){var vl,wl,ql=0,tl=0,ul=0;if((tl=a>>>0>(ql=16)?a:16)+-1&tl)for(;ql=(a=ql)<<1,a>>>0>>0;);else a=tl;return-64-a>>>0<=Vk>>>0?(q[2086]=48,0):(ql=qa(12+((tl=Vk>>>0<11?16:Vk+11&-8)+a|0)|0))?(Vk=ql+-8|0,ql&a+-1?(ul=(-8&(wl=q[(vl=ql+-4|0)>>2]))-(ql=(a=15<(ql=((a+ql|0)-1&0-a)-8|0)-Vk>>>0?ql:a+ql|0)-Vk|0)|0,3&wl?(q[a+4>>2]=ul|1&q[a+4>>2]|2,q[4+(ul=a+ul|0)>>2]=1|q[4+ul>>2],q[vl>>2]=ql|1&q[vl>>2]|2,q[a+4>>2]=1|q[a+4>>2],za(Vk,ql)):(Vk=q[Vk>>2],q[a+4>>2]=ul,q[a>>2]=Vk+ql)):a=Vk,3&(Vk=q[a+4>>2])&&((ql=-8&Vk)>>>0<=tl+16>>>0||(q[a+4>>2]=tl|1&Vk|2,q[(Vk=a+tl|0)+4>>2]=3|(tl=ql-tl|0),q[4+(ql=a+ql|0)>>2]=1|q[ql+4>>2],za(Vk,tl))),a+8|0):0}(16>>0?v:16,$)}if(!v)return 1;q[a>>2]=v,aa=0}return aa}function pa(a){var da,v=0,$=0,ba=0,ca=0,ea=0,fa=0,ha=0;a:if(a){da=(ba=a+-8|0)+(a=-8&($=q[a+-4>>2]))|0;b:if(!(1&$)){if(!(3&$))break a;if((ba=ba-($=q[ba>>2])|0)>>>0>>0<=255)ca=q[ba+8>>2],$>>>=3,(0|(v=q[ba+12>>2]))==(0|ca)?(ha=q[2087]&ed($),q[2087]=ha):(q[ca+12>>2]=v,q[v+8>>2]=ca);else{if(fa=q[ba+24>>2],(0|ba)!=(0|($=q[ba+12>>2])))v=q[ba+8>>2],q[v+12>>2]=$,q[$+8>>2]=v;else if(v=(v=q[(ca=ba+20|0)>>2])||q[(ca=ba+16|0)>>2]){for(;ea=ca,(v=q[(ca=($=v)+20|0)>>2])||(ca=$+16|0,v=q[$+16>>2]););q[ea>>2]=0}else $=0;if(fa){ca=q[ba+28>>2];e:{if(q[(v=8652+(ca<<2)|0)>>2]==(0|ba)){if(q[v>>2]=$)break e;ha=q[2088]&ed(ca),q[2088]=ha;break b}if(!(q[fa+(q[fa+16>>2]==(0|ba)?16:20)>>2]=$))break b}q[$+24>>2]=fa,(v=q[ba+16>>2])&&(q[$+16>>2]=v,q[v+24>>2]=$),(v=q[ba+20>>2])&&(q[$+20>>2]=v,q[v+24>>2]=$)}}else if(3==(3&($=q[4+da>>2])))return q[2089]=a,q[4+da>>2]=-2&$,q[ba+4>>2]=1|a,q[a+ba>>2]=a}if(!(da>>>0<=ba>>>0)&&1&($=q[4+da>>2])){f:{if(!(2&$)){if(q[2093]==(0|da)){if(q[2093]=ba,a=q[2090]+a|0,q[2090]=a,q[ba+4>>2]=1|a,q[2092]!=(0|ba))break a;return q[2089]=0,q[2092]=0}if(q[2092]==(0|da))return q[2092]=ba,a=q[2089]+a|0,q[2089]=a,q[ba+4>>2]=1|a,q[a+ba>>2]=a;a=(-8&$)+a|0;g:if($>>>0<=255)$>>>=3,(0|(v=q[8+da>>2]))==(0|(ca=q[12+da>>2]))?(ha=q[2087]&ed($),q[2087]=ha):(q[v+12>>2]=ca,q[ca+8>>2]=v);else{if(fa=q[24+da>>2],(0|da)!=(0|($=q[12+da>>2])))v=q[8+da>>2],q[v+12>>2]=$,q[$+8>>2]=v;else if(v=(v=q[(ca=20+da|0)>>2])||q[(ca=16+da|0)>>2]){for(;ea=ca,(v=q[(ca=($=v)+20|0)>>2])||(ca=$+16|0,v=q[$+16>>2]););q[ea>>2]=0}else $=0;if(fa){ca=q[28+da>>2];j:{if(q[(v=8652+(ca<<2)|0)>>2]==(0|da)){if(q[v>>2]=$)break j;ha=q[2088]&ed(ca),q[2088]=ha;break g}if(!(q[fa+(q[fa+16>>2]==(0|da)?16:20)>>2]=$))break g}q[$+24>>2]=fa,(v=q[16+da>>2])&&(q[$+16>>2]=v,q[v+24>>2]=$),(v=q[20+da>>2])&&(q[$+20>>2]=v,q[v+24>>2]=$)}}if(q[ba+4>>2]=1|a,q[a+ba>>2]=a,q[2092]!=(0|ba))break f;return q[2089]=a}q[4+da>>2]=-2&$,q[ba+4>>2]=1|a,q[a+ba>>2]=a}if(a>>>0<=255)return $=8388+((a>>>=3)<<3)|0,a=(v=q[2087])&(a=1<>2]:(q[2087]=a|v,$),q[$+8>>2]=ba,q[a+12>>2]=ba,q[ba+12>>2]=$,q[ba+8>>2]=a;q[ba+16>>2]=0,v=q[ba+20>>2]=0,(ca=a>>>8)&&(v=31,16777215>>0||(v=ca,v=28+((v=((v=(v<<=ca=ca+1048320>>>16&8)<<(fa=v+520192>>>16&4))<<(ea=v+245760>>>16&2)>>>15)-(ea|ca|fa)|0)<<1|a>>>v+21&1)|0)),ea=8652+((q[($=ba)+28>>2]=v)<<2)|0;m:if((ca=q[2088])&($=1<>>1)|0),$=q[ea>>2];n:{for(;;){if((-8&q[(v=$)+4>>2])==(0|a))break n;if($=ca>>>29,ca<<=1,!($=q[16+(ea=v+(4&$)|0)>>2]))break}q[ea+16>>2]=ba,q[ba+12>>2]=ba,q[ba+24>>2]=v,q[ba+8>>2]=ba;break m}a=q[v+8>>2],q[a+12>>2]=ba,q[v+8>>2]=ba,q[ba+24>>2]=0,q[ba+12>>2]=v,q[ba+8>>2]=a}else q[2088]=$|ca,q[ea>>2]=ba,q[ba+12>>2]=ba,q[ba+24>>2]=ea,q[ba+8>>2]=ba;if(a=q[2095]+-1|0,!(q[2095]=a)){for(ba=8804;ba=(a=q[ba>>2])+8|0,a;);q[2095]=-1}}}}function qa(a){var sa,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,ua=0;L=sa=L-16|0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{if(a>>>0<=244){if(3&(ia=(ma=q[2087])>>>(a=(na=a>>>0<11?16:a+11&-8)>>>3))){a=(ia=q[8396+(la=(ja=a+(1&(-1^ia))|0)<<3)>>2])+8|0,(0|(ka=q[ia+8>>2]))==(0|(la=la+8388|0))?(ua=ed(ja)&ma,q[2087]=ua):(q[ka+12>>2]=la,q[la+8>>2]=ka),q[ia+4>>2]=3|(ja<<=3),q[4+(ia=ia+ja|0)>>2]=1|q[ia+4>>2];break a}if(na>>>0<=(pa=q[2089])>>>0)break k;if(ia){ja=ia=(a=(0-(a=(0-(ja=2<>>12&16,ia=q[8396+(ka=(ja=((ja=(ja|=ia=(a>>>=ia)>>>5&8)|(ia=(a>>>=ia)>>>2&4)|(ia=(a>>>=ia)>>>1&2))|(ia=(a>>>=ia)>>>1&1))+(a>>>ia)|0)<<3)>>2],(0|(a=q[ia+8>>2]))==(0|(ka=ka+8388|0))?(ma=ed(ja)&ma,q[2087]=ma):(q[a+12>>2]=ka,q[ka+8>>2]=a),a=ia+8|0,q[ia+4>>2]=3|na,q[4+(oa=ia+na|0)>>2]=1|(la=(ja<<=3)-na|0),q[ia+ja>>2]=la,pa&&(ia=8388+((ja=pa>>>3)<<3)|0,ka=q[2092],ja=(ja=1<>2]:(q[2087]=ja|ma,ia),q[ia+8>>2]=ka,q[ja+12>>2]=ka,q[ka+12>>2]=ia,q[ka+8>>2]=ja),q[2092]=oa,q[2089]=la;break a}if(!(ra=q[2088]))break k;for(ja=ia=(a=(ra&0-ra)-1|0)>>>12&16,ia=q[8652+(((ja=(ja|=ia=(a>>>=ia)>>>5&8)|(ia=(a>>>=ia)>>>2&4)|(ia=(a>>>=ia)>>>1&2))|(ia=(a>>>=ia)>>>1&1))+(a>>>ia)<<2)>>2],ka=(-8&q[ia+4>>2])-na|0,ja=ia;a=(a=q[ja+16>>2])||q[ja+20>>2];)ka=(ja=(la=(-8&q[a+4>>2])-na|0)>>>0>>0)?la:ka,ia=ja?a:ia,ja=a;if(qa=q[ia+24>>2],(0|(la=q[ia+12>>2]))!=(0|ia)){a=q[ia+8>>2],q[a+12>>2]=la,q[la+8>>2]=a;break b}if(!(a=q[(ja=ia+20|0)>>2])){if(!(a=q[ia+16>>2]))break j;ja=ia+16|0}for(;oa=ja,(a=q[(ja=(la=a)+20|0)>>2])||(ja=la+16|0,a=q[la+16>>2]););q[oa>>2]=0;break b}if(na=-1,!(4294967231>>0)&&(na=-8&(ia=a+11|0),pa=q[2088])){ja=0-na|0,ma=0,(ia>>>=8)&&(ma=31,16777215>>0||(ma=28+((a=((ma=(ia<<=ka=ia+1048320>>>16&8)<<(a=ia+520192>>>16&4))<<(ia=ma+245760>>>16&2)>>>15)-(ia|a|ka)|0)<<1|na>>>a+21&1)|0));q:{r:{if(ka=q[8652+(ma<<2)>>2])for(ia=na<<(31==(0|ma)?0:25-(ma>>>1)|0),a=0;;){if(!(ja>>>0<=(oa=(-8&q[ka+4>>2])-na|0)>>>0||(la=ka,ja=oa))){ja=0,a=ka;break r}if(oa=q[ka+20>>2],ka=q[16+((ia>>>29&4)+ka|0)>>2],a=oa&&(0|oa)!=(0|ka)?oa:a,ia<<=0!=(0|ka),!ka)break}else a=0;if(!(a|la)){if(!(a=(0-(a=2<>>12&16,a=q[8652+(((ka=(ka|=ia=(a>>>=ia)>>>5&8)|(ia=(a>>>=ia)>>>2&4)|(ia=(a>>>=ia)>>>1&2))|(ia=(a>>>=ia)>>>1&1))+(a>>>ia)<<2)>>2]}if(!a)break q}for(;ja=(ia=(ka=(-8&q[a+4>>2])-na|0)>>>0>>0)?ka:ja,la=ia?a:la,a=(ia=q[a+16>>2])||q[a+20>>2];);}if(!(!la|ja>>>0>=q[2089]-na>>>0)){if(oa=q[la+24>>2],(0|la)!=(0|(ia=q[la+12>>2]))){a=q[la+8>>2],q[a+12>>2]=ia,q[ia+8>>2]=a;break c}if(!(a=q[(ka=la+20|0)>>2])){if(!(a=q[la+16>>2]))break i;ka=la+16|0}for(;ma=ka,(a=q[(ka=(ia=a)+20|0)>>2])||(ka=ia+16|0,a=q[ia+16>>2]););q[ma>>2]=0;break c}}}if(na>>>0<=(ia=q[2089])>>>0){a=q[2092],16<=(ja=ia-na|0)>>>0?(q[2089]=ja,q[2092]=ka=a+na|0,q[ka+4>>2]=1|ja,q[a+ia>>2]=ja,q[a+4>>2]=3|na):(q[2092]=0,q[2089]=0,q[a+4>>2]=3|ia,q[4+(ia=a+ia|0)>>2]=1|q[ia+4>>2]),a=a+8|0;break a}if(na>>>0<(ka=q[2090])>>>0){q[2090]=ia=ka-na|0,a=q[2093],q[2093]=ja=a+na|0,q[ja+4>>2]=1|ia,q[a+4>>2]=3|na,a=a+8|0;break a}if((ja=(ma=(ja=la=na+47|(a=0))+(ia=q[2205]?q[2207]:(q[2208]=-1,q[2209]=-1,q[2206]=4096,q[2207]=4096,q[2205]=12+sa&-16^1431655768,q[2210]=0,q[2198]=0,4096))|0)&(oa=0-ia|0))>>>0<=na>>>0)break a;if((ia=q[2197])&&(qa=(pa=q[2195])+ja|0)>>>0<=pa>>>0|ia>>>0>>0)break a;if(4&r[8792])break f;v:{w:{if(ia=q[2093])for(a=8796;;){if((pa=q[a>>2])+q[a+4>>2]>>>0>ia>>>0&&pa>>>0<=ia>>>0)break w;if(!(a=q[a+8>>2]))break}if(-1==(0|(ia=ea(0))))break g;if(ma=ja,(ma=(ka=(a=q[2206])+-1|0)&ia?(ja-ia|0)+(ia+ka&0-a)|0:ma)>>>0<=na>>>0|2147483646>>0)break g;if((a=q[2197])&&(oa=(ka=q[2195])+ma|0)>>>0<=ka>>>0|a>>>0>>0)break g;if((0|ia)!=(0|(a=ea(ma))))break v;break e}if(2147483646<(ma=oa&ma-ka)>>>0)break g;if((0|(ia=ea(ma)))==(q[a>>2]+q[a+4>>2]|0))break h;a=ia}if(!(na+48>>>0<=ma>>>0|2147483646>>0|-1==(0|(ia=a)))){if(2147483646<(a=(a=q[2207])+(la-ma|0)&0-a)>>>0)break e;if(-1!=(0|ea(a))){ma=a+ma|0;break e}ea(0-ma|0);break g}if(-1!=(0|ia))break e;break g}la=0;break b}ia=0;break c}if(-1!=(0|ia))break e}q[2198]=4|q[2198]}if(2147483646>>0)break d;if(ia=ea(ja),(a=ea(0))>>>0<=ia>>>0|-1==(0|ia)|-1==(0|a))break d;if((ma=a-ia|0)>>>0<=na+40>>>0)break d}a=q[2195]+ma|0,(q[2195]=a)>>>0>t[2196]&&(q[2196]=a);x:{y:{z:{if(ja=q[2093]){for(a=8796;;){if(((ka=q[a>>2])+(la=q[a+4>>2])|0)==(0|ia))break z;if(!(a=q[a+8>>2]))break}break y}for((a=q[2091])>>>0<=ia>>>0&&a||(q[2091]=ia),a=0,q[2200]=ma,q[2199]=ia,q[2095]=-1,q[2096]=q[2205],q[2202]=0;q[8396+(ja=a<<3)>>2]=ka=ja+8388|0,q[ja+8400>>2]=ka,32!=(0|(a=a+1|0)););q[2090]=ka=(a=ma+-40|0)-(ja=ia+8&7?-8-ia&7:0)|0,q[2093]=ja=ia+ja|0,q[ja+4>>2]=1|ka,q[4+(a+ia|0)>>2]=40,q[2094]=q[2209];break x}if(!(8&r[a+12|0]|ia>>>0<=ja>>>0|ja>>>0>>0)){q[a+4>>2]=la+ma,q[2093]=ia=(a=ja+8&7?-8-ja&7:0)+ja|0,ka=q[2090]+ma|0,q[2090]=a=ka-a|0,q[ia+4>>2]=1|a,q[4+(ja+ka|0)>>2]=40,q[2094]=q[2209];break x}}ia>>>0<(la=q[2091])>>>0&&(q[2091]=ia,la=0),ka=ia+ma|0,a=8796;A:{B:{C:{D:{E:{F:{for(;(0|ka)!=q[a>>2];)if(!(a=q[a+8>>2]))break F;if(!(8&r[a+12|0]))break E}for(a=8796;;){if((ka=q[a>>2])>>>0<=ja>>>0&&ja>>>0<(la=ka+q[a+4>>2]|0)>>>0)break D;a=q[a+8>>2]}}if(q[a>>2]=ia,q[a+4>>2]=q[a+4>>2]+ma,q[4+(qa=(ia+8&7?-8-ia&7:0)+ia|0)>>2]=3|na,a=((ia=ka+(ka+8&7?-8-ka&7:0)|0)-qa|0)-na|0,oa=na+qa|0,(0|ia)==(0|ja)){q[2093]=oa,a=q[2090]+a|0,q[2090]=a,q[oa+4>>2]=1|a;break B}if(q[2092]==(0|ia)){q[2092]=oa,a=q[2089]+a|0,q[2089]=a,q[oa+4>>2]=1|a,q[a+oa>>2]=a;break B}if(1==(3&(ja=q[ia+4>>2]))){ra=-8&ja;G:if(ja>>>0<=255)la=ja>>>3,ja=q[ia+8>>2],(0|(ka=q[ia+12>>2]))==(0|ja)?(ua=q[2087]&ed(la),q[2087]=ua):(q[ja+12>>2]=ka,q[ka+8>>2]=ja);else{if(pa=q[ia+24>>2],(0|(ma=q[ia+12>>2]))!=(0|ia))ja=q[ia+8>>2],q[ja+12>>2]=ma,q[ma+8>>2]=ja;else if(na=(na=q[(ka=ia+20|0)>>2])||q[(ka=ia+16|0)>>2]){for(;ja=ka,(na=q[(ka=(ma=na)+20|0)>>2])||(ka=ma+16|0,na=q[ma+16>>2]););q[ja>>2]=0}else ma=0;if(pa){ja=q[ia+28>>2];J:{if(q[(ka=8652+(ja<<2)|0)>>2]==(0|ia)){if(q[ka>>2]=ma)break J;ua=q[2088]&ed(ja),q[2088]=ua;break G}if(!(q[pa+(q[pa+16>>2]==(0|ia)?16:20)>>2]=ma))break G}q[ma+24>>2]=pa,(ja=q[ia+16>>2])&&(q[ma+16>>2]=ja,q[ja+24>>2]=ma),(ja=q[ia+20>>2])&&(q[ma+20>>2]=ja,q[ja+24>>2]=ma)}}ia=ia+ra|0,a=a+ra|0}if(q[ia+4>>2]=-2&q[ia+4>>2],q[oa+4>>2]=1|a,(q[a+oa>>2]=a)>>>0<=255){a=8388+((ia=a>>>3)<<3)|0,ia=(ja=q[2087])&(ia=1<>2]:(q[2087]=ia|ja,a),q[a+8>>2]=oa,q[ia+12>>2]=oa,q[oa+12>>2]=a,q[oa+8>>2]=ia;break B}if(ia=0,(ka=a>>>8)&&(ia=31,16777215>>0||(ia=28+((ia=((na=(ka<<=la=ka+1048320>>>16&8)<<(ia=ka+520192>>>16&4))<<(ka=na+245760>>>16&2)>>>15)-(ka|ia|la)|0)<<1|a>>>ia+21&1)|0)),q[(ja=oa)+28>>2]=ia,q[oa+16>>2]=0,ja=8652+(ia<<2)|(q[oa+20>>2]=0),(ka=q[2088])&(la=1<>>1)|0),ia=q[ja>>2];;){if((-8&q[(ja=ia)+4>>2])==(0|a))break C;if(ia=ka>>>29,ka<<=1,!(ia=q[16+(la=(4&ia)+ja|0)>>2]))break}q[la+16>>2]=oa}else q[2088]=ka|la,q[ja>>2]=oa;q[oa+24>>2]=ja,q[oa+12>>2]=oa,q[oa+8>>2]=oa;break B}for(q[2090]=oa=(a=ma+-40|0)-(ka=ia+8&7?-8-ia&7:0)|0,q[2093]=ka=ia+ka|0,q[ka+4>>2]=1|oa,q[4+(a+ia|0)>>2]=40,q[2094]=q[2209],q[(ka=(a=(la+(la+-39&7?39-la&7:0)|0)-47|0)>>>0>>0?ja:a)+4>>2]=27,a=q[2202],q[ka+16>>2]=q[2201],q[ka+20>>2]=a,a=q[2200],q[ka+8>>2]=q[2199],q[ka+12>>2]=a,q[2201]=ka+8,q[2200]=ma,q[2199]=ia,a=ka+24|(q[2202]=0);q[a+4>>2]=7,ia=a+8|0,a=a+4|0,ia>>>0>>0;);if((0|ja)==(0|ka))break x;if(q[ka+4>>2]=-2&q[ka+4>>2],q[ja+4>>2]=1|(la=ka-ja|0),(q[ka>>2]=la)>>>0<=255){a=8388+((ia=la>>>3)<<3)|0,ia=(ka=q[2087])&(ia=1<>2]:(q[2087]=ia|ka,a),q[a+8>>2]=ja,q[ia+12>>2]=ja,q[ja+12>>2]=a,q[ja+8>>2]=ia;break x}if(q[ja+16>>2]=0,a=q[ja+20>>2]=0,(ka=la>>>8)&&(a=31,16777215>>0||(a=28+((a=((oa=(ka<<=ma=ka+1048320>>>16&8)<<(a=ka+520192>>>16&4))<<(ka=oa+245760>>>16&2)>>>15)-(ka|a|ma)|0)<<1|la>>>a+21&1)|0)),ia=8652+((q[(ia=ja)+28>>2]=a)<<2)|0,(ka=q[2088])&(ma=1<>>1)|0),ia=q[ia>>2];;){if((0|la)==(-8&q[(ka=ia)+4>>2]))break A;if(ia=a>>>29,a<<=1,!(ia=q[16+(ma=ka+(4&ia)|0)>>2]))break}q[ma+16>>2]=ja,q[ja+24>>2]=ka}else q[2088]=ka|ma,q[ia>>2]=ja,q[ja+24>>2]=ia;q[ja+12>>2]=ja,q[ja+8>>2]=ja;break x}a=q[ja+8>>2],q[a+12>>2]=oa,q[ja+8>>2]=oa,q[oa+24>>2]=0,q[oa+12>>2]=ja,q[oa+8>>2]=a}a=qa+8|0;break a}a=q[ka+8>>2],q[a+12>>2]=ja,q[ka+8>>2]=ja,q[ja+24>>2]=0,q[ja+12>>2]=ka,q[ja+8>>2]=a}if(!((a=q[2090])>>>0<=na>>>0)){q[2090]=ia=a-na|0,a=q[2093],q[2093]=ja=a+na|0,q[ja+4>>2]=1|ia,q[a+4>>2]=3|na,a=a+8|0;break a}}q[2086]=48,a=0;break a}Q:if(oa){a=q[la+28>>2];R:{if(q[(ka=8652+(a<<2)|0)>>2]==(0|la)){if(q[ka>>2]=ia)break R;pa=ed(a)&pa,q[2088]=pa;break Q}if(!(q[oa+(q[oa+16>>2]==(0|la)?16:20)>>2]=ia))break Q}q[ia+24>>2]=oa,(a=q[la+16>>2])&&(q[ia+16>>2]=a,q[a+24>>2]=ia),(a=q[la+20>>2])&&(q[ia+20>>2]=a,q[a+24>>2]=ia)}S:if(ja>>>0<=15)q[la+4>>2]=3|(a=ja+na|0),q[4+(a=a+la|0)>>2]=1|q[a+4>>2];else if(q[la+4>>2]=3|na,q[4+(ka=la+na|0)>>2]=1|ja,(q[ja+ka>>2]=ja)>>>0<=255)a=8388+((ia=ja>>>3)<<3)|0,ia=(ja=q[2087])&(ia=1<>2]:(q[2087]=ia|ja,a),q[a+8>>2]=ka,q[ia+12>>2]=ka,q[ka+12>>2]=a,q[ka+8>>2]=ia;else{a=0,(na=ja>>>8)&&(a=31,16777215>>0||(a=28+((a=((oa=(na<<=ma=na+1048320>>>16&8)<<(a=na+520192>>>16&4))<<(na=oa+245760>>>16&2)>>>15)-(na|a|ma)|0)<<1|ja>>>a+21&1)|0)),q[(ia=ka)+28>>2]=a,q[ka+16>>2]=0,ia=8652+(a<<2)|(q[ka+20>>2]=0);V:{if((na=1<>>1)|0),na=q[ia>>2];;){if((-8&q[(ia=na)+4>>2])==(0|ja))break V;if(na=a>>>29,a<<=1,!(na=q[16+(ma=(4&na)+ia|0)>>2]))break}q[ma+16>>2]=ka}else q[2088]=na|pa,q[ia>>2]=ka;q[ka+24>>2]=ia,q[ka+12>>2]=ka,q[ka+8>>2]=ka;break S}a=q[ia+8>>2],q[a+12>>2]=ka,q[ia+8>>2]=ka,q[ka+24>>2]=0,q[ka+12>>2]=ia,q[ka+8>>2]=a}a=la+8|0;break a}X:if(qa){a=q[ia+28>>2];Y:{if(q[(ja=8652+(a<<2)|0)>>2]==(0|ia)){if(q[ja>>2]=la)break Y;ua=ed(a)&ra,q[2088]=ua;break X}if(!(q[qa+(q[qa+16>>2]==(0|ia)?16:20)>>2]=la))break X}q[la+24>>2]=qa,(a=q[ia+16>>2])&&(q[la+16>>2]=a,q[a+24>>2]=la),(a=q[ia+20>>2])&&(q[la+20>>2]=a,q[a+24>>2]=la)}ka>>>0<=15?(q[ia+4>>2]=3|(a=ka+na|0),q[4+(a=a+ia|0)>>2]=1|q[a+4>>2]):(q[ia+4>>2]=3|na,q[4+(na=ia+na|0)>>2]=1|ka,q[ka+na>>2]=ka,pa&&(a=8388+((ja=pa>>>3)<<3)|0,la=q[2092],ja=(ja=1<>2]:(q[2087]=ja|ma,a),q[a+8>>2]=la,q[ja+12>>2]=la,q[la+12>>2]=a,q[la+8>>2]=ja),q[2092]=na,q[2089]=ka),a=ia+8|0}return L=16+sa|0,a}function ra(a,va,wa,xa,ya,za,Aa){var Qa,Ta,Ba,Ca=0,Da=0,Fa=0,Ia=0,Ja=0,Ka=0,Ma=0,Na=0,Oa=0,Pa=0,Ra=0,Sa=0;q[76+(L=Ba=L-80|0)>>2]=va,Ta=55+Ba|0,Qa=56+Ba|0,va=0;a:{b:{c:for(;;){(0|Oa)<0||(Oa=(2147483647-Oa|0)<(0|va)?(q[2086]=61,-1):va+Oa|0);e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{if(Ia=q[76+Ba>>2],Fa=r[0|(va=Ia)]){for(;;){r:{s:{t:if(Ca=255&Fa){if(37!=(0|Ca))break s;for(Fa=va;;){if(37!=r[va+1|0])break t;if(q[76+Ba>>2]=Ca=va+2|0,Fa=Fa+1|0,Da=r[va+2|0],va=Ca,37!=(0|Da))break}}else Fa=va;if(va=Fa-Ia|0,a&&Z(a,Ia,va),va)continue c;Pa=-1,Ja=!ha(o[q[76+(Ca=Ba)>>2]+(Fa=1)|0]),va=q[76+Ba>>2],Ja|36!=r[va+2|0]||(Pa=o[va+1|0]+-48|0,Ra=1,Fa=3),q[Ca+76>>2]=va=Fa+va|0;u:if(31<(Da=(Ma=o[(Fa=0)|va])+-32|0)>>>0)Ca=va;else if(Ca=va,75913&(Da=1<>2]=Ca=va+1|0,Fa|=Da,31<(Da=(Ma=o[va+1|0])+-32|0)>>>0)break u;if(va=Ca,!(75913&(Da=1<>2],36==r[va+2|0]))q[((o[va+1|0]<<2)+ya|0)-192>>2]=10,Na=q[((o[va+1|0]<<3)+xa|0)-384>>2],Ra=1,va=va+3|0;else{if(Ra)break b;Na=Ra=0,a&&(va=q[wa>>2],q[wa>>2]=va+4,Na=q[va>>2]),va=q[76+Ba>>2]+1|0}q[Ja+76>>2]=va,-1<(0|Na)||(Na=0-Na|0,Fa|=8192)}else{if((0|(Na=Ha(76+Ba|0)))<0)break b;va=q[76+Ba>>2]}if(Da=-1,46==r[0|va])if(42==r[va+1|0])if(ha(o[va+2|0])&&(va=q[76+Ba>>2],36==r[va+3|0]))q[((o[va+2|0]<<2)+ya|0)-192>>2]=10,Da=q[((o[va+2|0]<<3)+xa|0)-384>>2],q[76+Ba>>2]=va=va+4|0;else{if(Ra)break b;Da=a?(va=q[wa>>2],q[wa>>2]=va+4,q[va>>2]):0,va=q[76+Ba>>2]+2|0,q[76+Ba>>2]=va}else q[76+Ba>>2]=va+1,Da=Ha(76+Ba|0),va=q[76+Ba>>2];for(Ca=0;;){if(Sa=Ca,Ka=-1,57>>0)break a;if(q[76+Ba>>2]=Ma=va+1|0,Ca=o[0|va],va=Ma,!((Ca=r[3295+(Ca+w(Sa,58)|0)|0])+-1>>>0<8))break}if(!Ca)break a;A:{B:{C:{if(19==(0|Ca)){if((0|Pa)<=-1)break C;break a}if((0|Pa)<0)break B;q[(Pa<<2)+ya>>2]=Ca,Ca=q[4+(va=(Pa<<3)+xa|0)>>2],q[64+Ba>>2]=q[va>>2],q[68+Ba>>2]=Ca}if(va=0,a)break A;continue c}if(!a)break e;Ga(64+Ba|0,Ca,wa,Aa),Ma=q[76+Ba>>2]}if(Ja=-65537&Fa,Fa=8192&Fa?Ja:Fa,Pa=3336,Ca=Qa,va=o[Ma+-1|(Ka=0)],(Ma=(va=Sa&&3==(15&va)?-33&va:va)+-88|0)>>>0<=32)break r;D:{E:{F:{G:{if(6<(Ja=va+-65|0)>>>0){if(83!=(0|va))break f;if(!Da)break G;Ca=q[64+Ba>>2];break E}switch(Ja-1|0){case 1:break F;case 0:case 2:break f;default:break q}}_(a,32,Na,va=0,Fa);break D}q[12+Ba>>2]=0,q[8+Ba>>2]=q[64+Ba>>2],q[64+Ba>>2]=8+Ba,Da=-1,Ca=8+Ba|0}va=0;H:{for(;;){if(!(Ia=q[Ca>>2]))break H;if((Ja=(0|(Ia=Ea(4+Ba|0,Ia)))<0)|Da-va>>>0>>0)break;if(Ca=Ca+4|0,!((va=va+Ia|0)>>>0>>0))break H}if(Ka=-1,Ja)break a}if(_(a,32,Na,va,Fa),va)for(Da=0,Ca=q[64+Ba>>2];;){if(!(Ia=q[Ca>>2]))break D;if((0|va)<(0|(Da=(Ia=Ea(4+Ba|0,Ia))+Da|0)))break D;if(Z(a,4+Ba|0,Ia),Ca=Ca+4|0,!(Da>>>0>>0))break}else va=0}_(a,32,Na,va,8192^Fa),va=(0|va)<(0|Na)?Na:va;continue c}q[76+Ba>>2]=Ca=va+1|0,Fa=r[va+1|0],va=Ca;continue}break}switch(Ma-1|0){case 28:break i;case 21:break j;case 23:break l;case 22:break m;case 11:case 16:break n;case 10:break o;case 26:break p;case 8:case 12:case 13:case 14:break q;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 9:case 15:case 17:case 18:case 19:case 20:case 24:case 25:case 27:case 29:case 30:break f;default:break k}}if(Ka=Oa,a)break a;if(!Ra)break e;for(va=1;;){if(a=q[(va<<2)+ya>>2]){if(Ga((va<<3)+xa|0,a,wa,Aa),10!=(0|(va=va+(Ka=1)|0)))continue;break a}break}if(Ka=1,9>>0)break a;if(Ka=-1,q[(va<<2)+ya>>2])break a;for(;!q[((va=va+1|0)<<2)+ya>>2]&&10!=(0|va););Ka=va>>>0<10?-1:1;break a}va=0|n[za](a,v[64+Ba>>3],Na,Da,Fa,va);continue}Ca=(va=La(Ia=(va=q[64+Ba>>2])||3346,Da))||Da+Ia|0,Fa=Ja,Da=va?va-Ia|0:Da;break f}o[55+Ba|0]=q[64+Ba>>2],Da=1,Ia=Ta,Fa=Ja;break f}if(va=Ja=q[68+Ba>>2],Ia=q[64+Ba>>2],(0|va)<-1||(0|va)<=-1&&!(4294967295>>0)){va=0-(va+(0>>0)|0)|0,q[64+Ba>>2]=Ia=0-Ia|0,q[68+Ba>>2]=va,Ka=1,Pa=3336;break h}if(2048&Fa){Ka=1,Pa=3337;break h}Pa=(Ka=1&Fa)?3338:3336;break h}if(Ia=function(a,Il,Rm){if(a|Il)for(;o[0|(Rm=Rm+-1|0)]=7&a|48,(a=(7&Il)<<29|a>>>3)|(Il>>>=3););return Rm}(q[64+Ba>>2],q[68+Ba>>2],Qa),!(8&Fa))break g;Da=(0|(va=Qa-Ia|0))<(0|Da)?Da:va+1|0;break g}Da=8>>0?Da:8,Fa|=8,va=120}if(Ia=function(a,Il,Rm,Sm){if(a|Il)for(;o[0|(Rm=Rm+-1|0)]=r[3824+(15&a)|0]|Sm,(a=(15&Il)<<28|a>>>4)|(Il>>>=4););return Rm}(q[64+Ba>>2],q[68+Ba>>2],Qa,32&va),!(8&Fa)|!(q[64+Ba>>2]|q[68+Ba>>2]))break g;Pa=3336+(va>>>4)|0,Ka=2;break g}if(7<(Ca=255&Sa)>>>(va=0))continue;switch(Ca-1|0){default:case 0:q[q[64+Ba>>2]>>2]=Oa;continue;case 1:Ca=q[64+Ba>>2],q[Ca>>2]=Oa,q[Ca+4>>2]=Oa>>31;continue;case 2:p[q[64+Ba>>2]>>1]=Oa;continue;case 3:o[q[64+Ba>>2]]=Oa;continue;case 5:q[q[64+Ba>>2]>>2]=Oa;continue;case 4:continue;case 6:}Ca=q[64+Ba>>2],q[Ca>>2]=Oa,q[Ca+4>>2]=Oa>>31;continue}Ia=q[64+Ba>>2],va=q[68+Ba>>2],Pa=3336}Ia=ga(Ia,va,Qa)}Fa=-1<(0|Da)?-65537&Fa:Fa,Da=!!((Ja=va=q[68+Ba>>2])|(Ma=q[64+Ba>>2]))|Da?(0|(va=!(Ja|Ma)+(Qa-Ia|0)|0))<(0|Da)?Da:va:(Ia=Qa,0)}_(a,32,va=(0|Na)<(0|(Ca=(Da=(0|Da)<(0|(Ja=Ca-Ia|0))?Ja:Da)+Ka|0))?Ca:Na,Ca,Fa),Z(a,Pa,Ka),_(a,48,va,Ca,65536^Fa),_(a,48,Da,Ja,0),Z(a,Ia,Ja),_(a,32,va,Ca,8192^Fa);continue}break}Ka=0;break a}Ka=-1}return L=80+Ba|0,Ka}function sa(a){var ya,va=0,wa=0,xa=0,za=0,xa=4,wa=1439;a:if(va=r[0|a]){for(;!((0|(ya=r[0|wa]))!=(0|va)||!(xa=xa+-1|0)|!ya);)if(wa=wa+1|0,va=r[a+1|0],a=a+1|0,!va)break a;za=va}return(255&za)-r[0|wa]|0}function ta(a,Aa,Ea){var La,Ga,Ha=0,Ua=0,Va=0;q[(L=Ga=L-240|0)>>2]=a,Ua=1;a:if(!((0|Aa)<2))for(Ha=a;;){if(Ha=(La=Ha+-4|0)-q[((Va=Aa+-2|0)<<2)+Ea>>2]|0,0<=(0|n[5](a,Ha))&&-1<(0|n[5](a,La)))break a;if(a=(Ua<<2)+Ga|0,0<=(0|n[5](Ha,La))?(q[a>>2]=Ha,Va=Aa+-1|0):Ha=q[a>>2]=La,Ua=Ua+1|0,(0|Va)<2)break a;a=q[Ga>>2],Aa=Va}Na(Ga,Ua),L=240+Ga|0}function ua(a){var Ea,$a,Aa=0;if(x(0),function(a){var Vg,Wg;q[a+428>>2]&&(Wg=q[a+332>>2],$(q[a+460>>2],q[a+436>>2],Vg=Wg<<2),$(q[a+464>>2],q[a+440>>2],Vg),$(q[a+468>>2],q[a+448>>2],Vg),r[q[a>>2]+4|0]<4||($(q[a+472>>2],q[a+452>>2],Vg=Wg<<4),$(q[a+476>>2],q[a+456>>2],Vg)))}(a),function(a){var ke,le,me,fe=0,ge=x(0),he=x(0),ie=0,je=x(0);x(0),x(0);if(1<=(0|(ie=q[a>>2])))for(me=(fe=q[a+4>>2])+w(ie,52)|0,a=q[a+12>>2];ge=u[a>>2],u[fe+44>>2]!=(ge=(ke=q[fe+16>>2])?(he=ge,ge=u[fe+4>>2],je=u[fe+12>>2],he=x(x(he-ge)/je),le=x(C(he)),ie=x(y(le))>2],he=u[fe+8>>2],ge>2]=ge,q[fe+48>>2]=1):q[fe+48>>2]=0,ke||(u[a>>2]=ge),a=a+4|0,(fe=fe+52|0)>>>0>>0;);}(a+540|0),function(a){var Wd,Xd,ae,ce,de,ee,Rd=0,Sd=0,Td=x(0),Ud=0,Vd=x(0),Yd=(x(0),x(0),0),Zd=x(0),_d=0,$d=0,be=0;x(0);if(1<=(0|(Ud=q[a+540>>2])))for(de=(Yd=q[a+544>>2])+w(Ud,52)|0,ee=q[a+644>>2];;){a:if(!(q[Yd>>2]||(0|(Ud=q[Yd+32>>2]))<1))if(ae=(a=q[Yd+28>>2])+w(Ud,28)|0,ce=u[Yd+24>>2],Xd=u[Yd+20>>2],Wd=u[Yd+44>>2],ee)for(;;){Zd=x($d=0);h:{i:{j:{if((0|(Sd=q[a>>2]))<1)Rd=Ud=0;else if(_d=q[a+4>>2],Vd=u[_d>>2],Td=x(Vd-Xd),1==(0|Sd))Ud=Wd>2],!(Wd>2],Wd>2])break h;break i}Rd=Sd+-1|0,Ud=1}_d=(Sd=(Vd=u[a+12>>2])!=Zd)&(Zd==x(0)|Vd==x(0))|q[a+8>>2]!=(0|Rd),$d=Ud}if(q[a+20>>2]=_d,q[a+24>>2]=Sd,u[a+12>>2]=Zd,q[a+16>>2]=$d,q[a+8>>2]=Rd,!((a=a+28|0)>>>0>>0))break}else{if(!q[Yd+48>>2])for(;;)if(q[a+20>>2]=0,!((a=a+28|(q[a+24>>2]=0))>>>0>>0))break a;for(;;){Zd=x($d=0);b:{c:{d:{e:if(!(((Sd=0)|(Rd=q[(_d=a)>>2]))<1)){if(Ud=q[a+4>>2],Vd=u[Ud>>2],Td=x(Vd-Xd),1!=(0|Rd)){if(!(Wd>2],!(Wd>2],Wd>2]))break b}$d=Ud,be=(Sd=(Vd=u[a+12>>2])!=Zd)&(Zd==x(0)|Vd==x(0))|q[a+8>>2]!=(0|Rd)}if(q[_d+20>>2]=be,q[a+24>>2]=Sd,u[a+12>>2]=Zd,q[a+16>>2]=$d,q[a+8>>2]=Rd,!((a=a+28|0)>>>0>>0))break}}if(!((Yd=Yd+52|0)>>>0>>0))break}}(a),function(a){var rd,sd,td,ud,vd,kd=0,ld=x(0),md=0,nd=0,od=x(0),pd=0,qd=x(0);x(0);if(!(r[q[a>>2]+4|0]<4||(0|(kd=q[a+540>>2]))<1))for(ud=(pd=q[a+544>>2])+w(kd,52)|0,vd=q[a+644>>2];;){b:if(1==q[pd>>2]&&!((0|(kd=q[pd+40>>2]))<1))if(sd=(a=q[pd+36>>2])+w(kd,28)|0,rd=u[pd+44>>2],vd)for(;;){qd=x(kd=0);d:if(!((0|(nd=q[a>>2]))<2||(md=q[a+4>>2],rd<=(ld=u[md>>2])))){kd=1;e:if(!(rd<(od=u[md+4>>2]))){for(;ld=od,(0|nd)!=(0|(kd=kd+1|0));)if(rd<(od=u[md+(kd<<2)>>2]))break e;kd=nd+-1|0;break d}qd=x(x(rd-ld)/x(od-ld)),kd=kd+-1|0}if(ld=u[a+16>>2],u[a+16>>2]=qd,nd=q[a+12>>2],q[a+12>>2]=kd,q[a+24>>2]=md=ld!=qd,q[a+20>>2]=md&(qd==x(0)|ld==x(0))|(0|kd)!=(0|nd),!((a=a+28|0)>>>0>>0))break}else{if(!q[pd+48>>2])for(;;)if(q[a+20>>2]=0,!((a=a+28|(q[a+24>>2]=0))>>>0>>0))break b;for(;;){qd=x(nd=0);c:if(!((0|(td=q[a>>2]))<2||(md=q[a+4>>2],rd<=(ld=u[md>>2])))){if(kd=1,!(rd<(od=u[md+4>>2])))for(nd=td+-1|0;;){if(ld=od,(0|kd)==(0|nd))break c;if(rd<(od=u[md+((kd=kd+1|0)<<2)>>2]))break}qd=x(x(rd-ld)/x(od-ld)),nd=kd+-1|0}if(ld=u[a+16>>2],u[a+16>>2]=qd,kd=q[a+12>>2],q[a+12>>2]=nd,q[a+24>>2]=md=ld!=qd,q[a+20>>2]=md&(qd==x(0)|ld==x(0))|(0|kd)!=(0|nd),!((a=a+28|0)>>>0>>0))break}}if(!((pd=pd+52|0)>>>0>>0))break}}(a),function(a){var Id,Jd,Md,Nd,Od,Pd,Qd,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=x(0),Ed=0,Gd=0,Hd=0,Kd=0,Ld=0;if(1<=(0|(xd=q[a+564>>2])))for(Pd=(Ad=q[a+568>>2])+w(xd,36)|0,Nd=q[a+644>>2];;){a:{if(!(Bd=((yd=zd=xd=0)|(Jd=q[Ad+4>>2]))<1))for(Ed=q[Ad>>2],a=Kd=0;;){if(wd=q[Ed+(a<<2)>>2],q[wd+16>>2]){wd=1,Ld=0;break a}if(yd=yd||q[wd+24>>2],xd=xd||q[wd+20>>2],zd=(u[wd+12>>2]!=x(0))+zd|0,(0|Jd)==(0|(a=a+1|0)))break}if(wd=0,(Kd=Nd?1:yd)|(Ld=Nd?1:xd)&&(q[Ad+12>>2]=Ed=1<>2],Od=q[Ad>>2],yd=(a=q[Ad+16>>2])+(Cd=Ed<<2)|0,yd=ca(a,0,4+((-1^a)+((a=a+4|0)>>>0>>0?yd:a)|0)&-4),Cd=xd+Cd|0,a=xd;q[a>>2]=1065353216,(a=a+4|0)>>>0>>0;);if(!Bd){if(Bd=0,Cd=wd=1,zd)for(;;){if(zd=q[(Bd<<2)+Od>>2],Gd=q[zd+8>>2],Hd=w(Gd,wd),(Dd=u[zd+12>>2])!=x(a=0)){for(q[yd>>2]=Hd+q[yd>>2],u[xd>>2]=x(x(1)-Dd)*u[xd>>2],Gd=w(Gd+(a=1)|0,wd);Dd=u[zd+12>>2],Qd=q[(Md=(Id=a<<2)+yd|0)>>2],q[Md>>2]=Qd+((Md=a&Cd)?Gd:Hd),u[(Id=xd+Id|0)>>2]=(Md?Dd:x(x(1)-Dd))*u[Id>>2],(0|Ed)!=(0|(a=a+1|0)););Cd<<=1}else for(;q[(Gd=yd+(a<<2)|0)>>2]=Hd+q[Gd>>2],(0|Ed)!=(0|(a=a+1|0)););if(wd=w(q[zd>>2],wd),(0|Jd)==(0|(Bd=Bd+1|0)))break}else for(;;){if(zd=q[(Bd<<2)+Od>>2],Cd=w(q[zd+8>>2],wd),(Dd=u[zd+12>>2])!=x(a=0))q[yd>>2]=Cd+q[yd>>2],u[xd>>2]=x(x(1)-Dd)*u[xd>>2];else for(;q[(Hd=yd+(a<<2)|0)>>2]=Cd+q[Hd>>2],(0|Ed)!=(0|(a=a+1|0)););if(wd=w(q[zd>>2],wd),(0|Jd)==(0|(Bd=Bd+1|0)))break}wd=0}}}if(q[Ad+32>>2]=wd,q[Ad+24>>2]=Ld,q[Ad+28>>2]=Kd,!((Ad=Ad+36|0)>>>0>>0))break}}(a),function(a){var gd,hd,id,jd,Wc=x(0),Xc=0,Yc=0,Zc=0,_c=0,$c=0,ad=x(0),bd=x(0),cd=x(0),dd=0,ed=0,fd=0;if(!(r[q[a>>2]+4|0]<4||(0|(Xc=q[a+588>>2]))<1))for(jd=(Zc=q[a+592>>2])+w(Xc,48)|0,gd=q[a+644>>2];;){if(a=q[Zc>>2],(ed=gd?1:q[a+20>>2])|(fd=gd?1:q[a+24>>2])){c:{d:{$c=Zc,_c=q[a+8>>2],Xc=q[a+12>>2],Wc=u[a+16>>2],a=(0|_c)!=(0|Xc);e:{if(Wc!=x(0)){if(a=Xc+1|0,(0|Xc)==(0|_c)){q[Zc+8>>2]=ed=1,Wc=x(x(1)-Wc),fd=1;break e}a=(0|a)==(0|_c)?1:2}if(q[$c+8>>2]=a,!fd)break d;a=Xc}u[Zc+24>>2]=Wc,u[Zc+20>>2]=x(1)-Wc;break c}fd=0,a=Xc}ed?(q[Zc+12>>2]=a,q[Zc+16>>2]=a+1):ed=0}else ed=fd=0;g:if((0|(hd=q[Zc+36>>2]))<1)cd=x(1);else{if(id=q[Zc+40>>2],a=0,cd=x(1),!gd)for(;;){h:{i:{if(Xc=q[(a<<2)+id>>2],Yc=q[Xc>>2]){if(!q[Yc+48>>2]){Wc=u[Xc+16>>2];break h}if((0|(_c=q[Xc+12>>2]))<1){Wc=x(1),u[Xc+16>>2]=1;break h}if(dd=q[Xc+8>>2],1!=(0|_c)&&(ad=u[Yc+44>>2],$c=q[Xc+4>>2],!(ad<=(bd=u[$c>>2]))))break i;Wc=u[dd>>2],u[Xc+16>>2]=Wc;break h}q[Xc+16>>2]=1065353216,Wc=x(1);break h}Yc=1;j:if(!(ad<(Wc=u[$c+4>>2]))){for(;bd=Wc,(0|_c)!=(0|(Yc=Yc+1|0));)if(ad<(Wc=u[$c+(Yc<<2)>>2]))break j;Wc=u[(dd+(_c<<2)|0)-4>>2],u[Xc+16>>2]=Wc;break h}$c=Xc,Wc=x(x(ad-bd)/x(Wc-bd)),Wc=x(x(Wc*u[(Xc=dd+(Yc<<2)|0)>>2])+x(u[Xc+-4>>2]*x(x(1)-Wc))),u[$c+16>>2]=Wc}if(cd=cd>2],Yc=q[Xc>>2],Wc=x(1);l:if(Yc&&(dd=q[Xc+12>>2],Wc=x(1),!((0|dd)<1))&&(_c=q[Xc+8>>2],Wc=u[_c>>2],1!=(0|dd))){m:{if(ad=u[Yc+44>>2],$c=q[Xc+4>>2],ad<=(bd=u[$c>>2])){Wc=u[_c>>2];break l}if(Yc=1,!(ad<(Wc=u[$c+4>>2]))){for(;bd=Wc,(0|dd)!=(0|(Yc=Yc+1|0));)if(ad<(Wc=u[$c+(Yc<<2)>>2]))break m;Wc=u[(_c+(dd<<2)|0)-4>>2];break l}}Wc=x(x(ad-bd)/x(Wc-bd)),Wc=x(x(Wc*u[(Yc=_c+(Yc<<2)|0)>>2])+x(u[Yc+-4>>2]*x(x(1)-Wc)))}if(cd=cd<(u[Xc+16>>2]=Wc)?cd:Wc,(0|hd)==(0|(a=a+1|0)))break}}if(q[Zc+32>>2]=fd,q[Zc+28>>2]=ed,u[Zc+44>>2]=cd,!((Zc=Zc+48|0)>>>0>>0))break}}(a),1<=(0|(Ea=q[a+4>>2])))for(Ea=(Aa=q[a+52>>2])+(Ea<<2)|0;$a=u[Aa>>2],u[Aa>>2]=$a>>0>>0;);!function(a){var Fe,Ge,He,De=0,Ee=0;if(1<=(0|(Ee=q[a+4>>2])))for(He=(De=q[a+8>>2])+w(Ee,12)|0,a=Fe=q[a+40>>2];Ee=0,q[De+8>>2]&&(Ge=q[De+4>>2],!q[(Ge<<2)+Fe>>2]&&-1!=(0|Ge)||(Ee=!q[q[De>>2]+32>>2])),q[a>>2]=Ee,a=a+4|0,(De=De+12|0)>>>0>>0;);}(a),function(a){var rg,vg,wg,xg,yg,zg,Ag,pg=0,qg=0,sg=0,tg=0,ug=0;if(1<=(0|(vg=q[a+4>>2])))for(xg=q[a+8>>2],wg=q[a>>2],yg=q[wg+724>>2];;){if(rg=q[w(tg,12)+xg>>2],(q[rg+28>>2]||q[rg+24>>2])&&(q[(pg=tg<<2)+q[a+28>>2]>>2]=q[rg+12>>2],q[rg+24>>2])&&!((0|(sg=q[rg+12>>2]))<1))for(sg=(qg=q[rg+16>>2])+(sg<<2)|0,zg=q[pg+yg>>2],pg=q[a+36>>2]+(ug<<2)|0,Ag=q[wg+976>>2];q[pg>>2]=q[(q[qg>>2]+zg<<2)+Ag>>2],pg=pg+4|0,(qg=qg+4|0)>>>0>>0;);if(q[rg+28>>2]&&!((0|(pg=q[rg+12>>2]))<1))for(sg=(qg=q[rg+20>>2])+(pg<<2)|0,pg=q[a+32>>2]+(ug<<2)|0;q[pg>>2]=q[qg>>2],pg=pg+4|0,(qg=qg+4|0)>>>0>>0;);if(ug=q[rg+8>>2]+ug|0,(0|vg)==(0|(tg=tg+1|0)))break}}(a),n[q[1808]](a+12|0,q[a+36>>2],q[a+44>>2],q[a+40>>2]),function(a){var xe,ye,ze,Ae,Be,Ce,ue=0,ve=0,we=0;if(1<=(0|(we=q[a+304>>2])))for(ze=(ue=q[a+308>>2])+(we<<5)|0,Ae=q[a+264>>2],Be=q[a+144>>2],Ce=q[a+40>>2],we=ye=q[a+312>>2];xe=we,ve=0,a=ve=!q[ue+28>>2]||-1!=(0|(a=q[ue+4>>2]))&&(ve=0,!q[(a<<2)+Ce>>2])||-1!=(0|(a=q[ue+8>>2]))&&(ve=0,!q[(a<<2)+ye>>2])?ve:!q[q[ue>>2]+32>>2],q[xe>>2]=a,(xe=q[ue+12>>2])>>>0<=1?xe-1?q[(q[ue+16>>2]<<2)+Be>>2]=a:q[(q[ue+16>>2]<<2)+Ae>>2]=a:Y(4,1372,0),we=we+4|0,(ue=ue+32|0)>>>0>>0;);}(a),function(a){var gg,hg,ig,jg,kg,lg,mg,ng,og,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,_f=0,$f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,Yf=q[a>>2];if(1<=(0|($f=q[a+56>>2]))){for(ag=q[a+60>>2],bg=q[Yf+1052>>2],cg=q[Yf+784>>2];;){if(Uf=q[ag+w(Zf,24)>>2],(q[Uf+28>>2]||q[Uf+24>>2])&&(q[(Vf=Zf<<2)+q[a+80>>2]>>2]=q[Uf+12>>2],q[Uf+24>>2])&&!((0|(Xf=q[Uf+12>>2]))<1))for(dg=(Wf=q[Uf+16>>2])+(Xf<<2)|0,eg=q[Vf+cg>>2],Vf=(Xf=_f<<2)+q[a+92>>2]|0,Xf=Xf+q[a+88>>2]|0;fg=eg+q[Wf>>2]<<2,q[Vf>>2]=bg+(q[fg+q[Yf+984>>2]>>2]<<2),q[Xf>>2]=q[fg+q[Yf+980>>2]>>2],Xf=Xf+4|0,Vf=Vf+4|0,(Wf=Wf+4|0)>>>0>>0;);if(q[Uf+28>>2]&&!((0|(Vf=q[Uf+12>>2]))<1))for(Xf=(Wf=q[Uf+20>>2])+(Vf<<2)|0,Vf=q[a+84>>2]+(_f<<2)|0;q[Vf>>2]=q[Wf>>2],Vf=Vf+4|0,(Wf=Wf+4|0)>>>0>>0;);if(_f=q[Uf+8>>2]+_f|0,(0|$f)==(0|(Zf=Zf+1|0)))break}Yf=q[a>>2]}if(!(r[Yf+4|0]<4||(0|(eg=q[a+56>>2]))<1))for(fg=q[Yf+792>>2],gg=q[a+60>>2],Wf=_f=0;;){if(Zf=q[w(Wf,24)+gg>>2],q[Zf+24>>2]&&!((0|(Uf=q[Zf+12>>2]))<1))for(hg=(Vf=q[Zf+16>>2])+(Uf<<2)|0,ig=q[fg+(Wf<<2)>>2],Xf=(Uf=_f<<2)+q[a+96>>2]|0,$f=Uf+q[a+100>>2]|0,ag=Uf+q[a+104>>2]|0,bg=Uf+q[a+108>>2]|0,cg=Uf+q[a+112>>2]|0,dg=Uf+q[a+116>>2]|0,jg=q[Yf+1308>>2],kg=q[Yf+1304>>2],lg=q[Yf+1300>>2],mg=q[Yf+1296>>2],ng=q[Yf+1292>>2],og=q[Yf+1288>>2];Uf=q[Vf>>2]+ig<<2,q[Xf>>2]=q[Uf+og>>2],q[$f>>2]=q[Uf+ng>>2],q[ag>>2]=q[Uf+mg>>2],q[bg>>2]=q[Uf+lg>>2],q[cg>>2]=q[Uf+kg>>2],q[dg>>2]=q[Uf+jg>>2],dg=dg+4|0,cg=cg+4|0,bg=bg+4|0,ag=ag+4|0,$f=$f+4|0,Xf=Xf+4|0,(Vf=Vf+4|0)>>>0>>0;);if(_f=q[Zf+8>>2]+_f|0,(0|eg)==(0|(Wf=Wf+1|0)))break}}(a),function(a){var xf=0,yf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=q[a+168>>2],zf=q[a>>2];if(1<=(0|(Kf=q[a+164>>2])))for(Mf=q[zf+816>>2];;){if(Af=q[w(Ef,12)+Tf>>2],(q[Af+28>>2]||q[Af+24>>2])&&(q[(Ff=Ef<<2)+q[a+188>>2]>>2]=q[Af+12>>2],q[Af+24>>2])){if(yf=q[Af+16>>2],Lf=q[Ff+Mf>>2],1<=(0|(xf=q[Af+12>>2])))for(Nf=yf+(xf<<2)|0,Bf=(xf=Df<<2)+q[a+200>>2]|0,Gf=xf+q[a+204>>2]|0,Hf=xf+q[a+208>>2]|0,If=xf+q[a+212>>2]|0,Jf=xf+q[a+196>>2]|0,Of=q[zf+996>>2],Pf=q[zf+1012>>2],Qf=q[zf+1008>>2],Rf=q[zf+1004>>2],Sf=q[zf+1e3>>2],xf=yf;Cf=Lf+q[xf>>2]<<2,q[Bf>>2]=q[Cf+Sf>>2],q[Gf>>2]=q[Cf+Rf>>2],q[Hf>>2]=q[Cf+Qf>>2],q[If>>2]=q[Cf+Pf>>2],q[Jf>>2]=q[Cf+Of>>2],Jf=Jf+4|0,If=If+4|0,Hf=Hf+4|0,Gf=Gf+4|0,Bf=Bf+4|0,(xf=xf+4|0)>>>0>>0;);xf=Lf+q[yf>>2]<<2,q[Ff+q[a+288>>2]>>2]=q[xf+q[zf+1016>>2]>>2],q[Ff+q[a+292>>2]>>2]=q[xf+q[zf+1020>>2]>>2]}if(q[Af+28>>2]&&!((0|(yf=q[Af+12>>2]))<1))for(yf=(xf=q[Af+20>>2])+(yf<<2)|0,Bf=q[a+192>>2]+(Df<<2)|0;q[Bf>>2]=q[xf>>2],Bf=Bf+4|0,(xf=xf+4|0)>>>0>>0;);if(Df=q[Af+8>>2]+Df|0,(0|Kf)==(0|(Ef=Ef+1|0)))break}if(!(r[zf+4|0]<4||(0|(Ff=q[a+164>>2]))<1))for(Lf=q[zf+824>>2],Df=Af=0;;){if(Cf=q[w(Df,12)+Tf>>2],q[Cf+24>>2]&&!((0|(xf=q[Cf+12>>2]))<1))for(Kf=(Bf=q[Cf+16>>2])+(xf<<2)|0,Mf=q[Lf+(Df<<2)>>2],Gf=(yf=Af<<2)+q[a+216>>2]|0,Hf=yf+q[a+220>>2]|0,If=yf+q[a+224>>2]|0,Jf=yf+q[a+228>>2]|0,xf=yf+q[a+232>>2]|0,Ef=yf+q[a+236>>2]|0,Nf=q[zf+1308>>2],Of=q[zf+1304>>2],Pf=q[zf+1300>>2],Qf=q[zf+1296>>2],Rf=q[zf+1292>>2],Sf=q[zf+1288>>2];yf=Mf+q[Bf>>2]<<2,q[Gf>>2]=q[yf+Sf>>2],q[Hf>>2]=q[yf+Rf>>2],q[If>>2]=q[yf+Qf>>2],q[Jf>>2]=q[yf+Pf>>2],q[xf>>2]=q[yf+Of>>2],q[Ef>>2]=q[yf+Nf>>2],Ef=Ef+4|0,xf=xf+4|0,Jf=Jf+4|0,If=If+4|0,Hf=Hf+4|0,Gf=Gf+4|0,(Bf=Bf+4|0)>>>0>>0;);if(Af=q[Cf+8>>2]+Af|0,(0|Ff)==(0|(Df=Df+1|0)))break}}(a),function(a){var yk,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,qk=a- -64|0;if(n[q[1807]](qk,q[a+88>>2],q[a+148>>2],q[a+144>>2]),n[q[1809]](qk,q[a+92>>2],q[a+152>>2],q[q[a>>2]+796>>2],2,q[a+144>>2]),!(r[q[a>>2]+4|0]<4||(n[q[1807]](qk,q[a+96>>2],q[a+120>>2],q[a+144>>2]),n[q[1807]](qk,q[a+100>>2],q[a+124>>2],q[a+144>>2]),n[q[1807]](qk,q[a+104>>2],q[a+128>>2],q[a+144>>2]),n[q[1807]](qk,q[a+108>>2],q[a+132>>2],q[a+144>>2]),n[q[1807]](qk,q[a+112>>2],q[a+136>>2],q[a+144>>2]),n[q[1807]](qk,q[a+116>>2],q[a+140>>2],q[a+144>>2]),(0|(vk=q[a+56>>2]))<1))){for(wk=q[a+128>>2],xk=q[a+124>>2],yk=q[a+120>>2],rk=q[a+156>>2],qk=0;q[(sk=tk<<2)+rk>>2]=q[(uk=qk<<2)+yk>>2],q[rk+(4|sk)>>2]=q[uk+xk>>2],q[rk+(8|sk)>>2]=q[uk+wk>>2],tk=tk+4|0,(0|vk)!=(0|(qk=qk+1|0)););for(rk=q[a+160>>2],uk=q[a+140>>2],wk=q[a+136>>2],xk=q[a+132>>2],qk=a=0;q[(tk=a<<2)+rk>>2]=q[(sk=qk<<2)+xk>>2],q[rk+(4|tk)>>2]=q[sk+wk>>2],q[rk+(8|tk)>>2]=q[sk+uk>>2],a=a+4|0,(0|vk)!=(0|(qk=qk+1|0)););}}(a),function(a){var pk,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,hk=a+172|0;if(n[q[1807]](hk,q[a+196>>2],q[a+268>>2],q[a+264>>2]),n[q[1807]](hk,q[a+200>>2],q[a+284>>2],q[a+264>>2]),n[q[1807]](hk,q[a+204>>2],q[a+276>>2],q[a+264>>2]),n[q[1807]](hk,q[a+208>>2],q[a+280>>2],q[a+264>>2]),n[q[1807]](hk,q[a+212>>2],q[a+272>>2],q[a+264>>2]),!(r[q[a>>2]+4|0]<4||(n[q[1807]](hk,q[a+216>>2],q[a+240>>2],q[a+264>>2]),n[q[1807]](hk,q[a+220>>2],q[a+244>>2],q[a+264>>2]),n[q[1807]](hk,q[a+224>>2],q[a+248>>2],q[a+264>>2]),n[q[1807]](hk,q[a+228>>2],q[a+252>>2],q[a+264>>2]),n[q[1807]](hk,q[a+232>>2],q[a+256>>2],q[a+264>>2]),n[q[1807]](hk,q[a+236>>2],q[a+260>>2],q[a+264>>2]),(0|(mk=q[a+164>>2]))<1))){for(nk=q[a+248>>2],ok=q[a+244>>2],pk=q[a+240>>2],ik=q[a+296>>2],hk=0;q[(jk=kk<<2)+ik>>2]=q[(lk=hk<<2)+pk>>2],q[ik+(4|jk)>>2]=q[lk+ok>>2],q[ik+(8|jk)>>2]=q[lk+nk>>2],kk=kk+4|0,(0|mk)!=(0|(hk=hk+1|0)););for(ik=q[a+300>>2],lk=q[a+260>>2],nk=q[a+256>>2],ok=q[a+252>>2],hk=a=0;q[(kk=a<<2)+ik>>2]=q[(jk=hk<<2)+ok>>2],q[ik+(4|kk)>>2]=q[jk+nk>>2],q[ik+(8|kk)>>2]=q[jk+lk>>2],a=a+4|0,(0|mk)!=(0|(hk=hk+1|0)););}}(a),function(a){var re,se,te,oe=0,pe=0,qe=0;if(1<=(0|(pe=q[a+332>>2])))for(re=(oe=q[a+336>>2])+w(pe,20)|0,se=q[a+312>>2],te=q[a+40>>2],a=q[a+424>>2];pe=0,q[oe+12>>2]&&(qe=q[oe+4>>2],q[(qe<<2)+te>>2]||-1==(0|qe))&&(qe=q[oe+8>>2],q[(qe<<2)+se>>2]||-1==(0|qe))&&(pe=!q[q[oe>>2]+32>>2]),q[a>>2]=pe,a=a+4|0,(oe=oe+20|0)>>>0>>0;);}(a),function(a){var pf,qf,rf,sf,tf,uf,vf,wf,$e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,cf=q[a>>2];if(1<=(0|(jf=q[a+332>>2]))){for(kf=q[a+336>>2],lf=q[cf+1052>>2],mf=q[cf+856>>2];;){if($e=q[kf+w(ff,20)>>2],(q[$e+28>>2]||q[$e+24>>2])&&(q[(af=ff<<2)+q[a+356>>2]>>2]=q[$e+12>>2],q[$e+24>>2])&&!((0|(df=q[$e+12>>2]))<1))for(nf=(bf=q[$e+16>>2])+(df<<2)|0,of=q[af+mf>>2],af=(ef=gf<<2)+q[a+372>>2]|0,df=ef+q[a+364>>2]|0,ef=ef+q[a+368>>2]|0;hf=of+q[bf>>2]<<2,q[af>>2]=lf+(q[hf+q[cf+1040>>2]>>2]<<2),q[df>>2]=q[hf+q[cf+1032>>2]>>2],q[ef>>2]=q[hf+q[cf+1036>>2]>>2],ef=ef+4|0,df=df+4|0,af=af+4|0,(bf=bf+4|0)>>>0>>0;);if(q[$e+28>>2]&&!((0|(af=q[$e+12>>2]))<1))for(df=(bf=q[$e+20>>2])+(af<<2)|0,af=q[a+360>>2]+(gf<<2)|0;q[af>>2]=q[bf>>2],af=af+4|0,(bf=bf+4|0)>>>0>>0;);if(gf=q[$e+8>>2]+gf|0,(0|jf)==(0|(ff=ff+1|0)))break}cf=q[a>>2]}if(!(r[cf+4|0]<4||(0|(mf=q[a+332>>2]))<1))for(nf=q[cf+864>>2],of=q[a+336>>2],bf=gf=0;;){if(ff=q[of+w(bf,20)>>2],q[ff+24>>2]&&!((0|($e=q[ff+12>>2]))<1))for(pf=(af=q[ff+16>>2])+($e<<2)|0,qf=q[nf+(bf<<2)>>2],df=($e=gf<<2)+q[a+376>>2]|0,ef=$e+q[a+380>>2]|0,hf=$e+q[a+384>>2]|0,jf=$e+q[a+388>>2]|0,kf=$e+q[a+392>>2]|0,lf=$e+q[a+396>>2]|0,rf=q[cf+1308>>2],sf=q[cf+1304>>2],tf=q[cf+1300>>2],uf=q[cf+1296>>2],vf=q[cf+1292>>2],wf=q[cf+1288>>2];$e=q[af>>2]+qf<<2,q[df>>2]=q[$e+wf>>2],q[ef>>2]=q[$e+vf>>2],q[hf>>2]=q[$e+uf>>2],q[jf>>2]=q[$e+tf>>2],q[kf>>2]=q[$e+sf>>2],q[lf>>2]=q[$e+rf>>2],lf=lf+4|0,kf=kf+4|0,jf=jf+4|0,hf=hf+4|0,ef=ef+4|0,df=df+4|0,(af=af+4|0)>>>0>>0;);if(gf=q[ff+8>>2]+gf|0,(0|mf)==(0|(bf=bf+1|0)))break}}(a),function(a){var gk,vj=0,xj=0,yj=0,bk=0,ck=0,dk=0,ek=0,fk=0,vj=a+340|0;if(n[q[1807]](vj,q[a+364>>2],q[a+448>>2],q[a+424>>2]),n[q[1808]](vj,q[a+368>>2],q[a+440>>2],q[a+424>>2]),n[q[1809]](vj,q[a+372>>2],q[a+444>>2],q[q[a>>2]+892>>2],2,q[a+424>>2]),!(r[q[a>>2]+4|0]<4||(n[q[1807]](vj,q[a+376>>2],q[a+400>>2],q[a+424>>2]),n[q[1807]](vj,q[a+380>>2],q[a+404>>2],q[a+424>>2]),n[q[1807]](vj,q[a+384>>2],q[a+408>>2],q[a+424>>2]),n[q[1807]](vj,q[a+388>>2],q[a+412>>2],q[a+424>>2]),n[q[1807]](vj,q[a+392>>2],q[a+416>>2],q[a+424>>2]),n[q[1807]](vj,q[a+396>>2],q[a+420>>2],q[a+424>>2]),(0|(dk=q[a+332>>2]))<1))){for(ek=q[a+408>>2],fk=q[a+404>>2],gk=q[a+400>>2],xj=q[a+452>>2],vj=0;q[(yj=bk<<2)+xj>>2]=q[(ck=vj<<2)+gk>>2],q[xj+(4|yj)>>2]=q[ck+fk>>2],q[xj+(8|yj)>>2]=q[ck+ek>>2],bk=bk+4|0,(0|dk)!=(0|(vj=vj+1|0)););for(xj=q[a+456>>2],ck=q[a+420>>2],ek=q[a+416>>2],fk=q[a+412>>2],vj=a=0;q[(bk=a<<2)+xj>>2]=q[(yj=vj<<2)+fk>>2],q[xj+(4|bk)>>2]=q[yj+ek>>2],q[xj+(8|bk)>>2]=q[yj+ck>>2],a=a+4|0,(0|dk)!=(0|(vj=vj+1|0)););}}(a),function(a){var Re,Ve,We,Xe,Ye,Ze,_e,Pe=0,Qe=0,Se=0,Te=0,Ue=0;if(1<=(0|(Ve=q[a+500>>2])))for(Xe=q[a+504>>2],We=q[a>>2],Ye=q[We+1252>>2];;){if(Re=q[w(Te,24)+Xe>>2],(q[Re+28>>2]||q[Re+24>>2])&&(q[(Pe=Te<<2)+q[a+524>>2]>>2]=q[Re+12>>2],q[Re+24>>2])&&!((0|(Se=q[Re+12>>2]))<1))for(Se=(Qe=q[Re+16>>2])+(Se<<2)|0,Ze=q[Pe+Ye>>2],Pe=q[a+532>>2]+(Ue<<2)|0,_e=q[We+1284>>2];q[Pe>>2]=q[(q[Qe>>2]+Ze<<2)+_e>>2],Pe=Pe+4|0,(Qe=Qe+4|0)>>>0>>0;);if(q[Re+28>>2]&&!((0|(Pe=q[Re+12>>2]))<1))for(Se=(Qe=q[Re+20>>2])+(Pe<<2)|0,Pe=q[a+528>>2]+(Ue<<2)|0;q[Pe>>2]=q[Qe>>2],Pe=Pe+4|0,(Qe=Qe+4|0)>>>0>>0;);if(Ue=q[Re+8>>2]+Ue|0,(0|Ve)==(0|(Te=Te+1|0)))break}}(a),n[q[1807]](a+508|0,q[a+532>>2],q[a+536>>2],0),function(a){var Ek,Fk,Gk,Hk,Ik,Jk,zk=x(0),Ak=0,Bk=0,Ck=0,Dk=0;x(0);if(L=Ek=L-16|0,Ck=q[a>>2],!(r[Ck+4|0]<5||(0|(Dk=q[a+596>>2]))<1))for(Hk=(Bk=q[a+600>>2])+w(Dk,12)|0,Ik=q[a+44>>2],Dk=q[Ck+976>>2];;){if(Ck=(q[Bk>>2]<<2)+Ik|0,zk=x(q[Ck>>2]),1<=(0|(Ak=q[Bk+4>>2])))for(Jk=(a=q[Bk+8>>2])+w(Ak,48)|0;(Ak=q[a+8>>2])&&((Fk=Ak+-1|0)>>>0<=1?(Ak=q[a+4>>2],Gk=u[Dk+(Ak+q[a+12>>2]<<2)>>2],zk=x(Fk-1?zk+x(u[a+44>>2]*x(Gk*u[a+20>>2])):zk+x(u[a+44>>2]*x(x(Gk*u[a+20>>2])+x(u[Dk+(Ak+q[a+16>>2]<<2)>>2]*u[a+24>>2]))))):(q[Ek>>2]=Ak,Y(4,1024,Ek))),(a=a+48|0)>>>0>>0;);if(zk=(zk=x(zk+x(.0010000000474974513)))>2]=a,!((Bk=Bk+12|0)>>>0>>0))break}L=16+Ek|0}(a),function(a){var mj,nj,oj,pj,qj,rj,sj,tj,uj,ej=0,gj=0,ij=0,jj=0,kj=0,lj=x(0);if(L=mj=L-16|0,ej=q[a>>2],!(r[ej+4|0]<4||(va(a,q[a+604>>2],q[a+608>>2],q[ej+984>>2],q[a+152>>2],q[ej+796>>2]),gj=q[a>>2],r[gj+4|0]<5))){if(ij=q[a+608>>2],qj=q[gj+992>>2],rj=q[gj+988>>2],1<=(0|(ej=q[a+604>>2]))){for(sj=w(ej,12)+ij|0,tj=q[a+148>>2],nj=q[gj+980>>2];;){if(oj=(q[ij>>2]<<2)+tj|0,kj=q[oj>>2],1<=(0|(jj=q[ij+4>>2])))for(uj=(ej=q[ij+8>>2])+w(jj,48)|0;(jj=q[ej+8>>2])&&((pj=jj+-1|0)>>>0<=1?(jj=q[ej+4>>2],lj=u[(jj+q[ej+12>>2]<<2)+nj>>2],j(x(pj-1?x(u[ej+44>>2]*x(lj*u[ej+20>>2]))+(f(0,kj),k()):x(u[ej+44>>2]*x(x(lj*u[ej+20>>2])+x(u[(jj+q[ej+16>>2]<<2)+nj>>2]*u[ej+24>>2])))+(f(0,kj),k()))),kj=b[0]):(q[mj>>2]=jj,Y(4,1024,mj))),(ej=ej+48|0)>>>0>>0;);if(f(0,kj),lj=k(),u[oj>>2]=lj>>0>>0))break}ij=q[a+608>>2],ej=q[a+604>>2]}fa(ej,ij,rj,q[gj+1288>>2],q[gj+1292>>2],q[gj+1296>>2],q[a+156>>2]),fa(q[a+604>>2],q[a+608>>2],qj,q[gj+1300>>2],q[gj+1304>>2],q[gj+1308>>2],q[a+160>>2])}L=16+mj|0}(a),function(a){var Ai,ti=0,ui=0,vi=0,wi=0,xi=0,yi=x(0),zi=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0;if(L=Ai=L-80|0,xi=q[a>>2],!(r[xi+4|0]<5)){if(Fi=q[xi+1028>>2],Gi=q[xi+1024>>2],vi=ui=q[a+616>>2],!((0|(ti=q[a+612>>2]))<1)){for(Bi=w(ti,12)+ui|0,Ci=q[a+276>>2],zi=q[xi+1004>>2];;){if(Di=Ci+(q[ui>>2]<<2)|0,vi=q[Di>>2],1<=(0|(wi=q[ui+4>>2])))for(Hi=(ti=q[ui+8>>2])+w(wi,48)|0;(wi=q[ti+8>>2])&&((Ei=wi+-1|0)>>>0<=1?(wi=q[ti+4>>2],yi=u[zi+(wi+q[ti+12>>2]<<2)>>2],j(x(Ei-1?x(u[ti+44>>2]*x(yi*u[ti+20>>2]))+(f(0,vi),k()):x(u[ti+44>>2]*x(x(yi*u[ti+20>>2])+x(u[zi+(wi+q[ti+16>>2]<<2)>>2]*u[ti+24>>2])))+(f(0,vi),k()))),vi=b[0]):(q[64+Ai>>2]=wi,Y(4,1024,64+Ai|0))),(ti=ti+48|0)>>>0>>0;);if(q[Di>>2]=vi,!((ui=ui+12|0)>>>0>>0))break}if(vi=ui=q[a+616>>2],!((0|(ti=q[a+612>>2]))<1)){for(Bi=w(ti,12)+ui|0,Ci=q[a+280>>2],zi=q[q[a>>2]+1008>>2];;){if(Di=Ci+(q[ui>>2]<<2)|0,vi=q[Di>>2],1<=(0|(wi=q[ui+4>>2])))for(Hi=(ti=q[ui+8>>2])+w(wi,48)|0;(wi=q[ti+8>>2])&&((Ei=wi+-1|0)>>>0<=1?(wi=q[ti+4>>2],yi=u[zi+(wi+q[ti+12>>2]<<2)>>2],j(x(Ei-1?x(u[ti+44>>2]*x(yi*u[ti+20>>2]))+(f(0,vi),k()):x(u[ti+44>>2]*x(x(yi*u[ti+20>>2])+x(u[zi+(wi+q[ti+16>>2]<<2)>>2]*u[ti+24>>2])))+(f(0,vi),k()))),vi=b[0]):(q[48+Ai>>2]=wi,Y(4,1024,48+Ai|0))),(ti=ti+48|0)>>>0>>0;);if(q[Di>>2]=vi,!((ui=ui+12|0)>>>0>>0))break}if(vi=ui=q[a+616>>2],!((0|(ti=q[a+612>>2]))<1)){for(Bi=w(ti,12)+ui|0,Ci=q[a+268>>2],zi=q[q[a>>2]+996>>2];;){if(Di=Ci+(q[ui>>2]<<2)|0,vi=q[Di>>2],1<=(0|(wi=q[ui+4>>2])))for(Hi=(ti=q[ui+8>>2])+w(wi,48)|0;(wi=q[ti+8>>2])&&((Ei=wi+-1|0)>>>0<=1?(wi=q[ti+4>>2],yi=u[zi+(wi+q[ti+12>>2]<<2)>>2],j(x(Ei-1?x(u[ti+44>>2]*x(yi*u[ti+20>>2]))+(f(0,vi),k()):x(u[ti+44>>2]*x(x(yi*u[ti+20>>2])+x(u[zi+(wi+q[ti+16>>2]<<2)>>2]*u[ti+24>>2])))+(f(0,vi),k()))),vi=b[0]):(q[32+Ai>>2]=wi,Y(4,1024,32+Ai|0))),(ti=ti+48|0)>>>0>>0;);if(f(0,vi),yi=k(),u[Di>>2]=yi>>0>>0))break}ti=q[a+612>>2],vi=q[a+616>>2]}}}if(fa(ti,vi,Gi,q[xi+1288>>2],q[xi+1292>>2],q[xi+1296>>2],q[a+296>>2]),fa(q[a+612>>2],q[a+616>>2],Fi,q[xi+1300>>2],q[xi+1304>>2],q[xi+1308>>2],q[a+300>>2]),!((0|(ti=q[a+612>>2]))<1)){for(wi=(ui=q[a+616>>2])+w(ti,12)|0,Fi=q[a+284>>2],xi=q[q[a>>2]+1e3>>2];;){if(Gi=Fi+(q[ui>>2]<<2)|0,vi=q[Gi>>2],1<=(0|(zi=q[ui+4>>2])))for(Bi=(ti=q[ui+8>>2])+w(zi,48)|0;(zi=q[ti+8>>2])&&((Ci=zi+-1|0)>>>0<=1?(zi=q[ti+4>>2],yi=u[xi+(zi+q[ti+12>>2]<<2)>>2],j(x(Ci-1?x(u[ti+44>>2]*x(yi*u[ti+20>>2]))+(f(0,vi),k()):x(u[ti+44>>2]*x(x(yi*u[ti+20>>2])+x(u[xi+(zi+q[ti+16>>2]<<2)>>2]*u[ti+24>>2])))+(f(0,vi),k()))),vi=b[0]):(q[16+Ai>>2]=zi,Y(4,1024,16+Ai|0))),(ti=ti+48|0)>>>0>>0;);if(f(0,vi),yi=k(),u[Gi>>2]=yi>>0>>0))break}if(!((0|(ti=q[a+612>>2]))<1))for(zi=(ui=q[a+616>>2])+w(ti,12)|0,wi=q[a+272>>2],a=q[q[a>>2]+1012>>2];;){if(Fi=wi+(q[ui>>2]<<2)|0,vi=q[Fi>>2],1<=(0|(xi=q[ui+4>>2])))for(Gi=(ti=q[ui+8>>2])+w(xi,48)|0;(xi=q[ti+8>>2])&&((Bi=xi+-1|0)>>>0<=1?(xi=q[ti+4>>2],yi=u[a+(xi+q[ti+12>>2]<<2)>>2],j(x(Bi-1?x(u[ti+44>>2]*x(yi*u[ti+20>>2]))+(f(0,vi),k()):x(u[ti+44>>2]*x(x(yi*u[ti+20>>2])+x(u[a+(xi+q[ti+16>>2]<<2)>>2]*u[ti+24>>2])))+(f(0,vi),k()))),vi=b[0]):(q[Ai>>2]=xi,Y(4,1024,Ai))),(ti=ti+48|0)>>>0>>0;);if(f(0,vi),yi=k(),u[Fi>>2]=yi>>0>>0))break}}}L=80+Ai|0}(a),function(a){var $h,fi,gi,hi,ii,Vh=0,Wh=0,Xh=0,Yh=0,Zh=x(0),_h=0,ai=0,bi=0,ci=0,di=0,ei=0;x(0);if(L=$h=L-32|0,Xh=q[a>>2],!(r[Xh+4|0]<4||(va(a,q[a+620>>2],q[a+624>>2],q[Xh+1040>>2],q[a+444>>2],q[Xh+892>>2]),_h=q[a>>2],r[_h+4|0]<5))){if(hi=q[_h+1048>>2],ii=q[_h+1044>>2],Xh=Yh=q[a+624>>2],!((0|(Vh=q[a+620>>2]))<1)){for(di=w(Vh,12)+Yh|0,ei=q[a+440>>2],ai=q[_h+1036>>2];;){if(Xh=ei+(q[Yh>>2]<<2)|0,Zh=x(q[Xh>>2]),1<=(0|(Wh=q[Yh+4>>2])))for(bi=(Vh=q[Yh+8>>2])+w(Wh,48)|0;(Wh=q[Vh+8>>2])&&((ci=Wh+-1|0)>>>0<=1?(Wh=q[Vh+4>>2],fi=u[ai+(Wh+q[Vh+12>>2]<<2)>>2],Zh=x(ci-1?Zh+x(u[Vh+44>>2]*x(fi*u[Vh+20>>2])):Zh+x(u[Vh+44>>2]*x(x(fi*u[Vh+20>>2])+x(u[ai+(Wh+q[Vh+16>>2]<<2)>>2]*u[Vh+24>>2]))))):(q[16+$h>>2]=Wh,Y(4,1024,16+$h|0))),(Vh=Vh+48|0)>>>0>>0;);if(Zh=(Zh=x(Zh+x(.0010000000474974513)))>2]=Vh,!((Yh=Yh+12|0)>>>0>>0))break}if(Xh=Yh=q[a+624>>2],!((0|(Vh=q[a+620>>2]))<1)){for(di=w(Vh,12)+Yh|0,ei=q[a+448>>2],ai=q[q[a>>2]+1032>>2];;){if(bi=ei+(q[Yh>>2]<<2)|0,Xh=q[bi>>2],1<=(0|(Wh=q[Yh+4>>2])))for(ci=(Vh=q[Yh+8>>2])+w(Wh,48)|0;(Wh=q[Vh+8>>2])&&((gi=Wh+-1|0)>>>0<=1?(Wh=q[Vh+4>>2],Zh=u[ai+(Wh+q[Vh+12>>2]<<2)>>2],j(x(gi-1?x(u[Vh+44>>2]*x(Zh*u[Vh+20>>2]))+(f(0,Xh),k()):x(u[Vh+44>>2]*x(x(Zh*u[Vh+20>>2])+x(u[ai+(Wh+q[Vh+16>>2]<<2)>>2]*u[Vh+24>>2])))+(f(0,Xh),k()))),Xh=b[0]):(q[$h>>2]=Wh,Y(4,1024,$h))),(Vh=Vh+48|0)>>>0>>0;);if(f(0,Xh),Zh=k(),u[bi>>2]=Zh>>0>>0))break}Vh=q[a+620>>2],Xh=q[a+624>>2]}}fa(Vh,Xh,ii,q[_h+1288>>2],q[_h+1292>>2],q[_h+1296>>2],q[a+452>>2]),fa(q[a+620>>2],q[a+624>>2],hi,q[_h+1300>>2],q[_h+1304>>2],q[_h+1308>>2],q[a+456>>2])}L=32+$h|0}(a),function(a){var Pg,Qg,Rg,Sg,Tg,Ug,Kg=0,Lg=0,Mg=0,Ng=0,Og=x(0);if(L=Pg=L-16|0,Lg=q[a>>2],!(r[Lg+4|0]<5||(0|(Ng=q[a+628>>2]))<1))for(Sg=(Mg=q[a+632>>2])+w(Ng,12)|0,Tg=q[a+536>>2],Ng=q[Lg+1284>>2];;){if(Qg=(q[Mg>>2]<<2)+Tg|0,Lg=q[Qg>>2],1<=(0|(Kg=q[Mg+4>>2])))for(Ug=(a=q[Mg+8>>2])+w(Kg,48)|0;(Kg=q[a+8>>2])&&((Rg=Kg+-1|0)>>>0<=1?(Kg=q[a+4>>2],Og=u[Ng+(Kg+q[a+12>>2]<<2)>>2],j(x(Rg-1?x(u[a+44>>2]*x(Og*u[a+20>>2]))+(f(0,Lg),k()):x(u[a+44>>2]*x(x(Og*u[a+20>>2])+x(u[Ng+(Kg+q[a+16>>2]<<2)>>2]*u[a+24>>2])))+(f(0,Lg),k()))),Lg=b[0]):(q[Pg>>2]=Kg,Y(4,1024,Pg))),(a=a+48|0)>>>0>>0;);if(f(0,Lg),Og=k(),u[Qg>>2]=Og>>0>>0))break}L=16+Pg|0}(a),function(a){var Qh,Th,mh=0,Oh=0,Ph=0,Rh=x(0),Sh=0;if(1<=(0|(mh=q[a+4>>2])))for(Th=(Oh=q[a+8>>2])+w(mh,12)|0,mh=q[a+40>>2],Ph=q[a+52>>2],a=Qh=q[a+48>>2];q[mh>>2]&&(Rh=u[Ph>>2],u[a>>2]=Rh,-1!=(0|(Sh=q[Oh+4>>2])))&&(u[a>>2]=Rh*u[(Sh<<2)+Qh>>2]),a=a+4|0,Ph=Ph+4|0,mh=mh+4|0,(Oh=Oh+12|0)>>>0>>0;);}(a),function(a){var lh,ih=0,jh=0,kh=0;if(1<=(0|(lh=q[a+304>>2])))for(ih=q[a+308>>2],jh=q[a+312>>2];q[jh>>2]&&n[q[ih+20>>2]](a,kh),jh=jh+4|0,ih=ih+32|0,(0|lh)!=(0|(kh=kh+1|0)););}(a),function(a){var Zg,_g,ch,gh,hh,Xg=0,Yg=0,$g=(x(0),x(0),0),ah=0,bh=0,dh=(x(0),0),eh=0,fh=0;if(1<=(0|(Xg=q[a+332>>2])))for(eh=(Yg=q[a+336>>2])+w(Xg,20)|0,fh=q[a+308>>2],dh=q[a+316>>2],hh=q[a+48>>2],Xg=q[a+448>>2],$g=q[a+444>>2],bh=q[a+424>>2];q[bh>>2]&&(-1!=(0|(ah=q[Yg+4>>2]))&&(u[Xg>>2]=u[(ah<<2)+hh>>2]*u[Xg>>2]),-1!=(0|(ah=q[Yg+8>>2])))&&(u[Xg>>2]=u[dh+(ah<<2)>>2]*u[Xg>>2],gh=q[$g>>2],n[q[24+(fh+(ah<<5)|0)>>2]](a,ah,gh,gh,q[Yg+16>>2])),$g=$g+4|0,Xg=Xg+4|0,bh=bh+4|0,(Yg=Yg+20|0)>>>0>>0;);if(!(r[q[a>>2]+4|0]<4||(0|(Xg=q[a+332>>2]))<1))for(ah=($g=q[a+336>>2])+w(Xg,20)|0,eh=q[a+328>>2],fh=q[a+324>>2],Yg=q[a+452>>2],Xg=q[a+456>>2],bh=q[a+424>>2];q[bh>>2]&&-1!=(0|(a=q[$g+8>>2]))&&(a=(dh=a<<4)+fh|0,Zg=x(u[Yg>>2]*u[a>>2]),u[Yg>>2]=Zg,_g=x(u[Yg+4>>2]*u[a+4>>2]),u[Yg+4>>2]=_g,ch=u[a+8>>2],q[Yg+12>>2]=1065353216,u[Yg+4>>2]=_g>2]=Zg>2]),u[Yg+8>>2]=Zg>2],_g=u[(a=eh+dh|0)>>2],Zg=x(x(Zg+_g)-x(Zg*_g)),u[Xg>>2]=Zg,_g=u[Xg+4>>2],ch=u[a+4>>2],_g=x(x(_g+ch)-x(_g*ch)),u[Xg+4>>2]=_g,ch=u[a+8>>2],q[Xg+12>>2]=1065353216,u[Xg+4>>2]=_g>2]=Zg>2],Zg=x(x(ch+Zg)-x(Zg*ch)),u[Xg+8>>2]=Zg>>0>>0;);}(a),function(a){var Ln,Mn,On,Ko,Lo,Mo,No,Oo,Po,Qo,Ro,So,To,Uo,Vo,Wo,Xo,Yo,Zo,_o,Nn=0;x(0),x(0),x(0),x(0),x(0),x(0),x(0);if(1<=(0|(Oo=q[a+500>>2])))for(Zo=q[a+536>>2],Po=q[a+444>>2],_o=q[a+504>>2];;){if(a=w(Nn,24)+_o|0,0<(0|(Qo=q[a+12>>2])))for(On=u[(Nn<<2)+Zo>>2],Ro=q[a+20>>2],So=q[a+16>>2],To=q[(q[a+4>>2]<<2)+Po>>2],Uo=q[(q[a+8>>2]<<2)+Po>>2],a=0;Vo=u[((Ln=1|a)<<2)+So>>2],Mn=s[(a<<1)+Ro>>1]<<3&262136,Ko=u[(Wo=(4|Mn)+To|0)>>2],Ln=s[(Ln<<1)+Ro>>1]<<3&262136,Lo=u[(Xo=(4|Ln)+Uo|0)>>2],Mo=u[(Mn=Mn+To|0)>>2],Yo=u[(a<<2)+So>>2],No=u[(Ln=Ln+Uo|0)>>2],u[Mn>>2]=Mo+x(On*x(Yo*x(No-Mo))),u[Wo>>2]=Ko+x(On*x(Yo*x(Lo-Ko))),u[Ln>>2]=No+x(On*x(Vo*x(Mo-No))),u[Xo>>2]=Lo+x(On*x(Vo*x(Ko-Lo))),(0|(a=a+2|0))<(0|Qo););if(!((0|(Nn=Nn+1|0))<(0|Oo)))break}}(a),n[q[1810]](a),function(a){var Rc,Sc,Uc,Vc,Gc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Tc=0;if(!((0|(Rc=q[a+480>>2]))<1)){for(Kc=(Sc=q[a+484>>2])+w(Rc,28)|0,Nc=q[a+424>>2],Oc=q[a+40>>2],Lc=q[a+44>>2],Tc=q[a+440>>2],Gc=Sc;;){if(1<=(0|(Mc=q[Gc+4>>2])))for(Qc=Gc+20|0,Pc=q[Gc+12>>2],Ic=0;Uc=q[4+(Jc=Pc+(Ic<<4)|0)>>2]<<2,Jc=1==q[(Vc=Jc)>>2],q[Vc+12>>2]=q[(q[(Jc?Oc:Nc)+Uc>>2]?(Jc?Lc:Tc)+Uc|0:Qc)>>2],(0|(Ic=Ic+1|0))<(0|Mc););if(!((Gc=Gc+28|0)>>>0>>0))break}if(!((0|Rc)<1))for(Tc=q[a+436>>2],Oc=0;;){if(Kc=w(Oc,28)+Sc|0,!(q[(Nc=Kc)+24>>2]<1)){for(Jc=q[a+488>>2],Ic=0;q[Jc+(Ic<<2)>>2]=-1,(0|(Ic=Ic+1|0))<(0|(Gc=q[Nc+24>>2])););if(!((0|Gc)<1))for(Gc=q[a+496>>2],Ic=0;q[Gc+(Ic<<2)>>2]=-1,(0|(Ic=Ic+1|0))>2];);}if(!(q[Kc+4>>2]<1)){for(Lc=q[a+492>>2],Ic=0;q[Lc+(Ic<<2)>>2]=-1,(0|(Ic=Ic+1|0))<(0|(Gc=q[Kc+4>>2])););if(!((0|Gc)<1))for(Mc=q[Kc+12>>2],Qc=q[a+496>>2],Ic=0;Pc=q[12+(Mc+(Ic<<4)|0)>>2]-q[Kc+20>>2]<<2,Gc=-1==(0|(Gc=q[(Jc=Pc+Qc|0)>>2]))?Pc+q[a+488>>2]|0:Lc+(Gc<<2)|0,q[Gc>>2]=Ic,(0|(Ic=(q[Jc>>2]=Ic)+1|0))>2];);}if(1<=(0|(Gc=q[Nc+24>>2])))for(Lc=q[Kc+8>>2],Qc=q[a+488>>2],Mc=0;;){if(-1!=(0|(Ic=q[Qc+(Mc<<2)>>2]))){for(Pc=q[a+492>>2],Jc=q[Kc+12>>2];Lc=(Gc=1==q[(Gc=Jc+(Ic<<4)|0)>>2]?(Gc=w(q[Gc+8>>2],28)+Sc|0,q[Gc+8>>2]=Lc,q[Gc>>2]):(q[Tc+(q[Gc+4>>2]<<2)>>2]=Lc,1))+Lc|0,(0|Ic)<(0|(Gc=q[Pc+(Ic<<2)>>2]))&&-1!=(0|(Ic=Gc)););Gc=q[Nc+24>>2]}if(!((0|(Mc=Mc+1|0))<(0|Gc)))break}if((0|Rc)==(0|(Oc=Oc+1|0)))break}}}(a),function(a){var Bg=0,Cg=0,Dg=0,Eg=0,Gg=0,Hg=x(0),Ig=0,Jg=0,Fg=q[a+332>>2];if(q[a+644>>2]){if(!(((q[a+428>>2]=0)|Fg)<1))for(;Bg=126,Ig=q[a+432>>2]+Dg|0,!q[(Cg=Dg<<2)+q[a+424>>2]>>2]|u[Cg+q[a+448>>2]>>2]==x(0)||(Bg=127),o[0|Ig]=Bg,(0|Fg)!=(0|(Dg=Dg+1|0)););}else if(q[a+428>>2]){if(Bg=r[q[a>>2]+4|0],!(((q[a+428>>2]=0)|Fg)<1))if(4<=Bg>>>0)for(;Hg=u[(Bg=Dg<<2)+q[a+448>>2]>>2],Eg=q[Bg+q[a+424>>2]>>2],Cg=Hg!=x(0)&0!=(0|Eg),Ig=q[a+432>>2]+Dg|0,Cg=(0|Cg)==(1&o[0|Ig])?Cg:2|Cg,Cg=Hg!=u[Bg+q[a+468>>2]>>2]?4|Cg:Cg,Cg=q[Bg+q[a+440>>2]>>2]==q[Bg+q[a+464>>2]>>2]?Cg:8|Cg,Bg=q[Bg+q[a+436>>2]>>2]==q[Bg+q[a+460>>2]>>2]?Cg:16|Cg,Bg=Eg?32|Bg:Bg,Eg=(Cg=Jg<<2)+q[a+452>>2]|0,Gg=Cg+q[a+472>>2]|0,(u[Eg>>2]!=u[Gg>>2]|u[Eg+4>>2]!=u[Gg+4>>2]|(u[Eg+8>>2]!=u[Gg+8>>2]|u[Eg+12>>2]!=u[Gg+12>>2])||(Eg=Cg+q[a+456>>2]|0,Cg=Cg+q[a+476>>2]|0,u[Eg>>2]!=u[Cg>>2]|u[Eg+4>>2]!=u[Cg+4>>2]|u[Eg+8>>2]!=u[Cg+8>>2])||u[Eg+12>>2]!=u[Cg+12>>2])&&(Bg|=64),o[0|Ig]=Bg,Jg=Jg+4|0,(0|Fg)!=(0|(Dg=Dg+1|0)););else for(;Hg=u[(Bg=Dg<<2)+q[a+448>>2]>>2],Eg=q[Bg+q[a+424>>2]>>2],Cg=Hg!=x(0)&0!=(0|Eg),Gg=q[a+432>>2]+Dg|0,Cg=(0|Cg)==(1&o[0|Gg])?Cg:2|Cg,Cg=Hg!=u[Bg+q[a+468>>2]>>2]?4|Cg:Cg,Cg=q[Bg+q[a+440>>2]>>2]==q[Bg+q[a+464>>2]>>2]?Cg:8|Cg,Bg=q[Bg+q[a+436>>2]>>2]==q[Bg+q[a+460>>2]>>2]?Cg:16|Cg,o[0|Gg]=Eg?32|Bg:Bg,(0|Fg)!=(0|(Dg=Dg+1|0)););}else if(!((0|Fg)<1))for(;!q[(Bg=Dg<<2)+q[a+424>>2]>>2]|u[Bg+q[a+448>>2]>>2]==x(0)?(Bg=q[a+432>>2]+Dg|0,o[0|Bg]=254&r[0|Bg]):(Bg=q[a+432>>2]+Dg|0,o[0|Bg]=1|r[0|Bg]),(0|Fg)!=(0|(Dg=Dg+1|0)););}(a),q[a+644>>2]=0}function va(a,Wa,Xa,Ya,Za,_a){var fb,gb,hb,jb,kb,cb,db,ab=0,bb=0,eb=0,ib=0;if(L=cb=L-32|0,1<=(0|Wa))for(kb=w(Wa,12)+Xa|0;;){if(!((0|(ab=q[Xa+4>>2]))<1))if(fb=(Wa=q[Xa+8>>2])+w(ab,48)|0,ab=q[Xa>>2]<<2,1<=(0|(db=q[ab+_a>>2])))for(db<<=1,gb=q[q[a>>2]+1052>>2],hb=q[Za+ab>>2];;){b:if(ab=q[Wa+8>>2]){c:{if((bb=ab+-1|0)>>>0<=1){if(ab=(q[Wa+4>>2]<<2)+Ya|0,ib=(q[ab+(q[Wa+12>>2]<<2)>>2]<<2)+gb|0,bb-1)break c;for(eb=(q[ab+(q[Wa+16>>2]<<2)>>2]<<2)+gb|0,ab=0;u[(jb=(bb=ab<<2)+hb|0)>>2]=u[jb>>2]+x(u[Wa+44>>2]*x(x(u[bb+ib>>2]*u[Wa+20>>2])+x(u[bb+eb>>2]*u[Wa+24>>2]))),(0|db)!=(0|(ab=ab+1|0)););break b}q[cb>>2]=ab,Y(4,1024,cb);break b}for(ab=0;u[(eb=(bb=ab<<2)+hb|0)>>2]=u[eb>>2]+x(u[Wa+44>>2]*x(u[bb+ib>>2]*u[Wa+20>>2])),(0|db)!=(0|(ab=ab+1|0)););}if(!((Wa=Wa+48|0)>>>0>>0))break}else for(;3<=(ab=q[Wa+8>>2])>>>0&&(q[16+cb>>2]=ab,Y(4,1024,16+cb|0)),(Wa=Wa+48|0)>>>0>>0;);if(!((Xa=Xa+12|0)>>>0>>0))break}L=32+cb|0}function wa(a,Wa,Xa){var Ya;Wa|=0,Xa|=0,L=Ya=L+-64|0;a:{if(a|=0)if(Wa)if((Wa+15&-16)!=(0|Wa))q[52+Ya>>2]=1522,q[48+Ya>>2]=2361,Y(4,1294,48+Ya|0);else{if(Wa=function(a,Il,Jl){var jm,$l=0,hm=0,im=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=x(0),vm=0,wm=0,xm=0,ym=0,zm=0;if(ca(16+(L=jm=L-576|0)|0,0,560),Fa(a,16+jm|0,12+jm|0),(km=q[12+jm>>2])>>>0<=Jl>>>0){if($l=(hm=ca(Il,0,km))+q[16+jm>>2]|0,q[$l+8>>2]=hm+q[20+jm>>2],q[$l+40>>2]=hm+q[24+jm>>2],q[$l+44>>2]=hm+q[28+jm>>2],q[$l+48>>2]=hm+q[32+jm>>2],q[$l+52>>2]=hm+q[36+jm>>2],q[$l+16>>2]=hm+q[40+jm>>2],q[$l+24>>2]=hm+q[44+jm>>2],q[$l+28>>2]=hm+q[48+jm>>2],q[$l+32>>2]=hm+q[52+jm>>2],q[$l+36>>2]=hm+q[56+jm>>2],Il=q[a+704>>2],q[$l+308>>2]=hm+q[60+jm>>2],q[$l+312>>2]=hm+q[64+jm>>2],q[$l+316>>2]=hm+q[68+jm>>2],q[$l+320>>2]=hm+q[72+jm>>2],q[$l+324>>2]=hm+q[76+jm>>2],q[$l+328>>2]=hm+q[80+jm>>2],q[$l+60>>2]=hm+q[84+jm>>2],q[$l+144>>2]=hm+q[88+jm>>2],q[$l+148>>2]=hm+q[92+jm>>2],Jl=hm+q[96+jm>>2]|0,q[$l+152>>2]=Jl,!((0|(km=q[Il+8>>2]))<1)&&(Il=hm+q[100+jm>>2]|0,q[Jl>>2]=Il,1!=(0|km)))for(Jl=1;Il=(15+(q[q[a+796>>2]+(im<<2)>>2]<<3)&-16)+Il|0,q[q[$l+152>>2]+(Jl<<2)>>2]=Il,(0|km)!=(0|(Jl=(im=Jl)+1|0)););if(q[$l+156>>2]=hm+q[104+jm>>2],q[$l+160>>2]=hm+q[108+jm>>2],q[$l+68>>2]=hm+q[112+jm>>2],q[$l+76>>2]=hm+q[116+jm>>2],q[$l+80>>2]=hm+q[120+jm>>2],q[$l+84>>2]=hm+q[124+jm>>2],q[$l+88>>2]=hm+q[128+jm>>2],q[$l+92>>2]=hm+q[132+jm>>2],q[$l+96>>2]=hm+q[136+jm>>2],q[$l+100>>2]=hm+q[140+jm>>2],q[$l+104>>2]=hm+q[144+jm>>2],q[$l+108>>2]=hm+q[148+jm>>2],q[$l+112>>2]=hm+q[152+jm>>2],q[$l+116>>2]=hm+q[156+jm>>2],q[$l+120>>2]=hm+q[160+jm>>2],q[$l+124>>2]=hm+q[164+jm>>2],q[$l+128>>2]=hm+q[168+jm>>2],q[$l+132>>2]=hm+q[172+jm>>2],q[$l+136>>2]=hm+q[176+jm>>2],q[$l+140>>2]=hm+q[180+jm>>2],q[$l+168>>2]=hm+q[184+jm>>2],q[$l+264>>2]=hm+q[188+jm>>2],q[$l+268>>2]=hm+q[192+jm>>2],q[$l+272>>2]=hm+q[196+jm>>2],q[$l+276>>2]=hm+q[200+jm>>2],q[$l+280>>2]=hm+q[204+jm>>2],q[$l+284>>2]=hm+q[208+jm>>2],q[$l+288>>2]=hm+q[212+jm>>2],q[$l+292>>2]=hm+q[216+jm>>2],q[$l+296>>2]=hm+q[220+jm>>2],q[$l+300>>2]=hm+q[224+jm>>2],q[$l+176>>2]=hm+q[228+jm>>2],q[$l+184>>2]=hm+q[232+jm>>2],q[$l+188>>2]=hm+q[236+jm>>2],q[$l+192>>2]=hm+q[240+jm>>2],q[$l+196>>2]=hm+q[244+jm>>2],q[$l+200>>2]=hm+q[248+jm>>2],q[$l+204>>2]=hm+q[252+jm>>2],q[$l+208>>2]=hm+q[256+jm>>2],q[$l+212>>2]=hm+q[260+jm>>2],q[$l+216>>2]=hm+q[264+jm>>2],q[$l+220>>2]=hm+q[268+jm>>2],q[$l+224>>2]=hm+q[272+jm>>2],q[$l+228>>2]=hm+q[276+jm>>2],q[$l+232>>2]=hm+q[280+jm>>2],q[$l+236>>2]=hm+q[284+jm>>2],q[$l+240>>2]=hm+q[288+jm>>2],q[$l+244>>2]=hm+q[292+jm>>2],q[$l+248>>2]=hm+q[296+jm>>2],q[$l+252>>2]=hm+q[300+jm>>2],q[$l+256>>2]=hm+q[304+jm>>2],q[$l+260>>2]=hm+q[308+jm>>2],Il=q[a+704>>2],q[$l+336>>2]=hm+q[312+jm>>2],q[$l+424>>2]=hm+q[316+jm>>2],q[$l+432>>2]=hm+q[320+jm>>2],q[$l+436>>2]=hm+q[324+jm>>2],q[$l+440>>2]=hm+q[328+jm>>2],Jl=hm+q[332+jm>>2]|0,q[$l+444>>2]=Jl,!((0|(km=q[Il+16>>2]))<1)&&(im=hm+q[336+jm>>2]|0,q[Jl>>2]=im,(Jl=1)!=(0|km)))for(Il=0;im=(15+(q[q[a+892>>2]+(Il<<2)>>2]<<3)&-16)+im|0,q[q[$l+444>>2]+(Jl<<2)>>2]=im,(0|km)!=(0|(Jl=(Il=Jl)+1|0)););if(q[$l+448>>2]=hm+q[340+jm>>2],q[$l+452>>2]=hm+q[344+jm>>2],q[$l+456>>2]=hm+q[348+jm>>2],q[$l+460>>2]=hm+q[352+jm>>2],q[$l+464>>2]=hm+q[356+jm>>2],q[$l+468>>2]=hm+q[360+jm>>2],q[$l+472>>2]=hm+q[364+jm>>2],q[$l+476>>2]=hm+q[368+jm>>2],q[$l+344>>2]=hm+q[372+jm>>2],q[$l+352>>2]=hm+q[376+jm>>2],q[$l+356>>2]=hm+q[380+jm>>2],q[$l+360>>2]=hm+q[384+jm>>2],q[$l+364>>2]=hm+q[388+jm>>2],q[$l+368>>2]=hm+q[392+jm>>2],q[$l+372>>2]=hm+q[396+jm>>2],q[$l+376>>2]=hm+q[400+jm>>2],q[$l+380>>2]=hm+q[404+jm>>2],q[$l+384>>2]=hm+q[408+jm>>2],q[$l+388>>2]=hm+q[412+jm>>2],q[$l+392>>2]=hm+q[416+jm>>2],q[$l+396>>2]=hm+q[420+jm>>2],q[$l+400>>2]=hm+q[424+jm>>2],q[$l+404>>2]=hm+q[428+jm>>2],q[$l+408>>2]=hm+q[432+jm>>2],q[$l+412>>2]=hm+q[436+jm>>2],q[$l+416>>2]=hm+q[440+jm>>2],q[$l+420>>2]=hm+q[444+jm>>2],Il=q[448+jm>>2],Jl=q[452+jm>>2],q[$l+552>>2]=hm+q[456+jm>>2],q[$l+548>>2]=Jl+hm,q[$l+544>>2]=Il+hm,q[$l+560>>2]=hm+q[460+jm>>2],Il=q[a+704>>2],nm=hm+q[464+jm>>2]|0,q[$l+568>>2]=nm,1<=(0|(mm=q[Il+48>>2])))for(im=hm+q[468+jm>>2]|0,Il=hm+q[472+jm>>2]|0,lm=hm+q[476+jm>>2]|0,om=q[a+1072>>2],Jl=0;km=nm+w(Jl,36)|0,q[km+20>>2]=lm,q[km+16>>2]=Il,q[km>>2]=im,im=((km=q[om+(Jl<<2)>>2])<<2)+im|0,lm=(km=1<>2],km=hm+q[516+jm>>2]|0,q[$l+484>>2]=km,1<=(0|(Il=q[Il+72>>2])))for(im=hm+q[520+jm>>2]|0,lm=q[a+1212>>2],Jl=0;q[12+(km+w(Jl,28)|0)>>2]=im,im=(q[lm+(Jl<<2)>>2]<<4)+im|0,(0|Il)!=(0|(Jl=Jl+1|0)););q[$l+488>>2]=hm+q[524+jm>>2],q[$l+492>>2]=hm+q[528+jm>>2],q[$l+496>>2]=hm+q[532+jm>>2],q[$l+504>>2]=hm+q[536+jm>>2],q[$l+536>>2]=hm+q[540+jm>>2],q[$l+512>>2]=hm+q[544+jm>>2],q[$l+520>>2]=hm+q[548+jm>>2],q[$l+524>>2]=hm+q[552+jm>>2],q[$l+528>>2]=hm+q[556+jm>>2],q[$l+532>>2]=hm+q[560+jm>>2];c:{if(4<=(mm=r[a+4|0])>>>0){if(q[$l+576>>2]=hm+q[480+jm>>2],q[$l+584>>2]=hm+q[484+jm>>2],Il=q[a+704>>2],Jl=q[492+jm>>2],km=hm+q[488+jm>>2]|0,q[$l+592>>2]=km,1<=(0|(Il=q[Il+104>>2])))for(im=Jl+hm|0,lm=q[a+1104>>2],Jl=0;q[40+(km+w(Jl,48)|0)>>2]=im,im=(q[lm+(Jl<<2)>>2]<<2)+im|0,(0|Il)!=(0|(Jl=Jl+1|0)););q[$l+608>>2]=hm+q[500+jm>>2],q[$l+624>>2]=hm+q[508+jm>>2]}else{if(Il=q[572+jm>>2],Jl=q[568+jm>>2],q[$l+636>>2]=hm+q[564+jm>>2],q[$l+640>>2]=Jl+hm,q[q[a+704>>2]+20>>2]<1)break c;for(km=Il+hm|0,nm=0;;){e:{if((0|(im=q[(Il=nm<<2)+q[a+952>>2]>>2]))<=0)Il=Il+q[$l+636>>2]|0;else{for(lm=im+(Jl=q[Il+q[a+948>>2]>>2])|0,om=q[a+1060>>2],im=0;im=q[om+(Jl<<2)>>2]+im|0,(0|(Jl=Jl+1|0))<(0|lm););if(Il=Il+q[$l+636>>2]|0,Jl=km,im)break e}Jl=im=0}if(q[Il>>2]=Jl,km=(im<<2)+km|0,!((0|(nm=nm+1|0))>2]+20>>2]))break}}mm>>>0<5||(q[$l+600>>2]=hm+q[496+jm>>2],q[$l+616>>2]=hm+q[504+jm>>2],q[$l+632>>2]=hm+q[512+jm>>2])}q[$l+644>>2]=1,q[$l>>2]=a,q[$l+648>>2]=1&o[q[a+708>>2]+20|0],hm=q[a+704>>2],nm=q[hm+20>>2];g:if(!((0|(q[$l+540>>2]=nm))<1)){if(Il=nm+-1|0,om=q[a+952>>2],pm=q[a+940>>2],qm=q[a+932>>2],rm=q[a+936>>2],sm=q[a+924>>2],tm=q[a+928>>2],vm=q[$l+552>>2],xm=q[$l+544>>2],mm>>>0<4)for(;;)if(Jl=xm+w(Il,52)|0,im=(km=Il<<2)+tm|(q[Jl>>2]=0),q[Jl+4>>2]=q[im>>2],q[Jl+8>>2]=q[(lm=km+sm|0)>>2],u[Jl+12>>2]=u[lm>>2]-u[im>>2],q[Jl+16>>2]=q[km+rm>>2],q[Jl+44>>2]=q[(im=km+qm|0)>>2],um=Aa(x(q[km+pm>>2])),u[Jl+20>>2]=um,u[Jl+24>>2]=um*x(1.5),wm=q[km+om>>2],lm=0,lm=(q[Jl+32>>2]=wm)?q[$l+560>>2]+w(q[km+q[a+948>>2]>>2],28)|0:lm,q[Jl+48>>2]=1,q[Jl+28>>2]=lm,q[km+vm>>2]=q[im>>2],Jl=0<(0|Il),Il=Il+-1|0,!Jl)break g;for(wm=q[a+960>>2],zm=q[a+944>>2];Jl=xm+w(Il,52)|0,q[Jl>>2]=q[(im=Il<<2)+zm>>2],q[Jl+4>>2]=q[(km=im+tm|0)>>2],q[Jl+8>>2]=q[(lm=im+sm|0)>>2],u[Jl+12>>2]=u[lm>>2]-u[km>>2],q[Jl+16>>2]=q[im+rm>>2],q[Jl+44>>2]=q[(ym=im+qm|0)>>2],um=Aa(x(q[im+pm>>2])),u[Jl+20>>2]=um,u[Jl+24>>2]=um*x(1.5),lm=q[im+om>>2],q[Jl+32>>2]=lm,q[Jl+28>>2]=lm?q[$l+560>>2]+w(q[im+q[a+948>>2]>>2],28)|0:0,km=q[im+wm>>2],km=(q[Jl+40>>2]=km)?q[$l+584>>2]+w(q[im+q[a+956>>2]>>2],28)|0:0,q[Jl+48>>2]=1,q[Jl+36>>2]=km,q[im+vm>>2]=q[ym>>2],Jl=0<(0|Il),Il=Il+-1|0,Jl;);}if(4<=mm>>>0?(q[$l+548>>2]=q[a+944>>2],km=a):(ca(q[$l+548>>2],0,nm<<2),km=q[$l>>2],hm=q[km+704>>2]),im=q[hm+52>>2],1<=(0|(q[$l+556>>2]=im)))for(Jl=q[km+1056>>2],lm=q[km+1192>>2],nm=q[km+1060>>2],mm=q[$l+560>>2];Il=mm+w(im=im+-1|0,28)|0,q[Il>>2]=q[(om=im<<2)+nm>>2],om=q[Jl+om>>2],q[Il+24>>2]=1,q[Il+16>>2]=0,q[Il+20>>2]=1,q[Il+8>>2]=0,q[Il+12>>2]=0,q[Il+4>>2]=lm+(om<<2),0<(0|im););if(im=q[hm+48>>2],1<=(0|(q[$l+564>>2]=im))){for(;;){if(Il=q[$l+568>>2]+w(im=im+-1|0,36)|0,lm=q[(hm=im<<2)+q[km+1072>>2]>>2],1<=(0|(q[Il+4>>2]=lm)))for(Jl=0;q[q[Il>>2]+(Jl<<2)>>2]=q[$l+560>>2]+w(q[q[km+1064>>2]+(q[hm+q[km+1068>>2]>>2]+Jl<<2)>>2],28),(0|lm)!=(0|(Jl=Jl+1|0)););if(q[Il+24>>2]=1,q[Il+28>>2]=1,q[Il+8>>2]=1<>2],hm=q[km+704>>2]}if(Il=q[hm>>2],(0|(q[$l+4>>2]=Il))<1)Jl=0;else{for(om=q[km+732>>2],pm=q[km+736>>2],qm=q[km+740>>2],lm=q[km+720>>2],rm=q[$l+52>>2],nm=q[$l+568>>2],sm=q[$l+8>>2],im=Il;mm=sm+w(im=im+-1|0,12)|0,q[mm>>2]=nm+w(q[(Jl=im<<2)+lm>>2],36),q[mm+4>>2]=q[Jl+qm>>2],q[mm+8>>2]=q[Jl+pm>>2],u[Jl+rm>>2]=q[Jl+om>>2]?x(1):x(0),0<(0|im););for(mm=q[$l+16>>2],Jl=0;im=q[8+(nm+w(q[(om=(Il=Il+-1|0)<<2)+lm>>2],36)|0)>>2],Jl=Jl+(q[mm+om>>2]=im)|0,0<(0|Il););Il=q[$l+4>>2]}if(q[$l+12>>2]=Il,q[$l+20>>2]=Jl,Il=q[hm+4>>2],1<=(0|(q[$l+304>>2]=Il))){for(;Jl=q[$l+308>>2]+((Il=Il+-1|0)<<5)|0,q[Jl>>2]=q[$l+568>>2]+w(q[(im=Il<<2)+q[km+752>>2]>>2],36),q[Jl+4>>2]=q[im+q[km+764>>2]>>2],q[Jl+8>>2]=q[im+q[km+768>>2]>>2],lm=q[im+q[km+772>>2]>>2],q[Jl+12>>2]=lm,hm=q[im+q[km+776>>2]>>2],q[Jl+16>>2]=hm,q[Jl+28>>2]=q[im+q[km+760>>2]>>2],lm>>>0<=1?lm-1?(q[20+(q[$l+60>>2]+w(hm,24)|0)>>2]=Il,q[Jl+24>>2]=1,q[Jl+20>>2]=2):(q[8+(q[$l+168>>2]+w(hm,12)|0)>>2]=Il,q[Jl+24>>2]=3,q[Jl+20>>2]=4):Y(4,1179,0),0<(0|Il););km=q[$l>>2],hm=q[km+704>>2]}im=q[hm+8>>2];k:if(!((0|(q[$l+56>>2]=im))<1)){if(Jl=im+-1|0,nm=q[km+796>>2],mm=q[km+804>>2],om=q[km+800>>2],pm=q[km+780>>2],qm=q[$l+568>>2],rm=q[$l+60>>2],r[km+4|0]<2)for(;;)if(Il=rm+w(Jl,24)|0,q[Il>>2]=qm+w(q[(lm=Jl<<2)+pm>>2],36),q[Il+4>>2]=q[lm+om>>2],q[Il+8>>2]=q[lm+mm>>2],lm=q[lm+nm>>2],q[Il+12>>2]=0,q[Il+16>>2]=lm,Il=0<(0|Jl),Jl=Jl+-1|0,!Il)break k;for(sm=q[km+808>>2];Il=rm+w(Jl,24)|0,q[Il>>2]=qm+w(q[(lm=Jl<<2)+pm>>2],36),q[Il+4>>2]=q[lm+om>>2],q[Il+8>>2]=q[lm+mm>>2],q[Il+16>>2]=q[lm+nm>>2],q[Il+12>>2]=q[lm+sm>>2],Il=0<(0|Jl),Jl=Jl+-1|0,Il;);}if(Jl=q[hm+12>>2],1<=(0|(q[$l+164>>2]=Jl)))for(lm=q[km+828>>2],nm=q[km+812>>2],mm=q[$l+568>>2],om=q[$l+168>>2],Il=Jl;pm=om+w(Il=Il+-1|0,12)|0,q[pm>>2]=mm+w(q[(qm=Il<<2)+nm>>2],36),q[pm+4>>2]=q[lm+qm>>2],0<(0|Il););if(((Il=0)|im)<1)lm=0;else{for(nm=q[$l+68>>2],mm=q[$l+60>>2],lm=0;Jl=q[q[mm+w(im=im+-1|0,24)>>2]+8>>2],lm=(q[nm+(im<<2)>>2]=Jl)+lm|0,0<(0|im););Jl=q[$l+164>>2],im=q[$l+56>>2]}if(q[$l+64>>2]=im,q[$l+72>>2]=lm,im=$l,1<=(0|Jl)){for(nm=q[$l+176>>2],mm=q[$l+168>>2];lm=q[q[mm+w(Jl=Jl+-1|0,12)>>2]+8>>2],Il=Il+(q[nm+(Jl<<2)>>2]=lm)|0,0<(0|Jl););Jl=q[$l+164>>2]}if(q[im+172>>2]=Jl,q[$l+180>>2]=Il,lm=q[hm+16>>2],1<=(0|(q[$l+332>>2]=lm))){for(om=q[km+872>>2],pm=q[km+892>>2],qm=q[km+880>>2],rm=q[km+876>>2],nm=q[km+852>>2],mm=q[$l+568>>2],sm=q[$l+336>>2],Il=lm;Jl=sm+w(Il=Il+-1|0,20)|0,q[Jl>>2]=mm+w(q[(im=Il<<2)+nm>>2],36),q[Jl+4>>2]=q[im+rm>>2],q[Jl+8>>2]=q[im+qm>>2],q[Jl+16>>2]=q[im+pm>>2],q[Jl+12>>2]=q[im+om>>2],0<(0|Il););for(im=q[$l+344>>2],Jl=0;Il=q[8+(mm+w(q[(om=(lm=lm+-1|0)<<2)+nm>>2],36)|0)>>2],Jl=(q[im+om>>2]=Il)+Jl|0,0<(0|lm););if(q[$l+348>>2]=Jl,lm=q[$l+332>>2],!((0|(q[$l+340>>2]=lm))<1))for(Jl=lm<<2,im=q[$l+456>>2],nm=q[$l+452>>2];q[(mm=(Il=Jl+-4|0)<<2)+nm>>2]=1065353216,q[(om=(Jl<<=2)-4|0)+nm>>2]=1065353216,q[(pm=(Jl=Jl+-12|0)+nm|0)>>2]=1065353216,q[pm+4>>2]=1065353216,q[im+mm>>2]=0,q[im+om>>2]=1065353216,q[(Jl=Jl+im|0)>>2]=0,q[Jl+4>>2]=0,Jl=Il,0<(0|(lm=lm+-1|0)););}else q[$l+340>>2]=lm,q[$l+348>>2]=0;if(lm=q[hm+72>>2],1<=(0|(q[$l+480>>2]=lm)))for(om=q[km+1208>>2],pm=q[km+1224>>2],qm=q[km+1220>>2],rm=q[km+1216>>2],sm=q[km+1212>>2],tm=q[$l+484>>2],im=0;;){if(Il=tm+w(im,28)|0,nm=q[(Jl=im<<2)+sm>>2],q[Il+4>>2]=nm,q[Il>>2]=q[Jl+rm>>2],mm=q[Jl+qm>>2],q[Il+16>>2]=mm,vm=q[Jl+pm>>2],q[Il+20>>2]=vm,q[Il+8>>2]=0,q[Il+24>>2]=1+(mm-vm|0),1<=(0|nm))for(vm=q[Jl+om>>2],xm=q[Il+12>>2],wm=q[km+1236>>2],zm=q[km+1228>>2],ym=q[km+1232>>2],Jl=0;q[4+(Il=xm+(Jl<<4)|0)>>2]=q[(mm=Jl+vm<<2)+ym>>2],q[Il>>2]=q[mm+zm>>2],mm=q[mm+wm>>2],q[Il+12>>2]=0,q[Il+8>>2]=mm,(0|nm)!=(0|(Jl=Jl+1|0)););if((0|lm)==(0|(im=im+1|0)))break}if(Jl=q[hm+80>>2],(0|(q[$l+500>>2]=Jl))<1)im=0;else{for(mm=q[km+1280>>2],om=q[km+1268>>2],pm=q[km+1276>>2],qm=q[km+1272>>2],rm=q[km+1264>>2],sm=q[km+1260>>2],lm=q[km+1248>>2],nm=q[$l+568>>2],tm=q[$l+504>>2];Il=tm+w(Jl=Jl+-1|0,24)|0,q[Il>>2]=nm+w(q[(im=Jl<<2)+lm>>2],36),q[Il+4>>2]=q[im+sm>>2],q[Il+8>>2]=q[im+rm>>2],q[Il+12>>2]=q[im+qm>>2],im=q[im+om>>2],q[Il+20>>2]=mm+(im<<1),q[Il+16>>2]=pm+(im<<2),0<(0|Jl););if((0|(Jl=q[$l+500>>2]))<1)im=0;else{for(mm=q[$l+512>>2],im=0;Il=q[8+(nm+w(q[(om=(Jl=Jl+-1|0)<<2)+lm>>2],36)|0)>>2],im=(q[mm+om>>2]=Il)+im|0,0<(0|Jl););Jl=q[$l+500>>2]}}q[$l+508>>2]=Jl,q[$l+516>>2]=im;o:if(4<=r[a+4|0]){if(!((lm=r[km+4|0])>>>0<4)){if(Jl=q[hm+120>>2],1<=(0|(q[$l+572>>2]=Jl))){for(mm=q[km+1172>>2],om=q[$l+576>>2];lm=(0|(hm=q[(Il=(Jl=Jl+-1|0)<<2)+mm>>2]))<0?hm=nm=im=0:(im=(lm=q[Il+q[km+1176>>2]>>2]<<2)+q[km+1188>>2]|0,nm=q[Il+q[km+1180>>2]>>2],hm=q[$l+544>>2]+w(hm,52)|0,lm+q[km+1184>>2]|0),Il=om+w(Jl,20)|0,q[Il+12>>2]=nm,q[Il+8>>2]=im,q[Il+4>>2]=lm,q[Il>>2]=hm,0<(0|Jl););if(km=q[$l>>2],(lm=r[km+4|0])>>>0<4)break o}if(hm=q[km+704>>2],im=q[hm+100>>2],1<=(0|(q[$l+580>>2]=im)))for(nm=q[km+1084>>2],mm=q[km+1076>>2],om=q[km+1192>>2],pm=q[km+1080>>2],qm=q[$l+584>>2];Il=qm+w(im=im+-1|0,28)|0,q[Il>>2]=q[(Jl=im<<2)+pm>>2],q[Il+4>>2]=om+(q[Jl+mm>>2]<<2),Jl=q[Jl+nm>>2],q[Il+20>>2]=1,q[Il+24>>2]=1,q[Il+12>>2]=0,q[Il+16>>2]=0,q[Il+8>>2]=Jl,0<(0|im););if(im=q[hm+104>>2],1<=(0|(q[$l+588>>2]=im))){for(;;){if(Il=q[$l+592>>2]+w(im=im+-1|0,48)|0,q[Il>>2]=q[$l+584>>2]+w(q[(lm=im<<2)+q[km+1088>>2]>>2],28),Jl=q[lm+q[km+1092>>2]>>2],q[Il+28>>2]=1,q[Il+32>>2]=1,q[Il+8>>2]=0,q[Il+4>>2]=Jl,hm=q[lm+q[km+1104>>2]>>2],1<=(0|(q[Il+36>>2]=hm)))for(Jl=0;q[q[Il+40>>2]+(Jl<<2)>>2]=q[$l+576>>2]+w(q[q[km+1168>>2]+(q[lm+q[km+1100>>2]>>2]+Jl<<2)>>2],20),(0|hm)!=(0|(Jl=Jl+1|0)););if(!(1<=(0|im)))break}km=q[$l>>2],lm=r[km+4|0]}if(!(lm>>>0<4)){if(lm=q[a+704>>2],Jl=q[lm+108>>2],1<=(0|(q[$l+604>>2]=Jl)))for(hm=q[a+1124>>2],nm=q[a+1128>>2],mm=q[a+1120>>2],om=q[$l+592>>2],pm=q[$l+608>>2];Il=pm+w(Jl=Jl+-1|0,12)|0,q[Il>>2]=q[(im=Jl<<2)+mm>>2],q[Il+4>>2]=q[im+nm>>2],q[Il+8>>2]=om+w(q[hm+im>>2],48),0<(0|Jl););if(Jl=q[lm+112>>2],1<=(0|(q[$l+620>>2]=Jl)))for(lm=q[a+1148>>2],hm=q[a+1152>>2],nm=q[a+1144>>2],mm=q[$l+592>>2],om=q[$l+624>>2];Il=om+w(Jl=Jl+-1|0,12)|0,q[Il>>2]=q[(im=Jl<<2)+nm>>2],q[Il+4>>2]=q[hm+im>>2],q[Il+8>>2]=mm+w(q[im+lm>>2],48),0<(0|Jl););if(im=q[km+1192>>2],Il=q[q[km+704>>2]+20>>2],q[$l+640>>2]=q[km+972>>2],lm=q[km+964>>2],q[$l+636>>2]=lm,!((0|Il)<(Jl=1))&&(q[lm>>2]=im+(q[q[km+968>>2]>>2]<<2),1!=(0|Il)))for(;q[(lm=Jl<<2)+q[$l+636>>2]>>2]=im+(q[lm+q[km+968>>2]>>2]<<2),(0|Il)!=(0|(Jl=Jl+1|0)););}}}else if(!(q[hm+20>>2]<1))for(hm=0;;){if(im=q[(nm=hm<<2)+q[$l+636>>2]>>2],1<=((Il=0)|(Jl=q[nm+q[km+952>>2]>>2])))for(pm=Jl+(mm=q[nm+q[km+948>>2]>>2])|0,qm=q[km+1060>>2],rm=q[km+1056>>2];;){if(1<=(0|(om=q[(Jl=mm<<2)+qm>>2])))for(sm=om+(lm=q[Jl+rm>>2])|0,tm=q[km+1192>>2];;){om=im+(Il<<2)|0,um=u[tm+(lm<<2)>>2],Jl=im;q:{if(0<(0|Il))for(;;){if(u[Jl>>2]==um)break q;if(!((Jl=Jl+4|0)>>>0>>0))break}u[om>>2]=um,Il=Il+1|0}if(!((0|(lm=lm+1|0))<(0|sm)))break}if(!((0|(mm=mm+1|0))<(0|pm)))break}if(function(a,Sm){var un,Kn,xn=0,yn=0,Jn=0;q[8+(L=un=L-208|0)>>2]=1,q[12+un>>2]=0;a:if(Kn=Sm<<2){for(q[16+un>>2]=4,Jn=Sm=q[20+un>>2]=4,xn=2;Sm=(Jn+4|0)+(yn=Sm)|0,q[(16+un|0)+(xn<<2)>>2]=Sm,xn=xn+1|0,Jn=yn,Sm>>>0>>0;);if((yn=(a+Kn|0)-4|0)>>>0<=a>>>0)Sm=xn=1;else for(Sm=xn=1;Sm=3==(3&xn)?(ta(a,Sm,16+un|0),ma(8+un|0,2),Sm+2|0):(t[(16+un|0)+((Jn=Sm+-1|0)<<2)>>2]>=yn-a>>>0?la(a,8+un|0,Sm,0,16+un|0):ta(a,Sm,16+un|0),1==(0|Sm)?(ka(8+un|0,1),0):(ka(8+un|0,Jn),1)),xn=1|q[8+un>>2],q[8+un>>2]=xn,(a=a+4|0)>>>0>>0;);for(la(a,8+un|0,Sm,0,16+un|0);;){e:{f:{g:{if(!(1!=(0|Sm)|1!=(0|xn))){if(q[12+un>>2])break g;break a}if(1<(0|Sm))break f}ma(8+un|0,yn=Oa(8+un|0)),xn=q[8+un>>2],Sm=Sm+yn|0;break e}ka(8+un|0,2),q[8+un>>2]=7^q[8+un>>2],ma(8+un|0,1),la((Jn=a+-4|0)-q[(16+un|0)+((yn=Sm+-2|0)<<2)>>2]|0,8+un|0,Sm+-1|0,1,16+un|0),ka(8+un|0,1),xn=1|q[8+un>>2],q[8+un>>2]=xn,la(Jn,8+un|0,yn,1,16+un|0),Sm=yn}a=a+-4|0}}L=208+un|0}(im,Il),q[nm+q[$l+640>>2]>>2]=Il,!((0|(hm=hm+1|0))>2]+20>>2]))break}if(!(r[a+4|0]<5|r[q[$l>>2]+4|0]<4)){if(Il=q[a+704>>2],Jl=q[Il+128>>2],1<=(0|(q[$l+596>>2]=Jl)))for(lm=q[a+1112>>2],hm=q[a+1116>>2],nm=q[a+1108>>2],mm=q[$l+592>>2],om=q[$l+600>>2];km=om+w(Jl=Jl+-1|0,12)|0,q[km>>2]=q[(im=Jl<<2)+nm>>2],q[km+4>>2]=q[hm+im>>2],q[km+8>>2]=mm+w(q[im+lm>>2],48),0<(0|Jl););if(Jl=q[Il+132>>2],1<=(0|(q[$l+612>>2]=Jl)))for(lm=q[a+1136>>2],hm=q[a+1140>>2],nm=q[a+1132>>2],mm=q[$l+592>>2],om=q[$l+616>>2];km=om+w(Jl=Jl+-1|0,12)|0,q[km>>2]=q[(im=Jl<<2)+nm>>2],q[km+4>>2]=q[hm+im>>2],q[km+8>>2]=mm+w(q[im+lm>>2],48),0<(0|Jl););if(Jl=q[Il+136>>2],!((0|(q[$l+628>>2]=Jl))<1))for(km=q[a+1160>>2],im=q[a+1164>>2],lm=q[a+1156>>2],hm=q[$l+592>>2],nm=q[$l+632>>2];a=nm+w(Jl=Jl+-1|0,12)|0,q[a>>2]=q[(Il=Jl<<2)+lm>>2],q[a+4>>2]=q[Il+im>>2],q[a+8>>2]=hm+w(q[Il+km>>2],48),0<(0|Jl););}ua($l)}return L=576+jm|0,$l}(a,Wa,Xa))break a;q[36+Ya>>2]=2209,q[32+Ya>>2]=2361,Y(4,1294,32+Ya|0)}else q[20+Ya>>2]=1444,q[16+Ya>>2]=2361,Y(4,1294,16+Ya|0);else q[4+Ya>>2]=2132,q[Ya>>2]=2361,Y(4,1294,Ya);Wa=0}return L=64+Ya|0,0|Wa}function xa(a){var Wa;return L=Wa=L-16|0,a=(a|=0)?function(a){var Il;return ca(16+(L=Il=L-576|0)|0,0,560),Fa(a,16+Il|0,12+Il|0),L=576+Il|0,q[12+Il>>2]}(a):(q[4+Wa>>2]=2132,q[Wa>>2]=2343,Y(4,1294,Wa),0),L=16+Wa|0,0|a}function ya(a){var Xa=r[a+4|0];X(q[a+704>>2],4,64),da(q[a+708>>2],4),da(q[a+708>>2]+4|0,4),da(q[a+708>>2]+8|0,4),da(q[a+708>>2]+12|0,4),da(q[a+708>>2]+16|0,4),da(q[a+708>>2]+20|0,1),X(q[a+720>>2],4,q[q[a+704>>2]>>2]),X(q[a+724>>2],4,q[q[a+704>>2]>>2]),X(q[a+728>>2],4,q[q[a+704>>2]>>2]),X(q[a+732>>2],4,q[q[a+704>>2]>>2]),X(q[a+736>>2],4,q[q[a+704>>2]>>2]),X(q[a+740>>2],4,q[q[a+704>>2]>>2]),X(q[a+752>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+756>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+760>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+764>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+768>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+772>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+776>>2],4,q[q[a+704>>2]+4>>2]),X(q[a+780>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+784>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+788>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+796>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+800>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+804>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+812>>2],4,q[q[a+704>>2]+12>>2]),X(q[a+816>>2],4,q[q[a+704>>2]+12>>2]),X(q[a+820>>2],4,q[q[a+704>>2]+12>>2]),X(q[a+828>>2],4,q[q[a+704>>2]+12>>2]),X(q[a+852>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+856>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+860>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+868>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+872>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+876>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+880>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+884>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+888>>2],1,q[q[a+704>>2]+16>>2]),X(q[a+892>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+896>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+900>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+904>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+908>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+912>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+924>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+928>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+932>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+936>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+940>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+948>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+952>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+976>>2],4,q[q[a+704>>2]+24>>2]),X(q[a+980>>2],4,q[q[a+704>>2]+28>>2]),X(q[a+984>>2],4,q[q[a+704>>2]+28>>2]),X(q[a+996>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1e3>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1004>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1008>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1012>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1016>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1020>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1032>>2],4,q[q[a+704>>2]+36>>2]),X(q[a+1036>>2],4,q[q[a+704>>2]+36>>2]),X(q[a+1040>>2],4,q[q[a+704>>2]+36>>2]),X(q[a+1052>>2],4,q[q[a+704>>2]+40>>2]),X(q[a+1064>>2],4,q[q[a+704>>2]+44>>2]),X(q[a+1068>>2],4,q[q[a+704>>2]+48>>2]),X(q[a+1072>>2],4,q[q[a+704>>2]+48>>2]),X(q[a+1056>>2],4,q[q[a+704>>2]+52>>2]),X(q[a+1060>>2],4,q[q[a+704>>2]+52>>2]),X(q[a+1192>>2],4,q[q[a+704>>2]+56>>2]),X(q[a+1196>>2],4,q[q[a+704>>2]+60>>2]),X(q[a+1200>>2],2,q[q[a+704>>2]+64>>2]),X(q[a+1204>>2],4,q[q[a+704>>2]+68>>2]),X(q[a+1208>>2],4,q[q[a+704>>2]+72>>2]),X(q[a+1212>>2],4,q[q[a+704>>2]+72>>2]),X(q[a+1216>>2],4,q[q[a+704>>2]+72>>2]),X(q[a+1220>>2],4,q[q[a+704>>2]+72>>2]),X(q[a+1224>>2],4,q[q[a+704>>2]+72>>2]),X(q[a+1228>>2],4,q[q[a+704>>2]+76>>2]),X(q[a+1232>>2],4,q[q[a+704>>2]+76>>2]),X(q[a+1236>>2],4,q[q[a+704>>2]+76>>2]),X(q[a+1248>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1252>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1256>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1260>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1264>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1268>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1272>>2],4,q[q[a+704>>2]+80>>2]),X(q[a+1276>>2],4,q[q[a+704>>2]+84>>2]),X(q[a+1280>>2],2,q[q[a+704>>2]+84>>2]),X(q[a+1284>>2],4,q[q[a+704>>2]+88>>2]),Xa>>>0<2||(X(q[a+808>>2],4,q[q[a+704>>2]+8>>2]),Xa>>>0<4)||(X(q[a+968>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+972>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+792>>2],4,q[q[a+704>>2]+8>>2]),X(q[a+824>>2],4,q[q[a+704>>2]+12>>2]),X(q[a+864>>2],4,q[q[a+704>>2]+16>>2]),X(q[a+1288>>2],4,q[q[a+704>>2]+92>>2]),X(q[a+1292>>2],4,q[q[a+704>>2]+92>>2]),X(q[a+1296>>2],4,q[q[a+704>>2]+92>>2]),X(q[a+1300>>2],4,q[q[a+704>>2]+96>>2]),X(q[a+1304>>2],4,q[q[a+704>>2]+96>>2]),X(q[a+1308>>2],4,q[q[a+704>>2]+96>>2]),X(q[a+944>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+956>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+960>>2],4,q[q[a+704>>2]+20>>2]),X(q[a+1076>>2],4,q[q[a+704>>2]+100>>2]),X(q[a+1080>>2],4,q[q[a+704>>2]+100>>2]),X(q[a+1084>>2],4,q[q[a+704>>2]+100>>2]),X(q[a+1088>>2],4,q[q[a+704>>2]+104>>2]),X(q[a+1092>>2],4,q[q[a+704>>2]+104>>2]),X(q[a+1096>>2],4,q[q[a+704>>2]+104>>2]),X(q[a+1100>>2],4,q[q[a+704>>2]+104>>2]),X(q[a+1104>>2],4,q[q[a+704>>2]+104>>2]),X(q[a+1120>>2],4,q[q[a+704>>2]+108>>2]),X(q[a+1124>>2],4,q[q[a+704>>2]+108>>2]),X(q[a+1128>>2],4,q[q[a+704>>2]+108>>2]),X(q[a+1144>>2],4,q[q[a+704>>2]+112>>2]),X(q[a+1148>>2],4,q[q[a+704>>2]+112>>2]),X(q[a+1152>>2],4,q[q[a+704>>2]+112>>2]),X(q[a+1168>>2],4,q[q[a+704>>2]+116>>2]),X(q[a+1172>>2],4,q[q[a+704>>2]+120>>2]),X(q[a+1176>>2],4,q[q[a+704>>2]+120>>2]),X(q[a+1180>>2],4,q[q[a+704>>2]+120>>2]),X(q[a+1184>>2],4,q[q[a+704>>2]+124>>2]),X(q[a+1188>>2],4,q[q[a+704>>2]+124>>2]),4!=(0|Xa)&&(X(q[a+988>>2],4,q[q[a+704>>2]+28>>2]),X(q[a+992>>2],4,q[q[a+704>>2]+28>>2]),X(q[a+1024>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1028>>2],4,q[q[a+704>>2]+32>>2]),X(q[a+1044>>2],4,q[q[a+704>>2]+36>>2]),X(q[a+1048>>2],4,q[q[a+704>>2]+36>>2]),X(q[a+1108>>2],4,q[q[a+704>>2]+128>>2]),X(q[a+1112>>2],4,q[q[a+704>>2]+128>>2]),X(q[a+1116>>2],4,q[q[a+704>>2]+128>>2]),X(q[a+1132>>2],4,q[q[a+704>>2]+132>>2]),X(q[a+1136>>2],4,q[q[a+704>>2]+132>>2]),X(q[a+1140>>2],4,q[q[a+704>>2]+132>>2]),X(q[a+1156>>2],4,q[q[a+704>>2]+136>>2]),X(q[a+1160>>2],4,q[q[a+704>>2]+136>>2]),X(q[a+1164>>2],4,q[q[a+704>>2]+136>>2])))}function za(a,Za){var _a=0,lb=0,mb=0,ob=0,pb=0,rb=0,nb=a+Za|0;a:{b:if(!(1&(_a=q[a+4>>2]))){if(!(3&_a))break a;if(Za=(_a=q[a>>2])+Za|0,(0|(a=a-_a|0))!=q[2092])if(_a>>>0<=255)mb=_a>>>3,_a=q[a+8>>2],(0|(lb=q[a+12>>2]))==(0|_a)?(rb=q[2087]&ed(mb),q[2087]=rb):(q[_a+12>>2]=lb,q[lb+8>>2]=_a);else{if(pb=q[a+24>>2],(0|(_a=q[a+12>>2]))!=(0|a))lb=q[a+8>>2],q[lb+12>>2]=_a,q[_a+8>>2]=lb;else if(mb=(mb=q[(lb=a+20|0)>>2])||q[(lb=a+16|0)>>2]){for(;ob=lb,(mb=q[(lb=(_a=mb)+20|0)>>2])||(lb=_a+16|0,mb=q[_a+16>>2]););q[ob>>2]=0}else _a=0;if(pb){lb=q[a+28>>2];e:{if(q[(mb=8652+(lb<<2)|0)>>2]==(0|a)){if(q[mb>>2]=_a)break e;rb=q[2088]&ed(lb),q[2088]=rb;break b}if(!(q[pb+(q[pb+16>>2]==(0|a)?16:20)>>2]=_a))break b}q[_a+24>>2]=pb,(lb=q[a+16>>2])&&(q[_a+16>>2]=lb,q[lb+24>>2]=_a),(lb=q[a+20>>2])&&(q[_a+20>>2]=lb,q[lb+24>>2]=_a)}}else if(3==(3&(_a=q[4+nb>>2])))return q[2089]=Za,q[4+nb>>2]=-2&_a,q[a+4>>2]=1|Za,q[nb>>2]=Za}f:{if(!(2&(_a=q[4+nb>>2]))){if(q[2093]==(0|nb)){if(q[2093]=a,Za=q[2090]+Za|0,q[2090]=Za,q[a+4>>2]=1|Za,q[2092]!=(0|a))break a;return q[2089]=0,q[2092]=0}if(q[2092]==(0|nb))return q[2092]=a,Za=q[2089]+Za|0,q[2089]=Za,q[a+4>>2]=1|Za,q[a+Za>>2]=Za;Za=(-8&_a)+Za|0;g:if(_a>>>0<=255)mb=_a>>>3,_a=q[8+nb>>2],(0|(lb=q[12+nb>>2]))==(0|_a)?(rb=q[2087]&ed(mb),q[2087]=rb):(q[_a+12>>2]=lb,q[lb+8>>2]=_a);else{if(pb=q[24+nb>>2],(0|nb)!=(0|(_a=q[12+nb>>2])))lb=q[8+nb>>2],q[lb+12>>2]=_a,q[_a+8>>2]=lb;else if(mb=(mb=q[(lb=20+nb|0)>>2])||q[(lb=16+nb|0)>>2]){for(;ob=lb,(mb=q[(lb=(_a=mb)+20|0)>>2])||(lb=_a+16|0,mb=q[_a+16>>2]););q[ob>>2]=0}else _a=0;if(pb){lb=q[28+nb>>2];j:{if(q[(mb=8652+(lb<<2)|0)>>2]==(0|nb)){if(q[mb>>2]=_a)break j;rb=q[2088]&ed(lb),q[2088]=rb;break g}if(!(q[pb+(q[pb+16>>2]==(0|nb)?16:20)>>2]=_a))break g}q[_a+24>>2]=pb,(lb=q[16+nb>>2])&&(q[_a+16>>2]=lb,q[lb+24>>2]=_a),(lb=q[20+nb>>2])&&(q[_a+20>>2]=lb,q[lb+24>>2]=_a)}}if(q[a+4>>2]=1|Za,q[a+Za>>2]=Za,q[2092]!=(0|a))break f;return q[2089]=Za}q[4+nb>>2]=-2&_a,q[a+4>>2]=1|Za,q[a+Za>>2]=Za}if(Za>>>0<=255)return Za=8388+((_a=Za>>>3)<<3)|0,_a=(lb=q[2087])&(_a=1<<_a)?q[Za+8>>2]:(q[2087]=_a|lb,Za),q[Za+8>>2]=a,q[_a+12>>2]=a,q[a+12>>2]=Za,q[a+8>>2]=_a;q[a+16>>2]=0,_a=q[a+20>>2]=0,(mb=Za>>>8)&&(_a=31,16777215>>0||(_a=28+((_a=((nb=(mb<<=ob=mb+1048320>>>16&8)<<(_a=mb+520192>>>16&4))<<(mb=245760+nb>>>16&2)>>>15)-(mb|_a|ob)|0)<<1|Za>>>_a+21&1)|0)),mb=8652+((q[(lb=a)+28>>2]=_a)<<2)|0;m:{if((lb=q[2088])&(ob=1<<_a)){for(lb=Za<<(31==(0|_a)?0:25-(_a>>>1)|0),_a=q[mb>>2];;){if((-8&q[(mb=_a)+4>>2])==(0|Za))break m;if(_a=lb>>>29,lb<<=1,!(_a=q[16+(ob=mb+(4&_a)|0)>>2]))break}q[ob+16>>2]=a}else q[2088]=lb|ob,q[mb>>2]=a;return q[a+24>>2]=mb,q[a+12>>2]=a,q[a+8>>2]=a}Za=q[mb+8>>2],q[Za+12>>2]=a,q[mb+8>>2]=a,q[a+24>>2]=0,q[a+12>>2]=mb,q[a+8>>2]=Za}}function Aa(a){var vb,xb,yb,Ab,Bb,Cb,sb,wb,Za=x(0),tb=(x(0),0),ub=0,zb=(x(0),x(0),x(0),x(0),0);x(0),x(0);a:{b:{if(j(a),ub=2147483647&(tb=b[0])){if(!(ub>>>0<2139095041))return x(x(.10000000149011612)+a);if(1065353216==(0|ub))return x(-1<(0|tb)?.10000000149011612:10);if(2139095040==(0|ub))return x(-1<(0|tb)?0:-a);if(1073741824==(0|tb))return x(.010000000707805157);if(1056964608==(0|tb))return x(.3162277638912201);if(1291845633<=ub>>>0)return x((0|tb)<0?H:0);if(vb=u[1701],wb=x(x(1.600000023841858)-vb),xb=x(x(1)/x(vb+x(1.600000023841858))),f(0,-4096&(j(sb=x(wb*xb)),b[0])),Za=k(),yb=x(Za*Za),Bb=u[1705],vb=x(xb*x(x(wb-x((Ab=Za)*x(3.099609375)))-x(Za*x(x(1.600000023841858)-x(x(3.099609375)-vb))))),xb=x(x(sb+Za)*vb),Za=x(sb*sb),wb=x(xb+x(x(Za*Za)*x(x(Za*x(x(Za*x(x(Za*x(x(Za*x(x(Za*x(.20697501301765442))+x(.23066075146198273)))+x(.2727281153202057)))+x(.3333333432674408)))+x(.4285714328289032)))+x(.6000000238418579)))),f(0,-4096&(j(x(x(yb+x(3))+wb)),b[0])),Za=k(),xb=x(Ab*Za),sb=x(x(vb*Za)+x(sb*x(wb-x(x(Za+x(-3))-yb)))),f(0,-4096&(j(x(xb+sb)),b[0])),Za=k(),vb=x(Za*x(.9619140625)),yb=x(u[1703]+x(x(x(sb-x(Za-xb))*x(.9617967009544373))+x(Za*x(-.00011736857413779944)))),f(0,-4096&(j(x(x(Bb+x(vb+yb))+x(-4))),b[0])),sb=k(),f(0,-4096&tb),wb=k(),Za=x(sb*wb),a=x(x(x(yb-x(x(x(sb-x(-4))-Bb)-vb))*a)+x(x(a-wb)*sb)),j(sb=x(Za+a)),1124073473<=(0|(tb=b[0])))break b;d:{if((ub=1124073472)==(0|tb)){if(x(a+x(4.299566569443414e-8))>x(sb-Za))break b}else{if(ub=2147483647&tb,!(a<=x(sb-Za)^1|-1021968384!=(0|tb))|1125515265<=ub>>>0)break a;if(ub>>>0<1056964609)break d}zb=(8388607&(ub=(8388608>>>(ub>>>23)-126)+tb|0)|8388608)>>>150-(Cb=ub>>>23&255),zb=(0|tb)<0?0-zb|0:zb,Za=x(Za-(f(0,ub&-8388608>>Cb-127),k())),j(x(a+Za)),tb=b[0]}f(0,-32768&tb),sb=k(),vb=x(sb*x(.693145751953125)),sb=x(x(sb*x(14286065379565116e-22))+x(x(a-x(sb-Za))*x(.6931471824645996))),a=x(vb+sb),Za=x(a*a),Za=x(a-x(Za*x(x(Za*x(x(Za*x(x(Za*x(x(Za*x(4.138136944220605e-8))+x(-16533901998627698e-22)))+x(661375597701408e-19)))+x(-.0027777778450399637)))+x(.1666666716337204)))),Ab=x(x(a*Za)/x(Za+x(-2))),Za=x(sb-x(a-vb)),a=(0|(tb=0|(j(a=x(x(a-x(Ab-x(Za+x(a*Za))))+x(1))),b[0]+(zb<<23))))<=8388607?function(a,Vk){var zl=0;return 128<=(0|Vk)?(a=x(a*x(17014118346046923e22)),Vk=(0|(zl=Vk+-127|0))<128?zl:(a=x(a*x(17014118346046923e22)),((0|Vk)<381?Vk:381)+-254|0)):-127<(0|Vk)||(a=x(a*x(11754943508222875e-54)),Vk=-127<(0|(zl=Vk+126|0))?zl:(a=x(a*x(11754943508222875e-54)),(-378<(0|Vk)?Vk:-378)+252|0)),x(a*(f(0,1065353216+(Vk<<23)|0),k()))}(a,zb):(f(0,tb),k()),a=x(x(1)*a)}else a=x(1);return a}return x(H)}return x(0)}function Ba(a,Db){var Jb,Eb,Gb,Fb=0,Hb=0,Ib=x(0);if(j(Db),!((Gb=2147483647&(Eb=b[0]))>>>0<=2139095040&&(j(a),(Fb=2147483647&(Hb=b[0]))>>>0<2139095041)))return x(a+Db);if(1065353216==(0|Eb))return Ca(a);Eb=(Jb=Eb>>>30&2)|Hb>>>31;b:{c:{d:{e:{if(!Fb){switch(Eb-2|0){case 0:break e;case 1:break;default:break d}return x(-3.1415927410125732)}if(2139095040!=(0|Gb)){if(!Gb|!(Fb>>>0<=218103808+Gb>>>0&&2139095040!=(0|Fb)))break b;if(a=Ib=Fb+218103808>>>0>>0&&(Ib=x(0),Jb)?Ib:Ca(x(y(x(a/Db)))),Eb>>>0<=2){switch(Eb-1|0){case 0:return x(-a);case 1:break;default:break d}return x(x(3.1415927410125732)-x(a+x(8.742277657347586e-8)))}return x(x(a+x(8.742277657347586e-8))+x(-3.1415927410125732))}if(2139095040==(0|Fb))break c;return u[6784+(Eb<<2)>>2]}a=x(3.1415927410125732)}return a}return u[6768+(Eb<<2)>>2]}return x((0|Hb)<0?-1.5707963705062866:1.5707963705062866)}function Ca(a){x(0);var Kb,Nb,Ob,Db,Mb,Lb=0;x(0),x(0),j(a);a:{if(1283457024<=(Db=2147483647&(Mb=b[0]))>>>0){if(2139095040>>0)break a;return x((0|Mb)<0?-1.570796251296997:1.570796251296997)}b:{if(Db>>>0<=1054867455){if(Lb=-1,964689920<=Db>>>0)break b;break a}a=x(y(a)),Lb=Db>>>0<=1066926079?Db>>>0<=1060110335?(a=x(x(x(a+a)+x(-1))/x(a+x(2))),0):(a=x(x(a+x(-1))/x(a+x(1))),1):Db>>>0<=1075576831?(a=x(x(a+x(-1.5))/x(x(a*x(1.5))+x(1))),2):(a=x(x(-1)/a),3)}if(Db=Lb,Nb=x(a*a),Kb=x(Nb*Nb),Ob=x(Kb*x(x(Kb*x(-.106480173766613))+x(-.19999158382415771))),Kb=x(Nb*x(x(Kb*x(x(Kb*x(.06168760731816292))+x(.14253635704517365)))+x(.333333283662796))),(0|Db)<=-1)return x(a-x(a*x(Ob+Kb)));a=x(u[6736+(Db<<=2)>>2]-x(x(x(a*x(Ob+Kb))-u[6752+Db>>2])-a)),a=(0|Mb)<0?x(-a):a}return a}function Da(a,Pb){var Ub,Sb,Tb,Qb=0,Rb=0;return L=Sb=L-16|0,j(a),(Qb=2147483647&(Tb=b[0]))>>>0<=1305022426?(v[Pb>>3]=(Ub=+a)+-1.5707963109016418*(Rb=.6366197723675814*Ub+6755399441055744-6755399441055744)+-1.5893254773528196e-8*Rb,Qb=y(Rb)<2147483648?~~Rb:-2147483648):2139095040<=Qb>>>0?(v[Pb>>3]=x(a-a),Qb=0):(Ub=Qb,v[8+Sb>>3]=(f(0,Ub-((Qb=(Qb>>>23)-150|0)<<23)|0),k()),Qb=function(a,Il,Jl){var Nl,Sl,Wl,Xl,Zl,_l,Kl=0,Ll=0,Ml=0,Ol=0,Pl=0,Ql=0,Rl=0,Tl=0,Ul=0,Vl=0,Yl=0;if(L=Nl=L-560|0,Rl=(Ll=Jl)+w(Wl=0<(0|(Jl=(Jl+-3|0)/24|0))?Jl:0,-24)|0,0<=(0|(Sl=q[972])))for(Ll=Sl+1|0,Jl=Wl;v[(320+Nl|0)+(Ml<<3)>>3]=(0|Jl)<0?0:+q[3904+(Jl<<2)>>2],Jl=Jl+1|0,(0|Ll)!=(0|(Ml=Ml+1|0)););for(Pl=Rl+-24|0,Ll=0;;){for(Kl=Jl=0;Kl+=v[(Jl<<3)+a>>3]*v[(320+Nl|0)+(Ll-Jl<<3)>>3],1!=(0|(Jl=Jl+1|0)););if(v[(Ll<<3)+Nl>>3]=Kl,Jl=(0|Ll)<(0|Sl),Ll=Ll+1|0,!Jl)break}_l=23-Pl|0,Xl=24-Pl|0,Ll=Sl;a:{for(;;){if(Kl=v[(Ll<<3)+Nl>>3],!(Ul=((Jl=0)|(Ml=Ll))<1))for(;Ql=(480+Nl|0)+(Jl<<2)|0,Tl=Kl,Ol=y(Kl*=5.960464477539063e-8)<2147483648?~~Kl:-2147483648,Ol=y(Tl+=-16777216*(Kl=0|Ol))<2147483648?~~Tl:-2147483648,q[Ql>>2]=Ol,Kl=v[((Ml=Ml+-1|0)<<3)+Nl>>3]+Kl,(0|Ll)!=(0|(Jl=Jl+1|0)););Kl=ja(Kl,Pl),Kl=(Kl+=-8*C(.125*Kl))-(0|(Ql=y(Kl)<2147483648?~~Kl:-2147483648));e:{f:{g:{if(Yl=(0|Pl)<1){if(Pl)break g;Ol=q[476+((Ll<<2)+Nl|0)>>2]>>23}else Ol=q[476+(Ml=(Ll<<2)+Nl|0)>>2],Vl=Ml,Ml=Ol-((Jl=Ol>>Xl)<>2]=Ml)>>_l;if((0|Ol)<1)break e;break f}if(Ol=2,!(.5<=Kl)){Ol=0;break e}}if(Ml=Jl=0,!Ul)for(;;){Ul=q[(Zl=(480+Nl|0)+(Jl<<2)|0)>>2],Vl=16777215;i:{j:{if(!Ml){if(!Ul)break j;Vl=16777216,Ml=1}q[Zl>>2]=Vl-Ul;break i}Ml=0}if((0|Ll)==(0|(Jl=Jl+1|0)))break}Yl||1<(Jl=Pl+-1|0)>>>0||(q[476+(Jl=(Ll<<2)+Nl|0)>>2]=Jl-1?8388607&q[Jl+476>>2]:4194303&q[Jl+476>>2]),Ql=Ql+1|0,2==(0|Ol)&&(Kl=1-Kl,Ol=2,Ml)&&(Kl-=ja(1,Pl))}if(0!=Kl)break;if(!(((Ml=0)|(Jl=Ll))<=(0|Sl))){for(;Ml=q[(480+Nl|0)+((Jl=Jl+-1|0)<<2)>>2]|Ml,(0|Sl)<(0|Jl););if(Ml){for(Rl=Pl;Rl=Rl+-24|0,!q[(480+Nl|0)+((Ll=Ll+-1|0)<<2)>>2];);break a}}for(Jl=1;Jl=(Ml=Jl)+1|0,!q[(480+Nl|0)+(Sl-Ml<<2)>>2];);for(Ml=Ll+Ml|0;;){for(Ll=Ql=Ll+1|0,v[(320+Nl|0)+(Ql<<3)>>3]=q[3904+(Wl+Ll<<2)>>2],Kl=Jl=0;Kl+=v[(Jl<<3)+a>>3]*v[(320+Nl|0)+(Ql-Jl<<3)>>3],1!=(0|(Jl=Jl+1|0)););if(v[(Ll<<3)+Nl>>3]=Kl,!((0|Ll)<(0|Ml)))break}Ll=Ml}16777216<=(Kl=ja(Kl,0-Pl|0))?(a=(480+Nl|0)+(Ll<<2)|0,Tl=Kl,Jl=y(Kl*=5.960464477539063e-8)<2147483648?~~Kl:-2147483648,Ml=y(Kl=Tl+-16777216*(0|Jl))<2147483648?~~Kl:-2147483648,q[a>>2]=Ml,Ll=Ll+1|0):(Jl=y(Kl)<2147483648?~~Kl:-2147483648,Rl=Pl),q[(480+Nl|0)+(Ll<<2)>>2]=Jl}if(Kl=ja(1,Rl),!((0|Ll)<=-1)){for(Jl=Ll;v[(Jl<<3)+Nl>>3]=Kl*+q[(480+Nl|0)+(Jl<<2)>>2],Kl*=5.960464477539063e-8,a=0<(0|Jl),Jl=Jl+-1|0,a;);if(!((0|Ll)<=-1))for(Jl=Ll;;){for(Pl=Ll-(a=Jl)|0,Jl=Kl=0;Kl+=v[6672+(Jl<<3)>>3]*v[(a+Jl<<3)+Nl>>3],!((0|Sl)<=(0|Jl))&&(Rl=Jl>>>0>>0,Jl=Jl+1|0,Rl););if(v[(160+Nl|0)+(Pl<<3)>>3]=Kl,Jl=a+-1|0,!(0<(0|a)))break}}if(0<=(Ll|(Kl=0)))for(;Kl+=v[(160+Nl|0)+(Ll<<3)>>3],a=0<(0|Ll),Ll=Ll+-1|0,a;);return v[Il>>3]=Ol?-Kl:Kl,L=560+Nl|0,7&Ql}(8+Sb|0,Sb,Qb),Rb=v[Sb>>3],(0|Tb)<=-1?(v[Pb>>3]=-Rb,Qb=0-Qb|0):v[Pb>>3]=Rb),L=16+Sb|0,Qb}function Ea(a,Pb){return a?function(a,Il){a:{if(a){if(Il>>>0<=127)break a;if(q[q[1789]>>2]){if(Il>>>0<=2047)return o[a+1|0]=63&Il|128,o[0|a]=Il>>>6|192,2;if(!(57344!=(-8192&Il)&&55296<=Il>>>0))return o[a+2|0]=63&Il|128,o[0|a]=Il>>>12|224,o[a+1|0]=Il>>>6&63|128,3;if(Il+-65536>>>0<=1048575)return o[a+3|0]=63&Il|128,o[0|a]=Il>>>18|240,o[a+2|0]=Il>>>6&63|128,o[a+1|0]=Il>>>12&63|128,4}else if(57216==(-128&Il))break a;q[2086]=25,a=-1}else a=1;return a}return o[0|a]=Il,1}(a,Pb):0}function Fa(a,Pb,Wb){var fc,gc,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=r[a+4|0];if(q[Pb>>2]=652,Yb=q[a+704>>2],1<=(0|(_b=q[Yb>>2]))){for($b=q[a+720>>2],bc=q[a+1072>>2];Zb=(1<>2]<<2)>>2])+Zb|0,(0|_b)!=(0|(Xb=Xb+1|0)););Xb=Zb<<2}if(q[Pb+4>>2]=w(_b,12),q[Pb+8>>2]=q[Yb>>2]<<2,q[Pb+12>>2]=q[Yb>>2]<<2,q[Pb+16>>2]=q[Yb>>2]<<2,q[Pb+20>>2]=q[Yb>>2]<<2,Zb=q[Yb>>2],q[Pb+28>>2]=Xb,q[Pb+24>>2]=Zb<<2,Zb=q[Yb>>2],q[Pb+40>>2]=Xb,q[Pb+36>>2]=Xb,q[Pb+32>>2]=Zb<<2,q[Pb+44>>2]=q[Yb+4>>2]<<5,q[Pb+48>>2]=q[Yb+4>>2]<<2,q[Pb+52>>2]=q[Yb+4>>2]<<2,q[Pb+56>>2]=q[Yb+4>>2]<<2,q[Pb+60>>2]=q[Yb+4>>2]<<4,q[Pb+64>>2]=q[Yb+4>>2]<<4,1<=((Xb=0)|(_b=q[Yb+8>>2]))){for($b=q[a+780>>2],bc=q[a+1072>>2],dc=q[a+796>>2],Zb=0;ac=(15+(q[(cc=Xb<<2)+dc>>2]<<3)&-16)+ac|0,Zb=(1<>2]<<2)>>2])+Zb|0,(0|_b)!=(0|(Xb=Xb+1|0)););Xb=Zb<<2}if(q[Pb+68>>2]=w(_b,24),q[Pb+72>>2]=q[Yb+8>>2]<<2,q[Pb+76>>2]=q[Yb+8>>2]<<2,Zb=q[Yb+8>>2],q[Pb+84>>2]=ac,q[Pb+80>>2]=Zb<<2,q[Pb+88>>2]=q[Yb+8>>2]<<4,q[Pb+92>>2]=q[Yb+8>>2]<<4,Zb=q[Yb+8>>2],q[Pb+100>>2]=Xb,q[Pb+96>>2]=Zb<<2,Zb=q[Yb+8>>2],q[Pb+140>>2]=Xb,q[Pb+136>>2]=Xb,q[Pb+132>>2]=Xb,q[Pb+128>>2]=Xb,q[Pb+124>>2]=Xb,q[Pb+120>>2]=Xb,q[Pb+116>>2]=Xb,q[Pb+112>>2]=Xb,q[Pb+108>>2]=Xb,q[Pb+104>>2]=Zb<<2,q[Pb+144>>2]=q[Yb+8>>2]<<2,q[Pb+148>>2]=q[Yb+8>>2]<<2,q[Pb+152>>2]=q[Yb+8>>2]<<2,q[Pb+156>>2]=q[Yb+8>>2]<<2,q[Pb+160>>2]=q[Yb+8>>2]<<2,q[Pb+164>>2]=q[Yb+8>>2]<<2,1<=((Xb=ac=0)|(_b=q[Yb+12>>2]))){for($b=q[a+812>>2],bc=q[a+1072>>2],Zb=0;Zb=(1<>2]<<2)>>2])+Zb|0,(0|_b)!=(0|(Xb=Xb+1|0)););Xb=Zb<<2}if(q[Pb+168>>2]=w(_b,12),q[Pb+172>>2]=q[Yb+12>>2]<<2,q[Pb+176>>2]=q[Yb+12>>2]<<2,q[Pb+180>>2]=q[Yb+12>>2]<<2,q[Pb+184>>2]=q[Yb+12>>2]<<2,q[Pb+188>>2]=q[Yb+12>>2]<<2,q[Pb+192>>2]=q[Yb+12>>2]<<2,q[Pb+196>>2]=q[Yb+12>>2]<<2,q[Pb+200>>2]=q[Yb+12>>2]<<2,q[Pb+204>>2]=q[Yb+12>>2]<<4,q[Pb+208>>2]=q[Yb+12>>2]<<4,Zb=q[Yb+12>>2],q[Pb+216>>2]=Xb,q[Pb+212>>2]=Zb<<2,Zb=q[Yb+12>>2],q[Pb+268>>2]=Xb,q[Pb+264>>2]=Xb,q[Pb+260>>2]=Xb,q[Pb+256>>2]=Xb,q[Pb+252>>2]=Xb,q[Pb+248>>2]=Xb,q[Pb+244>>2]=Xb,q[Pb+240>>2]=Xb,q[Pb+236>>2]=Xb,q[Pb+232>>2]=Xb,q[Pb+228>>2]=Xb,q[Pb+224>>2]=Xb,q[Pb+220>>2]=Zb<<2,q[Pb+272>>2]=q[Yb+12>>2]<<2,q[Pb+276>>2]=q[Yb+12>>2]<<2,q[Pb+280>>2]=q[Yb+12>>2]<<2,q[Pb+284>>2]=q[Yb+12>>2]<<2,q[Pb+288>>2]=q[Yb+12>>2]<<2,q[Pb+292>>2]=q[Yb+12>>2]<<2,1<=((Xb=0)|(Zb=q[Yb+16>>2]))){for($b=q[a+852>>2],bc=q[a+1072>>2],dc=q[a+892>>2],_b=0;ac=(15+(q[(cc=Xb<<2)+dc>>2]<<3)&-16)+ac|0,_b=(1<>2]<<2)>>2])+_b|0,(0|Zb)!=(0|(Xb=Xb+1|0)););Xb=_b<<2}if(q[Pb+296>>2]=w(Zb,20),q[Pb+300>>2]=q[Yb+16>>2]<<2,q[Pb+304>>2]=q[Yb+16>>2],q[Pb+308>>2]=q[Yb+16>>2]<<2,q[Pb+312>>2]=q[Yb+16>>2]<<2,Zb=q[Yb+16>>2],q[Pb+320>>2]=ac,q[Pb+316>>2]=Zb<<2,q[Pb+324>>2]=q[Yb+16>>2]<<2,q[Pb+328>>2]=q[Yb+16>>2]<<4,q[Pb+332>>2]=q[Yb+16>>2]<<4,q[Pb+336>>2]=q[Yb+16>>2]<<2,q[Pb+340>>2]=q[Yb+16>>2]<<2,q[Pb+344>>2]=q[Yb+16>>2]<<2,q[Pb+348>>2]=q[Yb+16>>2]<<4,q[Pb+352>>2]=q[Yb+16>>2]<<4,Zb=q[Yb+16>>2],q[Pb+360>>2]=Xb,q[Pb+356>>2]=Zb<<2,Zb=q[Yb+16>>2],q[Pb+404>>2]=Xb,q[Pb+400>>2]=Xb,q[Pb+396>>2]=Xb,q[Pb+392>>2]=Xb,q[Pb+388>>2]=Xb,q[Pb+384>>2]=Xb,q[Pb+380>>2]=Xb,q[Pb+376>>2]=Xb,q[Pb+372>>2]=Xb,q[Pb+368>>2]=Xb,q[Pb+364>>2]=Zb<<2,q[Pb+408>>2]=q[Yb+16>>2]<<2,q[Pb+412>>2]=q[Yb+16>>2]<<2,q[Pb+416>>2]=q[Yb+16>>2]<<2,q[Pb+420>>2]=q[Yb+16>>2]<<2,q[Pb+424>>2]=q[Yb+16>>2]<<2,q[Pb+428>>2]=q[Yb+16>>2]<<2,$b=q[a+704>>2],q[Pb+432>>2]=w(q[$b+20>>2],52),q[Pb+436>>2]=ec>>>(Xb=_b=0)<=3?q[$b+20>>2]<<2:0,q[Pb+440>>2]=q[$b+20>>2]<<2,q[Pb+444>>2]=w(q[$b+52>>2],28),1<=(0|(Yb=q[$b+48>>2]))){for(Zb=q[a+1072>>2],ac=0;ac=(bc=q[Zb+(Xb<<2)>>2])+ac|0,_b=(1<>2]=Xb,q[Pb+456>>2]=Xb,q[Pb+452>>2]=_b,q[Pb+448>>2]=w(Yb,36),q[Pb+500>>2]=w(q[$b+72>>2],28),1<=((ac=Xb=Zb=0)|(bc=q[$b+72>>2]))){for(dc=q[a+1224>>2],cc=q[a+1220>>2],gc=q[a+1212>>2],_b=0;_b=(0|(fc=q[(Yb=ac<<2)+cc>>2]-q[Yb+dc>>2]|0))<(0|_b)?_b:1+fc|0,Xb=(0|Xb)<(0|(Yb=q[Yb+gc>>2]))?Yb:Xb,(0|bc)!=(0|(ac=ac+1|0)););ac=Xb<<2,Xb=_b<<2}if(Yb=q[$b+76>>2],q[Pb+516>>2]=Xb,q[Pb+512>>2]=ac,q[Pb+508>>2]=Xb,q[Pb+504>>2]=Yb<<4,1<=(0|(Yb=q[$b+80>>2]))){for(Zb=q[a+1248>>2],ac=q[a+1072>>2],_b=Xb=0;_b=(1<>2]<<2)>>2])+_b|0,(0|Yb)!=(0|(Xb=Xb+1|0)););Zb=_b<<2}if(q[Pb+520>>2]=w(Yb,24),q[Pb+524>>2]=q[$b+80>>2]<<2,Yb=q[$b+80>>2],q[Pb+532>>2]=Zb,q[Pb+528>>2]=Yb<<2,Yb=q[$b+80>>2],q[Pb+544>>2]=Zb,q[Pb+540>>2]=Zb,q[Pb+536>>2]=Yb<<2,Yb=Pb,4<=ec>>>0){if(q[Pb+464>>2]=w(q[$b+120>>2],20),q[Pb+468>>2]=w(q[$b+100>>2],28),Zb=Pb,1<=((Xb=ac=0)|(bc=q[$b+104>>2]))){for(a=q[a+1104>>2],_b=0;_b=q[a+(Xb<<2)>>2]+_b|0,(0|bc)!=(0|(Xb=Xb+1|0)););a=_b<<2}else a=0;q[Zb+476>>2]=a,q[Pb+472>>2]=w(bc,48),q[Pb+484>>2]=w(q[$b+108>>2],12),a=q[$b+112>>2],q[Pb+552>>2]=0,q[Pb+492>>2]=w(a,12),a=0}else{if((0|(ac=q[$b+20>>2]))<1)_b=0;else for(bc=q[a+1060>>2],dc=q[a+952>>2],a=q[a+948>>2],Zb=_b=0;;){if(1<=(0|(cc=q[(Xb=Zb<<2)+dc>>2])))for(cc=(Xb=bc+(q[a+Xb>>2]<<2)|0)+(cc<<2)|0;_b=q[Xb>>2]+_b|0,(Xb=Xb+4|0)>>>0>>0;);if((0|ac)==(0|(Zb=Zb+1|0)))break}q[Pb+552>>2]=ac<<2,ac=q[$b+20>>2]<<2,a=_b<<2}for(q[Yb+556>>2]=a,q[Pb+548>>2]=ac,4>>0&&(q[Pb+480>>2]=w(q[$b+128>>2],12),q[Pb+488>>2]=w(q[$b+132>>2],12),q[Pb+496>>2]=w(q[$b+136>>2],12)),Xb=_b=0;Xb=((Yb=q[(a=(_b<<2)+Pb|0)>>2])+15&-16)+(q[a>>2]=Xb)|0,140!=(0|(_b=_b+1|0)););q[Wb>>2]=Xb}function Ga(a,Pb,Wb,hc){a:{if(!(20>>0||9<(Pb=Pb+-9|0)>>>0)){switch(Pb-1|0){default:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,q[a>>2]=q[Pb>>2];case 0:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,Pb=q[Pb>>2],q[a>>2]=Pb,q[a+4>>2]=Pb>>31;case 1:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,q[a>>2]=q[Pb>>2],q[a+4>>2]=0;case 3:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,Pb=p[Pb>>1],q[a>>2]=Pb,q[a+4>>2]=Pb>>31;case 4:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,q[a>>2]=s[Pb>>1],q[a+4>>2]=0;case 5:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,Pb=o[0|Pb],q[a>>2]=Pb,q[a+4>>2]=Pb>>31;case 6:return Pb=q[Wb>>2],q[Wb>>2]=Pb+4,q[a>>2]=r[0|Pb],q[a+4>>2]=0;case 2:case 7:break a;case 8:}n[hc](a,Wb)}return}Pb=q[Wb>>2]+7&-8,q[Wb>>2]=Pb+8,Wb=q[Pb+4>>2],q[a>>2]=q[Pb>>2],q[a+4>>2]=Wb}function Ha(a){var Pb,hc,Wb=0;if(ha(o[q[a>>2]]))for(;Pb=q[a>>2],hc=o[0|Pb],q[a>>2]=Pb+1,Wb=(w(Wb,10)+hc|0)-48|0,ha(o[Pb+1|0]););return Wb}function Ia(a,ic,jc,kc,lc){var oc,mc;q[204+(L=mc=L-208|0)>>2]=jc,ca(160+mc|(jc=0),0,40),q[200+mc>>2]=q[204+mc>>2],(0|ra(0,ic,200+mc|0,80+mc|0,160+mc|0,kc,lc))<0||(jc=0<=q[a+76>>2]?1:jc,jc=q[a>>2],o[a+74|0]<=0&&(q[a>>2]=-33&jc),oc=32&jc,q[a+48>>2]?ra(a,ic,200+mc|0,80+mc|0,160+mc|0,kc,lc):(q[a+48>>2]=80,q[a+16>>2]=80+mc,q[a+28>>2]=mc,q[a+20>>2]=mc,jc=q[a+44>>2],ra(a,ic,200+(q[a+44>>2]=mc)|0,80+mc|0,160+mc|0,kc,lc),jc&&(n[q[a+36>>2]](a,0,0),q[a+48>>2]=0,q[a+44>>2]=jc,q[a+28>>2]=0,q[a+16>>2]=0,q[a+20>>2]=0)),q[a>>2]=q[a>>2]|oc),L=208+mc|0}function Ka(a,ic,pc){var rc,qc;$(8+(L=qc=L-160|0)|0,3192,144),q[52+qc>>2]=a,q[28+qc>>2]=a,q[56+qc>>2]=rc=(rc=-2-a|0)>>>0<256?rc:256,q[36+qc>>2]=a=a+rc|0,q[24+qc>>2]=a,Ia(8+qc|0,ic,pc,11,12),rc&&(a=q[28+qc>>2],o[a-((0|a)==q[24+qc>>2])|0]=0),L=160+qc|0}function La(a,ic){var sc,tc,pc=0,pc=0!=(0|ic);a:{b:{c:{d:if(!(!ic|!(3&a)))for(;;){if(!r[0|a])break c;if(a=a+1|0,pc=0!=(0|(ic=ic+-1|0)),!ic)break d;if(!(3&a))break}if(!pc)break b}if(!r[0|a])break a;e:{if(4<=ic>>>0){for(pc=(pc=ic+-4|0)-(sc=-4&pc)|0,sc=4+(a+sc|0)|0;;){if((-1^(tc=q[a>>2]))&tc+-16843009&-2139062144)break e;if(a=a+4|0,!(3<(ic=ic+-4|0)>>>0))break}ic=pc,a=sc}if(!ic)break b}for(;;){if(!r[0|a])break a;if(a=a+1|0,!(ic=ic+-1|0))break}}return 0}return a}function Ma(a){var uc,ic=0;if(!a)return 32;if(!(1&a))for(;ic=ic+1|0,uc=2&a,a>>>=1,!uc;);return ic}function Na(a,vc){var zc,Ac,Bc,yc,wc=0,xc=0,xc=4;L=yc=L-256|0;a:if(!((0|vc)<2))for(wc=q[(Bc=(vc<<2)+a|0)>>2]=yc;;){for($(wc,q[a>>2],zc=xc>>>0<256?xc:256),wc=0;$(q[(Ac=(wc<<2)+a|0)>>2],q[((wc=wc+1|0)<<2)+a>>2],zc),q[Ac>>2]=q[Ac>>2]+zc,(0|vc)!=(0|wc););if(!(xc=xc-zc|0))break a;wc=q[Bc>>2]}L=256+yc|0}function Oa(a){return Ma(q[a>>2]+-1|0)||((a=Ma(q[a+4>>2]))?a+32|0:0)}function _c(a,$o){$o|=0,b[0]=a|=0,b[1]=$o}function bd(a,$o,ap){return function(a,$o,ap){var ep,cp,bp,dp,fp=w(cp=ap>>>16,bp=a>>>16);return a=(65535&(bp=((ep=w(dp=65535&ap,a&=65535))>>>16)+w(bp,dp)|0))+w(a,cp)|0,M=((fp+w($o,ap)|0)+(bp>>>16)|0)+(a>>>16)|0,65535&ep|a<<16}(a,$o,ap)}function cd(a,$o,ap){return function(a,$o,ap){var np,mp,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,op=0;a:{b:{c:{d:{e:{if(!(hp=$o))return _c(($o=a)-w(a=(a>>>0)/(ap>>>0)|0,ap)|0,0),M=0,a;if(gp=ap){if(!((jp=gp+-1|0)&gp))break e;kp=0-(jp=(z(gp)+33|0)-z(hp)|0)|0;break c}if(!a)return _c(0,hp-w(a=(hp>>>0)/0|0,0)|0),M=0,a;if((gp=32-z(hp)|0)>>>0<31)break d;break b}if(_c(a&jp,0),1==(0|gp))break a;return ap=31&(gp=gp?31-z(gp+-1^gp)|0:32),a=32<=(63&gp)>>>0?(hp=0,$o>>>ap):(hp=$o>>>ap,((1<>>ap),M=hp,a}jp=gp+1|0,kp=63-gp|0}if(gp=$o,ip=31&(hp=63&jp),ip=32<=hp>>>0?(hp=0,gp>>>ip):(hp=gp>>>ip,((1<>>ip),gp=31&(kp&=63),32<=kp>>>0?($o=a<>>32-gp|$o<>>0<4294967295&&(gp=0);ip=(mp=lp=ip<<1|$o>>>31)-(np=ap&(lp=gp-((hp=hp<<1|ip>>>31)+(kp>>>0>>0)|0)>>31))|0,hp=hp-(mp>>>0>>0)|0,$o=$o<<1|a>>>31,a=op|a<<1,op=lp&=1,jp=jp+-1|0;);return _c(ip,hp),M=$o<<1|a>>>31,lp|a<<1}_c(a,$o),$o=a=0}return M=$o,a}(a,$o,ap)}function ed(a){var pp;return(-1>>>(pp=31&a)&-2)<>>a}function N(){return buffer.byteLength/65536|0}}(H,I,J)}}l=null,b.wasmBinary&&(F=b.wasmBinary);var WebAssembly={},F=[];"object"!=typeof WebAssembly&&E("no native wasm support detected");var I,J=new function(a){var c=Array(16);return c.grow=function(){17<=c.length&&B("Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."),c.push(null)},c.set=function(a,e){c[a]=e},c.get=function(a){return c[a]},c},K=!1;function assert(a,c){a||B("Assertion failed: "+c)}var buffer,M,L,N,ha="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function ia(a,c,d){var e=c+d;for(d=c;a[d]&&!(e<=d);)++d;if(16>10,56320|1023&f)))):e+=String.fromCharCode(f)}return e}function ja(a,c){return a?ia(L,a,c):""}function ka(a){return 0>>16)*e+d*(c>>>16)<<16)|0}),Math.fround||(ra=new Float32Array(1),Math.fround=function(a){return ra[0]=a,ra[0]}),Math.clz32||(Math.clz32=function(a){var c=32,d=a>>16;return d&&(c-=16,a=d),(d=a>>8)&&(c-=8,a=d),(d=a>>4)&&(c-=4,a=d),(d=a>>2)&&(c-=2,a=d),a>>1?c-2:c-a}),Math.trunc||(Math.trunc=function(a){return a<0?Math.ceil(a):Math.floor(a)}),0),Q=null,U=null;function B(a){throw b.onAbort&&b.onAbort(a),D(a),E(a),K=!0,"abort("+a+"). Build with -s ASSERTIONS=1 for more info."}b.preloadedImages={},b.preloadedAudios={};var V="data:application/octet-stream;base64,";function W(a){return String.prototype.startsWith?a.startsWith(V):0===a.indexOf(V)}var X="_em_module.wasm";function ta(){try{if(F)return new Uint8Array(F);var a=z(X);if(a)return a;if(w)return w(X);throw"both async and sync fetching of the wasm failed"}catch(c){B(c)}}W(X)||(t=X,X=b.locateFile?b.locateFile(t,u):u+t),na.push({ea:function(){va()}});var wa=[null,[],[]],xa=!1;function C(a){for(var c=[],d=0;d>4,f=(15&f)<<4|g>>2,h=(3&g)<<6|m}while(c+=String.fromCharCode(e),64!==g&&(c+=String.fromCharCode(f)),64!==m&&(c+=String.fromCharCode(h)),d>16),la(I.buffer);var d=1;break a}catch(e){}d=void 0}return!!d},c:function(a,c,d,e){try{for(var f=0,g=0;g>2],h=N[c+(8*g+4)>>2],A=0;A>2]=f,0}catch(T){return"undefined"!=typeof FS&&T instanceof FS.fa||B(T),T.ga}},memory:I,table:J},u=function(){function a(a){b.asm=a.exports,P--,b.monitorRunDependencies&&b.monitorRunDependencies(P),0==P&&(null!==Q&&(clearInterval(Q),Q=null),U)&&(a=U,U=null,a())}function c(c){a(c.instance)}function d(a){(F||!p&&!q||"function"!=typeof fetch?new Promise(function(a){a(ta())}):fetch(X,{credentials:"same-origin"}).then(function(a){if(a.ok)return a.arrayBuffer();throw"failed to load wasm binary file at '"+X+"'"}).catch(ta)).then(function(){return{then:function(a){a({instance:new da})}}}).then(a,function(a){E("failed to asynchronously prepare wasm: "+a),B(a)})}var e={env:H,wasi_unstable:H};if(P++,b.monitorRunDependencies&&b.monitorRunDependencies(P),b.instantiateWasm)try{return b.instantiateWasm(e,a)}catch(f){return E("Module.instantiateWasm callback failed with error: "+f),!1}return F||"function"!=typeof WebAssembly.instantiateStreaming||W(X)||"function"!=typeof fetch?d(c):fetch(X,{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,e).then(c,function(a){E("wasm streaming compile failed: "+a),E("falling back to ArrayBuffer instantiation"),d(c)})}),{}}(),va=(b.asm=u,b.___wasm_call_ctors=function(){return b.asm.d.apply(null,arguments)}),Aa=(b._csmGetLogFunction=function(){return b.asm.e.apply(null,arguments)},b._csmGetVersion=function(){return b.asm.f.apply(null,arguments)},b._csmGetLatestMocVersion=function(){return b.asm.g.apply(null,arguments)},b._csmGetMocVersion=function(){return b.asm.h.apply(null,arguments)},b._csmHasMocConsistency=function(){return b.asm.i.apply(null,arguments)},b._csmSetLogFunction=function(){return b.asm.j.apply(null,arguments)},b._csmReviveMocInPlace=function(){return b.asm.k.apply(null,arguments)},b._csmReadCanvasInfo=function(){return b.asm.l.apply(null,arguments)},b._csmGetSizeofModel=function(){return b.asm.m.apply(null,arguments)},b._csmInitializeModelInPlace=function(){return b.asm.n.apply(null,arguments)},b._csmUpdateModel=function(){return b.asm.o.apply(null,arguments)},b._csmGetParameterCount=function(){return b.asm.p.apply(null,arguments)},b._csmGetParameterIds=function(){return b.asm.q.apply(null,arguments)},b._csmGetParameterTypes=function(){return b.asm.r.apply(null,arguments)},b._csmGetParameterMinimumValues=function(){return b.asm.s.apply(null,arguments)},b._csmGetParameterMaximumValues=function(){return b.asm.t.apply(null,arguments)},b._csmGetParameterDefaultValues=function(){return b.asm.u.apply(null,arguments)},b._csmGetParameterValues=function(){return b.asm.v.apply(null,arguments)},b._csmGetPartCount=function(){return b.asm.w.apply(null,arguments)},b._csmGetPartIds=function(){return b.asm.x.apply(null,arguments)},b._csmGetPartOpacities=function(){return b.asm.y.apply(null,arguments)},b._csmGetPartParentPartIndices=function(){return b.asm.z.apply(null,arguments)},b._csmGetDrawableCount=function(){return b.asm.A.apply(null,arguments)},b._csmGetDrawableIds=function(){return b.asm.B.apply(null,arguments)},b._csmGetDrawableConstantFlags=function(){return b.asm.C.apply(null,arguments)},b._csmGetDrawableDynamicFlags=function(){return b.asm.D.apply(null,arguments)},b._csmGetDrawableTextureIndices=function(){return b.asm.E.apply(null,arguments)},b._csmGetDrawableDrawOrders=function(){return b.asm.F.apply(null,arguments)},b._csmGetDrawableRenderOrders=function(){return b.asm.G.apply(null,arguments)},b._csmGetDrawableOpacities=function(){return b.asm.H.apply(null,arguments)},b._csmGetDrawableMaskCounts=function(){return b.asm.I.apply(null,arguments)},b._csmGetDrawableMasks=function(){return b.asm.J.apply(null,arguments)},b._csmGetDrawableVertexCounts=function(){return b.asm.K.apply(null,arguments)},b._csmGetDrawableVertexPositions=function(){return b.asm.L.apply(null,arguments)},b._csmGetDrawableVertexUvs=function(){return b.asm.M.apply(null,arguments)},b._csmGetDrawableIndexCounts=function(){return b.asm.N.apply(null,arguments)},b._csmGetDrawableIndices=function(){return b.asm.O.apply(null,arguments)},b._csmGetDrawableMultiplyColors=function(){return b.asm.P.apply(null,arguments)},b._csmGetDrawableScreenColors=function(){return b.asm.Q.apply(null,arguments)},b._csmGetDrawableParentPartIndices=function(){return b.asm.R.apply(null,arguments)},b._csmResetDrawableDynamicFlags=function(){return b.asm.S.apply(null,arguments)},b._csmGetParameterKeyCounts=function(){return b.asm.T.apply(null,arguments)},b._csmGetParameterKeyValues=function(){return b.asm.U.apply(null,arguments)},b._csmMallocMoc=function(){return b.asm.V.apply(null,arguments)},b._csmMallocModelAndInitialize=function(){return b.asm.W.apply(null,arguments)},b._csmMalloc=function(){return b.asm.X.apply(null,arguments)},b._csmFree=function(){return b.asm.Y.apply(null,arguments)},b._csmInitializeAmountOfMemory=function(){return b.asm.Z.apply(null,arguments)},b.stackSave=function(){return b.asm._.apply(null,arguments)}),Ba=b.stackAlloc=function(){return b.asm.$.apply(null,arguments)},Ca=b.stackRestore=function(){return b.asm.aa.apply(null,arguments)},ca=b.__growWasmMemory=function(){return b.asm.ba.apply(null,arguments)};function Z(){function a(){if(!Y&&(Y=!0,!K)){if(O(na),O(oa),b.onRuntimeInitialized&&b.onRuntimeInitialized(),b.postRun)for("function"==typeof b.postRun&&(b.postRun=[b.postRun]);b.postRun.length;){var a=b.postRun.shift();pa.unshift(a)}O(pa)}}if(!(0>6}else{if(k<=65535){if(d<=e+2)break;f[e++]=224|k>>12}else{if(d<=e+3)break;f[e++]=240|k>>18,f[e++]=128|k>>12&63}f[e++]=128|k>>6&63}f[e++]=128|63&k}}f[e]=0}}return c},array:function(a){var c=Ba(a.length);return M.set(a,c),c}},g=function(a){var c=b["_"+a];return assert(c,"Cannot call unknown function "+a+", make sure it is exported"),c}(a),m=[];if(a=0,e)for(var h=0;h { + console.log( + `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成` + ); + }, + } ); + this.#app.stage.addChild(model); + + model.scale.set(0.25); } /** @@ -74,8 +97,9 @@ class Model { const modelId = Number(localStorage.getItem("modelId")); const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); // 可选 "rand"(随机), "switch"(顺序) - const result = await fetch(`${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`) - .then((response) => response.json()) as ModelTexturesResult; + const result = (await fetch( + `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}` + ).then((response) => response.json())) as ModelTexturesResult; const texturesId = result.textures.id; if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { sendMessage("我还没有其他衣服呢!", 4000, 3); @@ -89,10 +113,11 @@ class Model { */ async loadOtherModel() { const modelId = Number(localStorage.getItem("modelId")); - const result = await fetch(`${this.#apiPath}switch/?id=${modelId}`) - .then((response) => response.json()) as ModelResult; + const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( + (response) => response.json() + )) as ModelResult; this.loadModel(result.model.id, 0, result.model.message); } } -export default Model; \ No newline at end of file +export default Model; diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 29206d7..188fc7e 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -27,5 +27,6 @@ } ] }, - "include": ["src/**/*"] + "include": ["src/**/*"], + "exclude": ["node_modules", "dist", "src/libs/**/*"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9acb9aa..e44fde5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,9 +23,18 @@ importers: '@lit/react': specifier: ^1.0.7 version: 1.0.7(@types/react@19.0.8) + iconify-icon: + specifier: ^2.3.0 + version: 2.3.0 lit: specifier: ^3.2.1 version: 3.2.1 + pixi-live2d-display: + specifier: ^0.4.0 + version: 0.4.0(76g3zz2nt7dtjnktvdvk76m2oe) + pixi.js: + specifier: ^6.5.2 + version: 6.5.10 query-string: specifier: ^9.1.1 version: 9.1.1 @@ -553,6 +562,267 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@pixi/accessibility@6.5.10': + resolution: {integrity: sha512-URrI1H+1kjjHSyhY1QXcUZ8S3omdVTrXg5y0gndtpOhIelErBTC9NWjJfw6s0Rlmv5+x5VAitQTgw9mRiatDgw==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/app@6.5.10': + resolution: {integrity: sha512-VsNHLajZ5Dbc/Zrj7iWmIl3eu6Fec+afjW/NXXezD8Sp3nTDF0bv5F+GDgN/zSc2gqIvPHyundImT7hQGBDghg==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/compressed-textures@6.5.10': + resolution: {integrity: sha512-41NT5mkfam47DrkB8xMp3HUZDt7139JMB6rVNOmb3u2vm+2mdy9tzi5s9nN7bG9xgXlchxcFzytTURk+jwXVJA==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/loaders': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/constants@6.5.10': + resolution: {integrity: sha512-PUF2Y9YISRu5eVrVVHhHCWpc/KmxQTg3UH8rIUs8UI9dCK41/wsPd3pEahzf7H47v7x1HCohVZcFO3XQc1bUDw==} + + '@pixi/core@6.5.10': + resolution: {integrity: sha512-Gdzp5ENypyglvsh5Gv3teUZnZnmizo4xOsL+QqmWALdFlJXJwLJMVhKVThV/q/095XR6i4Ou54oshn+m4EkuFw==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/extensions': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/runner': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/ticker': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/display@6.5.10': + resolution: {integrity: sha512-NxFdDDxlbH5fQkzGHraLGoTMucW9pVgXqQm13TSmkA3NWIi/SItHL4qT2SI8nmclT9Vid1VDEBCJFAbdeuQw1Q==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/extensions@6.5.10': + resolution: {integrity: sha512-EIUGza+E+sCy3dupuIjvRK/WyVyfSzHb5XsxRaxNrPwvG1iIUIqNqZ3owLYCo4h17fJWrj/yXVufNNtUKQccWQ==} + + '@pixi/extract@6.5.10': + resolution: {integrity: sha512-hXFIc4EGs14GFfXAjT1+6mzopzCMWeXeai38/Yod3vuBXkkp8+ksen6kE09vTnB9l1IpcIaCM+XZEokuqoGX2A==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/filter-alpha@6.5.10': + resolution: {integrity: sha512-GWHLJvY0QOIDRjVx0hdUff6nl/PePQg84i8XXPmANrvA+gJ/eSRTQRmQcdgInQfawENADB/oRqpcCct6IAcKpQ==} + peerDependencies: + '@pixi/core': 6.5.10 + + '@pixi/filter-blur@6.5.10': + resolution: {integrity: sha512-LJsRocVOdM9hTzZKjP+jmkfoL1nrJi5XpR0ItgRN8fflOC7A7Ln4iPe7nukbbq3H7QhZSunbygMubbO6xhThZw==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/settings': 6.5.10 + + '@pixi/filter-color-matrix@6.5.10': + resolution: {integrity: sha512-C2S44/EoWTrhqedLWOZTq9GZV5loEq1+MhyK9AUzEubWGMHhou1Juhn2mRZ7R6flKPCRQNKrXpStUwCAouud3Q==} + peerDependencies: + '@pixi/core': 6.5.10 + + '@pixi/filter-displacement@6.5.10': + resolution: {integrity: sha512-fbblMYyPX/hO3Tpoaa4tOBYxqp4TxjNrz6xyt15tKSVxWQElk+Tx98GJ+aaBoiHOKt8ezzHplStWoHG++JIv/w==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/math': 6.5.10 + + '@pixi/filter-fxaa@6.5.10': + resolution: {integrity: sha512-wbHL9UtY3g7jTyvO8JaZks6DqV8AO5c96Hfu0zfndWBPs79Ul6/sq3LD2eE+yq5vK5T2R9Sr4s54ls1JT3Sppg==} + peerDependencies: + '@pixi/core': 6.5.10 + + '@pixi/filter-noise@6.5.10': + resolution: {integrity: sha512-CX+/06NVaw3HsjipZVb7aemkca0TC8I6qfKI4lx2ugxS/6G6zkY5zqd8+nVSXW4DpUXB6eT0emwfRv6N00NvuA==} + peerDependencies: + '@pixi/core': 6.5.10 + + '@pixi/graphics@6.5.10': + resolution: {integrity: sha512-KPHGJ910fi8bRQQ+VcTIgrK+bKIm8yAQaZKPqMtm14HzHPGcES6HkgeNY1sd7m8J4aS9btm5wOSyFu0p5IzTpA==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/interaction@6.5.10': + resolution: {integrity: sha512-v809pJmXA2B9dV/vdrDMUqJT+fBB/ARZli2YRmI2dPbEbkaYr8FNmxCAJnwT8o+ymTx044Ie820hn9tVrtMtfA==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/ticker': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/loaders@6.5.10': + resolution: {integrity: sha512-AuK7mXBmyVsDFL9DDFPB8sqP8fwQ2NOktvu98bQuJl0/p/UeK/0OAQnF3wcf3FeBv5YGXfNHL21c2DCisjKfTg==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/math@6.5.10': + resolution: {integrity: sha512-fxeu7ykVbMGxGV2S3qRTupHToeo1hdWBm8ihyURn3BMqJZe2SkZEECPd5RyvIuuNUtjRnmhkZRnF3Jsz2S+L0g==} + + '@pixi/mesh-extras@6.5.10': + resolution: {integrity: sha512-UCG7OOPPFeikrX09haCibCMR0jPQ4UJ+4HiYiAv/3dahq5eEzBx+yAwVtxcVCjonkTf/lu5SzmHdzpsbHLx5aw==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/mesh': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/mesh@6.5.10': + resolution: {integrity: sha512-tUNPsdp5/t/yRsCmfxIcufIfbQVzgAlMNgQ1igWOkSxzhB7vlEbZ8ZLLW5tQcNyM/r7Nhjz+RoB+RD+/BCtvlA==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/mixin-cache-as-bitmap@6.5.10': + resolution: {integrity: sha512-HV4qPZt8R7uuPZf1XE5S0e3jbN4+/EqgAIkueIyK3Em+0IO1rCmIbzzYxFPxkElMUu5VvN1r4hXK846z9ITnhw==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/mixin-get-child-by-name@6.5.10': + resolution: {integrity: sha512-YYd9wjnI/4aKY0H5Ij413UppVZn3YE1No2CZrNevV6WbhylsJucowY3hJihtl9mxkpwtaUIyWMjmphkbOinbzA==} + peerDependencies: + '@pixi/display': 6.5.10 + + '@pixi/mixin-get-global-position@6.5.10': + resolution: {integrity: sha512-A83gTZP9CdQAyrAvOZl1P707Q0QvIC0V8UnBAMd4GxuhMOXJtXVPCdmfPVXUrfoywgnH+/Bgimq5xhsXTf8Hzg==} + peerDependencies: + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + + '@pixi/particle-container@6.5.10': + resolution: {integrity: sha512-CCNAdYGzKoOc3FtK2kyWCNjygdHppeOEqqK189yhg3yRSsvby+HMms/cM6bLK/4Vf6mFoAy1na3w/oXpqTR2Ag==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/polyfill@6.5.10': + resolution: {integrity: sha512-KDTWyr285VvPM8GGTVIZAhmxGrOlTznUGK/9kWS3GtrogwLWn41S/86Yej1gYvotVyUomCcOok33Jzahb+vX1w==} + + '@pixi/prepare@6.5.10': + resolution: {integrity: sha512-PHMApz/GPg7IX/7+2S98criN2+Mp+fgiKpojV9cnl0SlW2zMxfAHBBi8zik9rHBgjx8X6d6bR0MG1rPtb6vSxQ==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/graphics': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/text': 6.5.10 + '@pixi/ticker': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/runner@6.5.10': + resolution: {integrity: sha512-4HiHp6diCmigJT/DSbnqQP62OfWKmZB7zPWMdV1AEdr4YT1QxzXAW1wHg7dkoEfyTHqZKl0tm/zcqKq/iH7tMA==} + + '@pixi/settings@6.5.10': + resolution: {integrity: sha512-ypAS5L7pQ2Qb88yQK72bXtc7sD8OrtLWNXdZ/gnw5kwSWCFaOSoqhKqJCXrR5DQtN98+RQefwbEAmMvqobhFyw==} + peerDependencies: + '@pixi/constants': 6.5.10 + + '@pixi/sprite-animated@6.5.10': + resolution: {integrity: sha512-x1kayucAqpVbNk+j+diC/7sQGQsAl6NCH1J2/EEaiQjlV3GOx1MXS9Tft1N1Y1y7otbg1XsnBd60/Yzcp05pxA==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/ticker': 6.5.10 + + '@pixi/sprite-tiling@6.5.10': + resolution: {integrity: sha512-lDFcPuwExrdJhli+WmjPivChjeCG6NiRl36iQ8n2zVi/MYVv9qfKCA6IdU7HBWk1AZdsg6KUTpwfmVLUI+qz3w==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/sprite@6.5.10': + resolution: {integrity: sha512-UiK+8LgM9XQ/SBDKjRgZ8WggdOSlFRXqiWjEZVmNkiyU8HvXeFzWPRhpc8RR1zDwAUhZWKtMhF8X/ba9m+z2lg==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/spritesheet@6.5.10': + resolution: {integrity: sha512-7uOZ1cYyYtPb0ZEgXV1SZ8ujtluZNY0TL5z3+Qc8cgGGZK/MaWG7N6Wf+uR4BR2x8FLNwcyN5IjbQDKCpblrmg==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/loaders': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/text-bitmap@6.5.10': + resolution: {integrity: sha512-g/iFIMGp6Pfi0BvX6Ykp48Z6JXVgKOrc7UCIR9CM21wYcCiQGqtdFwstV236xk6/D8NToUtSOcifhtQ28dVTdQ==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10 + '@pixi/display': 6.5.10 + '@pixi/loaders': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/mesh': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/text': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/text@6.5.10': + resolution: {integrity: sha512-ikwkonLJ+6QmEVW8Ji9fS5CjrKNbU4mHzYuwRQas/VJQuSWgd0myCcaw6ZbF1oSfQe70HgbNOR0sH8Q3Com0qg==} + peerDependencies: + '@pixi/core': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10 + '@pixi/sprite': 6.5.10 + '@pixi/utils': 6.5.10 + + '@pixi/ticker@6.5.10': + resolution: {integrity: sha512-UqX1XYtzqFSirmTOy8QAK4Ccg4KkIZztrBdRPKwFSOEiKAJoGDCSBmyQBo/9aYQKGObbNnrJ7Hxv3/ucg3/1GA==} + peerDependencies: + '@pixi/extensions': 6.5.10 + '@pixi/settings': 6.5.10 + + '@pixi/utils@6.5.10': + resolution: {integrity: sha512-4f4qDMmAz9IoSAe08G2LAxUcEtG9jSdudfsMQT2MG+OpfToirboE6cNoO0KnLCvLzDVE/mfisiQ9uJbVA9Ssdw==} + peerDependencies: + '@pixi/constants': 6.5.10 + '@pixi/settings': 6.5.10 + '@polka/url@1.0.0-next.28': resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} @@ -672,12 +942,18 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/earcut@2.1.4': + resolution: {integrity: sha512-qp3m9PPz4gULB9MhjGID7wpo3gJ4bTGXm7ltNDsmOvsPduTeHp8wSW9YckBj3mljeOh4F0m2z/0JKAALRKbmLQ==} + '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} '@types/node@22.13.1': resolution: {integrity: sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==} + '@types/offscreencanvas@2019.7.3': + resolution: {integrity: sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==} + '@types/react-dom@19.0.3': resolution: {integrity: sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA==} peerDependencies: @@ -833,10 +1109,27 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} + array-union@1.0.2: + resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} + engines: {node: '>=0.10.0'} + + array-uniq@1.0.3: + resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} + engines: {node: '>=0.10.0'} + + async@2.6.4: + resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -859,6 +1152,14 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.3: + resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} + engines: {node: '>= 0.4'} + caniuse-lite@1.0.30001697: resolution: {integrity: sha512-GwNPlWJin8E+d7Gxq96jxM6w0w+VFeyyXRsjU58emtkYqnbwHqXm5uT2uCmO0RQE9htWknOP4xtBlLmM/gWxvQ==} @@ -893,6 +1194,12 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + confbox@0.1.8: resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} @@ -933,12 +1240,22 @@ packages: resolution: {integrity: sha512-qTBmfQoXvhKO75D/05C8m+fteQmn4U46FWYiLhXtZQInzitXLWY0EQ/2oKnpAz9g2lQWW8jYcLcT+hPJGT+kig==} engines: {node: '>=10.13'} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + earcut@2.2.4: + resolution: {integrity: sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==} + electron-to-chromium@1.5.93: resolution: {integrity: sha512-M+29jTcfNNoR9NV7la4SwUqzWAxEwnc7ThA5e1m6LRSotmpfpCpLcIfgtSCVL+MllNLgAyM/5ru86iMRemPzDQ==} + email-addresses@3.1.0: + resolution: {integrity: sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==} + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -946,6 +1263,18 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} + esbuild@0.23.1: resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} engines: {node: '>=18'} @@ -967,6 +1296,9 @@ packages: estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + eventemitter3@3.1.2: + resolution: {integrity: sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==} + fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} @@ -982,6 +1314,14 @@ packages: picomatch: optional: true + filename-reserved-regex@2.0.0: + resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} + engines: {node: '>=4'} + + filenamify@4.3.0: + resolution: {integrity: sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==} + engines: {node: '>=8'} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -990,11 +1330,29 @@ packages: resolution: {integrity: sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==} engines: {node: '>=14.16'} + find-cache-dir@3.3.2: + resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} + engines: {node: '>=8'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -1003,13 +1361,30 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + get-tsconfig@4.10.0: resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} + gh-pages@4.0.0: + resolution: {integrity: sha512-p8S0T3aGJc68MtwOcZusul5qPSNZCalap3NWbhRUZYu1YOdp+EjZ+4kPmRM8h3NNRdqw00yuevRjlkuSzCn7iQ==} + engines: {node: '>=10'} + hasBin: true + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -1018,6 +1393,17 @@ packages: resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} engines: {node: '>=18'} + globby@6.1.0: + resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} + engines: {node: '>=0.10.0'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} @@ -1026,9 +1412,27 @@ packages: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + iconify-icon@2.3.0: + resolution: {integrity: sha512-C0beI9oTDxQz6voI5CKl7MiJf0Lw4UU8K4G4t6pcUDClLmCvuMOpcvd8MAztQ2SfoH0iv7WHdxBFjekKPFKH2Q==} + importx@0.5.1: resolution: {integrity: sha512-YrRaigAec1sC2CdIJjf/hCH1Wp9Ii8Cq5ROw4k5nJ19FVl2FcJUHZ5gGIb1vs8+JNYIyOJpc2fcufS2330bxDw==} + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -1066,6 +1470,9 @@ packages: engines: {node: '>=6'} hasBin: true + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} @@ -1094,15 +1501,30 @@ packages: resolution: {integrity: sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==} engines: {node: '>=14'} + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + lodash.deburr@4.1.0: resolution: {integrity: sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==} + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + make-dir@3.1.0: + resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} + engines: {node: '>=8'} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + mdn-data@2.12.2: resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} @@ -1114,6 +1536,9 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + mlly@1.7.4: resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} @@ -1139,15 +1564,46 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + ofetch@1.4.1: resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + package-manager-detector@0.2.9: resolution: {integrity: sha512-+vYvA/Y31l8Zk8dwxHhL3JfTuHPm6tlxM2A3GeQyl7ovYnSp1+mzAxClxaOr0qO1TtPxbQxetI7v5XqKLJZk7Q==} parse5@5.1.0: resolution: {integrity: sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==} + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -1168,6 +1624,35 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} + pify@2.3.0: + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} + engines: {node: '>=0.10.0'} + + pinkie-promise@2.0.1: + resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} + engines: {node: '>=0.10.0'} + + pinkie@2.0.4: + resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} + engines: {node: '>=0.10.0'} + + pixi-live2d-display@0.4.0: + resolution: {integrity: sha512-xeYC6y4Y0Bxe9ksWNlGFZC1rII/MPrzPQK7t1c3ubA8RhkOISIqHJl38fNumXqhGEs+yItmgDOkFT+9dsyGDjA==} + peerDependencies: + '@pixi/core': ^6 + '@pixi/display': ^6 + '@pixi/loaders': ^6 + '@pixi/math': ^6 + '@pixi/sprite': ^6 + '@pixi/utils': ^6 + + pixi.js@6.5.10: + resolution: {integrity: sha512-Z2mjeoISml2iuVwT1e/BQwERYM2yKoiR08ZdGrg8y5JjeuVptfTrve4DbPMRN/kEDodesgQZGV/pFv0fE9Q2SA==} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -1175,6 +1660,16 @@ packages: resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} engines: {node: ^10 || ^12 || >=14} + promise-polyfill@8.3.0: + resolution: {integrity: sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==} + + punycode@1.4.1: + resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} + + qs@6.14.0: + resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} + engines: {node: '>=0.6'} + query-string@9.1.1: resolution: {integrity: sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==} engines: {node: '>=18'} @@ -1228,6 +1723,22 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + side-channel-list@1.0.0: + resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.0: + resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} + engines: {node: '>= 0.4'} + sirv@3.0.0: resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} engines: {node: '>=18'} @@ -1255,6 +1766,10 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + strip-outer@1.0.1: + resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} + engines: {node: '>=0.10.0'} + supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -1279,6 +1794,10 @@ packages: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} + trim-repeated@1.0.0: + resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} + engines: {node: '>=0.10.0'} + ts-lit-plugin@2.0.2: resolution: {integrity: sha512-DPXlVxhjWHxg8AyBLcfSYt2JXgpANV1ssxxwjY98o26gD8MzeiM68HFW9c2VeDd1CjoR3w7B/6/uKxwBQe+ioA==} @@ -1309,6 +1828,10 @@ packages: undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + unocss@65.4.3: resolution: {integrity: sha512-mwSVi0ovPxaDv58yFB7Vm5v1x/q/pUc7aTh7SJbeYoRrpbUGdKiVf20YSQfMqmBNXV9CFDr4o6tabP/58as6RQ==} engines: {node: '>=14'} @@ -1331,6 +1854,10 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + url@0.11.4: + resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} + engines: {node: '>= 0.4'} + vite@6.1.0: resolution: {integrity: sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -1417,6 +1944,9 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -1806,6 +2336,239 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.0 + '@pixi/accessibility@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/app@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/compressed-textures@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/constants@6.5.10': {} + + '@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/extensions': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/runner': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@types/offscreencanvas': 2019.7.3 + + '@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/extensions@6.5.10': {} + + '@pixi/extract@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/filter-alpha@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + + '@pixi/filter-blur@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + + '@pixi/filter-color-matrix@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + + '@pixi/filter-displacement@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + + '@pixi/filter-fxaa@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + + '@pixi/filter-noise@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + + '@pixi/graphics@6.5.10(vnjw7qx4yf6lp5siigycla6i5q)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/interaction@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/math@6.5.10': {} + + '@pixi/mesh-extras@6.5.10(px7ljw7kss2ypii62iz7oundhy)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/mesh': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/mesh@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/mixin-cache-as-bitmap@6.5.10(gsayfpodkyk4qa4ufzl7uemija)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/mixin-get-child-by-name@6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': + dependencies: + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + + '@pixi/mixin-get-global-position@6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)': + dependencies: + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + + '@pixi/particle-container@6.5.10(vnjw7qx4yf6lp5siigycla6i5q)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/polyfill@6.5.10': + dependencies: + object-assign: 4.1.1 + promise-polyfill: 8.3.0 + + '@pixi/prepare@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/graphics@6.5.10(vnjw7qx4yf6lp5siigycla6i5q))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/text@6.5.10(wloyuoiyjdwi7eo66se3n3om5u))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/graphics': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/text': 6.5.10(wloyuoiyjdwi7eo66se3n3om5u) + '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/runner@6.5.10': {} + + '@pixi/settings@6.5.10(@pixi/constants@6.5.10)': + dependencies: + '@pixi/constants': 6.5.10 + + '@pixi/sprite-animated@6.5.10(5lsnbztgwvieupexxz2mryw2ca)': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/sprite-tiling@6.5.10(vnjw7qx4yf6lp5siigycla6i5q)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/sprite@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/spritesheet@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/text-bitmap@6.5.10(eh244dlueg2daqoi2uo7nzvmpa)': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/mesh': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/text': 6.5.10(wloyuoiyjdwi7eo66se3n3om5u) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/text@6.5.10(wloyuoiyjdwi7eo66se3n3om5u)': + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + '@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))': + dependencies: + '@pixi/extensions': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + + '@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))': + dependencies: + '@pixi/constants': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@types/earcut': 2.1.4 + earcut: 2.2.4 + eventemitter3: 3.1.2 + url: 0.11.4 + '@polka/url@1.0.0-next.28': {} '@rollup/pluginutils@5.1.4(rollup@4.34.4)': @@ -1894,6 +2657,8 @@ snapshots: dependencies: '@babel/types': 7.26.7 + '@types/earcut@2.1.4': {} + '@types/estree@1.0.6': {} '@types/node@22.13.1': @@ -1901,6 +2666,8 @@ snapshots: undici-types: 6.20.0 optional: true + '@types/offscreencanvas@2019.7.3': {} + '@types/react-dom@19.0.3(@types/react@19.0.8)': dependencies: '@types/react': 19.0.8 @@ -2163,8 +2930,25 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 + array-union@1.0.2: + dependencies: + array-uniq: 1.0.3 + + array-uniq@1.0.3: {} + + async@2.6.4: + dependencies: + lodash: 4.17.21 + + balanced-match@1.0.2: {} + binary-extensions@2.3.0: {} + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -2186,6 +2970,16 @@ snapshots: cac@6.7.14: {} + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.3: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + caniuse-lite@1.0.30001697: {} chalk@2.4.2: @@ -2226,8 +3020,11 @@ snapshots: colorette@2.0.20: {} - commander@2.20.3: - optional: true + commander@2.20.3: {} + + commondir@1.0.1: {} + + concat-map@0.0.1: {} confbox@0.1.8: {} @@ -2258,14 +3055,32 @@ snapshots: leven: 3.1.0 lodash.deburr: 4.1.0 + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + duplexer@0.1.2: {} + earcut@2.2.4: {} + electron-to-chromium@1.5.93: {} + email-addresses@3.1.0: {} + emoji-regex@8.0.0: {} entities@4.5.0: {} + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 + esbuild@0.23.1: optionalDependencies: '@esbuild/aix-ppc64': 0.23.1 @@ -2327,6 +3142,8 @@ snapshots: estree-walker@2.0.2: {} + eventemitter3@3.1.2: {} + fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2343,37 +3160,125 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + filename-reserved-regex@2.0.0: {} + + filenamify@4.3.0: + dependencies: + filename-reserved-regex: 2.0.0 + strip-outer: 1.0.1 + trim-repeated: 1.0.0 + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 filter-obj@5.1.0: {} + find-cache-dir@3.3.2: + dependencies: + commondir: 1.0.1 + make-dir: 3.1.0 + pkg-dir: 4.2.0 + + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + + fs-extra@8.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + + fs.realpath@1.0.0: {} + fsevents@2.3.3: optional: true + function-bind@1.1.2: {} + gensync@1.0.0-beta.2: {} get-caller-file@2.0.5: {} + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + get-tsconfig@4.10.0: dependencies: resolve-pkg-maps: 1.0.0 + gh-pages@4.0.0: + dependencies: + async: 2.6.4 + commander: 2.20.3 + email-addresses: 3.1.0 + filenamify: 4.3.0 + find-cache-dir: 3.3.2 + fs-extra: 8.1.0 + globby: 6.1.0 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + globals@11.12.0: {} globals@15.14.0: {} + globby@6.1.0: + dependencies: + array-union: 1.0.2 + glob: 7.2.3 + object-assign: 4.1.1 + pify: 2.3.0 + pinkie-promise: 2.0.1 + + gopd@1.2.0: {} + + graceful-fs@4.2.11: {} + gzip-size@6.0.0: dependencies: duplexer: 0.1.2 has-flag@3.0.0: {} + has-symbols@1.1.0: {} + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + iconify-icon@2.3.0: + dependencies: + '@iconify/types': 2.0.0 + importx@0.5.1: dependencies: bundle-require: 5.1.0(esbuild@0.24.2) @@ -2385,6 +3290,13 @@ snapshots: transitivePeerDependencies: - supports-color + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 @@ -2407,6 +3319,10 @@ snapshots: json5@2.2.3: {} + jsonfile@4.0.0: + optionalDependencies: + graceful-fs: 4.2.11 + kolorist@1.8.0: {} leven@3.1.0: {} @@ -2446,8 +3362,14 @@ snapshots: mlly: 1.7.4 pkg-types: 1.3.1 + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + lodash.deburr@4.1.0: {} + lodash@4.17.21: {} + lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -2456,6 +3378,12 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + make-dir@3.1.0: + dependencies: + semver: 6.3.1 + + math-intrinsics@1.1.0: {} + mdn-data@2.12.2: {} merge2@1.4.1: {} @@ -2465,6 +3393,10 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + mlly@1.7.4: dependencies: acorn: 8.14.0 @@ -2484,16 +3416,38 @@ snapshots: normalize-path@3.0.0: {} + object-assign@4.1.1: {} + + object-inspect@1.13.4: {} + ofetch@1.4.1: dependencies: destr: 2.0.3 node-fetch-native: 1.6.6 ufo: 1.5.4 + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + + p-try@2.2.0: {} + package-manager-detector@0.2.9: {} parse5@5.1.0: {} + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + pathe@1.1.2: {} pathe@2.0.2: {} @@ -2506,6 +3460,67 @@ snapshots: picomatch@4.0.2: {} + pify@2.3.0: {} + + pinkie-promise@2.0.1: + dependencies: + pinkie: 2.0.4 + + pinkie@2.0.4: {} + + pixi-live2d-display@0.4.0(76g3zz2nt7dtjnktvdvk76m2oe): + dependencies: + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + gh-pages: 4.0.0 + + pixi.js@6.5.10: + dependencies: + '@pixi/accessibility': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/app': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/compressed-textures': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/constants': 6.5.10 + '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/extensions': 6.5.10 + '@pixi/extract': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/filter-alpha': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) + '@pixi/filter-blur': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/filter-color-matrix': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) + '@pixi/filter-displacement': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10) + '@pixi/filter-fxaa': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) + '@pixi/filter-noise': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) + '@pixi/graphics': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) + '@pixi/interaction': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/math': 6.5.10 + '@pixi/mesh': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/mesh-extras': 6.5.10(px7ljw7kss2ypii62iz7oundhy) + '@pixi/mixin-cache-as-bitmap': 6.5.10(gsayfpodkyk4qa4ufzl7uemija) + '@pixi/mixin-get-child-by-name': 6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) + '@pixi/mixin-get-global-position': 6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10) + '@pixi/particle-container': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) + '@pixi/polyfill': 6.5.10 + '@pixi/prepare': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/graphics@6.5.10(vnjw7qx4yf6lp5siigycla6i5q))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/text@6.5.10(wloyuoiyjdwi7eo66se3n3om5u))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/runner': 6.5.10 + '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) + '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/sprite-animated': 6.5.10(5lsnbztgwvieupexxz2mryw2ca) + '@pixi/sprite-tiling': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) + '@pixi/spritesheet': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@pixi/text': 6.5.10(wloyuoiyjdwi7eo66se3n3om5u) + '@pixi/text-bitmap': 6.5.10(eh244dlueg2daqoi2uo7nzvmpa) + '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + + pkg-dir@4.2.0: + dependencies: + find-up: 4.1.0 + pkg-types@1.3.1: dependencies: confbox: 0.1.8 @@ -2518,6 +3533,14 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + promise-polyfill@8.3.0: {} + + punycode@1.4.1: {} + + qs@6.14.0: + dependencies: + side-channel: 1.1.0 + query-string@9.1.1: dependencies: decode-uri-component: 0.4.1 @@ -2580,6 +3603,34 @@ snapshots: semver@6.3.1: {} + side-channel-list@1.0.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.0 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + sirv@3.0.0: dependencies: '@polka/url': 1.0.0-next.28 @@ -2609,6 +3660,10 @@ snapshots: dependencies: ansi-regex: 5.0.1 + strip-outer@1.0.1: + dependencies: + escape-string-regexp: 1.0.5 + supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -2634,6 +3689,10 @@ snapshots: totalist@3.0.1: {} + trim-repeated@1.0.0: + dependencies: + escape-string-regexp: 1.0.5 + ts-lit-plugin@2.0.2: dependencies: lit-analyzer: 2.0.3 @@ -2665,6 +3724,8 @@ snapshots: undici-types@6.20.0: optional: true + universalify@0.1.2: {} + unocss@65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)): dependencies: '@unocss/astro': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) @@ -2705,6 +3766,11 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + url@0.11.4: + dependencies: + punycode: 1.4.1 + qs: 6.14.0 + vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2): dependencies: esbuild: 0.24.2 @@ -2772,6 +3838,8 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + wrappy@1.0.2: {} + y18n@5.0.8: {} yallist@3.1.1: {} From 602a96a06ce41cfcedbe54b6976abf3fa2c60b9a Mon Sep 17 00:00:00 2001 From: Li Date: Sun, 22 Jun 2025 12:36:36 +0800 Subject: [PATCH 12/26] refactor: standardize code formatting and improve consistency across Live2D package --- packages/live2d/package.json | 78 +++++---- packages/live2d/postcss.config.mjs | 2 +- packages/live2d/src/Demo.tsx | 20 +-- packages/live2d/src/common/UnoLitElement.ts | 6 +- .../live2d/src/components/Live2dCanvas.tsx | 24 +-- .../live2d/src/components/Live2dContext.tsx | 24 +-- packages/live2d/src/components/Live2dTips.tsx | 148 +++++++++--------- .../live2d/src/components/Live2dToggle.tsx | 36 +++-- .../live2d/src/components/Live2dTools.tsx | 28 ++-- .../live2d/src/components/Live2dWidget.tsx | 28 ++-- packages/live2d/src/context/config-context.ts | 26 +-- packages/live2d/src/env.d.ts | 2 +- .../live2d/src/events/add-default-message.ts | 7 +- packages/live2d/src/events/before-init.ts | 8 +- packages/live2d/src/events/index.ts | 2 +- packages/live2d/src/events/send-message.ts | 5 +- packages/live2d/src/events/tip-events.ts | 100 +++++++----- packages/live2d/src/events/toggle-canvas.ts | 4 +- packages/live2d/src/events/types.ts | 2 +- .../live2d/src/helpers/dateWithinRange.ts | 4 +- packages/live2d/src/helpers/getPluginTips.ts | 10 +- .../live2d/src/helpers/loadTipsResource.ts | 45 +++--- packages/live2d/src/helpers/mergeTips.ts | 28 +++- packages/live2d/src/helpers/sendMessage.ts | 4 +- .../live2d/src/helpers/timeWithinRange.ts | 9 +- packages/live2d/src/index.ts | 10 +- packages/live2d/src/live2d/model.ts | 60 +++---- packages/live2d/src/live2d/tools/ai-chat.ts | 6 +- packages/live2d/src/live2d/tools/asteroids.ts | 8 +- .../live2d/src/live2d/tools/custom-tool.ts | 12 +- packages/live2d/src/live2d/tools/exit.ts | 12 +- packages/live2d/src/live2d/tools/hitokoto.ts | 16 +- packages/live2d/src/live2d/tools/index.ts | 20 +-- packages/live2d/src/live2d/tools/info.ts | 10 +- .../live2d/src/live2d/tools/screenshot.ts | 12 +- .../live2d/src/live2d/tools/switch-model.ts | 8 +- .../live2d/src/live2d/tools/switch-texture.ts | 6 +- packages/live2d/src/live2d/tools/tools.ts | 2 +- .../live2d/src/styles/unocss.global.css.d.ts | 4 +- packages/live2d/src/utils/distinctArray.ts | 4 +- packages/live2d/src/utils/isNotEmpty.ts | 16 +- packages/live2d/src/utils/isString.ts | 8 +- packages/live2d/src/utils/randomSelection.ts | 2 +- packages/live2d/src/utils/unoMixin.ts | 10 +- packages/live2d/src/utils/util.ts | 28 ++-- packages/live2d/tsconfig.json | 52 +++--- packages/live2d/uno.config.ts | 22 +-- packages/live2d/vite.config.ts | 22 +-- 48 files changed, 520 insertions(+), 480 deletions(-) diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 25b6a73..5ea11bf 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -1,42 +1,40 @@ { - "name": "live2d", - "private": true, - "version": "1.0.0", - "type": "module", - "files": [ - "dist" - ], - "main": "./dist/live2d.umd.cjs", - "module": "./dist/live2d.js", - "exports": { - ".": { - "import": "./dist/live2d.js", - "require": "./dist/live2d.umd.cjs" - } - }, - "scripts": { - "dev": "vite --open", - "build": "tsc -b && vite build", - "check": "biome check --write" - }, - "dependencies": { - "@lit/context": "^1.1.3", - "@lit/react": "^1.0.7", - "iconify-icon": "^2.3.0", - "lit": "^3.2.1", - "pixi-live2d-display": "^0.4.0", - "pixi.js": "^6.5.2", - "query-string": "^9.1.1", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "devDependencies": { - "@types/react": "^19.0.0", - "@types/react-dom": "^19.0.0", - "@unocss/postcss": "^65.4.3", - "@vitejs/plugin-react": "^4.3.4", - "ts-lit-plugin": "^2.0.2", - "unocss": "^65.4.3", - "vite": "^6.1.0" - } + "name": "live2d", + "private": true, + "version": "1.0.0", + "type": "module", + "files": ["dist"], + "main": "./dist/live2d.umd.cjs", + "module": "./dist/live2d.js", + "exports": { + ".": { + "import": "./dist/live2d.js", + "require": "./dist/live2d.umd.cjs" + } + }, + "scripts": { + "dev": "vite --open", + "build": "tsc -b && vite build", + "check": "biome check --write" + }, + "dependencies": { + "@lit/context": "^1.1.3", + "@lit/react": "^1.0.7", + "iconify-icon": "^2.3.0", + "lit": "^3.2.1", + "pixi-live2d-display": "^0.4.0", + "pixi.js": "^6.5.2", + "query-string": "^9.1.1", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@unocss/postcss": "^65.4.3", + "@vitejs/plugin-react": "^4.3.4", + "ts-lit-plugin": "^2.0.2", + "unocss": "^65.4.3", + "vite": "^6.1.0" + } } diff --git a/packages/live2d/postcss.config.mjs b/packages/live2d/postcss.config.mjs index e76c97a..b30e274 100644 --- a/packages/live2d/postcss.config.mjs +++ b/packages/live2d/postcss.config.mjs @@ -2,4 +2,4 @@ import UnoCSS from '@unocss/postcss'; export default { plugins: [UnoCSS()], -}; \ No newline at end of file +}; diff --git a/packages/live2d/src/Demo.tsx b/packages/live2d/src/Demo.tsx index 3ba19a6..e45a8b3 100644 --- a/packages/live2d/src/Demo.tsx +++ b/packages/live2d/src/Demo.tsx @@ -1,13 +1,13 @@ -import React from "react"; -import ReactDOM from "react-dom/client"; -import { Live2dContextComponent } from "./components/Live2dContext"; +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { Live2dContextComponent } from './components/Live2dContext'; -const rootEl = document.getElementById("root"); +const rootEl = document.getElementById('root'); if (rootEl) { - const root = ReactDOM.createRoot(rootEl); - root.render( - - - , - ); + const root = ReactDOM.createRoot(rootEl); + root.render( + + + , + ); } diff --git a/packages/live2d/src/common/UnoLitElement.ts b/packages/live2d/src/common/UnoLitElement.ts index af5257c..afb1175 100644 --- a/packages/live2d/src/common/UnoLitElement.ts +++ b/packages/live2d/src/common/UnoLitElement.ts @@ -1,4 +1,4 @@ -import { LitElement } from "lit"; -import { UNO } from "../utils/unoMixin"; +import { LitElement } from 'lit'; +import { UNO } from '../utils/unoMixin'; -export const UnoLitElement = UNO(LitElement) \ No newline at end of file +export const UnoLitElement = UNO(LitElement); diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 99ad580..3533788 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -1,12 +1,12 @@ -import { html, type PropertyValues, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; +import { consume } from "@lit/context"; import { createComponent } from "@lit/react"; -import React from "react"; +import { type PropertyValues, type TemplateResult, html } from "lit"; import { property, query, state } from "lit/decorators.js"; -import Model from "../live2d/model"; -import { consume } from "@lit/context"; -import { configContext, type Live2dConfig } from "../context/config-context"; +import React from "react"; +import { UnoLitElement } from "../common/UnoLitElement"; +import { type Live2dConfig, configContext } from "../context/config-context"; import { BeforeInitEvent } from "../events/before-init.js"; +import Model from "../live2d/model"; export class Live2dCanvas extends UnoLitElement { @consume({ context: configContext }) @@ -17,18 +17,10 @@ export class Live2dCanvas extends UnoLitElement { private _model: unknown; @query("#live2d") - private _live2d; + private _live2d: HTMLCanvasElement; render(): TemplateResult { - return html` - - - `; + return html` `; } connectedCallback(): void { diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index 9ddaaa3..403ae28 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -1,17 +1,17 @@ -import { html, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { createComponent } from "@lit/react"; -import React from "react"; -import "./Live2dWidget"; -import { provide } from "@lit/context"; -import { configContext, type Live2dConfig } from "../context/config-context"; -import "../events"; +import { createComponent } from '@lit/react'; +import { type TemplateResult, html } from 'lit'; +import React from 'react'; +import { UnoLitElement } from '../common/UnoLitElement'; +import './Live2dWidget'; +import { provide } from '@lit/context'; +import { type Live2dConfig, configContext } from '../context/config-context'; +import '../events'; export class Live2dContext extends UnoLitElement { @provide({ context: configContext }) config = { - apiPath: "https://live2d.fghrsh.net/api", - live2dLocation: "right", + apiPath: 'https://live2d.fghrsh.net/api', + live2dLocation: 'right', consoleShowStatus: false, isTools: true, } as Live2dConfig; @@ -21,10 +21,10 @@ export class Live2dContext extends UnoLitElement { } } -customElements.define("live2d-context", Live2dContext); +customElements.define('live2d-context', Live2dContext); export const Live2dContextComponent = createComponent({ - tagName: "live2d-context", + tagName: 'live2d-context', elementClass: Live2dContext, react: React, }); diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 552ad2f..65910bc 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -1,88 +1,94 @@ -import { html, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { createComponent } from "@lit/react"; -import React from "react"; -import { consume } from "@lit/context"; -import { configContext, type Live2dConfig } from "../context/config-context"; -import { property, state } from "lit/decorators.js"; -import { isNotEmpty } from "../utils/isNotEmpty"; -import { randomSelection } from "../utils/randomSelection"; -import { unsafeHTML } from "lit/directives/unsafe-html.js"; -import { classMap } from "lit/directives/class-map.js"; -import { SendMessageEvent } from "../events/send-message"; +import { consume } from '@lit/context'; +import { createComponent } from '@lit/react'; +import { type TemplateResult, html } from 'lit'; +import { property, state } from 'lit/decorators.js'; +import { classMap } from 'lit/directives/class-map.js'; +import { unsafeHTML } from 'lit/directives/unsafe-html.js'; +import React from 'react'; +import { UnoLitElement } from '../common/UnoLitElement'; +import { type Live2dConfig, configContext } from '../context/config-context'; +import type { SendMessageEvent } from '../events/send-message'; +import { isNotEmpty } from '../utils/isNotEmpty'; +import { randomSelection } from '../utils/randomSelection'; export class Live2dTips extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; - @state() - private _isShow = false; - @state() - private _message = ""; - private priority = -1; - private messageTimer: number | null = null; + @state() + private _isShow = false; + @state() + private _message = ''; + private priority = -1; + private messageTimer: number | null = null; - constructor() { - super(); - this._isShow = false; - this._message = ""; - } + constructor() { + super(); + this._isShow = false; + this._message = ''; + } - render(): TemplateResult { - const classes = { - "opacity-100": this._isShow, - "opacity-0": !this._isShow, - }; - return html` + render(): TemplateResult { + const classes = { + 'opacity-100': this._isShow, + 'opacity-0': !this._isShow, + }; + return html`
${unsafeHTML(this._message)}
`; - } - - connectedCallback(): void { - super.connectedCallback(); - // 为 tips 注册 tips 相关事件 - window.addEventListener("live2d:send-message", this.handleMessage.bind(this)); - } + } - disconnectedCallback(): void { - super.disconnectedCallback(); - window.removeEventListener("live2d:send-message", this.handleMessage.bind(this)); - } + connectedCallback(): void { + super.connectedCallback(); + // 为 tips 注册 tips 相关事件 + window.addEventListener( + 'live2d:send-message', + this.handleMessage.bind(this), + ); + } - handleMessage(e: SendMessageEvent): void { - const { text, timeout, priority } = e.detail; - if (!isNotEmpty(text)) { - return; - } - if (priority < this.priority) { - return; - } - if (this.messageTimer) { - clearTimeout(this.messageTimer); - this.messageTimer = null; - } - const message = randomSelection(text); - if (!isNotEmpty(message)) { - return; - } - this.priority = priority; - this._message = message; - this._isShow = true; - this.messageTimer = setTimeout(() => { - this._isShow = false; - this.priority = -1; - }, timeout); - } + disconnectedCallback(): void { + super.disconnectedCallback(); + window.removeEventListener( + 'live2d:send-message', + this.handleMessage.bind(this), + ); + } + + handleMessage(e: SendMessageEvent): void { + const { text, timeout, priority } = e.detail; + if (!isNotEmpty(text)) { + return; + } + if (priority < this.priority) { + return; + } + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + const message = randomSelection(text); + if (!isNotEmpty(message)) { + return; + } + this.priority = priority; + this._message = message; + this._isShow = true; + this.messageTimer = setTimeout(() => { + this._isShow = false; + this.priority = -1; + }, timeout); + } } -customElements.define("live2d-tips", Live2dTips); +customElements.define('live2d-tips', Live2dTips); export const Live2dTipsComponent = createComponent({ - tagName: "live2d-tips", - elementClass: Live2dTips, - react: React, + tagName: 'live2d-tips', + elementClass: Live2dTips, + react: React, }); diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 209faa0..4d93934 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -1,9 +1,9 @@ -import { html, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { createComponent } from "@lit/react"; -import React from "react"; -import { state } from "lit/decorators.js"; -import { ToggleCanvasEvent } from "../events/toggle-canvas"; +import { createComponent } from '@lit/react'; +import { type TemplateResult, html } from 'lit'; +import { state } from 'lit/decorators.js'; +import React from 'react'; +import { UnoLitElement } from '../common/UnoLitElement'; +import { ToggleCanvasEvent } from '../events/toggle-canvas'; export class Live2dToggle extends UnoLitElement { @state() @@ -12,10 +12,10 @@ export class Live2dToggle extends UnoLitElement { connectedCallback(): void { super.connectedCallback(); - this.addEventListener("click", this.handleClick); + this.addEventListener('click', this.handleClick); // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 - const live2dDisplay = localStorage.getItem("live2d-display"); + const live2dDisplay = localStorage.getItem('live2d-display'); if (live2dDisplay) { if (Date.now() - Number.parseInt(live2dDisplay) <= 24 * 60 * 60 * 1000) { this.triggerToggleLive2d(false); @@ -27,15 +27,17 @@ export class Live2dToggle extends UnoLitElement { disconnectedCallback(): void { super.disconnectedCallback(); - this.removeEventListener("click", this.handleClick); + this.removeEventListener('click', this.handleClick); } render(): TemplateResult { return html`
看板娘
`; @@ -49,22 +51,22 @@ export class Live2dToggle extends UnoLitElement { // 当前切换栏与 Live2d 的显示状态相反 this._isShow = !isShow; if (isShow) { - localStorage.removeItem("live2d-display"); + localStorage.removeItem('live2d-display'); } else { - localStorage.setItem("live2d-display", Date.now().toString()); + localStorage.setItem('live2d-display', Date.now().toString()); } this.dispatchEvent( new ToggleCanvasEvent({ isShow, - }) + }), ); } } -customElements.define("live2d-toggle", Live2dToggle); +customElements.define('live2d-toggle', Live2dToggle); export const Live2dToggleComponent = createComponent({ - tagName: "live2d-toggle", + tagName: 'live2d-toggle', elementClass: Live2dToggle, react: React, }); diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 7b80d3c..067db9f 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -1,14 +1,14 @@ -import { html, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { createComponent } from "@lit/react"; -import React from "react"; -import { consume } from "@lit/context"; -import { configContext, type Live2dConfig } from "../context/config-context"; -import { property, state } from "lit/decorators.js"; -import type { Tool } from "../live2d/tools/tools"; -import { CustomTool } from "../live2d/tools/custom-tool"; -import presetTools from "../live2d/tools"; -import "iconify-icon"; +import { consume } from '@lit/context'; +import { createComponent } from '@lit/react'; +import { type TemplateResult, html } from 'lit'; +import { property, state } from 'lit/decorators.js'; +import React from 'react'; +import { UnoLitElement } from '../common/UnoLitElement'; +import { type Live2dConfig, configContext } from '../context/config-context'; +import presetTools from '../live2d/tools'; +import { CustomTool } from '../live2d/tools/custom-tool'; +import type { Tool } from '../live2d/tools/tools'; +import 'iconify-icon'; export class Live2dTools extends UnoLitElement { @consume({ context: configContext }) @@ -49,7 +49,7 @@ export class Live2dTools extends UnoLitElement { const customTools = this.getCustomTools(); // 合并所有工具,并按照 priority 排序 const tools = [...presetTools, ...customTools].sort( - (a, b) => b.priority - a.priority + (a, b) => b.priority - a.priority, ); this._tools.push(...tools); } @@ -95,10 +95,10 @@ export class Live2dTools extends UnoLitElement { } } -customElements.define("live2d-tools", Live2dTools); +customElements.define('live2d-tools', Live2dTools); export const Live2dToolsComponent = createComponent({ - tagName: "live2d-tools", + tagName: 'live2d-tools', elementClass: Live2dTools, react: React, }); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 99a977b..461812e 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -1,15 +1,15 @@ -import { html, type TemplateResult } from "lit"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { createComponent } from "@lit/react"; -import React from "react"; -import { property, state } from "lit/decorators.js"; -import { consume } from "@lit/context"; -import { configContext, type Live2dConfig } from "../context/config-context"; -import "./Live2dToggle"; -import "./Live2dTips"; -import "./Live2dCanvas"; -import "./Live2dTools"; -import { ToggleCanvasEvent } from "../events/toggle-canvas"; +import { consume } from '@lit/context'; +import { createComponent } from '@lit/react'; +import { type TemplateResult, html } from 'lit'; +import { property, state } from 'lit/decorators.js'; +import React from 'react'; +import { UnoLitElement } from '../common/UnoLitElement'; +import { type Live2dConfig, configContext } from '../context/config-context'; +import './Live2dToggle'; +import './Live2dTips'; +import './Live2dCanvas'; +import './Live2dTools'; +import type { ToggleCanvasEvent } from '../events/toggle-canvas'; export class Live2dWidget extends UnoLitElement { @consume({ context: configContext }) @@ -53,10 +53,10 @@ export class Live2dWidget extends UnoLitElement { } } -customElements.define("live2d-widget", Live2dWidget); +customElements.define('live2d-widget', Live2dWidget); export const Live2dWidgetComponent = createComponent({ - tagName: "live2d-widget", + tagName: 'live2d-widget', elementClass: Live2dWidget, react: React, }); diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index c6cec15..b547493 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,7 +1,7 @@ import { createContext } from '@lit/context'; -import { CustomToolConfig } from 'live2d/tools/custom-tool'; +import type { CustomToolConfig } from 'live2d/tools/custom-tool'; -export interface ObjectAny extends Record { } +export interface ObjectAny extends Record {} export interface TipMouseover extends ObjectAny { selector: string; @@ -73,7 +73,7 @@ export interface Live2dConfig extends Live2dToolsConfig { // Live2d API 路径 apiPath: string; // Live2d 定位 - live2dLocation: "left" | "right"; + live2dLocation: 'left' | 'right'; // 是否在控制台显示状态 consoleShowStatus?: boolean; // 是否强制使用默认配置 @@ -87,13 +87,15 @@ export interface Live2dConfig extends Live2dToolsConfig { // 用户自定义的 tips 文件路径 tipsPath?: string; // 用户使用插件定义的 tips - selectorTips?: [{ - messageTexts?: { - message: string; - }[]; - selector: string; - mouseAction: "click" | "mouseover" | string | undefined; - }]; + selectorTips?: [ + { + messageTexts?: { + message: string; + }[]; + selector: string; + mouseAction: 'click' | 'mouseover' | string | undefined; + }, + ]; // 页面可见性变化时的 tips backSiteTip: string[] | string; // 复制内容时的 tips @@ -101,8 +103,8 @@ export interface Live2dConfig extends Live2dToolsConfig { // 控制台打印 tips openConsoleTip: string[] | string; // 首次打开站点是否显示 tips - firstOpenSite?: boolean + firstOpenSite?: boolean; [key: string]: unknown; } -export const configContext = createContext("config"); \ No newline at end of file +export const configContext = createContext('config'); diff --git a/packages/live2d/src/env.d.ts b/packages/live2d/src/env.d.ts index 09c0137..b0ac762 100644 --- a/packages/live2d/src/env.d.ts +++ b/packages/live2d/src/env.d.ts @@ -1 +1 @@ -/// \ No newline at end of file +/// diff --git a/packages/live2d/src/events/add-default-message.ts b/packages/live2d/src/events/add-default-message.ts index b00a15f..85ea866 100644 --- a/packages/live2d/src/events/add-default-message.ts +++ b/packages/live2d/src/events/add-default-message.ts @@ -1,6 +1,7 @@ -import { Live2dEvent } from "./types"; +import { Live2dEvent } from './types'; -export const ADD_DEFAULT_MESSAGE_EVENT_NAME = "live2d:add-default-message" as const; +export const ADD_DEFAULT_MESSAGE_EVENT_NAME = + 'live2d:add-default-message' as const; declare global { interface GlobalEventHandlersEventMap { @@ -20,4 +21,4 @@ export class AddDefaultMessageEvent extends Live2dEvent { +window.addEventListener('live2d:before-init', async (e) => { const config = e.detail.config; if (!config) { return; @@ -20,7 +32,7 @@ window.addEventListener("live2d:before-init", async (e) => { return; } _registerTipEventListener(config, tips); -}) +}); const _getWelComeMessage = (times: TipTime[]) => { if (hasWebsiteHome) { @@ -33,8 +45,10 @@ const _getWelComeMessage = (times: TipTime[]) => { const message = `欢迎阅读「${documentTitle}」`; const domain = getReferrerDomain(); - return domain ? `Hello!来自 ${domain} 的朋友
${message}` : message; -} + return domain + ? `Hello!来自 ${domain} 的朋友
${message}` + : message; +}; const _welcomeEvent = (times: TipTime[]) => { const message = _getWelComeMessage(times); @@ -42,7 +56,7 @@ const _welcomeEvent = (times: TipTime[]) => { return; } sendMessage(message, 7000, 4); -} +}; const _holidayEvent = (seasons: TipSeason[]) => { for (const { date, text } of seasons) { @@ -50,34 +64,34 @@ const _holidayEvent = (seasons: TipSeason[]) => { window.dispatchEvent(new AddDefaultMessageEvent({ message: text })); } } -} +}; const _userLeaveEvent = (message: TipMessage) => { const { visibilitychange } = message; - document.addEventListener("visibilitychange", () => { + document.addEventListener('visibilitychange', () => { if (!document.hidden) { sendMessage(visibilitychange, 6000, 2); } }); -} +}; const _userCopyEvent = (message: TipMessage) => { const { copy } = message; - window.addEventListener("copy", () => { + window.addEventListener('copy', () => { sendMessage(copy, 6000, 2); }); -} +}; const _userOpenConsoleEvent = (message: TipMessage) => { const { console } = message; - const devtools = () => { }; + const devtools = () => {}; devtools.toString = () => { sendMessage(console, 6000, 2); }; -} +}; const _userClickEvent = (clicks: TipClick[]) => { - window.addEventListener("click", (event) => { + window.addEventListener('click', (event) => { const path = event.composedPath(); const target = path[0]; if (!(target instanceof HTMLElement)) { @@ -91,15 +105,15 @@ const _userClickEvent = (clicks: TipClick[]) => { if (!message) { continue; } - message = message.replace("{text}", target.innerText); + message = message.replace('{text}', target.innerText); sendMessage(message, 4000, 1); return; } }); -} +}; const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { - window.addEventListener("mouseover", (event: MouseEvent) => { + window.addEventListener('mouseover', (event: MouseEvent) => { const path = event.composedPath(); const target = path[0]; if (!(target instanceof HTMLElement)) { @@ -113,12 +127,12 @@ const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { if (!message) { continue; } - message = message.replace("{text}", target.innerText); + message = message.replace('{text}', target.innerText); sendMessage(message, 4000, 1); return; } }); -} +}; /** * 监听用户是否处于活动状态,如果用户长时间不活动,则向 Live2d 发送消息 @@ -127,22 +141,24 @@ const _userActionEvent = (message: TipMessage) => { let userAction = false; let userActionTimer: number | undefined; const defaultMessage = message.default; - const idleMessage: string[] = isString(defaultMessage) ? [defaultMessage] : (defaultMessage || []); + const idleMessage: string[] = isString(defaultMessage) + ? [defaultMessage] + : defaultMessage || []; - window.addEventListener("mousemove", () => { + window.addEventListener('mousemove', () => { userAction = true; }); - window.addEventListener("keydown", () => { + window.addEventListener('keydown', () => { userAction = true; }); - window.addEventListener("live2d:add-default-message", (ev) => { + window.addEventListener('live2d:add-default-message', (ev) => { const message = ev.detail.message; if (Array.isArray(message)) { idleMessage.push(...message); } else { idleMessage.push(message); } - }) + }); setInterval(() => { if (userAction) { userAction = false; @@ -157,12 +173,12 @@ const _userActionEvent = (message: TipMessage) => { sendMessage(message.default, 6000, 2); }, 20000); }, 1000); -} +}; const _registerTipEventListener = (config: Live2dConfig, tips: TipConfig) => { // 首次进入页面时 if (config.firstOpenSite) { - _welcomeEvent(tips.time) + _welcomeEvent(tips.time); } // 节日事件 _holidayEvent(tips.seasons); @@ -178,7 +194,7 @@ const _registerTipEventListener = (config: Live2dConfig, tips: TipConfig) => { _userCopyEvent(tips.message); // 用户离开页面事件 _userLeaveEvent(tips.message); -} +}; const _loadTips = async (config: Live2dConfig) => { if (!config) { @@ -202,9 +218,11 @@ const _loadTips = async (config: Live2dConfig) => { themeTips, fullOrDefaultTips, }); -} +}; -export const _getFullOrDefaultTips = async (config: Live2dConfig): Promise => { +export const _getFullOrDefaultTips = async ( + config: Live2dConfig, +): Promise => { // 获取插件文件中的全量 tips 文件 if (isNotEmptyString(config?.tipsPath)) { const tipsResult = await loadTipsResource(config.tipsPath); @@ -213,5 +231,5 @@ export const _getFullOrDefaultTips = async (config: Live2dConfig): Promise extends CustomEvent { constructor(type: string, detail: T, options?: EventInit) { super(type, { detail, ...options }); } -} \ No newline at end of file +} diff --git a/packages/live2d/src/helpers/dateWithinRange.ts b/packages/live2d/src/helpers/dateWithinRange.ts index cd86302..d071f54 100644 --- a/packages/live2d/src/helpers/dateWithinRange.ts +++ b/packages/live2d/src/helpers/dateWithinRange.ts @@ -3,7 +3,7 @@ const DATE_SEPARATOR = '/'; /** * 检查指定的日期是否在当前日期范围内。 - * + * * @param date 指定的日期格式为 `MM/DD` 或 `MM/DD-MM/DD`。 * @returns 如果日期在当前范围内则返回 true, 否则返回 false。 */ @@ -23,4 +23,4 @@ export const dataWithinRange = (date: string): boolean => { startDay <= currentDate && currentDate <= endDay ); -} +}; diff --git a/packages/live2d/src/helpers/getPluginTips.ts b/packages/live2d/src/helpers/getPluginTips.ts index ae7e8a8..465e54c 100644 --- a/packages/live2d/src/helpers/getPluginTips.ts +++ b/packages/live2d/src/helpers/getPluginTips.ts @@ -1,9 +1,9 @@ -import type { Live2dConfig, TipConfig } from "../context/config-context"; -import { isNotEmpty } from "../utils/isNotEmpty"; +import type { Live2dConfig, TipConfig } from '../context/config-context'; +import { isNotEmpty } from '../utils/isNotEmpty'; /** * 整合插件配置中的 tips 元素。 - * + * * 插件配置中的元素如下所示: * "selectorTips" : [ { * "mouseAction" : "mouseover", @@ -36,7 +36,7 @@ export const getPluginTips = (config: Live2dConfig): TipConfig => { selector: item.selector, text: texts, }; - if (item.mouseAction === "click") { + if (item.mouseAction === 'click') { tips.click?.push(obj); } else { tips.mouseover?.push(obj); @@ -54,4 +54,4 @@ export const getPluginTips = (config: Live2dConfig): TipConfig => { tips.message.console = config.openConsoleTip; } return tips; -} \ No newline at end of file +}; diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts index 893d151..ce32508 100644 --- a/packages/live2d/src/helpers/loadTipsResource.ts +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -2,9 +2,9 @@ import type { TipConfig } from '../context/config-context'; /** * 远程加载提示资源 - * - * @param url - * @returns + * + * @param url + * @returns */ export function loadTipsResource(url?: string) { const defaultObj: TipConfig = { @@ -14,23 +14,22 @@ export function loadTipsResource(url?: string) { message: {}, time: [], }; - return new Promise((resolve) => { - if (!url) { - resolve(defaultObj); - return; - } - try { - fetch(url) - .then((response) => response.json()) - .then((result) => { - resolve(result); - }) - .catch(() => { - resolve(defaultObj); - }); - } catch (e) { - // ignore - } - }); -}; \ No newline at end of file + return new Promise((resolve) => { + if (!url) { + resolve(defaultObj); + return; + } + try { + fetch(url) + .then((response) => response.json()) + .then((result) => { + resolve(result); + }) + .catch(() => { + resolve(defaultObj); + }); + } catch (e) { + // ignore + } + }); +} diff --git a/packages/live2d/src/helpers/mergeTips.ts b/packages/live2d/src/helpers/mergeTips.ts index f31507e..20d86f7 100644 --- a/packages/live2d/src/helpers/mergeTips.ts +++ b/packages/live2d/src/helpers/mergeTips.ts @@ -1,5 +1,5 @@ -import type { TipConfig } from "../context/config-context"; -import { distinctArray } from "../utils/distinctArray"; +import type { TipConfig } from '../context/config-context'; +import { distinctArray } from '../utils/distinctArray'; /** * 合并各个渠道的 tips,根据获取位置不同,合并时优先级也不同。优先级按高到低的顺序为 @@ -16,16 +16,28 @@ import { distinctArray } from "../utils/distinctArray"; * @param themeTips 主题提供的 tips * @param defaultTips 配置/默认的 tips */ -export const mergeTips = ({ pluginTips, themeTips, fullOrDefaultTips }: { +export const mergeTips = ({ + pluginTips, + themeTips, + fullOrDefaultTips, +}: { pluginTips: TipConfig; themeTips: TipConfig; fullOrDefaultTips: TipConfig; }) => { const defaultTips = { ...fullOrDefaultTips }; - const duplicateClick = [...pluginTips.click, ...themeTips.click, ...fullOrDefaultTips.click]; - const duplicateMouseover = [...pluginTips.mouseover, ...themeTips.mouseover, ...fullOrDefaultTips.mouseover]; - defaultTips.click = distinctArray(duplicateClick, "selector"); - defaultTips.mouseover = distinctArray(duplicateMouseover, "selector"); + const duplicateClick = [ + ...pluginTips.click, + ...themeTips.click, + ...fullOrDefaultTips.click, + ]; + const duplicateMouseover = [ + ...pluginTips.mouseover, + ...themeTips.mouseover, + ...fullOrDefaultTips.mouseover, + ]; + defaultTips.click = distinctArray(duplicateClick, 'selector'); + defaultTips.mouseover = distinctArray(duplicateMouseover, 'selector'); defaultTips.message = { ...defaultTips.message, ...pluginTips.message }; return defaultTips; -}; \ No newline at end of file +}; diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index edc36b2..c8214ce 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -1,4 +1,4 @@ -import { SendMessageEvent } from "../events/send-message"; +import { SendMessageEvent } from '../events/send-message'; /** * 向 Live2D 发送消息事件 @@ -9,7 +9,7 @@ import { SendMessageEvent } from "../events/send-message"; export function sendMessage( text: string | string[] | undefined, timeout = 3000, - priority = 0 + priority = 0, ) { if (!text) { return; diff --git a/packages/live2d/src/helpers/timeWithinRange.ts b/packages/live2d/src/helpers/timeWithinRange.ts index d329dcc..e34fee3 100644 --- a/packages/live2d/src/helpers/timeWithinRange.ts +++ b/packages/live2d/src/helpers/timeWithinRange.ts @@ -1,8 +1,8 @@ -const SEPARATOR = "-"; +const SEPARATOR = '-'; /** * 判断当前是否在指定时间范围内。 - * + * * @param hour 指定的时间范围格式为 `HH-HH`。 * @returns 如果当前时间在指定范围内则返回 true, 否则返回 false。 */ @@ -12,13 +12,12 @@ export const timeWithinRange = (hour: string): boolean => { const after = Number.parseInt(spiltTime[0]); const before = Number.parseInt(spiltTime[1]) || after; - if (after < 0 || before > 23 || after > before) { - throw new Error("时间范围不正确"); + throw new Error('时间范围不正确'); } if (after <= now.getHours() && now.getHours() <= before) { return true; } return false; -} \ No newline at end of file +}; diff --git a/packages/live2d/src/index.ts b/packages/live2d/src/index.ts index 615b6eb..37dd2ca 100644 --- a/packages/live2d/src/index.ts +++ b/packages/live2d/src/index.ts @@ -1,9 +1,5 @@ -import { Live2dToggle } from "./components/Live2dToggle" -import { Live2dWidget } from "./components/Live2dWidget" import { Live2dContext } from './components/Live2dContext'; +import { Live2dToggle } from './components/Live2dToggle'; +import { Live2dWidget } from './components/Live2dWidget'; -export { - Live2dToggle, - Live2dWidget, - Live2dContext, -} \ No newline at end of file +export { Live2dToggle, Live2dWidget, Live2dContext }; diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index 565732c..9e9371b 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -1,10 +1,10 @@ -import * as PIXI from "pixi.js"; -import type { Live2dConfig } from "../context/config-context"; -import { sendMessage } from "../helpers/sendMessage"; -import { isNotEmptyString } from "../utils/isString"; -import "../libs/live2d.min.js"; -import "../libs/live2dcubismcore.min.js"; -import { Live2DModel } from "pixi-live2d-display"; +import * as PIXI from 'pixi.js'; +import type { Live2dConfig } from '../context/config-context'; +import { sendMessage } from '../helpers/sendMessage'; +import { isNotEmptyString } from '../utils/isString'; +import '../libs/live2d.min.js'; +import '../libs/live2dcubismcore.min.js'; +import { Live2DModel } from 'pixi-live2d-display'; window.PIXI = PIXI; @@ -30,25 +30,26 @@ class Model { constructor(root: HTMLCanvasElement, config: Live2dConfig) { const apiPath = config.apiPath; if (!isNotEmptyString(apiPath)) { - throw new Error("Invalid initWidget argument!"); + throw new Error('Invalid initWidget argument!'); } - this.#apiPath = apiPath.endsWith("/") ? apiPath : `${apiPath}/`; + this.#apiPath = apiPath.endsWith('/') ? apiPath : `${apiPath}/`; this.#config = config; this.#live2dRootElement = root; this.#app = new PIXI.Application({ view: this.#live2dRootElement, autoStart: true, - resizeTo: window, - // 透明背景 + height: 300, + width: 300, backgroundColor: 0x00000000, + backgroundAlpha: 0, }); this._loadingModel(); } private _loadingModel() { - let modelId = localStorage.getItem("modelId"); - let modelTexturesId = localStorage.getItem("modelTexturesId"); + let modelId = localStorage.getItem('modelId'); + let modelTexturesId = localStorage.getItem('modelTexturesId'); if (modelId === null || !!this.#config.isForceUseDefaultConfig) { // 加载指定模型的指定材质 modelId = String(this.#config.modelId || 1); // 模型 ID @@ -57,7 +58,7 @@ class Model { this.loadModel( Number(modelId), Number(modelTexturesId), - "Live2D 模型加载中..." + 'Live2D 模型加载中...', ); } @@ -69,52 +70,55 @@ class Model { * @param text 加载时的消息 */ async loadModel(modelId: number, modelTexturesId: number, text?: string) { - localStorage.setItem("modelId", String(modelId)); - localStorage.setItem("modelTexturesId", String(modelTexturesId)); + localStorage.setItem('modelId', String(modelId)); + localStorage.setItem('modelTexturesId', String(modelTexturesId)); // 发送消息事件 if (text) { sendMessage(text, 4000, 3); } const model = await Live2DModel.from( - "https://cdn.jsdelivr.net/gh/guansss/pixi-live2d-display/test/assets/haru/haru_greeter_t03.model3.json", + 'https://live2d.fghrsh.net/api/get/?id=1-53', { onLoad: () => { console.log( - `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成` + `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`, ); }, - } + }, ); - this.#app.stage.addChild(model); - model.scale.set(0.25); + const scaleX = this.#app.view.height / model.width; + const scaleY = this.#app.view.height / model.height; + + model.scale.set(scaleX, scaleY); + this.#app.stage.addChild(model); } /** * 随机切换模型贴图 */ async loadRandTextures() { - const modelId = Number(localStorage.getItem("modelId")); - const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); + const modelId = Number(localStorage.getItem('modelId')); + const modelTexturesId = Number(localStorage.getItem('modelTexturesId')); // 可选 "rand"(随机), "switch"(顺序) const result = (await fetch( - `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}` + `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`, ).then((response) => response.json())) as ModelTexturesResult; const texturesId = result.textures.id; if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { - sendMessage("我还没有其他衣服呢!", 4000, 3); + sendMessage('我还没有其他衣服呢!', 4000, 3); return; } - this.loadModel(modelId, texturesId, "我的新衣服好看嘛?"); + this.loadModel(modelId, texturesId, '我的新衣服好看嘛?'); } /** * 切换模型 */ async loadOtherModel() { - const modelId = Number(localStorage.getItem("modelId")); + const modelId = Number(localStorage.getItem('modelId')); const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( - (response) => response.json() + (response) => response.json(), )) as ModelResult; this.loadModel(result.model.id, 0, result.model.message); } diff --git a/packages/live2d/src/live2d/tools/ai-chat.ts b/packages/live2d/src/live2d/tools/ai-chat.ts index c7c3090..d05dc49 100644 --- a/packages/live2d/src/live2d/tools/ai-chat.ts +++ b/packages/live2d/src/live2d/tools/ai-chat.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * AI 聊天工具 @@ -9,7 +9,7 @@ export class AIChatTool extends Tool { icon() { const icon = this.getConfig().aiChatUrl; - return isNotEmptyString(icon) ? icon : "ph-chats-circle-fill"; + return isNotEmptyString(icon) ? icon : 'ph-chats-circle-fill'; } execute() { diff --git a/packages/live2d/src/live2d/tools/asteroids.ts b/packages/live2d/src/live2d/tools/asteroids.ts index 561150b..10dc0a1 100644 --- a/packages/live2d/src/live2d/tools/asteroids.ts +++ b/packages/live2d/src/live2d/tools/asteroids.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; declare global { interface Window { @@ -14,12 +14,12 @@ export class AsteroidsTool extends Tool { priority = 80; icon() { const icon = this.getConfig().asteroidsIcon; - return isNotEmptyString(icon) ? icon : "ph-paper-plane-tilt-fill"; + return isNotEmptyString(icon) ? icon : 'ph-paper-plane-tilt-fill'; } execute() { // @ts-ignore - import("../../libs/asteroids.min.js").then((module) => { + import('../../libs/asteroids.min.js').then((module) => { new module.default(); }); } diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index 94591ff..e430d5b 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -1,6 +1,6 @@ -import type { Live2dConfig } from "../../context/config-context"; -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import type { Live2dConfig } from '../../context/config-context'; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; export type CustomToolConfig = { name: string; @@ -20,7 +20,7 @@ export class CustomTool extends Tool { constructor( config: Live2dConfig, - { name, icon, execute, priority }: CustomToolConfig + { name, icon, execute, priority }: CustomToolConfig, ) { super(config); this._name = name; @@ -35,11 +35,11 @@ export class CustomTool extends Tool { icon() { const icon = this._icon; - return isNotEmptyString(icon) ? icon : "ph-question-fill"; + return isNotEmptyString(icon) ? icon : 'ph-question-fill'; } execute() { - if (typeof this._execute === "string") { + if (typeof this._execute === 'string') { const customClass = new Function(` return class { ${this._execute} diff --git a/packages/live2d/src/live2d/tools/exit.ts b/packages/live2d/src/live2d/tools/exit.ts index 1c26186..28aa442 100644 --- a/packages/live2d/src/live2d/tools/exit.ts +++ b/packages/live2d/src/live2d/tools/exit.ts @@ -1,7 +1,7 @@ -import { sendMessage } from "../../helpers/sendMessage"; -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; -import { ToggleCanvasEvent } from "../../events/toggle-canvas"; +import { ToggleCanvasEvent } from '../../events/toggle-canvas'; +import { sendMessage } from '../../helpers/sendMessage'; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * 退出 Live2d 工具 @@ -11,11 +11,11 @@ export class ExitTool extends Tool { icon() { const icon = this.getConfig().exitIcon; - return isNotEmptyString(icon) ? icon : "ph-x-bold"; + return isNotEmptyString(icon) ? icon : 'ph-x-bold'; } execute() { - sendMessage("愿你有一天能与重要的人重逢。", 2000, 4); + sendMessage('愿你有一天能与重要的人重逢。', 2000, 4); setTimeout(() => { // 触发退出 Live2d 事件 window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); diff --git a/packages/live2d/src/live2d/tools/hitokoto.ts b/packages/live2d/src/live2d/tools/hitokoto.ts index c9dc296..80c9a61 100644 --- a/packages/live2d/src/live2d/tools/hitokoto.ts +++ b/packages/live2d/src/live2d/tools/hitokoto.ts @@ -1,7 +1,7 @@ -import queryString from "query-string"; -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; -import { sendMessage } from "../../helpers/sendMessage"; +import queryString from 'query-string'; +import { sendMessage } from '../../helpers/sendMessage'; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * 一言工具,使用一言接口获取一句话 @@ -12,11 +12,11 @@ import { sendMessage } from "../../helpers/sendMessage"; export class HitokotoTool extends Tool { priority = 90; - _default_api = "https://v1.hitokoto.cn"; + _default_api = 'https://v1.hitokoto.cn'; icon() { const icon = this.getConfig().aiChatUrl; - return isNotEmptyString(icon) ? icon : "ph-chat-circle-fill"; + return isNotEmptyString(icon) ? icon : 'ph-chat-circle-fill'; } async execute() { @@ -34,12 +34,12 @@ export class HitokotoTool extends Tool { > { const unverifiedApi = this.getConfig().hitokotoApi || this._default_api; const parsedApi = queryString.parseUrl(unverifiedApi); - const newParams = { ...parsedApi.query, encode: "json", charset: "utf-8" }; + const newParams = { ...parsedApi.query, encode: 'json', charset: 'utf-8' }; const hitokotoApi = `${parsedApi.url}?${queryString.stringify(newParams)}`; const { hitokoto, from, creator } = await this._fetchHitokoto(hitokotoApi); if (isNotEmptyString(hitokoto)) { return { - hitokoto: "hitokoto", + hitokoto: 'hitokoto', description: `这句一言来自 「${from}」,是 ${creator} 在 hitokoto.cn 投稿的。`, }; } diff --git a/packages/live2d/src/live2d/tools/index.ts b/packages/live2d/src/live2d/tools/index.ts index 32ba4a3..880d148 100644 --- a/packages/live2d/src/live2d/tools/index.ts +++ b/packages/live2d/src/live2d/tools/index.ts @@ -1,13 +1,13 @@ -import type { Live2dConfig } from "../../context/config-context"; -import { AIChatTool } from "./ai-chat"; -import { AsteroidsTool } from "./asteroids"; -import { ExitTool } from "./exit"; -import { HitokotoTool } from "./hitokoto"; -import { InfoTool } from "./info"; -import { ScreenshotTool } from "./screenshot"; -import { SwitchModelTool } from "./switch-model"; -import { SwitchTextureTool } from "./switch-texture"; -import type { Tool } from "./tools"; +import type { Live2dConfig } from '../../context/config-context'; +import { AIChatTool } from './ai-chat'; +import { AsteroidsTool } from './asteroids'; +import { ExitTool } from './exit'; +import { HitokotoTool } from './hitokoto'; +import { InfoTool } from './info'; +import { ScreenshotTool } from './screenshot'; +import { SwitchModelTool } from './switch-model'; +import { SwitchTextureTool } from './switch-texture'; +import type { Tool } from './tools'; export type ToolConstructor = new (config: Live2dConfig) => Tool; diff --git a/packages/live2d/src/live2d/tools/info.ts b/packages/live2d/src/live2d/tools/info.ts index 6ea0a9e..2672daa 100644 --- a/packages/live2d/src/live2d/tools/info.ts +++ b/packages/live2d/src/live2d/tools/info.ts @@ -1,20 +1,20 @@ -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * 前往站点工具 */ export class InfoTool extends Tool { priority = 40; - + icon() { const icon = this.getConfig().infoIcon; - return isNotEmptyString(icon) ? icon : "ph-info-fill"; + return isNotEmptyString(icon) ? icon : 'ph-info-fill'; } execute() { const siteUrl = - this.getConfig().infoSite || "https://github.com/LIlGG/plugin-live2d"; + this.getConfig().infoSite || 'https://github.com/LIlGG/plugin-live2d'; window.open(siteUrl); } } diff --git a/packages/live2d/src/live2d/tools/screenshot.ts b/packages/live2d/src/live2d/tools/screenshot.ts index f8174b6..b9af1a9 100644 --- a/packages/live2d/src/live2d/tools/screenshot.ts +++ b/packages/live2d/src/live2d/tools/screenshot.ts @@ -1,6 +1,6 @@ -import { sendMessage } from "../../helpers/sendMessage"; -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { sendMessage } from '../../helpers/sendMessage'; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; declare const Live2D: { captureName: string; @@ -15,12 +15,12 @@ export class ScreenshotTool extends Tool { icon() { const icon = this.getConfig().screenshotIcon; - return isNotEmptyString(icon) ? icon : "ph-camera-fill"; + return isNotEmptyString(icon) ? icon : 'ph-camera-fill'; } execute() { - sendMessage("照好了嘛,是不是很可爱呢?", 6000, 2); - const screenshotName = this.getConfig().screenshotName || "live2d"; + sendMessage('照好了嘛,是不是很可爱呢?', 6000, 2); + const screenshotName = this.getConfig().screenshotName || 'live2d'; Live2D.captureName = `${screenshotName}.png`; Live2D.captureFrame = true; } diff --git a/packages/live2d/src/live2d/tools/switch-model.ts b/packages/live2d/src/live2d/tools/switch-model.ts index 23fdabe..7e3d263 100644 --- a/packages/live2d/src/live2d/tools/switch-model.ts +++ b/packages/live2d/src/live2d/tools/switch-model.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * 切换模型工具 @@ -9,10 +9,10 @@ export class SwitchModelTool extends Tool { icon() { const icon = this.getConfig().switchModelIcon; - return isNotEmptyString(icon) ? icon : "ph-dress-fill"; + return isNotEmptyString(icon) ? icon : 'ph-dress-fill'; } execute() { - console.log("Model switch event emitted."); + console.log('Model switch event emitted.'); } } diff --git a/packages/live2d/src/live2d/tools/switch-texture.ts b/packages/live2d/src/live2d/tools/switch-texture.ts index 05cc176..c4e2373 100644 --- a/packages/live2d/src/live2d/tools/switch-texture.ts +++ b/packages/live2d/src/live2d/tools/switch-texture.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from "../../utils/isString"; -import { Tool } from "./tools"; +import { isNotEmptyString } from '../../utils/isString'; +import { Tool } from './tools'; /** * 切换纹理工具 @@ -9,7 +9,7 @@ export class SwitchTextureTool extends Tool { icon() { const icon = this.getConfig().switchTextureIcon; - return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; + return isNotEmptyString(icon) ? icon : 'ph-arrows-counter-clockwise-fill'; } execute() { diff --git a/packages/live2d/src/live2d/tools/tools.ts b/packages/live2d/src/live2d/tools/tools.ts index 89ba292..eb09c05 100644 --- a/packages/live2d/src/live2d/tools/tools.ts +++ b/packages/live2d/src/live2d/tools/tools.ts @@ -1,4 +1,4 @@ -import type { Live2dConfig } from "../../context/config-context"; +import type { Live2dConfig } from '../../context/config-context'; export abstract class Tool { private _config: Live2dConfig; diff --git a/packages/live2d/src/styles/unocss.global.css.d.ts b/packages/live2d/src/styles/unocss.global.css.d.ts index 46fd886..43a2d29 100644 --- a/packages/live2d/src/styles/unocss.global.css.d.ts +++ b/packages/live2d/src/styles/unocss.global.css.d.ts @@ -1,2 +1,2 @@ -declare let style: string -export default style \ No newline at end of file +declare let style: string; +export default style; diff --git a/packages/live2d/src/utils/distinctArray.ts b/packages/live2d/src/utils/distinctArray.ts index 4edeb81..43ecf70 100644 --- a/packages/live2d/src/utils/distinctArray.ts +++ b/packages/live2d/src/utils/distinctArray.ts @@ -1,4 +1,4 @@ -import type { ObjectAny } from "../context/config-context"; +import type { ObjectAny } from '../context/config-context'; export const distinctArray = (arr: T[], key: keyof T) => { const map = new Map(); @@ -6,4 +6,4 @@ export const distinctArray = (arr: T[], key: keyof T) => { map.set(item[key], item); } return [...map.values()]; -} \ No newline at end of file +}; diff --git a/packages/live2d/src/utils/isNotEmpty.ts b/packages/live2d/src/utils/isNotEmpty.ts index 85d492f..84c4423 100644 --- a/packages/live2d/src/utils/isNotEmpty.ts +++ b/packages/live2d/src/utils/isNotEmpty.ts @@ -1,5 +1,13 @@ -export const isNotEmpty = (value: T[] | T | null | undefined): value is T[] | T => { - return value !== null && value !== undefined && (Array.isArray(value) ? value.length > 0 : - typeof value === 'string' ? value.trim() !== '' : true +export const isNotEmpty = ( + value: T[] | T | null | undefined, +): value is T[] | T => { + return ( + value !== null && + value !== undefined && + (Array.isArray(value) + ? value.length > 0 + : typeof value === 'string' + ? value.trim() !== '' + : true) ); -} \ No newline at end of file +}; diff --git a/packages/live2d/src/utils/isString.ts b/packages/live2d/src/utils/isString.ts index b6f7de8..1d39762 100644 --- a/packages/live2d/src/utils/isString.ts +++ b/packages/live2d/src/utils/isString.ts @@ -1,7 +1,7 @@ export const isString = (value: unknown): value is string => { - return typeof value === "string"; -} + return typeof value === 'string'; +}; export const isNotEmptyString = (value: unknown): value is string => { - return typeof value === "string" && value.length > 0; -}; \ No newline at end of file + return typeof value === 'string' && value.length > 0; +}; diff --git a/packages/live2d/src/utils/randomSelection.ts b/packages/live2d/src/utils/randomSelection.ts index 80d678b..76e5b84 100644 --- a/packages/live2d/src/utils/randomSelection.ts +++ b/packages/live2d/src/utils/randomSelection.ts @@ -6,4 +6,4 @@ export const randomSelection = (obj: T | T[]): T | undefined => { return obj[Math.floor(Math.random() * obj.length)]; } return obj; -}; \ No newline at end of file +}; diff --git a/packages/live2d/src/utils/unoMixin.ts b/packages/live2d/src/utils/unoMixin.ts index 1cbedf7..c4a0ac0 100644 --- a/packages/live2d/src/utils/unoMixin.ts +++ b/packages/live2d/src/utils/unoMixin.ts @@ -1,20 +1,20 @@ -import { adoptStyles, type LitElement, unsafeCSS } from 'lit' +import { type LitElement, adoptStyles, unsafeCSS } from 'lit'; // @ts-ignore -import style from "../styles/unocss.global.css?inline" +import style from '../styles/unocss.global.css?inline'; declare global { // biome-ignore lint/suspicious/noExplicitAny: any is needed to define a mixin export type LitMixin = new (...args: any[]) => T & LitElement; } -const stylesheet = unsafeCSS(style) +const stylesheet = unsafeCSS(style); export const UNO = (superClass: T): T => class extends superClass { connectedCallback() { super.connectedCallback(); if (this.shadowRoot) { - adoptStyles(this.shadowRoot, [stylesheet]) + adoptStyles(this.shadowRoot, [stylesheet]); } } - }; \ No newline at end of file + }; diff --git a/packages/live2d/src/utils/util.ts b/packages/live2d/src/utils/util.ts index 9fa44eb..19a17da 100644 --- a/packages/live2d/src/utils/util.ts +++ b/packages/live2d/src/utils/util.ts @@ -1,26 +1,26 @@ -export const hasWebsiteHome = location.hostname === "/"; +export const hasWebsiteHome = location.hostname === '/'; -export const documentTitle = document.title.split(" - ")[0]; +export const documentTitle = document.title.split(' - ')[0]; -export const isReferrer = document.referrer === ""; +export const isReferrer = document.referrer === ''; export const getReferrer = () => { if (isReferrer) { return; } return new URL(document.referrer); -} +}; export const getReferrerDomain = () => { const Domains: Record = { - baidu: "百度", - so: "360搜索", - google: "谷歌搜索", - bing: "必应", - yahoo: "雅虎", - sogou: "搜狗", - haosou: "好搜", - } + baidu: '百度', + so: '360搜索', + google: '谷歌搜索', + bing: '必应', + yahoo: '雅虎', + sogou: '搜狗', + haosou: '好搜', + }; const referrer = getReferrer(); if (!referrer) { return; @@ -29,9 +29,9 @@ export const getReferrerDomain = () => { if (location.hostname === hostname) { return; } - const domain = hostname.split(".")[1]; + const domain = hostname.split('.')[1]; if (Domains[domain]) { return Domains[domain]; } return hostname; -} \ No newline at end of file +}; diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 188fc7e..8725c11 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -1,32 +1,32 @@ { - "compilerOptions": { - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "jsx": "react-jsx", - "target": "ES2020", - "noEmit": true, - "skipLibCheck": true, + "compilerOptions": { + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", + "target": "ES2020", + "noEmit": true, + "skipLibCheck": true, - /* modules */ - "module": "ESNext", - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, + /* modules */ + "module": "ESNext", + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, - "experimentalDecorators": true, - "useDefineForClassFields": false, - "plugins": [ - { - "name": "ts-lit-plugin" - } - ] - }, - "include": ["src/**/*"], + "experimentalDecorators": true, + "useDefineForClassFields": false, + "plugins": [ + { + "name": "ts-lit-plugin" + } + ] + }, + "include": ["src/**/*"], "exclude": ["node_modules", "dist", "src/libs/**/*"] } diff --git a/packages/live2d/uno.config.ts b/packages/live2d/uno.config.ts index 89d51ec..9c4dedf 100644 --- a/packages/live2d/uno.config.ts +++ b/packages/live2d/uno.config.ts @@ -7,9 +7,12 @@ export default defineConfig({ presets: [presetUno()], transformers: [transformerDirectives()], rules: [ - ['writing-vertical-rl', { - "writing-mode": "vertical-rl" - }] + [ + 'writing-vertical-rl', + { + 'writing-mode': 'vertical-rl', + }, + ], ], theme: { backgroundColor: { @@ -19,14 +22,15 @@ export default defineConfig({ tips: 'rgba(224, 186, 140, .62)', }, boxShadow: { - tips: '0 3px 15px 2px rgba(191, 158, 118, .2)' + tips: '0 3px 15px 2px rgba(191, 158, 118, .2)', }, animation: { keyframes: { - shake: '{2%{transform:translate(.5px,-1.5px) rotate(-.5deg);}4%{transform:translate(.5px,1.5px) rotate(1.5deg);}6%{transform:translate(1.5px,1.5px) rotate(1.5deg);}8%{transform:translate(2.5px,1.5px) rotate(.5deg);}10%{transform:translate(.5px,2.5px) rotate(.5deg);}12%{transform:translate(1.5px,1.5px) rotate(.5deg);}14%{transform:translate(.5px,.5px) rotate(.5deg);}16%{transform:translate(-1.5px,-.5px) rotate(1.5deg);}18%{transform:translate(.5px,.5px) rotate(1.5deg);}20%{transform:translate(2.5px,2.5px) rotate(1.5deg);}22%{transform:translate(.5px,-1.5px) rotate(1.5deg);}24%{transform:translate(-1.5px,1.5px) rotate(-.5deg);}26%{transform:translate(1.5px,.5px) rotate(1.5deg);}28%{transform:translate(-.5px,-.5px) rotate(-.5deg);}30%{transform:translate(1.5px,-.5px) rotate(-.5deg);}32%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}34%{transform:translate(2.5px,2.5px) rotate(-.5deg);}36%{transform:translate(.5px,-1.5px) rotate(.5deg);}38%{transform:translate(2.5px,-.5px) rotate(-.5deg);}40%{transform:translate(-.5px,2.5px) rotate(.5deg);}42%{transform:translate(-1.5px,2.5px) rotate(.5deg);}44%{transform:translate(-1.5px,1.5px) rotate(.5deg);}46%{transform:translate(1.5px,-.5px) rotate(-.5deg);}48%{transform:translate(2.5px,-.5px) rotate(.5deg);}50%{transform:translate(-1.5px,1.5px) rotate(.5deg);}52%{transform:translate(-.5px,1.5px) rotate(.5deg);}54%{transform:translate(-1.5px,1.5px) rotate(.5deg);}56%{transform:translate(.5px,2.5px) rotate(1.5deg);}58%{transform:translate(2.5px,2.5px) rotate(.5deg);}60%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}62%{transform:translate(-1.5px,.5px) rotate(1.5deg);}64%{transform:translate(-1.5px,1.5px) rotate(1.5deg);}66%{transform:translate(.5px,2.5px) rotate(1.5deg);}68%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}70%{transform:translate(2.5px,2.5px) rotate(.5deg);}72%{transform:translate(-.5px,-1.5px) rotate(1.5deg);}74%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}76%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}78%{transform:translate(-1.5px,2.5px) rotate(.5deg);}80%{transform:translate(-1.5px,.5px) rotate(-.5deg);}82%{transform:translate(-1.5px,.5px) rotate(-.5deg);}84%{transform:translate(-.5px,.5px) rotate(1.5deg);}86%{transform:translate(2.5px,1.5px) rotate(.5deg);}88%{transform:translate(-1.5px,.5px) rotate(1.5deg);}90%{transform:translate(-1.5px,-.5px) rotate(-.5deg);}92%{transform:translate(-1.5px,-1.5px) rotate(1.5deg);}94%{transform:translate(.5px,.5px) rotate(-.5deg);}96%{transform:translate(2.5px,-.5px) rotate(-.5deg);}98%{transform:translate(-1.5px,-1.5px) rotate(-.5deg);}0%,100%{transform:translate(0,0) rotate(0);}}' + shake: + '{2%{transform:translate(.5px,-1.5px) rotate(-.5deg);}4%{transform:translate(.5px,1.5px) rotate(1.5deg);}6%{transform:translate(1.5px,1.5px) rotate(1.5deg);}8%{transform:translate(2.5px,1.5px) rotate(.5deg);}10%{transform:translate(.5px,2.5px) rotate(.5deg);}12%{transform:translate(1.5px,1.5px) rotate(.5deg);}14%{transform:translate(.5px,.5px) rotate(.5deg);}16%{transform:translate(-1.5px,-.5px) rotate(1.5deg);}18%{transform:translate(.5px,.5px) rotate(1.5deg);}20%{transform:translate(2.5px,2.5px) rotate(1.5deg);}22%{transform:translate(.5px,-1.5px) rotate(1.5deg);}24%{transform:translate(-1.5px,1.5px) rotate(-.5deg);}26%{transform:translate(1.5px,.5px) rotate(1.5deg);}28%{transform:translate(-.5px,-.5px) rotate(-.5deg);}30%{transform:translate(1.5px,-.5px) rotate(-.5deg);}32%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}34%{transform:translate(2.5px,2.5px) rotate(-.5deg);}36%{transform:translate(.5px,-1.5px) rotate(.5deg);}38%{transform:translate(2.5px,-.5px) rotate(-.5deg);}40%{transform:translate(-.5px,2.5px) rotate(.5deg);}42%{transform:translate(-1.5px,2.5px) rotate(.5deg);}44%{transform:translate(-1.5px,1.5px) rotate(.5deg);}46%{transform:translate(1.5px,-.5px) rotate(-.5deg);}48%{transform:translate(2.5px,-.5px) rotate(.5deg);}50%{transform:translate(-1.5px,1.5px) rotate(.5deg);}52%{transform:translate(-.5px,1.5px) rotate(.5deg);}54%{transform:translate(-1.5px,1.5px) rotate(.5deg);}56%{transform:translate(.5px,2.5px) rotate(1.5deg);}58%{transform:translate(2.5px,2.5px) rotate(.5deg);}60%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}62%{transform:translate(-1.5px,.5px) rotate(1.5deg);}64%{transform:translate(-1.5px,1.5px) rotate(1.5deg);}66%{transform:translate(.5px,2.5px) rotate(1.5deg);}68%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}70%{transform:translate(2.5px,2.5px) rotate(.5deg);}72%{transform:translate(-.5px,-1.5px) rotate(1.5deg);}74%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}76%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}78%{transform:translate(-1.5px,2.5px) rotate(.5deg);}80%{transform:translate(-1.5px,.5px) rotate(-.5deg);}82%{transform:translate(-1.5px,.5px) rotate(-.5deg);}84%{transform:translate(-.5px,.5px) rotate(1.5deg);}86%{transform:translate(2.5px,1.5px) rotate(.5deg);}88%{transform:translate(-1.5px,.5px) rotate(1.5deg);}90%{transform:translate(-1.5px,-.5px) rotate(-.5deg);}92%{transform:translate(-1.5px,-1.5px) rotate(1.5deg);}94%{transform:translate(.5px,.5px) rotate(-.5deg);}96%{transform:translate(2.5px,-.5px) rotate(-.5deg);}98%{transform:translate(-1.5px,-1.5px) rotate(-.5deg);}0%,100%{transform:translate(0,0) rotate(0);}}', }, durations: { - shake: "50s" + shake: '50s', }, timingFns: { shake: 'ease-in-out', @@ -34,6 +38,6 @@ export default defineConfig({ counts: { shake: 'infinite', }, - } - } -}); \ No newline at end of file + }, + }, +}); diff --git a/packages/live2d/vite.config.ts b/packages/live2d/vite.config.ts index 1f816ed..9a63b48 100644 --- a/packages/live2d/vite.config.ts +++ b/packages/live2d/vite.config.ts @@ -1,13 +1,13 @@ -import { defineConfig } from "vite"; -import { resolve } from "node:path"; -import react from "@vitejs/plugin-react"; +import { resolve } from 'node:path'; +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; export default defineConfig({ plugins: [ react({ babel: { parserOpts: { - plugins: ["decorators-legacy"], + plugins: ['decorators-legacy'], }, }, }), @@ -15,18 +15,18 @@ export default defineConfig({ build: { lib: { - entry: resolve(__dirname, "src/index.ts"), - name: "Live2d", - fileName: "live2d", + entry: resolve(__dirname, 'src/index.ts'), + name: 'Live2d', + fileName: 'live2d', }, rollupOptions: { - external: ["react", "react-dom"], + external: ['react', 'react-dom'], }, }, server: { fs: { - strict: false - } - } + strict: false, + }, + }, }); From 53e25efa78e6d527913d3c164740a53d2757bcd1 Mon Sep 17 00:00:00 2001 From: Takagi Date: Thu, 26 Feb 2026 12:34:17 +0800 Subject: [PATCH 13/26] checkstyle --- packages/live2d/package.json | 7 +- packages/live2d/src/common/UnoLitElement.ts | 4 +- .../live2d/src/components/Live2dCanvas.tsx | 69 ++++++++-------- .../live2d/src/components/Live2dContext.tsx | 27 ++++--- packages/live2d/src/components/Live2dTips.tsx | 60 ++++++++------ .../live2d/src/components/Live2dToggle.tsx | 36 ++++----- .../live2d/src/components/Live2dTools.tsx | 36 +++++---- .../live2d/src/components/Live2dWidget.tsx | 80 ++++++++++--------- packages/live2d/src/context/config-context.ts | 12 +-- .../live2d/src/events/add-default-message.ts | 4 +- packages/live2d/src/events/before-init.ts | 6 +- packages/live2d/src/events/send-message.ts | 4 +- packages/live2d/src/events/tip-events.ts | 46 +++++------ packages/live2d/src/events/toggle-canvas.ts | 4 +- packages/live2d/src/helpers/getPluginTips.ts | 4 +- .../live2d/src/helpers/loadTipsResource.ts | 2 +- packages/live2d/src/helpers/mergeTips.ts | 4 +- packages/live2d/src/helpers/sendMessage.ts | 4 +- packages/live2d/src/live2d/model.ts | 48 +++++------ packages/live2d/src/live2d/tools/ai-chat.ts | 6 +- packages/live2d/src/live2d/tools/asteroids.ts | 8 +- .../live2d/src/live2d/tools/custom-tool.ts | 12 +-- packages/live2d/src/live2d/tools/exit.ts | 12 +-- packages/live2d/src/live2d/tools/hitokoto.ts | 16 ++-- packages/live2d/src/live2d/tools/index.ts | 20 ++--- .../live2d/src/live2d/tools/screenshot.ts | 12 +-- .../live2d/src/live2d/tools/switch-model.ts | 8 +- .../live2d/src/live2d/tools/switch-texture.ts | 6 +- packages/live2d/src/live2d/tools/tools.ts | 2 +- packages/live2d/src/utils/distinctArray.ts | 2 +- packages/live2d/src/utils/unoMixin.ts | 4 +- packages/live2d/tsconfig.json | 4 + packages/live2d/vite.config.ts | 2 + pnpm-lock.yaml | 41 ++++++++++ 34 files changed, 343 insertions(+), 269 deletions(-) diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 5ea11bf..67d018b 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -3,7 +3,9 @@ "private": true, "version": "1.0.0", "type": "module", - "files": ["dist"], + "files": [ + "dist" + ], "main": "./dist/live2d.umd.cjs", "module": "./dist/live2d.js", "exports": { @@ -35,6 +37,7 @@ "@vitejs/plugin-react": "^4.3.4", "ts-lit-plugin": "^2.0.2", "unocss": "^65.4.3", - "vite": "^6.1.0" + "vite": "^6.1.0", + "vite-tsconfig-paths": "^5.1.4" } } diff --git a/packages/live2d/src/common/UnoLitElement.ts b/packages/live2d/src/common/UnoLitElement.ts index afb1175..4827228 100644 --- a/packages/live2d/src/common/UnoLitElement.ts +++ b/packages/live2d/src/common/UnoLitElement.ts @@ -1,4 +1,4 @@ -import { LitElement } from 'lit'; -import { UNO } from '../utils/unoMixin'; +import { LitElement } from "lit"; +import { UNO } from "@/live2d/utils/unoMixin"; export const UnoLitElement = UNO(LitElement); diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 3533788..4dcab0a 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -3,44 +3,47 @@ import { createComponent } from "@lit/react"; import { type PropertyValues, type TemplateResult, html } from "lit"; import { property, query, state } from "lit/decorators.js"; import React from "react"; -import { UnoLitElement } from "../common/UnoLitElement"; -import { type Live2dConfig, configContext } from "../context/config-context"; -import { BeforeInitEvent } from "../events/before-init.js"; -import Model from "../live2d/model"; +import { UnoLitElement } from "@/live2d/common/UnoLitElement"; +import { + type Live2dConfig, + configContext, +} from "@/live2d/context/config-context"; +import { BeforeInitEvent } from "@/live2d/events/before-init.js"; +import Model from "@/live2d/live2d/model"; export class Live2dCanvas extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; - - @state() - private _model: unknown; - - @query("#live2d") - private _live2d: HTMLCanvasElement; - - render(): TemplateResult { - return html` `; - } - - connectedCallback(): void { - super.connectedCallback(); - // 发出 Live2d beforeInit 事件 - window.dispatchEvent(new BeforeInitEvent({ config: this.config })); - } - - protected firstUpdated(_changedProperties: PropertyValues): void { - super.firstUpdated(_changedProperties); - if (this.config && this._live2d) { - this._model = new Model(this._live2d, this.config); - } - } + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _model: unknown; + + @query("#live2d") + private _live2d: HTMLCanvasElement; + + render(): TemplateResult { + return html` `; + } + + connectedCallback(): void { + super.connectedCallback(); + // 发出 Live2d beforeInit 事件 + window.dispatchEvent(new BeforeInitEvent({ config: this.config })); + } + + protected firstUpdated(_changedProperties: PropertyValues): void { + super.firstUpdated(_changedProperties); + if (this.config && this._live2d) { + this._model = new Model(this._live2d, this.config); + } + } } customElements.define("live2d-canvas", Live2dCanvas); export const Live2dCanvasComponent = createComponent({ - tagName: "live2d-canvas", - elementClass: Live2dCanvas, - react: React, + tagName: "live2d-canvas", + elementClass: Live2dCanvas, + react: React, }); diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index 403ae28..ce51ad0 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -1,17 +1,20 @@ -import { createComponent } from '@lit/react'; -import { type TemplateResult, html } from 'lit'; -import React from 'react'; -import { UnoLitElement } from '../common/UnoLitElement'; -import './Live2dWidget'; -import { provide } from '@lit/context'; -import { type Live2dConfig, configContext } from '../context/config-context'; -import '../events'; +import { createComponent } from "@lit/react"; +import { type TemplateResult, html } from "lit"; +import React from "react"; +import { UnoLitElement } from "@/live2d/common/UnoLitElement"; +import "@/live2d/components/Live2dWidget"; +import { provide } from "@lit/context"; +import { + type Live2dConfig, + configContext, +} from "@/live2d/context/config-context"; +import "@/live2d/events"; export class Live2dContext extends UnoLitElement { @provide({ context: configContext }) config = { - apiPath: 'https://live2d.fghrsh.net/api', - live2dLocation: 'right', + apiPath: "https://live2d.fghrsh.net/api", + live2dLocation: "right", consoleShowStatus: false, isTools: true, } as Live2dConfig; @@ -21,10 +24,10 @@ export class Live2dContext extends UnoLitElement { } } -customElements.define('live2d-context', Live2dContext); +customElements.define("live2d-context", Live2dContext); export const Live2dContextComponent = createComponent({ - tagName: 'live2d-context', + tagName: "live2d-context", elementClass: Live2dContext, react: React, }); diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 65910bc..7c409dd 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -1,15 +1,18 @@ -import { consume } from '@lit/context'; -import { createComponent } from '@lit/react'; -import { type TemplateResult, html } from 'lit'; -import { property, state } from 'lit/decorators.js'; -import { classMap } from 'lit/directives/class-map.js'; -import { unsafeHTML } from 'lit/directives/unsafe-html.js'; -import React from 'react'; -import { UnoLitElement } from '../common/UnoLitElement'; -import { type Live2dConfig, configContext } from '../context/config-context'; -import type { SendMessageEvent } from '../events/send-message'; -import { isNotEmpty } from '../utils/isNotEmpty'; -import { randomSelection } from '../utils/randomSelection'; +import { consume } from "@lit/context"; +import { createComponent } from "@lit/react"; +import { type TemplateResult, html } from "lit"; +import { property, state } from "lit/decorators.js"; +import { classMap } from "lit/directives/class-map.js"; +import { unsafeHTML } from "lit/directives/unsafe-html.js"; +import React from "react"; +import { UnoLitElement } from "@/live2d/common/UnoLitElement"; +import { + type Live2dConfig, + configContext, +} from "@/live2d/context/config-context"; +import type { SendMessageEvent } from "@/live2d/events/send-message"; +import { isNotEmpty } from "@/live2d/utils/isNotEmpty"; +import { randomSelection } from "@/live2d/utils/randomSelection"; export class Live2dTips extends UnoLitElement { @consume({ context: configContext }) @@ -19,26 +22,31 @@ export class Live2dTips extends UnoLitElement { @state() private _isShow = false; @state() - private _message = ''; + private _message = ""; private priority = -1; private messageTimer: number | null = null; constructor() { super(); this._isShow = false; - this._message = ''; + this._message = ""; } render(): TemplateResult { const classes = { - 'opacity-100': this._isShow, - 'opacity-0': !this._isShow, + "opacity-100": this._isShow, + "opacity-0": !this._isShow, }; return html` -
- ${unsafeHTML(this._message)} -
+
+ ${unsafeHTML(this._message)} +
`; } @@ -46,16 +54,16 @@ export class Live2dTips extends UnoLitElement { super.connectedCallback(); // 为 tips 注册 tips 相关事件 window.addEventListener( - 'live2d:send-message', - this.handleMessage.bind(this), + "live2d:send-message", + this.handleMessage.bind(this) ); } disconnectedCallback(): void { super.disconnectedCallback(); window.removeEventListener( - 'live2d:send-message', - this.handleMessage.bind(this), + "live2d:send-message", + this.handleMessage.bind(this) ); } @@ -85,10 +93,10 @@ export class Live2dTips extends UnoLitElement { } } -customElements.define('live2d-tips', Live2dTips); +customElements.define("live2d-tips", Live2dTips); export const Live2dTipsComponent = createComponent({ - tagName: 'live2d-tips', + tagName: "live2d-tips", elementClass: Live2dTips, react: React, }); diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 4d93934..beab616 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -1,9 +1,9 @@ -import { createComponent } from '@lit/react'; -import { type TemplateResult, html } from 'lit'; -import { state } from 'lit/decorators.js'; -import React from 'react'; -import { UnoLitElement } from '../common/UnoLitElement'; -import { ToggleCanvasEvent } from '../events/toggle-canvas'; +import { createComponent } from "@lit/react"; +import { type TemplateResult, html } from "lit"; +import { state } from "lit/decorators.js"; +import React from "react"; +import { UnoLitElement } from "@/live2d/common/UnoLitElement"; +import { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; export class Live2dToggle extends UnoLitElement { @state() @@ -12,10 +12,10 @@ export class Live2dToggle extends UnoLitElement { connectedCallback(): void { super.connectedCallback(); - this.addEventListener('click', this.handleClick); + this.addEventListener("click", this.handleClick); // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 - const live2dDisplay = localStorage.getItem('live2d-display'); + const live2dDisplay = localStorage.getItem("live2d-display"); if (live2dDisplay) { if (Date.now() - Number.parseInt(live2dDisplay) <= 24 * 60 * 60 * 1000) { this.triggerToggleLive2d(false); @@ -27,17 +27,15 @@ export class Live2dToggle extends UnoLitElement { disconnectedCallback(): void { super.disconnectedCallback(); - this.removeEventListener('click', this.handleClick); + this.removeEventListener("click", this.handleClick); } render(): TemplateResult { return html`
看板娘
`; @@ -51,22 +49,22 @@ export class Live2dToggle extends UnoLitElement { // 当前切换栏与 Live2d 的显示状态相反 this._isShow = !isShow; if (isShow) { - localStorage.removeItem('live2d-display'); + localStorage.removeItem("live2d-display"); } else { - localStorage.setItem('live2d-display', Date.now().toString()); + localStorage.setItem("live2d-display", Date.now().toString()); } this.dispatchEvent( new ToggleCanvasEvent({ isShow, - }), + }) ); } } -customElements.define('live2d-toggle', Live2dToggle); +customElements.define("live2d-toggle", Live2dToggle); export const Live2dToggleComponent = createComponent({ - tagName: 'live2d-toggle', + tagName: "live2d-toggle", elementClass: Live2dToggle, react: React, }); diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 067db9f..1019e21 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -1,14 +1,17 @@ -import { consume } from '@lit/context'; -import { createComponent } from '@lit/react'; -import { type TemplateResult, html } from 'lit'; -import { property, state } from 'lit/decorators.js'; -import React from 'react'; -import { UnoLitElement } from '../common/UnoLitElement'; -import { type Live2dConfig, configContext } from '../context/config-context'; -import presetTools from '../live2d/tools'; -import { CustomTool } from '../live2d/tools/custom-tool'; -import type { Tool } from '../live2d/tools/tools'; -import 'iconify-icon'; +import { consume } from "@lit/context"; +import { createComponent } from "@lit/react"; +import { type TemplateResult, html } from "lit"; +import { property, state } from "lit/decorators.js"; +import React from "react"; +import { UnoLitElement } from "@/live2d/common/UnoLitElement"; +import { + type Live2dConfig, + configContext, +} from "@/live2d/context/config-context"; +import presetTools from "@/live2d/live2d/tools"; +import { CustomTool } from "@/live2d/live2d/tools/custom-tool"; +import type { Tool } from "@/live2d/live2d/tools/tools"; +import "iconify-icon"; export class Live2dTools extends UnoLitElement { @consume({ context: configContext }) @@ -19,7 +22,10 @@ export class Live2dTools extends UnoLitElement { private _tools: Tool[] = []; render(): TemplateResult { - return html`
+ return html`
${this._tools.map(this.renderTool)}
`; } @@ -49,7 +55,7 @@ export class Live2dTools extends UnoLitElement { const customTools = this.getCustomTools(); // 合并所有工具,并按照 priority 排序 const tools = [...presetTools, ...customTools].sort( - (a, b) => b.priority - a.priority, + (a, b) => b.priority - a.priority ); this._tools.push(...tools); } @@ -95,10 +101,10 @@ export class Live2dTools extends UnoLitElement { } } -customElements.define('live2d-tools', Live2dTools); +customElements.define("live2d-tools", Live2dTools); export const Live2dToolsComponent = createComponent({ - tagName: 'live2d-tools', + tagName: "live2d-tools", elementClass: Live2dTools, react: React, }); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 461812e..7ee3b4e 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -1,62 +1,68 @@ -import { consume } from '@lit/context'; -import { createComponent } from '@lit/react'; -import { type TemplateResult, html } from 'lit'; -import { property, state } from 'lit/decorators.js'; -import React from 'react'; -import { UnoLitElement } from '../common/UnoLitElement'; -import { type Live2dConfig, configContext } from '../context/config-context'; -import './Live2dToggle'; -import './Live2dTips'; -import './Live2dCanvas'; -import './Live2dTools'; -import type { ToggleCanvasEvent } from '../events/toggle-canvas'; +import { consume } from "@lit/context"; +import { createComponent } from "@lit/react"; +import { type TemplateResult, html } from "lit"; +import { property, state } from "lit/decorators.js"; +import React from "react"; +import { UnoLitElement } from "@/live2d/common/UnoLitElement"; +import { + type Live2dConfig, + configContext, +} from "@/live2d/context/config-context"; +import "@/live2d/components/Live2dToggle"; +import "@/live2d/components/Live2dTips"; +import "@/live2d/components/Live2dCanvas"; +import "@/live2d/components/Live2dTools"; +import type { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; export class Live2dWidget extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; - @state() - private _isShow = false; + @state() + private _isShow = false; - render(): TemplateResult { - return html` + render(): TemplateResult { + return html` ${this.renderLive2dWidget()} `; - } + } - renderLive2dTools() { - if (this.config?.isTools) { - return html``; - } - } + } + } - renderLive2dWidget() { - if (this._isShow) { - return html`
+ renderLive2dWidget() { + if (this._isShow) { + return html`
${this.renderLive2dTools()}
`; - } - } + } + } - handleToggleWidget(e: ToggleCanvasEvent) { - this._isShow = e.detail.isShow; - } + handleToggleWidget(e: ToggleCanvasEvent) { + this._isShow = e.detail.isShow; + } } -customElements.define('live2d-widget', Live2dWidget); +customElements.define("live2d-widget", Live2dWidget); export const Live2dWidgetComponent = createComponent({ - tagName: 'live2d-widget', - elementClass: Live2dWidget, - react: React, + tagName: "live2d-widget", + elementClass: Live2dWidget, + react: React, }); diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index b547493..dafdc8f 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,5 +1,5 @@ -import { createContext } from '@lit/context'; -import type { CustomToolConfig } from 'live2d/tools/custom-tool'; +import { createContext } from "@lit/context"; +import type { CustomToolConfig } from "@/live2d/live2d/tools/custom-tool"; export interface ObjectAny extends Record {} @@ -73,7 +73,7 @@ export interface Live2dConfig extends Live2dToolsConfig { // Live2d API 路径 apiPath: string; // Live2d 定位 - live2dLocation: 'left' | 'right'; + live2dLocation: "left" | "right"; // 是否在控制台显示状态 consoleShowStatus?: boolean; // 是否强制使用默认配置 @@ -93,8 +93,8 @@ export interface Live2dConfig extends Live2dToolsConfig { message: string; }[]; selector: string; - mouseAction: 'click' | 'mouseover' | string | undefined; - }, + mouseAction: "click" | "mouseover" | string | undefined; + } ]; // 页面可见性变化时的 tips backSiteTip: string[] | string; @@ -107,4 +107,4 @@ export interface Live2dConfig extends Live2dToolsConfig { [key: string]: unknown; } -export const configContext = createContext('config'); +export const configContext = createContext("config"); diff --git a/packages/live2d/src/events/add-default-message.ts b/packages/live2d/src/events/add-default-message.ts index 85ea866..20bb8c7 100644 --- a/packages/live2d/src/events/add-default-message.ts +++ b/packages/live2d/src/events/add-default-message.ts @@ -1,7 +1,7 @@ -import { Live2dEvent } from './types'; +import { Live2dEvent } from "@/live2d/events/types"; export const ADD_DEFAULT_MESSAGE_EVENT_NAME = - 'live2d:add-default-message' as const; + "live2d:add-default-message" as const; declare global { interface GlobalEventHandlersEventMap { diff --git a/packages/live2d/src/events/before-init.ts b/packages/live2d/src/events/before-init.ts index 66d728e..9d8ee4c 100644 --- a/packages/live2d/src/events/before-init.ts +++ b/packages/live2d/src/events/before-init.ts @@ -1,7 +1,7 @@ -import type { Live2dConfig } from 'context/config-context'; -import { Live2dEvent } from './types'; +import type { Live2dConfig } from "@/live2d/context/config-context"; +import { Live2dEvent } from "@/live2d/events/types"; -export const BEFORE_INIT_EVENT_NAME = 'live2d:before-init' as const; +export const BEFORE_INIT_EVENT_NAME = "live2d:before-init" as const; declare global { interface GlobalEventHandlersEventMap { diff --git a/packages/live2d/src/events/send-message.ts b/packages/live2d/src/events/send-message.ts index 87eeef4..cbde2c8 100644 --- a/packages/live2d/src/events/send-message.ts +++ b/packages/live2d/src/events/send-message.ts @@ -1,6 +1,6 @@ -import { Live2dEvent } from './types'; +import { Live2dEvent } from "@/live2d/events/types"; -export const SEND_MESSAGE_EVENT_NAME = 'live2d:send-message' as const; +export const SEND_MESSAGE_EVENT_NAME = "live2d:send-message" as const; declare global { interface GlobalEventHandlersEventMap { diff --git a/packages/live2d/src/events/tip-events.ts b/packages/live2d/src/events/tip-events.ts index 3a9f13d..30aa5a0 100644 --- a/packages/live2d/src/events/tip-events.ts +++ b/packages/live2d/src/events/tip-events.ts @@ -6,23 +6,23 @@ import type { TipMouseover, TipSeason, TipTime, -} from '../context/config-context'; -import { dataWithinRange } from '../helpers/dateWithinRange'; -import { getPluginTips } from '../helpers/getPluginTips'; -import { loadTipsResource } from '../helpers/loadTipsResource'; -import { mergeTips } from '../helpers/mergeTips'; -import { sendMessage } from '../helpers/sendMessage'; -import { timeWithinRange } from '../helpers/timeWithinRange'; -import { isNotEmptyString, isString } from '../utils/isString'; -import { randomSelection } from '../utils/randomSelection'; +} from "@/live2d/context/config-context"; +import { dataWithinRange } from "@/live2d/helpers/dateWithinRange"; +import { getPluginTips } from "@/live2d/helpers/getPluginTips"; +import { loadTipsResource } from "@/live2d/helpers/loadTipsResource"; +import { mergeTips } from "@/live2d/helpers/mergeTips"; +import { sendMessage } from "@/live2d/helpers/sendMessage"; +import { timeWithinRange } from "@/live2d/helpers/timeWithinRange"; +import { isNotEmptyString, isString } from "@/live2d/utils/isString"; +import { randomSelection } from "@/live2d/utils/randomSelection"; import { documentTitle, getReferrerDomain, hasWebsiteHome, -} from '../utils/util'; -import { AddDefaultMessageEvent } from './add-default-message'; +} from "@/live2d/utils/util"; +import { AddDefaultMessageEvent } from "@/live2d/events/add-default-message"; -window.addEventListener('live2d:before-init', async (e) => { +window.addEventListener("live2d:before-init", async (e) => { const config = e.detail.config; if (!config) { return; @@ -68,7 +68,7 @@ const _holidayEvent = (seasons: TipSeason[]) => { const _userLeaveEvent = (message: TipMessage) => { const { visibilitychange } = message; - document.addEventListener('visibilitychange', () => { + document.addEventListener("visibilitychange", () => { if (!document.hidden) { sendMessage(visibilitychange, 6000, 2); } @@ -77,7 +77,7 @@ const _userLeaveEvent = (message: TipMessage) => { const _userCopyEvent = (message: TipMessage) => { const { copy } = message; - window.addEventListener('copy', () => { + window.addEventListener("copy", () => { sendMessage(copy, 6000, 2); }); }; @@ -91,7 +91,7 @@ const _userOpenConsoleEvent = (message: TipMessage) => { }; const _userClickEvent = (clicks: TipClick[]) => { - window.addEventListener('click', (event) => { + window.addEventListener("click", (event) => { const path = event.composedPath(); const target = path[0]; if (!(target instanceof HTMLElement)) { @@ -105,7 +105,7 @@ const _userClickEvent = (clicks: TipClick[]) => { if (!message) { continue; } - message = message.replace('{text}', target.innerText); + message = message.replace("{text}", target.innerText); sendMessage(message, 4000, 1); return; } @@ -113,7 +113,7 @@ const _userClickEvent = (clicks: TipClick[]) => { }; const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { - window.addEventListener('mouseover', (event: MouseEvent) => { + window.addEventListener("mouseover", (event: MouseEvent) => { const path = event.composedPath(); const target = path[0]; if (!(target instanceof HTMLElement)) { @@ -127,7 +127,7 @@ const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { if (!message) { continue; } - message = message.replace('{text}', target.innerText); + message = message.replace("{text}", target.innerText); sendMessage(message, 4000, 1); return; } @@ -145,13 +145,13 @@ const _userActionEvent = (message: TipMessage) => { ? [defaultMessage] : defaultMessage || []; - window.addEventListener('mousemove', () => { + window.addEventListener("mousemove", () => { userAction = true; }); - window.addEventListener('keydown', () => { + window.addEventListener("keydown", () => { userAction = true; }); - window.addEventListener('live2d:add-default-message', (ev) => { + window.addEventListener("live2d:add-default-message", (ev) => { const message = ev.detail.message; if (Array.isArray(message)) { idleMessage.push(...message); @@ -221,7 +221,7 @@ const _loadTips = async (config: Live2dConfig) => { }; export const _getFullOrDefaultTips = async ( - config: Live2dConfig, + config: Live2dConfig ): Promise => { // 获取插件文件中的全量 tips 文件 if (isNotEmptyString(config?.tipsPath)) { @@ -231,5 +231,5 @@ export const _getFullOrDefaultTips = async ( } } // 获取默认的 tips 文件 - return (await import('../libs/live2d-tips.json')).default; + return (await import("../libs/live2d-tips.json")).default; }; diff --git a/packages/live2d/src/events/toggle-canvas.ts b/packages/live2d/src/events/toggle-canvas.ts index 4ac5451..6ba8cac 100644 --- a/packages/live2d/src/events/toggle-canvas.ts +++ b/packages/live2d/src/events/toggle-canvas.ts @@ -1,6 +1,6 @@ -import { Live2dEvent } from './types'; +import { Live2dEvent } from "@/live2d/events/types"; -export const TOGGLE_CANVAS_EVENT_NAME = 'live2d:toggle-canvas' as const; +export const TOGGLE_CANVAS_EVENT_NAME = "live2d:toggle-canvas" as const; declare global { interface GlobalEventHandlersEventMap { diff --git a/packages/live2d/src/helpers/getPluginTips.ts b/packages/live2d/src/helpers/getPluginTips.ts index 465e54c..9d7d153 100644 --- a/packages/live2d/src/helpers/getPluginTips.ts +++ b/packages/live2d/src/helpers/getPluginTips.ts @@ -1,5 +1,5 @@ -import type { Live2dConfig, TipConfig } from '../context/config-context'; -import { isNotEmpty } from '../utils/isNotEmpty'; +import type { Live2dConfig, TipConfig } from '@/live2d/context/config-context'; +import { isNotEmpty } from '@/live2d/utils/isNotEmpty'; /** * 整合插件配置中的 tips 元素。 diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts index ce32508..be2c6e9 100644 --- a/packages/live2d/src/helpers/loadTipsResource.ts +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -1,4 +1,4 @@ -import type { TipConfig } from '../context/config-context'; +import type { TipConfig } from '@/live2d/context/config-context'; /** * 远程加载提示资源 diff --git a/packages/live2d/src/helpers/mergeTips.ts b/packages/live2d/src/helpers/mergeTips.ts index 20d86f7..6378242 100644 --- a/packages/live2d/src/helpers/mergeTips.ts +++ b/packages/live2d/src/helpers/mergeTips.ts @@ -1,5 +1,5 @@ -import type { TipConfig } from '../context/config-context'; -import { distinctArray } from '../utils/distinctArray'; +import type { TipConfig } from '@/live2d/context/config-context'; +import { distinctArray } from '@/live2d/utils/distinctArray'; /** * 合并各个渠道的 tips,根据获取位置不同,合并时优先级也不同。优先级按高到低的顺序为 diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index c8214ce..c16de1b 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -1,4 +1,4 @@ -import { SendMessageEvent } from '../events/send-message'; +import { SendMessageEvent } from "@/live2d/events/send-message"; /** * 向 Live2D 发送消息事件 @@ -9,7 +9,7 @@ import { SendMessageEvent } from '../events/send-message'; export function sendMessage( text: string | string[] | undefined, timeout = 3000, - priority = 0, + priority = 0 ) { if (!text) { return; diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index 9e9371b..32a2990 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -1,10 +1,10 @@ -import * as PIXI from 'pixi.js'; -import type { Live2dConfig } from '../context/config-context'; -import { sendMessage } from '../helpers/sendMessage'; -import { isNotEmptyString } from '../utils/isString'; -import '../libs/live2d.min.js'; -import '../libs/live2dcubismcore.min.js'; -import { Live2DModel } from 'pixi-live2d-display'; +import * as PIXI from "pixi.js"; +import type { Live2dConfig } from "@/live2d/context/config-context"; +import { sendMessage } from "@/live2d/helpers/sendMessage"; +import { isNotEmptyString } from "@/live2d/utils/isString"; +import "@/live2d/libs/live2d.min.js"; +import "@/live2d/libs/live2dcubismcore.min.js"; +import { Live2DModel } from "pixi-live2d-display"; window.PIXI = PIXI; @@ -30,10 +30,10 @@ class Model { constructor(root: HTMLCanvasElement, config: Live2dConfig) { const apiPath = config.apiPath; if (!isNotEmptyString(apiPath)) { - throw new Error('Invalid initWidget argument!'); + throw new Error("Invalid initWidget argument!"); } - this.#apiPath = apiPath.endsWith('/') ? apiPath : `${apiPath}/`; + this.#apiPath = apiPath.endsWith("/") ? apiPath : `${apiPath}/`; this.#config = config; this.#live2dRootElement = root; this.#app = new PIXI.Application({ @@ -48,8 +48,8 @@ class Model { } private _loadingModel() { - let modelId = localStorage.getItem('modelId'); - let modelTexturesId = localStorage.getItem('modelTexturesId'); + let modelId = localStorage.getItem("modelId"); + let modelTexturesId = localStorage.getItem("modelTexturesId"); if (modelId === null || !!this.#config.isForceUseDefaultConfig) { // 加载指定模型的指定材质 modelId = String(this.#config.modelId || 1); // 模型 ID @@ -58,7 +58,7 @@ class Model { this.loadModel( Number(modelId), Number(modelTexturesId), - 'Live2D 模型加载中...', + "Live2D 模型加载中..." ); } @@ -70,21 +70,21 @@ class Model { * @param text 加载时的消息 */ async loadModel(modelId: number, modelTexturesId: number, text?: string) { - localStorage.setItem('modelId', String(modelId)); - localStorage.setItem('modelTexturesId', String(modelTexturesId)); + localStorage.setItem("modelId", String(modelId)); + localStorage.setItem("modelTexturesId", String(modelTexturesId)); // 发送消息事件 if (text) { sendMessage(text, 4000, 3); } const model = await Live2DModel.from( - 'https://live2d.fghrsh.net/api/get/?id=1-53', + "https://live2d.fghrsh.net/api/get/?id=1-53", { onLoad: () => { console.log( - `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`, + `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成` ); }, - }, + } ); const scaleX = this.#app.view.height / model.width; @@ -98,27 +98,27 @@ class Model { * 随机切换模型贴图 */ async loadRandTextures() { - const modelId = Number(localStorage.getItem('modelId')); - const modelTexturesId = Number(localStorage.getItem('modelTexturesId')); + const modelId = Number(localStorage.getItem("modelId")); + const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); // 可选 "rand"(随机), "switch"(顺序) const result = (await fetch( - `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`, + `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}` ).then((response) => response.json())) as ModelTexturesResult; const texturesId = result.textures.id; if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { - sendMessage('我还没有其他衣服呢!', 4000, 3); + sendMessage("我还没有其他衣服呢!", 4000, 3); return; } - this.loadModel(modelId, texturesId, '我的新衣服好看嘛?'); + this.loadModel(modelId, texturesId, "我的新衣服好看嘛?"); } /** * 切换模型 */ async loadOtherModel() { - const modelId = Number(localStorage.getItem('modelId')); + const modelId = Number(localStorage.getItem("modelId")); const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( - (response) => response.json(), + (response) => response.json() )) as ModelResult; this.loadModel(result.model.id, 0, result.model.message); } diff --git a/packages/live2d/src/live2d/tools/ai-chat.ts b/packages/live2d/src/live2d/tools/ai-chat.ts index d05dc49..7b38e0f 100644 --- a/packages/live2d/src/live2d/tools/ai-chat.ts +++ b/packages/live2d/src/live2d/tools/ai-chat.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from '../../utils/isString'; -import { Tool } from './tools'; +import { isNotEmptyString } from "@/live2d/utils/isString"; +import { Tool } from "@/live2d/live2d/tools/tools"; /** * AI 聊天工具 @@ -9,7 +9,7 @@ export class AIChatTool extends Tool { icon() { const icon = this.getConfig().aiChatUrl; - return isNotEmptyString(icon) ? icon : 'ph-chats-circle-fill'; + return isNotEmptyString(icon) ? icon : "ph-chats-circle-fill"; } execute() { diff --git a/packages/live2d/src/live2d/tools/asteroids.ts b/packages/live2d/src/live2d/tools/asteroids.ts index 10dc0a1..c0a0101 100644 --- a/packages/live2d/src/live2d/tools/asteroids.ts +++ b/packages/live2d/src/live2d/tools/asteroids.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from '../../utils/isString'; -import { Tool } from './tools'; +import { isNotEmptyString } from "@/live2d/utils/isString"; +import { Tool } from "@/live2d/live2d/tools/tools"; declare global { interface Window { @@ -14,12 +14,12 @@ export class AsteroidsTool extends Tool { priority = 80; icon() { const icon = this.getConfig().asteroidsIcon; - return isNotEmptyString(icon) ? icon : 'ph-paper-plane-tilt-fill'; + return isNotEmptyString(icon) ? icon : "ph-paper-plane-tilt-fill"; } execute() { // @ts-ignore - import('../../libs/asteroids.min.js').then((module) => { + import("@/live2d/libs/asteroids.min.js").then((module) => { new module.default(); }); } diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index e430d5b..3f3d8b0 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -1,6 +1,6 @@ -import type { Live2dConfig } from '../../context/config-context'; -import { isNotEmptyString } from '../../utils/isString'; -import { Tool } from './tools'; +import type { Live2dConfig } from "@/live2d/context/config-context"; +import { isNotEmptyString } from "@/live2d/utils/isString"; +import { Tool } from "@/live2d/live2d/tools/tools"; export type CustomToolConfig = { name: string; @@ -20,7 +20,7 @@ export class CustomTool extends Tool { constructor( config: Live2dConfig, - { name, icon, execute, priority }: CustomToolConfig, + { name, icon, execute, priority }: CustomToolConfig ) { super(config); this._name = name; @@ -35,11 +35,11 @@ export class CustomTool extends Tool { icon() { const icon = this._icon; - return isNotEmptyString(icon) ? icon : 'ph-question-fill'; + return isNotEmptyString(icon) ? icon : "ph-question-fill"; } execute() { - if (typeof this._execute === 'string') { + if (typeof this._execute === "string") { const customClass = new Function(` return class { ${this._execute} diff --git a/packages/live2d/src/live2d/tools/exit.ts b/packages/live2d/src/live2d/tools/exit.ts index 28aa442..fd94674 100644 --- a/packages/live2d/src/live2d/tools/exit.ts +++ b/packages/live2d/src/live2d/tools/exit.ts @@ -1,7 +1,7 @@ -import { ToggleCanvasEvent } from '../../events/toggle-canvas'; -import { sendMessage } from '../../helpers/sendMessage'; -import { isNotEmptyString } from '../../utils/isString'; -import { Tool } from './tools'; +import { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; +import { sendMessage } from "@/live2d/helpers/sendMessage"; +import { isNotEmptyString } from "@/live2d/utils/isString"; +import { Tool } from "@/live2d/live2d/tools/tools"; /** * 退出 Live2d 工具 @@ -11,11 +11,11 @@ export class ExitTool extends Tool { icon() { const icon = this.getConfig().exitIcon; - return isNotEmptyString(icon) ? icon : 'ph-x-bold'; + return isNotEmptyString(icon) ? icon : "ph-x-bold"; } execute() { - sendMessage('愿你有一天能与重要的人重逢。', 2000, 4); + sendMessage("愿你有一天能与重要的人重逢。", 2000, 4); setTimeout(() => { // 触发退出 Live2d 事件 window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); diff --git a/packages/live2d/src/live2d/tools/hitokoto.ts b/packages/live2d/src/live2d/tools/hitokoto.ts index 80c9a61..dd253c3 100644 --- a/packages/live2d/src/live2d/tools/hitokoto.ts +++ b/packages/live2d/src/live2d/tools/hitokoto.ts @@ -1,7 +1,7 @@ -import queryString from 'query-string'; -import { sendMessage } from '../../helpers/sendMessage'; -import { isNotEmptyString } from '../../utils/isString'; -import { Tool } from './tools'; +import queryString from "query-string"; +import { sendMessage } from "@/live2d/helpers/sendMessage"; +import { isNotEmptyString } from "@/live2d/utils/isString"; +import { Tool } from "@/live2d/live2d/tools/tools"; /** * 一言工具,使用一言接口获取一句话 @@ -12,11 +12,11 @@ import { Tool } from './tools'; export class HitokotoTool extends Tool { priority = 90; - _default_api = 'https://v1.hitokoto.cn'; + _default_api = "https://v1.hitokoto.cn"; icon() { const icon = this.getConfig().aiChatUrl; - return isNotEmptyString(icon) ? icon : 'ph-chat-circle-fill'; + return isNotEmptyString(icon) ? icon : "ph-chat-circle-fill"; } async execute() { @@ -34,12 +34,12 @@ export class HitokotoTool extends Tool { > { const unverifiedApi = this.getConfig().hitokotoApi || this._default_api; const parsedApi = queryString.parseUrl(unverifiedApi); - const newParams = { ...parsedApi.query, encode: 'json', charset: 'utf-8' }; + const newParams = { ...parsedApi.query, encode: "json", charset: "utf-8" }; const hitokotoApi = `${parsedApi.url}?${queryString.stringify(newParams)}`; const { hitokoto, from, creator } = await this._fetchHitokoto(hitokotoApi); if (isNotEmptyString(hitokoto)) { return { - hitokoto: 'hitokoto', + hitokoto: "hitokoto", description: `这句一言来自 「${from}」,是 ${creator} 在 hitokoto.cn 投稿的。`, }; } diff --git a/packages/live2d/src/live2d/tools/index.ts b/packages/live2d/src/live2d/tools/index.ts index 880d148..bf5f3cc 100644 --- a/packages/live2d/src/live2d/tools/index.ts +++ b/packages/live2d/src/live2d/tools/index.ts @@ -1,13 +1,13 @@ -import type { Live2dConfig } from '../../context/config-context'; -import { AIChatTool } from './ai-chat'; -import { AsteroidsTool } from './asteroids'; -import { ExitTool } from './exit'; -import { HitokotoTool } from './hitokoto'; -import { InfoTool } from './info'; -import { ScreenshotTool } from './screenshot'; -import { SwitchModelTool } from './switch-model'; -import { SwitchTextureTool } from './switch-texture'; -import type { Tool } from './tools'; +import type { Live2dConfig } from "@/live2d/context/config-context"; +import { AIChatTool } from "./ai-chat"; +import { AsteroidsTool } from "./asteroids"; +import { ExitTool } from "./exit"; +import { HitokotoTool } from "./hitokoto"; +import { InfoTool } from "./info"; +import { ScreenshotTool } from "./screenshot"; +import { SwitchModelTool } from "./switch-model"; +import { SwitchTextureTool } from "./switch-texture"; +import type { Tool } from "@/live2d/live2d/tools/tools"; export type ToolConstructor = new (config: Live2dConfig) => Tool; diff --git a/packages/live2d/src/live2d/tools/screenshot.ts b/packages/live2d/src/live2d/tools/screenshot.ts index b9af1a9..c3ce137 100644 --- a/packages/live2d/src/live2d/tools/screenshot.ts +++ b/packages/live2d/src/live2d/tools/screenshot.ts @@ -1,6 +1,6 @@ -import { sendMessage } from '../../helpers/sendMessage'; -import { isNotEmptyString } from '../../utils/isString'; -import { Tool } from './tools'; +import { sendMessage } from "@/live2d/helpers/sendMessage"; +import { isNotEmptyString } from "@/live2d/utils/isString"; +import { Tool } from "./tools"; declare const Live2D: { captureName: string; @@ -15,12 +15,12 @@ export class ScreenshotTool extends Tool { icon() { const icon = this.getConfig().screenshotIcon; - return isNotEmptyString(icon) ? icon : 'ph-camera-fill'; + return isNotEmptyString(icon) ? icon : "ph-camera-fill"; } execute() { - sendMessage('照好了嘛,是不是很可爱呢?', 6000, 2); - const screenshotName = this.getConfig().screenshotName || 'live2d'; + sendMessage("照好了嘛,是不是很可爱呢?", 6000, 2); + const screenshotName = this.getConfig().screenshotName || "live2d"; Live2D.captureName = `${screenshotName}.png`; Live2D.captureFrame = true; } diff --git a/packages/live2d/src/live2d/tools/switch-model.ts b/packages/live2d/src/live2d/tools/switch-model.ts index 7e3d263..420be1c 100644 --- a/packages/live2d/src/live2d/tools/switch-model.ts +++ b/packages/live2d/src/live2d/tools/switch-model.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from '../../utils/isString'; -import { Tool } from './tools'; +import { isNotEmptyString } from "@/live2d/utils/isString"; +import { Tool } from "./tools"; /** * 切换模型工具 @@ -9,10 +9,10 @@ export class SwitchModelTool extends Tool { icon() { const icon = this.getConfig().switchModelIcon; - return isNotEmptyString(icon) ? icon : 'ph-dress-fill'; + return isNotEmptyString(icon) ? icon : "ph-dress-fill"; } execute() { - console.log('Model switch event emitted.'); + console.log("Model switch event emitted."); } } diff --git a/packages/live2d/src/live2d/tools/switch-texture.ts b/packages/live2d/src/live2d/tools/switch-texture.ts index c4e2373..a9909e8 100644 --- a/packages/live2d/src/live2d/tools/switch-texture.ts +++ b/packages/live2d/src/live2d/tools/switch-texture.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from '../../utils/isString'; -import { Tool } from './tools'; +import { isNotEmptyString } from "@/live2d/utils/isString"; +import { Tool } from "@/live2d/live2d/tools/tools"; /** * 切换纹理工具 @@ -9,7 +9,7 @@ export class SwitchTextureTool extends Tool { icon() { const icon = this.getConfig().switchTextureIcon; - return isNotEmptyString(icon) ? icon : 'ph-arrows-counter-clockwise-fill'; + return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; } execute() { diff --git a/packages/live2d/src/live2d/tools/tools.ts b/packages/live2d/src/live2d/tools/tools.ts index eb09c05..9274299 100644 --- a/packages/live2d/src/live2d/tools/tools.ts +++ b/packages/live2d/src/live2d/tools/tools.ts @@ -1,4 +1,4 @@ -import type { Live2dConfig } from '../../context/config-context'; +import type { Live2dConfig } from "@/live2d/context/config-context"; export abstract class Tool { private _config: Live2dConfig; diff --git a/packages/live2d/src/utils/distinctArray.ts b/packages/live2d/src/utils/distinctArray.ts index 43ecf70..d5ae2ba 100644 --- a/packages/live2d/src/utils/distinctArray.ts +++ b/packages/live2d/src/utils/distinctArray.ts @@ -1,4 +1,4 @@ -import type { ObjectAny } from '../context/config-context'; +import type { ObjectAny } from "@/live2d/context/config-context"; export const distinctArray = (arr: T[], key: keyof T) => { const map = new Map(); diff --git a/packages/live2d/src/utils/unoMixin.ts b/packages/live2d/src/utils/unoMixin.ts index c4a0ac0..8a0add3 100644 --- a/packages/live2d/src/utils/unoMixin.ts +++ b/packages/live2d/src/utils/unoMixin.ts @@ -1,6 +1,6 @@ -import { type LitElement, adoptStyles, unsafeCSS } from 'lit'; +import { type LitElement, adoptStyles, unsafeCSS } from "lit"; // @ts-ignore -import style from '../styles/unocss.global.css?inline'; +import style from "@/live2d/styles/unocss.global.css?inline"; declare global { // biome-ignore lint/suspicious/noExplicitAny: any is needed to define a mixin diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 8725c11..3a85210 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -1,5 +1,9 @@ { "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/live2d/*": ["./src/*"], + }, "lib": ["ES2020", "DOM", "DOM.Iterable"], "jsx": "react-jsx", "target": "ES2020", diff --git a/packages/live2d/vite.config.ts b/packages/live2d/vite.config.ts index 9a63b48..cef5380 100644 --- a/packages/live2d/vite.config.ts +++ b/packages/live2d/vite.config.ts @@ -1,6 +1,7 @@ import { resolve } from 'node:path'; import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; +import tsconfigPaths from 'vite-tsconfig-paths'; export default defineConfig({ plugins: [ @@ -11,6 +12,7 @@ export default defineConfig({ }, }, }), + tsconfigPaths(), ], build: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e44fde5..b33cb46 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,6 +66,9 @@ importers: vite: specifier: ^6.1.0 version: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@5.7.3)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2)) packages: @@ -1397,6 +1400,9 @@ packages: resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} engines: {node: '>=0.10.0'} + globrex@0.1.2: + resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -1804,6 +1810,16 @@ packages: ts-simple-type@2.0.0-next.0: resolution: {integrity: sha512-A+hLX83gS+yH6DtzNAhzZbPfU+D9D8lHlTSd7GeoMRBjOt3GRylDqLTYbdmjA4biWvq2xSfpqfIDj2l0OA/BVg==} + tsconfck@3.1.6: + resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==} + engines: {node: ^18 || >=20} + hasBin: true + peerDependencies: + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + tsx@4.19.2: resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} engines: {node: '>=18.0.0'} @@ -1858,6 +1874,14 @@ packages: resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} engines: {node: '>= 0.4'} + vite-tsconfig-paths@5.1.4: + resolution: {integrity: sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==} + peerDependencies: + vite: '*' + peerDependenciesMeta: + vite: + optional: true + vite@6.1.0: resolution: {integrity: sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -3259,6 +3283,8 @@ snapshots: pify: 2.3.0 pinkie-promise: 2.0.1 + globrex@0.1.2: {} + gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -3700,6 +3726,10 @@ snapshots: ts-simple-type@2.0.0-next.0: {} + tsconfck@3.1.6(typescript@5.7.3): + optionalDependencies: + typescript: 5.7.3 + tsx@4.19.2: dependencies: esbuild: 0.23.1 @@ -3771,6 +3801,17 @@ snapshots: punycode: 1.4.1 qs: 6.14.0 + vite-tsconfig-paths@5.1.4(typescript@5.7.3)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2)): + dependencies: + debug: 4.4.0 + globrex: 0.1.2 + tsconfck: 3.1.6(typescript@5.7.3) + optionalDependencies: + vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + transitivePeerDependencies: + - supports-color + - typescript + vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2): dependencies: esbuild: 0.24.2 From 506e13bc70f552cc9ab2a26ebea321739fc9752e Mon Sep 17 00:00:00 2001 From: Takagi Date: Thu, 26 Feb 2026 16:14:08 +0800 Subject: [PATCH 14/26] Add AI chat stream and chat window Introduce streaming AI chat support and UI components. Adds ChatApi with SSE-style stream handling, createStreamMessage helper, and events for stream lifecycle (start/message/stop), model-ready, and toggle-chat-window. New Live2dChatWindow component for user interaction and Live2dTips updated to display streaming messages. Live2dCanvas now provides model-ready dispatch; Live2dWidget mounts the chat window when enabled and clears history on load. Tools and model updates: Tool constructors accept Model, several tools provide name() implementations, AI chat tool toggles chat window, and Model gains capture method and fixes to API usage. Also fixes live2d-tips.json selector for chat tool. --- packages/live2d/src/api/chat-api.ts | 260 ++++++++++++++++++ .../live2d/src/components/Live2dCanvas.tsx | 21 +- .../src/components/Live2dChatWindow.tsx | 229 +++++++++++++++ packages/live2d/src/components/Live2dTips.tsx | 244 +++++++++++----- .../live2d/src/components/Live2dToggle.tsx | 109 ++++---- .../live2d/src/components/Live2dTools.tsx | 164 ++++++----- .../live2d/src/components/Live2dWidget.tsx | 43 ++- packages/live2d/src/context/config-context.ts | 8 +- packages/live2d/src/events/model-ready.ts | 23 ++ packages/live2d/src/events/stream-message.ts | 57 ++++ .../live2d/src/events/toggle-chat-window.ts | 20 ++ .../live2d/src/helpers/createStreamMessage.ts | 52 ++++ packages/live2d/src/libs/live2d-tips.json | 2 +- packages/live2d/src/live2d/model.ts | 32 ++- packages/live2d/src/live2d/tools/ai-chat.ts | 12 +- packages/live2d/src/live2d/tools/asteroids.ts | 4 + .../live2d/src/live2d/tools/custom-tool.ts | 6 +- packages/live2d/src/live2d/tools/exit.ts | 4 + packages/live2d/src/live2d/tools/hitokoto.ts | 6 +- packages/live2d/src/live2d/tools/index.ts | 6 +- packages/live2d/src/live2d/tools/info.ts | 4 + .../live2d/src/live2d/tools/screenshot.ts | 10 +- .../live2d/src/live2d/tools/switch-model.ts | 11 +- .../live2d/src/live2d/tools/switch-texture.ts | 14 +- packages/live2d/src/live2d/tools/tools.ts | 14 +- 25 files changed, 1138 insertions(+), 217 deletions(-) create mode 100644 packages/live2d/src/api/chat-api.ts create mode 100644 packages/live2d/src/components/Live2dChatWindow.tsx create mode 100644 packages/live2d/src/events/model-ready.ts create mode 100644 packages/live2d/src/events/stream-message.ts create mode 100644 packages/live2d/src/events/toggle-chat-window.ts create mode 100644 packages/live2d/src/helpers/createStreamMessage.ts diff --git a/packages/live2d/src/api/chat-api.ts b/packages/live2d/src/api/chat-api.ts new file mode 100644 index 0000000..4dcfc86 --- /dev/null +++ b/packages/live2d/src/api/chat-api.ts @@ -0,0 +1,260 @@ +import { createStreamMessage } from "@/live2d/helpers/createStreamMessage"; +import { sendMessage } from "@/live2d/helpers/sendMessage"; + +/** + * 聊天消息角色 + */ +export type ChatRole = "user" | "assistant"; + +/** + * 聊天消息 + */ +export interface ChatMessage { + role: ChatRole; + content: string; +} + +/** + * 聊天 API 配置 + */ +export interface ChatApiConfig { + // API 端点 + apiEndpoint?: string; + // 请求超时时间(秒) + chunkTimeout?: number; + // 消息显示时间(秒) + showChatMessageTimeout?: number; +} + +/** + * 聊天响应结果 + */ +export interface ChatResponse { + text: string; + status: number; +} + +/** + * 聊天 API 类 + */ +export class ChatApi { + private config: ChatApiConfig; + private controller: AbortController | null = null; + private requestTimeoutId: number | null = null; + private messageTimer: number | null = null; + + constructor(config: ChatApiConfig = {}) { + this.config = { + apiEndpoint: + config.apiEndpoint || + "/apis/api.live2d.halo.run/v1alpha1/live2d/ai/chat-process", + chunkTimeout: config.chunkTimeout || 60, + showChatMessageTimeout: config.showChatMessageTimeout || 10, + }; + } + + /** + * 发送聊天消息 + * @param message 用户消息 + * @param historyMessages 历史消息列表 + * @returns Promise + */ + async sendMessage( + message: string, + historyMessages: ChatMessage[], + ): Promise { + // 添加用户消息到历史 + const userMessage: ChatMessage = { + role: "user", + content: message, + }; + historyMessages.push(userMessage); + + // 创建 AbortController 用于取消请求 + this.controller = new AbortController(); + + // 设置请求超时 + const timeoutMs = (this.config.chunkTimeout || 60) * 1000; + this.requestTimeoutId = setTimeout(() => { + this.abort(); + }, timeoutMs) as unknown as number; + + // 显示等待消息 + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + this.messageTimer = setTimeout(() => { + sendMessage("正在接收来自母星的消息,请耐心等待~", 2000, 2); + }, 5000) as unknown as number; + + try { + const apiEndpoint = this.config.apiEndpoint; + if (!apiEndpoint) { + throw new Error("API endpoint is not configured"); + } + + const response = await fetch(apiEndpoint, { + method: "POST", + cache: "no-cache", + keepalive: true, + headers: { + "Content-Type": "application/json", + Accept: "text/event-stream", + }, + body: JSON.stringify({ + message: historyMessages, + }), + signal: this.controller.signal, + }); + + if (!response.ok) { + this.handleErrorResponse(response); + return; + } + + // 处理流式响应 + await this.handleStreamResponse(response, historyMessages); + } catch (error) { + if ((error as Error).name !== "AbortError") { + console.error("[Chat API] Request failed:", error); + sendMessage("对话接口异常了哦~快去联系我的主人吧!", 5000, 4); + } + } finally { + this.cleanup(); + } + } + + /** + * 处理错误响应 + */ + private handleErrorResponse(response: Response): void { + if (response.status === 401) { + sendMessage("请先登录!", 2000, 4); + } else { + sendMessage("对话接口异常了哦~快去联系我的主人吧!", 5000, 4); + } + console.error("[Chat API] Response error:", response); + this.abort(); + } + + /** + * 处理流式响应 + */ + private async handleStreamResponse( + response: Response, + historyMessages: ChatMessage[], + ): Promise { + // 清除定时器 + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + if (this.requestTimeoutId) { + clearTimeout(this.requestTimeoutId); + this.requestTimeoutId = null; + } + + // 创建流式消息控制器 + const streamTimeout = (this.config.chunkTimeout || 60) * 1000; + const showTimeout = (this.config.showChatMessageTimeout || 10) * 1000; + const chat = createStreamMessage(streamTimeout, showTimeout); + + if (!response.body) { + throw new Error("Response body is null"); + } + + const reader = response.body.getReader(); + const textDecoder = new TextDecoder(); + + const chatMessage: ChatMessage = { + role: "assistant", + content: "", + }; + + try { + while (true) { + const { value, done } = await reader.read(); + if (done) { + break; + } + + const text = textDecoder.decode(value); + const textArrays = text.split("\n\n"); + + for (let decoderText of textArrays) { + if (!decoderText) continue; + + // 移除 "data:" 前缀 + if (decoderText.startsWith("data:")) { + const dataIndex = decoderText.indexOf("data:"); + if (dataIndex !== -1) { + decoderText = decoderText.substring(dataIndex + 5); + } + } + + try { + const chatResult: ChatResponse = JSON.parse(decoderText); + const { text, status } = chatResult; + + if (status === 200) { + if (text === "[DONE]") { + // 消息接收完成,保存到历史记录 + historyMessages.push(chatMessage); + localStorage.setItem( + "historyMessages", + JSON.stringify(historyMessages), + ); + chat.stop(); + } else { + // 追加文本片段 + chatMessage.content += text; + chat.sendMessage(text); + } + } else { + throw new Error(text); + } + } catch (e) { + console.error("[Chat API] Parse error:", decoderText, e); + chat.sendMessage(`聊天接口出现异常了:${decoderText}`); + } + } + } + } catch (error) { + console.error("[Chat API] Stream error:", error); + throw error; + } + } + + /** + * 中止当前请求 + */ + abort(): void { + if (this.controller) { + this.controller.abort(); + } + this.cleanup(); + } + + /** + * 清理资源 + */ + private cleanup(): void { + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + if (this.requestTimeoutId) { + clearTimeout(this.requestTimeoutId); + this.requestTimeoutId = null; + } + this.controller = null; + } + + /** + * 检查是否正在加载 + */ + isLoading(): boolean { + return this.controller !== null; + } +} diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index 4dcab0a..cbe2b7f 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -1,4 +1,4 @@ -import { consume } from "@lit/context"; +import { consume, provide } from "@lit/context"; import { createComponent } from "@lit/react"; import { type PropertyValues, type TemplateResult, html } from "lit"; import { property, query, state } from "lit/decorators.js"; @@ -9,6 +9,7 @@ import { configContext, } from "@/live2d/context/config-context"; import { BeforeInitEvent } from "@/live2d/events/before-init.js"; +import { ModelReadyEvent } from "@/live2d/events/model-ready"; import Model from "@/live2d/live2d/model"; export class Live2dCanvas extends UnoLitElement { @@ -17,10 +18,12 @@ export class Live2dCanvas extends UnoLitElement { public config?: Live2dConfig; @state() - private _model: unknown; + private model: Model | null = null; @query("#live2d") - private _live2d: HTMLCanvasElement; + private _live2d!: HTMLCanvasElement; + + private _modelInitialized = false; render(): TemplateResult { return html` `; @@ -28,16 +31,22 @@ export class Live2dCanvas extends UnoLitElement { connectedCallback(): void { super.connectedCallback(); - // 发出 Live2d beforeInit 事件 window.dispatchEvent(new BeforeInitEvent({ config: this.config })); } protected firstUpdated(_changedProperties: PropertyValues): void { super.firstUpdated(_changedProperties); - if (this.config && this._live2d) { - this._model = new Model(this._live2d, this.config); + + if (this.config && this._live2d && !this._modelInitialized) { + this._modelInitialized = true; + this.model = new Model(this._live2d, this.config); + window.dispatchEvent(new ModelReadyEvent({ model: this.model })); } } + + getModel(): Model | null { + return this.model; + } } customElements.define("live2d-canvas", Live2dCanvas); diff --git a/packages/live2d/src/components/Live2dChatWindow.tsx b/packages/live2d/src/components/Live2dChatWindow.tsx new file mode 100644 index 0000000..5a8b30f --- /dev/null +++ b/packages/live2d/src/components/Live2dChatWindow.tsx @@ -0,0 +1,229 @@ +import { consume } from "@lit/context"; +import { createComponent } from "@lit/react"; +import { type PropertyValues, type TemplateResult, html } from "lit"; +import { property, query, state } from "lit/decorators.js"; +import { classMap } from "lit/directives/class-map.js"; +import React from "react"; +import { UnoLitElement } from "@/live2d/common/UnoLitElement"; +import { + type Live2dConfig, + configContext, +} from "@/live2d/context/config-context"; +import { ChatApi, type ChatMessage } from "@/live2d/api/chat-api"; +import { sendMessage } from "@/live2d/helpers/sendMessage"; +import "iconify-icon"; + +/** + * Live2d 聊天窗口组件 + */ +export class Live2dChatWindow extends UnoLitElement { + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _isShow = false; + + @state() + private _isLoading = false; + + @state() + private _canSend = false; + + @query("#live2d-chat-input") + private _input?: HTMLInputElement; + + private chatApi: ChatApi | null = null; + private historyMessages: ChatMessage[] = []; + + connectedCallback(): void { + super.connectedCallback(); + // 监听聊天窗口切换事件 + window.addEventListener("live2d:toggle-chat-window", this.handleToggle); + } + + disconnectedCallback(): void { + super.disconnectedCallback(); + window.removeEventListener("live2d:toggle-chat-window", this.handleToggle); + } + + render(): TemplateResult { + const containerClasses = { + "opacity-100": this._isShow, + "opacity-0": !this._isShow, + "pointer-events-none": !this._isShow, + }; + + const sendButtonClasses = { + active: this._canSend && !this._isLoading, + }; + + return html` +
+
+
+ +
+
+ + ${ + this._isLoading + ? html`` + : html`` + } + +
+
+
+ `; + } + + /** + * 切换聊天窗口显示状态 + */ + handleToggle = (): void => { + this._isShow = !this._isShow; + if (this._isShow) { + this.updateComplete.then(() => { + this._input?.focus(); + }); + return; + } + + // 隐藏时清空输入 + if (this._input) { + this._input.value = ""; + this._canSend = false; + } + }; + + /** + * 处理输入变化 + */ + handleInput(e: Event): void { + const input = e.target as HTMLInputElement; + this._canSend = input.value.length > 0 && !this._isLoading; + } + + /** + * 处理键盘事件 + */ + handleKeydown(e: KeyboardEvent): void { + if (e.key === "Enter") { + this.sendMessage(); + } + if (e.key === "Escape") { + this._isShow = false; + } + } + + /** + * 处理发送按钮点击 + */ + handleSend(): void { + if (this._canSend && !this._isLoading) { + this.sendMessage(); + } + } + + /** + * 发送消息 + */ + private async sendMessage(): Promise { + if (!this._input || !this._input.value || this._isLoading) { + return; + } + + const message = this._input.value.trim(); + if (!message) { + return; + } + + // 清空输入框 + this._input.value = ""; + this._canSend = false; + this._isLoading = true; + + // 初始化 ChatApi(如果还没有) + if (!this.chatApi) { + this.chatApi = new ChatApi({ + chunkTimeout: Number(this.config?.chunkTimeout || 60), + showChatMessageTimeout: Number( + this.config?.showChatMessageTimeout || 10, + ), + }); + } + + // 加载历史消息 + const historyJson = localStorage.getItem("historyMessages"); + this.historyMessages = historyJson ? JSON.parse(historyJson) : []; + + try { + await this.chatApi.sendMessage(message, this.historyMessages); + } catch (error) { + console.error("[Live2dChatWindow] Send message error:", error); + } finally { + this._isLoading = false; + // 重新检查输入框状态 + if (this._input) { + this._canSend = this._input.value.length > 0; + } + } + } + + /** + * 显示首次使用提示 + */ + protected firstUpdated(_changedProperties: PropertyValues): void { + super.firstUpdated(_changedProperties); + // 监听输入框获得焦点事件 + this._input?.addEventListener("focus", () => { + sendMessage("按下回车键可以快速发送消息哦", 2000, 1); + }); + } +} + +customElements.define("live2d-chat-window", Live2dChatWindow); + +export const Live2dChatWindowComponent = createComponent({ + tagName: "live2d-chat-window", + elementClass: Live2dChatWindow, + react: React, +}); diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 7c409dd..bd324a0 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -7,96 +7,194 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import React from "react"; import { UnoLitElement } from "@/live2d/common/UnoLitElement"; import { - type Live2dConfig, - configContext, + type Live2dConfig, + configContext, } from "@/live2d/context/config-context"; import type { SendMessageEvent } from "@/live2d/events/send-message"; +import type { + StreamMessageStartEvent, + StreamMessageEvent, + StreamMessageStopEvent, +} from "@/live2d/events/stream-message"; import { isNotEmpty } from "@/live2d/utils/isNotEmpty"; import { randomSelection } from "@/live2d/utils/randomSelection"; export class Live2dTips extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; - - @state() - private _isShow = false; - @state() - private _message = ""; - private priority = -1; - private messageTimer: number | null = null; - - constructor() { - super(); - this._isShow = false; - this._message = ""; - } - - render(): TemplateResult { - const classes = { - "opacity-100": this._isShow, - "opacity-0": !this._isShow, - }; - return html` + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _isShow = false; + @state() + private _message = ""; + private priority = -1; + private messageTimer: number | null = null; + // 流式消息模式标志 + private isStreamMode = false; + + constructor() { + super(); + this._isShow = false; + this._message = ""; + } + + render(): TemplateResult { + const classes = { + "opacity-100": this._isShow, + "opacity-0": !this._isShow, + }; + return html`
${unsafeHTML(this._message)}
`; - } - - connectedCallback(): void { - super.connectedCallback(); - // 为 tips 注册 tips 相关事件 - window.addEventListener( - "live2d:send-message", - this.handleMessage.bind(this) - ); - } - - disconnectedCallback(): void { - super.disconnectedCallback(); - window.removeEventListener( - "live2d:send-message", - this.handleMessage.bind(this) - ); - } - - handleMessage(e: SendMessageEvent): void { - const { text, timeout, priority } = e.detail; - if (!isNotEmpty(text)) { - return; - } - if (priority < this.priority) { - return; - } - if (this.messageTimer) { - clearTimeout(this.messageTimer); - this.messageTimer = null; - } - const message = randomSelection(text); - if (!isNotEmpty(message)) { - return; - } - this.priority = priority; - this._message = message; - this._isShow = true; - this.messageTimer = setTimeout(() => { - this._isShow = false; - this.priority = -1; - }, timeout); - } + } + + connectedCallback(): void { + super.connectedCallback(); + // 为 tips 注册 tips 相关事件 + window.addEventListener( + "live2d:send-message", + this.handleMessage.bind(this), + ); + // 流式消息事件 + window.addEventListener( + "live2d:stream-message-start", + this.handleStreamStart.bind(this), + ); + window.addEventListener( + "live2d:stream-message", + this.handleStreamMessage.bind(this), + ); + window.addEventListener( + "live2d:stream-message-stop", + this.handleStreamStop.bind(this), + ); + } + + disconnectedCallback(): void { + super.disconnectedCallback(); + window.removeEventListener( + "live2d:send-message", + this.handleMessage.bind(this), + ); + // 移除流式消息事件监听 + window.removeEventListener( + "live2d:stream-message-start", + this.handleStreamStart.bind(this), + ); + window.removeEventListener( + "live2d:stream-message", + this.handleStreamMessage.bind(this), + ); + window.removeEventListener( + "live2d:stream-message-stop", + this.handleStreamStop.bind(this), + ); + } + + handleMessage(e: SendMessageEvent): void { + // 如果正在流式消息模式,忽略普通消息 + if (this.isStreamMode) { + return; + } + const { text, timeout, priority } = e.detail; + if (!isNotEmpty(text)) { + return; + } + if (priority < this.priority) { + return; + } + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + const message = randomSelection(text); + if (!isNotEmpty(message)) { + return; + } + this.priority = priority; + this._message = message; + this._isShow = true; + this.messageTimer = setTimeout(() => { + this._isShow = false; + this.priority = -1; + }, timeout); + } + + /** + * 处理流式消息开始事件 + */ + handleStreamStart(e: StreamMessageStartEvent): void { + const { timeout } = e.detail; + const STREAM_PRIORITY = 99999; + this.priority = STREAM_PRIORITY; + this.isStreamMode = true; + + // 清空消息并显示 + this._message = ""; + this._isShow = true; + + // 清除旧的定时器 + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + + // 设置超时自动关闭 + this.messageTimer = setTimeout(() => { + this._isShow = false; + this.priority = -1; + this.isStreamMode = false; + }, timeout); + } + + /** + * 处理流式消息片段事件 - 追加文本 + */ + handleStreamMessage(e: StreamMessageEvent): void { + if (!this.isStreamMode) { + return; + } + const { text } = e.detail; + this._message += text; + } + + /** + * 处理流式消息停止事件 + */ + handleStreamStop(e: StreamMessageStopEvent): void { + if (!this.isStreamMode) { + return; + } + const { showTimeout } = e.detail; + + // 清除旧的定时器 + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + + // 设置新的定时器,在指定时间后关闭 + this.messageTimer = setTimeout(() => { + this._isShow = false; + this.priority = -1; + this.isStreamMode = false; + }, showTimeout); + } } customElements.define("live2d-tips", Live2dTips); export const Live2dTipsComponent = createComponent({ - tagName: "live2d-tips", - elementClass: Live2dTips, - react: React, + tagName: "live2d-tips", + elementClass: Live2dTips, + react: React, }); diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index beab616..186a537 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -6,65 +6,82 @@ import { UnoLitElement } from "@/live2d/common/UnoLitElement"; import { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; export class Live2dToggle extends UnoLitElement { - @state() - // 当前工具栏是否显示 - private _isShow = false; + @state() + // 当前工具栏是否显示 + private _isShow = false; - connectedCallback(): void { - super.connectedCallback(); - this.addEventListener("click", this.handleClick); + connectedCallback(): void { + super.connectedCallback(); + this.addEventListener("click", this.handleClick); + window.addEventListener("live2d:toggle-canvas", this.handleGlobalToggle); - // 初始化时,判断是否已经隐藏看板娘超过一天,如果是,则显示看板娘。否则,继续隐藏看板娘。 - const live2dDisplay = localStorage.getItem("live2d-display"); - if (live2dDisplay) { - if (Date.now() - Number.parseInt(live2dDisplay) <= 24 * 60 * 60 * 1000) { - this.triggerToggleLive2d(false); - return; - } - } - this.triggerToggleLive2d(true); - } + Promise.resolve().then(() => { + const live2dDisplay = localStorage.getItem("live2d-display"); + if (live2dDisplay) { + if ( + Date.now() - Number.parseInt(live2dDisplay) <= + 24 * 60 * 60 * 1000 + ) { + this.triggerToggleLive2d(false); + return; + } + } + this.triggerToggleLive2d(true); + }); + } - disconnectedCallback(): void { - super.disconnectedCallback(); - this.removeEventListener("click", this.handleClick); - } + disconnectedCallback(): void { + super.disconnectedCallback(); + this.removeEventListener("click", this.handleClick); + window.removeEventListener("live2d:toggle-canvas", this.handleGlobalToggle); + } - render(): TemplateResult { - return html`
看板娘
`; - } + } - handleClick() { - this.triggerToggleLive2d(!!this._isShow); - } + handleClick() { + this.triggerToggleLive2d(!!this._isShow); + } - triggerToggleLive2d(isShow: boolean) { - // 当前切换栏与 Live2d 的显示状态相反 - this._isShow = !isShow; - if (isShow) { - localStorage.removeItem("live2d-display"); - } else { - localStorage.setItem("live2d-display", Date.now().toString()); - } - this.dispatchEvent( - new ToggleCanvasEvent({ - isShow, - }) - ); - } + triggerToggleLive2d(isShow: boolean) { + this._isShow = !isShow; + if (isShow) { + localStorage.removeItem("live2d-display"); + } else { + localStorage.setItem("live2d-display", Date.now().toString()); + } + this.dispatchEvent( + new ToggleCanvasEvent({ + isShow, + }), + ); + } + + handleGlobalToggle = (e: Event) => { + const event = e as ToggleCanvasEvent; + this._isShow = !event.detail.isShow; + if (event.detail.isShow) { + localStorage.removeItem("live2d-display"); + } else { + localStorage.setItem("live2d-display", Date.now().toString()); + } + }; } customElements.define("live2d-toggle", Live2dToggle); export const Live2dToggleComponent = createComponent({ - tagName: "live2d-toggle", - elementClass: Live2dToggle, - react: React, + tagName: "live2d-toggle", + elementClass: Live2dToggle, + react: React, }); diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 1019e21..0943191 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -5,34 +5,38 @@ import { property, state } from "lit/decorators.js"; import React from "react"; import { UnoLitElement } from "@/live2d/common/UnoLitElement"; import { - type Live2dConfig, - configContext, + type Live2dConfig, + configContext, } from "@/live2d/context/config-context"; +import type { ModelReadyEvent } from "@/live2d/events/model-ready"; +import type Model from "@/live2d/live2d/model"; import presetTools from "@/live2d/live2d/tools"; import { CustomTool } from "@/live2d/live2d/tools/custom-tool"; import type { Tool } from "@/live2d/live2d/tools/tools"; import "iconify-icon"; export class Live2dTools extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; - @state() - private _tools: Tool[] = []; + private model?: Model | null; - render(): TemplateResult { - return html`
${this._tools.map(this.renderTool)}
`; - } + } - renderTool(tool: Tool): TemplateResult { - return html` tool.execute()} > `; - } + } + + connectedCallback(): void { + super.connectedCallback(); + window.addEventListener( + "live2d:model-ready", + this.handleModelReady.bind(this), + ); + } + + disconnectedCallback(): void { + super.disconnectedCallback(); + window.removeEventListener( + "live2d:model-ready", + this.handleModelReady.bind(this), + ); + } + + handleModelReady(e: ModelReadyEvent): void { + this.model = e.detail.model; + if (this.config && this._tools.length === 0) { + this.initializeTools(); + } + } - connectedCallback(): void { - super.connectedCallback(); - // 根据配置生成对应的工具 - this.initializeTools(); - } + private initializeTools(): void { + const presetToolsList = this.getPresetTools(); + const customTools = this.getCustomTools(); + const tools = [...presetToolsList, ...customTools].sort( + (a, b) => b.priority - a.priority, + ); + this._tools = tools; + } - private initializeTools(): void { - // 获取预设工具 - const presetTools = this.getPresetTools(); - // 获取自定义工具 - const customTools = this.getCustomTools(); - // 合并所有工具,并按照 priority 排序 - const tools = [...presetTools, ...customTools].sort( - (a, b) => b.priority - a.priority - ); - this._tools.push(...tools); - } + private getCustomTools(): Tool[] { + if (!this.config) { + return []; + } + const customTools = this.config?.customTools; + if (!customTools || customTools.length === 0) { + return []; + } + const mountTool: Tool[] = []; + for (const tool of customTools) { + const customTool = new CustomTool(this.config, tool, this.model); + mountTool.push(customTool); + } + return mountTool; + } - private getCustomTools(): Tool[] { - if (!this.config) { - return []; - } - const customTools = this.config?.customTools; - if (!customTools || customTools.length === 0) { - return []; - } - const mountTool: Tool[] = []; - for (const tool of customTools) { - const customTool = new CustomTool(this.config, tool); - mountTool.push(customTool); - } - return mountTool; - } + // 获取预设工具 + private getPresetTools(): Tool[] { + if (!this.config) { + return []; + } + const mountTool: Tool[] = []; + const tools = this.config?.tools; - // 获取预设工具 - private getPresetTools(): Tool[] { - if (!this.config) { - return []; - } - const mountTool: Tool[] = []; - const tools = this.config?.tools; - if (!tools || tools.length === 0) { - // 加载所有预设工具 - for (const Tool of presetTools) { - mountTool.push(new Tool(this.config)); - } - return mountTool; - } + if (!tools || tools.length === 0) { + // 没有指定工具列表,加载所有预设工具 + for (const tool of presetTools) { + mountTool.push(new tool(this.config, this.model)); + } + return mountTool; + } - for (const toolName of tools) { - const ToolClass = presetTools.find((t) => t.name === toolName); - if (ToolClass) { - mountTool.push(new ToolClass(this.config)); - } - } - return mountTool; - } + for (const toolName of tools) { + const ToolClass = presetTools.find( + (t) => + t.name === toolName || + t.name === + `${toolName.charAt(0).toUpperCase() + toolName.slice(1)}Tool`, + ); + if (ToolClass) { + mountTool.push(new ToolClass(this.config, this.model)); + } + } + return mountTool; + } } customElements.define("live2d-tools", Live2dTools); export const Live2dToolsComponent = createComponent({ - tagName: "live2d-tools", - elementClass: Live2dTools, - react: React, + tagName: "live2d-tools", + elementClass: Live2dTools, + react: React, }); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 7ee3b4e..a50f16b 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -12,6 +12,7 @@ import "@/live2d/components/Live2dToggle"; import "@/live2d/components/Live2dTips"; import "@/live2d/components/Live2dCanvas"; import "@/live2d/components/Live2dTools"; +import "@/live2d/components/Live2dChatWindow"; import type { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; export class Live2dWidget extends UnoLitElement { @@ -28,6 +29,7 @@ export class Live2dWidget extends UnoLitElement { @live2d:toggle-canvas=${this.handleToggleWidget} > ${this.renderLive2dWidget()} + ${this.renderChatWindow()} `; } @@ -54,8 +56,47 @@ export class Live2dWidget extends UnoLitElement { } } - handleToggleWidget(e: ToggleCanvasEvent) { + handleToggleWidget = (e: ToggleCanvasEvent) => { this._isShow = e.detail.isShow; + this.requestUpdate(); + }; + + /** + * 渲染聊天窗口组件(如果启用了 AI 聊天功能) + */ + renderChatWindow() { + // 检查是否启用了 AI 聊天 + if (this.config?.isAiChat) { + return html``; + } + } + + connectedCallback(): void { + super.connectedCallback(); + // 页面加载时清除历史消息 + // 对应原始代码中的 window.onload + window.addEventListener("load", this.clearChatHistory); + // 监听全局的 toggle-canvas 事件(来自工具或其他地方的触发) + window.addEventListener( + "live2d:toggle-canvas", + this.handleToggleWidget as EventListener, + ); + } + + disconnectedCallback(): void { + super.disconnectedCallback(); + window.removeEventListener("load", this.clearChatHistory); + window.removeEventListener( + "live2d:toggle-canvas", + this.handleToggleWidget as EventListener, + ); + } + + /** + * 清除聊天历史记录 + */ + private clearChatHistory(): void { + localStorage.removeItem("historyMessages"); } } diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index dafdc8f..addabe1 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -45,8 +45,14 @@ export interface Live2dToolsConfig { tools?: string[]; // 自定义工具 customTools?: CustomToolConfig[]; + // 是否启用 AI 聊天功能 + isAiChat?: boolean; // openai 图标 openaiIcon?: string; + // 聊天请求超时时间(秒) + chunkTimeout?: number; + // 聊天消息显示时间(秒) + showChatMessageTimeout?: number; // 一言图标 hitokotoIcon?: string; // 一言API @@ -94,7 +100,7 @@ export interface Live2dConfig extends Live2dToolsConfig { }[]; selector: string; mouseAction: "click" | "mouseover" | string | undefined; - } + }, ]; // 页面可见性变化时的 tips backSiteTip: string[] | string; diff --git a/packages/live2d/src/events/model-ready.ts b/packages/live2d/src/events/model-ready.ts new file mode 100644 index 0000000..bb1b02a --- /dev/null +++ b/packages/live2d/src/events/model-ready.ts @@ -0,0 +1,23 @@ +import { Live2dEvent } from "@/live2d/events/types"; +import type Model from "@/live2d/live2d/model"; + +export const MODEL_READY_EVENT_NAME = "live2d:model-ready" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [MODEL_READY_EVENT_NAME]: ModelReadyEvent; + } +} + +export interface ModelReadyEventDetail { + model: Model; +} + +/** + * Model 准备就绪事件 + */ +export class ModelReadyEvent extends Live2dEvent { + constructor(detail: ModelReadyEventDetail) { + super(MODEL_READY_EVENT_NAME, detail); + } +} diff --git a/packages/live2d/src/events/stream-message.ts b/packages/live2d/src/events/stream-message.ts new file mode 100644 index 0000000..26a85f6 --- /dev/null +++ b/packages/live2d/src/events/stream-message.ts @@ -0,0 +1,57 @@ +import { Live2dEvent } from "@/live2d/events/types"; + +export const STREAM_MESSAGE_START_EVENT_NAME = + "live2d:stream-message-start" as const; +export const STREAM_MESSAGE_EVENT_NAME = "live2d:stream-message" as const; +export const STREAM_MESSAGE_STOP_EVENT_NAME = + "live2d:stream-message-stop" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [STREAM_MESSAGE_START_EVENT_NAME]: StreamMessageStartEvent; + [STREAM_MESSAGE_EVENT_NAME]: StreamMessageEvent; + [STREAM_MESSAGE_STOP_EVENT_NAME]: StreamMessageStopEvent; + } +} + +export interface StreamMessageStartEventDetail { + // 等待消息流的最大时间 + timeout: number; +} + +export interface StreamMessageEventDetail { + // 流式消息文本片段 + text: string; +} + +export interface StreamMessageStopEventDetail { + // 停止后显示的时间 + showTimeout: number; +} + +/** + * 流式消息开始事件 - 初始化流式消息模式 + */ +export class StreamMessageStartEvent extends Live2dEvent { + constructor(detail: StreamMessageStartEventDetail) { + super(STREAM_MESSAGE_START_EVENT_NAME, detail); + } +} + +/** + * 流式消息事件 - 用于追加文本到提示框 + */ +export class StreamMessageEvent extends Live2dEvent { + constructor(detail: StreamMessageEventDetail) { + super(STREAM_MESSAGE_EVENT_NAME, detail); + } +} + +/** + * 流式消息停止事件 - 用于停止流式消息 + */ +export class StreamMessageStopEvent extends Live2dEvent { + constructor(detail: StreamMessageStopEventDetail) { + super(STREAM_MESSAGE_STOP_EVENT_NAME, detail); + } +} diff --git a/packages/live2d/src/events/toggle-chat-window.ts b/packages/live2d/src/events/toggle-chat-window.ts new file mode 100644 index 0000000..f186016 --- /dev/null +++ b/packages/live2d/src/events/toggle-chat-window.ts @@ -0,0 +1,20 @@ +import { Live2dEvent } from "@/live2d/events/types"; + +export const TOGGLE_CHAT_WINDOW_EVENT_NAME = + "live2d:toggle-chat-window" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [TOGGLE_CHAT_WINDOW_EVENT_NAME]: ToggleChatWindowEvent; + } +} + +/** + * 切换聊天窗口事件 + * 不需要传递参数,每次触发都会切换显示状态 + */ +export class ToggleChatWindowEvent extends Live2dEvent> { + constructor() { + super(TOGGLE_CHAT_WINDOW_EVENT_NAME, {}); + } +} diff --git a/packages/live2d/src/helpers/createStreamMessage.ts b/packages/live2d/src/helpers/createStreamMessage.ts new file mode 100644 index 0000000..5349ec7 --- /dev/null +++ b/packages/live2d/src/helpers/createStreamMessage.ts @@ -0,0 +1,52 @@ +import { + StreamMessageStartEvent, + StreamMessageEvent, + StreamMessageStopEvent, +} from "@/live2d/events/stream-message"; + +/** + * 创建一个流式消息控制器 + * 此消息框的优先级将大于所有其他消息框优先级,且不会被其他消息覆盖。 + * + * @param timeout 等待消息流的最大时间,超过此时间将自动关闭流消息框(毫秒) + * @param showTimeout 消息全部接受完之后,展示时长(毫秒) + * @returns 包含 sendMessage 和 stop 方法的控制器对象 + */ +export function createStreamMessage( + timeout: number, + showTimeout: number, +): StreamMessageController { + // 发送开始流式消息的事件,通知 Live2dTips 组件进入流式模式 + window.dispatchEvent(new StreamMessageStartEvent({ timeout })); + + /** + * 发送文本片段到流式消息框 + * @param text 要追加的文本 + */ + const sendMessage = (text: string) => { + window.dispatchEvent(new StreamMessageEvent({ text })); + }; + + /** + * 停止流式消息,并在指定时间后关闭消息框 + */ + const stop = () => { + window.dispatchEvent(new StreamMessageStopEvent({ showTimeout })); + }; + + return { + sendMessage, + stop, + }; +} + +export interface StreamMessageController { + /** + * 发送消息片段 + */ + sendMessage: (text: string) => void; + /** + * 停止流式消息 + */ + stop: () => void; +} diff --git a/packages/live2d/src/libs/live2d-tips.json b/packages/live2d/src/libs/live2d-tips.json index 1846253..9649300 100644 --- a/packages/live2d/src/libs/live2d-tips.json +++ b/packages/live2d/src/libs/live2d-tips.json @@ -17,7 +17,7 @@ ] }, { - "selector": "#live2d-tool-openai", + "selector": "#live2d-tool-chat", "text": [ "想要和我聊天吗?", "我可是知道不少东西的!", diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index 32a2990..b170a31 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -58,7 +58,7 @@ class Model { this.loadModel( Number(modelId), Number(modelTexturesId), - "Live2D 模型加载中..." + "Live2D 模型加载中...", ); } @@ -72,25 +72,27 @@ class Model { async loadModel(modelId: number, modelTexturesId: number, text?: string) { localStorage.setItem("modelId", String(modelId)); localStorage.setItem("modelTexturesId", String(modelTexturesId)); + // 发送消息事件 if (text) { sendMessage(text, 4000, 3); } const model = await Live2DModel.from( - "https://live2d.fghrsh.net/api/get/?id=1-53", + `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, { onLoad: () => { console.log( - `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成` + `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`, ); }, - } + }, ); const scaleX = this.#app.view.height / model.width; const scaleY = this.#app.view.height / model.height; model.scale.set(scaleX, scaleY); + this.#app.stage.removeChildren(); this.#app.stage.addChild(model); } @@ -102,7 +104,7 @@ class Model { const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); // 可选 "rand"(随机), "switch"(顺序) const result = (await fetch( - `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}` + `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`, ).then((response) => response.json())) as ModelTexturesResult; const texturesId = result.textures.id; if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { @@ -118,10 +120,28 @@ class Model { async loadOtherModel() { const modelId = Number(localStorage.getItem("modelId")); const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( - (response) => response.json() + (response) => response.json(), )) as ModelResult; this.loadModel(result.model.id, 0, result.model.message); } + + /** + * 截图 + * @param screenshotName 截图名称 + */ + async capture(screenshotName: string) { + this.#app.renderer.plugins.extract + .canvas(this.#app.stage) + .toBlob((blob: Blob) => { + const url = URL.createObjectURL(blob); + const a = document.createElement("a"); + a.href = url; + a.download = `${screenshotName}.png`; + a.click(); + URL.revokeObjectURL(url); + a.remove(); + }); + } } export default Model; diff --git a/packages/live2d/src/live2d/tools/ai-chat.ts b/packages/live2d/src/live2d/tools/ai-chat.ts index 7b38e0f..06f2f85 100644 --- a/packages/live2d/src/live2d/tools/ai-chat.ts +++ b/packages/live2d/src/live2d/tools/ai-chat.ts @@ -1,3 +1,4 @@ +import { ToggleChatWindowEvent } from "@/live2d/events/toggle-chat-window"; import { isNotEmptyString } from "@/live2d/utils/isString"; import { Tool } from "@/live2d/live2d/tools/tools"; @@ -7,12 +8,19 @@ import { Tool } from "@/live2d/live2d/tools/tools"; export class AIChatTool extends Tool { priority = 100; + name(): string { + return "chat"; + } + icon() { - const icon = this.getConfig().aiChatUrl; + const icon = this.getConfig().openaiIcon; return isNotEmptyString(icon) ? icon : "ph-chats-circle-fill"; } + /** + * 执行工具 - 切换聊天窗口显示状态 + */ execute() { - // TODO: 打开 AI 聊天 + window.dispatchEvent(new ToggleChatWindowEvent()); } } diff --git a/packages/live2d/src/live2d/tools/asteroids.ts b/packages/live2d/src/live2d/tools/asteroids.ts index c0a0101..eb43507 100644 --- a/packages/live2d/src/live2d/tools/asteroids.ts +++ b/packages/live2d/src/live2d/tools/asteroids.ts @@ -17,6 +17,10 @@ export class AsteroidsTool extends Tool { return isNotEmptyString(icon) ? icon : "ph-paper-plane-tilt-fill"; } + name(): string { + return "asteroids"; + } + execute() { // @ts-ignore import("@/live2d/libs/asteroids.min.js").then((module) => { diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index 3f3d8b0..b409396 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -1,4 +1,5 @@ import type { Live2dConfig } from "@/live2d/context/config-context"; +import type Model from "@/live2d/live2d/model"; import { isNotEmptyString } from "@/live2d/utils/isString"; import { Tool } from "@/live2d/live2d/tools/tools"; @@ -20,9 +21,10 @@ export class CustomTool extends Tool { constructor( config: Live2dConfig, - { name, icon, execute, priority }: CustomToolConfig + { name, icon, execute, priority }: CustomToolConfig, + model?: Model | null ) { - super(config); + super(config, model); this._name = name; this._icon = icon; this._execute = execute; diff --git a/packages/live2d/src/live2d/tools/exit.ts b/packages/live2d/src/live2d/tools/exit.ts index fd94674..ea538ec 100644 --- a/packages/live2d/src/live2d/tools/exit.ts +++ b/packages/live2d/src/live2d/tools/exit.ts @@ -14,6 +14,10 @@ export class ExitTool extends Tool { return isNotEmptyString(icon) ? icon : "ph-x-bold"; } + name(): string { + return "quit"; + } + execute() { sendMessage("愿你有一天能与重要的人重逢。", 2000, 4); setTimeout(() => { diff --git a/packages/live2d/src/live2d/tools/hitokoto.ts b/packages/live2d/src/live2d/tools/hitokoto.ts index dd253c3..8d6ae1c 100644 --- a/packages/live2d/src/live2d/tools/hitokoto.ts +++ b/packages/live2d/src/live2d/tools/hitokoto.ts @@ -14,6 +14,10 @@ export class HitokotoTool extends Tool { _default_api = "https://v1.hitokoto.cn"; + name(): string { + return "hitokoto"; + } + icon() { const icon = this.getConfig().aiChatUrl; return isNotEmptyString(icon) ? icon : "ph-chat-circle-fill"; @@ -39,7 +43,7 @@ export class HitokotoTool extends Tool { const { hitokoto, from, creator } = await this._fetchHitokoto(hitokotoApi); if (isNotEmptyString(hitokoto)) { return { - hitokoto: "hitokoto", + hitokoto, description: `这句一言来自 「${from}」,是 ${creator} 在 hitokoto.cn 投稿的。`, }; } diff --git a/packages/live2d/src/live2d/tools/index.ts b/packages/live2d/src/live2d/tools/index.ts index bf5f3cc..915c5a9 100644 --- a/packages/live2d/src/live2d/tools/index.ts +++ b/packages/live2d/src/live2d/tools/index.ts @@ -1,4 +1,5 @@ import type { Live2dConfig } from "@/live2d/context/config-context"; +import type Model from "@/live2d/live2d/model"; import { AIChatTool } from "./ai-chat"; import { AsteroidsTool } from "./asteroids"; import { ExitTool } from "./exit"; @@ -9,7 +10,10 @@ import { SwitchModelTool } from "./switch-model"; import { SwitchTextureTool } from "./switch-texture"; import type { Tool } from "@/live2d/live2d/tools/tools"; -export type ToolConstructor = new (config: Live2dConfig) => Tool; +export type ToolConstructor = new ( + config: Live2dConfig, + model?: Model | null +) => Tool; export const presetTools: ToolConstructor[] = [ AsteroidsTool, diff --git a/packages/live2d/src/live2d/tools/info.ts b/packages/live2d/src/live2d/tools/info.ts index 2672daa..7a08345 100644 --- a/packages/live2d/src/live2d/tools/info.ts +++ b/packages/live2d/src/live2d/tools/info.ts @@ -7,6 +7,10 @@ import { Tool } from './tools'; export class InfoTool extends Tool { priority = 40; + name(): string { + return "info"; + } + icon() { const icon = this.getConfig().infoIcon; return isNotEmptyString(icon) ? icon : 'ph-info-fill'; diff --git a/packages/live2d/src/live2d/tools/screenshot.ts b/packages/live2d/src/live2d/tools/screenshot.ts index c3ce137..d41cb20 100644 --- a/packages/live2d/src/live2d/tools/screenshot.ts +++ b/packages/live2d/src/live2d/tools/screenshot.ts @@ -13,6 +13,10 @@ declare const Live2D: { export class ScreenshotTool extends Tool { priority = 50; + name(): string { + return "photo"; + } + icon() { const icon = this.getConfig().screenshotIcon; return isNotEmptyString(icon) ? icon : "ph-camera-fill"; @@ -21,7 +25,9 @@ export class ScreenshotTool extends Tool { execute() { sendMessage("照好了嘛,是不是很可爱呢?", 6000, 2); const screenshotName = this.getConfig().screenshotName || "live2d"; - Live2D.captureName = `${screenshotName}.png`; - Live2D.captureFrame = true; + const model = this.getModel(); + if (model) { + model.capture(screenshotName); + } } } diff --git a/packages/live2d/src/live2d/tools/switch-model.ts b/packages/live2d/src/live2d/tools/switch-model.ts index 420be1c..38b2f35 100644 --- a/packages/live2d/src/live2d/tools/switch-model.ts +++ b/packages/live2d/src/live2d/tools/switch-model.ts @@ -7,12 +7,19 @@ import { Tool } from "./tools"; export class SwitchModelTool extends Tool { priority = 70; + name(): string { + return "switch-model"; + } + icon() { const icon = this.getConfig().switchModelIcon; - return isNotEmptyString(icon) ? icon : "ph-dress-fill"; + return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; } execute() { - console.log("Model switch event emitted."); + const model = this.getModel(); + if (model) { + model.loadOtherModel(); + } } } diff --git a/packages/live2d/src/live2d/tools/switch-texture.ts b/packages/live2d/src/live2d/tools/switch-texture.ts index a9909e8..ea89ede 100644 --- a/packages/live2d/src/live2d/tools/switch-texture.ts +++ b/packages/live2d/src/live2d/tools/switch-texture.ts @@ -7,12 +7,22 @@ import { Tool } from "@/live2d/live2d/tools/tools"; export class SwitchTextureTool extends Tool { priority = 60; + name(): string { + return "switch-texture"; + } + icon() { const icon = this.getConfig().switchTextureIcon; - return isNotEmptyString(icon) ? icon : "ph-arrows-counter-clockwise-fill"; + return isNotEmptyString(icon) ? icon : "ph-dress-fill"; } + /** + * 执行工具 - 直接调用 model 的切换纹理方法 + */ execute() { - // 发出切换模型的事件 + const model = this.getModel(); + if (model) { + model.loadRandTextures(); + } } } diff --git a/packages/live2d/src/live2d/tools/tools.ts b/packages/live2d/src/live2d/tools/tools.ts index 9274299..6a7687f 100644 --- a/packages/live2d/src/live2d/tools/tools.ts +++ b/packages/live2d/src/live2d/tools/tools.ts @@ -1,14 +1,18 @@ import type { Live2dConfig } from "@/live2d/context/config-context"; +import type Model from "@/live2d/live2d/model"; export abstract class Tool { private _config: Live2dConfig; + protected model?: Model | null; + /** * 优先级, 数字越大越靠前 */ abstract priority: number; - constructor(config: Live2dConfig) { + constructor(config: Live2dConfig, model?: Model | null) { this._config = config; + this.model = model; } name(): string { @@ -22,4 +26,12 @@ export abstract class Tool { protected getConfig(): Live2dConfig { return this._config; } + + setModel(model: Model | null): void { + this.model = model; + } + + protected getModel(): Model | null | undefined { + return this.model; + } } From a4ba20854e55c58c15855e81be7d58c46e14721e Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Wed, 13 May 2026 16:35:13 +0800 Subject: [PATCH 15/26] fix: reuse asteroids loader Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- packages/live2d/src/libs/asteroids.min.js | 3 ++- packages/live2d/src/live2d/tools/asteroids.ts | 16 +++++++++++----- packages/live2d/src/types/assets.d.ts | 1 + 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 packages/live2d/src/types/assets.d.ts diff --git a/packages/live2d/src/libs/asteroids.min.js b/packages/live2d/src/libs/asteroids.min.js index 78fc3ca..c5bc2f6 100644 --- a/packages/live2d/src/libs/asteroids.min.js +++ b/packages/live2d/src/libs/asteroids.min.js @@ -636,5 +636,6 @@ function Asteroids() { }; } +window.Asteroids = Asteroids; if (!window.ASTEROIDSPLAYERS) window.ASTEROIDSPLAYERS = []; -window.ASTEROIDSPLAYERS.push(new Asteroids()); \ No newline at end of file +window.ASTEROIDSPLAYERS.push(new Asteroids()); diff --git a/packages/live2d/src/live2d/tools/asteroids.ts b/packages/live2d/src/live2d/tools/asteroids.ts index eb43507..1852d2c 100644 --- a/packages/live2d/src/live2d/tools/asteroids.ts +++ b/packages/live2d/src/live2d/tools/asteroids.ts @@ -1,9 +1,10 @@ -import { isNotEmptyString } from "@/live2d/utils/isString"; import { Tool } from "@/live2d/live2d/tools/tools"; +import { isNotEmptyString } from "@/live2d/utils/isString"; declare global { interface Window { ASTEROIDSPLAYERS: unknown[]; + Asteroids?: new () => unknown; } } @@ -22,9 +23,14 @@ export class AsteroidsTool extends Tool { } execute() { - // @ts-ignore - import("@/live2d/libs/asteroids.min.js").then((module) => { - new module.default(); - }); + if (typeof window.Asteroids === "function") { + if (!Array.isArray(window.ASTEROIDSPLAYERS)) { + window.ASTEROIDSPLAYERS = []; + } + window.ASTEROIDSPLAYERS.push(new window.Asteroids()); + return; + } + + void import("@/live2d/libs/asteroids.min.js"); } } diff --git a/packages/live2d/src/types/assets.d.ts b/packages/live2d/src/types/assets.d.ts new file mode 100644 index 0000000..8b69167 --- /dev/null +++ b/packages/live2d/src/types/assets.d.ts @@ -0,0 +1 @@ +declare module "@/live2d/libs/asteroids.min.js"; From b5b4e978bef10677db0f13d224c163d351ef3d38 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Wed, 13 May 2026 16:36:43 +0800 Subject: [PATCH 16/26] chore: add openspec assistant templates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .claude/commands/opsx/apply.md | 152 +++++++++ .claude/commands/opsx/archive.md | 157 ++++++++++ .claude/commands/opsx/explore.md | 173 +++++++++++ .claude/commands/opsx/propose.md | 106 +++++++ .claude/skills/openspec-apply-change/SKILL.md | 156 ++++++++++ .../skills/openspec-archive-change/SKILL.md | 114 +++++++ .claude/skills/openspec-explore/SKILL.md | 288 ++++++++++++++++++ .claude/skills/openspec-propose/SKILL.md | 110 +++++++ .cursor/commands/opsx-apply.md | 152 +++++++++ .cursor/commands/opsx-archive.md | 157 ++++++++++ .cursor/commands/opsx-explore.md | 173 +++++++++++ .cursor/commands/opsx-propose.md | 106 +++++++ .cursor/skills/openspec-apply-change/SKILL.md | 156 ++++++++++ .../skills/openspec-archive-change/SKILL.md | 114 +++++++ .cursor/skills/openspec-explore/SKILL.md | 288 ++++++++++++++++++ .cursor/skills/openspec-propose/SKILL.md | 110 +++++++ .github/prompts/opsx-apply.prompt.md | 149 +++++++++ .github/prompts/opsx-archive.prompt.md | 154 ++++++++++ .github/prompts/opsx-explore.prompt.md | 170 +++++++++++ .github/prompts/opsx-propose.prompt.md | 103 +++++++ .github/skills/openspec-apply-change/SKILL.md | 156 ++++++++++ .../skills/openspec-archive-change/SKILL.md | 114 +++++++ .github/skills/openspec-explore/SKILL.md | 288 ++++++++++++++++++ .github/skills/openspec-propose/SKILL.md | 110 +++++++ 24 files changed, 3756 insertions(+) create mode 100644 .claude/commands/opsx/apply.md create mode 100644 .claude/commands/opsx/archive.md create mode 100644 .claude/commands/opsx/explore.md create mode 100644 .claude/commands/opsx/propose.md create mode 100644 .claude/skills/openspec-apply-change/SKILL.md create mode 100644 .claude/skills/openspec-archive-change/SKILL.md create mode 100644 .claude/skills/openspec-explore/SKILL.md create mode 100644 .claude/skills/openspec-propose/SKILL.md create mode 100644 .cursor/commands/opsx-apply.md create mode 100644 .cursor/commands/opsx-archive.md create mode 100644 .cursor/commands/opsx-explore.md create mode 100644 .cursor/commands/opsx-propose.md create mode 100644 .cursor/skills/openspec-apply-change/SKILL.md create mode 100644 .cursor/skills/openspec-archive-change/SKILL.md create mode 100644 .cursor/skills/openspec-explore/SKILL.md create mode 100644 .cursor/skills/openspec-propose/SKILL.md create mode 100644 .github/prompts/opsx-apply.prompt.md create mode 100644 .github/prompts/opsx-archive.prompt.md create mode 100644 .github/prompts/opsx-explore.prompt.md create mode 100644 .github/prompts/opsx-propose.prompt.md create mode 100644 .github/skills/openspec-apply-change/SKILL.md create mode 100644 .github/skills/openspec-archive-change/SKILL.md create mode 100644 .github/skills/openspec-explore/SKILL.md create mode 100644 .github/skills/openspec-propose/SKILL.md diff --git a/.claude/commands/opsx/apply.md b/.claude/commands/opsx/apply.md new file mode 100644 index 0000000..ae14f0f --- /dev/null +++ b/.claude/commands/opsx/apply.md @@ -0,0 +1,152 @@ +--- +name: "OPSX: Apply" +description: Implement tasks from an OpenSpec change (Experimental) +category: Workflow +tags: [workflow, artifacts, experimental] +--- + +Implement tasks from an OpenSpec change. + +**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes. + +**Steps** + +1. **Select the change** + + If a name is provided, use it. Otherwise: + - Infer from conversation context if the user mentioned a change + - Auto-select if only one active change exists + - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select + + Always announce: "Using change: " and how to override (e.g., `/opsx:apply `). + +2. **Check status to understand the schema** + ```bash + openspec status --change "" --json + ``` + Parse the JSON to understand: + - `schemaName`: The workflow being used (e.g., "spec-driven") + - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others) + +3. **Get apply instructions** + + ```bash + openspec instructions apply --change "" --json + ``` + + This returns: + - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema) + - Progress (total, complete, remaining) + - Task list with status + - Dynamic instruction based on current state + + **Handle states:** + - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue` + - If `state: "all_done"`: congratulate, suggest archive + - Otherwise: proceed to implementation + +4. **Read context files** + + Read every file path listed under `contextFiles` from the apply instructions output. + The files depend on the schema being used: + - **spec-driven**: proposal, specs, design, tasks + - Other schemas: follow the contextFiles from CLI output + +5. **Show current progress** + + Display: + - Schema being used + - Progress: "N/M tasks complete" + - Remaining tasks overview + - Dynamic instruction from CLI + +6. **Implement tasks (loop until done or blocked)** + + For each pending task: + - Show which task is being worked on + - Make the code changes required + - Keep changes minimal and focused + - Mark task complete in the tasks file: `- [ ]` → `- [x]` + - Continue to next task + + **Pause if:** + - Task is unclear → ask for clarification + - Implementation reveals a design issue → suggest updating artifacts + - Error or blocker encountered → report and wait for guidance + - User interrupts + +7. **On completion or pause, show status** + + Display: + - Tasks completed this session + - Overall progress: "N/M tasks complete" + - If all done: suggest archive + - If paused: explain why and wait for guidance + +**Output During Implementation** + +``` +## Implementing: (schema: ) + +Working on task 3/7: +[...implementation happening...] +✓ Task complete + +Working on task 4/7: +[...implementation happening...] +✓ Task complete +``` + +**Output On Completion** + +``` +## Implementation Complete + +**Change:** +**Schema:** +**Progress:** 7/7 tasks complete ✓ + +### Completed This Session +- [x] Task 1 +- [x] Task 2 +... + +All tasks complete! You can archive this change with `/opsx:archive`. +``` + +**Output On Pause (Issue Encountered)** + +``` +## Implementation Paused + +**Change:** +**Schema:** +**Progress:** 4/7 tasks complete + +### Issue Encountered + + +**Options:** +1.
`; - } - - /** - * 切换聊天窗口显示状态 - */ - handleToggle = (): void => { - this._isShow = !this._isShow; - if (this._isShow) { - this.updateComplete.then(() => { - this._input?.focus(); - }); - return; - } - - // 隐藏时清空输入 - if (this._input) { - this._input.value = ""; - this._canSend = false; - } - }; - - /** - * 处理输入变化 - */ - handleInput(e: Event): void { - const input = e.target as HTMLInputElement; - this._canSend = input.value.length > 0 && !this._isLoading; - } - - /** - * 处理键盘事件 - */ - handleKeydown(e: KeyboardEvent): void { - if (e.key === "Enter") { - this.sendMessage(); - } - if (e.key === "Escape") { - this._isShow = false; - } - } - - /** - * 处理发送按钮点击 - */ - handleSend(): void { - if (this._canSend && !this._isLoading) { - this.sendMessage(); - } - } - - /** - * 发送消息 - */ - private async sendMessage(): Promise { - if (!this._input || !this._input.value || this._isLoading) { - return; - } - - const message = this._input.value.trim(); - if (!message) { - return; - } - - // 清空输入框 - this._input.value = ""; - this._canSend = false; - this._isLoading = true; - - // 初始化 ChatApi(如果还没有) - if (!this.chatApi) { - this.chatApi = new ChatApi({ - chunkTimeout: Number(this.config?.chunkTimeout || 60), - showChatMessageTimeout: Number( - this.config?.showChatMessageTimeout || 10, - ), - }); - } - - // 加载历史消息 - const historyJson = localStorage.getItem("historyMessages"); - this.historyMessages = historyJson ? JSON.parse(historyJson) : []; - - try { - await this.chatApi.sendMessage(message, this.historyMessages); - } catch (error) { - console.error("[Live2dChatWindow] Send message error:", error); - } finally { - this._isLoading = false; - // 重新检查输入框状态 - if (this._input) { - this._canSend = this._input.value.length > 0; - } - } - } - - /** - * 显示首次使用提示 - */ - protected firstUpdated(_changedProperties: PropertyValues): void { - super.firstUpdated(_changedProperties); - // 监听输入框获得焦点事件 - this._input?.addEventListener("focus", () => { - sendMessage("按下回车键可以快速发送消息哦", 2000, 1); - }); - } + } + + /** + * 切换聊天窗口显示状态 + */ + handleToggle = (): void => { + this._isShow = !this._isShow; + if (this._isShow) { + this.updateComplete.then(() => { + this._input?.focus(); + }); + return; + } + + // 隐藏时清空输入 + if (this._input) { + this._input.value = ""; + this._canSend = false; + } + }; + + /** + * 处理输入变化 + */ + handleInput(e: Event): void { + const input = e.target as HTMLInputElement; + this._canSend = input.value.length > 0 && !this._isLoading; + } + + /** + * 处理键盘事件 + */ + handleKeydown(e: KeyboardEvent): void { + if (e.key === "Enter") { + this.sendMessage(); + } + if (e.key === "Escape") { + this._isShow = false; + } + } + + /** + * 处理发送按钮点击 + */ + handleSend(): void { + if (this._canSend && !this._isLoading) { + this.sendMessage(); + } + } + + /** + * 发送消息 + */ + private async sendMessage(): Promise { + if (!this._input || !this._input.value || this._isLoading) { + return; + } + + const message = this._input.value.trim(); + if (!message) { + return; + } + + // 清空输入框 + this._input.value = ""; + this._canSend = false; + this._isLoading = true; + + // 初始化 ChatApi(如果还没有) + if (!this.chatApi) { + this.chatApi = new ChatApi({ + chunkTimeout: Number(this.config?.chunkTimeout || 60), + showChatMessageTimeout: Number( + this.config?.showChatMessageTimeout || 10, + ), + }); + } + + // 加载历史消息 + const historyJson = localStorage.getItem("historyMessages"); + this.historyMessages = historyJson ? JSON.parse(historyJson) : []; + + try { + await this.chatApi.sendMessage(message, this.historyMessages); + } catch (error) { + console.error("[Live2dChatWindow] Send message error:", error); + } finally { + this._isLoading = false; + // 重新检查输入框状态 + if (this._input) { + this._canSend = this._input.value.length > 0; + } + } + } + + /** + * 显示首次使用提示 + */ + protected firstUpdated(_changedProperties: PropertyValues): void { + super.firstUpdated(_changedProperties); + // 监听输入框获得焦点事件 + this._input?.addEventListener("focus", () => { + sendMessage("按下回车键可以快速发送消息哦", 2000, 1); + }); + } } customElements.define("live2d-chat-window", Live2dChatWindow); export const Live2dChatWindowComponent = createComponent({ - tagName: "live2d-chat-window", - elementClass: Live2dChatWindow, - react: React, + tagName: "live2d-chat-window", + elementClass: Live2dChatWindow, + react: React, }); diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index ce51ad0..fb38842 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -1,23 +1,21 @@ +import { UnoLitElement } from "@/live2d/common/UnoLitElement"; import { createComponent } from "@lit/react"; import { type TemplateResult, html } from "lit"; +import { property } from "lit/decorators.js"; import React from "react"; -import { UnoLitElement } from "@/live2d/common/UnoLitElement"; import "@/live2d/components/Live2dWidget"; -import { provide } from "@lit/context"; +import { createDefaultLive2dConfig } from "@/live2d/config/default-config"; import { type Live2dConfig, configContext, } from "@/live2d/context/config-context"; +import { provide } from "@lit/context"; import "@/live2d/events"; export class Live2dContext extends UnoLitElement { @provide({ context: configContext }) - config = { - apiPath: "https://live2d.fghrsh.net/api", - live2dLocation: "right", - consoleShowStatus: false, - isTools: true, - } as Live2dConfig; + @property({ attribute: false }) + config: Live2dConfig = createDefaultLive2dConfig(); render(): TemplateResult { return html` `; diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index bd324a0..1fea5b7 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -1,200 +1,188 @@ -import { consume } from "@lit/context"; -import { createComponent } from "@lit/react"; -import { type TemplateResult, html } from "lit"; -import { property, state } from "lit/decorators.js"; -import { classMap } from "lit/directives/class-map.js"; -import { unsafeHTML } from "lit/directives/unsafe-html.js"; -import React from "react"; import { UnoLitElement } from "@/live2d/common/UnoLitElement"; import { - type Live2dConfig, - configContext, + type Live2dConfig, + configContext, } from "@/live2d/context/config-context"; import type { SendMessageEvent } from "@/live2d/events/send-message"; import type { - StreamMessageStartEvent, - StreamMessageEvent, - StreamMessageStopEvent, + StreamMessageEvent, + StreamMessageStartEvent, + StreamMessageStopEvent, } from "@/live2d/events/stream-message"; import { isNotEmpty } from "@/live2d/utils/isNotEmpty"; import { randomSelection } from "@/live2d/utils/randomSelection"; +import { consume } from "@lit/context"; +import { createComponent } from "@lit/react"; +import { type TemplateResult, html } from "lit"; +import { property, state } from "lit/decorators.js"; +import { classMap } from "lit/directives/class-map.js"; +import { unsafeHTML } from "lit/directives/unsafe-html.js"; +import React from "react"; export class Live2dTips extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; - - @state() - private _isShow = false; - @state() - private _message = ""; - private priority = -1; - private messageTimer: number | null = null; - // 流式消息模式标志 - private isStreamMode = false; - - constructor() { - super(); - this._isShow = false; - this._message = ""; - } - - render(): TemplateResult { - const classes = { - "opacity-100": this._isShow, - "opacity-0": !this._isShow, - }; - return html` + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _isShow = false; + @state() + private _message = ""; + private priority = -1; + private messageTimer: number | null = null; + // 流式消息模式标志 + private isStreamMode = false; + private readonly onMessage = (event: Event) => { + this.handleMessage(event as SendMessageEvent); + }; + private readonly onStreamStart = (event: Event) => { + this.handleStreamStart(event as StreamMessageStartEvent); + }; + private readonly onStreamMessage = (event: Event) => { + this.handleStreamMessage(event as StreamMessageEvent); + }; + private readonly onStreamStop = (event: Event) => { + this.handleStreamStop(event as StreamMessageStopEvent); + }; + + constructor() { + super(); + this._isShow = false; + this._message = ""; + } + + render(): TemplateResult { + const classes = { + "opacity-100": this._isShow, + "opacity-0": !this._isShow, + }; + return html`
${unsafeHTML(this._message)}
`; - } - - connectedCallback(): void { - super.connectedCallback(); - // 为 tips 注册 tips 相关事件 - window.addEventListener( - "live2d:send-message", - this.handleMessage.bind(this), - ); - // 流式消息事件 - window.addEventListener( - "live2d:stream-message-start", - this.handleStreamStart.bind(this), - ); - window.addEventListener( - "live2d:stream-message", - this.handleStreamMessage.bind(this), - ); - window.addEventListener( - "live2d:stream-message-stop", - this.handleStreamStop.bind(this), - ); - } - - disconnectedCallback(): void { - super.disconnectedCallback(); - window.removeEventListener( - "live2d:send-message", - this.handleMessage.bind(this), - ); - // 移除流式消息事件监听 - window.removeEventListener( - "live2d:stream-message-start", - this.handleStreamStart.bind(this), - ); - window.removeEventListener( - "live2d:stream-message", - this.handleStreamMessage.bind(this), - ); - window.removeEventListener( - "live2d:stream-message-stop", - this.handleStreamStop.bind(this), - ); - } - - handleMessage(e: SendMessageEvent): void { - // 如果正在流式消息模式,忽略普通消息 - if (this.isStreamMode) { - return; - } - const { text, timeout, priority } = e.detail; - if (!isNotEmpty(text)) { - return; - } - if (priority < this.priority) { - return; - } - if (this.messageTimer) { - clearTimeout(this.messageTimer); - this.messageTimer = null; - } - const message = randomSelection(text); - if (!isNotEmpty(message)) { - return; - } - this.priority = priority; - this._message = message; - this._isShow = true; - this.messageTimer = setTimeout(() => { - this._isShow = false; - this.priority = -1; - }, timeout); - } - - /** - * 处理流式消息开始事件 - */ - handleStreamStart(e: StreamMessageStartEvent): void { - const { timeout } = e.detail; - const STREAM_PRIORITY = 99999; - this.priority = STREAM_PRIORITY; - this.isStreamMode = true; - - // 清空消息并显示 - this._message = ""; - this._isShow = true; - - // 清除旧的定时器 - if (this.messageTimer) { - clearTimeout(this.messageTimer); - this.messageTimer = null; - } - - // 设置超时自动关闭 - this.messageTimer = setTimeout(() => { - this._isShow = false; - this.priority = -1; - this.isStreamMode = false; - }, timeout); - } - - /** - * 处理流式消息片段事件 - 追加文本 - */ - handleStreamMessage(e: StreamMessageEvent): void { - if (!this.isStreamMode) { - return; - } - const { text } = e.detail; - this._message += text; - } - - /** - * 处理流式消息停止事件 - */ - handleStreamStop(e: StreamMessageStopEvent): void { - if (!this.isStreamMode) { - return; - } - const { showTimeout } = e.detail; - - // 清除旧的定时器 - if (this.messageTimer) { - clearTimeout(this.messageTimer); - this.messageTimer = null; - } - - // 设置新的定时器,在指定时间后关闭 - this.messageTimer = setTimeout(() => { - this._isShow = false; - this.priority = -1; - this.isStreamMode = false; - }, showTimeout); - } + } + + connectedCallback(): void { + super.connectedCallback(); + window.addEventListener("live2d:send-message", this.onMessage); + window.addEventListener("live2d:stream-message-start", this.onStreamStart); + window.addEventListener("live2d:stream-message", this.onStreamMessage); + window.addEventListener("live2d:stream-message-stop", this.onStreamStop); + } + + disconnectedCallback(): void { + super.disconnectedCallback(); + window.removeEventListener("live2d:send-message", this.onMessage); + window.removeEventListener( + "live2d:stream-message-start", + this.onStreamStart, + ); + window.removeEventListener("live2d:stream-message", this.onStreamMessage); + window.removeEventListener("live2d:stream-message-stop", this.onStreamStop); + } + + handleMessage(e: SendMessageEvent): void { + // 如果正在流式消息模式,忽略普通消息 + if (this.isStreamMode) { + return; + } + const { text, timeout, priority } = e.detail; + if (!isNotEmpty(text)) { + return; + } + if (priority < this.priority) { + return; + } + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + const message = randomSelection(text); + if (!isNotEmpty(message)) { + return; + } + this.priority = priority; + this._message = message; + this._isShow = true; + this.messageTimer = setTimeout(() => { + this._isShow = false; + this.priority = -1; + }, timeout); + } + + /** + * 处理流式消息开始事件 + */ + handleStreamStart(e: StreamMessageStartEvent): void { + const { timeout } = e.detail; + const STREAM_PRIORITY = 99999; + this.priority = STREAM_PRIORITY; + this.isStreamMode = true; + + // 清空消息并显示 + this._message = ""; + this._isShow = true; + + // 清除旧的定时器 + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + + // 设置超时自动关闭 + this.messageTimer = setTimeout(() => { + this._isShow = false; + this.priority = -1; + this.isStreamMode = false; + }, timeout); + } + + /** + * 处理流式消息片段事件 - 追加文本 + */ + handleStreamMessage(e: StreamMessageEvent): void { + if (!this.isStreamMode) { + return; + } + const { text } = e.detail; + this._message += text; + } + + /** + * 处理流式消息停止事件 + */ + handleStreamStop(e: StreamMessageStopEvent): void { + if (!this.isStreamMode) { + return; + } + const { showTimeout } = e.detail; + + // 清除旧的定时器 + if (this.messageTimer) { + clearTimeout(this.messageTimer); + this.messageTimer = null; + } + + // 设置新的定时器,在指定时间后关闭 + this.messageTimer = setTimeout(() => { + this._isShow = false; + this.priority = -1; + this.isStreamMode = false; + }, showTimeout); + } } customElements.define("live2d-tips", Live2dTips); export const Live2dTipsComponent = createComponent({ - tagName: "live2d-tips", - elementClass: Live2dTips, - react: React, + tagName: "live2d-tips", + elementClass: Live2dTips, + react: React, }); diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 186a537..18ef171 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -1,87 +1,101 @@ +import { UnoLitElement } from "@/live2d/common/UnoLitElement"; +import { + type Live2dConfig, + configContext, +} from "@/live2d/context/config-context"; +import { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; +import { consume } from "@lit/context"; import { createComponent } from "@lit/react"; import { type TemplateResult, html } from "lit"; +import { property } from "lit/decorators.js"; import { state } from "lit/decorators.js"; import React from "react"; -import { UnoLitElement } from "@/live2d/common/UnoLitElement"; -import { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; export class Live2dToggle extends UnoLitElement { - @state() - // 当前工具栏是否显示 - private _isShow = false; + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + // 当前工具栏是否显示 + private _isShow = false; - connectedCallback(): void { - super.connectedCallback(); - this.addEventListener("click", this.handleClick); - window.addEventListener("live2d:toggle-canvas", this.handleGlobalToggle); + connectedCallback(): void { + super.connectedCallback(); + this.addEventListener("click", this.handleClick); + window.addEventListener("live2d:toggle-canvas", this.handleGlobalToggle); - Promise.resolve().then(() => { - const live2dDisplay = localStorage.getItem("live2d-display"); - if (live2dDisplay) { - if ( - Date.now() - Number.parseInt(live2dDisplay) <= - 24 * 60 * 60 * 1000 - ) { - this.triggerToggleLive2d(false); - return; - } - } - this.triggerToggleLive2d(true); - }); - } + Promise.resolve().then(() => { + const live2dDisplay = localStorage.getItem("live2d-display"); + if (live2dDisplay) { + if ( + Date.now() - Number.parseInt(live2dDisplay) <= + 24 * 60 * 60 * 1000 + ) { + this.triggerToggleLive2d(false); + return; + } + } + this.triggerToggleLive2d(true); + }); + } - disconnectedCallback(): void { - super.disconnectedCallback(); - this.removeEventListener("click", this.handleClick); - window.removeEventListener("live2d:toggle-canvas", this.handleGlobalToggle); - } + disconnectedCallback(): void { + super.disconnectedCallback(); + this.removeEventListener("click", this.handleClick); + window.removeEventListener("live2d:toggle-canvas", this.handleGlobalToggle); + } - render(): TemplateResult { - return html`
看板娘
`; - } + } - handleClick() { - this.triggerToggleLive2d(!!this._isShow); - } + handleClick() { + this.triggerToggleLive2d(!!this._isShow); + } - triggerToggleLive2d(isShow: boolean) { - this._isShow = !isShow; - if (isShow) { - localStorage.removeItem("live2d-display"); - } else { - localStorage.setItem("live2d-display", Date.now().toString()); - } - this.dispatchEvent( - new ToggleCanvasEvent({ - isShow, - }), - ); - } + triggerToggleLive2d(isShow: boolean) { + this._isShow = !isShow; + if (isShow) { + localStorage.removeItem("live2d-display"); + } else { + localStorage.setItem("live2d-display", Date.now().toString()); + } + this.dispatchEvent( + new ToggleCanvasEvent({ + isShow, + }), + ); + } - handleGlobalToggle = (e: Event) => { - const event = e as ToggleCanvasEvent; - this._isShow = !event.detail.isShow; - if (event.detail.isShow) { - localStorage.removeItem("live2d-display"); - } else { - localStorage.setItem("live2d-display", Date.now().toString()); - } - }; + handleGlobalToggle = (e: Event) => { + const event = e as ToggleCanvasEvent; + this._isShow = !event.detail.isShow; + if (event.detail.isShow) { + localStorage.removeItem("live2d-display"); + } else { + localStorage.setItem("live2d-display", Date.now().toString()); + } + }; } customElements.define("live2d-toggle", Live2dToggle); export const Live2dToggleComponent = createComponent({ - tagName: "live2d-toggle", - elementClass: Live2dToggle, - react: React, + tagName: "live2d-toggle", + elementClass: Live2dToggle, + react: React, }); diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 0943191..71c1f04 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -1,41 +1,45 @@ -import { consume } from "@lit/context"; -import { createComponent } from "@lit/react"; -import { type TemplateResult, html } from "lit"; -import { property, state } from "lit/decorators.js"; -import React from "react"; import { UnoLitElement } from "@/live2d/common/UnoLitElement"; import { - type Live2dConfig, - configContext, + type Live2dConfig, + configContext, } from "@/live2d/context/config-context"; import type { ModelReadyEvent } from "@/live2d/events/model-ready"; import type Model from "@/live2d/live2d/model"; -import presetTools from "@/live2d/live2d/tools"; +import { defaultToolNames, toolRegistry } from "@/live2d/live2d/tools"; import { CustomTool } from "@/live2d/live2d/tools/custom-tool"; import type { Tool } from "@/live2d/live2d/tools/tools"; +import { consume } from "@lit/context"; +import { createComponent } from "@lit/react"; +import { type TemplateResult, html } from "lit"; +import { property, state } from "lit/decorators.js"; +import React from "react"; import "iconify-icon"; export class Live2dTools extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; - private model?: Model | null; + private model?: Model | null; - @state() - private _tools: Tool[] = []; + @state() + private _tools: Tool[] = []; - render(): TemplateResult { - return html`
{ + this.handleModelReady(event as ModelReadyEvent); + }; + + render(): TemplateResult { + return html`
${this._tools.map(this.renderTool)}
`; - } + } - renderTool(tool: Tool): TemplateResult { - return html` tool.execute()} > @@ -44,91 +48,89 @@ export class Live2dTools extends UnoLitElement { icon="${tool.icon()}" > `; - } - - connectedCallback(): void { - super.connectedCallback(); - window.addEventListener( - "live2d:model-ready", - this.handleModelReady.bind(this), - ); - } - - disconnectedCallback(): void { - super.disconnectedCallback(); - window.removeEventListener( - "live2d:model-ready", - this.handleModelReady.bind(this), - ); - } + } - handleModelReady(e: ModelReadyEvent): void { - this.model = e.detail.model; - if (this.config && this._tools.length === 0) { - this.initializeTools(); - } - } + connectedCallback(): void { + super.connectedCallback(); + window.addEventListener("live2d:model-ready", this.onModelReady); + } - private initializeTools(): void { - const presetToolsList = this.getPresetTools(); - const customTools = this.getCustomTools(); - const tools = [...presetToolsList, ...customTools].sort( - (a, b) => b.priority - a.priority, - ); - this._tools = tools; - } + disconnectedCallback(): void { + super.disconnectedCallback(); + window.removeEventListener("live2d:model-ready", this.onModelReady); + } - private getCustomTools(): Tool[] { - if (!this.config) { - return []; - } - const customTools = this.config?.customTools; - if (!customTools || customTools.length === 0) { - return []; - } - const mountTool: Tool[] = []; - for (const tool of customTools) { - const customTool = new CustomTool(this.config, tool, this.model); - mountTool.push(customTool); - } - return mountTool; - } + handleModelReady(e: ModelReadyEvent): void { + this.model = e.detail.model; + if (!this.config) { + return; + } + if (this._tools.length === 0) { + this.initializeTools(); + return; + } + for (const tool of this._tools) { + tool.setModel(this.model); + } + } - // 获取预设工具 - private getPresetTools(): Tool[] { - if (!this.config) { - return []; - } - const mountTool: Tool[] = []; - const tools = this.config?.tools; + private initializeTools(): void { + const presetToolsList = this.getPresetTools(); + const customTools = this.getCustomTools(); + const tools = [...presetToolsList, ...customTools].sort( + (a, b) => b.priority - a.priority, + ); + this._tools = tools; + } - if (!tools || tools.length === 0) { - // 没有指定工具列表,加载所有预设工具 - for (const tool of presetTools) { - mountTool.push(new tool(this.config, this.model)); - } - return mountTool; - } + private getCustomTools(): Tool[] { + if (!this.config) { + return []; + } + const customTools = this.config?.customTools; + if (!customTools || customTools.length === 0) { + return []; + } + const mountTool: Tool[] = []; + for (const tool of customTools) { + const customTool = new CustomTool(this.config, tool, this.model); + mountTool.push(customTool); + } + return mountTool; + } - for (const toolName of tools) { - const ToolClass = presetTools.find( - (t) => - t.name === toolName || - t.name === - `${toolName.charAt(0).toUpperCase() + toolName.slice(1)}Tool`, - ); - if (ToolClass) { - mountTool.push(new ToolClass(this.config, this.model)); - } - } - return mountTool; - } + // 获取预设工具 + private getPresetTools(): Tool[] { + if (!this.config) { + return []; + } + const configuredNames = + this.config.tools && this.config.tools.length > 0 + ? [...this.config.tools] + : [...defaultToolNames]; + if (this.config.isAiChat) { + configuredNames.unshift("chat"); + } + const mountTool: Tool[] = []; + const seen = new Set(); + for (const toolName of configuredNames) { + const ToolClass = toolRegistry[toolName]; + if (ToolClass) { + if (seen.has(toolName)) { + continue; + } + seen.add(toolName); + mountTool.push(new ToolClass(this.config, this.model)); + } + } + return mountTool; + } } customElements.define("live2d-tools", Live2dTools); export const Live2dToolsComponent = createComponent({ - tagName: "live2d-tools", - elementClass: Live2dTools, - react: React, + tagName: "live2d-tools", + elementClass: Live2dTools, + react: React, }); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index a50f16b..0d582bd 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -1,13 +1,13 @@ -import { consume } from "@lit/context"; -import { createComponent } from "@lit/react"; -import { type TemplateResult, html } from "lit"; -import { property, state } from "lit/decorators.js"; -import React from "react"; import { UnoLitElement } from "@/live2d/common/UnoLitElement"; import { type Live2dConfig, configContext, } from "@/live2d/context/config-context"; +import { consume } from "@lit/context"; +import { createComponent } from "@lit/react"; +import { type TemplateResult, html } from "lit"; +import { property, state } from "lit/decorators.js"; +import React from "react"; import "@/live2d/components/Live2dToggle"; import "@/live2d/components/Live2dTips"; import "@/live2d/components/Live2dCanvas"; @@ -42,17 +42,23 @@ export class Live2dWidget extends UnoLitElement { } renderLive2dWidget() { + const positionClass = + this.config?.live2dLocation === "right" + ? "right-[50px] left-auto" + : "left-0"; if (this._isShow) { return html`
-
- - - ${this.renderLive2dTools()} -
-
`; + id="live2d-plugin" + class="group fixed bottom-0 z-9998 inline-block translate-y-1 hover:translate-y-0 transition-transform-300 ${positionClass}" + > +
+ + + ${this.renderLive2dTools()} +
+
`; } } diff --git a/packages/live2d/src/config/default-config.ts b/packages/live2d/src/config/default-config.ts new file mode 100644 index 0000000..1fd1326 --- /dev/null +++ b/packages/live2d/src/config/default-config.ts @@ -0,0 +1,35 @@ +import type { Live2dConfig } from "@/live2d/context/config-context"; + +export const DEFAULT_TOOL_NAMES = [ + "hitokoto", + "asteroids", + "switch-model", + "switch-texture", + "photo", + "info", + "quit", +] as const; + +export const createDefaultLive2dConfig = (): Live2dConfig => ({ + apiPath: "https://live2d.fghrsh.net/api/", + live2dLocation: "left", + consoleShowStatus: false, + isForceUseDefaultConfig: false, + modelId: 1, + modelTexturesId: 53, + tipsPath: "", + selectorTips: [], + backSite: true, + backSiteTip: "", + copyContent: true, + copyContentTip: "", + openConsole: true, + openConsoleTip: "", + firstOpenSite: true, + isTools: true, + tools: [...DEFAULT_TOOL_NAMES], + isAiChat: false, + chunkTimeout: 10, + showChatMessageTimeout: 10, + screenshotName: "live2d", +}); diff --git a/packages/live2d/src/config/normalize-config.ts b/packages/live2d/src/config/normalize-config.ts new file mode 100644 index 0000000..0006449 --- /dev/null +++ b/packages/live2d/src/config/normalize-config.ts @@ -0,0 +1,105 @@ +import { createDefaultLive2dConfig } from "@/live2d/config/default-config"; +import type { Live2dConfig } from "@/live2d/context/config-context"; +import { isNotEmptyString, isString } from "@/live2d/utils/isString"; + +export interface LegacyLive2dConfigInput extends Partial { + aiChatBaseSetting?: { + chunkTimeout?: number | string; + showChatMessageTimeout?: number | string; + }; + consoleShowStatu?: boolean; + photoName?: string; + tips?: string; +} + +const ensureTrailingSlash = (value: string): string => + value.endsWith("/") ? value : `${value}/`; + +const pickString = (...values: unknown[]): string | undefined => { + for (const value of values) { + if (isNotEmptyString(value)) { + return value; + } + } +}; + +const pickNumber = (...values: unknown[]): number | undefined => { + for (const value of values) { + if (typeof value === "number" && Number.isFinite(value)) { + return value; + } + if (isString(value) && value.trim() !== "") { + const parsed = Number(value); + if (Number.isFinite(parsed)) { + return parsed; + } + } + } +}; + +const pickBoolean = (...values: unknown[]): boolean | undefined => { + for (const value of values) { + if (typeof value === "boolean") { + return value; + } + } +}; + +const normalizeTools = (tools: unknown): string[] | undefined => { + if (!Array.isArray(tools)) { + return; + } + return tools.filter((tool): tool is string => isNotEmptyString(tool)); +}; + +export const normalizeLive2dConfig = ( + assetPath: string, + input: LegacyLive2dConfigInput = {}, +): Live2dConfig => { + const defaults = createDefaultLive2dConfig(); + const normalizedAssetPath = isNotEmptyString(assetPath) + ? ensureTrailingSlash(assetPath) + : ""; + + const normalizedApiPath = pickString(input.apiPath, defaults.apiPath); + if (!normalizedApiPath) { + throw new Error("Invalid initWidget argument!"); + } + + return { + ...defaults, + ...input, + apiPath: ensureTrailingSlash(normalizedApiPath), + live2dLocation: input.live2dLocation === "right" ? "right" : "left", + consoleShowStatus: pickBoolean( + input.consoleShowStatus, + input.consoleShowStatu, + defaults.consoleShowStatus, + ), + themeTipsPath: pickString(input.themeTipsPath, input.tips), + tipsPath: + pickString(input.tipsPath) ?? `${normalizedAssetPath}live2d-tips.json`, + screenshotName: + pickString(input.screenshotName, input.photoName) ?? + defaults.screenshotName, + tools: normalizeTools(input.tools) ?? [...(defaults.tools ?? [])], + chunkTimeout: + pickNumber( + input.chunkTimeout, + input.aiChatBaseSetting?.chunkTimeout, + defaults.chunkTimeout, + ) ?? defaults.chunkTimeout, + showChatMessageTimeout: + pickNumber( + input.showChatMessageTimeout, + input.aiChatBaseSetting?.showChatMessageTimeout, + defaults.showChatMessageTimeout, + ) ?? defaults.showChatMessageTimeout, + backSite: pickBoolean(input.backSite, defaults.backSite), + copyContent: pickBoolean(input.copyContent, defaults.copyContent), + openConsole: pickBoolean(input.openConsole, defaults.openConsole), + firstOpenSite: pickBoolean(input.firstOpenSite, defaults.firstOpenSite), + isTools: pickBoolean(input.isTools, defaults.isTools), + isAiChat: pickBoolean(input.isAiChat, defaults.isAiChat), + }; +}; diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index addabe1..ba47421 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,5 +1,5 @@ -import { createContext } from "@lit/context"; import type { CustomToolConfig } from "@/live2d/live2d/tools/custom-tool"; +import { createContext } from "@lit/context"; export interface ObjectAny extends Record {} @@ -65,6 +65,8 @@ export interface Live2dToolsConfig { switchTextureIcon?: string; // 截图生成的图片名称 screenshotName?: string; + // 兼容旧版截图名称字段 + photoName?: string; // 截图图标 screenshotIcon?: string; // 信息图标 @@ -82,6 +84,8 @@ export interface Live2dConfig extends Live2dToolsConfig { live2dLocation: "left" | "right"; // 是否在控制台显示状态 consoleShowStatus?: boolean; + // 兼容旧版控制台状态字段 + consoleShowStatu?: boolean; // 是否强制使用默认配置 isForceUseDefaultConfig?: boolean; // 模型编号 @@ -90,26 +94,37 @@ export interface Live2dConfig extends Live2dToolsConfig { modelTexturesId?: number; // 主题下的 tips 文件路径 themeTipsPath?: string; + // 兼容服务端注入的主题 tips 字段 + tips?: string; // 用户自定义的 tips 文件路径 tipsPath?: string; // 用户使用插件定义的 tips - selectorTips?: [ - { - messageTexts?: { - message: string; - }[]; - selector: string; - mouseAction: "click" | "mouseover" | string | undefined; - }, - ]; + selectorTips?: { + messageTexts?: { + message: string; + }[]; + selector: string; + mouseAction: "click" | "mouseover" | string | undefined; + }[]; + // 页面可见性变化事件是否开启 + backSite?: boolean; // 页面可见性变化时的 tips - backSiteTip: string[] | string; + backSiteTip?: string[] | string; + // 复制内容事件是否开启 + copyContent?: boolean; // 复制内容时的 tips - copyContentTip: string[] | string; + copyContentTip?: string[] | string; + // 控制台事件是否开启 + openConsole?: boolean; // 控制台打印 tips - openConsoleTip: string[] | string; + openConsoleTip?: string[] | string; // 首次打开站点是否显示 tips firstOpenSite?: boolean; + // 兼容旧版嵌套聊天配置 + aiChatBaseSetting?: { + chunkTimeout?: number | string; + showChatMessageTimeout?: number | string; + }; [key: string]: unknown; } diff --git a/packages/live2d/src/events/index.ts b/packages/live2d/src/events/index.ts index 6513bc6..b261a17 100644 --- a/packages/live2d/src/events/index.ts +++ b/packages/live2d/src/events/index.ts @@ -1 +1 @@ -import './tip-events'; +import "./tip-events"; diff --git a/packages/live2d/src/events/tip-events.ts b/packages/live2d/src/events/tip-events.ts index 30aa5a0..74c219e 100644 --- a/packages/live2d/src/events/tip-events.ts +++ b/packages/live2d/src/events/tip-events.ts @@ -4,9 +4,16 @@ import type { TipConfig, TipMessage, TipMouseover, - TipSeason, TipTime, } from "@/live2d/context/config-context"; +import { + ADD_DEFAULT_MESSAGE_EVENT_NAME, + type AddDefaultMessageEvent as AddDefaultMessageEventType, +} from "@/live2d/events/add-default-message"; +import { + BEFORE_INIT_EVENT_NAME, + type BeforeInitEvent, +} from "@/live2d/events/before-init"; import { dataWithinRange } from "@/live2d/helpers/dateWithinRange"; import { getPluginTips } from "@/live2d/helpers/getPluginTips"; import { loadTipsResource } from "@/live2d/helpers/loadTipsResource"; @@ -20,19 +27,7 @@ import { getReferrerDomain, hasWebsiteHome, } from "@/live2d/utils/util"; -import { AddDefaultMessageEvent } from "@/live2d/events/add-default-message"; - -window.addEventListener("live2d:before-init", async (e) => { - const config = e.detail.config; - if (!config) { - return; - } - const tips = await _loadTips(config); - if (!tips) { - return; - } - _registerTipEventListener(config, tips); -}); +let activeTipEvents: TipEventController | undefined; const _getWelComeMessage = (times: TipTime[]) => { if (hasWebsiteHome) { @@ -58,143 +53,219 @@ const _welcomeEvent = (times: TipTime[]) => { sendMessage(message, 7000, 4); }; -const _holidayEvent = (seasons: TipSeason[]) => { - for (const { date, text } of seasons) { - if (dataWithinRange(date)) { - window.dispatchEvent(new AddDefaultMessageEvent({ message: text })); - } - } -}; - -const _userLeaveEvent = (message: TipMessage) => { +const _userLeaveEvent = (message: TipMessage, signal: AbortSignal) => { const { visibilitychange } = message; - document.addEventListener("visibilitychange", () => { - if (!document.hidden) { - sendMessage(visibilitychange, 6000, 2); - } - }); + document.addEventListener( + "visibilitychange", + () => { + if (!document.hidden) { + sendMessage(visibilitychange, 6000, 2); + } + }, + { signal }, + ); }; -const _userCopyEvent = (message: TipMessage) => { +const _userCopyEvent = (message: TipMessage, signal: AbortSignal) => { const { copy } = message; - window.addEventListener("copy", () => { - sendMessage(copy, 6000, 2); - }); + window.addEventListener( + "copy", + () => { + sendMessage(copy, 6000, 2); + }, + { signal }, + ); }; -const _userOpenConsoleEvent = (message: TipMessage) => { +const _userOpenConsoleEvent = (message: TipMessage): number => { const { console } = message; - const devtools = () => {}; - devtools.toString = () => { - sendMessage(console, 6000, 2); - }; + let hasOpened = false; + return window.setInterval(() => { + const opened = + window.outerWidth - window.innerWidth > 160 || + window.outerHeight - window.innerHeight > 160; + if (opened && !hasOpened) { + hasOpened = true; + sendMessage(console, 6000, 2); + } else if (!opened) { + hasOpened = false; + } + }, 1000); }; -const _userClickEvent = (clicks: TipClick[]) => { - window.addEventListener("click", (event) => { - const path = event.composedPath(); - const target = path[0]; - if (!(target instanceof HTMLElement)) { - return; - } - for (const { selector, text } of clicks) { - if (!target.matches(selector)) { - continue; +const _userClickEvent = (clicks: TipClick[], signal: AbortSignal) => { + window.addEventListener( + "click", + (event) => { + const path = event.composedPath(); + const target = path[0]; + if (!(target instanceof HTMLElement)) { + return; } - let message = randomSelection(text); - if (!message) { - continue; + for (const { selector, text } of clicks) { + if (!target.matches(selector)) { + continue; + } + let message = randomSelection(text); + if (!message) { + continue; + } + message = message.replace("{text}", target.innerText); + sendMessage(message, 4000, 1); + return; } - message = message.replace("{text}", target.innerText); - sendMessage(message, 4000, 1); - return; - } - }); + }, + { signal }, + ); }; -const _userMouseoverEvent = (mouseovers: TipMouseover[]) => { - window.addEventListener("mouseover", (event: MouseEvent) => { - const path = event.composedPath(); - const target = path[0]; - if (!(target instanceof HTMLElement)) { - return; - } - for (const { selector, text } of mouseovers) { - if (!target.matches(selector)) { - continue; +const _userMouseoverEvent = ( + mouseovers: TipMouseover[], + signal: AbortSignal, +) => { + window.addEventListener( + "mouseover", + (event: MouseEvent) => { + const path = event.composedPath(); + const target = path[0]; + if (!(target instanceof HTMLElement)) { + return; } - let message = randomSelection(text); - if (!message) { - continue; + for (const { selector, text } of mouseovers) { + if (!target.matches(selector)) { + continue; + } + let message = randomSelection(text); + if (!message) { + continue; + } + message = message.replace("{text}", target.innerText); + sendMessage(message, 4000, 1); + return; } - message = message.replace("{text}", target.innerText); - sendMessage(message, 4000, 1); - return; - } - }); + }, + { signal }, + ); }; /** * 监听用户是否处于活动状态,如果用户长时间不活动,则向 Live2d 发送消息 */ -const _userActionEvent = (message: TipMessage) => { +const _userActionEvent = ( + message: TipMessage, + signal: AbortSignal, +): { + dispose: () => void; + idleMessage: string[]; +} => { let userAction = false; - let userActionTimer: number | undefined; + let idleTimer: number | undefined; const defaultMessage = message.default; const idleMessage: string[] = isString(defaultMessage) ? [defaultMessage] - : defaultMessage || []; + : [...(defaultMessage || [])]; - window.addEventListener("mousemove", () => { - userAction = true; - }); - window.addEventListener("keydown", () => { + const markUserActive = () => { userAction = true; - }); - window.addEventListener("live2d:add-default-message", (ev) => { - const message = ev.detail.message; - if (Array.isArray(message)) { - idleMessage.push(...message); - } else { - idleMessage.push(message); - } - }); - setInterval(() => { + }; + + window.addEventListener("mousemove", markUserActive, { signal }); + window.addEventListener("keydown", markUserActive, { signal }); + window.addEventListener( + ADD_DEFAULT_MESSAGE_EVENT_NAME, + (event) => { + const nextMessage = (event as AddDefaultMessageEventType).detail.message; + if (Array.isArray(nextMessage)) { + idleMessage.push(...nextMessage); + return; + } + idleMessage.push(nextMessage); + }, + { signal }, + ); + + const pollTimer = window.setInterval(() => { if (userAction) { userAction = false; - clearInterval(userActionTimer); - userActionTimer = undefined; + if (idleTimer) { + clearInterval(idleTimer); + idleTimer = undefined; + } return; } - if (userActionTimer) { + if (idleTimer) { return; } - userActionTimer = setInterval(() => { - sendMessage(message.default, 6000, 2); + idleTimer = window.setInterval(() => { + sendMessage(idleMessage, 6000, 2); }, 20000); }, 1000); + + return { + idleMessage, + dispose: () => { + clearInterval(pollTimer); + if (idleTimer) { + clearInterval(idleTimer); + } + }, + }; }; -const _registerTipEventListener = (config: Live2dConfig, tips: TipConfig) => { - // 首次进入页面时 - if (config.firstOpenSite) { - _welcomeEvent(tips.time); +class TipEventController { + private readonly abortController = new AbortController(); + private readonly disposers: Array<() => void> = []; + + constructor( + private readonly config: Live2dConfig, + private readonly tips: TipConfig, + ) {} + + start(): void { + const { signal } = this.abortController; + if (this.config.firstOpenSite) { + _welcomeEvent(this.tips.time); + } + + const userActionState = _userActionEvent(this.tips.message, signal); + this.disposers.push(userActionState.dispose); + + for (const { date, text } of this.tips.seasons) { + if (!dataWithinRange(date)) { + continue; + } + const seasonalText = randomSelection(text); + if (!seasonalText) { + continue; + } + userActionState.idleMessage.push( + seasonalText.replace("{year}", String(new Date().getFullYear())), + ); + } + + _userMouseoverEvent(this.tips.mouseover, signal); + _userClickEvent(this.tips.click, signal); + + if (this.config.openConsole) { + const consoleTimer = _userOpenConsoleEvent(this.tips.message); + this.disposers.push(() => clearInterval(consoleTimer)); + } + if (this.config.copyContent) { + _userCopyEvent(this.tips.message, signal); + } + if (this.config.backSite) { + _userLeaveEvent(this.tips.message, signal); + } } - // 节日事件 - _holidayEvent(tips.seasons); - // 用户是否活动事件 - _userActionEvent(tips.message); - // 注册用户鼠标悬停事件 - _userMouseoverEvent(tips.mouseover); - // 注册用户点击事件 - _userClickEvent(tips.click); - // 用户打开控制台事件 - _userOpenConsoleEvent(tips.message); - // 用户复制内容事件 - _userCopyEvent(tips.message); - // 用户离开页面事件 - _userLeaveEvent(tips.message); -}; + + dispose(): void { + this.abortController.abort(); + for (const disposer of this.disposers) { + disposer(); + } + this.disposers.length = 0; + } +} const _loadTips = async (config: Live2dConfig) => { if (!config) { @@ -221,7 +292,7 @@ const _loadTips = async (config: Live2dConfig) => { }; export const _getFullOrDefaultTips = async ( - config: Live2dConfig + config: Live2dConfig, ): Promise => { // 获取插件文件中的全量 tips 文件 if (isNotEmptyString(config?.tipsPath)) { @@ -233,3 +304,19 @@ export const _getFullOrDefaultTips = async ( // 获取默认的 tips 文件 return (await import("../libs/live2d-tips.json")).default; }; + +window.addEventListener(BEFORE_INIT_EVENT_NAME, async (event) => { + const config = (event as BeforeInitEvent).detail.config; + if (!config) { + return; + } + + const tips = await _loadTips(config); + if (!tips) { + return; + } + + activeTipEvents?.dispose(); + activeTipEvents = new TipEventController(config, tips); + activeTipEvents.start(); +}); diff --git a/packages/live2d/src/helpers/createStreamMessage.ts b/packages/live2d/src/helpers/createStreamMessage.ts index 5349ec7..91820d5 100644 --- a/packages/live2d/src/helpers/createStreamMessage.ts +++ b/packages/live2d/src/helpers/createStreamMessage.ts @@ -1,6 +1,6 @@ import { - StreamMessageStartEvent, StreamMessageEvent, + StreamMessageStartEvent, StreamMessageStopEvent, } from "@/live2d/events/stream-message"; diff --git a/packages/live2d/src/helpers/dateWithinRange.ts b/packages/live2d/src/helpers/dateWithinRange.ts index d071f54..8ad0898 100644 --- a/packages/live2d/src/helpers/dateWithinRange.ts +++ b/packages/live2d/src/helpers/dateWithinRange.ts @@ -1,5 +1,5 @@ -const RANGE_SEPARATOR = '-'; -const DATE_SEPARATOR = '/'; +const RANGE_SEPARATOR = "-"; +const DATE_SEPARATOR = "/"; /** * 检查指定的日期是否在当前日期范围内。 diff --git a/packages/live2d/src/helpers/getPluginTips.ts b/packages/live2d/src/helpers/getPluginTips.ts index 9d7d153..5d9cf34 100644 --- a/packages/live2d/src/helpers/getPluginTips.ts +++ b/packages/live2d/src/helpers/getPluginTips.ts @@ -1,5 +1,5 @@ -import type { Live2dConfig, TipConfig } from '@/live2d/context/config-context'; -import { isNotEmpty } from '@/live2d/utils/isNotEmpty'; +import type { Live2dConfig, TipConfig } from "@/live2d/context/config-context"; +import { isNotEmpty } from "@/live2d/utils/isNotEmpty"; /** * 整合插件配置中的 tips 元素。 @@ -36,7 +36,7 @@ export const getPluginTips = (config: Live2dConfig): TipConfig => { selector: item.selector, text: texts, }; - if (item.mouseAction === 'click') { + if (item.mouseAction === "click") { tips.click?.push(obj); } else { tips.mouseover?.push(obj); diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts index be2c6e9..5496193 100644 --- a/packages/live2d/src/helpers/loadTipsResource.ts +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -1,4 +1,4 @@ -import type { TipConfig } from '@/live2d/context/config-context'; +import type { TipConfig } from "@/live2d/context/config-context"; /** * 远程加载提示资源 diff --git a/packages/live2d/src/helpers/mergeTips.ts b/packages/live2d/src/helpers/mergeTips.ts index 6378242..5ebb91d 100644 --- a/packages/live2d/src/helpers/mergeTips.ts +++ b/packages/live2d/src/helpers/mergeTips.ts @@ -1,5 +1,5 @@ -import type { TipConfig } from '@/live2d/context/config-context'; -import { distinctArray } from '@/live2d/utils/distinctArray'; +import type { TipConfig } from "@/live2d/context/config-context"; +import { distinctArray } from "@/live2d/utils/distinctArray"; /** * 合并各个渠道的 tips,根据获取位置不同,合并时优先级也不同。优先级按高到低的顺序为 @@ -36,8 +36,8 @@ export const mergeTips = ({ ...themeTips.mouseover, ...fullOrDefaultTips.mouseover, ]; - defaultTips.click = distinctArray(duplicateClick, 'selector'); - defaultTips.mouseover = distinctArray(duplicateMouseover, 'selector'); + defaultTips.click = distinctArray(duplicateClick, "selector"); + defaultTips.mouseover = distinctArray(duplicateMouseover, "selector"); defaultTips.message = { ...defaultTips.message, ...pluginTips.message }; return defaultTips; }; diff --git a/packages/live2d/src/helpers/sendMessage.ts b/packages/live2d/src/helpers/sendMessage.ts index c16de1b..d452afa 100644 --- a/packages/live2d/src/helpers/sendMessage.ts +++ b/packages/live2d/src/helpers/sendMessage.ts @@ -9,7 +9,7 @@ import { SendMessageEvent } from "@/live2d/events/send-message"; export function sendMessage( text: string | string[] | undefined, timeout = 3000, - priority = 0 + priority = 0, ) { if (!text) { return; diff --git a/packages/live2d/src/helpers/timeWithinRange.ts b/packages/live2d/src/helpers/timeWithinRange.ts index e34fee3..16c1e9b 100644 --- a/packages/live2d/src/helpers/timeWithinRange.ts +++ b/packages/live2d/src/helpers/timeWithinRange.ts @@ -1,4 +1,4 @@ -const SEPARATOR = '-'; +const SEPARATOR = "-"; /** * 判断当前是否在指定时间范围内。 @@ -13,7 +13,7 @@ export const timeWithinRange = (hour: string): boolean => { const before = Number.parseInt(spiltTime[1]) || after; if (after < 0 || before > 23 || after > before) { - throw new Error('时间范围不正确'); + throw new Error("时间范围不正确"); } if (after <= now.getHours() && now.getHours() <= before) { diff --git a/packages/live2d/src/index.ts b/packages/live2d/src/index.ts index 37dd2ca..ad7e7fa 100644 --- a/packages/live2d/src/index.ts +++ b/packages/live2d/src/index.ts @@ -1,5 +1,15 @@ -import { Live2dContext } from './components/Live2dContext'; -import { Live2dToggle } from './components/Live2dToggle'; -import { Live2dWidget } from './components/Live2dWidget'; +import { Live2dContext } from "./components/Live2dContext"; +import { Live2dToggle } from "./components/Live2dToggle"; +import { Live2dWidget } from "./components/Live2dWidget"; +import { Live2dRuntime, createLive2d } from "./live2d/runtime"; export { Live2dToggle, Live2dWidget, Live2dContext }; +export { createLive2d, Live2dRuntime }; + +const live2d = createLive2d(); + +if (typeof window !== "undefined" && !window.live2d) { + window.live2d = live2d; +} + +export default live2d; diff --git a/packages/live2d/src/libs/live2d.min.js b/packages/live2d/src/libs/live2d.min.js index c3ed3bc..8915e1d 100644 --- a/packages/live2d/src/libs/live2d.min.js +++ b/packages/live2d/src/libs/live2d.min.js @@ -1,2 +1 @@ - -(function(){var j=true;function aa(){if(j){return;}this._$MT=null;this._$5S=null;this._$NP=0;aa._$42++;this._$5S=new y(this);}aa._$0s=1;aa._$4s=2;aa._$42=0;aa._$62=function(aQ,aU){try{if(aU instanceof ArrayBuffer){aU=new DataView(aU);}if(!(aU instanceof DataView)){throw new J("_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer");}var aS=new K(aU);var aM=aS._$ST();var aK=aS._$ST();var aJ=aS._$ST();var aN;if(aM==109&&aK==111&&aJ==99){aN=aS._$ST();}else{throw new J("_$gi _$C _$li , _$Q0 _$P0.");}aS._$gr(aN);if(aN>ay._$T7){aQ._$NP|=aa._$4s;var aR=ay._$T7;var aI="_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : "+aR+" < _$f0 : "+aN+" )@_$SS#loadModel()\n";throw new J(aI);}var aL=aS._$nP();if(aN>=ay._$s7){var aH=aS._$9T();var aT=aS._$9T();if(aH!=-30584||aT!=-30584){aQ._$NP|=aa._$0s;throw new J("_$gi _$C _$li , _$0 _$6 _$Ui.");}}aQ._$KS(aL);var aP=aQ.getModelContext();aP.setDrawParam(aQ.getDrawParam());aP.init();}catch(aO){q._$Rb(aO);}};aa.prototype._$KS=function(aH){this._$MT=aH;};aa.prototype.getModelImpl=function(){if(this._$MT==null){this._$MT=new w();this._$MT._$zP();}return this._$MT;};aa.prototype.getCanvasWidth=function(){if(this._$MT==null){return 0;}return this._$MT.getCanvasWidth();};aa.prototype.getCanvasHeight=function(){if(this._$MT==null){return 0;}return this._$MT.getCanvasHeight();};aa.prototype.getParamFloat=function(aH){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}return this._$5S.getParamFloat(aH);};aa.prototype.setParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)*(1-aI)+aJ*aI);};aa.prototype.addToParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)+aJ*aI);};aa.prototype.multParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)*(1+(aJ-1)*aI));};aa.prototype.getParamIndex=function(aH){return this._$5S.getParamIndex(z.getID(aH));};aa.prototype.loadParam=function(){this._$5S.loadParam();};aa.prototype.saveParam=function(){this._$5S.saveParam();};aa.prototype.init=function(){this._$5S.init();};aa.prototype.update=function(){this._$5S.update();};aa.prototype._$Rs=function(){q._$li("_$60 _$PT _$Rs()");return -1;};aa.prototype._$Ds=function(aH){q._$li("_$60 _$PT _$SS#_$Ds() \n");};aa.prototype._$K2=function(){};aa.prototype.draw=function(){};aa.prototype.getModelContext=function(){return this._$5S;};aa.prototype._$s2=function(){return this._$NP;};aa.prototype._$P7=function(aK,aR,aH,a0){var aU=-1;var aY=0;var aM=this;var aJ=0.5;var aI=0.15;var aX=true;if(aH==0){for(var aV=0;aV1){aQ=1;}}else{aQ-=aW;if(aQ<0){aQ=0;}}aM.setPartsOpacity(aO,aQ);}else{for(var aV=0;aV=0){break;}aU=aV;var aO=aR[aV];aY=aM.getPartsOpacity(aO);aY+=aH/a0;if(aY>1){aY=1;}}}if(aU<0){console.log("No _$wi _$q0/ _$U default[%s]",aK[0]);aU=0;aY=1;aM.loadParam();aM.setParamFloat(aK[aU],aY);aM.saveParam();}for(var aV=0;aVaI){aZ=1-aI/(1-aY);}}if(aL>aZ){aL=aZ;}aM.setPartsOpacity(aO,aL);}}}}};aa.prototype.setPartsOpacity=function(aI,aH){if(typeof aI!="number"){aI=this._$5S.getPartsDataIndex(i.getID(aI));}this._$5S.setPartsOpacity(aI,aH);};aa.prototype.getPartsDataIndex=function(aH){if(!(aH instanceof i)){aH=i.getID(aH);}return this._$5S.getPartsDataIndex(aH);};aa.prototype.getPartsOpacity=function(aH){if(typeof aH!="number"){aH=this._$5S.getPartsDataIndex(i.getID(aH));}if(aH<0){return 0;}return this._$5S.getPartsOpacity(aH);};aa.prototype.getDrawParam=function(){};aa.prototype.getDrawDataIndex=function(aH){return this._$5S.getDrawDataIndex(Z.getID(aH));};aa.prototype.getDrawData=function(aH){return this._$5S.getDrawData(aH);};aa.prototype.getTransformedPoints=function(aH){var aI=this._$5S._$C2(aH);if(aI instanceof ag){return(aI).getTransformedPoints();}return null;};aa.prototype.getIndexArray=function(aI){if(aI<0||aI>=this._$5S._$aS.length){return null;}var aH=this._$5S._$aS[aI];if(aH!=null&&aH.getType()==a._$wb){if(aH instanceof b){return aH.getIndexArray();}}return null;};function W(aJ){if(j){return;}this.clipContextList=new Array();this.glcontext=aJ.gl;this.dp_webgl=aJ;this.curFrameNo=0;this.firstError_clipInNotUpdate=true;this.colorBuffer=0;this.isInitGLFBFunc=false;this.tmpBoundsOnModel=new av();if(Q.glContext.length>Q.frameBuffers.length){this.curFrameNo=this.getMaskRenderTexture();}else{}this.tmpModelToViewMatrix=new ac();this.tmpMatrix2=new ac();this.tmpMatrixForMask=new ac();this.tmpMatrixForDraw=new ac();this.CHANNEL_COLORS=new Array();var aI=new o();aI=new o();aI.r=0;aI.g=0;aI.b=0;aI.a=1;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=1;aI.g=0;aI.b=0;aI.a=0;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=0;aI.g=1;aI.b=0;aI.a=0;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=0;aI.g=0;aI.b=1;aI.a=0;this.CHANNEL_COLORS.push(aI);for(var aH=0;aH=0;--aH){this.CHANNEL_COLORS.splice(aH,1);}this.CHANNEL_COLORS=[];}this.releaseShader();};W.prototype.releaseShader=function(){var aI=Q.frameBuffers.length;for(var aH=0;aH0){var aM=aQ.gl.getParameter(aQ.gl.FRAMEBUFFER_BINDING);var aW=new Array(4);aW[0]=0;aW[1]=0;aW[2]=aQ.gl.canvas.width;aW[3]=aQ.gl.canvas.height;aQ.gl.viewport(0,0,Q.clippingMaskBufferSize,Q.clippingMaskBufferSize);this.setupLayoutBounds(aK);aQ.gl.bindFramebuffer(aQ.gl.FRAMEBUFFER,Q.frameBuffers[this.curFrameNo].framebuffer);aQ.gl.clearColor(0,0,0,0);aQ.gl.clear(aQ.gl.COLOR_BUFFER_BIT);for(var aO=0;aOa5?aU:a5;var aT=aJ;var aR=aJ;var aS=0;var aP=0;var aL=aV.clippedDrawContextList.length;for(var aM=0;aMaS){aS=a0;}if(aZ>aP){aP=aZ;}}}if(aT==aJ){aV.allClippedDrawRect.x=0;aV.allClippedDrawRect.y=0;aV.allClippedDrawRect.width=0;aV.allClippedDrawRect.height=0;aV.isUsing=false;}else{var aQ=aS-aT;var aY=aP-aR;aV.allClippedDrawRect.x=aT;aV.allClippedDrawRect.y=aR;aV.allClippedDrawRect.width=aQ;aV.allClippedDrawRect.height=aY;aV.isUsing=true;}};W.prototype.setupLayoutBounds=function(aQ){var aI=aQ/W.CHANNEL_COUNT;var aP=aQ%W.CHANNEL_COUNT;aI=~~aI;aP=~~aP;var aH=0;for(var aJ=0;aJ=1){return 1;}}var aS=aQ;var aI=aS*aS;var aH=aS*aI;var aT=aY*aH+aX*aI+aW*aS+aV;return aT;};ah.prototype._$a0=function(){};ah.prototype.setFadeIn=function(aH){this._$dP=aH;};ah.prototype.setFadeOut=function(aH){this._$eo=aH;};ah.prototype._$pT=function(aH){this._$V0=aH;};ah.prototype.getFadeOut=function(){return this._$eo;};ah.prototype._$4T=function(){return this._$eo;};ah.prototype._$mT=function(){return this._$V0;};ah.prototype.getDurationMSec=function(){return -1;};ah.prototype.getLoopDurationMSec=function(){return -1;};ah.prototype.updateParam=function(aJ,aN){if(!aN._$AT||aN._$9L){return;}var aL=P.getUserTimeMSec();if(aN._$z2<0){aN._$z2=aL;aN._$bs=aL;var aM=this.getDurationMSec();if(aN._$Do<0){aN._$Do=(aM<=0)?-1:aN._$z2+aM;}}var aI=this._$V0;var aH=(this._$dP==0)?1:A._$r2(((aL-aN._$bs)/(this._$dP)));var aK=(this._$eo==0||aN._$Do<0)?1:A._$r2(((aN._$Do-aL)/(this._$eo)));aI=aI*aH*aK;if(!((0<=aI&&aI<=1))){console.log("### assert!! ### ");}this.updateParamExe(aJ,aL,aI,aN);if(aN._$Do>0&&aN._$Do0){console.log("\n");}else{if(aH%8==0&&aH>0){console.log(" ");}}console.log("%02X ",(aJ[aH]&255));}console.log("\n");};q._$nr=function(aL,aI,aK){console.log("%s\n",aL);var aH=aI.length;for(var aJ=0;aJ=0;--aJ){var aM=this._$lL[aJ];aM._$oP(aI,this);}this._$oo(aI,aK);this._$M2=this._$Yb();this._$9b=(this._$M2-this._$ks)/aK;this._$ks=this._$M2;}for(var aJ=this._$qP.length-1;aJ>=0;--aJ){var aH=this._$qP[aJ];aH._$YS(aI,this);}this._$iT=aL;};u.prototype._$oo=function(aN,aI){if(aI<0.033){aI=0.033;}var aU=1/aI;this.p1.vx=(this.p1.x-this.p1._$s0)*aU;this.p1.vy=(this.p1.y-this.p1._$70)*aU;this.p1.ax=(this.p1.vx-this.p1._$7L)*aU;this.p1.ay=(this.p1.vy-this.p1._$HL)*aU;this.p1.fx=this.p1.ax*this.p1._$p;this.p1.fy=this.p1.ay*this.p1._$p;this.p1._$xT();var aM=-(Math.atan2((this.p1.y-this.p2.y),this.p1.x-this.p2.x));var aL;var aV;var aR=Math.cos(aM);var aH=Math.sin(aM);var aW=9.8*this.p2._$p;var aQ=(this._$Db*aC._$bS);var aP=(aW*Math.cos(aM-aQ));aL=(aP*aH);aV=(aP*aR);var aK=(-this.p1.fx*aH*aH);var aT=(-this.p1.fy*aH*aR);var aJ=((-this.p2.vx*this._$L2));var aS=((-this.p2.vy*this._$L2));this.p2.fx=((aL+aK+aJ));this.p2.fy=((aV+aT+aS));this.p2.ax=this.p2.fx/this.p2._$p;this.p2.ay=this.p2.fy/this.p2._$p;this.p2.vx+=this.p2.ax*aI;this.p2.vy+=this.p2.ay*aI;this.p2.x+=this.p2.vx*aI;this.p2.y+=this.p2.vy*aI;var aO=(Math.sqrt((this.p1.x-this.p2.x)*(this.p1.x-this.p2.x)+(this.p1.y-this.p2.y)*(this.p1.y-this.p2.y)));this.p2.x=this.p1.x+this._$Fo*(this.p2.x-this.p1.x)/aO;this.p2.y=this.p1.y+this._$Fo*(this.p2.y-this.p1.y)/aO;this.p2.vx=(this.p2.x-this.p2._$s0)*aU;this.p2.vy=(this.p2.y-this.p2._$70)*aU;this.p2._$xT();};function N(){this._$p=1;this.x=0;this.y=0;this.vx=0;this.vy=0;this.ax=0;this.ay=0;this.fx=0;this.fy=0;this._$s0=0;this._$70=0;this._$7L=0;this._$HL=0;}N.prototype._$xT=function(){this._$s0=this.x;this._$70=this.y;this._$7L=this.vx;this._$HL=this.vy;};function at(aJ,aI,aH){this._$wL=null;this.scale=null;this._$V0=null;this._$wL=aJ;this.scale=aI;this._$V0=aH;}at.prototype._$oP=function(aI,aH){};function h(aJ,aK,aI,aH){at.prototype.constructor.call(this,aK,aI,aH);this._$tL=null;this._$tL=aJ;}h.prototype=new at();h.prototype._$oP=function(aJ,aH){var aK=this.scale*aJ.getParamFloat(this._$wL);var aL=aH.getPhysicsPoint1();switch(this._$tL){default:case u.Src.SRC_TO_X:aL.x=aL.x+(aK-aL.x)*this._$V0;break;case u.Src.SRC_TO_Y:aL.y=aL.y+(aK-aL.y)*this._$V0;break;case u.Src.SRC_TO_G_ANGLE:var aI=aH._$qr();aI=aI+(aK-aI)*this._$V0;aH._$pr(aI);break;}};function d(aJ,aI,aH){this._$wL=null;this.scale=null;this._$V0=null;this._$wL=aJ;this.scale=aI;this._$V0=aH;}d.prototype._$YS=function(aI,aH){};function aF(aI,aK,aJ,aH){d.prototype.constructor.call(this,aK,aJ,aH);this._$YP=null;this._$YP=aI;}aF.prototype=new d();aF.prototype._$YS=function(aI,aH){switch(this._$YP){default:case u.Target.TARGET_FROM_ANGLE:aI.setParamFloat(this._$wL,this.scale*aH._$5r(),this._$V0);break;case u.Target.TARGET_FROM_ANGLE_V:aI.setParamFloat(this._$wL,this.scale*aH._$Cs(),this._$V0);break;}};u.Src=function(){};u.Src.SRC_TO_X="SRC_TO_X";u.Src.SRC_TO_Y="SRC_TO_Y";u.Src.SRC_TO_G_ANGLE="SRC_TO_G_ANGLE";u.Target=function(){};u.Target.TARGET_FROM_ANGLE="TARGET_FROM_ANGLE";u.Target.TARGET_FROM_ANGLE_V="TARGET_FROM_ANGLE_V";function X(){if(j){return;}this._$fL=0;this._$gL=0;this._$B0=1;this._$z0=1;this._$qT=0;this.reflectX=false;this.reflectY=false;}X.prototype.init=function(aH){this._$fL=aH._$fL;this._$gL=aH._$gL;this._$B0=aH._$B0;this._$z0=aH._$z0;this._$qT=aH._$qT;this.reflectX=aH.reflectX;this.reflectY=aH.reflectY;};X.prototype._$F0=function(aH){this._$fL=aH._$_T();this._$gL=aH._$_T();this._$B0=aH._$_T();this._$z0=aH._$_T();this._$qT=aH._$_T();if(aH.getFormatVersion()>=ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2){this.reflectX=aH._$po();this.reflectY=aH._$po();}};X.prototype._$e=function(){};var ad=function(){};ad._$ni=function(aL,aJ,aR,aQ,aK,aI,aH,aS,aN){var aM=(aH*aI-aS*aK);if(aM==0){return null;}else{var aO=((aL-aR)*aI-(aJ-aQ)*aK)/aM;var aP;if(aK!=0){aP=(aL-aR-aO*aH)/aK;}else{aP=(aJ-aQ-aO*aS)/aI;}if(isNaN(aP)){aP=(aL-aR-aO*aH)/aK;if(isNaN(aP)){aP=(aJ-aQ-aO*aS)/aI;}if(isNaN(aP)){console.log("a is NaN @UtVector#_$ni() ");console.log("v1x : "+aK);console.log("v1x != 0 ? "+(aK!=0));}}if(aN==null){return new Array(aP,aO);}else{aN[0]=aP;aN[1]=aO;return aN;}}};function av(){if(j){return;}this.x=null;this.y=null;this.width=null;this.height=null;}av.prototype._$8P=function(){return this.x+0.5*this.width;};av.prototype._$6P=function(){return this.y+0.5*this.height;};av.prototype._$EL=function(){return this.x+this.width;};av.prototype._$5T=function(){return this.y+this.height;};av.prototype._$jL=function(aI,aK,aJ,aH){this.x=aI;this.y=aK;this.width=aJ;this.height=aH;};av.prototype._$jL=function(aH){this.x=aH.x;this.y=aH.y;this.width=aH.width;this.height=aH.height;};av.prototype.contains=function(aH,aI){return this.x<=this.x&&this.y<=this.y&&(this.x<=this.x+this.width)&&(this.y<=this.y+this.height);};av.prototype.expand=function(aH,aI){this.x-=aH;this.y-=aI;this.width+=aH*2;this.height+=aI*2;};function aG(){}aG._$Z2=function(bb,bo,bp,a2){var a1=bo._$Q2(bb,bp);var a3=bb._$vs();var ba=bb._$Tr();bo._$zr(a3,ba,a1);if(a1<=0){return a2[a3[0]];}else{if(a1==1){var bj=a2[a3[0]];var bi=a2[a3[1]];var a9=ba[0];return(bj+(bi-bj)*a9)|0;}else{if(a1==2){var bj=a2[a3[0]];var bi=a2[a3[1]];var a0=a2[a3[2]];var aZ=a2[a3[3]];var a9=ba[0];var a8=ba[1];var br=(bj+(bi-bj)*a9)|0;var bq=(a0+(aZ-a0)*a9)|0;return(br+(bq-br)*a8)|0;}else{if(a1==3){var aP=a2[a3[0]];var aO=a2[a3[1]];var bn=a2[a3[2]];var bm=a2[a3[3]];var aK=a2[a3[4]];var aJ=a2[a3[5]];var bg=a2[a3[6]];var bf=a2[a3[7]];var a9=ba[0];var a8=ba[1];var a6=ba[2];var bj=(aP+(aO-aP)*a9)|0;var bi=(bn+(bm-bn)*a9)|0;var a0=(aK+(aJ-aK)*a9)|0;var aZ=(bg+(bf-bg)*a9)|0;var br=(bj+(bi-bj)*a8)|0;var bq=(a0+(aZ-a0)*a8)|0;return(br+(bq-br)*a6)|0;}else{if(a1==4){var aT=a2[a3[0]];var aS=a2[a3[1]];var bu=a2[a3[2]];var bt=a2[a3[3]];var aN=a2[a3[4]];var aM=a2[a3[5]];var bl=a2[a3[6]];var bk=a2[a3[7]];var be=a2[a3[8]];var bc=a2[a3[9]];var aX=a2[a3[10]];var aW=a2[a3[11]];var a7=a2[a3[12]];var a5=a2[a3[13]];var aR=a2[a3[14]];var aQ=a2[a3[15]];var a9=ba[0];var a8=ba[1];var a6=ba[2];var a4=ba[3];var aP=(aT+(aS-aT)*a9)|0;var aO=(bu+(bt-bu)*a9)|0;var bn=(aN+(aM-aN)*a9)|0;var bm=(bl+(bk-bl)*a9)|0;var aK=(be+(bc-be)*a9)|0;var aJ=(aX+(aW-aX)*a9)|0;var bg=(a7+(a5-a7)*a9)|0;var bf=(aR+(aQ-aR)*a9)|0;var bj=(aP+(aO-aP)*a8)|0;var bi=(bn+(bm-bn)*a8)|0;var a0=(aK+(aJ-aK)*a8)|0;var aZ=(bg+(bf-bg)*a8)|0;var br=(bj+(bi-bj)*a6)|0;var bq=(a0+(aZ-a0)*a6)|0;return(br+(bq-br)*a4)|0;}else{var aV=1<=ay._$T7){this.clipID=aH._$nP();this.clipIDList=this.convertClipIDForV2_11(this.clipID);}else{this.clipIDList=[];}this._$MS(this._$Lb);};ae.prototype.getClipIDList=function(){return this.clipIDList;};ae.prototype.init=function(aH){};ae.prototype._$Nr=function(aH,aI){aI._$IS[0]=false;aI._$Us=aG._$Z2(aH,this._$GS,aI._$IS,this._$Lb);if(Q._$Zs){}else{if(aI._$IS[0]){return;}}aI._$7s=aG._$br(aH,this._$GS,aI._$IS,this._$mS);};ae.prototype._$2b=function(aH,aI){};ae.prototype.getDrawDataID=function(){return this._$gP;};ae.prototype._$j2=function(aH){this._$gP=aH;};ae.prototype.getOpacity=function(aH,aI){return aI._$7s;};ae.prototype._$zS=function(aH,aI){return aI._$Us;};ae.prototype._$MS=function(aJ){for(var aI=aJ.length-1;aI>=0;--aI){var aH=aJ[aI];if(aHae._$R2){ae._$R2=aH;}}}};ae.prototype.getTargetBaseDataID=function(){return this._$dr;};ae.prototype._$gs=function(aH){this._$dr=aH;};ae.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};ae.prototype.preDraw=function(aJ,aH,aI){};ae.prototype.draw=function(aJ,aH,aI){};ae.prototype.getType=function(){};ae.prototype._$B2=function(aI,aH,aJ){};function ax(){if(j){return;}this._$Eb=ax._$ps;this._$lT=1;this._$C0=1;this._$tT=1;this._$WL=1;this.culling=false;this.matrix4x4=new Float32Array(16);this.premultipliedAlpha=false;this.anisotropy=0;this.clippingProcess=ax.CLIPPING_PROCESS_NONE;this.clipBufPre_clipContextMask=null;this.clipBufPre_clipContextDraw=null;this.CHANNEL_COLORS=new Array();}ax._$ps=32;ax.CLIPPING_PROCESS_NONE=0;ax.CLIPPING_PROCESS_OVERWRITE_ALPHA=1;ax.CLIPPING_PROCESS_MULTIPLY_ALPHA=2;ax.CLIPPING_PROCESS_DRAW=3;ax.CLIPPING_PROCESS_CLEAR_ALPHA=4;ax.prototype.setChannelFlagAsColor=function(aH,aI){this.CHANNEL_COLORS[aH]=aI;};ax.prototype.getChannelFlagAsColor=function(aH){return this.CHANNEL_COLORS[aH];};ax.prototype._$ZT=function(){};ax.prototype._$Uo=function(aM,aK,aJ,aL,aN,aI,aH){};ax.prototype._$Rs=function(){return -1;};ax.prototype._$Ds=function(aH){};ax.prototype.setBaseColor=function(aK,aJ,aI,aH){if(aK<0){aK=0;}else{if(aK>1){aK=1;}}if(aJ<0){aJ=0;}else{if(aJ>1){aJ=1;}}if(aI<0){aI=0;}else{if(aI>1){aI=1;}}if(aH<0){aH=0;}else{if(aH>1){aH=1;}}this._$lT=aK;this._$C0=aJ;this._$tT=aI;this._$WL=aH;};ax.prototype._$WP=function(aH){this.culling=aH;};ax.prototype.setMatrix=function(aH){for(var aI=0;aI<16;aI++){this.matrix4x4[aI]=aH[aI];}};ax.prototype._$IT=function(){return this.matrix4x4;};ax.prototype.setPremultipliedAlpha=function(aH){this.premultipliedAlpha=aH;};ax.prototype.isPremultipliedAlpha=function(){return this.premultipliedAlpha;};ax.prototype.setAnisotropy=function(aH){this.anisotropy=aH;};ax.prototype.getAnisotropy=function(){return this.anisotropy;};ax.prototype.getClippingProcess=function(){return this.clippingProcess;};ax.prototype.setClippingProcess=function(aH){this.clippingProcess=aH;};ax.prototype.setClipBufPre_clipContextForMask=function(aH){this.clipBufPre_clipContextMask=aH;};ax.prototype.getClipBufPre_clipContextMask=function(){return this.clipBufPre_clipContextMask;};ax.prototype.setClipBufPre_clipContextForDraw=function(aH){this.clipBufPre_clipContextDraw=aH;};ax.prototype.getClipBufPre_clipContextDraw=function(){return this.clipBufPre_clipContextDraw;};function o(){if(j){return;}this.a=1;this.r=1;this.g=1;this.b=1;this.scale=1;this._$ho=1;this.blendMode=Q.L2D_COLOR_BLEND_MODE_MULT;}function c(){if(j){return;}this._$kP=null;this._$dr=null;this._$Ai=true;this._$mS=null;}c._$ur=-2;c._$c2=1;c._$_b=2;c.prototype._$F0=function(aH){this._$kP=aH._$nP();this._$dr=aH._$nP();};c.prototype.readV2_opacity=function(aH){if(aH.getFormatVersion()>=ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2){this._$mS=aH._$Tb();}};c.prototype.init=function(aH){};c.prototype._$Nr=function(aI,aH){};c.prototype.interpolateOpacity=function(aJ,aK,aI,aH){if(this._$mS==null){aI.setInterpolatedOpacity(1);}else{aI.setInterpolatedOpacity(aG._$br(aJ,aK,aH,this._$mS));}};c.prototype._$2b=function(aI,aH){};c.prototype._$nb=function(aL,aK,aM,aH,aI,aJ,aN){};c.prototype.getType=function(){};c.prototype._$gs=function(aH){this._$dr=aH;};c.prototype._$a2=function(aH){this._$kP=aH;};c.prototype.getTargetBaseDataID=function(){return this._$dr;};c.prototype.getBaseDataID=function(){return this._$kP;};c.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};function P(){}P._$W2=0;P._$CS=P._$W2;P._$Mo=function(){return true;};P._$XP=function(aI){try{var aJ=getTimeMSec();while(getTimeMSec()-aJ=aJ.length){return false;}for(var aI=aL;aI=0;--aJ){var aI=this._$Ob[aJ].getParamIndex(aH);if(aI==aA._$ds){aI=aK.getParamIndex(this._$Ob[aJ].getParamID());}if(aK._$Xb(aI)){return true;}}return false;};g.prototype._$Q2=function(aL,aV){var aX=this._$Ob.length;var aJ=aL._$v2();var aN=0;var aI;var aQ;for(var aK=0;aKaw._$Qb){console.log("err 23245\n");}var aS=this._$Ob.length;var aK=1;var aH=1;var aJ=0;for(var aQ=0;aQ=0;--aK){aM[aK]=aL[aK];}}else{this.mult_fast(aI,aH,aM,aJ);}};ac.prototype.mult_fast=function(aI,aH,aK,aJ){if(aJ){aK[0]=aI[0]*aH[0]+aI[4]*aH[1]+aI[8]*aH[2];aK[4]=aI[0]*aH[4]+aI[4]*aH[5]+aI[8]*aH[6];aK[8]=aI[0]*aH[8]+aI[4]*aH[9]+aI[8]*aH[10];aK[12]=aI[0]*aH[12]+aI[4]*aH[13]+aI[8]*aH[14]+aI[12];aK[1]=aI[1]*aH[0]+aI[5]*aH[1]+aI[9]*aH[2];aK[5]=aI[1]*aH[4]+aI[5]*aH[5]+aI[9]*aH[6];aK[9]=aI[1]*aH[8]+aI[5]*aH[9]+aI[9]*aH[10];aK[13]=aI[1]*aH[12]+aI[5]*aH[13]+aI[9]*aH[14]+aI[13];aK[2]=aI[2]*aH[0]+aI[6]*aH[1]+aI[10]*aH[2];aK[6]=aI[2]*aH[4]+aI[6]*aH[5]+aI[10]*aH[6];aK[10]=aI[2]*aH[8]+aI[6]*aH[9]+aI[10]*aH[10];aK[14]=aI[2]*aH[12]+aI[6]*aH[13]+aI[10]*aH[14]+aI[14];aK[3]=aK[7]=aK[11]=0;aK[15]=1;}else{aK[0]=aI[0]*aH[0]+aI[4]*aH[1]+aI[8]*aH[2]+aI[12]*aH[3];aK[4]=aI[0]*aH[4]+aI[4]*aH[5]+aI[8]*aH[6]+aI[12]*aH[7];aK[8]=aI[0]*aH[8]+aI[4]*aH[9]+aI[8]*aH[10]+aI[12]*aH[11];aK[12]=aI[0]*aH[12]+aI[4]*aH[13]+aI[8]*aH[14]+aI[12]*aH[15];aK[1]=aI[1]*aH[0]+aI[5]*aH[1]+aI[9]*aH[2]+aI[13]*aH[3];aK[5]=aI[1]*aH[4]+aI[5]*aH[5]+aI[9]*aH[6]+aI[13]*aH[7];aK[9]=aI[1]*aH[8]+aI[5]*aH[9]+aI[9]*aH[10]+aI[13]*aH[11];aK[13]=aI[1]*aH[12]+aI[5]*aH[13]+aI[9]*aH[14]+aI[13]*aH[15];aK[2]=aI[2]*aH[0]+aI[6]*aH[1]+aI[10]*aH[2]+aI[14]*aH[3];aK[6]=aI[2]*aH[4]+aI[6]*aH[5]+aI[10]*aH[6]+aI[14]*aH[7];aK[10]=aI[2]*aH[8]+aI[6]*aH[9]+aI[10]*aH[10]+aI[14]*aH[11];aK[14]=aI[2]*aH[12]+aI[6]*aH[13]+aI[10]*aH[14]+aI[14]*aH[15];aK[3]=aI[3]*aH[0]+aI[7]*aH[1]+aI[11]*aH[2]+aI[15]*aH[3];aK[7]=aI[3]*aH[4]+aI[7]*aH[5]+aI[11]*aH[6]+aI[15]*aH[7];aK[11]=aI[3]*aH[8]+aI[7]*aH[9]+aI[11]*aH[10]+aI[15]*aH[11];aK[15]=aI[3]*aH[12]+aI[7]*aH[13]+aI[11]*aH[14]+aI[15]*aH[15];}};ac.prototype.translate=function(aH,aJ,aI){this.m[12]=this.m[0]*aH+this.m[4]*aJ+this.m[8]*aI+this.m[12];this.m[13]=this.m[1]*aH+this.m[5]*aJ+this.m[9]*aI+this.m[13];this.m[14]=this.m[2]*aH+this.m[6]*aJ+this.m[10]*aI+this.m[14];this.m[15]=this.m[3]*aH+this.m[7]*aJ+this.m[11]*aI+this.m[15];};ac.prototype.scale=function(aJ,aI,aH){this.m[0]*=aJ;this.m[4]*=aI;this.m[8]*=aH;this.m[1]*=aJ;this.m[5]*=aI;this.m[9]*=aH;this.m[2]*=aJ;this.m[6]*=aI;this.m[10]*=aH;this.m[3]*=aJ;this.m[7]*=aI;this.m[11]*=aH;};ac.prototype.rotateX=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[4];this.m[4]=aI*aK+this.m[8]*aJ;this.m[8]=aI*-aJ+this.m[8]*aK;aI=this.m[5];this.m[5]=aI*aK+this.m[9]*aJ;this.m[9]=aI*-aJ+this.m[9]*aK;aI=this.m[6];this.m[6]=aI*aK+this.m[10]*aJ;this.m[10]=aI*-aJ+this.m[10]*aK;aI=this.m[7];this.m[7]=aI*aK+this.m[11]*aJ;this.m[11]=aI*-aJ+this.m[11]*aK;};ac.prototype.rotateY=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[0];this.m[0]=aI*aK+this.m[8]*-aJ;this.m[8]=aI*aJ+this.m[8]*aK;aI=this.m[1];this.m[1]=aI*aK+this.m[9]*-aJ;this.m[9]=aI*aJ+this.m[9]*aK;aI=m[2];this.m[2]=aI*aK+this.m[10]*-aJ;this.m[10]=aI*aJ+this.m[10]*aK;aI=m[3];this.m[3]=aI*aK+this.m[11]*-aJ;this.m[11]=aI*aJ+this.m[11]*aK;};ac.prototype.rotateZ=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[0];this.m[0]=aI*aK+this.m[4]*aJ;this.m[4]=aI*-aJ+this.m[4]*aK;aI=this.m[1];this.m[1]=aI*aK+this.m[5]*aJ;this.m[5]=aI*-aJ+this.m[5]*aK;aI=this.m[2];this.m[2]=aI*aK+this.m[6]*aJ;this.m[6]=aI*-aJ+this.m[6]*aK;aI=this.m[3];this.m[3]=aI*aK+this.m[7]*aJ;this.m[7]=aI*-aJ+this.m[7]*aK;};function Z(aH){if(j){return;}ak.prototype.constructor.call(this,aH);}Z.prototype=new ak();Z._$tP=new Object();Z._$27=function(){Z._$tP.clear();};Z.getID=function(aH){var aI=Z._$tP[aH];if(aI==null){aI=new Z(aH);Z._$tP[aH]=aI;}return aI;};Z.prototype._$3s=function(){return new Z();};function aD(){if(j){return;}this._$7=1;this._$f=0;this._$H=0;this._$g=1;this._$k=0;this._$w=0;this._$hi=STATE_IDENTITY;this._$Z=_$pS;}aD._$kS=-1;aD._$pS=0;aD._$hb=1;aD.STATE_IDENTITY=0;aD._$gb=1;aD._$fo=2;aD._$go=4;aD.prototype.transform=function(aK,aI,aH){var aT,aS,aR,aM,aL,aJ;var aQ=0;var aN=0;switch(this._$hi){default:return;case (aD._$go|aD._$fo|aD._$gb):aT=this._$7;aS=this._$H;aR=this._$k;aM=this._$f;aL=this._$g;aJ=this._$w;while(--aH>=0){var aP=aK[aQ++];var aO=aK[aQ++];aI[aN++]=(aT*aP+aS*aO+aR);aI[aN++]=(aM*aP+aL*aO+aJ);}return;case (aD._$go|aD._$fo):aT=this._$7;aS=this._$H;aM=this._$f;aL=this._$g;while(--aH>=0){var aP=aK[aQ++];var aO=aK[aQ++];aI[aN++]=(aT*aP+aS*aO);aI[aN++]=(aM*aP+aL*aO);}return;case (aD._$go|aD._$gb):aS=this._$H;aR=this._$k;aM=this._$f;aJ=this._$w;while(--aH>=0){var aP=aK[aQ++];aI[aN++]=(aS*aK[aQ++]+aR);aI[aN++]=(aM*aP+aJ);}return;case (aD._$go):aS=this._$H;aM=this._$f;while(--aH>=0){var aP=aK[aQ++];aI[aN++]=(aS*aK[aQ++]);aI[aN++]=(aM*aP);}return;case (aD._$fo|aD._$gb):aT=this._$7;aR=this._$k;aL=this._$g;aJ=this._$w;while(--aH>=0){aI[aN++]=(aT*aK[aQ++]+aR);aI[aN++]=(aL*aK[aQ++]+aJ);}return;case (aD._$fo):aT=this._$7;aL=this._$g;while(--aH>=0){aI[aN++]=(aT*aK[aQ++]);aI[aN++]=(aL*aK[aQ++]);}return;case (aD._$gb):aR=this._$k;aJ=this._$w;while(--aH>=0){aI[aN++]=(aK[aQ++]+aR);aI[aN++]=(aK[aQ++]+aJ);}return;case (aD.STATE_IDENTITY):if(aK!=aI||aQ!=aN){P._$jT(aK,aQ,aI,aN,aH*2);}return;}};aD.prototype.update=function(){if(this._$H==0&&this._$f==0){if(this._$7==1&&this._$g==1){if(this._$k==0&&this._$w==0){this._$hi=aD.STATE_IDENTITY;this._$Z=aD._$pS;}else{this._$hi=aD._$gb;this._$Z=aD._$hb;}}else{if(this._$k==0&&this._$w==0){this._$hi=aD._$fo;this._$Z=aD._$kS;}else{this._$hi=(aD._$fo|aD._$gb);this._$Z=aD._$kS;}}}else{if(this._$7==0&&this._$g==0){if(this._$k==0&&this._$w==0){this._$hi=aD._$go;this._$Z=aD._$kS;}else{this._$hi=(aD._$go|aD._$gb);this._$Z=aD._$kS;}}else{if(this._$k==0&&this._$w==0){this._$hi=(aD._$go|aD._$fo);this._$Z=aD._$kS;}else{this._$hi=(aD._$go|aD._$fo|aD._$gb);this._$Z=aD._$kS;}}}};aD.prototype._$RT=function(aK){this._$IT(aK);var aJ=aK[0];var aH=aK[2];var aN=aK[1];var aM=aK[3];var aI=Math.sqrt(aJ*aJ+aN*aN);var aL=aJ*aM-aH*aN;if(aI==0){if(Q._$so){console.log("affine._$RT() / rt==0");}}else{aK[0]=aI;aK[1]=aL/aI;aK[2]=(aN*aM+aJ*aH)/aL;aK[3]=Math.atan2(aN,aJ);}};aD.prototype._$ho=function(aN,aM,aI,aH){var aL=new Float32Array(6);var aK=new Float32Array(6);aN._$RT(aL);aM._$RT(aK);var aJ=new Float32Array(6);aJ[0]=aL[0]+(aK[0]-aL[0])*aI;aJ[1]=aL[1]+(aK[1]-aL[1])*aI;aJ[2]=aL[2]+(aK[2]-aL[2])*aI;aJ[3]=aL[3]+(aK[3]-aL[3])*aI;aJ[4]=aL[4]+(aK[4]-aL[4])*aI;aJ[5]=aL[5]+(aK[5]-aL[5])*aI;aH._$CT(aJ);};aD.prototype._$CT=function(aJ){var aI=Math.cos(aJ[3]);var aH=Math.sin(aJ[3]);this._$7=aJ[0]*aI;this._$f=aJ[0]*aH;this._$H=aJ[1]*(aJ[2]*aI-aH);this._$g=aJ[1]*(aJ[2]*aH+aI);this._$k=aJ[4];this._$w=aJ[5];this.update();};aD.prototype._$IT=function(aH){aH[0]=this._$7;aH[1]=this._$f;aH[2]=this._$H;aH[3]=this._$g;aH[4]=this._$k;aH[5]=this._$w;};function Y(){if(j){return;}ah.prototype.constructor.call(this);this.motions=new Array();this._$7r=null;this._$7r=Y._$Co++;this._$D0=30;this._$yT=0;this._$E=true;this.loopFadeIn=true;this._$AS=-1;_$a0();}Y.prototype=new ah();Y._$cs="VISIBLE:";Y._$ar="LAYOUT:";Y._$Co=0;Y._$D2=[];Y._$1T=1;Y.loadMotion=function(aR){var aM=new Y();var aI=[0];var aP=aR.length;aM._$yT=0;for(var aJ=0;aJ=0){if(aK==aT+4&&aR[aT+1]=="f"&&aR[aT+2]=="p"&&aR[aT+3]=="s"){aO=true;}for(aJ=aK+1;aJ0){if(aO&&5=0){var aN=new t();if(G.startsWith(aR,aT,Y._$cs)){aN._$RP=t._$hs;aN._$4P=new String(aR,aT,aK-aT);}else{if(G.startsWith(aR,aT,Y._$ar)){aN._$4P=new String(aR,aT+7,aK-aT-7);if(G.startsWith(aR,aT+7,"ANCHOR_X")){aN._$RP=t._$xs;}else{if(G.startsWith(aR,aT+7,"ANCHOR_Y")){aN._$RP=t._$us;}else{if(G.startsWith(aR,aT+7,"SCALE_X")){aN._$RP=t._$qs;}else{if(G.startsWith(aR,aT+7,"SCALE_Y")){aN._$RP=t._$Ys;}else{if(G.startsWith(aR,aT+7,"X")){aN._$RP=t._$ws;}else{if(G.startsWith(aR,aT+7,"Y")){aN._$RP=t._$Ns;}}}}}}}else{aN._$RP=t._$Fr;aN._$4P=new String(aR,aT,aK-aT);}}aM.motions.push(aN);var aS=0;Y._$D2.clear();for(aJ=aK+1;aJ0){Y._$D2.push(aL);aS++;var aH=aI[0];if(aHaM._$yT){aM._$yT=aS;}}}}aM._$AS=((1000*aM._$yT)/aM._$D0)|0;return aM;};Y.prototype.getDurationMSec=function(){return this._$AS;};Y.prototype.dump=function(){for(var aJ=0;aJ=aK?aK-1:aJ)];aH.setParamFloat(aQ,aT);}else{if(t._$ws<=aS._$RP&&aS._$RP<=t._$Ys){}else{var aR=aH.getParamFloat(aQ);var aY=aS._$I0[(aJ>=aK?aK-1:aJ)];var aW=aS._$I0[(aJ+1>=aK?aK-1:aJ+1)];var aI=aY+(aW-aY)*aP;var aN=aR+(aI-aR)*aO;aH.setParamFloat(aQ,aN);}}}if(aJ>=this._$yT){if(this._$E){aX._$z2=aL;if(this.loopFadeIn){aX._$bs=aL;}}else{aX._$9L=true;}}};Y.prototype._$r0=function(){return this._$E;};Y.prototype._$aL=function(aH){this._$E=aH;};Y.prototype.isLoopFadeIn=function(){return this.loopFadeIn;};Y.prototype.setLoopFadeIn=function(aH){this.loopFadeIn=aH;};function aE(){this._$P=new Float32Array(100);this.size=0;}aE.prototype.clear=function(){this.size=0;};aE.prototype.add=function(aI){if(this._$P.length<=this.size){var aH=new Float32Array(this.size*2);P._$jT(this._$P,0,aH,0,this.size);this._$P=aH;}this._$P[this.size++]=aI;};aE.prototype._$BL=function(){var aH=new Float32Array(this.size);P._$jT(this._$P,0,aH,0,this.size);return aH;};function t(){this._$4P=null;this._$I0=null;this._$RP=null;}t._$Fr=0;t._$hs=1;t._$ws=100;t._$Ns=101;t._$xs=102;t._$us=103;t._$qs=104;t._$Ys=105;function aw(){}aw._$Ms=1;aw._$Qs=2;aw._$i2=0;aw._$No=2;aw._$do=aw._$Ms;aw._$Ls=true;aw._$1r=5;aw._$Qb=65;aw._$J=0.0001;aw._$FT=0.001;aw._$Ss=3;function ay(){}ay._$o7=6;ay._$S7=7;ay._$s7=8;ay._$77=9;ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2=10;ay.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1=11;ay._$T7=ay.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1;ay._$Is=-2004318072;ay._$h0=0;ay._$4L=23;ay._$7P=33;ay._$uT=function(aH){console.log("_$bo :: _$6 _$mo _$E0 : %d\n",aH);};ay._$9o=function(aH){if(aH<40){ay._$uT(aH);return null;}else{if(aH<50){ay._$uT(aH);return null;}else{if(aH<60){ay._$uT(aH);return null;}else{if(aH<100){switch(aH){case 65:return new E();case 66:return new g();case 67:return new aA();case 68:return new ab();case 69:return new X();case 70:return new b();default:ay._$uT(aH);return null;}}else{if(aH<150){switch(aH){case 131:return new f();case 133:return new s();case 136:return new w();case 137:return new an();case 142:return new aq();}}}}}}ay._$uT(aH);return null;};function y(aH){if(j){return;}this._$QT=true;this._$co=-1;this._$qo=0;this._$pb=new Array(y._$is);this._$_2=new Float32Array(y._$is);this._$vr=new Float32Array(y._$is);this._$Rr=new Float32Array(y._$is);this._$Or=new Float32Array(y._$is);this._$fs=new Float32Array(y._$is);this._$Js=new Array(y._$is);this._$3S=new Array();this._$aS=new Array();this._$Bo=null;this._$F2=new Array();this._$db=new Array();this._$8b=new Array();this._$Hr=new Array();this._$Ws=null;this._$Vs=null;this._$Er=null;this._$Es=new Int16Array(aw._$Qb);this._$ZP=new Float32Array(aw._$1r*2);this._$Ri=aH;this._$b0=y._$HP++;this.clipManager=null;this.dp_webgl=null;}y._$HP=0;y._$_0=true;y._$V2=-1;y._$W0=-1;y._$jr=false;y._$ZS=true;y._$tr=(-1000000);y._$lr=(1000000);y._$is=32;y._$e=false;y.prototype.getDrawDataIndex=function(aI){for(var aH=this._$aS.length-1;aH>=0;--aH){if(this._$aS[aH]!=null&&this._$aS[aH].getDrawDataID()==aI){return aH;}}return -1;};y.prototype.getDrawData=function(aH){if(aH instanceof Z){if(this._$Bo==null){this._$Bo=new Object();var aJ=this._$aS.length;for(var aI=0;aI0){this.release();}var aO=this._$Ri.getModelImpl();var aT=aO._$Xr();var aS=aT.length;var aH=new Array();var a3=new Array();for(var aV=0;aV=0){this._$3S.push(aL);this._$db.push(a3[aV]);aH[aV]=null;aX=true;}}if(!aX){break;}}var aI=aO._$E2();if(aI!=null){var aJ=aI._$1s();if(aJ!=null){var aW=aJ.length;for(var aV=0;aV=0;aW--){this._$Js[aW]=y._$jr;}this._$QT=false;if(y._$e){q.dump("_$eL");}return aX;};y.prototype.preDraw=function(aH){if(this.clipManager!=null){aH._$ZT();this.clipManager.setupClip(this,aH);}};y.prototype.draw=function(aM){if(this._$Ws==null){q._$li("call _$Ri.update() before _$Ri.draw() ");return;}var aP=this._$Ws.length;aM._$ZT();for(var aK=0;aK=0;--aI){if(this._$pb[aI]==aH){return aI;}}return this._$02(aH,0,y._$tr,y._$lr);};y.prototype._$BS=function(aH){return this.getBaseDataIndex(aH);};y.prototype.getBaseDataIndex=function(aH){for(var aI=this._$3S.length-1;aI>=0;--aI){if(this._$3S[aI]!=null&&this._$3S[aI].getBaseDataID()==aH){return aI;}}return -1;};y.prototype._$UT=function(aJ,aH){var aI=new Float32Array(aH);P._$jT(aJ,0,aI,0,aJ.length);return aI;};y.prototype._$02=function(aN,aM,aL,aH){if(this._$qo>=this._$pb.length){var aK=this._$pb.length;var aJ=new Array(aK*2);P._$jT(this._$pb,0,aJ,0,aK);this._$pb=aJ;this._$_2=this._$UT(this._$_2,aK*2);this._$vr=this._$UT(this._$vr,aK*2);this._$Rr=this._$UT(this._$Rr,aK*2);this._$Or=this._$UT(this._$Or,aK*2);var aI=new Array();P._$jT(this._$Js,0,aI,0,aK);this._$Js=aI;}this._$pb[this._$qo]=aN;this._$_2[this._$qo]=aM;this._$vr[this._$qo]=aM;this._$Rr[this._$qo]=aL;this._$Or[this._$qo]=aH;this._$Js[this._$qo]=y._$ZS;return this._$qo++;};y.prototype._$Zo=function(aI,aH){this._$3S[aI]=aH;};y.prototype.setParamFloat=function(aH,aI){if(aIthis._$Or[aH]){aI=this._$Or[aH];}this._$_2[aH]=aI;};y.prototype.loadParam=function(){var aH=this._$_2.length;if(aH>this._$fs.length){aH=this._$fs.length;}P._$jT(this._$fs,0,this._$_2,0,aH);};y.prototype.saveParam=function(){var aH=this._$_2.length;if(aH>this._$fs.length){this._$fs=new Float32Array(aH);}P._$jT(this._$_2,0,this._$fs,0,aH);};y.prototype._$v2=function(){return this._$co;};y.prototype._$WS=function(){return this._$QT;};y.prototype._$Xb=function(aH){return this._$Js[aH]==y._$ZS;};y.prototype._$vs=function(){return this._$Es;};y.prototype._$Tr=function(){return this._$ZP;};y.prototype.getBaseData=function(aH){return this._$3S[aH];};y.prototype.getParamFloat=function(aH){return this._$_2[aH];};y.prototype.getParamMax=function(aH){return this._$Or[aH];};y.prototype.getParamMin=function(aH){return this._$Rr[aH];};y.prototype.setPartsOpacity=function(aJ,aH){var aI=this._$Hr[aJ];aI.setPartsOpacity(aH);};y.prototype.getPartsOpacity=function(aI){var aH=this._$Hr[aI];return aH.getPartsOpacity();};y.prototype.getPartsDataIndex=function(aI){for(var aH=this._$F2.length-1;aH>=0;--aH){if(this._$F2[aH]!=null&&this._$F2[aH]._$p2()==aI){return aH;}}return -1;};y.prototype._$q2=function(aH){return this._$db[aH];};y.prototype._$C2=function(aH){return this._$8b[aH];};y.prototype._$Bb=function(aH){return this._$Hr[aH];};y.prototype._$5s=function(aO,aK){var aJ=this._$Ws.length;var aN=aO;for(var aL=0;aL0){aL+=aK;}return aI;};ap._$C=function(aJ){var aI=null;var aL=null;try{aI=(aJ instanceof Array)?aJ:new _$Xs(aJ,8192);aL=new _$js();var aM=1000;var aK;var aH=new Int8Array(aM);while((aK=aI.read(aH))>0){aL.write(aH,0,aK);}return aL._$TS();}finally{if(aJ!=null){aJ.close();}if(aL!=null){aL.flush();aL.close();}}};function ar(){if(j){return;}this._$12=null;this._$bb=null;this._$_L=null;this._$jo=null;this._$iL=null;this._$0L=null;this._$Br=null;this._$Dr=null;this._$Cb=null;this._$mr=null;this._$_L=az.STATE_FIRST;this._$Br=4000;this._$Dr=100;this._$Cb=50;this._$mr=150;this._$jo=true;this._$iL="PARAM_EYE_L_OPEN";this._$0L="PARAM_EYE_R_OPEN";}ar.prototype._$T2=function(){var aI=P.getUserTimeMSec();var aH=Math._$10();return(aI+aH*(2*this._$Br-1));};ar.prototype._$uo=function(aH){this._$Br=aH;};ar.prototype._$QS=function(aI,aH,aJ){this._$Dr=aI;this._$Cb=aH;this._$mr=aJ;};ar.prototype._$7T=function(aI){var aK=P.getUserTimeMSec();var aH;var aJ=0;switch(this._$_L){case STATE_CLOSING:aJ=(aK-this._$bb)/this._$Dr;if(aJ>=1){aJ=1;this._$_L=az.STATE_CLOSED;this._$bb=aK;}aH=1-aJ;break;case STATE_CLOSED:aJ=(aK-this._$bb)/this._$Cb;if(aJ>=1){this._$_L=az.STATE_OPENING;this._$bb=aK;}aH=0;break;case STATE_OPENING:aJ=(aK-this._$bb)/this._$mr;if(aJ>=1){aJ=1;this._$_L=az.STATE_INTERVAL;this._$12=this._$T2();}aH=aJ;break;case STATE_INTERVAL:if(this._$120.9?Q.EXPAND_W:0;this.gl.drawElements(aL,aP,aI,aQ,aM,aN,this.transform,aJ);};x.prototype._$Rs=function(){throw new Error("_$Rs");};x.prototype._$Ds=function(aH){throw new Error("_$Ds");};x.prototype._$K2=function(){for(var aH=0;aH=0;--aI){var aH=aJ[aI];if(aHa._$R2){a._$R2=aH;}}}};a._$or=function(){return a._$52;};a._$Pr=function(){return a._$R2;};a.prototype._$F0=function(aH){this._$gP=aH._$nP();this._$dr=aH._$nP();this._$GS=aH._$nP();this._$qb=aH._$6L();this._$Lb=aH._$cS();this._$mS=aH._$Tb();if(aH.getFormatVersion()>=ay._$T7){this.clipID=aH._$nP();this.clipIDList=this.convertClipIDForV2_11(this.clipID);}else{this.clipIDList=null;}a._$Sb(this._$Lb);};a.prototype.getClipIDList=function(){return this.clipIDList;};a.prototype._$Nr=function(aI,aH){aH._$IS[0]=false;aH._$Us=aG._$Z2(aI,this._$GS,aH._$IS,this._$Lb);if(Q._$Zs){}else{if(aH._$IS[0]){return;}}aH._$7s=aG._$br(aI,this._$GS,aH._$IS,this._$mS);};a.prototype._$2b=function(aH){};a.prototype.getDrawDataID=function(){return this._$gP;};a.prototype._$j2=function(aH){this._$gP=aH;};a.prototype.getOpacity=function(aH,aI){return aI._$7s;};a.prototype._$zS=function(aH,aI){return aI._$Us;};a.prototype.getTargetBaseDataID=function(){return this._$dr;};a.prototype._$gs=function(aH){this._$dr=aH;};a.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};a.prototype.getType=function(){};function aq(){if(j){return;}this._$NL=null;this._$3S=null;this._$aS=null;aq._$42++;}aq._$42=0;aq.prototype._$1b=function(){return this._$3S;};aq.prototype.getDrawDataList=function(){return this._$aS;};aq.prototype._$F0=function(aH){this._$NL=aH._$nP();this._$aS=aH._$nP();this._$3S=aH._$nP();};aq.prototype._$kr=function(aH){aH._$Zo(this._$3S);aH._$xo(this._$aS);this._$3S=null;this._$aS=null;};function v(){if(j){return;}aa.prototype.constructor.call(this);this._$zo=new x();}v.prototype=new aa();v.loadModel=function(aI){var aH=new v();aa._$62(aH,aI);return aH;};v.loadModel=function(aI){var aH=new v();aa._$62(aH,aI);return aH;};v._$to=function(){var aH=new v();return aH;};v._$er=function(aM){var aJ=new _$5("../_$_r/_$t0/_$Ri/_$_P._$d");if(aJ.exists()==false){throw new _$ls("_$t0 _$_ _$6 _$Ui :: "+aJ._$PL());}var aH=["../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1"];var aK=v.loadModel(aJ._$3b());for(var aI=0;aI=0){if(aK==aV+4&&p(aT,aV+1)=="f"&&p(aT,aV+2)=="p"&&p(aT,aV+3)=="s"){aP=true;}for(aJ=aK+1;aJ0){if(aP&&5=0){var aO=new t();if(G.startsWith(aT,aV,ao._$cs)){aO._$RP=t._$hs;aO._$4P=G.createString(aT,aV,aK-aV);}else{if(G.startsWith(aT,aV,ao._$ar)){aO._$4P=G.createString(aT,aV+7,aK-aV-7);if(G.startsWith(aT,aV+7,"ANCHOR_X")){aO._$RP=t._$xs;}else{if(G.startsWith(aT,aV+7,"ANCHOR_Y")){aO._$RP=t._$us;}else{if(G.startsWith(aT,aV+7,"SCALE_X")){aO._$RP=t._$qs;}else{if(G.startsWith(aT,aV+7,"SCALE_Y")){aO._$RP=t._$Ys;}else{if(G.startsWith(aT,aV+7,"X")){aO._$RP=t._$ws;}else{if(G.startsWith(aT,aV+7,"Y")){aO._$RP=t._$Ns;}}}}}}}else{aO._$RP=t._$Fr;aO._$4P=G.createString(aT,aV,aK-aV);}}aN.motions.push(aO);var aU=0;var aR=[];for(aJ=aK+1;aJ0){aR.push(aM);aU++;var aH=aI[0];if(aHaN._$yT){aN._$yT=aU;}}}}aN._$rr=((1000*aN._$yT)/aN._$D0)|0;return aN;};ao.prototype.getDurationMSec=function(){return this._$E?-1:this._$rr;};ao.prototype.getLoopDurationMSec=function(){return this._$rr;};ao.prototype.dump=function(){for(var aJ=0;aJ=aL?aL-1:aK)];aJ.setParamFloat(aT,aX);}else{if(t._$ws<=aV._$RP&&aV._$RP<=t._$Ys){}else{var aH=aJ.getParamIndex(aT);var a4=aJ.getModelContext();var aY=a4.getParamMax(aH);var aW=a4.getParamMin(aH);var aM=0.4;var aS=aM*(aY-aW);var aU=a4.getParamFloat(aH);var a2=aV._$I0[(aK>=aL?aL-1:aK)];var a1=aV._$I0[(aK+1>=aL?aL-1:aK+1)];var aI;if((a2aS)||(a2>a1&&a2-a1>aS)){aI=a2;}else{aI=a2+(a1-a2)*aR;}var aP=aU+(aI-aU)*aQ;aJ.setParamFloat(aT,aP);}}}if(aK>=this._$yT){if(this._$E){a3._$z2=aN;if(this.loopFadeIn){a3._$bs=aN;}}else{a3._$9L=true;}}this._$eP=aQ;};ao.prototype._$r0=function(){return this._$E;};ao.prototype._$aL=function(aH){this._$E=aH;};ao.prototype._$S0=function(){return this._$D0;};ao.prototype._$U0=function(aH){this._$D0=aH;};ao.prototype.isLoopFadeIn=function(){return this.loopFadeIn;};ao.prototype.setLoopFadeIn=function(aH){this.loopFadeIn=aH;};function aE(){this._$P=new Float32Array(100);this.size=0;}aE.prototype.clear=function(){this.size=0;};aE.prototype.add=function(aI){if(this._$P.length<=this.size){var aH=new Float32Array(this.size*2);P._$jT(this._$P,0,aH,0,this.size);this._$P=aH;}this._$P[this.size++]=aI;};aE.prototype._$BL=function(){var aH=new Float32Array(this.size);P._$jT(this._$P,0,aH,0,this.size);return aH;};function t(){this._$4P=null;this._$I0=null;this._$RP=null;}t._$Fr=0;t._$hs=1;t._$ws=100;t._$Ns=101;t._$xs=102;t._$us=103;t._$qs=104;t._$Ys=105;function E(){if(j){return;}c.prototype.constructor.call(this);this._$o=0;this._$A=0;this._$GS=null;this._$Eo=null;}E.prototype=new c();E._$gT=new Array();E.prototype._$zP=function(){this._$GS=new g();this._$GS._$zP();};E.prototype._$F0=function(aH){c.prototype._$F0.call(this,aH);this._$A=aH._$6L();this._$o=aH._$6L();this._$GS=aH._$nP();this._$Eo=aH._$nP();c.prototype.readV2_opacity.call(this,aH);};E.prototype.init=function(aH){var aI=new H(this);var aJ=(this._$o+1)*(this._$A+1);if(aI._$Cr!=null){aI._$Cr=null;}aI._$Cr=new Float32Array(aJ*2);if(aI._$hr!=null){aI._$hr=null;}if(this._$32()){aI._$hr=new Float32Array(aJ*2);}else{aI._$hr=null;}return aI;};E.prototype._$Nr=function(aJ,aI){var aK=aI;if(!this._$GS._$Ur(aJ)){return;}var aL=this._$VT();var aH=E._$gT;aH[0]=false;aG._$Vr(aJ,this._$GS,aH,aL,this._$Eo,aK._$Cr,0,2);aI._$Ib(aH[0]);this.interpolateOpacity(aJ,this._$GS,aI,aH);};E.prototype._$2b=function(aK,aJ){var aL=aJ;aL._$hS(true);if(!this._$32()){aL.setTotalOpacity(aL.getInterpolatedOpacity());}else{var aH=this.getTargetBaseDataID();if(aL._$8r==c._$ur){aL._$8r=aK.getBaseDataIndex(aH);}if(aL._$8r<0){if(Q._$so){q._$li("_$L _$0P _$G :: %s",aH);}aL._$hS(false);}else{var aN=aK.getBaseData(aL._$8r);var aI=aK._$q2(aL._$8r);if(aN!=null&&aI._$yo()){var aM=aI.getTotalScale();aL.setTotalScale_notForClient(aM);var aO=aI.getTotalOpacity();aL.setTotalOpacity(aO*aL.getInterpolatedOpacity());aN._$nb(aK,aI,aL._$Cr,aL._$hr,this._$VT(),0,2);aL._$hS(true);}else{aL._$hS(false);}}}};E.prototype._$nb=function(aL,aI,aH,aM,aO,aK,aJ){if(true){var aN=aI;var aP=(aN._$hr!=null)?aN._$hr:aN._$Cr;E.transformPoints_sdk2(aH,aM,aO,aK,aJ,aP,this._$o,this._$A);}else{this.transformPoints_sdk1(aL,aI,aH,aM,aO,aK,aJ);}};E.transformPoints_sdk2=function(a0,bc,a5,aP,aI,aR,aQ,aU){var aW=a5*aI;var aV;var bn,bm;var aT=0;var aS=0;var bl=0;var bk=0;var bf=0;var be=0;var aZ=false;for(var ba=aP;ba=1){var aK=aR[((0)+(aU)*a1)*2];var aJ=aR[((0)+(aU)*a1)*2+1];var aO=aT-2*bl+1*bf;var aN=aS-2*bk+1*be;var a3=aT+3*bf;var a2=aS+3*be;var a8=aT-2*bl+3*bf;var a6=aS-2*bk+3*be;var bj=0.5*(a4-(-2));var bi=0.5*(aX-(1));if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{var aH=(a7|0);if(aH==aU){aH=aU-1;}var bj=0.5*(a4-(-2));var bi=a7-aH;var bb=aH/aU;var a9=(aH+1)/aU;var aK=aR[((0)+(aH)*a1)*2];var aJ=aR[((0)+(aH)*a1)*2+1];var a3=aR[((0)+(aH+1)*a1)*2];var a2=aR[((0)+(aH+1)*a1)*2+1];var aO=aT-2*bl+bb*bf;var aN=aS-2*bk+bb*be;var a8=aT-2*bl+a9*bf;var a6=aS-2*bk+a9*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}}}else{if(1<=a4){if(aX<=0){var a8=aR[((aQ)+(0)*a1)*2];var a6=aR[((aQ)+(0)*a1)*2+1];var a3=aT+3*bl;var a2=aS+3*bk;var aO=aT+1*bl-2*bf;var aN=aS+1*bk-2*be;var aK=aT+3*bl-2*bf;var aJ=aS+3*bk-2*be;var bj=0.5*(a4-(1));var bi=0.5*(aX-(-2));if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{if(aX>=1){var aO=aR[((aQ)+(aU)*a1)*2];var aN=aR[((aQ)+(aU)*a1)*2+1];var aK=aT+3*bl+1*bf;var aJ=aS+3*bk+1*be;var a8=aT+1*bl+3*bf;var a6=aS+1*bk+3*be;var a3=aT+3*bl+3*bf;var a2=aS+3*bk+3*be;var bj=0.5*(a4-(1));var bi=0.5*(aX-(1));if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{var aH=(a7|0);if(aH==aU){aH=aU-1;}var bj=0.5*(a4-(1));var bi=a7-aH;var bb=aH/aU;var a9=(aH+1)/aU;var aO=aR[((aQ)+(aH)*a1)*2];var aN=aR[((aQ)+(aH)*a1)*2+1];var a8=aR[((aQ)+(aH+1)*a1)*2];var a6=aR[((aQ)+(aH+1)*a1)*2+1];var aK=aT+3*bl+bb*bf;var aJ=aS+3*bk+bb*be;var a3=aT+3*bl+a9*bf;var a2=aS+3*bk+a9*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}}}else{if(aX<=0){var aY=(bd|0);if(aY==aQ){aY=aQ-1;}var bj=bd-aY;var bi=0.5*(aX-(-2));var bp=aY/aQ;var bo=(aY+1)/aQ;var a8=aR[((aY)+(0)*a1)*2];var a6=aR[((aY)+(0)*a1)*2+1];var a3=aR[((aY+1)+(0)*a1)*2];var a2=aR[((aY+1)+(0)*a1)*2+1];var aO=aT+bp*bl-2*bf;var aN=aS+bp*bk-2*be;var aK=aT+bo*bl-2*bf;var aJ=aS+bo*bk-2*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{if(aX>=1){var aY=(bd|0);if(aY==aQ){aY=aQ-1;}var bj=bd-aY;var bi=0.5*(aX-(1));var bp=aY/aQ;var bo=(aY+1)/aQ;var aO=aR[((aY)+(aU)*a1)*2];var aN=aR[((aY)+(aU)*a1)*2+1];var aK=aR[((aY+1)+(aU)*a1)*2];var aJ=aR[((aY+1)+(aU)*a1)*2+1];var a8=aT+bp*bl+3*bf;var a6=aS+bp*bk+3*be;var a3=aT+bo*bl+3*bf;var a2=aS+bo*bk+3*be;if(bj+bi<=1){bc[ba]=aO+(aK-aO)*bj+(a8-aO)*bi;bc[ba+1]=aN+(aJ-aN)*bj+(a6-aN)*bi;}else{bc[ba]=a3+(a8-a3)*(1-bj)+(aK-a3)*(1-bi);bc[ba+1]=a2+(a6-a2)*(1-bj)+(aJ-a2)*(1-bi);}}else{System.err.printf("_$li calc : %.4f , %.4f @@BDBoxGrid\n",a4,aX);}}}}}else{bc[ba]=aT+a4*bl+aX*bf;bc[ba+1]=aS+a4*bk+aX*be;}}else{bn=bd-(bd|0);bm=a7-(a7|0);aV=2*((bd|0)+((a7|0))*(aQ+1));if(bn+bm<1){bc[ba]=aR[aV]*(1-bn-bm)+aR[aV+2]*bn+aR[aV+2*(aQ+1)]*bm;bc[ba+1]=aR[aV+1]*(1-bn-bm)+aR[aV+3]*bn+aR[aV+2*(aQ+1)+1]*bm;}else{bc[ba]=aR[aV+2*(aQ+1)+2]*(bn-1+bm)+aR[aV+2*(aQ+1)]*(1-bn)+aR[aV+2]*(1-bm);bc[ba+1]=aR[aV+2*(aQ+1)+3]*(bn-1+bm)+aR[aV+2*(aQ+1)+1]*(1-bn)+aR[aV+3]*(1-bm);}}}};E.prototype.transformPoints_sdk1=function(aJ,aR,aL,a0,aU,aP,aZ){var aH=aR;var aO,aN;var aM=this._$o;var aQ=this._$A;var aI=aU*aZ;var aS,aY;var aV;var aX,aW;var aT=(aH._$hr!=null)?aH._$hr:aH._$Cr;for(var aK=aP;aK1){aO=1;}}if(aN<0){aN=0;}else{if(aN>1){aN=1;}}aO*=aM;aN*=aQ;aS=(aO|0);aY=(aN|0);if(aS>aM-1){aS=aM-1;}if(aY>aQ-1){aY=aQ-1;}aX=aO-aS;aW=aN-aY;aV=2*(aS+aY*(aM+1));}else{aO=aL[aK]*aM;aN=aL[aK+1]*aQ;aX=aO-(aO|0);aW=aN-(aN|0);aV=2*((aO|0)+(aN|0)*(aM+1));}if(aX+aW<1){a0[aK]=aT[aV]*(1-aX-aW)+aT[aV+2]*aX+aT[aV+2*(aM+1)]*aW;a0[aK+1]=aT[aV+1]*(1-aX-aW)+aT[aV+3]*aX+aT[aV+2*(aM+1)+1]*aW;}else{a0[aK]=aT[aV+2*(aM+1)+2]*(aX-1+aW)+aT[aV+2*(aM+1)]*(1-aX)+aT[aV+2]*(1-aW);a0[aK+1]=aT[aV+2*(aM+1)+3]*(aX-1+aW)+aT[aV+2*(aM+1)+1]*(1-aX)+aT[aV+3]*(1-aW);}}};E.prototype._$VT=function(){return(this._$o+1)*(this._$A+1);};E.prototype.getType=function(){return c._$_b;};function H(aH){B.prototype.constructor.call(this,aH);this._$8r=c._$ur;this._$Cr=null;this._$hr=null;}H.prototype=new B();function s(){if(j){return;}this.visible=true;this._$g0=false;this._$NL=null;this._$3S=null;this._$aS=null;s._$42++;}s._$42=0;s.prototype._$zP=function(){this._$3S=new Array();this._$aS=new Array();};s.prototype._$F0=function(aH){this._$g0=aH._$8L();this.visible=aH._$8L();this._$NL=aH._$nP();this._$3S=aH._$nP();this._$aS=aH._$nP();};s.prototype.init=function(aI){var aH=new aj(this);aH.setPartsOpacity(this.isVisible()?1:0);return aH;};s.prototype._$6o=function(aH){if(this._$3S==null){throw new Error("_$3S _$6 _$Wo@_$6o");}this._$3S.push(aH);};s.prototype._$3o=function(aH){if(this._$aS==null){throw new Error("_$aS _$6 _$Wo@_$3o");}this._$aS.push(aH);};s.prototype._$Zo=function(aH){this._$3S=aH;};s.prototype._$xo=function(aH){this._$aS=aH;};s.prototype.isVisible=function(){return this.visible;};s.prototype._$uL=function(){return this._$g0;};s.prototype._$KP=function(aH){this.visible=aH;};s.prototype._$ET=function(aH){this._$g0=aH;};s.prototype.getBaseData=function(){return this._$3S;};s.prototype.getDrawData=function(){return this._$aS;};s.prototype._$p2=function(){return this._$NL;};s.prototype._$ob=function(aH){this._$NL=aH;};s.prototype.getPartsID=function(){return this._$NL;};s.prototype._$MP=function(aH){this._$NL=aH;};function aj(aH){this._$VS=null;this._$e0=null;this._$e0=aH;}aj.prototype=new S();aj.prototype.getPartsOpacity=function(){return this._$VS;};aj.prototype.setPartsOpacity=function(aH){this._$VS=aH;};function ak(aH){if(j){return;}this.id=aH;}ak._$L7=function(){z._$27();n._$27();Z._$27();i._$27();};ak.prototype.toString=function(){return this.id;};function D(){}D.prototype._$F0=function(aH){};function an(){if(j){return;}this._$4S=null;}an.prototype._$1s=function(){return this._$4S;};an.prototype._$zP=function(){this._$4S=new Array();};an.prototype._$F0=function(aH){this._$4S=aH._$nP();};an.prototype._$Ks=function(aH){this._$4S.push(aH);};function au(aH,aI){this.canvas=aH;this.context=aI;this.viewport=new Array(0,0,aH.width,aH.height);this._$6r=1;this._$xP=0;this._$3r=1;this._$uP=0;this._$Qo=-1;this.cacheImages={};}au.tr=new am();au._$50=new am();au._$Ti=new Array(0,0);au._$Pi=new Array(0,0);au._$B=new Array(0,0);au.prototype._$lP=function(aI,aK,aJ,aH){this.viewport=new Array(aI,aK,aJ,aH);};au.prototype._$bL=function(){this.context.save();var aH=this.viewport;if(aH!=null){this.context.beginPath();this.context._$Li(aH[0],aH[1],aH[2],aH[3]);this.context.clip();}};au.prototype._$ei=function(){this.context.restore();};au.prototype.drawElements=function(bc,bm,aX,aJ,bA,aM,bl,bz){try{if(bA!=this._$Qo){this._$Qo=bA;this.context.globalAlpha=bA;}var a2=bm.length;var aP=bc.width;var a5=bc.height;var bE=this.context;var a7=this._$xP;var a6=this._$uP;var a1=this._$6r;var aZ=this._$3r;var bD=au.tr;var aI=au._$Ti;var aH=au._$Pi;var bu=au._$B;for(var by=0;by0.02){au.expandClip(aK,aJ,aV,aI,aO,aN,aH,aW,aS,aR);}else{au.clipWithTransform(aK,null,aM,aL,aU,aT,aQ,aP);}};au.expandClip=function(aV,bg,aK,a3,aJ,aI,be,ba,aZ,aX){var aP=be-aJ;var aO=ba-aI;var bi=aZ-aJ;var bh=aX-aI;var bj=aP*bh-aO*bi>0?aK:-aK;var aL=-aO;var aH=aP;var bc=aZ-be;var a8=aX-ba;var a7=-a8;var a6=bc;var aQ=Math.sqrt(bc*bc+a8*a8);var bf=-bh;var bb=bi;var a2=Math.sqrt(bi*bi+bh*bh);var bd=aJ-bj*aL/a3;var a9=aI-bj*aH/a3;var aY=be-bj*aL/a3;var aW=ba-bj*aH/a3;var a5=be-bj*a7/aQ;var a4=ba-bj*a6/aQ;var aS=aZ-bj*a7/aQ;var aR=aX-bj*a6/aQ;var aN=aJ+bj*bf/a2;var aM=aI+bj*bb/a2;var a1=aZ+bj*bf/a2;var a0=aX+bj*bb/a2;var aU=au._$50;var aT=bg._$P2(aU);if(aT==null){return false;}au.clipWithTransform(aV,aU,bd,a9,aY,aW,a5,a4,aS,aR,a1,a0,aN,aM);return true;};au.clipWithTransform=function(aH,aI,aS,aN,aQ,aK,aP,aJ){if(arguments.length<(1+3*2)){q._$li("err : @LDGL.clip()");return;}if(!(arguments[1] instanceof am)){q._$li("err : a[0] is _$6 LDTransform @LDGL.clip()");return;}var aM=au._$B;var aO=aI;var aR=arguments;aH.beginPath();if(aO){aO._$PS(aR[2],aR[3],aM);aH.moveTo(aM[0],aM[1]);for(var aL=4;aL1){return 1;}}return(0.5-0.5*Math.cos(aH*aC.PI_F));};function J(aH){if(j){return;}this._$ib=aH;}J._$fr=-1;J.prototype.toString=function(){return this._$ib;};function b(){if(j){return;}a.prototype.constructor.call(this);this._$LP=-1;this._$d0=0;this._$Yo=0;this._$JP=null;this._$5P=null;this._$BP=null;this._$Eo=null;this._$Qi=null;this._$6s=b._$ms;this.culling=true;this.gl_cacheImage=null;this.instanceNo=b._$42++;}b.prototype=new a();b._$42=0;b._$Os=30;b._$ms=0;b._$ns=1;b._$_s=2;b._$gT=new Array();b.prototype._$_S=function(aH){this._$LP=aH;};b.prototype.getTextureNo=function(){return this._$LP;};b.prototype._$ZL=function(){return this._$Qi;};b.prototype._$H2=function(){return this._$JP;};b.prototype.getNumPoints=function(){return this._$d0;};b.prototype.getType=function(){return a._$wb;};b.prototype._$B2=function(aL,aH,aO){var aM=aH;var aN=(aM._$hr!=null)?aM._$hr:aM._$Cr;var aK=aw._$do;switch(aK){default:case aw._$Ms:throw new Error("_$L _$ro ");case aw._$Qs:for(var aJ=this._$d0-1;aJ>=0;--aJ){var aI=aJ*aw._$No;aN[aI+4]=aO;}break;}};b.prototype._$zP=function(){this._$GS=new g();this._$GS._$zP();};b.prototype._$F0=function(aK){a.prototype._$F0.call(this,aK);this._$LP=aK._$6L();this._$d0=aK._$6L();this._$Yo=aK._$6L();var aH=aK._$nP();this._$BP=new Int16Array(this._$Yo*3);for(var aJ=this._$Yo*3-1;aJ>=0;--aJ){this._$BP[aJ]=aH[aJ];}this._$Eo=aK._$nP();this._$Qi=aK._$nP();if(aK.getFormatVersion()>=ay._$s7){this._$JP=aK._$6L();if(this._$JP!=0){if((this._$JP&1)!=0){var aI=aK._$6L();if(this._$5P==null){this._$5P=new Object();}this._$5P._$Hb=parseInt(aI);}if((this._$JP&b._$Os)!=0){this._$6s=(this._$JP&b._$Os)>>1;}else{this._$6s=b._$ms;}if((this._$JP&32)!=0){this.culling=false;}}}else{this._$JP=0;}};b.prototype.init=function(aL){var aN=new ag(this);var aI=this._$d0*aw._$No;var aH=this._$32();if(aN._$Cr!=null){aN._$Cr=null;}aN._$Cr=new Float32Array(aI);if(aN._$hr!=null){aN._$hr=null;}aN._$hr=aH?new Float32Array(aI):null;var aM=aw._$do;switch(aM){default:case aw._$Ms:if(aw._$Ls){for(var aJ=this._$d0-1;aJ>=0;--aJ){var aO=aJ<<1;this._$Qi[aO+1]=1-this._$Qi[aO+1];}}break;case aw._$Qs:for(var aJ=this._$d0-1;aJ>=0;--aJ){var aO=aJ<<1;var aK=aJ*aw._$No;var aQ=this._$Qi[aO];var aP=this._$Qi[aO+1];aN._$Cr[aK]=aQ;aN._$Cr[aK+1]=aP;aN._$Cr[aK+4]=0;if(aH){aN._$hr[aK]=aQ;aN._$hr[aK+1]=aP;aN._$hr[aK+4]=0;}}break;}return aN;};b.prototype._$Nr=function(aJ,aH){var aK=aH;if(!((this==aK._$GT()))){console.log("### assert!! ### ");}if(!this._$GS._$Ur(aJ)){return;}a.prototype._$Nr.call(this,aJ,aK);if(aK._$IS[0]){return;}var aI=b._$gT;aI[0]=false;aG._$Vr(aJ,this._$GS,aI,this._$d0,this._$Eo,aK._$Cr,aw._$i2,aw._$No);};b.prototype._$2b=function(aK,aI){try{if(!((this==aI._$GT()))){console.log("### assert!! ### ");}var aL=false;if(aI._$IS[0]){aL=true;}var aM=aI;if(!aL){a.prototype._$2b.call(this,aK);if(this._$32()){var aH=this.getTargetBaseDataID();if(aM._$8r==a._$ur){aM._$8r=aK.getBaseDataIndex(aH);}if(aM._$8r<0){if(Q._$so){q._$li("_$L _$0P _$G :: %s",aH);}}else{var aO=aK.getBaseData(aM._$8r);var aJ=aK._$q2(aM._$8r);if(aO!=null&&!aJ._$x2()){aO._$nb(aK,aJ,aM._$Cr,aM._$hr,this._$d0,aw._$i2,aw._$No);aM._$AT=true;}else{aM._$AT=false;}aM.baseOpacity=aJ.getTotalOpacity();}}}}catch(aN){throw aN;}};b.prototype.draw=function(aN,aK,aI){if(!((this==aI._$GT()))){console.log("### assert!! ### ");}if(aI._$IS[0]){return;}var aL=aI;var aJ=this._$LP;if(aJ<0){aJ=1;}var aH=this.getOpacity(aK,aL)*aI._$VS*aI.baseOpacity;var aM=(aL._$hr!=null)?aL._$hr:aL._$Cr;aN.setClipBufPre_clipContextForDraw(aI.clipBufPre_clipContext);aN._$WP(this.culling);aN._$Uo(aJ,3*this._$Yo,this._$BP,aM,this._$Qi,aH,this._$6s,aL);};b.prototype.dump=function(){console.log(" _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n",this._$LP,this._$d0,this._$Yo);console.log(" _$Oi _$di = { ");for(var aJ=0;aJstartMotion() / start _$K _$3 (m%d)\n",aH,aL._$sr);}}if(aJ==null){return -1;}aL=new M();aL._$w0=aJ;this.motions.push(aL);var aN=aL._$sr;if(this._$eb){q._$Ji("MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n",aH,aN);}return aN;};V.prototype.updateParam=function(aJ){try{var aI=false;for(var aK=0;aKupdateParam() / _$T0 _$w0 (m%d)\n",this.motions.length-1,aL._$sr);}this.motions.splice(aK,1);aK--;}else{}}return aI;}catch(aM){q._$li(aM);return true;}};V.prototype.isFinished=function(aK){if(arguments.length>=1){for(var aI=0;aI0.9?Q.EXPAND_W:0;var a0=this.gl;if(this.gl==null){throw new Error("gl is null");}var a1=false;var aQ=1;var aP=1;var a3=1;var aZ=1;var aW=this._$C0*aP*aN;var a2=this._$tT*a3*aN;var a5=this._$WL*aZ*aN;var a7=this._$lT*aN;if(this.clipBufPre_clipContextMask!=null){a0.frontFace(a0.CCW);a0.useProgram(this.shaderProgram);this._$vS=T(a0,this._$vS,aU);this._$no=L(a0,this._$no,aL);a0.enableVertexAttribArray(this.a_position_Loc);a0.vertexAttribPointer(this.a_position_Loc,2,a0.FLOAT,false,0,0);this._$NT=T(a0,this._$NT,aV);a0.activeTexture(a0.TEXTURE1);a0.bindTexture(a0.TEXTURE_2D,this.textures[aS]);a0.uniform1i(this.s_texture0_Loc,1);a0.enableVertexAttribArray(this.a_texCoord_Loc);a0.vertexAttribPointer(this.a_texCoord_Loc,2,a0.FLOAT,false,0,0);a0.uniformMatrix4fv(this.u_matrix_Loc,false,this.getClipBufPre_clipContextMask().matrixForMask);var aY=this.getClipBufPre_clipContextMask().layoutChannelNo;var a4=this.getChannelFlagAsColor(aY);a0.uniform4f(this.u_channelFlag,a4.r,a4.g,a4.b,a4.a);var aI=this.getClipBufPre_clipContextMask().layoutBounds;a0.uniform4f(this.u_baseColor_Loc,aI.x*2-1,aI.y*2-1,aI._$EL()*2-1,aI._$5T()*2-1);a0.uniform1i(this.u_maskFlag_Loc,true);}else{a1=this.getClipBufPre_clipContextDraw()!=null;if(a1){a0.useProgram(this.shaderProgramOff);this._$vS=T(a0,this._$vS,aU);this._$no=L(a0,this._$no,aL);a0.enableVertexAttribArray(this.a_position_Loc_Off);a0.vertexAttribPointer(this.a_position_Loc_Off,2,a0.FLOAT,false,0,0);this._$NT=T(a0,this._$NT,aV);a0.activeTexture(a0.TEXTURE1);a0.bindTexture(a0.TEXTURE_2D,this.textures[aS]);a0.uniform1i(this.s_texture0_Loc_Off,1);a0.enableVertexAttribArray(this.a_texCoord_Loc_Off);a0.vertexAttribPointer(this.a_texCoord_Loc_Off,2,a0.FLOAT,false,0,0);a0.uniformMatrix4fv(this.u_clipMatrix_Loc_Off,false,this.getClipBufPre_clipContextDraw().matrixForDraw);a0.uniformMatrix4fv(this.u_matrix_Loc_Off,false,this.matrix4x4);a0.activeTexture(a0.TEXTURE2);a0.bindTexture(a0.TEXTURE_2D,Q.fTexture[this.glno]);a0.uniform1i(this.s_texture1_Loc_Off,2);var aY=this.getClipBufPre_clipContextDraw().layoutChannelNo;var a4=this.getChannelFlagAsColor(aY);a0.uniform4f(this.u_channelFlag_Loc_Off,a4.r,a4.g,a4.b,a4.a);a0.uniform4f(this.u_baseColor_Loc_Off,aW,a2,a5,a7);}else{a0.useProgram(this.shaderProgram);this._$vS=T(a0,this._$vS,aU);this._$no=L(a0,this._$no,aL);a0.enableVertexAttribArray(this.a_position_Loc);a0.vertexAttribPointer(this.a_position_Loc,2,a0.FLOAT,false,0,0);this._$NT=T(a0,this._$NT,aV);a0.activeTexture(a0.TEXTURE1);a0.bindTexture(a0.TEXTURE_2D,this.textures[aS]);a0.uniform1i(this.s_texture0_Loc,1);a0.enableVertexAttribArray(this.a_texCoord_Loc);a0.vertexAttribPointer(this.a_texCoord_Loc,2,a0.FLOAT,false,0,0);a0.uniformMatrix4fv(this.u_matrix_Loc,false,this.matrix4x4);a0.uniform4f(this.u_baseColor_Loc,aW,a2,a5,a7);a0.uniform1i(this.u_maskFlag_Loc,false);}}if(this.culling){this.gl.enable(a0.CULL_FACE);}else{this.gl.disable(a0.CULL_FACE);}this.gl.enable(a0.BLEND);var a6;var aX;var aR;var aK;if(this.clipBufPre_clipContextMask!=null){a6=a0.ONE;aX=a0.ONE_MINUS_SRC_ALPHA;aR=a0.ONE;aK=a0.ONE_MINUS_SRC_ALPHA;}else{switch(aM){case b._$ms:a6=a0.ONE;aX=a0.ONE_MINUS_SRC_ALPHA;aR=a0.ONE;aK=a0.ONE_MINUS_SRC_ALPHA;break;case b._$ns:a6=a0.ONE;aX=a0.ONE;aR=a0.ZERO;aK=a0.ONE;break;case b._$_s:a6=a0.DST_COLOR;aX=a0.ONE_MINUS_SRC_ALPHA;aR=a0.ZERO;aK=a0.ONE;break;}}a0.blendEquationSeparate(a0.FUNC_ADD,a0.FUNC_ADD);a0.blendFuncSeparate(a6,aX,aR,aK);if(this.anisotropyExt){a0.texParameteri(a0.TEXTURE_2D,this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT,this.maxAnisotropy);}var aJ=aL.length;a0.drawElements(a0.TRIANGLES,aJ,a0.UNSIGNED_SHORT,0);a0.bindTexture(a0.TEXTURE_2D,null);};function T(aJ,aH,aI){if(aH==null){aH=aJ.createBuffer();}aJ.bindBuffer(aJ.ARRAY_BUFFER,aH);aJ.bufferData(aJ.ARRAY_BUFFER,aI,aJ.DYNAMIC_DRAW);return aH;}function L(aJ,aH,aI){if(aH==null){aH=aJ.createBuffer();}aJ.bindBuffer(aJ.ELEMENT_ARRAY_BUFFER,aH);aJ.bufferData(aJ.ELEMENT_ARRAY_BUFFER,aI,aJ.DYNAMIC_DRAW);return aH;}C.prototype._$Rs=function(){throw new Error("_$Rs");};C.prototype._$Ds=function(aH){throw new Error("_$Ds");};C.prototype._$K2=function(){for(var aH=0;aH=48){var aL=ay._$9o(aN);if(aL!=null){aL._$F0(this);return aL;}else{return null;}}switch(aN){case 1:return this._$bT();case 10:var aM=this._$6L();return new I(aM,true);case 11:return new av(this._$mP(),this._$mP(),this._$mP(),this._$mP());case 12:return new av(this._$_T(),this._$_T(),this._$_T(),this._$_T());case 13:return new e(this._$mP(),this._$mP());case 14:return new e(this._$_T(),this._$_T());case 15:var aH=this._$3L();var aI=new Array(aH);for(var aJ=0;aJ>(7-this._$hL++))&1)==1;};K.prototype._$zT=function(){if(this._$hL!=0){this._$hL=0;}};function ai(){}ai.prototype._$wP=function(aM,aI,aK){for(var aL=0;aLMath.PI){aJ-=2*Math.PI;}return aJ;};aC._$9=function(aH){return Math.sin(aH);};aC.fcos=function(aH){return Math.cos(aH);};function aB(aH){if(j){return;}this._$e0=null;this._$IP=null;this._$Us=null;this._$7s=null;this._$IS=[false];this._$VS=null;this._$AT=true;this.baseOpacity=1;this.clipBufPre_clipContext=null;this._$e0=aH;}aB.prototype._$u2=function(){return this._$IS[0];};aB.prototype._$yo=function(){return this._$AT&&!this._$IS[0];};aB.prototype._$GT=function(){return this._$e0;};function r(){}r._$W2=0;r.SYSTEM_INFO=null;r.USER_AGENT=navigator.userAgent;r.isIPhone=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO._isIPhone;};r.isIOS=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO._isIPhone||r.SYSTEM_INFO._isIPad;};r.isAndroid=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO._isAndroid;};r.getOSVersion=function(){if(!r.SYSTEM_INFO){r.setup();}return r.SYSTEM_INFO.version;};r.getOS=function(){if(!r.SYSTEM_INFO){r.setup();}if(r.SYSTEM_INFO._isIPhone||r.SYSTEM_INFO._isIPad){return"iOS";}if(r.SYSTEM_INFO._isAndroid){return"Android";}else{return"_$Q0 OS";}};r.setup=function(){var aK=r.USER_AGENT;function aI(aO,aR){var aN=aO.substring(aR).split(/[ _,;\.]/);var aQ=0;for(var aM=0;aM<=2;aM++){if(isNaN(aN[aM])){break;}var aP=parseInt(aN[aM]);if(aP<0||aP>999){q._$li("err : "+aP+" @UtHtml5.setup()");aQ=0;break;}aQ+=aP*Math.pow(1000,(2-aM));}return aQ;}var aL;var aH;var aJ=r.SYSTEM_INFO={userAgent:aK};if((aL=aK.indexOf("iPhone OS "))>=0){aJ.os="iPhone";aJ._isIPhone=true;aJ.version=aI(aK,aL+"iPhone OS ".length);}else{if((aL=aK.indexOf("iPad"))>=0){aL=aK.indexOf("CPU OS");if(aL<0){q._$li(" err : "+aK+" @UtHtml5.setup()");return;}aJ.os="iPad";aJ._isIPad=true;aJ.version=aI(aK,aL+"CPU OS ".length);}else{if((aL=aK.indexOf("Android"))>=0){aJ.os="Android";aJ._isAndroid=true;aJ.version=aI(aK,aL+"Android ".length);}else{aJ.os="-";aJ.version=-1;}}}};window.UtSystem=P;window.UtDebug=q;window.LDTransform=am;window.LDGL=au;window.Live2D=Q;window.Live2DModelWebGL=l;window.Live2DModelJS=v;window.Live2DMotion=ao;window.MotionQueueManager=V;window.PhysicsHair=u;window.AMotion=ah;window.PartsDataID=i;window.DrawDataID=Z;window.BaseDataID=n;window.ParamID=z;Q.init();var j=false;})(); \ No newline at end of file +!function(t){function i(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,i),o.l=!0,o.exports}var e={};i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=4)}([function(t,i,e){"use strict";function r(){this.live2DModel=null,this.modelMatrix=null,this.eyeBlink=null,this.physics=null,this.pose=null,this.debugMode=!1,this.initialized=!1,this.updating=!1,this.alpha=1,this.accAlpha=0,this.lipSync=!1,this.lipSyncValue=0,this.accelX=0,this.accelY=0,this.accelZ=0,this.dragX=0,this.dragY=0,this.startTimeMSec=null,this.mainMotionManager=new h,this.expressionManager=new h,this.motions={},this.expressions={},this.isTexLoaded=!1}function o(){AMotion.prototype.constructor.call(this),this.paramList=new Array}function n(){this.id="",this.type=-1,this.value=null}function s(){this.nextBlinkTime=null,this.stateStartTime=null,this.blinkIntervalMsec=null,this.eyeState=g.STATE_FIRST,this.blinkIntervalMsec=4e3,this.closingMotionMsec=100,this.closedMotionMsec=50,this.openingMotionMsec=150,this.closeIfZero=!0,this.eyeID_L="PARAM_EYE_L_OPEN",this.eyeID_R="PARAM_EYE_R_OPEN"}function _(){this.tr=new Float32Array(16),this.identity()}function a(t,i){_.prototype.constructor.call(this),this.width=t,this.height=i}function h(){MotionQueueManager.prototype.constructor.call(this),this.currentPriority=null,this.reservePriority=null,this.super=MotionQueueManager.prototype}function l(){this.physicsList=new Array,this.startTimeMSec=UtSystem.getUserTimeMSec()}function $(){this.lastTime=0,this.lastModel=null,this.partsGroups=new Array}function u(t){this.paramIndex=-1,this.partsIndex=-1,this.link=null,this.id=t}function p(){this.EPSILON=.01,this.faceTargetX=0,this.faceTargetY=0,this.faceX=0,this.faceY=0,this.faceVX=0,this.faceVY=0,this.lastTimeSec=0}function f(){_.prototype.constructor.call(this),this.screenLeft=null,this.screenRight=null,this.screenTop=null,this.screenBottom=null,this.maxLeft=null,this.maxRight=null,this.maxTop=null,this.maxBottom=null,this.max=Number.MAX_VALUE,this.min=0}function c(){}var d=0;r.prototype.getModelMatrix=function(){return this.modelMatrix},r.prototype.setAlpha=function(t){t>.999&&(t=1),t<.001&&(t=0),this.alpha=t},r.prototype.getAlpha=function(){return this.alpha},r.prototype.isInitialized=function(){return this.initialized},r.prototype.setInitialized=function(t){this.initialized=t},r.prototype.isUpdating=function(){return this.updating},r.prototype.setUpdating=function(t){this.updating=t},r.prototype.getLive2DModel=function(){return this.live2DModel},r.prototype.setLipSync=function(t){this.lipSync=t},r.prototype.setLipSyncValue=function(t){this.lipSyncValue=t},r.prototype.setAccel=function(t,i,e){this.accelX=t,this.accelY=i,this.accelZ=e},r.prototype.setDrag=function(t,i){this.dragX=t,this.dragY=i},r.prototype.getMainMotionManager=function(){return this.mainMotionManager},r.prototype.getExpressionManager=function(){return this.expressionManager},r.prototype.loadModelData=function(t,i){var e=c.getPlatformManager();this.debugMode&&e.log("Load model : "+t);var r=this;e.loadLive2DModel(t,function(t){if(r.live2DModel=t,r.live2DModel.saveParam(),0!=Live2D.getError())return void console.error("Error : Failed to loadModelData().");r.modelMatrix=new a(r.live2DModel.getCanvasWidth(),r.live2DModel.getCanvasHeight()),r.modelMatrix.setWidth(2),r.modelMatrix.setCenterPosition(0,0),i(r.live2DModel)})},r.prototype.loadTexture=function(t,i,e){d++;var r=c.getPlatformManager();this.debugMode&&r.log("Load Texture : "+i);var o=this;r.loadTexture(this.live2DModel,t,i,function(){d--,0==d&&(o.isTexLoaded=!0),"function"==typeof e&&e()})},r.prototype.loadMotion=function(t,i,e){var r=c.getPlatformManager();this.debugMode&&r.log("Load Motion : "+i);var o=null,n=this;r.loadBytes(i,function(i){o=Live2DMotion.loadMotion(i),null!=t&&(n.motions[t]=o),e(o)})},r.prototype.loadExpression=function(t,i,e){var r=c.getPlatformManager();this.debugMode&&r.log("Load Expression : "+i);var n=this;r.loadBytes(i,function(i){null!=t&&(n.expressions[t]=o.loadJson(i)),"function"==typeof e&&e()})},r.prototype.loadPose=function(t,i){var e=c.getPlatformManager();this.debugMode&&e.log("Load Pose : "+t);var r=this;try{e.loadBytes(t,function(t){r.pose=$.load(t),"function"==typeof i&&i()})}catch(t){console.warn(t)}},r.prototype.loadPhysics=function(t){var i=c.getPlatformManager();this.debugMode&&i.log("Load Physics : "+t);var e=this;try{i.loadBytes(t,function(t){e.physics=l.load(t)})}catch(t){console.warn(t)}},r.prototype.hitTestSimple=function(t,i,e){if(null===this.live2DModel)return!1;var r=this.live2DModel.getDrawDataIndex(t);if(r<0)return!1;for(var o=this.live2DModel.getTransformedPoints(r),n=this.live2DModel.getCanvasWidth(),s=0,_=this.live2DModel.getCanvasHeight(),a=0,h=0;hs&&(s=l),$<_&&(_=$),$>a&&(a=$)}var u=this.modelMatrix.invertTransformX(i),p=this.modelMatrix.invertTransformY(e);return n<=u&&u<=s&&_<=p&&p<=a},r.prototype.hitTestSimpleCustom=function(t,i,e,r){return null!==this.live2DModel&&(e>=t[0]&&e<=i[0]&&r<=t[1]&&r>=i[1])},o.prototype=new AMotion,o.EXPRESSION_DEFAULT="DEFAULT",o.TYPE_SET=0,o.TYPE_ADD=1,o.TYPE_MULT=2,o.loadJson=function(t){var i=new o,e=c.getPlatformManager(),r=e.jsonParseFromBytes(t);if(i.setFadeIn(parseInt(r.fade_in)>0?parseInt(r.fade_in):1e3),i.setFadeOut(parseInt(r.fade_out)>0?parseInt(r.fade_out):1e3),null==r.params)return i;var s=r.params,_=s.length;i.paramList=[];for(var a=0;a<_;a++){var h=s[a],l=h.id.toString(),$=parseFloat(h.val),u=o.TYPE_ADD,p=null!=h.calc?h.calc.toString():"add";if((u="add"===p?o.TYPE_ADD:"mult"===p?o.TYPE_MULT:"set"===p?o.TYPE_SET:o.TYPE_ADD)==o.TYPE_ADD){var f=null==h.def?0:parseFloat(h.def);$-=f}else if(u==o.TYPE_MULT){var f=null==h.def?1:parseFloat(h.def);0==f&&(f=1),$/=f}var d=new n;d.id=l,d.type=u,d.value=$,i.paramList.push(d)}return i},o.prototype.updateParamExe=function(t,i,e,r){for(var n=this.paramList.length-1;n>=0;--n){var s=this.paramList[n];s.type==o.TYPE_ADD?t.addToParamFloat(s.id,s.value,e):s.type==o.TYPE_MULT?t.multParamFloat(s.id,s.value,e):s.type==o.TYPE_SET&&t.setParamFloat(s.id,s.value,e)}},s.prototype.calcNextBlink=function(){return UtSystem.getUserTimeMSec()+Math.random()*(2*this.blinkIntervalMsec-1)},s.prototype.setInterval=function(t){this.blinkIntervalMsec=t},s.prototype.setEyeMotion=function(t,i,e){this.closingMotionMsec=t,this.closedMotionMsec=i,this.openingMotionMsec=e},s.prototype.updateParam=function(t){var i,e=UtSystem.getUserTimeMSec(),r=0;switch(this.eyeState){case g.STATE_CLOSING:r=(e-this.stateStartTime)/this.closingMotionMsec,r>=1&&(r=1,this.eyeState=g.STATE_CLOSED,this.stateStartTime=e),i=1-r;break;case g.STATE_CLOSED:r=(e-this.stateStartTime)/this.closedMotionMsec,r>=1&&(this.eyeState=g.STATE_OPENING,this.stateStartTime=e),i=0;break;case g.STATE_OPENING:r=(e-this.stateStartTime)/this.openingMotionMsec,r>=1&&(r=1,this.eyeState=g.STATE_INTERVAL,this.nextBlinkTime=this.calcNextBlink()),i=r;break;case g.STATE_INTERVAL:this.nextBlinkTime=t)&&(!(this.currentPriority>=t)&&(this.reservePriority=t,!0))},h.prototype.setReservePriority=function(t){this.reservePriority=t},h.prototype.updateParam=function(t){var i=MotionQueueManager.prototype.updateParam.call(this,t);return this.isFinished()&&(this.currentPriority=0),i},h.prototype.startMotionPrio=function(t,i){return i==this.reservePriority&&(this.reservePriority=0),this.currentPriority=i,this.startMotion(t,!1)},l.load=function(t){for(var i=new l,e=c.getPlatformManager(),r=e.jsonParseFromBytes(t),o=r.physics_hair,n=o.length,s=0;s=0)break;r=n,o=t.getPartsOpacity(s),o+=e/.5,o>1&&(o=1)}}r<0&&(r=0,o=1);for(var n=0;n.15&&(a=1-.15/(1-o)),h>a&&(h=a),t.setPartsOpacity(s,h)}}},$.prototype.copyOpacityOtherParts=function(t,i){for(var e=0;eo)&&(l*=o/u,$*=o/u,u=o),this.faceVX+=l,this.faceVY+=$;var f=.5*(Math.sqrt(o*o+16*o*_-8*o*_)-o),c=Math.sqrt(this.faceVX*this.faceVX+this.faceVY*this.faceVY);c>f&&(this.faceVX*=f/c,this.faceVY*=f/c),this.faceX+=this.faceVX,this.faceY+=this.faceVY}},f.prototype=new _,f.prototype.getMaxScale=function(){return this.max},f.prototype.getMinScale=function(){return this.min},f.prototype.setMaxScale=function(t){this.max=t},f.prototype.setMinScale=function(t){this.min=t},f.prototype.isMaxScale=function(){return this.getScaleX()==this.max},f.prototype.isMinScale=function(){return this.getScaleX()==this.min},f.prototype.adjustTranslate=function(t,i){this.tr[0]*this.maxLeft+(this.tr[12]+t)>this.screenLeft&&(t=this.screenLeft-this.tr[0]*this.maxLeft-this.tr[12]),this.tr[0]*this.maxRight+(this.tr[12]+t)this.screenBottom&&(i=this.screenBottom-this.tr[5]*this.maxBottom-this.tr[13]);var e=[1,0,0,0,0,1,0,0,0,0,1,0,t,i,0,1];_.mul(e,this.tr,this.tr)},f.prototype.adjustScale=function(t,i,e){var r=e*this.tr[0];r0&&(e=this.min/this.tr[0]):r>this.max&&this.tr[0]>0&&(e=this.max/this.tr[0]);var o=[1,0,0,0,0,1,0,0,0,0,1,0,t,i,0,1],n=[e,0,0,0,0,e,0,0,0,0,1,0,0,0,0,1],s=[1,0,0,0,0,1,0,0,0,0,1,0,-t,-i,0,1];_.mul(s,this.tr,this.tr),_.mul(n,this.tr,this.tr),_.mul(o,this.tr,this.tr)},f.prototype.setScreenRect=function(t,i,e,r){this.screenLeft=t,this.screenRight=i,this.screenTop=r,this.screenBottom=e},f.prototype.setMaxScreenRect=function(t,i,e,r){this.maxLeft=t,this.maxRight=i,this.maxTop=r,this.maxBottom=e},f.prototype.getScreenLeft=function(){return this.screenLeft},f.prototype.getScreenRight=function(){return this.screenRight},f.prototype.getScreenBottom=function(){return this.screenBottom},f.prototype.getScreenTop=function(){return this.screenTop},f.prototype.getMaxLeft=function(){return this.maxLeft},f.prototype.getMaxRight=function(){return this.maxRight},f.prototype.getMaxBottom=function(){return this.maxBottom},f.prototype.getMaxTop=function(){return this.maxTop},c.platformManager=null,c.getPlatformManager=function(){return c.platformManager},c.setPlatformManager=function(t){c.platformManager=t},t.exports={L2DTargetPoint:p,Live2DFramework:c,L2DViewMatrix:f,L2DPose:$,L2DPartsParam:u,L2DPhysics:l,L2DMotionManager:h,L2DModelMatrix:a,L2DMatrix44:_,EYE_STATE:g,L2DEyeBlink:s,L2DExpressionParam:n,L2DExpressionMotion:o,L2DBaseModel:r}},function(t,i,e){"use strict";var r={DEBUG_LOG:!1,DEBUG_MOUSE_LOG:!1,DEBUG_DRAW_HIT_AREA:!1,DEBUG_DRAW_ALPHA_MODEL:!1,VIEW_MAX_SCALE:2,VIEW_MIN_SCALE:.8,VIEW_LOGICAL_LEFT:-1,VIEW_LOGICAL_RIGHT:1,VIEW_LOGICAL_MAX_LEFT:-2,VIEW_LOGICAL_MAX_RIGHT:2,VIEW_LOGICAL_MAX_BOTTOM:-2,VIEW_LOGICAL_MAX_TOP:2,PRIORITY_NONE:0,PRIORITY_IDLE:1,PRIORITY_SLEEPY:2,PRIORITY_NORMAL:3,PRIORITY_FORCE:4,MOTION_GROUP_IDLE:"idle",MOTION_GROUP_SLEEPY:"sleepy",MOTION_GROUP_TAP_BODY:"tap_body",MOTION_GROUP_FLICK_HEAD:"flick_head",MOTION_GROUP_PINCH_IN:"pinch_in",MOTION_GROUP_PINCH_OUT:"pinch_out",MOTION_GROUP_SHAKE:"shake",HIT_AREA_HEAD:"head",HIT_AREA_BODY:"body"};t.exports=r},function(t,i,e){"use strict";function r(t){n=t}function o(){return n}Object.defineProperty(i,"__esModule",{value:!0}),i.setContext=r,i.getContext=o;var n=void 0},function(t,i,e){"use strict";function r(){}r.matrixStack=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.depth=0,r.currentMatrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.tmp=new Array(16),r.reset=function(){this.depth=0},r.loadIdentity=function(){for(var t=0;t<16;t++)this.currentMatrix[t]=t%5==0?1:0},r.push=function(){var t=(this.depth,16*(this.depth+1));this.matrixStack.lengthe.left&&i.y>e.top)return i;var o=t.x-i.x,n=t.y-i.y,s=r(o,n);i.xat.frameBuffers.length&&(this.curFrameNo=this.getMaskRenderTexture()),this.tmpModelToViewMatrix=new R,this.tmpMatrix2=new R,this.tmpMatrixForMask=new R,this.tmpMatrixForDraw=new R,this.CHANNEL_COLORS=new Array;var i=new A;i=new A,i.r=0,i.g=0,i.b=0,i.a=1,this.CHANNEL_COLORS.push(i),i=new A,i.r=1,i.g=0,i.b=0,i.a=0,this.CHANNEL_COLORS.push(i),i=new A,i.r=0,i.g=1,i.b=0,i.a=0,this.CHANNEL_COLORS.push(i),i=new A,i.r=0,i.g=0,i.b=1,i.a=0,this.CHANNEL_COLORS.push(i);for(var e=0;eG._$T7){t._$NP|=i._$4s;throw new lt("_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : "+G._$T7+" < _$f0 : "+r+" )@_$SS#loadModel()\n")}var h=o._$nP();if(r>=G._$s7){var l=o._$9T(),$=o._$9T();if(-30584!=l||-30584!=$)throw t._$NP|=i._$0s,new lt("_$gi _$C _$li , _$0 _$6 _$Ui.")}t._$KS(h);var u=t.getModelContext();u.setDrawParam(t.getDrawParam()),u.init()}catch(t){_._$Rb(t)}},i.prototype._$KS=function(t){this._$MT=t},i.prototype.getModelImpl=function(){return null==this._$MT&&(this._$MT=new p,this._$MT._$zP()),this._$MT},i.prototype.getCanvasWidth=function(){return null==this._$MT?0:this._$MT.getCanvasWidth()},i.prototype.getCanvasHeight=function(){return null==this._$MT?0:this._$MT.getCanvasHeight()},i.prototype.getParamFloat=function(t){return"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),this._$5S.getParamFloat(t)},i.prototype.setParamFloat=function(t,i,e){"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),arguments.length<3&&(e=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)*(1-e)+i*e)},i.prototype.addToParamFloat=function(t,i,e){"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),arguments.length<3&&(e=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)+i*e)},i.prototype.multParamFloat=function(t,i,e){"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),arguments.length<3&&(e=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)*(1+(i-1)*e))},i.prototype.getParamIndex=function(t){return this._$5S.getParamIndex(u.getID(t))},i.prototype.loadParam=function(){this._$5S.loadParam()},i.prototype.saveParam=function(){this._$5S.saveParam()},i.prototype.init=function(){this._$5S.init()},i.prototype.update=function(){this._$5S.update()},i.prototype._$Rs=function(){return _._$li("_$60 _$PT _$Rs()"),-1},i.prototype._$Ds=function(t){_._$li("_$60 _$PT _$SS#_$Ds() \n")},i.prototype._$K2=function(){},i.prototype.draw=function(){},i.prototype.getModelContext=function(){return this._$5S},i.prototype._$s2=function(){return this._$NP},i.prototype._$P7=function(t,i,e,r){var o=-1,n=0,s=this;if(0!=e)if(1==t.length){var _=t[0],a=0!=s.getParamFloat(_),h=i[0],l=s.getPartsOpacity(h),$=e/r;a?(l+=$)>1&&(l=1):(l-=$)<0&&(l=0),s.setPartsOpacity(h,l)}else{for(var u=0;u=0)break;o=u;var h=i[u];n=s.getPartsOpacity(h),n+=e/r,n>1&&(n=1)}}o<0&&(console.log("No _$wi _$q0/ _$U default[%s]",t[0]),o=0,n=1,s.loadParam(),s.setParamFloat(t[o],n),s.saveParam());for(var u=0;u.15&&(f=1-.15/(1-n)),c>f&&(c=f),s.setPartsOpacity(h,c)}}}else for(var u=0;u=this._$5S._$aS.length)return null;var i=this._$5S._$aS[t];return null!=i&&i.getType()==W._$wb&&i instanceof $t?i.getIndexArray():null},e.CHANNEL_COUNT=4,e.RENDER_TEXTURE_USE_MIPMAP=!1,e.NOT_USED_FRAME=-100,e.prototype._$L7=function(){if(this.tmpModelToViewMatrix&&(this.tmpModelToViewMatrix=null),this.tmpMatrix2&&(this.tmpMatrix2=null),this.tmpMatrixForMask&&(this.tmpMatrixForMask=null),this.tmpMatrixForDraw&&(this.tmpMatrixForDraw=null),this.tmpBoundsOnModel&&(this.tmpBoundsOnModel=null),this.CHANNEL_COLORS){for(var t=this.CHANNEL_COLORS.length-1;t>=0;--t)this.CHANNEL_COLORS.splice(t,1);this.CHANNEL_COLORS=[]}this.releaseShader()},e.prototype.releaseShader=function(){for(var t=at.frameBuffers.length,i=0;i0){var n=i.gl.getParameter(i.gl.FRAMEBUFFER_BINDING),s=new Array(4);s[0]=0,s[1]=0,s[2]=i.gl.canvas.width,s[3]=i.gl.canvas.height,i.gl.viewport(0,0,at.clippingMaskBufferSize,at.clippingMaskBufferSize),this.setupLayoutBounds(e),i.gl.bindFramebuffer(i.gl.FRAMEBUFFER,at.frameBuffers[this.curFrameNo].framebuffer),i.gl.clearColor(0,0,0,0),i.gl.clear(i.gl.COLOR_BUFFER_BIT);for(var r=0;rr?e:r,n=o,s=o,_=0,a=0,h=i.clippedDrawContextList.length,l=0;l_&&(_=S),v>a&&(a=v)}}if(n==o)i.allClippedDrawRect.x=0,i.allClippedDrawRect.y=0,i.allClippedDrawRect.width=0,i.allClippedDrawRect.height=0,i.isUsing=!1;else{var L=_-n,M=a-s;i.allClippedDrawRect.x=n,i.allClippedDrawRect.y=s,i.allClippedDrawRect.width=L,i.allClippedDrawRect.height=M,i.isUsing=!0}},e.prototype.setupLayoutBounds=function(t){var i=t/e.CHANNEL_COUNT,r=t%e.CHANNEL_COUNT;i=~~i,r=~~r;for(var o=0,n=0;n=1)return 1;var p=r,f=p*p;return l*(p*f)+$*f+u*p+0},s.prototype._$a0=function(){},s.prototype.setFadeIn=function(t){this._$dP=t},s.prototype.setFadeOut=function(t){this._$eo=t},s.prototype._$pT=function(t){this._$V0=t},s.prototype.getFadeOut=function(){return this._$eo},s.prototype._$4T=function(){return this._$eo},s.prototype._$mT=function(){return this._$V0},s.prototype.getDurationMSec=function(){return-1},s.prototype.getLoopDurationMSec=function(){return-1},s.prototype.updateParam=function(t,i){if(i._$AT&&!i._$9L){var e=w.getUserTimeMSec();if(i._$z2<0){i._$z2=e,i._$bs=e;var r=this.getDurationMSec();i._$Do<0&&(i._$Do=r<=0?-1:i._$z2+r)}var o=this._$V0;o=o*(0==this._$dP?1:ht._$r2((e-i._$bs)/this._$dP))*(0==this._$eo||i._$Do<0?1:ht._$r2((i._$Do-e)/this._$eo)),0<=o&&o<=1||console.log("### assert!! ### "),this.updateParamExe(t,e,o,i),i._$Do>0&&i._$Do0?console.log("\n"):e%8==0&&e>0&&console.log(" "),console.log("%02X ",255&t[e]);console.log("\n")},_._$nr=function(t,i,e){console.log("%s\n",t);for(var r=i.length,o=0;o=0;--r){this._$lL[r]._$oP(t,this)}this._$oo(t,e),this._$M2=this._$Yb(),this._$9b=(this._$M2-this._$ks)/e,this._$ks=this._$M2}for(var r=this._$qP.length-1;r>=0;--r){this._$qP[r]._$YS(t,this)}this._$iT=i},f.prototype._$oo=function(t,i){i<.033&&(i=.033);var e=1/i;this.p1.vx=(this.p1.x-this.p1._$s0)*e,this.p1.vy=(this.p1.y-this.p1._$70)*e,this.p1.ax=(this.p1.vx-this.p1._$7L)*e,this.p1.ay=(this.p1.vy-this.p1._$HL)*e,this.p1.fx=this.p1.ax*this.p1._$p,this.p1.fy=this.p1.ay*this.p1._$p,this.p1._$xT();var r,o,n=-Math.atan2(this.p1.y-this.p2.y,this.p1.x-this.p2.x),s=Math.cos(n),_=Math.sin(n),a=9.8*this.p2._$p,h=this._$Db*Lt._$bS,l=a*Math.cos(n-h);r=l*_,o=l*s;var $=-this.p1.fx*_*_,u=-this.p1.fy*_*s,p=-this.p2.vx*this._$L2,f=-this.p2.vy*this._$L2;this.p2.fx=r+$+p,this.p2.fy=o+u+f,this.p2.ax=this.p2.fx/this.p2._$p,this.p2.ay=this.p2.fy/this.p2._$p,this.p2.vx+=this.p2.ax*i,this.p2.vy+=this.p2.ay*i,this.p2.x+=this.p2.vx*i,this.p2.y+=this.p2.vy*i;var c=Math.sqrt((this.p1.x-this.p2.x)*(this.p1.x-this.p2.x)+(this.p1.y-this.p2.y)*(this.p1.y-this.p2.y));this.p2.x=this.p1.x+this._$Fo*(this.p2.x-this.p1.x)/c,this.p2.y=this.p1.y+this._$Fo*(this.p2.y-this.p1.y)/c,this.p2.vx=(this.p2.x-this.p2._$s0)*e,this.p2.vy=(this.p2.y-this.p2._$70)*e,this.p2._$xT()},c.prototype._$xT=function(){this._$s0=this.x,this._$70=this.y,this._$7L=this.vx,this._$HL=this.vy},d.prototype._$oP=function(t,i){},g.prototype=new d,g.prototype._$oP=function(t,i){var e=this.scale*t.getParamFloat(this._$wL),r=i.getPhysicsPoint1();switch(this._$tL){default:case f.Src.SRC_TO_X:r.x=r.x+(e-r.x)*this._$V0;break;case f.Src.SRC_TO_Y:r.y=r.y+(e-r.y)*this._$V0;break;case f.Src.SRC_TO_G_ANGLE:var o=i._$qr();o+=(e-o)*this._$V0,i._$pr(o)}},y.prototype._$YS=function(t,i){},T.prototype=new y,T.prototype._$YS=function(t,i){switch(this._$YP){default:case f.Target.TARGET_FROM_ANGLE:t.setParamFloat(this._$wL,this.scale*i._$5r(),this._$V0);break;case f.Target.TARGET_FROM_ANGLE_V:t.setParamFloat(this._$wL,this.scale*i._$Cs(),this._$V0)}},f.Src=function(){},f.Src.SRC_TO_X="SRC_TO_X",f.Src.SRC_TO_Y="SRC_TO_Y",f.Src.SRC_TO_G_ANGLE="SRC_TO_G_ANGLE",f.Target=function(){},f.Target.TARGET_FROM_ANGLE="TARGET_FROM_ANGLE",f.Target.TARGET_FROM_ANGLE_V="TARGET_FROM_ANGLE_V",P.prototype.init=function(t){this._$fL=t._$fL,this._$gL=t._$gL,this._$B0=t._$B0,this._$z0=t._$z0,this._$qT=t._$qT,this.reflectX=t.reflectX,this.reflectY=t.reflectY},P.prototype._$F0=function(t){this._$fL=t._$_T(),this._$gL=t._$_T(),this._$B0=t._$_T(),this._$z0=t._$_T(),this._$qT=t._$_T(),t.getFormatVersion()>=G.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this.reflectX=t._$po(),this.reflectY=t._$po())},P.prototype._$e=function(){};var It=function(){};It._$ni=function(t,i,e,r,o,n,s,_,a){var h=s*n-_*o;if(0==h)return null;var l,$=((t-e)*n-(i-r)*o)/h;return l=0!=o?(t-e-$*s)/o:(i-r-$*_)/n,isNaN(l)&&(l=(t-e-$*s)/o,isNaN(l)&&(l=(i-r-$*_)/n),isNaN(l)&&(console.log("a is NaN @UtVector#_$ni() "),console.log("v1x : "+o),console.log("v1x != 0 ? "+(0!=o)))),null==a?new Array(l,$):(a[0]=l,a[1]=$,a)},S.prototype._$8P=function(){return this.x+.5*this.width},S.prototype._$6P=function(){return this.y+.5*this.height},S.prototype._$EL=function(){return this.x+this.width},S.prototype._$5T=function(){return this.y+this.height},S.prototype._$jL=function(t,i,e,r){this.x=t,this.y=i,this.width=e,this.height=r},S.prototype._$jL=function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},S.prototype.contains=function(t,i){return this.x<=this.x&&this.y<=this.y&&this.x<=this.x+this.width&&this.y<=this.y+this.height},S.prototype.expand=function(t,i){this.x-=t,this.y-=i,this.width+=2*t,this.height+=2*i},v._$Z2=function(t,i,e,r){var o=i._$Q2(t,e),n=t._$vs(),s=t._$Tr();if(i._$zr(n,s,o),o<=0)return r[n[0]];if(1==o){var _=r[n[0]],a=r[n[1]],h=s[0];return _+(a-_)*h|0}if(2==o){var _=r[n[0]],a=r[n[1]],l=r[n[2]],$=r[n[3]],h=s[0],u=s[1],p=_+(a-_)*h|0,f=l+($-l)*h|0;return p+(f-p)*u|0}if(3==o){var c=r[n[0]],d=r[n[1]],g=r[n[2]],y=r[n[3]],m=r[n[4]],T=r[n[5]],P=r[n[6]],S=r[n[7]],h=s[0],u=s[1],v=s[2],_=c+(d-c)*h|0,a=g+(y-g)*h|0,l=m+(T-m)*h|0,$=P+(S-P)*h|0,p=_+(a-_)*u|0,f=l+($-l)*u|0;return p+(f-p)*v|0}if(4==o){var L=r[n[0]],M=r[n[1]],E=r[n[2]],A=r[n[3]],I=r[n[4]],w=r[n[5]],x=r[n[6]],O=r[n[7]],D=r[n[8]],R=r[n[9]],b=r[n[10]],F=r[n[11]],C=r[n[12]],N=r[n[13]],B=r[n[14]],U=r[n[15]],h=s[0],u=s[1],v=s[2],G=s[3],c=L+(M-L)*h|0,d=E+(A-E)*h|0,g=I+(w-I)*h|0,y=x+(O-x)*h|0,m=D+(R-D)*h|0,T=b+(F-b)*h|0,P=C+(N-C)*h|0,S=B+(U-B)*h|0,_=c+(d-c)*u|0,a=g+(y-g)*u|0,l=m+(T-m)*u|0,$=P+(S-P)*u|0,p=_+(a-_)*v|0,f=l+($-l)*v|0;return p+(f-p)*G|0}for(var Y=1<=G._$T7?(this.clipID=t._$nP(),this.clipIDList=this.convertClipIDForV2_11(this.clipID)):this.clipIDList=[],this._$MS(this._$Lb)},M.prototype.getClipIDList=function(){return this.clipIDList},M.prototype.init=function(t){},M.prototype._$Nr=function(t,i){if(i._$IS[0]=!1,i._$Us=v._$Z2(t,this._$GS,i._$IS,this._$Lb),at._$Zs);else if(i._$IS[0])return;i._$7s=v._$br(t,this._$GS,i._$IS,this._$mS)},M.prototype._$2b=function(t,i){},M.prototype.getDrawDataID=function(){return this._$gP},M.prototype._$j2=function(t){this._$gP=t},M.prototype.getOpacity=function(t,i){return i._$7s},M.prototype._$zS=function(t,i){return i._$Us},M.prototype._$MS=function(t){for(var i=t.length-1;i>=0;--i){var e=t[i];eM._$R2&&(M._$R2=e)}},M.prototype.getTargetBaseDataID=function(){return this._$dr},M.prototype._$gs=function(t){this._$dr=t},M.prototype._$32=function(){return null!=this._$dr&&this._$dr!=yt._$2o()},M.prototype.preDraw=function(t,i,e){},M.prototype.draw=function(t,i,e){},M.prototype.getType=function(){},M.prototype._$B2=function(t,i,e){},E._$ps=32,E.CLIPPING_PROCESS_NONE=0,E.CLIPPING_PROCESS_OVERWRITE_ALPHA=1,E.CLIPPING_PROCESS_MULTIPLY_ALPHA=2,E.CLIPPING_PROCESS_DRAW=3,E.CLIPPING_PROCESS_CLEAR_ALPHA=4,E.prototype.setChannelFlagAsColor=function(t,i){this.CHANNEL_COLORS[t]=i},E.prototype.getChannelFlagAsColor=function(t){return this.CHANNEL_COLORS[t]},E.prototype._$ZT=function(){},E.prototype._$Uo=function(t,i,e,r,o,n,s){},E.prototype._$Rs=function(){return-1},E.prototype._$Ds=function(t){},E.prototype.setBaseColor=function(t,i,e,r){t<0?t=0:t>1&&(t=1),i<0?i=0:i>1&&(i=1),e<0?e=0:e>1&&(e=1),r<0?r=0:r>1&&(r=1),this._$lT=t,this._$C0=i,this._$tT=e,this._$WL=r},E.prototype._$WP=function(t){this.culling=t},E.prototype.setMatrix=function(t){for(var i=0;i<16;i++)this.matrix4x4[i]=t[i]},E.prototype._$IT=function(){return this.matrix4x4},E.prototype.setPremultipliedAlpha=function(t){this.premultipliedAlpha=t},E.prototype.isPremultipliedAlpha=function(){return this.premultipliedAlpha},E.prototype.setAnisotropy=function(t){this.anisotropy=t},E.prototype.getAnisotropy=function(){return this.anisotropy},E.prototype.getClippingProcess=function(){return this.clippingProcess},E.prototype.setClippingProcess=function(t){this.clippingProcess=t},E.prototype.setClipBufPre_clipContextForMask=function(t){this.clipBufPre_clipContextMask=t},E.prototype.getClipBufPre_clipContextMask=function(){return this.clipBufPre_clipContextMask},E.prototype.setClipBufPre_clipContextForDraw=function(t){this.clipBufPre_clipContextDraw=t},E.prototype.getClipBufPre_clipContextDraw=function(){return this.clipBufPre_clipContextDraw},I._$ur=-2,I._$c2=1,I._$_b=2,I.prototype._$F0=function(t){this._$kP=t._$nP(),this._$dr=t._$nP()},I.prototype.readV2_opacity=function(t){t.getFormatVersion()>=G.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this._$mS=t._$Tb())},I.prototype.init=function(t){},I.prototype._$Nr=function(t,i){},I.prototype.interpolateOpacity=function(t,i,e,r){null==this._$mS?e.setInterpolatedOpacity(1):e.setInterpolatedOpacity(v._$br(t,i,r,this._$mS))},I.prototype._$2b=function(t,i){},I.prototype._$nb=function(t,i,e,r,o,n,s){},I.prototype.getType=function(){},I.prototype._$gs=function(t){this._$dr=t},I.prototype._$a2=function(t){this._$kP=t},I.prototype.getTargetBaseDataID=function(){return this._$dr},I.prototype.getBaseDataID=function(){return this._$kP},I.prototype._$32=function(){return null!=this._$dr&&this._$dr!=yt._$2o()},w._$W2=0,w._$CS=w._$W2,w._$Mo=function(){return!0},w._$XP=function(t){try{for(var i=getTimeMSec();getTimeMSec()-i=t.length)return!1;for(var o=i;o=0;--e){var r=this._$Ob[e].getParamIndex(i);if(r==x._$ds&&(r=t.getParamIndex(this._$Ob[e].getParamID())),t._$Xb(r))return!0}return!1},D.prototype._$Q2=function(t,i){for(var e,r,o=this._$Ob.length,n=t._$v2(),s=0,_=0;_U._$Qb&&console.log("err 23245\n");for(var o=this._$Ob.length,n=1,s=1,_=0,a=0;a=0;--n)e[n]=o[n]}else this.mult_fast(t,i,e,r)},R.prototype.mult_fast=function(t,i,e,r){r?(e[0]=t[0]*i[0]+t[4]*i[1]+t[8]*i[2],e[4]=t[0]*i[4]+t[4]*i[5]+t[8]*i[6],e[8]=t[0]*i[8]+t[4]*i[9]+t[8]*i[10],e[12]=t[0]*i[12]+t[4]*i[13]+t[8]*i[14]+t[12],e[1]=t[1]*i[0]+t[5]*i[1]+t[9]*i[2],e[5]=t[1]*i[4]+t[5]*i[5]+t[9]*i[6],e[9]=t[1]*i[8]+t[5]*i[9]+t[9]*i[10],e[13]=t[1]*i[12]+t[5]*i[13]+t[9]*i[14]+t[13],e[2]=t[2]*i[0]+t[6]*i[1]+t[10]*i[2],e[6]=t[2]*i[4]+t[6]*i[5]+t[10]*i[6],e[10]=t[2]*i[8]+t[6]*i[9]+t[10]*i[10],e[14]=t[2]*i[12]+t[6]*i[13]+t[10]*i[14]+t[14],e[3]=e[7]=e[11]=0,e[15]=1):(e[0]=t[0]*i[0]+t[4]*i[1]+t[8]*i[2]+t[12]*i[3],e[4]=t[0]*i[4]+t[4]*i[5]+t[8]*i[6]+t[12]*i[7],e[8]=t[0]*i[8]+t[4]*i[9]+t[8]*i[10]+t[12]*i[11],e[12]=t[0]*i[12]+t[4]*i[13]+t[8]*i[14]+t[12]*i[15],e[1]=t[1]*i[0]+t[5]*i[1]+t[9]*i[2]+t[13]*i[3],e[5]=t[1]*i[4]+t[5]*i[5]+t[9]*i[6]+t[13]*i[7],e[9]=t[1]*i[8]+t[5]*i[9]+t[9]*i[10]+t[13]*i[11],e[13]=t[1]*i[12]+t[5]*i[13]+t[9]*i[14]+t[13]*i[15],e[2]=t[2]*i[0]+t[6]*i[1]+t[10]*i[2]+t[14]*i[3],e[6]=t[2]*i[4]+t[6]*i[5]+t[10]*i[6]+t[14]*i[7],e[10]=t[2]*i[8]+t[6]*i[9]+t[10]*i[10]+t[14]*i[11],e[14]=t[2]*i[12]+t[6]*i[13]+t[10]*i[14]+t[14]*i[15],e[3]=t[3]*i[0]+t[7]*i[1]+t[11]*i[2]+t[15]*i[3],e[7]=t[3]*i[4]+t[7]*i[5]+t[11]*i[6]+t[15]*i[7],e[11]=t[3]*i[8]+t[7]*i[9]+t[11]*i[10]+t[15]*i[11],e[15]=t[3]*i[12]+t[7]*i[13]+t[11]*i[14]+t[15]*i[15])},R.prototype.translate=function(t,i,e){this.m[12]=this.m[0]*t+this.m[4]*i+this.m[8]*e+this.m[12],this.m[13]=this.m[1]*t+this.m[5]*i+this.m[9]*e+this.m[13],this.m[14]=this.m[2]*t+this.m[6]*i+this.m[10]*e+this.m[14],this.m[15]=this.m[3]*t+this.m[7]*i+this.m[11]*e+this.m[15]},R.prototype.scale=function(t,i,e){this.m[0]*=t,this.m[4]*=i,this.m[8]*=e,this.m[1]*=t,this.m[5]*=i,this.m[9]*=e,this.m[2]*=t,this.m[6]*=i,this.m[10]*=e,this.m[3]*=t,this.m[7]*=i,this.m[11]*=e},R.prototype.rotateX=function(t){var i=Lt.fcos(t),e=Lt._$9(t),r=this.m[4];this.m[4]=r*i+this.m[8]*e,this.m[8]=r*-e+this.m[8]*i,r=this.m[5],this.m[5]=r*i+this.m[9]*e,this.m[9]=r*-e+this.m[9]*i,r=this.m[6],this.m[6]=r*i+this.m[10]*e,this.m[10]=r*-e+this.m[10]*i,r=this.m[7],this.m[7]=r*i+this.m[11]*e,this.m[11]=r*-e+this.m[11]*i},R.prototype.rotateY=function(t){var i=Lt.fcos(t),e=Lt._$9(t),r=this.m[0];this.m[0]=r*i+this.m[8]*-e,this.m[8]=r*e+this.m[8]*i,r=this.m[1],this.m[1]=r*i+this.m[9]*-e,this.m[9]=r*e+this.m[9]*i,r=m[2],this.m[2]=r*i+this.m[10]*-e,this.m[10]=r*e+this.m[10]*i,r=m[3],this.m[3]=r*i+this.m[11]*-e,this.m[11]=r*e+this.m[11]*i},R.prototype.rotateZ=function(t){var i=Lt.fcos(t),e=Lt._$9(t),r=this.m[0];this.m[0]=r*i+this.m[4]*e,this.m[4]=r*-e+this.m[4]*i,r=this.m[1],this.m[1]=r*i+this.m[5]*e,this.m[5]=r*-e+this.m[5]*i,r=this.m[2],this.m[2]=r*i+this.m[6]*e,this.m[6]=r*-e+this.m[6]*i,r=this.m[3],this.m[3]=r*i+this.m[7]*e,this.m[7]=r*-e+this.m[7]*i},b.prototype=new et,b._$tP=new Object,b._$27=function(){b._$tP.clear()},b.getID=function(t){var i=b._$tP[t];return null==i&&(i=new b(t),b._$tP[t]=i),i},b.prototype._$3s=function(){return new b},F._$kS=-1,F._$pS=0,F._$hb=1,F.STATE_IDENTITY=0,F._$gb=1,F._$fo=2,F._$go=4,F.prototype.transform=function(t,i,e){var r,o,n,s,_,a,h=0,l=0;switch(this._$hi){default:return;case F._$go|F._$fo|F._$gb:for(r=this._$7,o=this._$H,n=this._$k,s=this._$f,_=this._$g,a=this._$w;--e>=0;){var $=t[h++],u=t[h++];i[l++]=r*$+o*u+n,i[l++]=s*$+_*u+a}return;case F._$go|F._$fo:for(r=this._$7,o=this._$H,s=this._$f,_=this._$g;--e>=0;){var $=t[h++],u=t[h++];i[l++]=r*$+o*u,i[l++]=s*$+_*u}return;case F._$go|F._$gb:for(o=this._$H,n=this._$k,s=this._$f,a=this._$w;--e>=0;){var $=t[h++];i[l++]=o*t[h++]+n,i[l++]=s*$+a}return;case F._$go:for(o=this._$H,s=this._$f;--e>=0;){var $=t[h++];i[l++]=o*t[h++],i[l++]=s*$}return;case F._$fo|F._$gb:for(r=this._$7,n=this._$k,_=this._$g,a=this._$w;--e>=0;)i[l++]=r*t[h++]+n,i[l++]=_*t[h++]+a;return;case F._$fo:for(r=this._$7,_=this._$g;--e>=0;)i[l++]=r*t[h++],i[l++]=_*t[h++];return;case F._$gb:for(n=this._$k,a=this._$w;--e>=0;)i[l++]=t[h++]+n,i[l++]=t[h++]+a;return;case F.STATE_IDENTITY:return void(t==i&&h==l||w._$jT(t,h,i,l,2*e))}},F.prototype.update=function(){0==this._$H&&0==this._$f?1==this._$7&&1==this._$g?0==this._$k&&0==this._$w?(this._$hi=F.STATE_IDENTITY,this._$Z=F._$pS):(this._$hi=F._$gb,this._$Z=F._$hb):0==this._$k&&0==this._$w?(this._$hi=F._$fo,this._$Z=F._$kS):(this._$hi=F._$fo|F._$gb,this._$Z=F._$kS):0==this._$7&&0==this._$g?0==this._$k&&0==this._$w?(this._$hi=F._$go,this._$Z=F._$kS):(this._$hi=F._$go|F._$gb,this._$Z=F._$kS):0==this._$k&&0==this._$w?(this._$hi=F._$go|F._$fo,this._$Z=F._$kS):(this._$hi=F._$go|F._$fo|F._$gb,this._$Z=F._$kS)},F.prototype._$RT=function(t){this._$IT(t);var i=t[0],e=t[2],r=t[1],o=t[3],n=Math.sqrt(i*i+r*r),s=i*o-e*r;0==n?at._$so&&console.log("affine._$RT() / rt==0"):(t[0]=n,t[1]=s/n,t[2]=(r*o+i*e)/s,t[3]=Math.atan2(r,i))},F.prototype._$ho=function(t,i,e,r){var o=new Float32Array(6),n=new Float32Array(6);t._$RT(o),i._$RT(n);var s=new Float32Array(6);s[0]=o[0]+(n[0]-o[0])*e,s[1]=o[1]+(n[1]-o[1])*e,s[2]=o[2]+(n[2]-o[2])*e,s[3]=o[3]+(n[3]-o[3])*e,s[4]=o[4]+(n[4]-o[4])*e,s[5]=o[5]+(n[5]-o[5])*e,r._$CT(s)},F.prototype._$CT=function(t){var i=Math.cos(t[3]),e=Math.sin(t[3]);this._$7=t[0]*i,this._$f=t[0]*e,this._$H=t[1]*(t[2]*i-e),this._$g=t[1]*(t[2]*e+i),this._$k=t[4],this._$w=t[5],this.update()},F.prototype._$IT=function(t){t[0]=this._$7,t[1]=this._$f,t[2]=this._$H,t[3]=this._$g,t[4]=this._$k,t[5]=this._$w},C.prototype=new s,C._$cs="VISIBLE:",C._$ar="LAYOUT:",C._$Co=0,C._$D2=[],C._$1T=1,C.loadMotion=function(t){var i=new C,e=[0],r=t.length;i._$yT=0;for(var o=0;o=0){var a=new B;O.startsWith(t,s,C._$cs)?(a._$RP=B._$hs,a._$4P=new String(t,s,_-s)):O.startsWith(t,s,C._$ar)?(a._$4P=new String(t,s+7,_-s-7),O.startsWith(t,s+7,"ANCHOR_X")?a._$RP=B._$xs:O.startsWith(t,s+7,"ANCHOR_Y")?a._$RP=B._$us:O.startsWith(t,s+7,"SCALE_X")?a._$RP=B._$qs:O.startsWith(t,s+7,"SCALE_Y")?a._$RP=B._$Ys:O.startsWith(t,s+7,"X")?a._$RP=B._$ws:O.startsWith(t,s+7,"Y")&&(a._$RP=B._$Ns)):(a._$RP=B._$Fr,a._$4P=new String(t,s,_-s)),i.motions.push(a);var h=0;for(C._$D2.clear(),o=_+1;o0){C._$D2.push(l),h++;var $=e[0];if($i._$yT&&(i._$yT=h)}}}else{for(var s=o,_=-1;o=0)for(_==s+4&&"f"==t[s+1]&&"p"==t[s+2]&&"s"==t[s+3]&&(u=!0),o=_+1;o0&&u&&5=l?l-1:s];t.setParamFloat($,u)}else if(B._$ws<=h._$RP&&h._$RP<=B._$Ys);else{var p=t.getParamFloat($),f=h._$I0[s>=l?l-1:s],c=h._$I0[s+1>=l?l-1:s+1],d=f+(c-f)*_,g=p+(d-p)*e;t.setParamFloat($,g)}}s>=this._$yT&&(this._$E?(r._$z2=i,this.loopFadeIn&&(r._$bs=i)):r._$9L=!0)},C.prototype._$r0=function(){return this._$E},C.prototype._$aL=function(t){this._$E=t},C.prototype.isLoopFadeIn=function(){return this.loopFadeIn},C.prototype.setLoopFadeIn=function(t){this.loopFadeIn=t},N.prototype.clear=function(){this.size=0},N.prototype.add=function(t){if(this._$P.length<=this.size){var i=new Float32Array(2*this.size);w._$jT(this._$P,0,i,0,this.size),this._$P=i}this._$P[this.size++]=t},N.prototype._$BL=function(){var t=new Float32Array(this.size);return w._$jT(this._$P,0,t,0,this.size),t},B._$Fr=0,B._$hs=1,B._$ws=100,B._$Ns=101,B._$xs=102,B._$us=103,B._$qs=104,B._$Ys=105,U._$Ms=1,U._$Qs=2,U._$i2=0,U._$No=2,U._$do=U._$Ms,U._$Ls=!0,U._$1r=5,U._$Qb=65,U._$J=1e-4,U._$FT=.001,U._$Ss=3,G._$o7=6,G._$S7=7,G._$s7=8,G._$77=9,G.LIVE2D_FORMAT_VERSION_V2_10_SDK2=10,G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1=11,G._$T7=G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1,G._$Is=-2004318072,G._$h0=0,G._$4L=23,G._$7P=33,G._$uT=function(t){console.log("_$bo :: _$6 _$mo _$E0 : %d\n",t)},G._$9o=function(t){if(t<40)return G._$uT(t),null;if(t<50)return G._$uT(t),null;if(t<60)return G._$uT(t),null;if(t<100)switch(t){case 65:return new Z;case 66:return new D;case 67:return new x;case 68:return new z;case 69:return new P;case 70:return new $t;default:return G._$uT(t),null}else if(t<150)switch(t){case 131:return new st;case 133:return new tt;case 136:return new p;case 137:return new ot;case 142:return new j}return G._$uT(t),null},Y._$HP=0,Y._$_0=!0;Y._$V2=-1,Y._$W0=-1,Y._$jr=!1,Y._$ZS=!0,Y._$tr=-1e6,Y._$lr=1e6,Y._$is=32,Y._$e=!1,Y.prototype.getDrawDataIndex=function(t){for(var i=this._$aS.length-1;i>=0;--i)if(null!=this._$aS[i]&&this._$aS[i].getDrawDataID()==t)return i;return-1},Y.prototype.getDrawData=function(t){if(t instanceof b){if(null==this._$Bo){this._$Bo=new Object;for(var i=this._$aS.length,e=0;e0&&this.release();for(var t=this._$Ri.getModelImpl(),i=t._$Xr(),r=i.length,o=new Array,n=new Array,s=0;s=0)&&(this._$3S.push(m),this._$db.push(n[s]),o[s]=null,y=!0)}}if(!y)break}var P=t._$E2();if(null!=P){var S=P._$1s();if(null!=S)for(var v=S.length,s=0;s=0;i--)this._$Js[i]=Y._$jr;return this._$QT=!1,Y._$e&&_.dump("_$eL"),!1},Y.prototype.preDraw=function(t){null!=this.clipManager&&(t._$ZT(),this.clipManager.setupClip(this,t))},Y.prototype.draw=function(t){if(null==this._$Ws)return void _._$li("call _$Ri.update() before _$Ri.draw() ");var i=this._$Ws.length;t._$ZT();for(var e=0;e=0;--i)if(this._$pb[i]==t)return i;return this._$02(t,0,Y._$tr,Y._$lr)},Y.prototype._$BS=function(t){return this.getBaseDataIndex(t)},Y.prototype.getBaseDataIndex=function(t){for(var i=this._$3S.length-1;i>=0;--i)if(null!=this._$3S[i]&&this._$3S[i].getBaseDataID()==t)return i;return-1},Y.prototype._$UT=function(t,i){var e=new Float32Array(i);return w._$jT(t,0,e,0,t.length),e},Y.prototype._$02=function(t,i,e,r){if(this._$qo>=this._$pb.length){var o=this._$pb.length,n=new Array(2*o);w._$jT(this._$pb,0,n,0,o),this._$pb=n,this._$_2=this._$UT(this._$_2,2*o),this._$vr=this._$UT(this._$vr,2*o),this._$Rr=this._$UT(this._$Rr,2*o),this._$Or=this._$UT(this._$Or,2*o);var s=new Array;w._$jT(this._$Js,0,s,0,o),this._$Js=s}return this._$pb[this._$qo]=t,this._$_2[this._$qo]=i,this._$vr[this._$qo]=i,this._$Rr[this._$qo]=e,this._$Or[this._$qo]=r,this._$Js[this._$qo]=Y._$ZS,this._$qo++},Y.prototype._$Zo=function(t,i){this._$3S[t]=i},Y.prototype.setParamFloat=function(t,i){ithis._$Or[t]&&(i=this._$Or[t]),this._$_2[t]=i},Y.prototype.loadParam=function(){var t=this._$_2.length;t>this._$fs.length&&(t=this._$fs.length),w._$jT(this._$fs,0,this._$_2,0,t)},Y.prototype.saveParam=function(){var t=this._$_2.length;t>this._$fs.length&&(this._$fs=new Float32Array(t)),w._$jT(this._$_2,0,this._$fs,0,t)},Y.prototype._$v2=function(){return this._$co},Y.prototype._$WS=function(){return this._$QT},Y.prototype._$Xb=function(t){return this._$Js[t]==Y._$ZS},Y.prototype._$vs=function(){return this._$Es},Y.prototype._$Tr=function(){return this._$ZP},Y.prototype.getBaseData=function(t){return this._$3S[t]},Y.prototype.getParamFloat=function(t){return this._$_2[t]},Y.prototype.getParamMax=function(t){return this._$Or[t]},Y.prototype.getParamMin=function(t){return this._$Rr[t]},Y.prototype.setPartsOpacity=function(t,i){this._$Hr[t].setPartsOpacity(i)},Y.prototype.getPartsOpacity=function(t){return this._$Hr[t].getPartsOpacity()},Y.prototype.getPartsDataIndex=function(t){for(var i=this._$F2.length-1;i>=0;--i)if(null!=this._$F2[i]&&this._$F2[i]._$p2()==t)return i;return-1},Y.prototype._$q2=function(t){return this._$db[t]},Y.prototype._$C2=function(t){return this._$8b[t]},Y.prototype._$Bb=function(t){return this._$Hr[t]},Y.prototype._$5s=function(t,i){for(var e=this._$Ws.length,r=t,o=0;o0;)n+=i;return r},k._$C=function(t){var i=null,e=null;try{i=t instanceof Array?t:new _$Xs(t,8192),e=new _$js;for(var r,o=new Int8Array(1e3);(r=i.read(o))>0;)e.write(o,0,r);return e._$TS()}finally{null!=t&&t.close(),null!=e&&(e.flush(),e.close())}},V.prototype._$T2=function(){return w.getUserTimeMSec()+Math._$10()*(2*this._$Br-1)},V.prototype._$uo=function(t){this._$Br=t},V.prototype._$QS=function(t,i,e){this._$Dr=t,this._$Cb=i,this._$mr=e},V.prototype._$7T=function(t){var i,e=w.getUserTimeMSec(),r=0;switch(this._$_L){case STATE_CLOSING:r=(e-this._$bb)/this._$Dr,r>=1&&(r=1,this._$_L=wt.STATE_CLOSED,this._$bb=e),i=1-r;break;case STATE_CLOSED:r=(e-this._$bb)/this._$Cb,r>=1&&(this._$_L=wt.STATE_OPENING,this._$bb=e),i=0;break;case STATE_OPENING:r=(e-this._$bb)/this._$mr,r>=1&&(r=1,this._$_L=wt.STATE_INTERVAL,this._$12=this._$T2()),i=r;break;case STATE_INTERVAL:this._$12.9?at.EXPAND_W:0;this.gl.drawElements(a,e,r,o,n,h,this.transform,_)}},X.prototype._$Rs=function(){throw new Error("_$Rs")},X.prototype._$Ds=function(t){throw new Error("_$Ds")},X.prototype._$K2=function(){for(var t=0;t=0;--i){var e=t[i];eW._$R2&&(W._$R2=e)}},W._$or=function(){return W._$52},W._$Pr=function(){return W._$R2},W.prototype._$F0=function(t){this._$gP=t._$nP(),this._$dr=t._$nP(),this._$GS=t._$nP(),this._$qb=t._$6L(),this._$Lb=t._$cS(),this._$mS=t._$Tb(),t.getFormatVersion()>=G._$T7?(this.clipID=t._$nP(),this.clipIDList=this.convertClipIDForV2_11(this.clipID)):this.clipIDList=null,W._$Sb(this._$Lb)},W.prototype.getClipIDList=function(){return this.clipIDList},W.prototype._$Nr=function(t,i){if(i._$IS[0]=!1,i._$Us=v._$Z2(t,this._$GS,i._$IS,this._$Lb),at._$Zs);else if(i._$IS[0])return;i._$7s=v._$br(t,this._$GS,i._$IS,this._$mS)},W.prototype._$2b=function(t){},W.prototype.getDrawDataID=function(){return this._$gP},W.prototype._$j2=function(t){this._$gP=t},W.prototype.getOpacity=function(t,i){return i._$7s},W.prototype._$zS=function(t,i){return i._$Us},W.prototype.getTargetBaseDataID=function(){return this._$dr},W.prototype._$gs=function(t){this._$dr=t},W.prototype._$32=function(){return null!=this._$dr&&this._$dr!=yt._$2o()},W.prototype.getType=function(){},j._$42=0,j.prototype._$1b=function(){return this._$3S},j.prototype.getDrawDataList=function(){return this._$aS},j.prototype._$F0=function(t){this._$NL=t._$nP(),this._$aS=t._$nP(),this._$3S=t._$nP()},j.prototype._$kr=function(t){t._$Zo(this._$3S),t._$xo(this._$aS),this._$3S=null,this._$aS=null},q.prototype=new i,q.loadModel=function(t){var e=new q;return i._$62(e,t),e},q.loadModel=function(t){var e=new q;return i._$62(e,t),e},q._$to=function(){return new q},q._$er=function(t){var i=new _$5("../_$_r/_$t0/_$Ri/_$_P._$d");if(0==i.exists())throw new _$ls("_$t0 _$_ _$6 _$Ui :: "+i._$PL());for(var e=["../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1"],r=q.loadModel(i._$3b()),o=0;o=0){var h=new B;O.startsWith(t,_,J._$cs)?(h._$RP=B._$hs,h._$4P=O.createString(t,_,a-_)):O.startsWith(t,_,J._$ar)?(h._$4P=O.createString(t,_+7,a-_-7),O.startsWith(t,_+7,"ANCHOR_X")?h._$RP=B._$xs:O.startsWith(t,_+7,"ANCHOR_Y")?h._$RP=B._$us:O.startsWith(t,_+7,"SCALE_X")?h._$RP=B._$qs:O.startsWith(t,_+7,"SCALE_Y")?h._$RP=B._$Ys:O.startsWith(t,_+7,"X")?h._$RP=B._$ws:O.startsWith(t,_+7,"Y")&&(h._$RP=B._$Ns)):(h._$RP=B._$Fr,h._$4P=O.createString(t,_,a-_)),i.motions.push(h);var l=0,$=[];for(o=a+1;o0){$.push(u),l++;var p=e[0];if(pi._$yT&&(i._$yT=l)}}}else{for(var _=o,a=-1;o=0)for(a==_+4&&"f"==Q(t,_+1)&&"p"==Q(t,_+2)&&"s"==Q(t,_+3)&&(f=!0),o=a+1;o0&&f&&5=l?l-1:s];t.setParamFloat($,u)}else if(B._$ws<=h._$RP&&h._$RP<=B._$Ys);else{var p,f=t.getParamIndex($),c=t.getModelContext(),d=c.getParamMax(f),g=c.getParamMin(f),y=.4*(d-g),m=c.getParamFloat(f),T=h._$I0[s>=l?l-1:s],P=h._$I0[s+1>=l?l-1:s+1];p=Ty||T>P&&T-P>y?T:T+(P-T)*_;var S=m+(p-m)*e;t.setParamFloat($,S)}}s>=this._$yT&&(this._$E?(r._$z2=i,this.loopFadeIn&&(r._$bs=i)):r._$9L=!0),this._$eP=e},J.prototype._$r0=function(){return this._$E},J.prototype._$aL=function(t){this._$E=t},J.prototype._$S0=function(){return this._$D0},J.prototype._$U0=function(t){this._$D0=t},J.prototype.isLoopFadeIn=function(){return this.loopFadeIn},J.prototype.setLoopFadeIn=function(t){this.loopFadeIn=t},N.prototype.clear=function(){this.size=0},N.prototype.add=function(t){if(this._$P.length<=this.size){var i=new Float32Array(2*this.size);w._$jT(this._$P,0,i,0,this.size),this._$P=i}this._$P[this.size++]=t},N.prototype._$BL=function(){var t=new Float32Array(this.size);return w._$jT(this._$P,0,t,0,this.size),t},B._$Fr=0,B._$hs=1,B._$ws=100,B._$Ns=101,B._$xs=102,B._$us=103,B._$qs=104,B._$Ys=105,Z.prototype=new I,Z._$gT=new Array,Z.prototype._$zP=function(){this._$GS=new D,this._$GS._$zP()},Z.prototype._$F0=function(t){I.prototype._$F0.call(this,t),this._$A=t._$6L(),this._$o=t._$6L(),this._$GS=t._$nP(),this._$Eo=t._$nP(),I.prototype.readV2_opacity.call(this,t)},Z.prototype.init=function(t){var i=new K(this),e=(this._$o+1)*(this._$A+1);return null!=i._$Cr&&(i._$Cr=null),i._$Cr=new Float32Array(2*e),null!=i._$hr&&(i._$hr=null),this._$32()?i._$hr=new Float32Array(2*e):i._$hr=null,i},Z.prototype._$Nr=function(t,i){var e=i;if(this._$GS._$Ur(t)){var r=this._$VT(),o=Z._$gT;o[0]=!1,v._$Vr(t,this._$GS,o,r,this._$Eo,e._$Cr,0,2),i._$Ib(o[0]),this.interpolateOpacity(t,this._$GS,i,o)}},Z.prototype._$2b=function(t,i){var e=i;if(e._$hS(!0),this._$32()){var r=this.getTargetBaseDataID();if(e._$8r==I._$ur&&(e._$8r=t.getBaseDataIndex(r)),e._$8r<0)at._$so&&_._$li("_$L _$0P _$G :: %s",r),e._$hS(!1);else{var o=t.getBaseData(e._$8r),n=t._$q2(e._$8r);if(null!=o&&n._$yo()){var s=n.getTotalScale();e.setTotalScale_notForClient(s);var a=n.getTotalOpacity();e.setTotalOpacity(a*e.getInterpolatedOpacity()),o._$nb(t,n,e._$Cr,e._$hr,this._$VT(),0,2),e._$hS(!0)}else e._$hS(!1)}}else e.setTotalOpacity(e.getInterpolatedOpacity())},Z.prototype._$nb=function(t,i,e,r,o,n,s){var _=i,a=null!=_._$hr?_._$hr:_._$Cr;Z.transformPoints_sdk2(e,r,o,n,s,a,this._$o,this._$A)},Z.transformPoints_sdk2=function(i,e,r,o,n,s,_,a){for(var h,l,$,u=r*n,p=0,f=0,c=0,d=0,g=0,y=0,m=!1,T=o;T=1){var b=s[2*(0+a*M)],F=s[2*(0+a*M)+1],C=p-2*c+1*g,N=f-2*d+1*y,x=p+3*g,O=f+3*y,D=p-2*c+3*g,R=f-2*d+3*y,B=.5*(v- -2),U=.5*(L-1);B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else{var G=0|S;G==a&&(G=a-1);var B=.5*(v- -2),U=S-G,Y=G/a,k=(G+1)/a,b=s[2*(0+G*M)],F=s[2*(0+G*M)+1],x=s[2*(0+(G+1)*M)],O=s[2*(0+(G+1)*M)+1],C=p-2*c+Y*g,N=f-2*d+Y*y,D=p-2*c+k*g,R=f-2*d+k*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(1<=v)if(L<=0){var D=s[2*(_+0*M)],R=s[2*(_+0*M)+1],x=p+3*c,O=f+3*d,C=p+1*c-2*g,N=f+1*d-2*y,b=p+3*c-2*g,F=f+3*d-2*y,B=.5*(v-1),U=.5*(L- -2);B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(L>=1){var C=s[2*(_+a*M)],N=s[2*(_+a*M)+1],b=p+3*c+1*g,F=f+3*d+1*y,D=p+1*c+3*g,R=f+1*d+3*y,x=p+3*c+3*g,O=f+3*d+3*y,B=.5*(v-1),U=.5*(L-1);B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else{var G=0|S;G==a&&(G=a-1);var B=.5*(v-1),U=S-G,Y=G/a,k=(G+1)/a,C=s[2*(_+G*M)],N=s[2*(_+G*M)+1],D=s[2*(_+(G+1)*M)],R=s[2*(_+(G+1)*M)+1],b=p+3*c+Y*g,F=f+3*d+Y*y,x=p+3*c+k*g,O=f+3*d+k*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(L<=0){var V=0|P;V==_&&(V=_-1);var B=P-V,U=.5*(L- -2),X=V/_,z=(V+1)/_,D=s[2*(V+0*M)],R=s[2*(V+0*M)+1],x=s[2*(V+1+0*M)],O=s[2*(V+1+0*M)+1],C=p+X*c-2*g,N=f+X*d-2*y,b=p+z*c-2*g,F=f+z*d-2*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(L>=1){var V=0|P;V==_&&(V=_-1);var B=P-V,U=.5*(L-1),X=V/_,z=(V+1)/_,C=s[2*(V+a*M)],N=s[2*(V+a*M)+1],b=s[2*(V+1+a*M)],F=s[2*(V+1+a*M)+1],D=p+X*c+3*g,R=f+X*d+3*y,x=p+z*c+3*g,O=f+z*d+3*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else t.err.printf("_$li calc : %.4f , %.4f\t\t\t\t\t@@BDBoxGrid\n",v,L);else e[T]=p+v*c+L*g,e[T+1]=f+v*d+L*y}else l=P-(0|P),$=S-(0|S),h=2*((0|P)+(0|S)*(_+1)),l+$<1?(e[T]=s[h]*(1-l-$)+s[h+2]*l+s[h+2*(_+1)]*$,e[T+1]=s[h+1]*(1-l-$)+s[h+3]*l+s[h+2*(_+1)+1]*$):(e[T]=s[h+2*(_+1)+2]*(l-1+$)+s[h+2*(_+1)]*(1-l)+s[h+2]*(1-$),e[T+1]=s[h+2*(_+1)+3]*(l-1+$)+s[h+2*(_+1)+1]*(1-l)+s[h+3]*(1-$))}},Z.prototype.transformPoints_sdk1=function(t,i,e,r,o,n,s){for(var _,a,h,l,$,u,p,f=i,c=this._$o,d=this._$A,g=o*s,y=null!=f._$hr?f._$hr:f._$Cr,m=n;m1&&(_=1),a<0?a=0:a>1&&(a=1),_*=c,a*=d,h=0|_,l=0|a,h>c-1&&(h=c-1),l>d-1&&(l=d-1),u=_-h,p=a-l,$=2*(h+l*(c+1))):(_=e[m]*c,a=e[m+1]*d,u=_-(0|_),p=a-(0|a),$=2*((0|_)+(0|a)*(c+1))),u+p<1?(r[m]=y[$]*(1-u-p)+y[$+2]*u+y[$+2*(c+1)]*p,r[m+1]=y[$+1]*(1-u-p)+y[$+3]*u+y[$+2*(c+1)+1]*p):(r[m]=y[$+2*(c+1)+2]*(u-1+p)+y[$+2*(c+1)]*(1-u)+y[$+2]*(1-p),r[m+1]=y[$+2*(c+1)+3]*(u-1+p)+y[$+2*(c+1)+1]*(1-u)+y[$+3]*(1-p))},Z.prototype._$VT=function(){return(this._$o+1)*(this._$A+1)},Z.prototype.getType=function(){return I._$_b},K.prototype=new _t,tt._$42=0,tt.prototype._$zP=function(){this._$3S=new Array,this._$aS=new Array},tt.prototype._$F0=function(t){this._$g0=t._$8L(),this.visible=t._$8L(),this._$NL=t._$nP(),this._$3S=t._$nP(),this._$aS=t._$nP()},tt.prototype.init=function(t){var i=new it(this);return i.setPartsOpacity(this.isVisible()?1:0),i},tt.prototype._$6o=function(t){if(null==this._$3S)throw new Error("_$3S _$6 _$Wo@_$6o");this._$3S.push(t)},tt.prototype._$3o=function(t){if(null==this._$aS)throw new Error("_$aS _$6 _$Wo@_$3o");this._$aS.push(t)},tt.prototype._$Zo=function(t){this._$3S=t},tt.prototype._$xo=function(t){this._$aS=t},tt.prototype.isVisible=function(){return this.visible},tt.prototype._$uL=function(){return this._$g0},tt.prototype._$KP=function(t){this.visible=t},tt.prototype._$ET=function(t){this._$g0=t},tt.prototype.getBaseData=function(){return this._$3S},tt.prototype.getDrawData=function(){return this._$aS},tt.prototype._$p2=function(){return this._$NL},tt.prototype._$ob=function(t){this._$NL=t},tt.prototype.getPartsID=function(){return this._$NL},tt.prototype._$MP=function(t){this._$NL=t},it.prototype=new $,it.prototype.getPartsOpacity=function(){return this._$VS},it.prototype.setPartsOpacity=function(t){this._$VS=t},et._$L7=function(){u._$27(),yt._$27(),b._$27(),l._$27()},et.prototype.toString=function(){return this.id},rt.prototype._$F0=function(t){},ot.prototype._$1s=function(){return this._$4S},ot.prototype._$zP=function(){this._$4S=new Array},ot.prototype._$F0=function(t){this._$4S=t._$nP()},ot.prototype._$Ks=function(t){this._$4S.push(t)},nt.tr=new gt,nt._$50=new gt,nt._$Ti=new Array(0,0),nt._$Pi=new Array(0,0),nt._$B=new Array(0,0),nt.prototype._$lP=function(t,i,e,r){this.viewport=new Array(t,i,e,r)},nt.prototype._$bL=function(){this.context.save();var t=this.viewport;null!=t&&(this.context.beginPath(),this.context._$Li(t[0],t[1],t[2],t[3]),this.context.clip())},nt.prototype._$ei=function(){this.context.restore()},nt.prototype.drawElements=function(t,i,e,r,o,n,s,a){try{o!=this._$Qo&&(this._$Qo=o,this.context.globalAlpha=o);for(var h=i.length,l=t.width,$=t.height,u=this.context,p=this._$xP,f=this._$uP,c=this._$6r,d=this._$3r,g=nt.tr,y=nt._$Ti,m=nt._$Pi,T=nt._$B,P=0;P.02?nt.expandClip(t,i,e,r,l,$,u,p,f,c):nt.clipWithTransform(t,null,o,n,s,_,a,h)},nt.expandClip=function(t,i,e,r,o,n,s,_,a,h){var l=s-o,$=_-n,u=a-o,p=h-n,f=l*p-$*u>0?e:-e,c=-$,d=l,g=a-s,y=h-_,m=-y,T=g,P=Math.sqrt(g*g+y*y),S=-p,v=u,L=Math.sqrt(u*u+p*p),M=o-f*c/r,E=n-f*d/r,A=s-f*c/r,I=_-f*d/r,w=s-f*m/P,x=_-f*T/P,O=a-f*m/P,D=h-f*T/P,R=o+f*S/L,b=n+f*v/L,F=a+f*S/L,C=h+f*v/L,N=nt._$50;return null!=i._$P2(N)&&(nt.clipWithTransform(t,N,M,E,A,I,w,x,O,D,F,C,R,b),!0)},nt.clipWithTransform=function(t,i,e,r,o,n,s,a){if(arguments.length<7)return void _._$li("err : @LDGL.clip()");if(!(arguments[1]instanceof gt))return void _._$li("err : a[0] is _$6 LDTransform @LDGL.clip()");var h=nt._$B,l=i,$=arguments;if(t.beginPath(),l){l._$PS($[2],$[3],h),t.moveTo(h[0],h[1]);for(var u=4;u<$.length;u+=2)l._$PS($[u],$[u+1],h),t.lineTo(h[0],h[1])}else{t.moveTo($[2],$[3]);for(var u=4;u<$.length;u+=2)t.lineTo($[u],$[u+1])}t.clip()},nt.createCanvas=function(t,i){var e=document.createElement("canvas");return e.setAttribute("width",t),e.setAttribute("height",i),e||_._$li("err : "+e),e},nt.dumpValues=function(){for(var t="",i=0;i1?1:.5-.5*Math.cos(t*Lt.PI_F)},lt._$fr=-1,lt.prototype.toString=function(){return this._$ib},$t.prototype=new W,$t._$42=0,$t._$Os=30,$t._$ms=0,$t._$ns=1,$t._$_s=2,$t._$gT=new Array,$t.prototype._$_S=function(t){this._$LP=t},$t.prototype.getTextureNo=function(){return this._$LP},$t.prototype._$ZL=function(){return this._$Qi},$t.prototype._$H2=function(){return this._$JP},$t.prototype.getNumPoints=function(){return this._$d0},$t.prototype.getType=function(){return W._$wb},$t.prototype._$B2=function(t,i,e){var r=i,o=null!=r._$hr?r._$hr:r._$Cr;switch(U._$do){default:case U._$Ms:throw new Error("_$L _$ro ");case U._$Qs:for(var n=this._$d0-1;n>=0;--n)o[n*U._$No+4]=e}},$t.prototype._$zP=function(){this._$GS=new D,this._$GS._$zP()},$t.prototype._$F0=function(t){W.prototype._$F0.call(this,t),this._$LP=t._$6L(),this._$d0=t._$6L(),this._$Yo=t._$6L();var i=t._$nP();this._$BP=new Int16Array(3*this._$Yo);for(var e=3*this._$Yo-1;e>=0;--e)this._$BP[e]=i[e];if(this._$Eo=t._$nP(),this._$Qi=t._$nP(),t.getFormatVersion()>=G._$s7){if(this._$JP=t._$6L(),0!=this._$JP){if(0!=(1&this._$JP)){var r=t._$6L();null==this._$5P&&(this._$5P=new Object),this._$5P._$Hb=parseInt(r)}0!=(this._$JP&$t._$Os)?this._$6s=(this._$JP&$t._$Os)>>1:this._$6s=$t._$ms,0!=(32&this._$JP)&&(this.culling=!1)}}else this._$JP=0},$t.prototype.init=function(t){var i=new ut(this),e=this._$d0*U._$No,r=this._$32();switch(null!=i._$Cr&&(i._$Cr=null),i._$Cr=new Float32Array(e),null!=i._$hr&&(i._$hr=null),i._$hr=r?new Float32Array(e):null,U._$do){default:case U._$Ms:if(U._$Ls)for(var o=this._$d0-1;o>=0;--o){var n=o<<1;this._$Qi[n+1]=1-this._$Qi[n+1]}break;case U._$Qs:for(var o=this._$d0-1;o>=0;--o){var n=o<<1,s=o*U._$No,_=this._$Qi[n],a=this._$Qi[n+1];i._$Cr[s]=_,i._$Cr[s+1]=a,i._$Cr[s+4]=0,r&&(i._$hr[s]=_,i._$hr[s+1]=a,i._$hr[s+4]=0)}}return i},$t.prototype._$Nr=function(t,i){var e=i;if(this!=e._$GT()&&console.log("### assert!! ### "),this._$GS._$Ur(t)&&(W.prototype._$Nr.call(this,t,e),!e._$IS[0])){var r=$t._$gT;r[0]=!1,v._$Vr(t,this._$GS,r,this._$d0,this._$Eo,e._$Cr,U._$i2,U._$No)}},$t.prototype._$2b=function(t,i){try{this!=i._$GT()&&console.log("### assert!! ### ");var e=!1;i._$IS[0]&&(e=!0);var r=i;if(!e&&(W.prototype._$2b.call(this,t),this._$32())){var o=this.getTargetBaseDataID();if(r._$8r==W._$ur&&(r._$8r=t.getBaseDataIndex(o)),r._$8r<0)at._$so&&_._$li("_$L _$0P _$G :: %s",o);else{var n=t.getBaseData(r._$8r),s=t._$q2(r._$8r);null==n||s._$x2()?r._$AT=!1:(n._$nb(t,s,r._$Cr,r._$hr,this._$d0,U._$i2,U._$No),r._$AT=!0),r.baseOpacity=s.getTotalOpacity()}}}catch(t){throw t}},$t.prototype.draw=function(t,i,e){if(this!=e._$GT()&&console.log("### assert!! ### "),!e._$IS[0]){var r=e,o=this._$LP;o<0&&(o=1);var n=this.getOpacity(i,r)*e._$VS*e.baseOpacity,s=null!=r._$hr?r._$hr:r._$Cr;t.setClipBufPre_clipContextForDraw(e.clipBufPre_clipContext),t._$WP(this.culling),t._$Uo(o,3*this._$Yo,this._$BP,s,this._$Qi,n,this._$6s,r)}},$t.prototype.dump=function(){console.log(" _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n",this._$LP,this._$d0,this._$Yo),console.log(" _$Oi _$di = { ");for(var t=0;tstartMotion() / start _$K _$3 (m%d)\n",r,e._$sr));if(null==t)return-1;e=new dt,e._$w0=t,this.motions.push(e);var n=e._$sr;return this._$eb&&_._$Ji("MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n",r,n),n},ct.prototype.updateParam=function(t){try{for(var i=!1,e=0;eupdateParam() / _$T0 _$w0 (m%d)\n",this.motions.length-1,r._$sr),this.motions.splice(e,1),e--)):(this.motions=this.motions.splice(e,1),e--)}else this.motions.splice(e,1),e--}return i}catch(t){return _._$li(t),!0}},ct.prototype.isFinished=function(t){if(arguments.length>=1){for(var i=0;i.9&&at.EXPAND_W,this.gl);if(null==this.gl)throw new Error("gl is null");var h=1*this._$C0*n,l=1*this._$tT*n,$=1*this._$WL*n,u=this._$lT*n;if(null!=this.clipBufPre_clipContextMask){a.frontFace(a.CCW),a.useProgram(this.shaderProgram),this._$vS=Tt(a,this._$vS,r),this._$no=Pt(a,this._$no,e),a.enableVertexAttribArray(this.a_position_Loc),a.vertexAttribPointer(this.a_position_Loc,2,a.FLOAT,!1,0,0),this._$NT=Tt(a,this._$NT,o),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this.textures[t]),a.uniform1i(this.s_texture0_Loc,1),a.enableVertexAttribArray(this.a_texCoord_Loc),a.vertexAttribPointer(this.a_texCoord_Loc,2,a.FLOAT,!1,0,0),a.uniformMatrix4fv(this.u_matrix_Loc,!1,this.getClipBufPre_clipContextMask().matrixForMask);var p=this.getClipBufPre_clipContextMask().layoutChannelNo,f=this.getChannelFlagAsColor(p);a.uniform4f(this.u_channelFlag,f.r,f.g,f.b,f.a);var c=this.getClipBufPre_clipContextMask().layoutBounds;a.uniform4f(this.u_baseColor_Loc,2*c.x-1,2*c.y-1,2*c._$EL()-1,2*c._$5T()-1),a.uniform1i(this.u_maskFlag_Loc,!0)}else if(null!=this.getClipBufPre_clipContextDraw()){a.useProgram(this.shaderProgramOff),this._$vS=Tt(a,this._$vS,r),this._$no=Pt(a,this._$no,e),a.enableVertexAttribArray(this.a_position_Loc_Off),a.vertexAttribPointer(this.a_position_Loc_Off,2,a.FLOAT,!1,0,0),this._$NT=Tt(a,this._$NT,o),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this.textures[t]),a.uniform1i(this.s_texture0_Loc_Off,1),a.enableVertexAttribArray(this.a_texCoord_Loc_Off),a.vertexAttribPointer(this.a_texCoord_Loc_Off,2,a.FLOAT,!1,0,0),a.uniformMatrix4fv(this.u_clipMatrix_Loc_Off,!1,this.getClipBufPre_clipContextDraw().matrixForDraw),a.uniformMatrix4fv(this.u_matrix_Loc_Off,!1,this.matrix4x4),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,at.fTexture[this.glno]),a.uniform1i(this.s_texture1_Loc_Off,2);var p=this.getClipBufPre_clipContextDraw().layoutChannelNo,f=this.getChannelFlagAsColor(p);a.uniform4f(this.u_channelFlag_Loc_Off,f.r,f.g,f.b,f.a),a.uniform4f(this.u_baseColor_Loc_Off,h,l,$,u)}else a.useProgram(this.shaderProgram),this._$vS=Tt(a,this._$vS,r),this._$no=Pt(a,this._$no,e),a.enableVertexAttribArray(this.a_position_Loc),a.vertexAttribPointer(this.a_position_Loc,2,a.FLOAT,!1,0,0),this._$NT=Tt(a,this._$NT,o),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this.textures[t]),a.uniform1i(this.s_texture0_Loc,1),a.enableVertexAttribArray(this.a_texCoord_Loc),a.vertexAttribPointer(this.a_texCoord_Loc,2,a.FLOAT,!1,0,0),a.uniformMatrix4fv(this.u_matrix_Loc,!1,this.matrix4x4),a.uniform4f(this.u_baseColor_Loc,h,l,$,u),a.uniform1i(this.u_maskFlag_Loc,!1);this.culling?this.gl.enable(a.CULL_FACE):this.gl.disable(a.CULL_FACE),this.gl.enable(a.BLEND);var d,g,y,m;if(null!=this.clipBufPre_clipContextMask)d=a.ONE,g=a.ONE_MINUS_SRC_ALPHA,y=a.ONE,m=a.ONE_MINUS_SRC_ALPHA;else switch(s){case $t._$ms:d=a.ONE,g=a.ONE_MINUS_SRC_ALPHA,y=a.ONE,m=a.ONE_MINUS_SRC_ALPHA;break;case $t._$ns:d=a.ONE,g=a.ONE,y=a.ZERO,m=a.ONE;break;case $t._$_s:d=a.DST_COLOR,g=a.ONE_MINUS_SRC_ALPHA,y=a.ZERO,m=a.ONE}a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(d,g,y,m),this.anisotropyExt&&a.texParameteri(a.TEXTURE_2D,this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT,this.maxAnisotropy);var T=e.length;a.drawElements(a.TRIANGLES,T,a.UNSIGNED_SHORT,0),a.bindTexture(a.TEXTURE_2D,null)}},mt.prototype._$Rs=function(){throw new Error("_$Rs")},mt.prototype._$Ds=function(t){throw new Error("_$Ds")},mt.prototype._$K2=function(){for(var t=0;t=48){var r=G._$9o(t);return null!=r?(r._$F0(this),r):null}switch(t){case 1:return this._$bT();case 10:return new n(this._$6L(),!0);case 11:return new S(this._$mP(),this._$mP(),this._$mP(),this._$mP());case 12:return new S(this._$_T(),this._$_T(),this._$_T(),this._$_T());case 13:return new L(this._$mP(),this._$mP());case 14:return new L(this._$_T(),this._$_T());case 15:for(var o=this._$3L(),e=new Array(o),s=0;s>7-this._$hL++&1)},St.prototype._$zT=function(){0!=this._$hL&&(this._$hL=0)},vt.prototype._$wP=function(t,i,e){for(var r=0;rMath.PI;)e-=2*Math.PI;return e},Lt._$9=function(t){return Math.sin(t)},Lt.fcos=function(t){return Math.cos(t)},Mt.prototype._$u2=function(){return this._$IS[0]},Mt.prototype._$yo=function(){return this._$AT&&!this._$IS[0]},Mt.prototype._$GT=function(){return this._$e0},Et._$W2=0,Et.SYSTEM_INFO=null,Et.USER_AGENT=navigator.userAgent,Et.isIPhone=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isIPhone},Et.isIOS=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isIPhone||Et.SYSTEM_INFO._isIPad},Et.isAndroid=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isAndroid},Et.getOSVersion=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO.version},Et.getOS=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isIPhone||Et.SYSTEM_INFO._isIPad?"iOS":Et.SYSTEM_INFO._isAndroid?"Android":"_$Q0 OS"},Et.setup=function(){function t(t,i){for(var e=t.substring(i).split(/[ _,;\.]/),r=0,o=0;o<=2&&!isNaN(e[o]);o++){var n=parseInt(e[o]);if(n<0||n>999){_._$li("err : "+n+" @UtHtml5.setup()"),r=0;break}r+=n*Math.pow(1e3,2-o)}return r}var i,e=Et.USER_AGENT,r=Et.SYSTEM_INFO={userAgent:e};if((i=e.indexOf("iPhone OS "))>=0)r.os="iPhone",r._isIPhone=!0,r.version=t(e,i+"iPhone OS ".length);else if((i=e.indexOf("iPad"))>=0){if((i=e.indexOf("CPU OS"))<0)return void _._$li(" err : "+e+" @UtHtml5.setup()");r.os="iPad",r._isIPad=!0,r.version=t(e,i+"CPU OS ".length)}else(i=e.indexOf("Android"))>=0?(r.os="Android",r._isAndroid=!0,r.version=t(e,i+"Android ".length)):(r.os="-",r.version=-1)},window.UtSystem=w,window.UtDebug=_,window.LDTransform=gt,window.LDGL=nt,window.Live2D=at,window.Live2DModelWebGL=ft,window.Live2DModelJS=q,window.Live2DMotion=J,window.MotionQueueManager=ct,window.PhysicsHair=f,window.AMotion=s,window.PartsDataID=l,window.DrawDataID=b,window.BaseDataID=yt,window.ParamID=u,at.init();var At=!1}()}).call(i,e(7))},function(t,i){t.exports={import:function(){throw new Error("System.import cannot be used indirectly")}}},function(t,i,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(){this.models=[],this.count=-1,this.reloadFlg=!1,Live2D.init(),n.Live2DFramework.setPlatformManager(new _.default)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=o;var n=e(0),s=e(9),_=r(s),a=e(10),h=r(a),l=e(1),$=r(l);o.prototype.createModel=function(){var t=new h.default;return this.models.push(t),t},o.prototype.changeModel=function(t,i){if(this.reloadFlg){this.reloadFlg=!1;this.releaseModel(0,t),this.createModel(),this.models[0].load(t,i)}},o.prototype.getModel=function(t){return t>=this.models.length?null:this.models[t]},o.prototype.releaseModel=function(t,i){this.models.length<=t||(this.models[t].release(i),delete this.models[t],this.models.splice(t,1))},o.prototype.numModels=function(){return this.models.length},o.prototype.setDrag=function(t,i){for(var e=0;e0){r.expressions={};for(var t=0;t { - console.log( - `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`, - ); - }, - }, - ); - - const scaleX = this.#app.view.height / model.width; - const scaleY = this.#app.view.height / model.height; - - model.scale.set(scaleX, scaleY); - this.#app.stage.removeChildren(); - this.#app.stage.addChild(model); - } - - /** - * 随机切换模型贴图 - */ - async loadRandTextures() { - const modelId = Number(localStorage.getItem("modelId")); - const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); - // 可选 "rand"(随机), "switch"(顺序) - const result = (await fetch( - `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`, - ).then((response) => response.json())) as ModelTexturesResult; - const texturesId = result.textures.id; - if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { - sendMessage("我还没有其他衣服呢!", 4000, 3); - return; - } - this.loadModel(modelId, texturesId, "我的新衣服好看嘛?"); - } - - /** - * 切换模型 - */ - async loadOtherModel() { - const modelId = Number(localStorage.getItem("modelId")); - const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( - (response) => response.json(), - )) as ModelResult; - this.loadModel(result.model.id, 0, result.model.message); - } - - /** - * 截图 - * @param screenshotName 截图名称 - */ - async capture(screenshotName: string) { - this.#app.renderer.plugins.extract - .canvas(this.#app.stage) - .toBlob((blob: Blob) => { - const url = URL.createObjectURL(blob); - const a = document.createElement("a"); - a.href = url; - a.download = `${screenshotName}.png`; - a.click(); - URL.revokeObjectURL(url); - a.remove(); - }); - } + #apiPath: string; + #config: Live2dConfig; + #live2dRootElement: HTMLCanvasElement; + #app?: PIXI.Application; + #appPromise: Promise; + #currentModel: Live2DModel | null = null; + #loadSequence = 0; + + private constructor(root: HTMLCanvasElement, config: Live2dConfig) { + const apiPath = config.apiPath; + if (!isNotEmptyString(apiPath)) { + throw new Error("Invalid initWidget argument!"); + } + + this.#apiPath = apiPath.endsWith("/") ? apiPath : `${apiPath}/`; + this.#config = config; + this.#live2dRootElement = root; + this.#appPromise = this.initializeApplication(); + } + + static async create( + root: HTMLCanvasElement, + config: Live2dConfig, + ): Promise { + const model = new Model(root, config); + await model._loadingModel(); + return model; + } + + private async initializeApplication(): Promise { + const app = new PIXI.Application(); + await app.init({ + canvas: this.#live2dRootElement, + autoStart: true, + height: LIVE2D_CANVAS_SIZE, + width: LIVE2D_CANVAS_SIZE, + autoDensity: true, + resolution: window.devicePixelRatio || 1, + backgroundColor: 0x00000000, + backgroundAlpha: 0, + preference: "webgl", + }); + + this.#app = app; + return app; + } + + private async getApp(): Promise { + if (this.#app) { + return this.#app; + } + + return this.#appPromise; + } + + private async _loadingModel() { + let modelId = localStorage.getItem("modelId"); + let modelTexturesId = localStorage.getItem("modelTexturesId"); + if (modelId === null || !!this.#config.isForceUseDefaultConfig) { + // 加载指定模型的指定材质 + modelId = String(this.#config.modelId || 1); // 模型 ID + modelTexturesId = String(this.#config.modelTexturesId || 53); // 材质 ID + } + await this.loadModel( + Number(modelId), + Number(modelTexturesId), + "Live2D 模型加载中...", + ); + } + + private async replaceModel(nextModel: Live2DModel): Promise { + const app = await this.getApp(); + const modelWidth = nextModel.internalModel.width || nextModel.width; + const modelHeight = nextModel.internalModel.height || nextModel.height; + const scale = Math.min( + app.screen.width / modelWidth, + app.screen.height / modelHeight, + ); + + nextModel.anchor.set(0.5, 1); + nextModel.scale.set(scale * LIVE2D_MODEL_PADDING); + nextModel.position.set( + app.screen.width / 2, + app.screen.height * LIVE2D_BOTTOM_OFFSET, + ); + + if (this.#currentModel) { + app.stage.removeChild(this.#currentModel); + this.#currentModel.destroy(); + } + + app.stage.removeChildren(); + app.stage.addChild(nextModel); + this.#currentModel = nextModel; + } + + /** + * 为 Live2d 加载模型。 + * + * @param modelId 模型编号 + * @param modelTexturesId 纹理编号 + * @param text 加载时的消息 + */ + async loadModel(modelId: number, modelTexturesId: number, text?: string) { + const app = await this.getApp(); + const loadSequence = ++this.#loadSequence; + + localStorage.setItem("modelId", String(modelId)); + localStorage.setItem("modelTexturesId", String(modelTexturesId)); + + // 发送消息事件 + if (text) { + sendMessage(text, 4000, 3); + } + const model = await Live2DModel.from( + `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, + { + ticker: app.ticker, + autoFocus: false, + autoHitTest: false, + autoInteract: false, + onLoad: () => { + if (this.#config.consoleShowStatus) { + console.log( + `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`, + ); + } + }, + }, + ); + + if (loadSequence !== this.#loadSequence) { + model.destroy(); + return; + } + + await this.replaceModel(model); + } + + /** + * 随机切换模型贴图 + */ + async loadRandTextures() { + const modelId = Number(localStorage.getItem("modelId")); + const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); + // 可选 "rand"(随机), "switch"(顺序) + const result = (await fetch( + `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`, + ).then((response) => response.json())) as ModelTexturesResult; + const texturesId = result.textures.id; + if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { + sendMessage("我还没有其他衣服呢!", 4000, 3); + return; + } + await this.loadModel(modelId, texturesId, "我的新衣服好看嘛?"); + } + + /** + * 切换模型 + */ + async loadOtherModel() { + const modelId = Number(localStorage.getItem("modelId")); + const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( + (response) => response.json(), + )) as ModelResult; + await this.loadModel(result.model.id, 0, result.model.message); + } + + /** + * 截图 + * @param screenshotName 截图名称 + */ + async capture(screenshotName: string) { + const app = await this.getApp(); + const canvas = app.renderer.extract.canvas(this.#currentModel ?? app.stage); + const toBlob = canvas.toBlob?.bind(canvas); + + if (!toBlob) { + throw new Error( + "Canvas blob export is not supported in this environment.", + ); + } + + await new Promise((resolve, reject) => { + toBlob((blob) => { + if (!blob) { + reject(new Error("Failed to capture Live2D screenshot.")); + return; + } + + const url = URL.createObjectURL(blob); + const a = document.createElement("a"); + a.href = url; + a.download = `${screenshotName}.png`; + a.click(); + URL.revokeObjectURL(url); + a.remove(); + resolve(); + }); + }); + } + + destroy(): void { + if (this.#currentModel && this.#app) { + this.#app.stage.removeChild(this.#currentModel); + this.#currentModel.destroy(); + this.#currentModel = null; + } + + this.#app?.destroy(false, { + children: true, + texture: true, + textureSource: true, + context: true, + }); + this.#app = undefined; + } } export default Model; diff --git a/packages/live2d/src/live2d/runtime.ts b/packages/live2d/src/live2d/runtime.ts new file mode 100644 index 0000000..c7fab24 --- /dev/null +++ b/packages/live2d/src/live2d/runtime.ts @@ -0,0 +1,51 @@ +import type { Live2dContext } from "@/live2d/components/Live2dContext"; +import { + type LegacyLive2dConfigInput, + normalizeLive2dConfig, +} from "@/live2d/config/normalize-config"; +import "@/live2d/components/Live2dContext"; + +const LIVE2D_CONTEXT_ID = "plugin-live2d-root"; + +declare global { + interface Window { + live2d?: Live2dRuntime; + } +} + +export class Live2dRuntime { + private rootElement?: Live2dContext; + + init(path: string, config: LegacyLive2dConfigInput = {}): void { + if (window.screen.width < 768) { + return; + } + + const rootElement = this.getOrCreateRoot(); + rootElement.config = normalizeLive2dConfig(path, config); + } + + private getOrCreateRoot(): Live2dContext { + if (this.rootElement?.isConnected) { + return this.rootElement; + } + + const existingRoot = document.getElementById( + LIVE2D_CONTEXT_ID, + ) as Live2dContext | null; + if (existingRoot) { + this.rootElement = existingRoot; + return existingRoot; + } + + const rootElement = document.createElement( + "live2d-context", + ) as Live2dContext; + rootElement.id = LIVE2D_CONTEXT_ID; + document.body.append(rootElement); + this.rootElement = rootElement; + return rootElement; + } +} + +export const createLive2d = (): Live2dRuntime => new Live2dRuntime(); diff --git a/packages/live2d/src/live2d/tools/ai-chat.ts b/packages/live2d/src/live2d/tools/ai-chat.ts index 06f2f85..41bb1c2 100644 --- a/packages/live2d/src/live2d/tools/ai-chat.ts +++ b/packages/live2d/src/live2d/tools/ai-chat.ts @@ -1,6 +1,6 @@ import { ToggleChatWindowEvent } from "@/live2d/events/toggle-chat-window"; -import { isNotEmptyString } from "@/live2d/utils/isString"; import { Tool } from "@/live2d/live2d/tools/tools"; +import { isNotEmptyString } from "@/live2d/utils/isString"; /** * AI 聊天工具 diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index b409396..5d8737f 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -1,55 +1,55 @@ import type { Live2dConfig } from "@/live2d/context/config-context"; import type Model from "@/live2d/live2d/model"; -import { isNotEmptyString } from "@/live2d/utils/isString"; import { Tool } from "@/live2d/live2d/tools/tools"; +import { isNotEmptyString } from "@/live2d/utils/isString"; export type CustomToolConfig = { - name: string; - icon?: string; - priority?: number; - execute: ((config: Live2dConfig) => void) | string; + name: string; + icon?: string; + priority?: number; + execute: ((config: Live2dConfig) => void) | string; }; /** * 自定义工具 */ export class CustomTool extends Tool { - priority: number; - _name: string; - _icon?: string; - _execute: ((config: Live2dConfig) => void) | string; + priority: number; + _name: string; + _icon?: string; + _execute: ((config: Live2dConfig) => void) | string; - constructor( - config: Live2dConfig, - { name, icon, execute, priority }: CustomToolConfig, - model?: Model | null - ) { - super(config, model); - this._name = name; - this._icon = icon; - this._execute = execute; - this.priority = priority || 0; - } + constructor( + config: Live2dConfig, + { name, icon, execute, priority }: CustomToolConfig, + model?: Model | null, + ) { + super(config, model); + this._name = name; + this._icon = icon; + this._execute = execute; + this.priority = priority || 0; + } - name() { - return this._name; - } + name() { + return this._name; + } - icon() { - const icon = this._icon; - return isNotEmptyString(icon) ? icon : "ph-question-fill"; - } + icon() { + const icon = this._icon; + return isNotEmptyString(icon) ? icon : "ph-question-fill"; + } - execute() { - if (typeof this._execute === "string") { - const customClass = new Function(` + execute() { + if (typeof this._execute === "string") { + const customClass = new Function(` return class { ${this._execute} } `)(); - new customClass().execute.bind(this)(this.getConfig()); - return; - } - this._execute.bind(this)(this.getConfig()); - } + new customClass().execute.bind(this)(this.getConfig()); + return; + } + this._execute.bind(this)(this.getConfig()); + } } diff --git a/packages/live2d/src/live2d/tools/exit.ts b/packages/live2d/src/live2d/tools/exit.ts index ea538ec..c70f3e6 100644 --- a/packages/live2d/src/live2d/tools/exit.ts +++ b/packages/live2d/src/live2d/tools/exit.ts @@ -1,28 +1,28 @@ import { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; import { sendMessage } from "@/live2d/helpers/sendMessage"; -import { isNotEmptyString } from "@/live2d/utils/isString"; import { Tool } from "@/live2d/live2d/tools/tools"; +import { isNotEmptyString } from "@/live2d/utils/isString"; /** * 退出 Live2d 工具 */ export class ExitTool extends Tool { - priority = 10; + priority = 10; - icon() { - const icon = this.getConfig().exitIcon; - return isNotEmptyString(icon) ? icon : "ph-x-bold"; - } + icon() { + const icon = this.getConfig().exitIcon; + return isNotEmptyString(icon) ? icon : "ph-x-bold"; + } - name(): string { - return "quit"; - } + name(): string { + return "quit"; + } - execute() { - sendMessage("愿你有一天能与重要的人重逢。", 2000, 4); - setTimeout(() => { - // 触发退出 Live2d 事件 - window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); - }, 3000); - } + execute() { + sendMessage("愿你有一天能与重要的人重逢。", 2000, 4); + setTimeout(() => { + // 触发退出 Live2d 事件 + window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); + }, 3000); + } } diff --git a/packages/live2d/src/live2d/tools/hitokoto.ts b/packages/live2d/src/live2d/tools/hitokoto.ts index 8d6ae1c..9c61012 100644 --- a/packages/live2d/src/live2d/tools/hitokoto.ts +++ b/packages/live2d/src/live2d/tools/hitokoto.ts @@ -1,7 +1,7 @@ -import queryString from "query-string"; import { sendMessage } from "@/live2d/helpers/sendMessage"; -import { isNotEmptyString } from "@/live2d/utils/isString"; import { Tool } from "@/live2d/live2d/tools/tools"; +import { isNotEmptyString } from "@/live2d/utils/isString"; +import queryString from "query-string"; /** * 一言工具,使用一言接口获取一句话 diff --git a/packages/live2d/src/live2d/tools/index.ts b/packages/live2d/src/live2d/tools/index.ts index 915c5a9..5ab7ca3 100644 --- a/packages/live2d/src/live2d/tools/index.ts +++ b/packages/live2d/src/live2d/tools/index.ts @@ -1,5 +1,7 @@ +import { DEFAULT_TOOL_NAMES } from "@/live2d/config/default-config"; import type { Live2dConfig } from "@/live2d/context/config-context"; import type Model from "@/live2d/live2d/model"; +import type { Tool } from "@/live2d/live2d/tools/tools"; import { AIChatTool } from "./ai-chat"; import { AsteroidsTool } from "./asteroids"; import { ExitTool } from "./exit"; @@ -8,22 +10,27 @@ import { InfoTool } from "./info"; import { ScreenshotTool } from "./screenshot"; import { SwitchModelTool } from "./switch-model"; import { SwitchTextureTool } from "./switch-texture"; -import type { Tool } from "@/live2d/live2d/tools/tools"; export type ToolConstructor = new ( config: Live2dConfig, - model?: Model | null + model?: Model | null, ) => Tool; -export const presetTools: ToolConstructor[] = [ - AsteroidsTool, - AIChatTool, - HitokotoTool, - ExitTool, - InfoTool, - ScreenshotTool, - SwitchModelTool, - SwitchTextureTool, -]; +export const toolRegistry: Record = { + asteroids: AsteroidsTool, + chat: AIChatTool, + openai: AIChatTool, + hitokoto: HitokotoTool, + quit: ExitTool, + info: InfoTool, + photo: ScreenshotTool, + screenshot: ScreenshotTool, + "switch-model": SwitchModelTool, + "switch-texture": SwitchTextureTool, +}; + +export const defaultToolNames = [...DEFAULT_TOOL_NAMES]; + +export const presetTools = Array.from(new Set(Object.values(toolRegistry))); export default presetTools; diff --git a/packages/live2d/src/live2d/tools/info.ts b/packages/live2d/src/live2d/tools/info.ts index 7a08345..ff6df68 100644 --- a/packages/live2d/src/live2d/tools/info.ts +++ b/packages/live2d/src/live2d/tools/info.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from '../../utils/isString'; -import { Tool } from './tools'; +import { isNotEmptyString } from "../../utils/isString"; +import { Tool } from "./tools"; /** * 前往站点工具 @@ -13,12 +13,12 @@ export class InfoTool extends Tool { icon() { const icon = this.getConfig().infoIcon; - return isNotEmptyString(icon) ? icon : 'ph-info-fill'; + return isNotEmptyString(icon) ? icon : "ph-info-fill"; } execute() { const siteUrl = - this.getConfig().infoSite || 'https://github.com/LIlGG/plugin-live2d'; + this.getConfig().infoSite || "https://github.com/LIlGG/plugin-live2d"; window.open(siteUrl); } } diff --git a/packages/live2d/src/live2d/tools/switch-texture.ts b/packages/live2d/src/live2d/tools/switch-texture.ts index ea89ede..8654c83 100644 --- a/packages/live2d/src/live2d/tools/switch-texture.ts +++ b/packages/live2d/src/live2d/tools/switch-texture.ts @@ -1,5 +1,5 @@ -import { isNotEmptyString } from "@/live2d/utils/isString"; import { Tool } from "@/live2d/live2d/tools/tools"; +import { isNotEmptyString } from "@/live2d/utils/isString"; /** * 切换纹理工具 diff --git a/packages/live2d/src/styles/unocss.global.css b/packages/live2d/src/styles/unocss.global.css index d76ae77..4612250 100644 --- a/packages/live2d/src/styles/unocss.global.css +++ b/packages/live2d/src/styles/unocss.global.css @@ -1 +1 @@ -@unocss \ No newline at end of file +@unocss; diff --git a/packages/live2d/src/utils/isNotEmpty.ts b/packages/live2d/src/utils/isNotEmpty.ts index 84c4423..851e8bf 100644 --- a/packages/live2d/src/utils/isNotEmpty.ts +++ b/packages/live2d/src/utils/isNotEmpty.ts @@ -6,8 +6,8 @@ export const isNotEmpty = ( value !== undefined && (Array.isArray(value) ? value.length > 0 - : typeof value === 'string' - ? value.trim() !== '' + : typeof value === "string" + ? value.trim() !== "" : true) ); }; diff --git a/packages/live2d/src/utils/isString.ts b/packages/live2d/src/utils/isString.ts index 1d39762..7503c5a 100644 --- a/packages/live2d/src/utils/isString.ts +++ b/packages/live2d/src/utils/isString.ts @@ -1,7 +1,7 @@ export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === "string"; }; export const isNotEmptyString = (value: unknown): value is string => { - return typeof value === 'string' && value.length > 0; + return typeof value === "string" && value.length > 0; }; diff --git a/packages/live2d/src/utils/unoMixin.ts b/packages/live2d/src/utils/unoMixin.ts index 8a0add3..607a8a8 100644 --- a/packages/live2d/src/utils/unoMixin.ts +++ b/packages/live2d/src/utils/unoMixin.ts @@ -1,6 +1,6 @@ -import { type LitElement, adoptStyles, unsafeCSS } from "lit"; // @ts-ignore import style from "@/live2d/styles/unocss.global.css?inline"; +import { type LitElement, adoptStyles, unsafeCSS } from "lit"; declare global { // biome-ignore lint/suspicious/noExplicitAny: any is needed to define a mixin diff --git a/packages/live2d/src/utils/util.ts b/packages/live2d/src/utils/util.ts index 19a17da..ed3f673 100644 --- a/packages/live2d/src/utils/util.ts +++ b/packages/live2d/src/utils/util.ts @@ -1,8 +1,9 @@ -export const hasWebsiteHome = location.hostname === '/'; +export const hasWebsiteHome = + location.pathname === "/" || location.pathname === "/index.html"; -export const documentTitle = document.title.split(' - ')[0]; +export const documentTitle = document.title.split(" - ")[0]; -export const isReferrer = document.referrer === ''; +export const isReferrer = document.referrer === ""; export const getReferrer = () => { if (isReferrer) { @@ -13,13 +14,13 @@ export const getReferrer = () => { export const getReferrerDomain = () => { const Domains: Record = { - baidu: '百度', - so: '360搜索', - google: '谷歌搜索', - bing: '必应', - yahoo: '雅虎', - sogou: '搜狗', - haosou: '好搜', + baidu: "百度", + so: "360搜索", + google: "谷歌搜索", + bing: "必应", + yahoo: "雅虎", + sogou: "搜狗", + haosou: "好搜", }; const referrer = getReferrer(); if (!referrer) { @@ -29,7 +30,7 @@ export const getReferrerDomain = () => { if (location.hostname === hostname) { return; } - const domain = hostname.split('.')[1]; + const domain = hostname.split(".")[1]; if (Domains[domain]) { return Domains[domain]; } diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 3a85210..0420cd7 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "@/live2d/*": ["./src/*"], + "@/live2d/*": ["./src/*"] }, "lib": ["ES2020", "DOM", "DOM.Iterable"], "jsx": "react-jsx", diff --git a/packages/live2d/tsconfig.tsbuildinfo b/packages/live2d/tsconfig.tsbuildinfo index 7049d32..7f1c4be 100644 --- a/packages/live2d/tsconfig.tsbuildinfo +++ b/packages/live2d/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/send-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/types.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/live2d/model.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/styles/unocss.global.css.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"errors":true,"version":"5.7.3"} \ No newline at end of file +{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/api/chat-api.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dchatwindow.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/config/default-config.ts","./src/config/normalize-config.ts","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/model-ready.ts","./src/events/send-message.ts","./src/events/stream-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/toggle-chat-window.ts","./src/events/types.ts","./src/helpers/createstreammessage.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/live2d/model.ts","./src/live2d/runtime.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/styles/unocss.global.css.d.ts","./src/types/assets.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"version":"5.7.3"} \ No newline at end of file diff --git a/packages/live2d/uno.config.ts b/packages/live2d/uno.config.ts index 9c4dedf..a51cee2 100644 --- a/packages/live2d/uno.config.ts +++ b/packages/live2d/uno.config.ts @@ -1,42 +1,42 @@ -import { defineConfig, presetUno, transformerDirectives } from 'unocss'; +import { defineConfig, presetUno, transformerDirectives } from "unocss"; export default defineConfig({ content: { - filesystem: ['src/**/*.{html,ts,js,tsx,jsx}'], + filesystem: ["src/**/*.{html,ts,js,tsx,jsx}"], }, presets: [presetUno()], transformers: [transformerDirectives()], rules: [ [ - 'writing-vertical-rl', + "writing-vertical-rl", { - 'writing-mode': 'vertical-rl', + "writing-mode": "vertical-rl", }, ], ], theme: { backgroundColor: { - tips: 'rgba(236, 217, 188, .5)', + tips: "rgba(236, 217, 188, .5)", }, borderColor: { - tips: 'rgba(224, 186, 140, .62)', + tips: "rgba(224, 186, 140, .62)", }, boxShadow: { - tips: '0 3px 15px 2px rgba(191, 158, 118, .2)', + tips: "0 3px 15px 2px rgba(191, 158, 118, .2)", }, animation: { keyframes: { shake: - '{2%{transform:translate(.5px,-1.5px) rotate(-.5deg);}4%{transform:translate(.5px,1.5px) rotate(1.5deg);}6%{transform:translate(1.5px,1.5px) rotate(1.5deg);}8%{transform:translate(2.5px,1.5px) rotate(.5deg);}10%{transform:translate(.5px,2.5px) rotate(.5deg);}12%{transform:translate(1.5px,1.5px) rotate(.5deg);}14%{transform:translate(.5px,.5px) rotate(.5deg);}16%{transform:translate(-1.5px,-.5px) rotate(1.5deg);}18%{transform:translate(.5px,.5px) rotate(1.5deg);}20%{transform:translate(2.5px,2.5px) rotate(1.5deg);}22%{transform:translate(.5px,-1.5px) rotate(1.5deg);}24%{transform:translate(-1.5px,1.5px) rotate(-.5deg);}26%{transform:translate(1.5px,.5px) rotate(1.5deg);}28%{transform:translate(-.5px,-.5px) rotate(-.5deg);}30%{transform:translate(1.5px,-.5px) rotate(-.5deg);}32%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}34%{transform:translate(2.5px,2.5px) rotate(-.5deg);}36%{transform:translate(.5px,-1.5px) rotate(.5deg);}38%{transform:translate(2.5px,-.5px) rotate(-.5deg);}40%{transform:translate(-.5px,2.5px) rotate(.5deg);}42%{transform:translate(-1.5px,2.5px) rotate(.5deg);}44%{transform:translate(-1.5px,1.5px) rotate(.5deg);}46%{transform:translate(1.5px,-.5px) rotate(-.5deg);}48%{transform:translate(2.5px,-.5px) rotate(.5deg);}50%{transform:translate(-1.5px,1.5px) rotate(.5deg);}52%{transform:translate(-.5px,1.5px) rotate(.5deg);}54%{transform:translate(-1.5px,1.5px) rotate(.5deg);}56%{transform:translate(.5px,2.5px) rotate(1.5deg);}58%{transform:translate(2.5px,2.5px) rotate(.5deg);}60%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}62%{transform:translate(-1.5px,.5px) rotate(1.5deg);}64%{transform:translate(-1.5px,1.5px) rotate(1.5deg);}66%{transform:translate(.5px,2.5px) rotate(1.5deg);}68%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}70%{transform:translate(2.5px,2.5px) rotate(.5deg);}72%{transform:translate(-.5px,-1.5px) rotate(1.5deg);}74%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}76%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}78%{transform:translate(-1.5px,2.5px) rotate(.5deg);}80%{transform:translate(-1.5px,.5px) rotate(-.5deg);}82%{transform:translate(-1.5px,.5px) rotate(-.5deg);}84%{transform:translate(-.5px,.5px) rotate(1.5deg);}86%{transform:translate(2.5px,1.5px) rotate(.5deg);}88%{transform:translate(-1.5px,.5px) rotate(1.5deg);}90%{transform:translate(-1.5px,-.5px) rotate(-.5deg);}92%{transform:translate(-1.5px,-1.5px) rotate(1.5deg);}94%{transform:translate(.5px,.5px) rotate(-.5deg);}96%{transform:translate(2.5px,-.5px) rotate(-.5deg);}98%{transform:translate(-1.5px,-1.5px) rotate(-.5deg);}0%,100%{transform:translate(0,0) rotate(0);}}', + "{2%{transform:translate(.5px,-1.5px) rotate(-.5deg);}4%{transform:translate(.5px,1.5px) rotate(1.5deg);}6%{transform:translate(1.5px,1.5px) rotate(1.5deg);}8%{transform:translate(2.5px,1.5px) rotate(.5deg);}10%{transform:translate(.5px,2.5px) rotate(.5deg);}12%{transform:translate(1.5px,1.5px) rotate(.5deg);}14%{transform:translate(.5px,.5px) rotate(.5deg);}16%{transform:translate(-1.5px,-.5px) rotate(1.5deg);}18%{transform:translate(.5px,.5px) rotate(1.5deg);}20%{transform:translate(2.5px,2.5px) rotate(1.5deg);}22%{transform:translate(.5px,-1.5px) rotate(1.5deg);}24%{transform:translate(-1.5px,1.5px) rotate(-.5deg);}26%{transform:translate(1.5px,.5px) rotate(1.5deg);}28%{transform:translate(-.5px,-.5px) rotate(-.5deg);}30%{transform:translate(1.5px,-.5px) rotate(-.5deg);}32%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}34%{transform:translate(2.5px,2.5px) rotate(-.5deg);}36%{transform:translate(.5px,-1.5px) rotate(.5deg);}38%{transform:translate(2.5px,-.5px) rotate(-.5deg);}40%{transform:translate(-.5px,2.5px) rotate(.5deg);}42%{transform:translate(-1.5px,2.5px) rotate(.5deg);}44%{transform:translate(-1.5px,1.5px) rotate(.5deg);}46%{transform:translate(1.5px,-.5px) rotate(-.5deg);}48%{transform:translate(2.5px,-.5px) rotate(.5deg);}50%{transform:translate(-1.5px,1.5px) rotate(.5deg);}52%{transform:translate(-.5px,1.5px) rotate(.5deg);}54%{transform:translate(-1.5px,1.5px) rotate(.5deg);}56%{transform:translate(.5px,2.5px) rotate(1.5deg);}58%{transform:translate(2.5px,2.5px) rotate(.5deg);}60%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}62%{transform:translate(-1.5px,.5px) rotate(1.5deg);}64%{transform:translate(-1.5px,1.5px) rotate(1.5deg);}66%{transform:translate(.5px,2.5px) rotate(1.5deg);}68%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}70%{transform:translate(2.5px,2.5px) rotate(.5deg);}72%{transform:translate(-.5px,-1.5px) rotate(1.5deg);}74%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}76%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}78%{transform:translate(-1.5px,2.5px) rotate(.5deg);}80%{transform:translate(-1.5px,.5px) rotate(-.5deg);}82%{transform:translate(-1.5px,.5px) rotate(-.5deg);}84%{transform:translate(-.5px,.5px) rotate(1.5deg);}86%{transform:translate(2.5px,1.5px) rotate(.5deg);}88%{transform:translate(-1.5px,.5px) rotate(1.5deg);}90%{transform:translate(-1.5px,-.5px) rotate(-.5deg);}92%{transform:translate(-1.5px,-1.5px) rotate(1.5deg);}94%{transform:translate(.5px,.5px) rotate(-.5deg);}96%{transform:translate(2.5px,-.5px) rotate(-.5deg);}98%{transform:translate(-1.5px,-1.5px) rotate(-.5deg);}0%,100%{transform:translate(0,0) rotate(0);}}", }, durations: { - shake: '50s', + shake: "50s", }, timingFns: { - shake: 'ease-in-out', + shake: "ease-in-out", }, counts: { - shake: 'infinite', + shake: "infinite", }, }, }, diff --git a/packages/live2d/vite.config.ts b/packages/live2d/vite.config.ts index cef5380..8a0b7be 100644 --- a/packages/live2d/vite.config.ts +++ b/packages/live2d/vite.config.ts @@ -1,14 +1,14 @@ -import { resolve } from 'node:path'; -import react from '@vitejs/plugin-react'; -import { defineConfig } from 'vite'; -import tsconfigPaths from 'vite-tsconfig-paths'; +import { resolve } from "node:path"; +import react from "@vitejs/plugin-react"; +import { defineConfig } from "vite"; +import tsconfigPaths from "vite-tsconfig-paths"; export default defineConfig({ plugins: [ react({ babel: { parserOpts: { - plugins: ['decorators-legacy'], + plugins: ["decorators-legacy"], }, }, }), @@ -17,12 +17,12 @@ export default defineConfig({ build: { lib: { - entry: resolve(__dirname, 'src/index.ts'), - name: 'Live2d', - fileName: 'live2d', + entry: resolve(__dirname, "src/index.ts"), + name: "Live2d", + fileName: "live2d", }, rollupOptions: { - external: ['react', 'react-dom'], + external: ["react", "react-dom"], }, }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b33cb46..db7090e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,18 +23,18 @@ importers: '@lit/react': specifier: ^1.0.7 version: 1.0.7(@types/react@19.0.8) + '@pixi/sound': + specifier: ^6.0.1 + version: 6.0.1(pixi.js@8.18.1) iconify-icon: specifier: ^2.3.0 version: 2.3.0 lit: specifier: ^3.2.1 version: 3.2.1 - pixi-live2d-display: - specifier: ^0.4.0 - version: 0.4.0(76g3zz2nt7dtjnktvdvk76m2oe) pixi.js: - specifier: ^6.5.2 - version: 6.5.10 + specifier: ^8.13.1 + version: 8.18.1 query-string: specifier: ^9.1.1 version: 9.1.1 @@ -44,6 +44,9 @@ importers: react-dom: specifier: ^19.0.0 version: 19.0.0(react@19.0.0) + untitled-pixi-live2d-engine: + specifier: ^1.1.0 + version: 1.1.0(@pixi/sound@6.0.1(pixi.js@8.18.1))(pixi.js@8.18.1) devDependencies: '@types/react': specifier: ^19.0.0 @@ -62,7 +65,7 @@ importers: version: 2.0.2 unocss: specifier: ^65.4.3 - version: 65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + version: 65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1)))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) vite: specifier: ^6.1.0 version: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) @@ -565,266 +568,13 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@pixi/accessibility@6.5.10': - resolution: {integrity: sha512-URrI1H+1kjjHSyhY1QXcUZ8S3omdVTrXg5y0gndtpOhIelErBTC9NWjJfw6s0Rlmv5+x5VAitQTgw9mRiatDgw==} - peerDependencies: - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/app@6.5.10': - resolution: {integrity: sha512-VsNHLajZ5Dbc/Zrj7iWmIl3eu6Fec+afjW/NXXezD8Sp3nTDF0bv5F+GDgN/zSc2gqIvPHyundImT7hQGBDghg==} - peerDependencies: - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/compressed-textures@6.5.10': - resolution: {integrity: sha512-41NT5mkfam47DrkB8xMp3HUZDt7139JMB6rVNOmb3u2vm+2mdy9tzi5s9nN7bG9xgXlchxcFzytTURk+jwXVJA==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/loaders': 6.5.10 - '@pixi/settings': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/constants@6.5.10': - resolution: {integrity: sha512-PUF2Y9YISRu5eVrVVHhHCWpc/KmxQTg3UH8rIUs8UI9dCK41/wsPd3pEahzf7H47v7x1HCohVZcFO3XQc1bUDw==} - - '@pixi/core@6.5.10': - resolution: {integrity: sha512-Gdzp5ENypyglvsh5Gv3teUZnZnmizo4xOsL+QqmWALdFlJXJwLJMVhKVThV/q/095XR6i4Ou54oshn+m4EkuFw==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/extensions': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/runner': 6.5.10 - '@pixi/settings': 6.5.10 - '@pixi/ticker': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/display@6.5.10': - resolution: {integrity: sha512-NxFdDDxlbH5fQkzGHraLGoTMucW9pVgXqQm13TSmkA3NWIi/SItHL4qT2SI8nmclT9Vid1VDEBCJFAbdeuQw1Q==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/settings': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/extensions@6.5.10': - resolution: {integrity: sha512-EIUGza+E+sCy3dupuIjvRK/WyVyfSzHb5XsxRaxNrPwvG1iIUIqNqZ3owLYCo4h17fJWrj/yXVufNNtUKQccWQ==} - - '@pixi/extract@6.5.10': - resolution: {integrity: sha512-hXFIc4EGs14GFfXAjT1+6mzopzCMWeXeai38/Yod3vuBXkkp8+ksen6kE09vTnB9l1IpcIaCM+XZEokuqoGX2A==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/filter-alpha@6.5.10': - resolution: {integrity: sha512-GWHLJvY0QOIDRjVx0hdUff6nl/PePQg84i8XXPmANrvA+gJ/eSRTQRmQcdgInQfawENADB/oRqpcCct6IAcKpQ==} - peerDependencies: - '@pixi/core': 6.5.10 - - '@pixi/filter-blur@6.5.10': - resolution: {integrity: sha512-LJsRocVOdM9hTzZKjP+jmkfoL1nrJi5XpR0ItgRN8fflOC7A7Ln4iPe7nukbbq3H7QhZSunbygMubbO6xhThZw==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/settings': 6.5.10 - - '@pixi/filter-color-matrix@6.5.10': - resolution: {integrity: sha512-C2S44/EoWTrhqedLWOZTq9GZV5loEq1+MhyK9AUzEubWGMHhou1Juhn2mRZ7R6flKPCRQNKrXpStUwCAouud3Q==} - peerDependencies: - '@pixi/core': 6.5.10 - - '@pixi/filter-displacement@6.5.10': - resolution: {integrity: sha512-fbblMYyPX/hO3Tpoaa4tOBYxqp4TxjNrz6xyt15tKSVxWQElk+Tx98GJ+aaBoiHOKt8ezzHplStWoHG++JIv/w==} - peerDependencies: - '@pixi/core': 6.5.10 - '@pixi/math': 6.5.10 - - '@pixi/filter-fxaa@6.5.10': - resolution: {integrity: sha512-wbHL9UtY3g7jTyvO8JaZks6DqV8AO5c96Hfu0zfndWBPs79Ul6/sq3LD2eE+yq5vK5T2R9Sr4s54ls1JT3Sppg==} - peerDependencies: - '@pixi/core': 6.5.10 - - '@pixi/filter-noise@6.5.10': - resolution: {integrity: sha512-CX+/06NVaw3HsjipZVb7aemkca0TC8I6qfKI4lx2ugxS/6G6zkY5zqd8+nVSXW4DpUXB6eT0emwfRv6N00NvuA==} - peerDependencies: - '@pixi/core': 6.5.10 - - '@pixi/graphics@6.5.10': - resolution: {integrity: sha512-KPHGJ910fi8bRQQ+VcTIgrK+bKIm8yAQaZKPqMtm14HzHPGcES6HkgeNY1sd7m8J4aS9btm5wOSyFu0p5IzTpA==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/sprite': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/interaction@6.5.10': - resolution: {integrity: sha512-v809pJmXA2B9dV/vdrDMUqJT+fBB/ARZli2YRmI2dPbEbkaYr8FNmxCAJnwT8o+ymTx044Ie820hn9tVrtMtfA==} - peerDependencies: - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/ticker': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/loaders@6.5.10': - resolution: {integrity: sha512-AuK7mXBmyVsDFL9DDFPB8sqP8fwQ2NOktvu98bQuJl0/p/UeK/0OAQnF3wcf3FeBv5YGXfNHL21c2DCisjKfTg==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/math@6.5.10': - resolution: {integrity: sha512-fxeu7ykVbMGxGV2S3qRTupHToeo1hdWBm8ihyURn3BMqJZe2SkZEECPd5RyvIuuNUtjRnmhkZRnF3Jsz2S+L0g==} - - '@pixi/mesh-extras@6.5.10': - resolution: {integrity: sha512-UCG7OOPPFeikrX09haCibCMR0jPQ4UJ+4HiYiAv/3dahq5eEzBx+yAwVtxcVCjonkTf/lu5SzmHdzpsbHLx5aw==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/mesh': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/mesh@6.5.10': - resolution: {integrity: sha512-tUNPsdp5/t/yRsCmfxIcufIfbQVzgAlMNgQ1igWOkSxzhB7vlEbZ8ZLLW5tQcNyM/r7Nhjz+RoB+RD+/BCtvlA==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/settings': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/mixin-cache-as-bitmap@6.5.10': - resolution: {integrity: sha512-HV4qPZt8R7uuPZf1XE5S0e3jbN4+/EqgAIkueIyK3Em+0IO1rCmIbzzYxFPxkElMUu5VvN1r4hXK846z9ITnhw==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/settings': 6.5.10 - '@pixi/sprite': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/mixin-get-child-by-name@6.5.10': - resolution: {integrity: sha512-YYd9wjnI/4aKY0H5Ij413UppVZn3YE1No2CZrNevV6WbhylsJucowY3hJihtl9mxkpwtaUIyWMjmphkbOinbzA==} - peerDependencies: - '@pixi/display': 6.5.10 - - '@pixi/mixin-get-global-position@6.5.10': - resolution: {integrity: sha512-A83gTZP9CdQAyrAvOZl1P707Q0QvIC0V8UnBAMd4GxuhMOXJtXVPCdmfPVXUrfoywgnH+/Bgimq5xhsXTf8Hzg==} - peerDependencies: - '@pixi/display': 6.5.10 - '@pixi/math': 6.5.10 - - '@pixi/particle-container@6.5.10': - resolution: {integrity: sha512-CCNAdYGzKoOc3FtK2kyWCNjygdHppeOEqqK189yhg3yRSsvby+HMms/cM6bLK/4Vf6mFoAy1na3w/oXpqTR2Ag==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/sprite': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/polyfill@6.5.10': - resolution: {integrity: sha512-KDTWyr285VvPM8GGTVIZAhmxGrOlTznUGK/9kWS3GtrogwLWn41S/86Yej1gYvotVyUomCcOok33Jzahb+vX1w==} - - '@pixi/prepare@6.5.10': - resolution: {integrity: sha512-PHMApz/GPg7IX/7+2S98criN2+Mp+fgiKpojV9cnl0SlW2zMxfAHBBi8zik9rHBgjx8X6d6bR0MG1rPtb6vSxQ==} - peerDependencies: - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/graphics': 6.5.10 - '@pixi/settings': 6.5.10 - '@pixi/text': 6.5.10 - '@pixi/ticker': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/runner@6.5.10': - resolution: {integrity: sha512-4HiHp6diCmigJT/DSbnqQP62OfWKmZB7zPWMdV1AEdr4YT1QxzXAW1wHg7dkoEfyTHqZKl0tm/zcqKq/iH7tMA==} - - '@pixi/settings@6.5.10': - resolution: {integrity: sha512-ypAS5L7pQ2Qb88yQK72bXtc7sD8OrtLWNXdZ/gnw5kwSWCFaOSoqhKqJCXrR5DQtN98+RQefwbEAmMvqobhFyw==} - peerDependencies: - '@pixi/constants': 6.5.10 - - '@pixi/sprite-animated@6.5.10': - resolution: {integrity: sha512-x1kayucAqpVbNk+j+diC/7sQGQsAl6NCH1J2/EEaiQjlV3GOx1MXS9Tft1N1Y1y7otbg1XsnBd60/Yzcp05pxA==} - peerDependencies: - '@pixi/core': 6.5.10 - '@pixi/sprite': 6.5.10 - '@pixi/ticker': 6.5.10 - - '@pixi/sprite-tiling@6.5.10': - resolution: {integrity: sha512-lDFcPuwExrdJhli+WmjPivChjeCG6NiRl36iQ8n2zVi/MYVv9qfKCA6IdU7HBWk1AZdsg6KUTpwfmVLUI+qz3w==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/sprite': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/sprite@6.5.10': - resolution: {integrity: sha512-UiK+8LgM9XQ/SBDKjRgZ8WggdOSlFRXqiWjEZVmNkiyU8HvXeFzWPRhpc8RR1zDwAUhZWKtMhF8X/ba9m+z2lg==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/settings': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/spritesheet@6.5.10': - resolution: {integrity: sha512-7uOZ1cYyYtPb0ZEgXV1SZ8ujtluZNY0TL5z3+Qc8cgGGZK/MaWG7N6Wf+uR4BR2x8FLNwcyN5IjbQDKCpblrmg==} - peerDependencies: - '@pixi/core': 6.5.10 - '@pixi/loaders': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/text-bitmap@6.5.10': - resolution: {integrity: sha512-g/iFIMGp6Pfi0BvX6Ykp48Z6JXVgKOrc7UCIR9CM21wYcCiQGqtdFwstV236xk6/D8NToUtSOcifhtQ28dVTdQ==} - peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10 - '@pixi/display': 6.5.10 - '@pixi/loaders': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/mesh': 6.5.10 - '@pixi/settings': 6.5.10 - '@pixi/text': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/text@6.5.10': - resolution: {integrity: sha512-ikwkonLJ+6QmEVW8Ji9fS5CjrKNbU4mHzYuwRQas/VJQuSWgd0myCcaw6ZbF1oSfQe70HgbNOR0sH8Q3Com0qg==} - peerDependencies: - '@pixi/core': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/settings': 6.5.10 - '@pixi/sprite': 6.5.10 - '@pixi/utils': 6.5.10 - - '@pixi/ticker@6.5.10': - resolution: {integrity: sha512-UqX1XYtzqFSirmTOy8QAK4Ccg4KkIZztrBdRPKwFSOEiKAJoGDCSBmyQBo/9aYQKGObbNnrJ7Hxv3/ucg3/1GA==} - peerDependencies: - '@pixi/extensions': 6.5.10 - '@pixi/settings': 6.5.10 + '@pixi/colord@2.9.6': + resolution: {integrity: sha512-nezytU2pw587fQstUu1AsJZDVEynjskwOL+kibwcdxsMBFqPsFFNA7xl0ii/gXuDi6M0xj3mfRJj8pBSc2jCfA==} - '@pixi/utils@6.5.10': - resolution: {integrity: sha512-4f4qDMmAz9IoSAe08G2LAxUcEtG9jSdudfsMQT2MG+OpfToirboE6cNoO0KnLCvLzDVE/mfisiQ9uJbVA9Ssdw==} + '@pixi/sound@6.0.1': + resolution: {integrity: sha512-hpFlQSScAR2L/CsEoIvDi7s1oGsu8y9Zd742Vd3982N+q3IF2vFuIfV9HN4ryjlGnhCT8yBlEgs1gp4G9Rt9TA==} peerDependencies: - '@pixi/constants': 6.5.10 - '@pixi/settings': 6.5.10 + pixi.js: ^8.0.0 '@polka/url@1.0.0-next.28': resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} @@ -945,18 +695,27 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} - '@types/earcut@2.1.4': - resolution: {integrity: sha512-qp3m9PPz4gULB9MhjGID7wpo3gJ4bTGXm7ltNDsmOvsPduTeHp8wSW9YckBj3mljeOh4F0m2z/0JKAALRKbmLQ==} + '@types/earcut@3.0.0': + resolution: {integrity: sha512-k/9fOUGO39yd2sCjrbAJvGDEQvRwRnQIZlBz43roGwUZo5SHAmyVvSFyaVVZkicRVCaDXPKlbxrUcBuJoSWunQ==} + + '@types/eslint-scope@3.7.7': + resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} + + '@types/eslint@9.6.1': + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/node@22.13.1': resolution: {integrity: sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==} - '@types/offscreencanvas@2019.7.3': - resolution: {integrity: sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==} - '@types/react-dom@19.0.3': resolution: {integrity: sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA==} peerDependencies: @@ -1091,11 +850,96 @@ packages: '@vue/shared@3.5.13': resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + '@webassemblyjs/ast@1.14.1': + resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} + + '@webassemblyjs/floating-point-hex-parser@1.13.2': + resolution: {integrity: sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==} + + '@webassemblyjs/helper-api-error@1.13.2': + resolution: {integrity: sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==} + + '@webassemblyjs/helper-buffer@1.14.1': + resolution: {integrity: sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==} + + '@webassemblyjs/helper-numbers@1.13.2': + resolution: {integrity: sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==} + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': + resolution: {integrity: sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==} + + '@webassemblyjs/helper-wasm-section@1.14.1': + resolution: {integrity: sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==} + + '@webassemblyjs/ieee754@1.13.2': + resolution: {integrity: sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==} + + '@webassemblyjs/leb128@1.13.2': + resolution: {integrity: sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==} + + '@webassemblyjs/utf8@1.13.2': + resolution: {integrity: sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==} + + '@webassemblyjs/wasm-edit@1.14.1': + resolution: {integrity: sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==} + + '@webassemblyjs/wasm-gen@1.14.1': + resolution: {integrity: sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==} + + '@webassemblyjs/wasm-opt@1.14.1': + resolution: {integrity: sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==} + + '@webassemblyjs/wasm-parser@1.14.1': + resolution: {integrity: sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==} + + '@webassemblyjs/wast-printer@1.14.1': + resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==} + + '@webgpu/types@0.1.70': + resolution: {integrity: sha512-LFiNHHKMvmAEvwVew3JLJmTdShhbdwRFSImUshGhE2mGE8ybQzIo63l5uRp+YKnNx+8Qno8Kf6gN+DKMreIJCA==} + + '@xmldom/xmldom@0.8.13': + resolution: {integrity: sha512-KRYzxepc14G/CEpEGc3Yn+JKaAeT63smlDr+vjB8jRfgTBBI9wRj/nkQEO+ucV8p8I9bfKLWp37uHgFrbntPvw==} + engines: {node: '>=10.0.0'} + + '@xtuc/ieee754@1.2.0': + resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} + + '@xtuc/long@4.2.2': + resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} + + acorn-import-phases@1.0.4: + resolution: {integrity: sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==} + engines: {node: '>=10.13.0'} + peerDependencies: + acorn: ^8.14.0 + acorn@8.14.0: resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true + acorn@8.16.0: + resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv-formats@2.1.1: + resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-keywords@5.1.0: + resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} + peerDependencies: + ajv: ^8.8.2 + + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -1112,27 +956,15 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} - array-union@1.0.2: - resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} - engines: {node: '>=0.10.0'} - - array-uniq@1.0.3: - resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} - engines: {node: '>=0.10.0'} - - async@2.6.4: - resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + baseline-browser-mapping@2.10.29: + resolution: {integrity: sha512-Asa2krT+XTPZINCS+2QcyS8WTkObE77RwkydwF7h6DmnKqbvlalz93m/dnphUyCa6SWSP51VgtEUf2FN+gelFQ==} + engines: {node: '>=6.0.0'} + hasBin: true binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} - brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -1142,6 +974,11 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + browserslist@4.28.2: + resolution: {integrity: sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -1155,17 +992,12 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} - call-bind-apply-helpers@1.0.2: - resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} - engines: {node: '>= 0.4'} - - call-bound@1.0.3: - resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} - engines: {node: '>= 0.4'} - caniuse-lite@1.0.30001697: resolution: {integrity: sha512-GwNPlWJin8E+d7Gxq96jxM6w0w+VFeyyXRsjU58emtkYqnbwHqXm5uT2uCmO0RQE9htWknOP4xtBlLmM/gWxvQ==} + caniuse-lite@1.0.30001792: + resolution: {integrity: sha512-hVLMUZFgR4JJ6ACt1uEESvQN1/dBVqPAKY0hgrV70eN3391K6juAfTjKZLKvOMsx8PxA7gsY1/tLMMTcfFLLpw==} + chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -1174,6 +1006,10 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chrome-trace-event@1.0.4: + resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} + engines: {node: '>=6.0'} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -1197,12 +1033,6 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - commondir@1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - confbox@0.1.8: resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} @@ -1243,40 +1073,31 @@ packages: resolution: {integrity: sha512-qTBmfQoXvhKO75D/05C8m+fteQmn4U46FWYiLhXtZQInzitXLWY0EQ/2oKnpAz9g2lQWW8jYcLcT+hPJGT+kig==} engines: {node: '>=10.13'} - dunder-proto@1.0.1: - resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} - engines: {node: '>= 0.4'} - duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} - earcut@2.2.4: - resolution: {integrity: sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==} + earcut@3.0.2: + resolution: {integrity: sha512-X7hshQbLyMJ/3RPhyObLARM2sNxxmRALLKx1+NVFFnQ9gKzmCrxm9+uLIAdBcvc8FNLpctqlQ2V6AE92Ol9UDQ==} + + electron-to-chromium@1.5.354: + resolution: {integrity: sha512-JaBHwWcfIdmSAfWM5l3uwjGd431j8YEMikZ+K/2nXVuBqJKyZ0f+2h4n4JY5AyNiZmnY9qQr2RU3v9DxDmHMNg==} electron-to-chromium@1.5.93: resolution: {integrity: sha512-M+29jTcfNNoR9NV7la4SwUqzWAxEwnc7ThA5e1m6LRSotmpfpCpLcIfgtSCVL+MllNLgAyM/5ru86iMRemPzDQ==} - email-addresses@3.1.0: - resolution: {integrity: sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==} - emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + enhanced-resolve@5.21.3: + resolution: {integrity: sha512-QyL119InA+XXEkNLNTPCXPugSvOfhwv0JOlGNzvxs0hZaiHLNvXSpudUWsOlsXGWJh8G6ckCScEkVHfX3kw/2Q==} + engines: {node: '>=10.13.0'} + entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} - es-define-property@1.0.1: - resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} - engines: {node: '>= 0.4'} - - es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - - es-object-atoms@1.1.1: - resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} - engines: {node: '>= 0.4'} + es-module-lexer@2.1.0: + resolution: {integrity: sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==} esbuild@0.23.1: resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} @@ -1296,16 +1117,42 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} + eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - eventemitter3@3.1.2: - resolution: {integrity: sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==} + eventemitter3@5.0.4: + resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} + + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} + fast-uri@3.1.2: + resolution: {integrity: sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==} + fastq@1.19.0: resolution: {integrity: sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==} @@ -1317,14 +1164,6 @@ packages: picomatch: optional: true - filename-reserved-regex@2.0.0: - resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} - engines: {node: '>=4'} - - filenamify@4.3.0: - resolution: {integrity: sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==} - engines: {node: '>=8'} - fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -1333,29 +1172,11 @@ packages: resolution: {integrity: sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==} engines: {node: '>=14.16'} - find-cache-dir@3.3.2: - resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} - engines: {node: '>=8'} - - find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} - - fs-extra@8.1.0: - resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} - engines: {node: '>=6 <7 || >=8'} - - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -1364,29 +1185,18 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-intrinsic@1.3.0: - resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} - engines: {node: '>= 0.4'} - - get-proto@1.0.1: - resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} - engines: {node: '>= 0.4'} - get-tsconfig@4.10.0: resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} - gh-pages@4.0.0: - resolution: {integrity: sha512-p8S0T3aGJc68MtwOcZusul5qPSNZCalap3NWbhRUZYu1YOdp+EjZ+4kPmRM8h3NNRdqw00yuevRjlkuSzCn7iQ==} - engines: {node: '>=10'} - hasBin: true + gifuct-js@2.1.2: + resolution: {integrity: sha512-rI2asw77u0mGgwhV3qA+OEgYqaDn5UNqgs+Bx0FGwSpuqfYn+Ir6RQY5ENNQ8SbIiG/m5gVa7CD5RriO4f4Lsg==} glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported + glob-to-regexp@0.4.1: + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} @@ -1396,17 +1206,9 @@ packages: resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} engines: {node: '>=18'} - globby@6.1.0: - resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} - engines: {node: '>=0.10.0'} - globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - gopd@1.2.0: - resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} - engines: {node: '>= 0.4'} - graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -1418,13 +1220,9 @@ packages: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} - has-symbols@1.1.0: - resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} - engines: {node: '>= 0.4'} - - hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} - engines: {node: '>= 0.4'} + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} iconify-icon@2.3.0: resolution: {integrity: sha512-C0beI9oTDxQz6voI5CKl7MiJf0Lw4UU8K4G4t6pcUDClLmCvuMOpcvd8MAztQ2SfoH0iv7WHdxBFjekKPFKH2Q==} @@ -1432,13 +1230,6 @@ packages: importx@0.5.1: resolution: {integrity: sha512-YrRaigAec1sC2CdIJjf/hCH1Wp9Ii8Cq5ROw4k5nJ19FVl2FcJUHZ5gGIb1vs8+JNYIyOJpc2fcufS2330bxDw==} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -1459,10 +1250,20 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + ismobilejs@1.1.1: + resolution: {integrity: sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==} + + jest-worker@27.5.1: + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} + engines: {node: '>= 10.13.0'} + jiti@2.4.2: resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} hasBin: true + js-binary-schema-parser@2.0.3: + resolution: {integrity: sha512-xezGJmOb4lk/M1ZZLTR/jaBHQ4gG/lqQnJqdIv4721DMggsa1bDVlHXNeHYogaIEHD9vCRv0fcL4hMA+Coarkg==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1471,14 +1272,14 @@ packages: engines: {node: '>=6'} hasBin: true + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true - jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} @@ -1503,37 +1304,29 @@ packages: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + loader-runner@4.3.2: + resolution: {integrity: sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w==} + engines: {node: '>=6.11.5'} + local-pkg@1.0.0: resolution: {integrity: sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==} engines: {node: '>=14'} - locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - lodash.deburr@4.1.0: resolution: {integrity: sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==} - lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} - make-dir@3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} - - math-intrinsics@1.1.0: - resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} - engines: {node: '>= 0.4'} - mdn-data@2.12.2: resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -1542,8 +1335,9 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} - minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} mlly@1.7.4: resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} @@ -1560,56 +1354,34 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + node-fetch-native@1.6.6: resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} node-releases@2.0.19: resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + node-releases@2.0.44: + resolution: {integrity: sha512-5WUyunoPMsvvEhS8AxHtRzP+oA8UCkJ7YRxatWKjngndhDGLiqEVAQKWjFAiAiuL8zMRGzGSJxFnLetoa43qGQ==} + normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - - object-inspect@1.13.4: - resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} - engines: {node: '>= 0.4'} - ofetch@1.4.1: resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - - p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - - p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - - p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - package-manager-detector@0.2.9: resolution: {integrity: sha512-+vYvA/Y31l8Zk8dwxHhL3JfTuHPm6tlxM2A3GeQyl7ovYnSp1+mzAxClxaOr0qO1TtPxbQxetI7v5XqKLJZk7Q==} + parse-svg-path@0.1.2: + resolution: {integrity: sha512-JyPSBnkTJ0AI8GGJLfMXvKq42cj5c006fnLz6fXy6zfoVjJizi8BNTpu8on8ziI1cKy9d9DGNuY17Ce7wuejpQ==} + parse5@5.1.0: resolution: {integrity: sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==} - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -1630,34 +1402,8 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} - pify@2.3.0: - resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} - engines: {node: '>=0.10.0'} - - pinkie-promise@2.0.1: - resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} - engines: {node: '>=0.10.0'} - - pinkie@2.0.4: - resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} - engines: {node: '>=0.10.0'} - - pixi-live2d-display@0.4.0: - resolution: {integrity: sha512-xeYC6y4Y0Bxe9ksWNlGFZC1rII/MPrzPQK7t1c3ubA8RhkOISIqHJl38fNumXqhGEs+yItmgDOkFT+9dsyGDjA==} - peerDependencies: - '@pixi/core': ^6 - '@pixi/display': ^6 - '@pixi/loaders': ^6 - '@pixi/math': ^6 - '@pixi/sprite': ^6 - '@pixi/utils': ^6 - - pixi.js@6.5.10: - resolution: {integrity: sha512-Z2mjeoISml2iuVwT1e/BQwERYM2yKoiR08ZdGrg8y5JjeuVptfTrve4DbPMRN/kEDodesgQZGV/pFv0fE9Q2SA==} - - pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} + pixi.js@8.18.1: + resolution: {integrity: sha512-6LUPWYgulZhp/w4kam2XHXB0QedISZIqrJbRdHLLQ3csn5a38uzKxAp6B5j6s89QFYaIJbg95kvgTRcbgpO1ow==} pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -1666,16 +1412,6 @@ packages: resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} engines: {node: ^10 || ^12 || >=14} - promise-polyfill@8.3.0: - resolution: {integrity: sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==} - - punycode@1.4.1: - resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} - - qs@6.14.0: - resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} - engines: {node: '>=0.6'} - query-string@9.1.1: resolution: {integrity: sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==} engines: {node: '>=18'} @@ -1707,6 +1443,10 @@ packages: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} @@ -1725,26 +1465,14 @@ packages: scheduler@0.25.0: resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} + schema-utils@4.3.3: + resolution: {integrity: sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==} + engines: {node: '>= 10.13.0'} + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - side-channel-list@1.0.0: - resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} - engines: {node: '>= 0.4'} - - side-channel-map@1.0.1: - resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} - engines: {node: '>= 0.4'} - - side-channel-weakmap@1.0.2: - resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} - engines: {node: '>= 0.4'} - - side-channel@1.1.0: - resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} - engines: {node: '>= 0.4'} - sirv@3.0.0: resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} engines: {node: '>=18'} @@ -1772,19 +1500,70 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} - strip-outer@1.0.1: - resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} - engines: {node: '>=0.10.0'} - supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} + engines: {node: '>=6'} + + terser-webpack-plugin@5.6.0: + resolution: {integrity: sha512-Eum+5ajkaOhf5KbM26osvv21kLD7BaGqQ1UA4Ami4arYwylmGUQTgHFpHDdmJod1q4QXa66p0to/FBKID+J1vA==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@minify-html/node': '*' + '@swc/core': '*' + '@swc/css': '*' + '@swc/html': '*' + clean-css: '*' + cssnano: '*' + csso: '*' + esbuild: '*' + html-minifier-terser: '*' + lightningcss: '*' + postcss: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@minify-html/node': + optional: true + '@swc/core': + optional: true + '@swc/css': + optional: true + '@swc/html': + optional: true + clean-css: + optional: true + cssnano: + optional: true + csso: + optional: true + esbuild: + optional: true + html-minifier-terser: + optional: true + lightningcss: + optional: true + postcss: + optional: true + uglify-js: + optional: true + terser@5.38.0: resolution: {integrity: sha512-a4GD5R1TjEeuCT6ZRiYMHmIf7okbCPEuhQET8bczV6FrQMMlFXA1n+G0KKjdlFCm3TEHV77GxfZB3vZSUQGFpg==} engines: {node: '>=10'} hasBin: true + tiny-lru@11.4.7: + resolution: {integrity: sha512-w/Te7uMUVeH0CR8vZIjr+XiN41V+30lkDdK+NRIDCUYKKuL9VcmaUEmaPISuwGhLlrTGh5yu18lENtR9axSxYw==} + engines: {node: '>=12'} + tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} @@ -1800,10 +1579,6 @@ packages: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} - trim-repeated@1.0.0: - resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} - engines: {node: '>=0.10.0'} - ts-lit-plugin@2.0.2: resolution: {integrity: sha512-DPXlVxhjWHxg8AyBLcfSYt2JXgpANV1ssxxwjY98o26gD8MzeiM68HFW9c2VeDd1CjoR3w7B/6/uKxwBQe+ioA==} @@ -1844,10 +1619,6 @@ packages: undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} - unocss@65.4.3: resolution: {integrity: sha512-mwSVi0ovPxaDv58yFB7Vm5v1x/q/pUc7aTh7SJbeYoRrpbUGdKiVf20YSQfMqmBNXV9CFDr4o6tabP/58as6RQ==} engines: {node: '>=14'} @@ -1864,15 +1635,23 @@ packages: resolution: {integrity: sha512-Q3LU0e4zxKfRko1wMV2HmP8lB9KWislY7hxXpxd+lGx0PRInE4vhMBVEZwpdVYHvtqzhSrzuIfErsob6bQfCzw==} engines: {node: '>=18.12.0'} + untitled-pixi-live2d-engine@1.1.0: + resolution: {integrity: sha512-zhWZbsLttGW5R30NjWqQw57bLiKPJ1yx7A95R1JnTgTbVEKCdUcksxi0IWw5uJ20LW7ap3FhNdv1MJBxcL48Yg==} + peerDependencies: + '@pixi/sound': ^6.0.1 + pixi.js: ^8.13.1 + update-browserslist-db@1.1.2: resolution: {integrity: sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' - url@0.11.4: - resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} - engines: {node: '>= 0.4'} + update-browserslist-db@1.2.3: + resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' vite-tsconfig-paths@5.1.4: resolution: {integrity: sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==} @@ -1953,6 +1732,10 @@ packages: typescript: optional: true + watchpack@2.5.1: + resolution: {integrity: sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==} + engines: {node: '>=10.13.0'} + web-component-analyzer@2.0.0: resolution: {integrity: sha512-UEvwfpD+XQw99sLKiH5B1T4QwpwNyWJxp59cnlRwFfhUW6JsQpw5jMeMwi7580sNou8YL3kYoS7BWLm+yJ/jVQ==} hasBin: true @@ -1961,16 +1744,27 @@ packages: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} + webpack-sources@3.4.1: + resolution: {integrity: sha512-eACpxRN02yaawnt+uUNIF7Qje6A9zArxBbcAJjK1PK3S9Ycg5jIuJ8pW4q8EMnwNZCEGltcjkRx1QzOxOkKD8A==} + engines: {node: '>=10.13.0'} + webpack-virtual-modules@0.6.2: resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + webpack@5.106.2: + resolution: {integrity: sha512-wGN3qcrBQIFmQ/c0AiOAQBvrZ5lmY8vbbMv4Mxfgzqd/B6+9pXtLo73WuS1dSGXM5QYY3hZnIbvx+K1xxe6FyA==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -2360,263 +2154,36 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.0 - '@pixi/accessibility@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/app@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@pixi/colord@2.9.6': {} - '@pixi/compressed-textures@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + '@pixi/sound@6.0.1(pixi.js@8.18.1)': dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + pixi.js: 8.18.1 - '@pixi/constants@6.5.10': {} + '@polka/url@1.0.0-next.28': {} - '@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': + '@rollup/pluginutils@5.1.4(rollup@4.34.4)': dependencies: - '@pixi/constants': 6.5.10 - '@pixi/extensions': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/runner': 6.5.10 - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - '@types/offscreencanvas': 2019.7.3 + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.34.4 - '@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/math': 6.5.10 - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@rollup/rollup-android-arm-eabi@4.34.4': + optional: true - '@pixi/extensions@6.5.10': {} + '@rollup/rollup-android-arm64@4.34.4': + optional: true - '@pixi/extract@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) + '@rollup/rollup-darwin-arm64@4.34.4': + optional: true - '@pixi/filter-alpha@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) + '@rollup/rollup-darwin-x64@4.34.4': + optional: true - '@pixi/filter-blur@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - - '@pixi/filter-color-matrix@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - - '@pixi/filter-displacement@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - - '@pixi/filter-fxaa@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - - '@pixi/filter-noise@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - - '@pixi/graphics@6.5.10(vnjw7qx4yf6lp5siigycla6i5q)': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/interaction@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/math@6.5.10': {} - - '@pixi/mesh-extras@6.5.10(px7ljw7kss2ypii62iz7oundhy)': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/mesh': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/mesh@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/mixin-cache-as-bitmap@6.5.10(gsayfpodkyk4qa4ufzl7uemija)': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/mixin-get-child-by-name@6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))': - dependencies: - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - - '@pixi/mixin-get-global-position@6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)': - dependencies: - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - - '@pixi/particle-container@6.5.10(vnjw7qx4yf6lp5siigycla6i5q)': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/polyfill@6.5.10': - dependencies: - object-assign: 4.1.1 - promise-polyfill: 8.3.0 - - '@pixi/prepare@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/graphics@6.5.10(vnjw7qx4yf6lp5siigycla6i5q))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/text@6.5.10(wloyuoiyjdwi7eo66se3n3om5u))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/graphics': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@pixi/text': 6.5.10(wloyuoiyjdwi7eo66se3n3om5u) - '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/runner@6.5.10': {} - - '@pixi/settings@6.5.10(@pixi/constants@6.5.10)': - dependencies: - '@pixi/constants': 6.5.10 - - '@pixi/sprite-animated@6.5.10(5lsnbztgwvieupexxz2mryw2ca)': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/sprite-tiling@6.5.10(vnjw7qx4yf6lp5siigycla6i5q)': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/sprite@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/spritesheet@6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/text-bitmap@6.5.10(eh244dlueg2daqoi2uo7nzvmpa)': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/mesh': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@pixi/text': 6.5.10(wloyuoiyjdwi7eo66se3n3om5u) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/text@6.5.10(wloyuoiyjdwi7eo66se3n3om5u)': - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - '@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))': - dependencies: - '@pixi/extensions': 6.5.10 - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - - '@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))': - dependencies: - '@pixi/constants': 6.5.10 - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@types/earcut': 2.1.4 - earcut: 2.2.4 - eventemitter3: 3.1.2 - url: 0.11.4 - - '@polka/url@1.0.0-next.28': {} - - '@rollup/pluginutils@5.1.4(rollup@4.34.4)': - dependencies: - '@types/estree': 1.0.6 - estree-walker: 2.0.2 - picomatch: 4.0.2 - optionalDependencies: - rollup: 4.34.4 - - '@rollup/rollup-android-arm-eabi@4.34.4': - optional: true - - '@rollup/rollup-android-arm64@4.34.4': - optional: true - - '@rollup/rollup-darwin-arm64@4.34.4': - optional: true - - '@rollup/rollup-darwin-x64@4.34.4': - optional: true - - '@rollup/rollup-freebsd-arm64@4.34.4': - optional: true + '@rollup/rollup-freebsd-arm64@4.34.4': + optional: true '@rollup/rollup-freebsd-x64@4.34.4': optional: true @@ -2681,17 +2248,33 @@ snapshots: dependencies: '@babel/types': 7.26.7 - '@types/earcut@2.1.4': {} + '@types/earcut@3.0.0': {} + + '@types/eslint-scope@3.7.7': + dependencies: + '@types/eslint': 9.6.1 + '@types/estree': 1.0.9 + optional: true + + '@types/eslint@9.6.1': + dependencies: + '@types/estree': 1.0.9 + '@types/json-schema': 7.0.15 + optional: true '@types/estree@1.0.6': {} + '@types/estree@1.0.9': + optional: true + + '@types/json-schema@7.0.15': + optional: true + '@types/node@22.13.1': dependencies: undici-types: 6.20.0 optional: true - '@types/offscreencanvas@2019.7.3': {} - '@types/react-dom@19.0.3(@types/react@19.0.8)': dependencies: '@types/react': 19.0.8 @@ -2854,7 +2437,7 @@ snapshots: - supports-color - vue - '@unocss/webpack@65.4.3(rollup@4.34.4)': + '@unocss/webpack@65.4.3(rollup@4.34.4)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1))': dependencies: '@ampproject/remapping': 2.3.0 '@rollup/pluginutils': 5.1.4(rollup@4.34.4) @@ -2864,6 +2447,7 @@ snapshots: magic-string: 0.30.17 tinyglobby: 0.2.10 unplugin: 2.1.2 + webpack: 5.106.2(esbuild@0.24.2)(postcss@8.5.1) webpack-sources: 3.2.3 transitivePeerDependencies: - rollup @@ -2937,8 +2521,136 @@ snapshots: '@vue/shared@3.5.13': {} + '@webassemblyjs/ast@1.14.1': + dependencies: + '@webassemblyjs/helper-numbers': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + optional: true + + '@webassemblyjs/floating-point-hex-parser@1.13.2': + optional: true + + '@webassemblyjs/helper-api-error@1.13.2': + optional: true + + '@webassemblyjs/helper-buffer@1.14.1': + optional: true + + '@webassemblyjs/helper-numbers@1.13.2': + dependencies: + '@webassemblyjs/floating-point-hex-parser': 1.13.2 + '@webassemblyjs/helper-api-error': 1.13.2 + '@xtuc/long': 4.2.2 + optional: true + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': + optional: true + + '@webassemblyjs/helper-wasm-section@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/wasm-gen': 1.14.1 + optional: true + + '@webassemblyjs/ieee754@1.13.2': + dependencies: + '@xtuc/ieee754': 1.2.0 + optional: true + + '@webassemblyjs/leb128@1.13.2': + dependencies: + '@xtuc/long': 4.2.2 + optional: true + + '@webassemblyjs/utf8@1.13.2': + optional: true + + '@webassemblyjs/wasm-edit@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/helper-wasm-section': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-opt': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + '@webassemblyjs/wast-printer': 1.14.1 + optional: true + + '@webassemblyjs/wasm-gen@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + optional: true + + '@webassemblyjs/wasm-opt@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + optional: true + + '@webassemblyjs/wasm-parser@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-api-error': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + optional: true + + '@webassemblyjs/wast-printer@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@xtuc/long': 4.2.2 + optional: true + + '@webgpu/types@0.1.70': {} + + '@xmldom/xmldom@0.8.13': {} + + '@xtuc/ieee754@1.2.0': + optional: true + + '@xtuc/long@4.2.2': + optional: true + + acorn-import-phases@1.0.4(acorn@8.16.0): + dependencies: + acorn: 8.16.0 + optional: true + acorn@8.14.0: {} + acorn@8.16.0: + optional: true + + ajv-formats@2.1.1(ajv@8.20.0): + optionalDependencies: + ajv: 8.20.0 + optional: true + + ajv-keywords@5.1.0(ajv@8.20.0): + dependencies: + ajv: 8.20.0 + fast-deep-equal: 3.1.3 + optional: true + + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.2 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + optional: true + ansi-regex@5.0.1: {} ansi-styles@3.2.1: @@ -2954,25 +2666,11 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 - array-union@1.0.2: - dependencies: - array-uniq: 1.0.3 - - array-uniq@1.0.3: {} - - async@2.6.4: - dependencies: - lodash: 4.17.21 - - balanced-match@1.0.2: {} + baseline-browser-mapping@2.10.29: + optional: true binary-extensions@2.3.0: {} - brace-expansion@1.1.11: - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -2984,6 +2682,15 @@ snapshots: node-releases: 2.0.19 update-browserslist-db: 1.1.2(browserslist@4.24.4) + browserslist@4.28.2: + dependencies: + baseline-browser-mapping: 2.10.29 + caniuse-lite: 1.0.30001792 + electron-to-chromium: 1.5.354 + node-releases: 2.0.44 + update-browserslist-db: 1.2.3(browserslist@4.28.2) + optional: true + buffer-from@1.1.2: optional: true @@ -2994,18 +2701,11 @@ snapshots: cac@6.7.14: {} - call-bind-apply-helpers@1.0.2: - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - - call-bound@1.0.3: - dependencies: - call-bind-apply-helpers: 1.0.2 - get-intrinsic: 1.3.0 - caniuse-lite@1.0.30001697: {} + caniuse-lite@1.0.30001792: + optional: true + chalk@2.4.2: dependencies: ansi-styles: 3.2.1 @@ -3024,6 +2724,9 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chrome-trace-event@1.0.4: + optional: true + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -3044,11 +2747,8 @@ snapshots: colorette@2.0.20: {} - commander@2.20.3: {} - - commondir@1.0.1: {} - - concat-map@0.0.1: {} + commander@2.20.3: + optional: true confbox@0.1.8: {} @@ -3079,31 +2779,27 @@ snapshots: leven: 3.1.0 lodash.deburr: 4.1.0 - dunder-proto@1.0.1: - dependencies: - call-bind-apply-helpers: 1.0.2 - es-errors: 1.3.0 - gopd: 1.2.0 - duplexer@0.1.2: {} - earcut@2.2.4: {} + earcut@3.0.2: {} - electron-to-chromium@1.5.93: {} + electron-to-chromium@1.5.354: + optional: true - email-addresses@3.1.0: {} + electron-to-chromium@1.5.93: {} emoji-regex@8.0.0: {} - entities@4.5.0: {} - - es-define-property@1.0.1: {} + enhanced-resolve@5.21.3: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.3 + optional: true - es-errors@1.3.0: {} + entities@4.5.0: {} - es-object-atoms@1.1.1: - dependencies: - es-errors: 1.3.0 + es-module-lexer@2.1.0: + optional: true esbuild@0.23.1: optionalDependencies: @@ -3164,9 +2860,32 @@ snapshots: escape-string-regexp@1.0.5: {} + eslint-scope@5.1.1: + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + optional: true + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + optional: true + + estraverse@4.3.0: + optional: true + + estraverse@5.3.0: + optional: true + estree-walker@2.0.2: {} - eventemitter3@3.1.2: {} + eventemitter3@5.0.4: {} + + events@3.3.0: + optional: true + + fast-deep-equal@3.1.3: + optional: true fast-glob@3.3.3: dependencies: @@ -3176,6 +2895,9 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.8 + fast-uri@3.1.2: + optional: true + fastq@1.19.0: dependencies: reusify: 1.0.4 @@ -3184,110 +2906,42 @@ snapshots: optionalDependencies: picomatch: 4.0.2 - filename-reserved-regex@2.0.0: {} - - filenamify@4.3.0: - dependencies: - filename-reserved-regex: 2.0.0 - strip-outer: 1.0.1 - trim-repeated: 1.0.0 - fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 filter-obj@5.1.0: {} - find-cache-dir@3.3.2: - dependencies: - commondir: 1.0.1 - make-dir: 3.1.0 - pkg-dir: 4.2.0 - - find-up@4.1.0: - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - - fs-extra@8.1.0: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - - fs.realpath@1.0.0: {} - fsevents@2.3.3: optional: true - function-bind@1.1.2: {} - gensync@1.0.0-beta.2: {} get-caller-file@2.0.5: {} - get-intrinsic@1.3.0: - dependencies: - call-bind-apply-helpers: 1.0.2 - es-define-property: 1.0.1 - es-errors: 1.3.0 - es-object-atoms: 1.1.1 - function-bind: 1.1.2 - get-proto: 1.0.1 - gopd: 1.2.0 - has-symbols: 1.1.0 - hasown: 2.0.2 - math-intrinsics: 1.1.0 - - get-proto@1.0.1: - dependencies: - dunder-proto: 1.0.1 - es-object-atoms: 1.1.1 - get-tsconfig@4.10.0: dependencies: resolve-pkg-maps: 1.0.0 - gh-pages@4.0.0: + gifuct-js@2.1.2: dependencies: - async: 2.6.4 - commander: 2.20.3 - email-addresses: 3.1.0 - filenamify: 4.3.0 - find-cache-dir: 3.3.2 - fs-extra: 8.1.0 - globby: 6.1.0 + js-binary-schema-parser: 2.0.3 glob-parent@5.1.2: dependencies: is-glob: 4.0.3 - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 + glob-to-regexp@0.4.1: + optional: true globals@11.12.0: {} globals@15.14.0: {} - globby@6.1.0: - dependencies: - array-union: 1.0.2 - glob: 7.2.3 - object-assign: 4.1.1 - pify: 2.3.0 - pinkie-promise: 2.0.1 - globrex@0.1.2: {} - gopd@1.2.0: {} - - graceful-fs@4.2.11: {} + graceful-fs@4.2.11: + optional: true gzip-size@6.0.0: dependencies: @@ -3295,11 +2949,8 @@ snapshots: has-flag@3.0.0: {} - has-symbols@1.1.0: {} - - hasown@2.0.2: - dependencies: - function-bind: 1.1.2 + has-flag@4.0.0: + optional: true iconify-icon@2.3.0: dependencies: @@ -3316,13 +2967,6 @@ snapshots: transitivePeerDependencies: - supports-color - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 @@ -3337,17 +2981,27 @@ snapshots: is-number@7.0.0: {} + ismobilejs@1.1.1: {} + + jest-worker@27.5.1: + dependencies: + '@types/node': 22.13.1 + merge-stream: 2.0.0 + supports-color: 8.1.1 + optional: true + jiti@2.4.2: {} + js-binary-schema-parser@2.0.3: {} + js-tokens@4.0.0: {} jsesc@3.1.0: {} - json5@2.2.3: {} + json-schema-traverse@1.0.0: + optional: true - jsonfile@4.0.0: - optionalDependencies: - graceful-fs: 4.2.11 + json5@2.2.3: {} kolorist@1.8.0: {} @@ -3383,19 +3037,16 @@ snapshots: load-tsconfig@0.2.5: {} + loader-runner@4.3.2: + optional: true + local-pkg@1.0.0: dependencies: mlly: 1.7.4 pkg-types: 1.3.1 - locate-path@5.0.0: - dependencies: - p-locate: 4.1.0 - lodash.deburr@4.1.0: {} - lodash@4.17.21: {} - lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -3404,14 +3055,11 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - make-dir@3.1.0: - dependencies: - semver: 6.3.1 - - math-intrinsics@1.1.0: {} - mdn-data@2.12.2: {} + merge-stream@2.0.0: + optional: true + merge2@1.4.1: {} micromatch@4.0.8: @@ -3419,9 +3067,8 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 - minimatch@3.1.2: - dependencies: - brace-expansion: 1.1.11 + mime-db@1.54.0: + optional: true mlly@1.7.4: dependencies: @@ -3436,15 +3083,17 @@ snapshots: nanoid@3.3.8: {} + neo-async@2.6.2: + optional: true + node-fetch-native@1.6.6: {} node-releases@2.0.19: {} - normalize-path@3.0.0: {} - - object-assign@4.1.1: {} + node-releases@2.0.44: + optional: true - object-inspect@1.13.4: {} + normalize-path@3.0.0: {} ofetch@1.4.1: dependencies: @@ -3452,27 +3101,11 @@ snapshots: node-fetch-native: 1.6.6 ufo: 1.5.4 - once@1.4.0: - dependencies: - wrappy: 1.0.2 - - p-limit@2.3.0: - dependencies: - p-try: 2.2.0 - - p-locate@4.1.0: - dependencies: - p-limit: 2.3.0 - - p-try@2.2.0: {} - package-manager-detector@0.2.9: {} - parse5@5.1.0: {} - - path-exists@4.0.0: {} + parse-svg-path@0.1.2: {} - path-is-absolute@1.0.1: {} + parse5@5.1.0: {} pathe@1.1.2: {} @@ -3486,66 +3119,18 @@ snapshots: picomatch@4.0.2: {} - pify@2.3.0: {} - - pinkie-promise@2.0.1: - dependencies: - pinkie: 2.0.4 - - pinkie@2.0.4: {} - - pixi-live2d-display@0.4.0(76g3zz2nt7dtjnktvdvk76m2oe): - dependencies: - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - gh-pages: 4.0.0 - - pixi.js@6.5.10: - dependencies: - '@pixi/accessibility': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/app': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/compressed-textures': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/constants': 6.5.10 - '@pixi/core': 6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/display': 6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/extensions': 6.5.10 - '@pixi/extract': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/filter-alpha': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) - '@pixi/filter-blur': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - '@pixi/filter-color-matrix': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) - '@pixi/filter-displacement': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10) - '@pixi/filter-fxaa': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) - '@pixi/filter-noise': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) - '@pixi/graphics': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) - '@pixi/interaction': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/loaders': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/math': 6.5.10 - '@pixi/mesh': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/mesh-extras': 6.5.10(px7ljw7kss2ypii62iz7oundhy) - '@pixi/mixin-cache-as-bitmap': 6.5.10(gsayfpodkyk4qa4ufzl7uemija) - '@pixi/mixin-get-child-by-name': 6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))) - '@pixi/mixin-get-global-position': 6.5.10(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10) - '@pixi/particle-container': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) - '@pixi/polyfill': 6.5.10 - '@pixi/prepare': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/graphics@6.5.10(vnjw7qx4yf6lp5siigycla6i5q))(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/text@6.5.10(wloyuoiyjdwi7eo66se3n3om5u))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/runner': 6.5.10 - '@pixi/settings': 6.5.10(@pixi/constants@6.5.10) - '@pixi/sprite': 6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/display@6.5.10(@pixi/constants@6.5.10)(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/sprite-animated': 6.5.10(5lsnbztgwvieupexxz2mryw2ca) - '@pixi/sprite-tiling': 6.5.10(vnjw7qx4yf6lp5siigycla6i5q) - '@pixi/spritesheet': 6.5.10(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/loaders@6.5.10(@pixi/constants@6.5.10)(@pixi/core@6.5.10(@pixi/constants@6.5.10)(@pixi/extensions@6.5.10)(@pixi/math@6.5.10)(@pixi/runner@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))(@pixi/ticker@6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))))(@pixi/math@6.5.10)(@pixi/utils@6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10))) - '@pixi/text': 6.5.10(wloyuoiyjdwi7eo66se3n3om5u) - '@pixi/text-bitmap': 6.5.10(eh244dlueg2daqoi2uo7nzvmpa) - '@pixi/ticker': 6.5.10(@pixi/extensions@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - '@pixi/utils': 6.5.10(@pixi/constants@6.5.10)(@pixi/settings@6.5.10(@pixi/constants@6.5.10)) - - pkg-dir@4.2.0: - dependencies: - find-up: 4.1.0 + pixi.js@8.18.1: + dependencies: + '@pixi/colord': 2.9.6 + '@types/earcut': 3.0.0 + '@webgpu/types': 0.1.70 + '@xmldom/xmldom': 0.8.13 + earcut: 3.0.2 + eventemitter3: 5.0.4 + gifuct-js: 2.1.2 + ismobilejs: 1.1.1 + parse-svg-path: 0.1.2 + tiny-lru: 11.4.7 pkg-types@1.3.1: dependencies: @@ -3559,14 +3144,6 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - promise-polyfill@8.3.0: {} - - punycode@1.4.1: {} - - qs@6.14.0: - dependencies: - side-channel: 1.1.0 - query-string@9.1.1: dependencies: decode-uri-component: 0.4.1 @@ -3592,6 +3169,9 @@ snapshots: require-directory@2.1.1: {} + require-from-string@2.0.2: + optional: true + resolve-pkg-maps@1.0.0: {} reusify@1.0.4: {} @@ -3627,35 +3207,15 @@ snapshots: scheduler@0.25.0: {} - semver@6.3.1: {} - - side-channel-list@1.0.0: + schema-utils@4.3.3: dependencies: - es-errors: 1.3.0 - object-inspect: 1.13.4 - - side-channel-map@1.0.1: - dependencies: - call-bound: 1.0.3 - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - object-inspect: 1.13.4 - - side-channel-weakmap@1.0.2: - dependencies: - call-bound: 1.0.3 - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - object-inspect: 1.13.4 - side-channel-map: 1.0.1 + '@types/json-schema': 7.0.15 + ajv: 8.20.0 + ajv-formats: 2.1.1(ajv@8.20.0) + ajv-keywords: 5.1.0(ajv@8.20.0) + optional: true - side-channel@1.1.0: - dependencies: - es-errors: 1.3.0 - object-inspect: 1.13.4 - side-channel-list: 1.0.0 - side-channel-map: 1.0.1 - side-channel-weakmap: 1.0.2 + semver@6.3.1: {} sirv@3.0.0: dependencies: @@ -3686,14 +3246,30 @@ snapshots: dependencies: ansi-regex: 5.0.1 - strip-outer@1.0.1: - dependencies: - escape-string-regexp: 1.0.5 - supports-color@5.5.0: dependencies: has-flag: 3.0.0 + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + optional: true + + tapable@2.3.3: + optional: true + + terser-webpack-plugin@5.6.0(esbuild@0.24.2)(postcss@8.5.1)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1)): + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + jest-worker: 27.5.1 + schema-utils: 4.3.3 + terser: 5.38.0 + webpack: 5.106.2(esbuild@0.24.2)(postcss@8.5.1) + optionalDependencies: + esbuild: 0.24.2 + postcss: 8.5.1 + optional: true + terser@5.38.0: dependencies: '@jridgewell/source-map': 0.3.6 @@ -3702,6 +3278,8 @@ snapshots: source-map-support: 0.5.21 optional: true + tiny-lru@11.4.7: {} + tinyexec@0.3.2: {} tinyglobby@0.2.10: @@ -3715,10 +3293,6 @@ snapshots: totalist@3.0.1: {} - trim-repeated@1.0.0: - dependencies: - escape-string-regexp: 1.0.5 - ts-lit-plugin@2.0.2: dependencies: lit-analyzer: 2.0.3 @@ -3754,9 +3328,7 @@ snapshots: undici-types@6.20.0: optional: true - universalify@0.1.2: {} - - unocss@65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)): + unocss@65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1)))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)): dependencies: '@unocss/astro': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) '@unocss/cli': 65.4.3(rollup@4.34.4) @@ -3776,7 +3348,7 @@ snapshots: '@unocss/transformer-variant-group': 65.4.3 '@unocss/vite': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) optionalDependencies: - '@unocss/webpack': 65.4.3(rollup@4.34.4) + '@unocss/webpack': 65.4.3(rollup@4.34.4)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1)) vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) transitivePeerDependencies: - postcss @@ -3790,16 +3362,23 @@ snapshots: webpack-virtual-modules: 0.6.2 optional: true + untitled-pixi-live2d-engine@1.1.0(@pixi/sound@6.0.1(pixi.js@8.18.1))(pixi.js@8.18.1): + dependencies: + '@pixi/sound': 6.0.1(pixi.js@8.18.1) + pixi.js: 8.18.1 + update-browserslist-db@1.1.2(browserslist@4.24.4): dependencies: browserslist: 4.24.4 escalade: 3.2.0 picocolors: 1.1.1 - url@0.11.4: + update-browserslist-db@1.2.3(browserslist@4.28.2): dependencies: - punycode: 1.4.1 - qs: 6.14.0 + browserslist: 4.28.2 + escalade: 3.2.0 + picocolors: 1.1.1 + optional: true vite-tsconfig-paths@5.1.4(typescript@5.7.3)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2)): dependencies: @@ -3860,6 +3439,12 @@ snapshots: optionalDependencies: typescript: 5.7.3 + watchpack@2.5.1: + dependencies: + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + optional: true + web-component-analyzer@2.0.0: dependencies: fast-glob: 3.3.3 @@ -3870,17 +3455,59 @@ snapshots: webpack-sources@3.2.3: optional: true + webpack-sources@3.4.1: + optional: true + webpack-virtual-modules@0.6.2: optional: true + webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1): + dependencies: + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.9 + '@types/json-schema': 7.0.15 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + acorn: 8.16.0 + acorn-import-phases: 1.0.4(acorn@8.16.0) + browserslist: 4.28.2 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.21.3 + es-module-lexer: 2.1.0 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + loader-runner: 4.3.2 + mime-db: 1.54.0 + neo-async: 2.6.2 + schema-utils: 4.3.3 + tapable: 2.3.3 + terser-webpack-plugin: 5.6.0(esbuild@0.24.2)(postcss@8.5.1)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1)) + watchpack: 2.5.1 + webpack-sources: 3.4.1 + transitivePeerDependencies: + - '@minify-html/node' + - '@swc/core' + - '@swc/css' + - '@swc/html' + - clean-css + - cssnano + - csso + - esbuild + - html-minifier-terser + - lightningcss + - postcss + - uglify-js + optional: true + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - wrappy@1.0.2: {} - y18n@5.0.8: {} yallist@3.1.1: {} From 16a643354487ba87f17b3350432d922d8e660c95 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Wed, 13 May 2026 16:36:43 +0800 Subject: [PATCH 18/26] docs: archive renderer migration spec Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../.openspec.yaml | 2 + .../design.md | 76 +++++++++++++++++++ .../proposal.md | 25 ++++++ .../multi-cubism-live2d-rendering/spec.md | 34 +++++++++ .../tasks.md | 16 ++++ .../multi-cubism-live2d-rendering/spec.md | 34 +++++++++ 6 files changed, 187 insertions(+) create mode 100644 openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/.openspec.yaml create mode 100644 openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/design.md create mode 100644 openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/proposal.md create mode 100644 openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/specs/multi-cubism-live2d-rendering/spec.md create mode 100644 openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/tasks.md create mode 100644 openspec/specs/multi-cubism-live2d-rendering/spec.md diff --git a/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/.openspec.yaml b/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/.openspec.yaml new file mode 100644 index 0000000..93831bd --- /dev/null +++ b/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-05-13 diff --git a/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/design.md b/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/design.md new file mode 100644 index 0000000..7326118 --- /dev/null +++ b/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/design.md @@ -0,0 +1,76 @@ +## Context + +The current frontend renderer lives in `packages/live2d/src/live2d/model.ts` and is tightly coupled to `pixi-live2d-display` plus PixiJS v6-style initialization. It imports both legacy Cubism runtime scripts, creates a `PIXI.Application` directly from the target canvas, loads models from the existing backend `get/?id=-` endpoint, and exposes toolbar-facing methods for model switching, texture switching, and screenshot capture. + +The replacement engine, `untitled-pixi-live2d-engine`, targets PixiJS v8 and explicitly supports Cubism 2 / 3 / 4 / 5. That introduces a dependency upgrade, renderer bootstrap changes, and some API adaptation work, but the surrounding widget, event system, backend endpoints, and UnoCSS-driven UI should remain stable. + +## Goals / Non-Goals + +**Goals:** +- Move the renderer in `packages/live2d` to `untitled-pixi-live2d-engine`. +- Support Cubism 2 / 3 / 4 / 5 model assets without changing the current backend endpoint contract. +- Preserve the public widget lifecycle and existing tool behaviors (`loadModel`, `loadRandTextures`, `loadOtherModel`, `capture`). +- Keep the plugin's frontend integration self-contained so the server-side injection flow does not need a parallel legacy runtime path. + +**Non-Goals:** +- Redesign the widget UI, tips system, or tool ordering. +- Change backend model management endpoints or add new model metadata APIs unless implementation proves it is strictly required. +- Add new Live2D features from the new engine such as lip-sync, parallel motion, or custom filters in this migration. + +## Decisions + +### 1. Upgrade the frontend renderer stack to PixiJS v8 together with the new Live2D engine + +`untitled-pixi-live2d-engine` is built for PixiJS v8, so the migration should upgrade `pixi.js` and remove `pixi-live2d-display` in the same change. Keeping PixiJS v6 would force compatibility shims around the renderer core and defeat the purpose of moving to a maintained engine. + +**Alternatives considered** +- Stay on `pixi-live2d-display`: rejected because the current maintenance gap is the reason for the change. +- Try to mix PixiJS v8 engine code with PixiJS v6 application code: rejected because the renderer and extraction APIs differ enough to make that fragile. + +### 2. Keep a stable `Model` wrapper and adapt engine-specific behavior behind it + +The widget and tooling already depend on the `Model` class methods in `packages/live2d/src/live2d/model.ts`. The migration should preserve that wrapper shape and refactor its internals so the rest of the component tree, custom tools, and event dispatch continue to work unchanged. + +**Alternatives considered** +- Expose the engine model directly to the rest of the app: rejected because it would spread migration work across many files and make future renderer swaps harder. +- Keep the old wrapper and add a second parallel runtime: rejected because it would increase bundle and maintenance complexity without a clear need. + +### 3. Use the engine entrypoint that can handle both legacy and modern Cubism runtimes + +The current backend endpoints return asset URLs but do not expose Cubism generation metadata that the frontend can rely on ahead of time. The migration should therefore use the engine entrypoint that supports both legacy and modern Cubism models, while continuing to ship the required `live2d.min.js` and `live2dcubismcore.min.js` assets. + +**Alternatives considered** +- Dynamically choose `cubism-legacy` vs `cubism` engine entrypoints per model: rejected for now because the current API does not provide a reliable version discriminator. +- Add a backend metadata endpoint first: rejected because it expands scope beyond the renderer replacement. + +### 4. Preserve current model loading and toolbar workflows, but update Pixi bootstrap and extraction to v8-compatible patterns + +The migrated runtime should continue to: +- resolve the initial model and texture IDs from config/local storage, +- fetch switch/texture data from the existing endpoints, +- emit the same user-facing messages, +- expose screenshot capture through the toolbar. + +Internally, the Pixi application bootstrap, stage cleanup, and screenshot extraction should be rewritten for the v8 stack and validated inside the existing `live2d-canvas` lifecycle. + +**Alternatives considered** +- Change tool behavior during the migration: rejected because the user-facing contract is already established and unrelated to engine selection. + +## Risks / Trade-offs + +- **[PixiJS v8 API migration may break canvas initialization or screenshot capture]** → Mitigation: isolate Pixi bootstrap/extract logic inside the `Model` wrapper and validate the current tool flows against the upgraded runtime. +- **[Loading both Cubism runtimes keeps bundle/runtime cost higher than a version-specific path]** → Mitigation: keep the current deferred page initialization and revisit per-model runtime selection in a later optimization change if needed. +- **[Backend model assets may expose edge cases the old engine tolerated differently]** → Mitigation: preserve endpoint contracts, surface load failures clearly, and test representative Cubism 2 and Cubism 3/4/5 models during implementation. + +## Migration Plan + +1. Replace frontend dependencies and regenerate the lockfile/build output required by the package. +2. Refactor `packages/live2d/src/live2d/model.ts` to initialize PixiJS v8 and `untitled-pixi-live2d-engine` behind the existing `Model` API. +3. Update any affected component/runtime integration points, including canvas initialization and screenshot extraction. +4. Validate that initial load, switch model, switch texture, and screenshot flows still work against the current backend endpoints. +5. Roll back by reverting the dependency/runtime changes if the new engine cannot load the existing model inventory safely. + +## Open Questions + +- Does the chosen engine integration require adding `@pixi/sound` immediately for the current feature set, or only when lip-sync/audio APIs are used? +- Do the plugin's existing model assets include at least one Cubism 2 model and one Cubism 3/4/5 model that can be used as regression fixtures during implementation? diff --git a/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/proposal.md b/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/proposal.md new file mode 100644 index 0000000..8e07aed --- /dev/null +++ b/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/proposal.md @@ -0,0 +1,25 @@ +## Why + +The frontend Live2D runtime currently depends on `pixi-live2d-display`, an unmaintained renderer tied to an older PixiJS stack. That blocks reliable support for newer Cubism model formats and makes future renderer fixes increasingly risky. + +## What Changes + +- Replace the frontend renderer dependency in `packages/live2d` from `pixi-live2d-display` to `untitled-pixi-live2d-engine`. +- Upgrade the Live2D canvas/runtime integration so the plugin can render Cubism 2 / 3 / 4 / 5 models through the new engine. +- Keep the existing plugin-facing behavior for model loading, model switching, texture switching, screenshot capture, and event dispatch while adapting the underlying renderer implementation. +- Preserve compatibility with the current backend model endpoints (`get`, `switch`, `rand_textures`) so the server contract does not need to change for this migration. +- Refresh package/build metadata and bundled runtime loading so the new renderer's PixiJS and Cubism requirements are satisfied in the shipped frontend bundle. + +## Capabilities + +### New Capabilities +- `multi-cubism-live2d-rendering`: Render Live2D models in the plugin with a maintained Pixi-based engine that supports Cubism 2 / 3 / 4 / 5 while preserving the current widget lifecycle and user tools. + +### Modified Capabilities +- None. + +## Impact + +- Affected code: `packages/live2d/package.json`, `packages/live2d/src/live2d/model.ts`, `packages/live2d/src/components/Live2dCanvas.tsx`, and related runtime/tool integration files. +- Dependencies: replace `pixi-live2d-display`, upgrade `pixi.js`, and align bundled Cubism runtime assets with the new engine. +- Systems: frontend rendering pipeline, model lifecycle handling, screenshot extraction, and compatibility with existing Live2D API responses. diff --git a/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/specs/multi-cubism-live2d-rendering/spec.md b/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/specs/multi-cubism-live2d-rendering/spec.md new file mode 100644 index 0000000..dddf699 --- /dev/null +++ b/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/specs/multi-cubism-live2d-rendering/spec.md @@ -0,0 +1,34 @@ +## ADDED Requirements + +### Requirement: Plugin SHALL render supported Live2D models through the maintained renderer +The plugin SHALL replace `pixi-live2d-display` with a maintained renderer integration that can load the plugin's configured Live2D assets for Cubism 2 / 3 / 4 / 5 models. + +#### Scenario: Initial widget load uses the maintained renderer +- **WHEN** the widget initializes on a supported desktop page with a configured default model +- **THEN** the frontend runtime MUST create the Live2D scene with the maintained renderer stack +- **AND** the requested model asset from the existing backend `get` endpoint MUST be rendered in the canvas + +### Requirement: Existing model interaction flows SHALL remain available after the renderer migration +The plugin SHALL preserve the current model interaction flows exposed by the widget runtime so that renderer replacement does not break end-user tools. + +#### Scenario: Switching to another model keeps using the current backend contract +- **WHEN** a user triggers the switch-model tool +- **THEN** the frontend runtime MUST request the next model from the existing `switch` endpoint +- **AND** the returned model MUST replace the current model in the canvas without requiring a page reload + +#### Scenario: Switching model textures keeps using the current backend contract +- **WHEN** a user triggers the switch-texture tool for a model that has alternate textures +- **THEN** the frontend runtime MUST request the next texture from the existing `rand_textures` endpoint +- **AND** the returned texture selection MUST be rendered on the current model canvas + +#### Scenario: Capturing a screenshot remains available +- **WHEN** a user triggers the screenshot tool after a model has loaded +- **THEN** the runtime MUST export the current canvas content as an image download + +### Requirement: Renderer migration SHALL not require a new server-side model metadata API +The renderer migration SHALL work with the plugin's current server-side model loading endpoints and injected configuration contract. + +#### Scenario: Existing initialization contract remains sufficient +- **WHEN** the frontend runtime receives the same injected config fields used by the current widget +- **THEN** it MUST determine the initial model and texture selection without requiring additional backend metadata fields +- **AND** it MUST continue loading the model through the current API path conventions diff --git a/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/tasks.md b/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/tasks.md new file mode 100644 index 0000000..c251030 --- /dev/null +++ b/openspec/changes/archive/2026-05-13-replace-live2d-renderer-engine/tasks.md @@ -0,0 +1,16 @@ +## 1. Dependency and runtime setup + +- [x] 1.1 Replace `pixi-live2d-display` with `untitled-pixi-live2d-engine` in `packages/live2d/package.json` and align `pixi.js` with the renderer's supported major version. +- [x] 1.2 Add any required companion dependencies/runtime assets for the new engine and refresh the workspace lockfile/build inputs. + +## 2. Renderer migration + +- [x] 2.1 Refactor `packages/live2d/src/live2d/model.ts` to initialize PixiJS v8 and `untitled-pixi-live2d-engine` behind the existing `Model` wrapper API. +- [x] 2.2 Keep initial model loading compatible with the current config and `get/?id=-` endpoint contract while supporting Cubism 2 / 3 / 4 / 5 assets. +- [x] 2.3 Update model replacement, texture switching, and screenshot export logic to use the new renderer without changing toolbar behavior. + +## 3. Integration and verification + +- [x] 3.1 Adjust any affected component/runtime integration points so `Live2dCanvas` and widget lifecycle events continue to work with the migrated renderer. +- [x] 3.2 Build the frontend package and verify initial load, switch-model, switch-texture, and screenshot flows against representative plugin model assets. +- [x] 3.3 Update directly related documentation or migration notes if dependency/runtime requirements changed for plugin maintainers. diff --git a/openspec/specs/multi-cubism-live2d-rendering/spec.md b/openspec/specs/multi-cubism-live2d-rendering/spec.md new file mode 100644 index 0000000..dddf699 --- /dev/null +++ b/openspec/specs/multi-cubism-live2d-rendering/spec.md @@ -0,0 +1,34 @@ +## ADDED Requirements + +### Requirement: Plugin SHALL render supported Live2D models through the maintained renderer +The plugin SHALL replace `pixi-live2d-display` with a maintained renderer integration that can load the plugin's configured Live2D assets for Cubism 2 / 3 / 4 / 5 models. + +#### Scenario: Initial widget load uses the maintained renderer +- **WHEN** the widget initializes on a supported desktop page with a configured default model +- **THEN** the frontend runtime MUST create the Live2D scene with the maintained renderer stack +- **AND** the requested model asset from the existing backend `get` endpoint MUST be rendered in the canvas + +### Requirement: Existing model interaction flows SHALL remain available after the renderer migration +The plugin SHALL preserve the current model interaction flows exposed by the widget runtime so that renderer replacement does not break end-user tools. + +#### Scenario: Switching to another model keeps using the current backend contract +- **WHEN** a user triggers the switch-model tool +- **THEN** the frontend runtime MUST request the next model from the existing `switch` endpoint +- **AND** the returned model MUST replace the current model in the canvas without requiring a page reload + +#### Scenario: Switching model textures keeps using the current backend contract +- **WHEN** a user triggers the switch-texture tool for a model that has alternate textures +- **THEN** the frontend runtime MUST request the next texture from the existing `rand_textures` endpoint +- **AND** the returned texture selection MUST be rendered on the current model canvas + +#### Scenario: Capturing a screenshot remains available +- **WHEN** a user triggers the screenshot tool after a model has loaded +- **THEN** the runtime MUST export the current canvas content as an image download + +### Requirement: Renderer migration SHALL not require a new server-side model metadata API +The renderer migration SHALL work with the plugin's current server-side model loading endpoints and injected configuration contract. + +#### Scenario: Existing initialization contract remains sufficient +- **WHEN** the frontend runtime receives the same injected config fields used by the current widget +- **THEN** it MUST determine the initial model and texture selection without requiring additional backend metadata fields +- **AND** it MUST continue loading the model through the current API path conventions From d81b4b9a6d36b54cf9575f46e43723184fd93051 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 14 May 2026 15:25:00 +0800 Subject: [PATCH 19/26] feat: improve live2d widget parity Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../.openspec.yaml | 2 + .../design.md | 29 ++ .../proposal.md | 23 + .../live2d-widget-behavior-parity/spec.md | 14 + .../tasks.md | 4 + .../.openspec.yaml | 2 + .../design.md | 46 ++ .../proposal.md | 23 + .../live2d-widget-behavior-parity/spec.md | 21 + .../tasks.md | 13 + .../live2d-widget-behavior-parity/spec.md | 21 + packages/live2d/.gitignore | 1 + .../src/components/Live2dChatWindow.tsx | 236 +++++---- packages/live2d/src/components/Live2dTips.tsx | 23 +- .../live2d/src/components/Live2dToggle.tsx | 67 +-- .../live2d/src/components/Live2dTools.tsx | 16 +- .../live2d/src/components/Live2dWidget.tsx | 212 +++++--- packages/live2d/src/config/default-config.ts | 2 +- packages/live2d/src/events/tip-events.ts | 15 +- .../src/helpers/loadFullTipsResource.ts | 17 + .../live2d/src/helpers/loadTipsResource.ts | 135 ++++- packages/live2d/src/helpers/widgetDrawer.ts | 3 + .../live2d/src/helpers/widgetVisibility.ts | 37 ++ packages/live2d/src/live2d/console-status.ts | 53 ++ packages/live2d/src/live2d/model.ts | 466 +++++++++--------- .../live2d/src/live2d/tools/custom-tool.ts | 68 +-- packages/live2d/src/live2d/tools/exit.ts | 27 +- packages/live2d/src/live2d/tools/hitokoto.ts | 5 + .../live2d/src/live2d/tools/switch-model.ts | 7 +- .../live2d/src/live2d/tools/switch-texture.ts | 7 +- packages/live2d/src/live2d/tools/tools.ts | 26 +- packages/live2d/tsconfig.tsbuildinfo | 2 +- 32 files changed, 1093 insertions(+), 530 deletions(-) create mode 100644 openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/.openspec.yaml create mode 100644 openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/design.md create mode 100644 openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/proposal.md create mode 100644 openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/specs/live2d-widget-behavior-parity/spec.md create mode 100644 openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/tasks.md create mode 100644 openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/.openspec.yaml create mode 100644 openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/design.md create mode 100644 openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/proposal.md create mode 100644 openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/specs/live2d-widget-behavior-parity/spec.md create mode 100644 openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/tasks.md create mode 100644 openspec/specs/live2d-widget-behavior-parity/spec.md create mode 100644 packages/live2d/src/helpers/loadFullTipsResource.ts create mode 100644 packages/live2d/src/helpers/widgetDrawer.ts create mode 100644 packages/live2d/src/helpers/widgetVisibility.ts create mode 100644 packages/live2d/src/live2d/console-status.ts diff --git a/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/.openspec.yaml b/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/.openspec.yaml new file mode 100644 index 0000000..93831bd --- /dev/null +++ b/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-05-13 diff --git a/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/design.md b/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/design.md new file mode 100644 index 0000000..24ca147 --- /dev/null +++ b/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/design.md @@ -0,0 +1,29 @@ +## Context + +The Lit-based frontend has already replaced the legacy autoload script for rendering, tips dispatch, and toolbar actions. After narrowing the parity review, the confirmed missing feature is specific: when a configured full TIPS source fails to load, the modern runtime does not fall back to the bundled `live2d-tips.json` file the way the legacy script did. + +Other previously discussed items are intentionally excluded from this change. In particular, `hitokoto` handling is currently treated as standardized behavior in the new runtime rather than a confirmed feature regression, and broader lifecycle or config-compatibility items are treated as follow-up optimizations unless they later prove to be user-facing breakages. + +## Goals / Non-Goals + +**Goals:** +- Restore the legacy tips fallback contract in a typed, explicit way. +- Keep the modern component architecture, UnoCSS styling, and event-driven runtime unchanged outside the fallback fix. +- Limit the work to the one confirmed user-facing parity gap. + +**Non-Goals:** +- Recreate the legacy autoload DOM structure or CSS implementation. +- Change backend API contracts or toolbar behavior. +- Reclassify standardization or optimization items as feature regressions without new evidence. + +## Decisions + +### Make tips loading return an explicit success-or-fallback signal +The legacy script treated a missing or invalid configured tips file as a trigger to fall back to the bundled default tips. The modern loader currently resolves an empty object on failure, which prevents the fallback branch from being reached. The replacement should make the fallback decision explicit by distinguishing “loaded tip config” from “failed/empty result,” then merging plugin/theme/default tips only after the full source is chosen. + +**Alternative considered:** keep the current helper shape and infer failure from empty objects later. This keeps call sites unchanged, but it is brittle because an empty object is also a valid JavaScript value and silently hides fallback decisions. + +## Risks / Trade-offs + +- **Tips fallback changes may alter current edge-case behavior for malformed custom files** → Keep the merge order unchanged and only change the source-selection decision when the configured full tips file is unusable. +- **A narrow fix can leave adjacent cleanup for later** → Explicitly document that the current scope is intentionally limited to the confirmed TIPS fallback regression. diff --git a/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/proposal.md b/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/proposal.md new file mode 100644 index 0000000..af5ce50 --- /dev/null +++ b/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/proposal.md @@ -0,0 +1,23 @@ +## Why + +The modern Live2D runtime already covers the rendering, tool, and most tip flows. After narrowing the comparison with `src/main/resources/static/js/live2d-autoload.js`, the only clear missing user-facing feature is that a broken or unavailable custom full TIPS source no longer falls back to the bundled default TIPS file. + +## What Changes + +- Restore the legacy full-TIPS fallback contract so the bundled default `live2d-tips.json` is used when a configured custom `tipsPath` resource is missing or invalid. +- Keep the modern Lit and UnoCSS architecture while correcting the source-selection logic for full TIPS loading. +- Add regression coverage for the fallback chain so future refactors do not silently drop default TIPS behavior again. +- Record that other previously discussed items, such as `hitokoto` response handling, are currently treated as standardization or optimization rather than confirmed missing features. + +## Capabilities + +### New Capabilities +- `live2d-widget-behavior-parity`: Preserve the remaining confirmed user-facing parity gap by restoring bundled default TIPS fallback when custom full TIPS loading fails. + +### Modified Capabilities + +## Impact + +- Affected code: `packages/live2d/src/events/tip-events.ts`, `packages/live2d/src/helpers/loadTipsResource.ts` +- Affected behavior: fallback from configured `tipsPath` to bundled default full TIPS +- No backend API or UI surface expansion is required; changes stay within the existing frontend tip-loading flow diff --git a/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/specs/live2d-widget-behavior-parity/spec.md b/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/specs/live2d-widget-behavior-parity/spec.md new file mode 100644 index 0000000..6331fb7 --- /dev/null +++ b/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/specs/live2d-widget-behavior-parity/spec.md @@ -0,0 +1,14 @@ +## ADDED Requirements + +### Requirement: Full tips sources SHALL fall back to the bundled defaults when unavailable +The runtime SHALL continue using plugin tips and theme tips, but it MUST fall back to the bundled full tips file when a configured full tips source cannot be loaded or parsed. + +#### Scenario: Missing custom tips file falls back to bundled defaults +- **WHEN** `tipsPath` is configured and the referenced resource cannot be fetched successfully +- **THEN** the runtime MUST load the bundled `live2d-tips.json` file as the full tips source +- **AND** plugin-level and theme-level tips MUST still be merged with that fallback source using the existing priority order + +#### Scenario: Invalid custom tips file falls back to bundled defaults +- **WHEN** `tipsPath` points to a resource whose response cannot be parsed into the expected tips structure +- **THEN** the runtime MUST ignore that invalid full tips source +- **AND** it MUST continue initialization with the bundled default full tips file diff --git a/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/tasks.md b/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/tasks.md new file mode 100644 index 0000000..ab7abb3 --- /dev/null +++ b/openspec/changes/archive/2026-05-13-complete-live2d-modernization-parity/tasks.md @@ -0,0 +1,4 @@ +## 1. TIPS fallback parity + +- [x] 1.1 Refactor full tips loading so missing or invalid configured `tipsPath` resources fall back to the bundled `live2d-tips.json` file before merge. +- [x] 1.2 Add regression coverage for the fallback chain so default full TIPS remain available when custom full TIPS loading fails. diff --git a/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/.openspec.yaml b/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/.openspec.yaml new file mode 100644 index 0000000..66dd08a --- /dev/null +++ b/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-05-14 diff --git a/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/design.md b/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/design.md new file mode 100644 index 0000000..07c775b --- /dev/null +++ b/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/design.md @@ -0,0 +1,46 @@ +## Context + +`packages/live2d` has replaced most of `live2d-autoload.js` with Lit components, typed config normalization, and modular tools. The remaining gaps are not renderer-level gaps anymore; they are compatibility gaps in widget lifecycle and console status behavior. + +Today the modern widget unmounts the canvas subtree when it is hidden, which forces model recreation and re-runs initialization flows on reopen. The modern runtime also normalizes `consoleShowStatu`, but it only logs model-load completion instead of preserving the legacy console status output. + +## Goals / Non-Goals + +**Goals:** +- Preserve the modern Lit/UnoCSS architecture while restoring the remaining user-visible legacy behaviors that still matter. +- Keep widget hide/show behavior stateful within the same page session so reopen does not recreate the runtime unnecessarily. +- Reintroduce the `consoleShowStatu` compatibility behavior in a maintainable way. + +**Non-Goals:** +- Reintroduce legacy DOM structure, legacy CSS files, or script-loader based initialization. +- Change backend APIs or introduce new server-side endpoints. +- Change the current hitokoto implementation beyond leaving it in its present modernized state. +- Achieve byte-for-byte parity with the old script where the modern implementation is intentionally better. + +## Decisions + +### Keep the widget subtree mounted and separate visibility from initialization +The modern runtime should stop using conditional rendering to remove the widget subtree on hide. Instead, the widget should mount once, keep the canvas/tools/tips subtree alive, and switch between visible and hidden presentation states. + +This preserves the current model instance, avoids repeat model fetches on reopen, and matches the legacy expectation that dismissing the widget is a temporary hide instead of a teardown. The alternative was to keep the current remount behavior and patch over the regressions with cache/localStorage state, but that still recreates listeners and model state and would not match the legacy behavior as closely. + +### Extract console compatibility output into a dedicated helper +The legacy `consoleShowStatu` behavior combined a compatibility banner with status logging. The modern runtime should implement that as an explicit helper with stable metadata constants instead of reproducing the obfuscated legacy snippet. + +This keeps the behavior readable and testable while preserving the observable contract exposed by the legacy config flag. The alternative was to leave the partial implementation in `model.ts`, but that would continue to advertise compatibility without actually providing the legacy output. + +## Risks / Trade-offs + +- **[Risk]** Keeping the widget mounted means the renderer stays alive while hidden. → **Mitigation:** only preserve state within the current page session and continue using the existing explicit quit/toggle controls instead of background polling or reloading. +- **[Risk]** Console compatibility output may diverge from the old banner formatting. → **Mitigation:** preserve the same information contract (`version`, `updateTime`, and status intent) without copying the obfuscated implementation. + +## Migration Plan + +1. Add spec coverage for widget lifecycle parity and console status compatibility. +2. Refactor the widget visibility flow so quit/toggle hide the mounted runtime instead of tearing it down. +3. Add a console compatibility helper and wire it to normalized config flags. +4. Verify the existing modern runtime still preserves the already-migrated renderer and tips behaviors. + +## Open Questions + +- None. The remaining gaps are well-defined by the legacy script and current implementation. diff --git a/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/proposal.md b/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/proposal.md new file mode 100644 index 0000000..8810df6 --- /dev/null +++ b/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/proposal.md @@ -0,0 +1,23 @@ +## Why + +`packages/live2d` has already modernized most of the legacy `live2d-autoload.js` runtime, but a few legacy behaviors still have no equivalent or have regressed during the migration. Capturing those gaps now gives the project a concrete parity target before the old script stops being the functional reference. + +## What Changes + +- Audit the remaining behavior gaps between `packages/live2d` and `src/main/resources/static/js/live2d-autoload.js`, then codify the ones that should still be preserved in the modern runtime. +- Restore the legacy dismiss/reopen behavior so hiding the widget does not unnecessarily destroy and recreate the mounted runtime state during the same page session. +- Restore the `consoleShowStatu` compatibility contract so the modern runtime still exposes the legacy console status output beyond the current model-load log line. + +## Capabilities + +### New Capabilities +- None. + +### Modified Capabilities +- `live2d-widget-behavior-parity`: expand parity requirements to cover the remaining legacy widget lifecycle and console status behaviors that are still missing from the modernized frontend. + +## Impact + +- Affected code: `packages/live2d/src/components/*`, `packages/live2d/src/live2d/model.ts`, and related config/runtime helpers where compatibility behavior is defined. +- Affected behavior: widget hide/show lifecycle, console compatibility output, and parity expectations tracked in OpenSpec. +- No backend API changes are expected; the work stays within the existing frontend runtime and current server contracts. diff --git a/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/specs/live2d-widget-behavior-parity/spec.md b/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/specs/live2d-widget-behavior-parity/spec.md new file mode 100644 index 0000000..37f211a --- /dev/null +++ b/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/specs/live2d-widget-behavior-parity/spec.md @@ -0,0 +1,21 @@ +## ADDED Requirements + +### Requirement: Widget dismissal SHALL preserve mounted runtime state during the current page session +The modern widget SHALL treat quit and toggle dismissal as a visibility change instead of tearing down the mounted runtime subtree, so the current model and tool state remain available when the widget is reopened on the same page. + +#### Scenario: Quit hides the mounted widget without resetting the current model +- **WHEN** a user dismisses the widget through the `quit` tool after switching to another model or texture +- **THEN** the widget MUST transition to a hidden state without recreating the Live2D runtime immediately +- **AND** reopening the widget during the same page session MUST continue from the current model state instead of reloading the default model + +#### Scenario: Reopening after dismissal does not duplicate initialization side effects +- **WHEN** the widget is hidden and then shown again on the same page +- **THEN** the runtime MUST not register duplicate tip listeners or re-run first-open initialization solely because of that visibility change + +### Requirement: Console status compatibility SHALL remain available through the legacy config flag +When `consoleShowStatus` or its legacy alias `consoleShowStatu` is enabled, the modern runtime SHALL preserve the observable console compatibility output expected from the legacy widget runtime. + +#### Scenario: Console compatibility output includes widget metadata and load status +- **WHEN** the widget initializes with console status output enabled +- **THEN** the runtime MUST emit readable console output that includes the plugin version/update metadata represented by the legacy runtime +- **AND** it MUST continue emitting model load completion status for the requested model selection diff --git a/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/tasks.md b/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/tasks.md new file mode 100644 index 0000000..2b7bca0 --- /dev/null +++ b/openspec/changes/archive/2026-05-14-complete-live2d-modernization-parity/tasks.md @@ -0,0 +1,13 @@ +## 1. Widget lifecycle parity + +- [x] 1.1 Refactor `Live2dWidget` and related components so hide/show toggles visibility without unmounting the mounted runtime subtree during the same page session. +- [x] 1.2 Keep quit/toggle dismissal behavior compatible with the legacy 24-hour suppression flow while preventing duplicate initialization side effects on reopen. + +## 2. Compatibility behavior restoration + +- [x] 2.1 Add a readable console compatibility helper that restores the legacy `consoleShowStatu` metadata/status output through the normalized config flag. + +## 3. Validation + +- [x] 3.1 Add or update coverage for the restored parity behaviors at the spec-relevant frontend layer. +- [x] 3.2 Run the existing package build and relevant checks to confirm the modern runtime still works after the parity fixes. diff --git a/openspec/specs/live2d-widget-behavior-parity/spec.md b/openspec/specs/live2d-widget-behavior-parity/spec.md new file mode 100644 index 0000000..37f211a --- /dev/null +++ b/openspec/specs/live2d-widget-behavior-parity/spec.md @@ -0,0 +1,21 @@ +## ADDED Requirements + +### Requirement: Widget dismissal SHALL preserve mounted runtime state during the current page session +The modern widget SHALL treat quit and toggle dismissal as a visibility change instead of tearing down the mounted runtime subtree, so the current model and tool state remain available when the widget is reopened on the same page. + +#### Scenario: Quit hides the mounted widget without resetting the current model +- **WHEN** a user dismisses the widget through the `quit` tool after switching to another model or texture +- **THEN** the widget MUST transition to a hidden state without recreating the Live2D runtime immediately +- **AND** reopening the widget during the same page session MUST continue from the current model state instead of reloading the default model + +#### Scenario: Reopening after dismissal does not duplicate initialization side effects +- **WHEN** the widget is hidden and then shown again on the same page +- **THEN** the runtime MUST not register duplicate tip listeners or re-run first-open initialization solely because of that visibility change + +### Requirement: Console status compatibility SHALL remain available through the legacy config flag +When `consoleShowStatus` or its legacy alias `consoleShowStatu` is enabled, the modern runtime SHALL preserve the observable console compatibility output expected from the legacy widget runtime. + +#### Scenario: Console compatibility output includes widget metadata and load status +- **WHEN** the widget initializes with console status output enabled +- **THEN** the runtime MUST emit readable console output that includes the plugin version/update metadata represented by the legacy runtime +- **AND** it MUST continue emitting model load completion status for the requested model selection diff --git a/packages/live2d/.gitignore b/packages/live2d/.gitignore index 38d7344..80fc0d9 100644 --- a/packages/live2d/.gitignore +++ b/packages/live2d/.gitignore @@ -6,6 +6,7 @@ # Dist node_modules dist/ +*.tsbuildinfo # IDE .vscode/* diff --git a/packages/live2d/src/components/Live2dChatWindow.tsx b/packages/live2d/src/components/Live2dChatWindow.tsx index 984fa71..9998a18 100644 --- a/packages/live2d/src/components/Live2dChatWindow.tsx +++ b/packages/live2d/src/components/Live2dChatWindow.tsx @@ -9,13 +9,26 @@ import { consume } from "@lit/context"; import { createComponent } from "@lit/react"; import { type PropertyValues, type TemplateResult, html } from "lit"; import { property, query, state } from "lit/decorators.js"; -import { classMap } from "lit/directives/class-map.js"; import React from "react"; import "iconify-icon"; -/** - * Live2d 聊天窗口组件 - */ +const CHAT_PANEL_WIDTH = "min(26rem, calc(100vw - 1rem))"; +const CHAT_PANEL_BOTTOM = "2rem"; +const CHAT_PANEL_TRANSITION_MS = 220; + +type PopoverCapableElement = HTMLDivElement & { + hidePopover: () => void; + showPopover: () => void; +}; + +const isPopoverCapable = ( + element: HTMLDivElement | undefined, +): element is PopoverCapableElement => + !!element && + typeof (element as Partial).showPopover === + "function" && + typeof (element as Partial).hidePopover === "function"; + export class Live2dChatWindow extends UnoLitElement { @consume({ context: configContext }) @property({ attribute: false }) @@ -33,139 +46,122 @@ export class Live2dChatWindow extends UnoLitElement { @query("#live2d-chat-input") private _input?: HTMLInputElement; + @query("#live2d-chat-model") + private _panel?: HTMLDivElement; + private chatApi: ChatApi | null = null; private historyMessages: ChatMessage[] = []; + private _hidePopoverTimer?: number; connectedCallback(): void { super.connectedCallback(); - // 监听聊天窗口切换事件 window.addEventListener("live2d:toggle-chat-window", this.handleToggle); } disconnectedCallback(): void { super.disconnectedCallback(); window.removeEventListener("live2d:toggle-chat-window", this.handleToggle); + this.clearHidePopoverTimer(); } render(): TemplateResult { - const containerClasses = { - "opacity-100": this._isShow, - "opacity-0": !this._isShow, - "pointer-events-none": !this._isShow, - }; - - const sendButtonClasses = { - active: this._canSend && !this._isLoading, - }; + const positionStyle = `inset: auto auto ${CHAT_PANEL_BOTTOM} 50%; margin: 0; width: ${CHAT_PANEL_WIDTH}; transform: translateX(-50%); transition: opacity ${CHAT_PANEL_TRANSITION_MS}ms ease;`; + const panelClasses = [ + "fixed z-[10000] overflow-hidden rounded-full border border-[#eadfce] bg-[#fffaf4]/96 shadow-[0_10px_24px_rgba(15,23,42,0.08)] backdrop-blur-sm will-change-[opacity]", + this._isShow + ? "pointer-events-auto opacity-100" + : "pointer-events-none opacity-0", + ].join(" "); + const sendButtonClass = + this._canSend && !this._isLoading + ? "bg-[#ffab5c] text-white shadow-[0_6px_16px_rgba(255,171,92,0.25)] hover:bg-[#ff9840]" + : "bg-[#eee7de] text-slate-400 cursor-not-allowed"; return html`
-
-
- -
-
- - ${ - this._isLoading - ? html` + +
+ } + +
`; } - /** - * 切换聊天窗口显示状态 - */ handleToggle = (): void => { - this._isShow = !this._isShow; if (this._isShow) { - this.updateComplete.then(() => { - this._input?.focus(); - }); + this.hideChat(); return; } - // 隐藏时清空输入 - if (this._input) { - this._input.value = ""; - this._canSend = false; - } + void this.showChat(); }; - /** - * 处理输入变化 - */ - handleInput(e: Event): void { + handleInput = (e: Event): void => { const input = e.target as HTMLInputElement; this._canSend = input.value.length > 0 && !this._isLoading; - } + }; - /** - * 处理键盘事件 - */ - handleKeydown(e: KeyboardEvent): void { + handleKeydown = (e: KeyboardEvent): void => { if (e.key === "Enter") { - this.sendMessage(); + e.preventDefault(); + void this.sendMessage(); } if (e.key === "Escape") { - this._isShow = false; + this.handleToggle(); } - } + }; - /** - * 处理发送按钮点击 - */ - handleSend(): void { + handleSend = (): void => { if (this._canSend && !this._isLoading) { - this.sendMessage(); + void this.sendMessage(); } - } + }; - /** - * 发送消息 - */ private async sendMessage(): Promise { if (!this._input || !this._input.value || this._isLoading) { return; @@ -176,12 +172,10 @@ export class Live2dChatWindow extends UnoLitElement { return; } - // 清空输入框 this._input.value = ""; this._canSend = false; this._isLoading = true; - // 初始化 ChatApi(如果还没有) if (!this.chatApi) { this.chatApi = new ChatApi({ chunkTimeout: Number(this.config?.chunkTimeout || 60), @@ -191,7 +185,6 @@ export class Live2dChatWindow extends UnoLitElement { }); } - // 加载历史消息 const historyJson = localStorage.getItem("historyMessages"); this.historyMessages = historyJson ? JSON.parse(historyJson) : []; @@ -201,23 +194,72 @@ export class Live2dChatWindow extends UnoLitElement { console.error("[Live2dChatWindow] Send message error:", error); } finally { this._isLoading = false; - // 重新检查输入框状态 if (this._input) { this._canSend = this._input.value.length > 0; } } } - /** - * 显示首次使用提示 - */ protected firstUpdated(_changedProperties: PropertyValues): void { super.firstUpdated(_changedProperties); - // 监听输入框获得焦点事件 this._input?.addEventListener("focus", () => { sendMessage("按下回车键可以快速发送消息哦", 2000, 1); }); } + + private async showChat(): Promise { + this.clearHidePopoverTimer(); + await this.updateComplete; + if ( + isPopoverCapable(this._panel) && + !this._panel.matches(":popover-open") + ) { + this._panel.showPopover(); + } + + requestAnimationFrame(() => { + this._isShow = true; + void this.updateComplete.then(() => { + this._input?.focus(); + }); + }); + } + + private hideChat(): void { + this.clearHidePopoverTimer(); + this._isShow = false; + + if (this._input) { + this._input.value = ""; + this._input.blur(); + this._canSend = false; + } + + if ( + !isPopoverCapable(this._panel) || + !this._panel.matches(":popover-open") + ) { + return; + } + + this._hidePopoverTimer = window.setTimeout(() => { + this._hidePopoverTimer = undefined; + if ( + !this._isShow && + isPopoverCapable(this._panel) && + this._panel.matches(":popover-open") + ) { + this._panel.hidePopover(); + } + }, CHAT_PANEL_TRANSITION_MS); + } + + private clearHidePopoverTimer(): void { + if (this._hidePopoverTimer !== undefined) { + window.clearTimeout(this._hidePopoverTimer); + this._hidePopoverTimer = undefined; + } + } } customElements.define("live2d-chat-window", Live2dChatWindow); diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 1fea5b7..78cabd5 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -53,16 +53,31 @@ export class Live2dTips extends UnoLitElement { render(): TemplateResult { const classes = { + "animate-shake": true, + "animate-delay-5s": true, + "min-h-18": true, + "w-63": true, + "bg-tips": true, + border: true, + "border-tips": true, + "border-solid": true, + "rounded-xl": true, + "shadow-tips": true, + "text-size-sm": true, + "overflow-hidden": true, + "px-2.5": true, + "py-1.5": true, + "text-ellipsis": true, + "transition-opacity-1000": true, + "break-all": true, "opacity-100": this._isShow, "opacity-0": !this._isShow, + "select-none": true, }; return html`
${unsafeHTML(this._message)}
diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 18ef171..4583dec 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -4,6 +4,12 @@ import { configContext, } from "@/live2d/context/config-context"; import { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; +import { WIDGET_DRAWER_DURATION_MS } from "@/live2d/helpers/widgetDrawer"; +import { + clearWidgetDismissal, + readWidgetSuppression, + rememberWidgetDismissal, +} from "@/live2d/helpers/widgetVisibility"; import { consume } from "@lit/context"; import { createComponent } from "@lit/react"; import { type TemplateResult, html } from "lit"; @@ -20,28 +26,28 @@ export class Live2dToggle extends UnoLitElement { // 当前工具栏是否显示 private _isShow = false; + private revealTimer?: number; + connectedCallback(): void { super.connectedCallback(); this.addEventListener("click", this.handleClick); window.addEventListener("live2d:toggle-canvas", this.handleGlobalToggle); Promise.resolve().then(() => { - const live2dDisplay = localStorage.getItem("live2d-display"); - if (live2dDisplay) { - if ( - Date.now() - Number.parseInt(live2dDisplay) <= - 24 * 60 * 60 * 1000 - ) { - this.triggerToggleLive2d(false); - return; - } + if (readWidgetSuppression(localStorage)) { + this._isShow = true; + this.requestUpdate(); + return; } - this.triggerToggleLive2d(true); + + clearWidgetDismissal(localStorage); + this.dispatchEvent(new ToggleCanvasEvent({ isShow: true })); }); } disconnectedCallback(): void { super.disconnectedCallback(); + this.clearRevealTimer(); this.removeEventListener("click", this.handleClick); window.removeEventListener("live2d:toggle-canvas", this.handleGlobalToggle); } @@ -64,32 +70,35 @@ export class Live2dToggle extends UnoLitElement { } handleClick() { - this.triggerToggleLive2d(!!this._isShow); - } - - triggerToggleLive2d(isShow: boolean) { - this._isShow = !isShow; - if (isShow) { - localStorage.removeItem("live2d-display"); - } else { - localStorage.setItem("live2d-display", Date.now().toString()); - } - this.dispatchEvent( - new ToggleCanvasEvent({ - isShow, - }), - ); + this.dispatchEvent(new ToggleCanvasEvent({ isShow: this._isShow })); } handleGlobalToggle = (e: Event) => { const event = e as ToggleCanvasEvent; - this._isShow = !event.detail.isShow; if (event.detail.isShow) { - localStorage.removeItem("live2d-display"); - } else { - localStorage.setItem("live2d-display", Date.now().toString()); + this.clearRevealTimer(); + this._isShow = false; + clearWidgetDismissal(localStorage); + return; } + + rememberWidgetDismissal(localStorage); + this.clearRevealTimer(); + this.revealTimer = window.setTimeout(() => { + this.revealTimer = undefined; + this._isShow = true; + this.requestUpdate(); + }, WIDGET_DRAWER_DURATION_MS); }; + + private clearRevealTimer(): void { + if (this.revealTimer === undefined) { + return; + } + + clearTimeout(this.revealTimer); + this.revealTimer = undefined; + } } customElements.define("live2d-toggle", Live2dToggle); diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 71c1f04..63e7f93 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -16,6 +16,8 @@ import React from "react"; import "iconify-icon"; export class Live2dTools extends UnoLitElement { + private static readonly AI_CHAT_TOOL_NAMES = new Set(["chat", "openai"]); + @consume({ context: configContext }) @property({ attribute: false }) public config?: Live2dConfig; @@ -41,7 +43,7 @@ export class Live2dTools extends UnoLitElement { renderTool(tool: Tool): TemplateResult { return html` tool.execute()} + @click=${() => void tool.triggerExecute()} > 0 ? [...this.config.tools] : [...defaultToolNames]; + + const enabledNames = configuredNames.filter((toolName) => { + if (this.config?.isAiChat) { + return true; + } + return !Live2dTools.AI_CHAT_TOOL_NAMES.has(toolName); + }); + if (this.config.isAiChat) { - configuredNames.unshift("chat"); + enabledNames.unshift("chat"); } const mountTool: Tool[] = []; const seen = new Set(); - for (const toolName of configuredNames) { + for (const toolName of enabledNames) { const ToolClass = toolRegistry[toolName]; if (ToolClass) { if (seen.has(toolName)) { diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 0d582bd..97121bb 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -1,7 +1,7 @@ import { UnoLitElement } from "@/live2d/common/UnoLitElement"; import { - type Live2dConfig, - configContext, + type Live2dConfig, + configContext, } from "@/live2d/context/config-context"; import { consume } from "@lit/context"; import { createComponent } from "@lit/react"; @@ -14,102 +14,150 @@ import "@/live2d/components/Live2dCanvas"; import "@/live2d/components/Live2dTools"; import "@/live2d/components/Live2dChatWindow"; import type { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; +import { + WIDGET_DRAWER_DURATION_MS, + WIDGET_DRAWER_HIDDEN_BOTTOM, + WIDGET_DRAWER_VISIBLE_BOTTOM, +} from "@/live2d/helpers/widgetDrawer"; export class Live2dWidget extends UnoLitElement { - @consume({ context: configContext }) - @property({ attribute: false }) - public config?: Live2dConfig; + @consume({ context: configContext }) + @property({ attribute: false }) + public config?: Live2dConfig; + + @state() + private _isShow = false; - @state() - private _isShow = false; + @state() + private _hasMountedWidget = false; - render(): TemplateResult { - return html` + private showAnimationFrameId?: number; + + render(): TemplateResult { + return html` ${this.renderLive2dWidget()} ${this.renderChatWindow()} `; - } + } - renderLive2dTools() { - if (this.config?.isTools) { - return html``; - } - } - - renderLive2dWidget() { - const positionClass = - this.config?.live2dLocation === "right" - ? "right-[50px] left-auto" - : "left-0"; - if (this._isShow) { - return html`
-
- - - ${this.renderLive2dTools()} -
-
`; - } - } - - handleToggleWidget = (e: ToggleCanvasEvent) => { - this._isShow = e.detail.isShow; - this.requestUpdate(); - }; - - /** - * 渲染聊天窗口组件(如果启用了 AI 聊天功能) - */ - renderChatWindow() { - // 检查是否启用了 AI 聊天 - if (this.config?.isAiChat) { - return html``; - } - } - - connectedCallback(): void { - super.connectedCallback(); - // 页面加载时清除历史消息 - // 对应原始代码中的 window.onload - window.addEventListener("load", this.clearChatHistory); - // 监听全局的 toggle-canvas 事件(来自工具或其他地方的触发) - window.addEventListener( - "live2d:toggle-canvas", - this.handleToggleWidget as EventListener, - ); - } - - disconnectedCallback(): void { - super.disconnectedCallback(); - window.removeEventListener("load", this.clearChatHistory); - window.removeEventListener( - "live2d:toggle-canvas", - this.handleToggleWidget as EventListener, - ); - } - - /** - * 清除聊天历史记录 - */ - private clearChatHistory(): void { - localStorage.removeItem("historyMessages"); - } + } + } + + renderLive2dWidget() { + if (!this._hasMountedWidget) { + return; + } + + const positionClass = + this.config?.live2dLocation === "right" + ? "right-[50px] left-auto" + : "left-0"; + const visibilityClass = this._isShow + ? "pointer-events-auto" + : "pointer-events-none"; + const bottom = this._isShow + ? WIDGET_DRAWER_VISIBLE_BOTTOM + : WIDGET_DRAWER_HIDDEN_BOTTOM; + return html`
+
+ + + ${this.renderLive2dTools()} +
+
`; + } + + handleToggleWidget = (e: ToggleCanvasEvent) => { + if (e.detail.isShow && !this._hasMountedWidget) { + this._hasMountedWidget = true; + this.requestUpdate(); + this.scheduleShowAfterMount(); + return; + } + + this.cancelScheduledShow(); + this._isShow = e.detail.isShow; + this.requestUpdate(); + }; + + /** + * 渲染聊天窗口组件(如果启用了 AI 聊天功能) + */ + renderChatWindow() { + // 检查是否启用了 AI 聊天 + if (this.config?.isAiChat) { + return html``; + } + } + + connectedCallback(): void { + super.connectedCallback(); + // 页面加载时清除历史消息 + // 对应原始代码中的 window.onload + window.addEventListener("load", this.clearChatHistory); + // 监听全局的 toggle-canvas 事件(来自工具或其他地方的触发) + window.addEventListener( + "live2d:toggle-canvas", + this.handleToggleWidget as EventListener, + ); + } + + disconnectedCallback(): void { + super.disconnectedCallback(); + this.cancelScheduledShow(); + window.removeEventListener("load", this.clearChatHistory); + window.removeEventListener( + "live2d:toggle-canvas", + this.handleToggleWidget as EventListener, + ); + } + + /** + * 清除聊天历史记录 + */ + private clearChatHistory(): void { + localStorage.removeItem("historyMessages"); + } + + private scheduleShowAfterMount(): void { + this.cancelScheduledShow(); + this.showAnimationFrameId = window.requestAnimationFrame(() => { + this.showAnimationFrameId = undefined; + this._isShow = true; + this.requestUpdate(); + }); + } + + private cancelScheduledShow(): void { + if (this.showAnimationFrameId === undefined) { + return; + } + + window.cancelAnimationFrame(this.showAnimationFrameId); + this.showAnimationFrameId = undefined; + } } customElements.define("live2d-widget", Live2dWidget); export const Live2dWidgetComponent = createComponent({ - tagName: "live2d-widget", - elementClass: Live2dWidget, - react: React, + tagName: "live2d-widget", + elementClass: Live2dWidget, + react: React, }); diff --git a/packages/live2d/src/config/default-config.ts b/packages/live2d/src/config/default-config.ts index 1fd1326..bf521de 100644 --- a/packages/live2d/src/config/default-config.ts +++ b/packages/live2d/src/config/default-config.ts @@ -28,7 +28,7 @@ export const createDefaultLive2dConfig = (): Live2dConfig => ({ firstOpenSite: true, isTools: true, tools: [...DEFAULT_TOOL_NAMES], - isAiChat: false, + isAiChat: true, chunkTimeout: 10, showChatMessageTimeout: 10, screenshotName: "live2d", diff --git a/packages/live2d/src/events/tip-events.ts b/packages/live2d/src/events/tip-events.ts index 74c219e..507b01f 100644 --- a/packages/live2d/src/events/tip-events.ts +++ b/packages/live2d/src/events/tip-events.ts @@ -16,11 +16,12 @@ import { } from "@/live2d/events/before-init"; import { dataWithinRange } from "@/live2d/helpers/dateWithinRange"; import { getPluginTips } from "@/live2d/helpers/getPluginTips"; +import { loadFullTipsResource } from "@/live2d/helpers/loadFullTipsResource"; import { loadTipsResource } from "@/live2d/helpers/loadTipsResource"; import { mergeTips } from "@/live2d/helpers/mergeTips"; import { sendMessage } from "@/live2d/helpers/sendMessage"; import { timeWithinRange } from "@/live2d/helpers/timeWithinRange"; -import { isNotEmptyString, isString } from "@/live2d/utils/isString"; +import { isString } from "@/live2d/utils/isString"; import { randomSelection } from "@/live2d/utils/randomSelection"; import { documentTitle, @@ -294,15 +295,9 @@ const _loadTips = async (config: Live2dConfig) => { export const _getFullOrDefaultTips = async ( config: Live2dConfig, ): Promise => { - // 获取插件文件中的全量 tips 文件 - if (isNotEmptyString(config?.tipsPath)) { - const tipsResult = await loadTipsResource(config.tipsPath); - if (tipsResult) { - return tipsResult; - } - } - // 获取默认的 tips 文件 - return (await import("../libs/live2d-tips.json")).default; + return loadFullTipsResource(config?.tipsPath, async () => { + return (await import("../libs/live2d-tips.json")).default; + }); }; window.addEventListener(BEFORE_INIT_EVENT_NAME, async (event) => { diff --git a/packages/live2d/src/helpers/loadFullTipsResource.ts b/packages/live2d/src/helpers/loadFullTipsResource.ts new file mode 100644 index 0000000..d2924d7 --- /dev/null +++ b/packages/live2d/src/helpers/loadFullTipsResource.ts @@ -0,0 +1,17 @@ +import type { TipConfig } from "../context/config-context.ts"; +import { isNotEmptyString } from "../utils/isString.ts"; +import { isFullTipConfig, loadTipsResource } from "./loadTipsResource.ts"; + +export async function loadFullTipsResource( + tipsPath: string | undefined, + loadDefaultTips: () => Promise, +): Promise { + if (isNotEmptyString(tipsPath)) { + const tipsResult = await loadTipsResource(tipsPath); + if (isFullTipConfig(tipsResult)) { + return tipsResult; + } + } + + return loadDefaultTips(); +} diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts index 5496193..cb8f774 100644 --- a/packages/live2d/src/helpers/loadTipsResource.ts +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -1,4 +1,97 @@ -import type { TipConfig } from "@/live2d/context/config-context"; +import type { + TipClick, + TipConfig, + TipMessage, + TipMouseover, + TipSeason, + TipTime, +} from "@/live2d/context/config-context"; + +type PartialTipConfig = Partial; + +const createEmptyTipConfig = (): TipConfig => ({ + mouseover: [], + click: [], + seasons: [], + message: {}, + time: [], +}); + +const isRecord = (value: unknown): value is Record => + typeof value === "object" && value !== null; + +const isStringArray = (value: unknown): value is string[] => + Array.isArray(value) && value.every((item) => typeof item === "string"); + +const isTipText = (value: unknown): value is string | string[] => + typeof value === "string" || isStringArray(value); + +const isMouseoverTip = (value: unknown): value is TipMouseover => + isRecord(value) && + typeof value.selector === "string" && + isTipText(value.text); + +const isClickTip = (value: unknown): value is TipClick => + isRecord(value) && + typeof value.selector === "string" && + isTipText(value.text); + +const isSeasonTip = (value: unknown): value is TipSeason => + isRecord(value) && typeof value.date === "string" && isTipText(value.text); + +const isTimeTip = (value: unknown): value is TipTime => + isRecord(value) && typeof value.hour === "string" && isTipText(value.text); + +const isTipArray = ( + value: unknown, + validator: (item: unknown) => item is T, +): value is T[] => Array.isArray(value) && value.every(validator); + +const isTipMessage = (value: unknown): value is TipMessage => { + if (!isRecord(value)) { + return false; + } + const optionalFields = ["default", "console", "copy", "visibilitychange"]; + return optionalFields.every((field) => { + const nextValue = value[field]; + return nextValue === undefined || isTipText(nextValue); + }); +}; + +const isPartialTipConfig = (value: unknown): value is PartialTipConfig => { + if (!isRecord(value)) { + return false; + } + + if ( + value.mouseover !== undefined && + !isTipArray(value.mouseover, isMouseoverTip) + ) { + return false; + } + if (value.click !== undefined && !isTipArray(value.click, isClickTip)) { + return false; + } + if (value.seasons !== undefined && !isTipArray(value.seasons, isSeasonTip)) { + return false; + } + if (value.time !== undefined && !isTipArray(value.time, isTimeTip)) { + return false; + } + if (value.message !== undefined && !isTipMessage(value.message)) { + return false; + } + + return true; +}; + +export const isFullTipConfig = (value: unknown): value is TipConfig => + isRecord(value) && + isTipArray(value.mouseover, isMouseoverTip) && + isTipArray(value.click, isClickTip) && + isTipArray(value.seasons, isSeasonTip) && + isTipArray(value.time, isTimeTip) && + isTipMessage(value.message); /** * 远程加载提示资源 @@ -6,30 +99,24 @@ import type { TipConfig } from "@/live2d/context/config-context"; * @param url * @returns */ -export function loadTipsResource(url?: string) { - const defaultObj: TipConfig = { - mouseover: [], - click: [], - seasons: [], - message: {}, - time: [], - }; - return new Promise((resolve) => { - if (!url) { - resolve(defaultObj); +export async function loadTipsResource( + url?: string, +): Promise { + if (!url) { + return createEmptyTipConfig(); + } + + try { + const response = await fetch(url); + if (!response.ok) { return; } - try { - fetch(url) - .then((response) => response.json()) - .then((result) => { - resolve(result); - }) - .catch(() => { - resolve(defaultObj); - }); - } catch (e) { - // ignore + const result: unknown = await response.json(); + if (!isPartialTipConfig(result)) { + return; } - }); + return result; + } catch { + return; + } } diff --git a/packages/live2d/src/helpers/widgetDrawer.ts b/packages/live2d/src/helpers/widgetDrawer.ts new file mode 100644 index 0000000..2a20b0b --- /dev/null +++ b/packages/live2d/src/helpers/widgetDrawer.ts @@ -0,0 +1,3 @@ +export const WIDGET_DRAWER_HIDDEN_BOTTOM = "-500px"; +export const WIDGET_DRAWER_VISIBLE_BOTTOM = "0px"; +export const WIDGET_DRAWER_DURATION_MS = 4000; diff --git a/packages/live2d/src/helpers/widgetVisibility.ts b/packages/live2d/src/helpers/widgetVisibility.ts new file mode 100644 index 0000000..1191588 --- /dev/null +++ b/packages/live2d/src/helpers/widgetVisibility.ts @@ -0,0 +1,37 @@ +export const LIVE2D_DISPLAY_STORAGE_KEY = "live2d-display"; +export const LIVE2D_DISPLAY_SUPPRESSION_MS = 24 * 60 * 60 * 1000; + +type StorageReader = Pick; +type StorageWriter = Pick; + +export const isWidgetSuppressed = ( + hiddenAt: string | null, + now = Date.now(), +): boolean => { + if (!hiddenAt) { + return false; + } + + const parsed = Number.parseInt(hiddenAt, 10); + return ( + Number.isFinite(parsed) && now - parsed <= LIVE2D_DISPLAY_SUPPRESSION_MS + ); +}; + +export const readWidgetSuppression = ( + storage: StorageReader, + now = Date.now(), +): boolean => { + return isWidgetSuppressed(storage.getItem(LIVE2D_DISPLAY_STORAGE_KEY), now); +}; + +export const rememberWidgetDismissal = ( + storage: StorageWriter, + now = Date.now(), +): void => { + storage.setItem(LIVE2D_DISPLAY_STORAGE_KEY, String(now)); +}; + +export const clearWidgetDismissal = (storage: StorageWriter): void => { + storage.removeItem(LIVE2D_DISPLAY_STORAGE_KEY); +}; diff --git a/packages/live2d/src/live2d/console-status.ts b/packages/live2d/src/live2d/console-status.ts new file mode 100644 index 0000000..54a0870 --- /dev/null +++ b/packages/live2d/src/live2d/console-status.ts @@ -0,0 +1,53 @@ +export interface ConsoleStatusMetadata { + author: string; + pluginName: string; + repo: string; + updateTime: string; + version: string; +} + +export interface ConsoleLike { + groupCollapsed?: (label?: string, ...args: unknown[]) => void; + groupEnd?: () => void; + log: (message?: unknown, ...optionalParams: unknown[]) => void; +} + +export const LEGACY_CONSOLE_STATUS_METADATA: ConsoleStatusMetadata = { + author: "LIlGG", + pluginName: "Live2D 看板娘", + repo: "https://github.com/LIlGG/plugin-live2d", + updateTime: "2022.12.09", + version: "1.0.1", +}; + +export const getConsoleStatusLines = ( + metadata: ConsoleStatusMetadata = LEGACY_CONSOLE_STATUS_METADATA, +): string[] => { + return [ + `${metadata.pluginName} · v${metadata.version}`, + `作者:${metadata.author}`, + `更新:${metadata.updateTime}`, + `仓库:${metadata.repo}`, + ]; +}; + +export const logConsoleStatus = ( + consoleLike: ConsoleLike = console, + metadata: ConsoleStatusMetadata = LEGACY_CONSOLE_STATUS_METADATA, +): void => { + const [title, ...lines] = getConsoleStatusLines(metadata); + + if (consoleLike.groupCollapsed) { + consoleLike.groupCollapsed(title); + for (const line of lines) { + consoleLike.log(line); + } + consoleLike.groupEnd?.(); + return; + } + + consoleLike.log(title); + for (const line of lines) { + consoleLike.log(line); + } +}; diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index 04367bc..b4bb74f 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -1,5 +1,6 @@ import type { Live2dConfig } from "@/live2d/context/config-context"; import { sendMessage } from "@/live2d/helpers/sendMessage"; +import { logConsoleStatus } from "@/live2d/live2d/console-status"; import { isNotEmptyString } from "@/live2d/utils/isString"; import * as PIXI from "pixi.js"; import "@/live2d/libs/live2d.min.js"; @@ -7,24 +8,24 @@ import "@/live2d/libs/live2dcubismcore.min.js"; import { Live2DModel } from "untitled-pixi-live2d-engine"; declare global { - interface Window { - PIXI: typeof PIXI; - } + interface Window { + PIXI: typeof PIXI; + } } window.PIXI = PIXI; interface ModelTexturesResult { - textures: { - id: number; - }; + textures: { + id: number; + }; } interface ModelResult { - model: { - id: number; - message: string; - }; + model: { + id: number; + message: string; + }; } const LIVE2D_CANVAS_SIZE = 300; @@ -32,223 +33,234 @@ const LIVE2D_MODEL_PADDING = 1; const LIVE2D_BOTTOM_OFFSET = 0.95; class Model { - #apiPath: string; - #config: Live2dConfig; - #live2dRootElement: HTMLCanvasElement; - #app?: PIXI.Application; - #appPromise: Promise; - #currentModel: Live2DModel | null = null; - #loadSequence = 0; - - private constructor(root: HTMLCanvasElement, config: Live2dConfig) { - const apiPath = config.apiPath; - if (!isNotEmptyString(apiPath)) { - throw new Error("Invalid initWidget argument!"); - } - - this.#apiPath = apiPath.endsWith("/") ? apiPath : `${apiPath}/`; - this.#config = config; - this.#live2dRootElement = root; - this.#appPromise = this.initializeApplication(); - } - - static async create( - root: HTMLCanvasElement, - config: Live2dConfig, - ): Promise { - const model = new Model(root, config); - await model._loadingModel(); - return model; - } - - private async initializeApplication(): Promise { - const app = new PIXI.Application(); - await app.init({ - canvas: this.#live2dRootElement, - autoStart: true, - height: LIVE2D_CANVAS_SIZE, - width: LIVE2D_CANVAS_SIZE, - autoDensity: true, - resolution: window.devicePixelRatio || 1, - backgroundColor: 0x00000000, - backgroundAlpha: 0, - preference: "webgl", - }); - - this.#app = app; - return app; - } - - private async getApp(): Promise { - if (this.#app) { - return this.#app; - } - - return this.#appPromise; - } - - private async _loadingModel() { - let modelId = localStorage.getItem("modelId"); - let modelTexturesId = localStorage.getItem("modelTexturesId"); - if (modelId === null || !!this.#config.isForceUseDefaultConfig) { - // 加载指定模型的指定材质 - modelId = String(this.#config.modelId || 1); // 模型 ID - modelTexturesId = String(this.#config.modelTexturesId || 53); // 材质 ID - } - await this.loadModel( - Number(modelId), - Number(modelTexturesId), - "Live2D 模型加载中...", - ); - } - - private async replaceModel(nextModel: Live2DModel): Promise { - const app = await this.getApp(); - const modelWidth = nextModel.internalModel.width || nextModel.width; - const modelHeight = nextModel.internalModel.height || nextModel.height; - const scale = Math.min( - app.screen.width / modelWidth, - app.screen.height / modelHeight, - ); - - nextModel.anchor.set(0.5, 1); - nextModel.scale.set(scale * LIVE2D_MODEL_PADDING); - nextModel.position.set( - app.screen.width / 2, - app.screen.height * LIVE2D_BOTTOM_OFFSET, - ); - - if (this.#currentModel) { - app.stage.removeChild(this.#currentModel); - this.#currentModel.destroy(); - } - - app.stage.removeChildren(); - app.stage.addChild(nextModel); - this.#currentModel = nextModel; - } - - /** - * 为 Live2d 加载模型。 - * - * @param modelId 模型编号 - * @param modelTexturesId 纹理编号 - * @param text 加载时的消息 - */ - async loadModel(modelId: number, modelTexturesId: number, text?: string) { - const app = await this.getApp(); - const loadSequence = ++this.#loadSequence; - - localStorage.setItem("modelId", String(modelId)); - localStorage.setItem("modelTexturesId", String(modelTexturesId)); - - // 发送消息事件 - if (text) { - sendMessage(text, 4000, 3); - } - const model = await Live2DModel.from( - `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, - { - ticker: app.ticker, - autoFocus: false, - autoHitTest: false, - autoInteract: false, - onLoad: () => { - if (this.#config.consoleShowStatus) { - console.log( - `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`, - ); - } - }, - }, - ); - - if (loadSequence !== this.#loadSequence) { - model.destroy(); - return; - } - - await this.replaceModel(model); - } - - /** - * 随机切换模型贴图 - */ - async loadRandTextures() { - const modelId = Number(localStorage.getItem("modelId")); - const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); - // 可选 "rand"(随机), "switch"(顺序) - const result = (await fetch( - `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`, - ).then((response) => response.json())) as ModelTexturesResult; - const texturesId = result.textures.id; - if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { - sendMessage("我还没有其他衣服呢!", 4000, 3); - return; - } - await this.loadModel(modelId, texturesId, "我的新衣服好看嘛?"); - } - - /** - * 切换模型 - */ - async loadOtherModel() { - const modelId = Number(localStorage.getItem("modelId")); - const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( - (response) => response.json(), - )) as ModelResult; - await this.loadModel(result.model.id, 0, result.model.message); - } - - /** - * 截图 - * @param screenshotName 截图名称 - */ - async capture(screenshotName: string) { - const app = await this.getApp(); - const canvas = app.renderer.extract.canvas(this.#currentModel ?? app.stage); - const toBlob = canvas.toBlob?.bind(canvas); - - if (!toBlob) { - throw new Error( - "Canvas blob export is not supported in this environment.", - ); - } - - await new Promise((resolve, reject) => { - toBlob((blob) => { - if (!blob) { - reject(new Error("Failed to capture Live2D screenshot.")); - return; - } - - const url = URL.createObjectURL(blob); - const a = document.createElement("a"); - a.href = url; - a.download = `${screenshotName}.png`; - a.click(); - URL.revokeObjectURL(url); - a.remove(); - resolve(); - }); - }); - } - - destroy(): void { - if (this.#currentModel && this.#app) { - this.#app.stage.removeChild(this.#currentModel); - this.#currentModel.destroy(); - this.#currentModel = null; - } - - this.#app?.destroy(false, { - children: true, - texture: true, - textureSource: true, - context: true, - }); - this.#app = undefined; - } + #apiPath: string; + #config: Live2dConfig; + #live2dRootElement: HTMLCanvasElement; + #app?: PIXI.Application; + #appPromise: Promise; + #currentModel: Live2DModel | null = null; + #hasLoggedConsoleStatus = false; + #loadSequence = 0; + + private constructor(root: HTMLCanvasElement, config: Live2dConfig) { + const apiPath = config.apiPath; + if (!isNotEmptyString(apiPath)) { + throw new Error("Invalid initWidget argument!"); + } + + this.#apiPath = apiPath.endsWith("/") ? apiPath : `${apiPath}/`; + this.#config = config; + this.#live2dRootElement = root; + this.#appPromise = this.initializeApplication(); + } + + static async create( + root: HTMLCanvasElement, + config: Live2dConfig, + ): Promise { + const model = new Model(root, config); + await model._loadingModel(); + return model; + } + + private async initializeApplication(): Promise { + const app = new PIXI.Application(); + await app.init({ + canvas: this.#live2dRootElement, + autoStart: true, + height: LIVE2D_CANVAS_SIZE, + width: LIVE2D_CANVAS_SIZE, + autoDensity: true, + resolution: window.devicePixelRatio || 1, + backgroundColor: 0x00000000, + backgroundAlpha: 0, + preference: "webgl", + }); + + this.#app = app; + return app; + } + + private async getApp(): Promise { + if (this.#app) { + return this.#app; + } + + return this.#appPromise; + } + + private async _loadingModel() { + this.logConsoleStatusOnce(); + let modelId = localStorage.getItem("modelId"); + let modelTexturesId = localStorage.getItem("modelTexturesId"); + if (modelId === null || !!this.#config.isForceUseDefaultConfig) { + // 加载指定模型的指定材质 + modelId = String(this.#config.modelId || 1); // 模型 ID + modelTexturesId = String(this.#config.modelTexturesId || 53); // 材质 ID + } + await this.loadModel( + Number(modelId), + Number(modelTexturesId), + "Live2D 模型加载中...", + ); + } + + private logConsoleStatusOnce(): void { + if (!this.#config.consoleShowStatus || this.#hasLoggedConsoleStatus) { + return; + } + + logConsoleStatus(); + this.#hasLoggedConsoleStatus = true; + } + + private async replaceModel(nextModel: Live2DModel): Promise { + const app = await this.getApp(); + const modelWidth = nextModel.internalModel.width || nextModel.width; + const modelHeight = nextModel.internalModel.height || nextModel.height; + const scale = Math.min( + app.screen.width / modelWidth, + app.screen.height / modelHeight, + ); + + nextModel.anchor.set(0.5, 1); + nextModel.scale.set(scale * LIVE2D_MODEL_PADDING); + nextModel.position.set( + app.screen.width / 2, + app.screen.height * LIVE2D_BOTTOM_OFFSET, + ); + + if (this.#currentModel) { + app.stage.removeChild(this.#currentModel); + this.#currentModel.destroy(); + } + + app.stage.removeChildren(); + app.stage.addChild(nextModel); + this.#currentModel = nextModel; + } + + /** + * 为 Live2d 加载模型。 + * + * @param modelId 模型编号 + * @param modelTexturesId 纹理编号 + * @param text 加载时的消息 + */ + async loadModel(modelId: number, modelTexturesId: number, text?: string) { + const app = await this.getApp(); + const loadSequence = ++this.#loadSequence; + + localStorage.setItem("modelId", String(modelId)); + localStorage.setItem("modelTexturesId", String(modelTexturesId)); + + // 发送消息事件 + if (text) { + sendMessage(text, 4000, 3); + } + const model = await Live2DModel.from( + `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, + { + ticker: app.ticker, + autoFocus: false, + autoHitTest: false, + autoInteract: false, + onLoad: () => { + if (this.#config.consoleShowStatus) { + console.log( + `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`, + ); + } + }, + }, + ); + + if (loadSequence !== this.#loadSequence) { + model.destroy(); + return; + } + + await this.replaceModel(model); + } + + /** + * 随机切换模型贴图 + */ + async loadRandTextures() { + const modelId = Number(localStorage.getItem("modelId")); + const modelTexturesId = Number(localStorage.getItem("modelTexturesId")); + // 可选 "rand"(随机), "switch"(顺序) + const result = (await fetch( + `${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`, + ).then((response) => response.json())) as ModelTexturesResult; + const texturesId = result.textures.id; + if (texturesId === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { + sendMessage("我还没有其他衣服呢!", 4000, 3); + return; + } + await this.loadModel(modelId, texturesId, "我的新衣服好看嘛?"); + } + + /** + * 切换模型 + */ + async loadOtherModel() { + const modelId = Number(localStorage.getItem("modelId")); + const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( + (response) => response.json(), + )) as ModelResult; + await this.loadModel(result.model.id, 0, result.model.message); + } + + /** + * 截图 + * @param screenshotName 截图名称 + */ + async capture(screenshotName: string) { + const app = await this.getApp(); + const canvas = app.renderer.extract.canvas(this.#currentModel ?? app.stage); + const toBlob = canvas.toBlob?.bind(canvas); + + if (!toBlob) { + throw new Error( + "Canvas blob export is not supported in this environment.", + ); + } + + await new Promise((resolve, reject) => { + toBlob((blob) => { + if (!blob) { + reject(new Error("Failed to capture Live2D screenshot.")); + return; + } + + const url = URL.createObjectURL(blob); + const a = document.createElement("a"); + a.href = url; + a.download = `${screenshotName}.png`; + a.click(); + URL.revokeObjectURL(url); + a.remove(); + resolve(); + }); + }); + } + + destroy(): void { + if (this.#currentModel && this.#app) { + this.#app.stage.removeChild(this.#currentModel); + this.#currentModel.destroy(); + this.#currentModel = null; + } + + this.#app?.destroy(false, { + children: true, + texture: true, + textureSource: true, + context: true, + }); + this.#app = undefined; + } } export default Model; diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index 5d8737f..f5ab080 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -4,52 +4,52 @@ import { Tool } from "@/live2d/live2d/tools/tools"; import { isNotEmptyString } from "@/live2d/utils/isString"; export type CustomToolConfig = { - name: string; - icon?: string; - priority?: number; - execute: ((config: Live2dConfig) => void) | string; + name: string; + icon?: string; + priority?: number; + execute: ((config: Live2dConfig) => void) | string; }; /** * 自定义工具 */ export class CustomTool extends Tool { - priority: number; - _name: string; - _icon?: string; - _execute: ((config: Live2dConfig) => void) | string; + priority: number; + _name: string; + _icon?: string; + _execute: ((config: Live2dConfig) => void) | string; - constructor( - config: Live2dConfig, - { name, icon, execute, priority }: CustomToolConfig, - model?: Model | null, - ) { - super(config, model); - this._name = name; - this._icon = icon; - this._execute = execute; - this.priority = priority || 0; - } + constructor( + config: Live2dConfig, + { name, icon, execute, priority }: CustomToolConfig, + model?: Model | null, + ) { + super(config, model); + this._name = name; + this._icon = icon; + this._execute = execute; + this.priority = priority || 0; + } - name() { - return this._name; - } + name() { + return this._name; + } - icon() { - const icon = this._icon; - return isNotEmptyString(icon) ? icon : "ph-question-fill"; - } + icon() { + const icon = this._icon; + return isNotEmptyString(icon) ? icon : "ph-question-fill"; + } - execute() { - if (typeof this._execute === "string") { - const customClass = new Function(` + execute() { + if (typeof this._execute === "string") { + const customClass = new Function(` return class { ${this._execute} } `)(); - new customClass().execute.bind(this)(this.getConfig()); - return; - } - this._execute.bind(this)(this.getConfig()); - } + new customClass().execute.bind(this)(this.getConfig()); + return; + } + this._execute.bind(this)(this.getConfig()); + } } diff --git a/packages/live2d/src/live2d/tools/exit.ts b/packages/live2d/src/live2d/tools/exit.ts index c70f3e6..c14e2af 100644 --- a/packages/live2d/src/live2d/tools/exit.ts +++ b/packages/live2d/src/live2d/tools/exit.ts @@ -7,22 +7,19 @@ import { isNotEmptyString } from "@/live2d/utils/isString"; * 退出 Live2d 工具 */ export class ExitTool extends Tool { - priority = 10; + priority = 10; - icon() { - const icon = this.getConfig().exitIcon; - return isNotEmptyString(icon) ? icon : "ph-x-bold"; - } + icon() { + const icon = this.getConfig().exitIcon; + return isNotEmptyString(icon) ? icon : "ph-x-bold"; + } - name(): string { - return "quit"; - } + name(): string { + return "quit"; + } - execute() { - sendMessage("愿你有一天能与重要的人重逢。", 2000, 4); - setTimeout(() => { - // 触发退出 Live2d 事件 - window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); - }, 3000); - } + execute() { + sendMessage("愿你有一天能与重要的人重逢。", 2000, 4); + window.dispatchEvent(new ToggleCanvasEvent({ isShow: false })); + } } diff --git a/packages/live2d/src/live2d/tools/hitokoto.ts b/packages/live2d/src/live2d/tools/hitokoto.ts index 9c61012..abcae26 100644 --- a/packages/live2d/src/live2d/tools/hitokoto.ts +++ b/packages/live2d/src/live2d/tools/hitokoto.ts @@ -11,6 +11,7 @@ import queryString from "query-string"; */ export class HitokotoTool extends Tool { priority = 90; + private static readonly COOLDOWN_MS = 1500; _default_api = "https://v1.hitokoto.cn"; @@ -33,6 +34,10 @@ export class HitokotoTool extends Tool { } } + protected cooldownMs(): number { + return HitokotoTool.COOLDOWN_MS; + } + private async _getHitokotoMessage(): Promise< { hitokoto: string; description: string } | undefined > { diff --git a/packages/live2d/src/live2d/tools/switch-model.ts b/packages/live2d/src/live2d/tools/switch-model.ts index 38b2f35..87cefbe 100644 --- a/packages/live2d/src/live2d/tools/switch-model.ts +++ b/packages/live2d/src/live2d/tools/switch-model.ts @@ -6,6 +6,7 @@ import { Tool } from "./tools"; */ export class SwitchModelTool extends Tool { priority = 70; + private static readonly COOLDOWN_MS = 1500; name(): string { return "switch-model"; @@ -19,7 +20,11 @@ export class SwitchModelTool extends Tool { execute() { const model = this.getModel(); if (model) { - model.loadOtherModel(); + return model.loadOtherModel(); } } + + protected cooldownMs(): number { + return SwitchModelTool.COOLDOWN_MS; + } } diff --git a/packages/live2d/src/live2d/tools/switch-texture.ts b/packages/live2d/src/live2d/tools/switch-texture.ts index 8654c83..d25ec5b 100644 --- a/packages/live2d/src/live2d/tools/switch-texture.ts +++ b/packages/live2d/src/live2d/tools/switch-texture.ts @@ -6,6 +6,7 @@ import { isNotEmptyString } from "@/live2d/utils/isString"; */ export class SwitchTextureTool extends Tool { priority = 60; + private static readonly COOLDOWN_MS = 1500; name(): string { return "switch-texture"; @@ -22,7 +23,11 @@ export class SwitchTextureTool extends Tool { execute() { const model = this.getModel(); if (model) { - model.loadRandTextures(); + return model.loadRandTextures(); } } + + protected cooldownMs(): number { + return SwitchTextureTool.COOLDOWN_MS; + } } diff --git a/packages/live2d/src/live2d/tools/tools.ts b/packages/live2d/src/live2d/tools/tools.ts index 6a7687f..9039a3b 100644 --- a/packages/live2d/src/live2d/tools/tools.ts +++ b/packages/live2d/src/live2d/tools/tools.ts @@ -4,6 +4,8 @@ import type Model from "@/live2d/live2d/model"; export abstract class Tool { private _config: Live2dConfig; protected model?: Model | null; + private _isExecuting = false; + private _cooldownUntil = 0; /** * 优先级, 数字越大越靠前 @@ -21,7 +23,25 @@ export abstract class Tool { abstract icon(): string; - abstract execute(): void; + abstract execute(): void | Promise; + + async triggerExecute(): Promise { + const now = Date.now(); + if (this._isExecuting || now < this._cooldownUntil) { + return; + } + + this._isExecuting = true; + try { + await this.execute(); + } finally { + this._isExecuting = false; + const cooldownMs = this.cooldownMs(); + if (cooldownMs > 0) { + this._cooldownUntil = Date.now() + cooldownMs; + } + } + } protected getConfig(): Live2dConfig { return this._config; @@ -34,4 +54,8 @@ export abstract class Tool { protected getModel(): Model | null | undefined { return this.model; } + + protected cooldownMs(): number { + return 0; + } } diff --git a/packages/live2d/tsconfig.tsbuildinfo b/packages/live2d/tsconfig.tsbuildinfo index 7f1c4be..e48a7da 100644 --- a/packages/live2d/tsconfig.tsbuildinfo +++ b/packages/live2d/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/api/chat-api.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dchatwindow.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/config/default-config.ts","./src/config/normalize-config.ts","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/model-ready.ts","./src/events/send-message.ts","./src/events/stream-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/toggle-chat-window.ts","./src/events/types.ts","./src/helpers/createstreammessage.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/live2d/model.ts","./src/live2d/runtime.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/styles/unocss.global.css.d.ts","./src/types/assets.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"version":"5.7.3"} \ No newline at end of file +{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/api/chat-api.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dchatwindow.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/config/default-config.ts","./src/config/normalize-config.ts","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/model-ready.ts","./src/events/send-message.ts","./src/events/stream-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/toggle-chat-window.ts","./src/events/types.ts","./src/helpers/createstreammessage.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadfulltipsresource.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/helpers/widgetdrawer.ts","./src/helpers/widgetvisibility.ts","./src/live2d/console-status.ts","./src/live2d/model.ts","./src/live2d/runtime.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/styles/unocss.global.css.d.ts","./src/types/assets.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"version":"5.7.3"} \ No newline at end of file From 1f86880a6f5ce7eeee2e8cf9b6e5e351be348c8a Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Thu, 14 May 2026 18:35:12 +0800 Subject: [PATCH 20/26] feat: modernize Live2D frontend integration - build the plugin with the Vite-based frontend package and Halo dev-mode support - add declarative custom tool actions and runtime config normalization - remove legacy bundled static assets in favor of the modern frontend runtime Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 22 + build.gradle | 48 +- .../.openspec.yaml | 2 + .../design.md | 93 ++ .../proposal.md | 29 + .../halo-plugin-frontend-integration/spec.md | 40 + .../specs/live2d-custom-tool-actions/spec.md | 40 + .../live2d-public-runtime-config/spec.md | 27 + .../multi-cubism-live2d-rendering/spec.md | 9 + .../integrate-modern-live2d-frontend/tasks.md | 27 + package.json | 38 +- packages/live2d/package.json | 5 +- .../scripts/generate-custom-tool-actions.mjs | 50 + packages/live2d/src/Demo.tsx | 4 +- .../live2d/src/components/Live2dCanvas.tsx | 8 - .../src/components/Live2dChatWindow.tsx | 8 - .../live2d/src/components/Live2dContext.tsx | 8 - packages/live2d/src/components/Live2dTips.tsx | 8 - .../live2d/src/components/Live2dToggle.tsx | 8 - .../live2d/src/components/Live2dTools.tsx | 8 - .../live2d/src/components/Live2dWidget.tsx | 8 - .../custom-tools/normalize-custom-tools.ts | 44 + .../live2d/src/config/normalize-config.ts | 43 +- .../live2d/src/config/normalize-helpers.ts | 37 + packages/live2d/src/context/config-context.ts | 2 +- packages/live2d/src/halo-config.ts | 33 + packages/live2d/src/halo.ts | 33 + .../live2d/src/helpers/loadTipsResource.ts | 36 + .../custom-tool-actions/actions.generated.ts | 35 + .../custom-tool-actions/actions/emit-event.ts | 48 + .../custom-tool-actions/actions/load-model.ts | 29 + .../custom-tool-actions/actions/open-url.ts | 21 + .../custom-tool-actions/actions/screenshot.ts | 18 + .../actions/send-message.ts | 23 + .../actions/switch-model.ts | 12 + .../actions/switch-texture.ts | 12 + .../actions/toggle-chat.ts | 10 + .../actions/widget-visibility.ts | 44 + .../live2d/tools/custom-tool-actions/index.ts | 100 ++ .../live2d/tools/custom-tool-actions/types.ts | 34 + .../src/live2d/tools/custom-tool-config.ts | 14 + .../live2d/src/live2d/tools/custom-tool.ts | 39 +- packages/live2d/tsconfig.tsbuildinfo | 2 +- packages/live2d/vite.halo.config.ts | 19 + .../run/halo/live2d/Live2dInitProcessor.java | 136 ++- .../java/run/halo/live2d/Live2dSetting.java | 4 +- .../run/halo/live2d/Live2dSettingProcess.java | 204 +++- .../java/run/halo/live2d/ThemeFetcher.java | 30 +- src/main/resources/extensions/settings.yaml | 266 +++-- src/main/resources/plugin.yaml | 2 +- src/main/resources/static/css/live2d.css | 393 ------- src/main/resources/static/css/live2d.min.css | 1 - .../resources/static/js/live2d-autoload.js | 992 ------------------ .../static/js/live2d-autoload.min.js | 52 - .../static/lib/asteroids/asteroids.min.js | 640 ----------- .../static/lib/iconify/3.0.1/iconify.min.js | 12 - .../resources/static/lib/live2d/live2d.min.js | 1 - 57 files changed, 1543 insertions(+), 2368 deletions(-) create mode 100644 openspec/changes/integrate-modern-live2d-frontend/.openspec.yaml create mode 100644 openspec/changes/integrate-modern-live2d-frontend/design.md create mode 100644 openspec/changes/integrate-modern-live2d-frontend/proposal.md create mode 100644 openspec/changes/integrate-modern-live2d-frontend/specs/halo-plugin-frontend-integration/spec.md create mode 100644 openspec/changes/integrate-modern-live2d-frontend/specs/live2d-custom-tool-actions/spec.md create mode 100644 openspec/changes/integrate-modern-live2d-frontend/specs/live2d-public-runtime-config/spec.md create mode 100644 openspec/changes/integrate-modern-live2d-frontend/specs/multi-cubism-live2d-rendering/spec.md create mode 100644 openspec/changes/integrate-modern-live2d-frontend/tasks.md create mode 100644 packages/live2d/scripts/generate-custom-tool-actions.mjs create mode 100644 packages/live2d/src/config/custom-tools/normalize-custom-tools.ts create mode 100644 packages/live2d/src/config/normalize-helpers.ts create mode 100644 packages/live2d/src/halo-config.ts create mode 100644 packages/live2d/src/halo.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/actions.generated.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/actions/emit-event.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/actions/load-model.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/actions/open-url.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/actions/screenshot.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/actions/send-message.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/actions/switch-model.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/actions/switch-texture.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/actions/toggle-chat.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/actions/widget-visibility.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/index.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-actions/types.ts create mode 100644 packages/live2d/src/live2d/tools/custom-tool-config.ts create mode 100644 packages/live2d/vite.halo.config.ts delete mode 100644 src/main/resources/static/css/live2d.css delete mode 100644 src/main/resources/static/css/live2d.min.css delete mode 100644 src/main/resources/static/js/live2d-autoload.js delete mode 100644 src/main/resources/static/js/live2d-autoload.min.js delete mode 100644 src/main/resources/static/lib/asteroids/asteroids.min.js delete mode 100644 src/main/resources/static/lib/iconify/3.0.1/iconify.min.js delete mode 100644 src/main/resources/static/lib/live2d/live2d.min.js diff --git a/README.md b/README.md index 75a809e..ea045ed 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,12 @@ 2. 通过 Halo-2.x [安装插件](https://docs.halo.run/user-guide/plugins#%E5%AE%89%E8%A3%85%E6%8F%92%E4%BB%B6) 功能安装本插件 3. 打开网站,即可在左下角看到萌萌哒的看板娘哦~ +## 开发说明 + +本仓库的现代化前端位于 `packages/live2d`,插件构建时会自动打包前端产物并同步到 Halo 插件静态资源目录,无需再手动复制 `dist` 文件。 + +本地联调时,可以在 Halo 后台开启 `插件设置 -> 高级设置 -> 前端调试模式`,并让其指向本地 Vite 服务地址(默认 `http://localhost:5173`)。这样 Halo 页面会直接加载开发中的前端模块,方便调试现代化后的 Live2d 运行时。 + ## 功能介绍 - [x] 一只萌萌的看板娘,为网站增添一份活力 - [x] 基于 `untitled-pixi-live2d-engine` 渲染,支持 Cubism 2 / 3 / 4 / 5 模型 @@ -107,6 +113,22 @@ live2d 渲染页面时将自动读取当前启用主题下的文件。 **需要特别注意的是,一旦用户指定了此 TIPS 文件,那么默认的 TIPS 文件将不再生效(除非当前文件加载失败,此时会回退使用默认的 TIPS 文件),因此建议自定义时将属性设置完整** +### 自定义工具 +如果内置工具不满足需求,可以通过 Halo 后台 `插件设置 -> 自定义工具` 声明额外工具按钮。 + +当前自定义工具使用声明式动作,不支持注入任意 JavaScript。首批支持的动作包括: + +- 发送提示语 +- 显示、隐藏或切换看板娘 +- 切换聊天窗口 +- 切换模型或材质 +- 截图 +- 打开链接 +- 触发命名空间自定义事件 +- 加载指定模型 + +这种方式更适合在保证安全边界的前提下扩展 Live2d 能力。 + ## 鸣谢 - 本插件代码借鉴了 [live2d-widget](https://github.com/stevenjoezhang/live2d-widget) 的理念及代码并完全重写 JS - 使用了 [hitokoto](https://hitokoto.cn/) 的一言接口 diff --git a/build.gradle b/build.gradle index b30a973..66d4874 100644 --- a/build.gradle +++ b/build.gradle @@ -1,17 +1,13 @@ plugins { - id "io.freefair.lombok" version "8.0.1" - id "run.halo.plugin.devtools" version "0.5.0" id 'java' + id "io.freefair.lombok" version "9.2.0" + id "run.halo.plugin.devtools" version "0.6.2" } group 'run.halo.live2d' -sourceCompatibility = JavaVersion.VERSION_17 repositories { mavenCentral() - maven { url 'https://s01.oss.sonatype.org/content/repositories/releases' } - maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } - maven { url 'https://repo.spring.io/milestone' } } configurations.runtimeClasspath { @@ -19,7 +15,7 @@ configurations.runtimeClasspath { } dependencies { - implementation platform('run.halo.tools.platform:plugin:2.11.0-SNAPSHOT') + implementation platform('run.halo.tools.platform:plugin:2.24.0') implementation 'com.theokanning.openai-gpt3-java:api:0.17.0' compileOnly 'run.halo.app:api' @@ -32,20 +28,50 @@ test { useJUnitPlatform() } +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + tasks.withType(JavaCompile).configureEach { options.encoding = "UTF-8" + options.release = 21 +} + +def live2dFrontendDir = file("packages/live2d") +def generatedFrontendResourcesDir = layout.buildDirectory.dir("generated/resources/main/static/live2d") + +tasks.register("buildFrontend", Exec) { + workingDir = projectDir + commandLine "pnpm", "--dir", live2dFrontendDir.absolutePath, "build" + inputs.dir(fileTree(dir: live2dFrontendDir, excludes: ["dist/**", "node_modules/**"])) + outputs.dir(file("${live2dFrontendDir}/dist")) +} + +tasks.register("syncFrontendAssets", Sync) { + dependsOn tasks.named("buildFrontend") + from("${live2dFrontendDir}/dist") + into(generatedFrontendResourcesDir) +} + +tasks.named("processResources") { + dependsOn tasks.named("syncFrontendAssets") + from(generatedFrontendResourcesDir) { + into "static/live2d" + } } halo { - version = '2.11.2' - port = 8092 + version = '2.24.2' + port = 8090 superAdminUsername = 'admin' superAdminPassword = 'admin' - externalUrl = 'http://localhost:8092' + externalUrl = 'http://localhost:8090' debug = true } build { // build frontend before build tasks.getByName('compileJava') -} \ No newline at end of file +} diff --git a/openspec/changes/integrate-modern-live2d-frontend/.openspec.yaml b/openspec/changes/integrate-modern-live2d-frontend/.openspec.yaml new file mode 100644 index 0000000..66dd08a --- /dev/null +++ b/openspec/changes/integrate-modern-live2d-frontend/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-05-14 diff --git a/openspec/changes/integrate-modern-live2d-frontend/design.md b/openspec/changes/integrate-modern-live2d-frontend/design.md new file mode 100644 index 0000000..50ed287 --- /dev/null +++ b/openspec/changes/integrate-modern-live2d-frontend/design.md @@ -0,0 +1,93 @@ +## Context + +`packages/live2d` is now the maintained frontend runtime, but Halo pages are still initialized through `Live2dInitProcessor` and the legacy `static/js/live2d-autoload.min.js` bundle. The repository therefore carries two frontend integration models at once: the Lit/Pixi runtime that development is happening in, and the older static asset bootstrap that production still uses. + +This change crosses backend bootstrapping, frontend packaging, runtime config handling, and local debugging workflow. It also has a migration concern: once Halo switches to the modern bundle path, the legacy CSS, bootstrap script, and supporting static libraries should be removable without regressing the widget's existing behavior. + +## Goals / Non-Goals + +**Goals:** +- Make the Halo plugin load the modern frontend bundle as the only production widget bootstrap path. +- Ensure plugin builds package the frontend output automatically so JAR artifacts ship the correct runtime entry and supporting chunks. +- Replace the current broad injected config object with an explicit public config payload that only includes frontend-safe settings. +- Let plugin users extend the toolbar through backend-configured custom tools that target a supported frontend action registry. +- Preserve the current backend model API usage and existing user-visible widget flows while modernizing bootstrapping and packaging. +- Provide a repeatable local development flow where Halo can target a Vite dev server without forking runtime logic. + +**Non-Goals:** +- Introduce new backend model metadata endpoints or change the existing model/texture API contracts. +- Rework widget behavior that has already been covered by the modern parity changes unless required by the new bootstrap path. +- Add runtime-configurable hot reload behavior for end users in production. +- Preserve the old `live2d-autoload` source tree once the modern integration path is proven and active. + +## Decisions + +### Use a dedicated Halo bootstrap entry instead of inline `live2d.init(...)` +The plugin should stop emitting a script tag for `live2d-autoload.min.js` plus inline initialization code. Instead, the backend should emit: + +1. a frontend-safe JSON payload embedded in the page, and +2. a module entry that reads that payload and starts the runtime. + +This keeps execution logic in the frontend bundle, avoids string-building a JavaScript object in the backend, and gives development and production the same startup contract. The alternative was to keep the inline `live2d.init(path, config)` pattern and simply point it at the new bundle, but that would preserve the legacy bootstrap shape and continue coupling backend rendering to frontend API details. + +### Publish a dedicated public runtime config object +The backend should map plugin settings into an explicit public DTO instead of merging all settings groups and deleting a few unsafe fields afterward. The DTO should include only fields required by the runtime, such as model selection defaults, runtime toggles, tips sources, AI-chat timing or endpoint fields that are intentionally public, and declarative custom tool definitions. + +This gives the frontend a stable contract and reduces the risk of accidentally exposing backend-only settings. The alternative was to continue with the current "merge everything, then trim" approach, but that makes future settings additions risky and hard to review. + +### Replace executable custom tools with a declarative action registry +The current frontend `customTools` support accepts executable callbacks or stringified code, which is useful for local experimentation but is not an acceptable backend configuration contract. Backend-configured custom tools should instead be modeled as declarative tool definitions that target a supported frontend action registry. + +That registry should cover the core extension cases already visible in the runtime today: + +- send a Live2D message +- show, hide, or toggle the widget +- toggle the AI chat window +- switch model or switch texture +- capture a screenshot +- open a configured URL +- emit a namespaced custom DOM event +- optionally load a specific model/texture selection through an explicit safe action + +This keeps the extension surface powerful while avoiding remote code execution through plugin settings. The alternative was to preserve the current `new Function(...)` path and merely pass its source from the backend, but that would turn plugin configuration into arbitrary browser-side code execution and make validation impossible. + +### Package frontend assets through the Gradle resource pipeline +Frontend build output should be generated from `packages/live2d` and synchronized into the plugin's packaged resources as part of the build lifecycle, preferably through a dedicated frontend build/sync task that `processResources` depends on. The plugin should package the emitted entry file and all hashed chunks under a namespaced static directory. + +This keeps JAR packaging deterministic and avoids manual copy steps into source-controlled resource folders. The alternative was to copy dist output back into `src/main/resources/static`, but that would mix generated artifacts with maintained source assets and make cleanup harder. + +### Support a dual-source bootstrap for production and local debugging +The backend bootstrap should support two sources for the frontend entry: + +- packaged plugin assets in production +- a configured Vite dev-server entry in local development + +Both sources should consume the same embedded public config payload so the runtime logic remains identical across environments. The alternative was to rely on the standalone demo page for local testing, but that does not validate the real Halo integration path or backend-provided config behavior. + +### Remove legacy assets only after the modern bootstrap owns all entry points +Legacy static JS/CSS/lib assets should be deleted once no backend processor or documented flow references them anymore. That removal is part of this change, but it should happen after the new bootstrap and packaging path are fully wired so the repository does not temporarily lose a working production entry. + +The alternative was to delete the old files immediately and patch the rest afterward, but that would make the migration harder to verify and easier to break midway through implementation. + +## Risks / Trade-offs + +- **[Risk]** The modern frontend build may emit hashed chunk names that are awkward for the backend to reference directly. → **Mitigation:** define a stable bootstrap entry file and package the full dist directory beneath a dedicated static root. +- **[Risk]** A new public config DTO could accidentally omit fields the frontend currently relies on. → **Mitigation:** derive the DTO from the modern runtime's normalized config usage and keep the spec focused on behavior the bootstrap must preserve. +- **[Risk]** Custom-tool actions may be too limited and push users back toward script injection requests. → **Mitigation:** define a small but extensible action registry that covers current runtime capabilities and supports adding new safe actions over time. +- **[Risk]** Development-mode Vite injection could drift from production behavior. → **Mitigation:** keep one config ingestion path and vary only the source of the frontend module. +- **[Risk]** Removing legacy assets may break untracked references in docs or templates. → **Mitigation:** make legacy asset removal contingent on replacing all processor references and update documentation as part of the migration. + +## Migration Plan + +1. Introduce the public config payload and modern Halo bootstrap entry while keeping the existing runtime behavior intact. +2. Wire the frontend package build into Gradle resource processing so packaged plugin assets contain the modern bundle. +3. Replace executable custom-tool configuration with declarative action-backed tool definitions in the public config contract. +4. Enable the local development bootstrap path against the same backend-provided config payload. +5. Switch the backend processor to the new production entry path and remove remaining legacy static asset references. +6. Delete the old `live2d-autoload`-based assets after the new integration path is the only reachable bootstrap. + +Rollback is straightforward: revert the backend processor and packaged asset path to the legacy bootstrap until the modern entry is fixed. + +## Open Questions + +- None. The remaining work is implementation planning and wiring rather than product-scope uncertainty. diff --git a/openspec/changes/integrate-modern-live2d-frontend/proposal.md b/openspec/changes/integrate-modern-live2d-frontend/proposal.md new file mode 100644 index 0000000..48f4fab --- /dev/null +++ b/openspec/changes/integrate-modern-live2d-frontend/proposal.md @@ -0,0 +1,29 @@ +## Why + +The modern `packages/live2d` runtime now covers the widget behavior that previously lived in `src/main/resources/static/js/live2d-autoload.js`, but the Halo plugin still boots the legacy script and ships the old static asset set. That split keeps legacy code, blocks a clean frontend/backend integration path, and makes local debugging and release packaging harder than they need to be. + +## What Changes + +- Replace the backend's legacy `live2d-autoload.min.js` injection with a modern frontend bootstrap entry that starts the Lit-based runtime inside Halo pages. +- Package the frontend build output as plugin static assets during the plugin build so production JARs ship the modern runtime and its chunks without manual copying. +- Define a public backend-to-frontend configuration contract for the widget instead of exposing a broad raw settings object, while preserving the runtime fields the frontend still needs. +- Add a declarative custom-tool extension model so plugin users can configure extra Live2D tools in Halo without injecting arbitrary frontend code. +- Add a development integration path so Halo pages can load the modern frontend from a Vite dev server during local debugging without changing the production bootstrap flow. +- Remove legacy frontend assets and bootstrap code that become unreachable after the modern integration is in place. + +## Capabilities + +### New Capabilities +- `halo-plugin-frontend-integration`: The Halo plugin boots the modern frontend bundle, packages its build output into plugin assets, and supports both production and local development loading flows. +- `live2d-public-runtime-config`: The backend publishes a dedicated public Live2D runtime config payload for frontend consumption instead of passing a broad settings object directly into inline initialization code. +- `live2d-custom-tool-actions`: Plugin users can declare custom tools in backend settings that bind to a supported set of frontend-exposed Live2D actions without executing arbitrary scripts. + +### Modified Capabilities +- `multi-cubism-live2d-rendering`: The renderer integration currently assumes the legacy injected initialization contract remains sufficient; this change updates that requirement so the maintained renderer works with the new Halo bootstrap and public config contract. + +## Impact + +- Affected backend code: `Live2dInitProcessor`, settings/config mapping, plugin build wiring, and any development-mode plugin bootstrap support. +- Affected frontend code: runtime bootstrap entry, config ingestion, custom tool action handling, asset path expectations, and local development workflow. +- Affected packaged assets: legacy `static/js`, `static/css`, and `static/lib` resources tied to `live2d-autoload` are expected to be retired once the new bundle-based path is active. +- Affected developer workflow: plugin builds and local debugging will depend on the frontend package build/dev flow being wired into the plugin lifecycle. diff --git a/openspec/changes/integrate-modern-live2d-frontend/specs/halo-plugin-frontend-integration/spec.md b/openspec/changes/integrate-modern-live2d-frontend/specs/halo-plugin-frontend-integration/spec.md new file mode 100644 index 0000000..1dbe02c --- /dev/null +++ b/openspec/changes/integrate-modern-live2d-frontend/specs/halo-plugin-frontend-integration/spec.md @@ -0,0 +1,40 @@ +## ADDED Requirements + +### Requirement: Halo pages SHALL bootstrap the modern Live2D frontend bundle +The plugin SHALL initialize the widget on Halo pages through the maintained frontend bundle instead of the legacy `live2d-autoload` script. + +#### Scenario: Production pages load the packaged frontend entry +- **WHEN** a Halo page includes the Live2D plugin in a production build +- **THEN** the backend MUST emit the modern frontend bootstrap entry from the plugin's packaged static assets +- **AND** the page MUST no longer depend on `static/js/live2d-autoload.min.js` for widget startup + +#### Scenario: Frontend bundle starts the existing widget runtime +- **WHEN** the packaged frontend entry executes on a supported page +- **THEN** it MUST initialize the existing modern Live2D runtime used by `packages/live2d` +- **AND** the widget MUST continue rendering and responding through the maintained Lit/Pixi implementation + +### Requirement: Plugin builds SHALL package the frontend dist output automatically +The plugin build pipeline SHALL produce and package the frontend bundle and its emitted assets without requiring a manual copy step into source-managed resources. + +#### Scenario: Plugin build includes runtime entry and dependent chunks +- **WHEN** the plugin build runs for packaging +- **THEN** the frontend package build output MUST be generated and synchronized into the plugin's packaged static assets +- **AND** the packaged output MUST include the runtime entry file and any emitted chunks or assets required by that entry + +#### Scenario: Packaged asset path remains stable for backend injection +- **WHEN** the frontend build emits hashed chunk filenames +- **THEN** the plugin packaging flow MUST still expose a stable entry path that the backend can inject into Halo pages +- **AND** supporting chunks MUST remain resolvable beneath the same packaged static root + +### Requirement: Local development SHALL support loading the modern frontend from a dev server +The Halo integration SHALL provide a development path that loads the same runtime from a frontend dev server so developers can debug the widget in Halo pages without rebuilding the plugin for each change. + +#### Scenario: Development bootstrap targets the dev server entry +- **WHEN** Live2D frontend development mode is enabled for local debugging +- **THEN** the backend MUST inject the configured frontend dev-server module entry instead of the packaged production asset entry +- **AND** the loaded module MUST consume the same backend-provided runtime config contract as production + +#### Scenario: Production bootstrap remains the default +- **WHEN** development mode is not enabled +- **THEN** the backend MUST load the packaged production frontend entry +- **AND** the dev-server path MUST not be required for normal plugin operation diff --git a/openspec/changes/integrate-modern-live2d-frontend/specs/live2d-custom-tool-actions/spec.md b/openspec/changes/integrate-modern-live2d-frontend/specs/live2d-custom-tool-actions/spec.md new file mode 100644 index 0000000..da3242a --- /dev/null +++ b/openspec/changes/integrate-modern-live2d-frontend/specs/live2d-custom-tool-actions/spec.md @@ -0,0 +1,40 @@ +## ADDED Requirements + +### Requirement: Plugin users SHALL be able to declare custom tools through backend configuration +The plugin SHALL allow Halo administrators to configure additional Live2D tools through backend settings so they can extend the toolbar without editing frontend source code. + +#### Scenario: Backend publishes custom tool definitions +- **WHEN** a site administrator configures custom Live2D tools in plugin settings +- **THEN** the backend MUST expose those tools through the public runtime config payload +- **AND** each tool definition MUST include declarative metadata needed to render and order the tool in the frontend + +#### Scenario: Custom tools coexist with preset tools +- **WHEN** the frontend renders the Live2D toolbar with both preset and custom tools configured +- **THEN** it MUST mount the custom tools alongside preset tools +- **AND** custom tools MUST participate in the same ordering and visibility flow as supported preset tools + +### Requirement: Custom tools SHALL bind only to supported declarative actions +The frontend SHALL execute backend-configured custom tools through a supported action registry instead of evaluating arbitrary JavaScript delivered through configuration. + +#### Scenario: Supported action types trigger frontend-exposed capabilities +- **WHEN** a user activates a configured custom tool +- **THEN** the frontend MUST resolve the tool's configured action against a supported action registry +- **AND** it MUST execute the matching runtime capability with declarative payload data only + +#### Scenario: Arbitrary code execution is not supported +- **WHEN** a custom tool definition includes script content or an unsupported executable payload +- **THEN** the plugin MUST reject or ignore that executable content instead of evaluating it in the browser +- **AND** custom tool execution MUST remain limited to supported declarative actions + +### Requirement: The supported action registry SHALL cover core extension use cases +The frontend SHALL expose a documented set of reusable actions so plugin users can extend the toolbar for common Live2D interactions without requiring bespoke frontend patches. + +#### Scenario: Core action set is available for configuration +- **WHEN** the plugin documents or validates supported custom tool actions +- **THEN** it MUST include actions for at least sending a widget message, toggling widget visibility, toggling the chat panel, switching model or texture, capturing a screenshot, opening a configured URL, and emitting a namespaced custom event +- **AND** each action MUST define the declarative payload fields it accepts + +#### Scenario: Advanced model control can be added without a new scripting escape hatch +- **WHEN** the runtime exposes additional safe actions such as loading a specific model selection +- **THEN** those actions MUST be added through the same registry contract +- **AND** extending the registry MUST not require reintroducing raw executable tool definitions diff --git a/openspec/changes/integrate-modern-live2d-frontend/specs/live2d-public-runtime-config/spec.md b/openspec/changes/integrate-modern-live2d-frontend/specs/live2d-public-runtime-config/spec.md new file mode 100644 index 0000000..dd7ba0b --- /dev/null +++ b/openspec/changes/integrate-modern-live2d-frontend/specs/live2d-public-runtime-config/spec.md @@ -0,0 +1,27 @@ +## ADDED Requirements + +### Requirement: Backend SHALL publish a frontend-safe Live2D runtime config payload +The plugin backend SHALL publish a dedicated public config payload for the Live2D frontend instead of exposing a broad merged settings object directly to inline initialization code. + +#### Scenario: Public payload contains only frontend-safe runtime fields +- **WHEN** the backend prepares Live2D configuration for page rendering +- **THEN** it MUST map settings into a dedicated public payload that includes only fields required by the frontend runtime +- **AND** backend-only or sensitive settings MUST be excluded from that payload by construction + +#### Scenario: Public payload remains compatible with the modern runtime +- **WHEN** the frontend bootstrap reads the public config payload +- **THEN** it MUST receive the fields needed to preserve current widget behavior, including runtime toggles, tips sources, model defaults, AI-chat runtime timings, and declarative custom tool definitions when configured +- **AND** it MUST not require the backend to expose raw settings groups that are not part of the frontend contract + +### Requirement: Halo bootstrap SHALL deliver config separately from execution logic +The plugin SHALL provide the runtime config payload in a transport that is separate from the frontend execution bundle so configuration and code loading can evolve independently. + +#### Scenario: Config is embedded without rebuilding executable inline logic +- **WHEN** a Halo page is rendered with the Live2D plugin enabled +- **THEN** the backend MUST emit the public config payload in a machine-readable form that the frontend bundle can read at startup +- **AND** the backend MUST not need to serialize a broad JavaScript object directly into inline runtime initialization code + +#### Scenario: Development and production share the same config contract +- **WHEN** the frontend is loaded from packaged assets or from a dev server +- **THEN** both startup modes MUST read the same public config payload shape +- **AND** environment-specific bootstrap differences MUST not require a second config format diff --git a/openspec/changes/integrate-modern-live2d-frontend/specs/multi-cubism-live2d-rendering/spec.md b/openspec/changes/integrate-modern-live2d-frontend/specs/multi-cubism-live2d-rendering/spec.md new file mode 100644 index 0000000..c9f63ce --- /dev/null +++ b/openspec/changes/integrate-modern-live2d-frontend/specs/multi-cubism-live2d-rendering/spec.md @@ -0,0 +1,9 @@ +## MODIFIED Requirements + +### Requirement: Renderer migration SHALL not require a new server-side model metadata API +The renderer migration SHALL continue working with the plugin's current server-side model loading endpoints while allowing Halo to bootstrap the runtime through a modern frontend entry and public config contract. + +#### Scenario: Modern Halo bootstrap remains sufficient for initial model selection +- **WHEN** the frontend runtime starts from the Halo plugin's modern bootstrap entry with the backend-provided public config payload +- **THEN** it MUST determine the initial model and texture selection without requiring an additional backend metadata endpoint +- **AND** it MUST continue loading models through the existing API path conventions diff --git a/openspec/changes/integrate-modern-live2d-frontend/tasks.md b/openspec/changes/integrate-modern-live2d-frontend/tasks.md new file mode 100644 index 0000000..4175131 --- /dev/null +++ b/openspec/changes/integrate-modern-live2d-frontend/tasks.md @@ -0,0 +1,27 @@ +## Tasks + +- [x] 1. Replace the Halo bootstrap path + - [x] 1.1 Add a dedicated frontend bootstrap entry for Halo pages that reads the backend-provided public config payload and starts the modern runtime. + - [x] 1.2 Update `Live2dInitProcessor` to inject the public config payload plus the modern frontend entry instead of `live2d-autoload.min.js` and inline `live2d.init(...)`. + +- [x] 2. Define the public runtime config contract + - [x] 2.1 Replace the current merged-settings exposure with an explicit backend public config mapper or DTO for frontend-safe fields. + - [x] 2.2 Update the frontend bootstrap/runtime config ingestion to consume the new public payload while preserving existing widget behavior. + - [x] 2.3 Include declarative `customTools` definitions in the public payload when configured. + +- [x] 3. Replace executable custom tools with safe declarative actions + - [x] 3.1 Define a frontend action registry for backend-configured custom tools instead of accepting executable callback or script content. + - [x] 3.2 Support an initial action set covering message display, widget visibility, chat toggling, model or texture switching, screenshot capture, URL opening, custom event emission, and any explicit safe model-loading action chosen for the first release. + - [x] 3.3 Add backend settings/schema support for configuring custom tools against that declarative action contract. + +- [x] 4. Wire frontend packaging into the plugin build + - [x] 4.1 Add plugin build tasks that build `packages/live2d` and synchronize its output into packaged plugin static assets under a dedicated runtime root. + - [x] 4.2 Ensure the backend injects a stable production entry path while allowing emitted chunks and assets to resolve correctly. + +- [x] 5. Support local Halo-page debugging + - [x] 5.1 Add a development-mode bootstrap path that targets the Vite dev server entry for `packages/live2d`. + - [x] 5.2 Keep production and development loading modes on the same public config contract so only the module source changes. + +- [x] 6. Remove legacy assets after cutover + - [x] 6.1 Delete the legacy `live2d-autoload` bootstrap assets and any unreachable old CSS/lib resources once no backend references remain. + - [x] 6.2 Update related documentation and resource references to describe the modern integration flow. diff --git a/package.json b/package.json index 7344e8b..bf69bc4 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,21 @@ { - "name": "plugin-live2d", - "private": true, - "author": { - "name": "LIlGG", - "url": "https://github.com/LIlGG" - }, - "contributors": [ - { - "name": "LIlGG", - "email": "mail@e.lixingyong.com", - "url": "https://github.com/LIlGG" - } - ], - "license": "MIT", - "devDependencies": { - "@biomejs/biome": "^1.9.3", - "typescript": "^5.7.2" - }, - "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a" + "name": "plugin-live2d", + "private": true, + "author": { + "name": "LIlGG", + "url": "https://github.com/LIlGG" + }, + "contributors": [ + { + "name": "LIlGG", + "email": "mail@e.lixingyong.com", + "url": "https://github.com/LIlGG" + } + ], + "license": "MIT", + "devDependencies": { + "@biomejs/biome": "^1.9.3", + "typescript": "^5.7.2" + }, + "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a" } diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 287ace8..eb21fa5 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -14,8 +14,9 @@ }, "scripts": { "dev": "vite --open", - "build": "tsc -b && vite build", - "check": "biome check --write" + "sync:custom-tool-actions": "node ./scripts/generate-custom-tool-actions.mjs", + "build": "pnpm sync:custom-tool-actions && tsc -b && vite build && vite build --config vite.halo.config.ts", + "check": "pnpm sync:custom-tool-actions && biome check --write" }, "dependencies": { "@lit/context": "^1.1.3", diff --git a/packages/live2d/scripts/generate-custom-tool-actions.mjs b/packages/live2d/scripts/generate-custom-tool-actions.mjs new file mode 100644 index 0000000..56434dd --- /dev/null +++ b/packages/live2d/scripts/generate-custom-tool-actions.mjs @@ -0,0 +1,50 @@ +import { promises as fs } from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const currentDir = path.dirname(fileURLToPath(import.meta.url)); +const packageRoot = path.resolve(currentDir, ".."); +const actionsDir = path.join( + packageRoot, + "src/live2d/tools/custom-tool-actions/actions", +); +const outputPath = path.join( + packageRoot, + "src/live2d/tools/custom-tool-actions/actions.generated.ts", +); + +const actionFiles = (await fs.readdir(actionsDir)) + .filter((file) => file.endsWith(".ts") && !file.endsWith(".d.ts")) + .sort(); + +const importLines = actionFiles.map( + (file, index) => + `import actionDefinition${index} from "./actions/${file.replace(/\.ts$/, "")}";`, +); + +const definitionEntries = actionFiles.map( + (_file, index) => ` actionDefinition${index},`, +); + +const generatedSource = `// This file is auto-generated by scripts/generate-custom-tool-actions.mjs. +// Do not edit it manually. + +${importLines.join("\n")} + +export const customToolActionDefinitions = [ +${definitionEntries.join("\n")} +] as const; + +export type CustomToolAction = Exclude< + ReturnType<(typeof customToolActionDefinitions)[number]["normalize"]>, + undefined +>; + +export type CustomToolActionType = CustomToolAction["type"]; + +export const CUSTOM_TOOL_ACTION_TYPES = customToolActionDefinitions.map( + (definition) => definition.type, +) as CustomToolActionType[]; +`; + +await fs.writeFile(outputPath, generatedSource); diff --git a/packages/live2d/src/Demo.tsx b/packages/live2d/src/Demo.tsx index 513cb70..f34e39e 100644 --- a/packages/live2d/src/Demo.tsx +++ b/packages/live2d/src/Demo.tsx @@ -1,13 +1,13 @@ import React from "react"; import ReactDOM from "react-dom/client"; -import { Live2dContextComponent } from "./components/Live2dContext"; +import "./components/Live2dContext"; const rootEl = document.getElementById("root"); if (rootEl) { const root = ReactDOM.createRoot(rootEl); root.render( - + {React.createElement("live2d-context")} , ); } diff --git a/packages/live2d/src/components/Live2dCanvas.tsx b/packages/live2d/src/components/Live2dCanvas.tsx index a4acffc..44da9c3 100644 --- a/packages/live2d/src/components/Live2dCanvas.tsx +++ b/packages/live2d/src/components/Live2dCanvas.tsx @@ -7,10 +7,8 @@ import { BeforeInitEvent } from "@/live2d/events/before-init.js"; import { ModelReadyEvent } from "@/live2d/events/model-ready"; import Model from "@/live2d/live2d/model"; import { consume } from "@lit/context"; -import { createComponent } from "@lit/react"; import { type PropertyValues, type TemplateResult, html } from "lit"; import { property, query, state } from "lit/decorators.js"; -import React from "react"; export class Live2dCanvas extends UnoLitElement { @consume({ context: configContext }) @@ -73,9 +71,3 @@ export class Live2dCanvas extends UnoLitElement { } customElements.define("live2d-canvas", Live2dCanvas); - -export const Live2dCanvasComponent = createComponent({ - tagName: "live2d-canvas", - elementClass: Live2dCanvas, - react: React, -}); diff --git a/packages/live2d/src/components/Live2dChatWindow.tsx b/packages/live2d/src/components/Live2dChatWindow.tsx index 9998a18..26c547e 100644 --- a/packages/live2d/src/components/Live2dChatWindow.tsx +++ b/packages/live2d/src/components/Live2dChatWindow.tsx @@ -6,10 +6,8 @@ import { } from "@/live2d/context/config-context"; import { sendMessage } from "@/live2d/helpers/sendMessage"; import { consume } from "@lit/context"; -import { createComponent } from "@lit/react"; import { type PropertyValues, type TemplateResult, html } from "lit"; import { property, query, state } from "lit/decorators.js"; -import React from "react"; import "iconify-icon"; const CHAT_PANEL_WIDTH = "min(26rem, calc(100vw - 1rem))"; @@ -263,9 +261,3 @@ export class Live2dChatWindow extends UnoLitElement { } customElements.define("live2d-chat-window", Live2dChatWindow); - -export const Live2dChatWindowComponent = createComponent({ - tagName: "live2d-chat-window", - elementClass: Live2dChatWindow, - react: React, -}); diff --git a/packages/live2d/src/components/Live2dContext.tsx b/packages/live2d/src/components/Live2dContext.tsx index fb38842..3f56baa 100644 --- a/packages/live2d/src/components/Live2dContext.tsx +++ b/packages/live2d/src/components/Live2dContext.tsx @@ -1,8 +1,6 @@ import { UnoLitElement } from "@/live2d/common/UnoLitElement"; -import { createComponent } from "@lit/react"; import { type TemplateResult, html } from "lit"; import { property } from "lit/decorators.js"; -import React from "react"; import "@/live2d/components/Live2dWidget"; import { createDefaultLive2dConfig } from "@/live2d/config/default-config"; import { @@ -23,9 +21,3 @@ export class Live2dContext extends UnoLitElement { } customElements.define("live2d-context", Live2dContext); - -export const Live2dContextComponent = createComponent({ - tagName: "live2d-context", - elementClass: Live2dContext, - react: React, -}); diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 78cabd5..8d78a82 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -12,12 +12,10 @@ import type { import { isNotEmpty } from "@/live2d/utils/isNotEmpty"; import { randomSelection } from "@/live2d/utils/randomSelection"; import { consume } from "@lit/context"; -import { createComponent } from "@lit/react"; import { type TemplateResult, html } from "lit"; import { property, state } from "lit/decorators.js"; import { classMap } from "lit/directives/class-map.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; -import React from "react"; export class Live2dTips extends UnoLitElement { @consume({ context: configContext }) @@ -195,9 +193,3 @@ export class Live2dTips extends UnoLitElement { } customElements.define("live2d-tips", Live2dTips); - -export const Live2dTipsComponent = createComponent({ - tagName: "live2d-tips", - elementClass: Live2dTips, - react: React, -}); diff --git a/packages/live2d/src/components/Live2dToggle.tsx b/packages/live2d/src/components/Live2dToggle.tsx index 4583dec..edb4ca5 100644 --- a/packages/live2d/src/components/Live2dToggle.tsx +++ b/packages/live2d/src/components/Live2dToggle.tsx @@ -11,11 +11,9 @@ import { rememberWidgetDismissal, } from "@/live2d/helpers/widgetVisibility"; import { consume } from "@lit/context"; -import { createComponent } from "@lit/react"; import { type TemplateResult, html } from "lit"; import { property } from "lit/decorators.js"; import { state } from "lit/decorators.js"; -import React from "react"; export class Live2dToggle extends UnoLitElement { @consume({ context: configContext }) @@ -102,9 +100,3 @@ export class Live2dToggle extends UnoLitElement { } customElements.define("live2d-toggle", Live2dToggle); - -export const Live2dToggleComponent = createComponent({ - tagName: "live2d-toggle", - elementClass: Live2dToggle, - react: React, -}); diff --git a/packages/live2d/src/components/Live2dTools.tsx b/packages/live2d/src/components/Live2dTools.tsx index 63e7f93..30177fc 100644 --- a/packages/live2d/src/components/Live2dTools.tsx +++ b/packages/live2d/src/components/Live2dTools.tsx @@ -9,10 +9,8 @@ import { defaultToolNames, toolRegistry } from "@/live2d/live2d/tools"; import { CustomTool } from "@/live2d/live2d/tools/custom-tool"; import type { Tool } from "@/live2d/live2d/tools/tools"; import { consume } from "@lit/context"; -import { createComponent } from "@lit/react"; import { type TemplateResult, html } from "lit"; import { property, state } from "lit/decorators.js"; -import React from "react"; import "iconify-icon"; export class Live2dTools extends UnoLitElement { @@ -138,9 +136,3 @@ export class Live2dTools extends UnoLitElement { } customElements.define("live2d-tools", Live2dTools); - -export const Live2dToolsComponent = createComponent({ - tagName: "live2d-tools", - elementClass: Live2dTools, - react: React, -}); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 97121bb..98057d0 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -4,10 +4,8 @@ import { configContext, } from "@/live2d/context/config-context"; import { consume } from "@lit/context"; -import { createComponent } from "@lit/react"; import { type TemplateResult, html } from "lit"; import { property, state } from "lit/decorators.js"; -import React from "react"; import "@/live2d/components/Live2dToggle"; import "@/live2d/components/Live2dTips"; import "@/live2d/components/Live2dCanvas"; @@ -155,9 +153,3 @@ export class Live2dWidget extends UnoLitElement { } customElements.define("live2d-widget", Live2dWidget); - -export const Live2dWidgetComponent = createComponent({ - tagName: "live2d-widget", - elementClass: Live2dWidget, - react: React, -}); diff --git a/packages/live2d/src/config/custom-tools/normalize-custom-tools.ts b/packages/live2d/src/config/custom-tools/normalize-custom-tools.ts new file mode 100644 index 0000000..627454e --- /dev/null +++ b/packages/live2d/src/config/custom-tools/normalize-custom-tools.ts @@ -0,0 +1,44 @@ +import { + isRecord, + pickNumber, + pickString, +} from "@/live2d/config/normalize-helpers"; +import { normalizeCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/index"; +import type { CustomToolConfig } from "@/live2d/live2d/tools/custom-tool-config"; +import { isNotEmptyString } from "@/live2d/utils/isString"; + +export const normalizeCustomTools = ( + tools: unknown, +): CustomToolConfig[] | undefined => { + if (!Array.isArray(tools)) { + return; + } + + return tools.flatMap((tool) => { + if (!isRecord(tool) || !isNotEmptyString(tool.name)) { + return []; + } + + const action = normalizeCustomToolAction(tool.action); + if (!action) { + return []; + } + + const normalizedTool: CustomToolConfig = { + name: tool.name, + action, + }; + + const icon = pickString(tool.icon); + if (icon) { + normalizedTool.icon = icon; + } + + const priority = pickNumber(tool.priority); + if (priority !== undefined) { + normalizedTool.priority = priority; + } + + return [normalizedTool]; + }); +}; diff --git a/packages/live2d/src/config/normalize-config.ts b/packages/live2d/src/config/normalize-config.ts index 0006449..851a1d3 100644 --- a/packages/live2d/src/config/normalize-config.ts +++ b/packages/live2d/src/config/normalize-config.ts @@ -1,6 +1,13 @@ +import { normalizeCustomTools } from "@/live2d/config/custom-tools/normalize-custom-tools"; import { createDefaultLive2dConfig } from "@/live2d/config/default-config"; +import { + ensureTrailingSlash, + pickBoolean, + pickNumber, + pickString, +} from "@/live2d/config/normalize-helpers"; import type { Live2dConfig } from "@/live2d/context/config-context"; -import { isNotEmptyString, isString } from "@/live2d/utils/isString"; +import { isNotEmptyString } from "@/live2d/utils/isString"; export interface LegacyLive2dConfigInput extends Partial { aiChatBaseSetting?: { @@ -12,39 +19,6 @@ export interface LegacyLive2dConfigInput extends Partial { tips?: string; } -const ensureTrailingSlash = (value: string): string => - value.endsWith("/") ? value : `${value}/`; - -const pickString = (...values: unknown[]): string | undefined => { - for (const value of values) { - if (isNotEmptyString(value)) { - return value; - } - } -}; - -const pickNumber = (...values: unknown[]): number | undefined => { - for (const value of values) { - if (typeof value === "number" && Number.isFinite(value)) { - return value; - } - if (isString(value) && value.trim() !== "") { - const parsed = Number(value); - if (Number.isFinite(parsed)) { - return parsed; - } - } - } -}; - -const pickBoolean = (...values: unknown[]): boolean | undefined => { - for (const value of values) { - if (typeof value === "boolean") { - return value; - } - } -}; - const normalizeTools = (tools: unknown): string[] | undefined => { if (!Array.isArray(tools)) { return; @@ -83,6 +57,7 @@ export const normalizeLive2dConfig = ( pickString(input.screenshotName, input.photoName) ?? defaults.screenshotName, tools: normalizeTools(input.tools) ?? [...(defaults.tools ?? [])], + customTools: normalizeCustomTools(input.customTools) ?? [], chunkTimeout: pickNumber( input.chunkTimeout, diff --git a/packages/live2d/src/config/normalize-helpers.ts b/packages/live2d/src/config/normalize-helpers.ts new file mode 100644 index 0000000..887dafd --- /dev/null +++ b/packages/live2d/src/config/normalize-helpers.ts @@ -0,0 +1,37 @@ +import { isNotEmptyString, isString } from "@/live2d/utils/isString"; + +export const ensureTrailingSlash = (value: string): string => + value.endsWith("/") ? value : `${value}/`; + +export const pickString = (...values: unknown[]): string | undefined => { + for (const value of values) { + if (isNotEmptyString(value)) { + return value; + } + } +}; + +export const pickNumber = (...values: unknown[]): number | undefined => { + for (const value of values) { + if (typeof value === "number" && Number.isFinite(value)) { + return value; + } + if (isString(value) && value.trim() !== "") { + const parsed = Number(value); + if (Number.isFinite(parsed)) { + return parsed; + } + } + } +}; + +export const pickBoolean = (...values: unknown[]): boolean | undefined => { + for (const value of values) { + if (typeof value === "boolean") { + return value; + } + } +}; + +export const isRecord = (value: unknown): value is Record => + typeof value === "object" && value !== null; diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index ba47421..1068ecd 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -1,4 +1,4 @@ -import type { CustomToolConfig } from "@/live2d/live2d/tools/custom-tool"; +import type { CustomToolConfig } from "@/live2d/live2d/tools/custom-tool-config"; import { createContext } from "@lit/context"; export interface ObjectAny extends Record {} diff --git a/packages/live2d/src/halo-config.ts b/packages/live2d/src/halo-config.ts new file mode 100644 index 0000000..2c1dc67 --- /dev/null +++ b/packages/live2d/src/halo-config.ts @@ -0,0 +1,33 @@ +import type { LegacyLive2dConfigInput } from "@/live2d/config/normalize-config"; + +export const HALO_LIVE2D_CONFIG_ELEMENT_ID = "plugin-live2d-config"; + +export interface HaloLive2dConfig extends LegacyLive2dConfigInput { + assetPath: string; +} + +const isRecord = (value: unknown): value is Record => + typeof value === "object" && value !== null; + +export const readHaloLive2dConfig = ( + documentRoot: Document = document, +): HaloLive2dConfig => { + const configElement = documentRoot.getElementById( + HALO_LIVE2D_CONFIG_ELEMENT_ID, + ); + if (!configElement) { + throw new Error("Missing Halo Live2D config element."); + } + + const configText = configElement.textContent?.trim(); + if (!configText) { + throw new Error("Halo Live2D config payload is empty."); + } + + const parsedConfig: unknown = JSON.parse(configText); + if (!isRecord(parsedConfig) || typeof parsedConfig.assetPath !== "string") { + throw new Error("Halo Live2D config payload is invalid."); + } + + return parsedConfig as HaloLive2dConfig; +}; diff --git a/packages/live2d/src/halo.ts b/packages/live2d/src/halo.ts new file mode 100644 index 0000000..95d607a --- /dev/null +++ b/packages/live2d/src/halo.ts @@ -0,0 +1,33 @@ +import { + HALO_LIVE2D_CONFIG_ELEMENT_ID, + readHaloLive2dConfig, +} from "@/live2d/halo-config"; + +let bootstrapPromise: Promise | undefined; + +export const bootstrapFromHalo = async (): Promise => { + if (bootstrapPromise) { + return bootstrapPromise; + } + + bootstrapPromise = (async () => { + const config = readHaloLive2dConfig(); + const { createLive2d } = await import("@/live2d/live2d/runtime"); + const live2d = window.live2d ?? createLive2d(); + if (!window.live2d) { + window.live2d = live2d; + } + live2d.init(config.assetPath, config); + })(); + + return bootstrapPromise; +}; + +if ( + typeof window !== "undefined" && + document.getElementById(HALO_LIVE2D_CONFIG_ELEMENT_ID) +) { + void bootstrapFromHalo().catch((error) => { + console.error("[PluginLive2d] Failed to bootstrap Live2D.", error); + }); +} diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts index cb8f774..942c3fd 100644 --- a/packages/live2d/src/helpers/loadTipsResource.ts +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -8,6 +8,7 @@ import type { } from "@/live2d/context/config-context"; type PartialTipConfig = Partial; +const MISSING_TIPS_CACHE_PREFIX = "plugin-live2d:missing-tips:"; const createEmptyTipConfig = (): TipConfig => ({ mouseover: [], @@ -17,6 +18,34 @@ const createEmptyTipConfig = (): TipConfig => ({ time: [], }); +const getMissingTipsCacheKey = (url: string): string => + `${MISSING_TIPS_CACHE_PREFIX}${url}`; + +const hasWindowSessionStorage = (): boolean => + typeof window !== "undefined" && typeof window.sessionStorage !== "undefined"; + +const wasMissingTipsUrlCached = (url: string): boolean => { + if (!hasWindowSessionStorage()) { + return false; + } + + try { + return window.sessionStorage.getItem(getMissingTipsCacheKey(url)) === "1"; + } catch { + return false; + } +}; + +const rememberMissingTipsUrl = (url: string): void => { + if (!hasWindowSessionStorage()) { + return; + } + + try { + window.sessionStorage.setItem(getMissingTipsCacheKey(url), "1"); + } catch {} +}; + const isRecord = (value: unknown): value is Record => typeof value === "object" && value !== null; @@ -106,9 +135,16 @@ export async function loadTipsResource( return createEmptyTipConfig(); } + if (wasMissingTipsUrlCached(url)) { + return; + } + try { const response = await fetch(url); if (!response.ok) { + if (response.status === 404) { + rememberMissingTipsUrl(url); + } return; } const result: unknown = await response.json(); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/actions.generated.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/actions.generated.ts new file mode 100644 index 0000000..4b4dbeb --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/actions.generated.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by scripts/generate-custom-tool-actions.mjs. +// Do not edit it manually. + +import actionDefinition0 from "./actions/emit-event"; +import actionDefinition1 from "./actions/load-model"; +import actionDefinition2 from "./actions/open-url"; +import actionDefinition3 from "./actions/screenshot"; +import actionDefinition4 from "./actions/send-message"; +import actionDefinition5 from "./actions/switch-model"; +import actionDefinition6 from "./actions/switch-texture"; +import actionDefinition7 from "./actions/toggle-chat"; +import actionDefinition8 from "./actions/widget-visibility"; + +export const customToolActionDefinitions = [ + actionDefinition0, + actionDefinition1, + actionDefinition2, + actionDefinition3, + actionDefinition4, + actionDefinition5, + actionDefinition6, + actionDefinition7, + actionDefinition8, +] as const; + +export type CustomToolAction = Exclude< + ReturnType<(typeof customToolActionDefinitions)[number]["normalize"]>, + undefined +>; + +export type CustomToolActionType = CustomToolAction["type"]; + +export const CUSTOM_TOOL_ACTION_TYPES = customToolActionDefinitions.map( + (definition) => definition.type, +) as CustomToolActionType[]; diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/actions/emit-event.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/emit-event.ts new file mode 100644 index 0000000..af5df32 --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/emit-event.ts @@ -0,0 +1,48 @@ +import { defineCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/types"; +import { isNotEmptyString } from "@/live2d/utils/isString"; + +const isNamespacedEventName = (value: string): boolean => value.includes(":"); + +const parseEventDetail = (detail: unknown): unknown => { + if (typeof detail !== "string") { + return detail; + } + + const trimmed = detail.trim(); + if (!trimmed) { + return detail; + } + + try { + return JSON.parse(trimmed); + } catch { + return detail; + } +}; + +export default defineCustomToolAction({ + type: "emit-event", + normalize: (action) => { + if (!isNotEmptyString(action.eventName)) { + return; + } + + return { + type: "emit-event", + eventName: action.eventName, + detail: action.detail, + }; + }, + execute: (_context, action) => { + if (!isNamespacedEventName(action.eventName)) { + return; + } + window.dispatchEvent( + new CustomEvent(action.eventName, { + detail: parseEventDetail(action.detail), + bubbles: true, + composed: true, + }), + ); + }, +}); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/actions/load-model.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/load-model.ts new file mode 100644 index 0000000..0e16a82 --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/load-model.ts @@ -0,0 +1,29 @@ +import { pickNumber, pickString } from "@/live2d/config/normalize-helpers"; +import { defineCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/types"; + +export default defineCustomToolAction({ + type: "load-model", + normalize: (action) => { + const modelId = pickNumber(action.modelId); + if (modelId === undefined) { + return; + } + + return { + type: "load-model", + modelId, + modelTexturesId: pickNumber(action.modelTexturesId), + message: pickString(action.message), + }; + }, + execute: ({ model }, action) => { + if (!model) { + return; + } + return model.loadModel( + action.modelId, + action.modelTexturesId ?? 0, + action.message, + ); + }, +}); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/actions/open-url.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/open-url.ts new file mode 100644 index 0000000..d887b1f --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/open-url.ts @@ -0,0 +1,21 @@ +import { pickString } from "@/live2d/config/normalize-helpers"; +import { defineCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/types"; +import { isNotEmptyString } from "@/live2d/utils/isString"; + +export default defineCustomToolAction({ + type: "open-url", + normalize: (action) => { + if (!isNotEmptyString(action.url)) { + return; + } + + return { + type: "open-url", + url: action.url, + target: pickString(action.target) === "_self" ? "_self" : "_blank", + }; + }, + execute: (_context, action) => { + window.open(action.url, action.target ?? "_blank"); + }, +}); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/actions/screenshot.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/screenshot.ts new file mode 100644 index 0000000..703431a --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/screenshot.ts @@ -0,0 +1,18 @@ +import { pickString } from "@/live2d/config/normalize-helpers"; +import { defineCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/types"; + +export default defineCustomToolAction({ + type: "screenshot", + normalize: (action) => ({ + type: "screenshot", + screenshotName: pickString(action.screenshotName), + }), + execute: ({ config, model }, action) => { + if (!model) { + return; + } + return model.capture( + action.screenshotName ?? config.screenshotName ?? "live2d", + ); + }, +}); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/actions/send-message.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/send-message.ts new file mode 100644 index 0000000..fcee157 --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/send-message.ts @@ -0,0 +1,23 @@ +import { pickNumber } from "@/live2d/config/normalize-helpers"; +import { sendMessage } from "@/live2d/helpers/sendMessage"; +import { defineCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/types"; +import { isNotEmptyString } from "@/live2d/utils/isString"; + +export default defineCustomToolAction({ + type: "send-message", + normalize: (action) => { + if (!isNotEmptyString(action.text)) { + return; + } + + return { + type: "send-message", + text: action.text, + timeout: pickNumber(action.timeout), + priority: pickNumber(action.priority), + }; + }, + execute: (_context, action) => { + sendMessage(action.text, action.timeout, action.priority); + }, +}); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/actions/switch-model.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/switch-model.ts new file mode 100644 index 0000000..6a00bba --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/switch-model.ts @@ -0,0 +1,12 @@ +import { defineCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/types"; + +export default defineCustomToolAction({ + type: "switch-model", + normalize: () => ({ type: "switch-model" }), + execute: ({ model }) => { + if (!model) { + return; + } + return model.loadOtherModel(); + }, +}); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/actions/switch-texture.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/switch-texture.ts new file mode 100644 index 0000000..f2d8072 --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/switch-texture.ts @@ -0,0 +1,12 @@ +import { defineCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/types"; + +export default defineCustomToolAction({ + type: "switch-texture", + normalize: () => ({ type: "switch-texture" }), + execute: ({ model }) => { + if (!model) { + return; + } + return model.loadRandTextures(); + }, +}); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/actions/toggle-chat.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/toggle-chat.ts new file mode 100644 index 0000000..136bf9c --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/toggle-chat.ts @@ -0,0 +1,10 @@ +import { ToggleChatWindowEvent } from "@/live2d/events/toggle-chat-window"; +import { defineCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/types"; + +export default defineCustomToolAction({ + type: "toggle-chat", + normalize: () => ({ type: "toggle-chat" }), + execute: () => { + window.dispatchEvent(new ToggleChatWindowEvent()); + }, +}); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/actions/widget-visibility.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/widget-visibility.ts new file mode 100644 index 0000000..b665038 --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/actions/widget-visibility.ts @@ -0,0 +1,44 @@ +import { ToggleCanvasEvent } from "@/live2d/events/toggle-canvas"; +import { defineCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/types"; + +type WidgetVisibilityMode = "show" | "hide" | "toggle"; + +const isWidgetVisibilityMode = ( + value: unknown, +): value is WidgetVisibilityMode => + value === "show" || value === "hide" || value === "toggle"; + +const readWidgetVisibility = (): boolean => { + const widget = document + .querySelector("live2d-widget") + ?.shadowRoot?.getElementById("live2d-plugin"); + if (!widget) { + return false; + } + return widget.classList.contains("pointer-events-auto"); +}; + +const emitWidgetVisibility = (isShow: boolean): void => { + window.dispatchEvent(new ToggleCanvasEvent({ isShow })); +}; + +export default defineCustomToolAction({ + type: "widget-visibility", + normalize: (action) => { + if (!isWidgetVisibilityMode(action.mode)) { + return; + } + + return { + type: "widget-visibility", + mode: action.mode, + }; + }, + execute: (_context, action) => { + if (action.mode === "toggle") { + emitWidgetVisibility(!readWidgetVisibility()); + return; + } + emitWidgetVisibility(action.mode === "show"); + }, +}); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/index.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/index.ts new file mode 100644 index 0000000..3abc9ff --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/index.ts @@ -0,0 +1,100 @@ +import { isRecord } from "@/live2d/config/normalize-helpers"; +import { + CUSTOM_TOOL_ACTION_TYPES, + type CustomToolAction, + customToolActionDefinitions, +} from "@/live2d/live2d/tools/custom-tool-actions/actions.generated"; +import type { + CustomToolActionDefinition, + CustomToolActionHandler, + CustomToolExecutionContext, +} from "@/live2d/live2d/tools/custom-tool-actions/types"; + +export const isCustomToolActionType = ( + value: unknown, +): value is CustomToolAction["type"] => + CUSTOM_TOOL_ACTION_TYPES.includes(String(value) as CustomToolAction["type"]); + +const isCustomToolActionDefinition = ( + value: unknown, +): value is CustomToolActionDefinition => + isRecord(value) && + isCustomToolActionType(value.type) && + typeof value.normalize === "function" && + typeof value.execute === "function"; + +const createCustomToolActionRegistry = (): Record< + CustomToolAction["type"], + CustomToolActionDefinition +> => { + const registry: Partial< + Record + > = {}; + + for (const actionDefinition of customToolActionDefinitions) { + if (!isCustomToolActionDefinition(actionDefinition)) { + throw new Error("Invalid custom tool action definition"); + } + + const actionType = actionDefinition.type as CustomToolAction["type"]; + + if (registry[actionType]) { + throw new Error( + `Duplicate custom tool action definition for ${actionType}`, + ); + } + + registry[actionType] = actionDefinition; + } + + for (const actionType of CUSTOM_TOOL_ACTION_TYPES) { + if (!registry[actionType]) { + throw new Error( + `Missing custom tool action registration for ${actionType}`, + ); + } + } + + return registry as Record< + CustomToolAction["type"], + CustomToolActionDefinition + >; +}; + +const customToolActionRegistry = createCustomToolActionRegistry(); + +export type { CustomToolExecutionContext } from "./types"; + +const getCustomToolActionDefinition = ( + type: T, +): CustomToolActionDefinition> => + customToolActionRegistry[type] as unknown as CustomToolActionDefinition< + Extract + >; + +const executeTypedCustomToolAction = ( + definition: CustomToolActionDefinition, + context: CustomToolExecutionContext, + action: T, +): ReturnType> => + definition.execute(context, action); + +export const normalizeCustomToolAction = ( + action: unknown, +): CustomToolAction | undefined => { + if (!isRecord(action) || !isCustomToolActionType(action.type)) { + return; + } + + return getCustomToolActionDefinition(action.type).normalize(action); +}; + +export const executeCustomToolAction = ( + context: CustomToolExecutionContext, + action: CustomToolAction, +): void | Promise => + executeTypedCustomToolAction( + getCustomToolActionDefinition(action.type), + context, + action, + ); diff --git a/packages/live2d/src/live2d/tools/custom-tool-actions/types.ts b/packages/live2d/src/live2d/tools/custom-tool-actions/types.ts new file mode 100644 index 0000000..4f42432 --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-actions/types.ts @@ -0,0 +1,34 @@ +import type { Live2dConfig } from "@/live2d/context/config-context"; +import type Model from "@/live2d/live2d/model"; + +export interface CustomToolExecutionContext { + config: Live2dConfig; + model?: Model | null; + tool: { + name: string; + icon?: string; + priority?: number; + }; +} + +export type CustomToolActionInput = Record; + +export interface BaseCustomToolAction { + type: string; +} + +export type CustomToolActionHandler< + T extends BaseCustomToolAction = BaseCustomToolAction, +> = (context: CustomToolExecutionContext, action: T) => void | Promise; + +export interface CustomToolActionDefinition< + T extends BaseCustomToolAction = BaseCustomToolAction, +> { + type: T["type"]; + normalize: (action: CustomToolActionInput) => T | undefined; + execute: CustomToolActionHandler; +} + +export const defineCustomToolAction = ( + definition: CustomToolActionDefinition, +): CustomToolActionDefinition => definition; diff --git a/packages/live2d/src/live2d/tools/custom-tool-config.ts b/packages/live2d/src/live2d/tools/custom-tool-config.ts new file mode 100644 index 0000000..50d7d41 --- /dev/null +++ b/packages/live2d/src/live2d/tools/custom-tool-config.ts @@ -0,0 +1,14 @@ +export { + CUSTOM_TOOL_ACTION_TYPES, + type CustomToolAction, + type CustomToolActionType, +} from "@/live2d/live2d/tools/custom-tool-actions/actions.generated"; + +import type { CustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/actions.generated"; + +export interface CustomToolConfig { + name: string; + icon?: string; + priority?: number; + action: CustomToolAction; +} diff --git a/packages/live2d/src/live2d/tools/custom-tool.ts b/packages/live2d/src/live2d/tools/custom-tool.ts index f5ab080..b8ae7bf 100644 --- a/packages/live2d/src/live2d/tools/custom-tool.ts +++ b/packages/live2d/src/live2d/tools/custom-tool.ts @@ -1,15 +1,10 @@ import type { Live2dConfig } from "@/live2d/context/config-context"; import type Model from "@/live2d/live2d/model"; +import { executeCustomToolAction } from "@/live2d/live2d/tools/custom-tool-actions/index"; +import type { CustomToolConfig } from "@/live2d/live2d/tools/custom-tool-config"; import { Tool } from "@/live2d/live2d/tools/tools"; import { isNotEmptyString } from "@/live2d/utils/isString"; -export type CustomToolConfig = { - name: string; - icon?: string; - priority?: number; - execute: ((config: Live2dConfig) => void) | string; -}; - /** * 自定义工具 */ @@ -17,18 +12,18 @@ export class CustomTool extends Tool { priority: number; _name: string; _icon?: string; - _execute: ((config: Live2dConfig) => void) | string; + _tool: CustomToolConfig; constructor( config: Live2dConfig, - { name, icon, execute, priority }: CustomToolConfig, + tool: CustomToolConfig, model?: Model | null, ) { super(config, model); - this._name = name; - this._icon = icon; - this._execute = execute; - this.priority = priority || 0; + this._tool = tool; + this._name = tool.name; + this._icon = tool.icon; + this.priority = tool.priority || 0; } name() { @@ -41,15 +36,13 @@ export class CustomTool extends Tool { } execute() { - if (typeof this._execute === "string") { - const customClass = new Function(` - return class { - ${this._execute} - } - `)(); - new customClass().execute.bind(this)(this.getConfig()); - return; - } - this._execute.bind(this)(this.getConfig()); + return executeCustomToolAction( + { + config: this.getConfig(), + model: this.getModel(), + tool: this._tool, + }, + this._tool.action, + ); } } diff --git a/packages/live2d/tsconfig.tsbuildinfo b/packages/live2d/tsconfig.tsbuildinfo index e48a7da..7ec22d3 100644 --- a/packages/live2d/tsconfig.tsbuildinfo +++ b/packages/live2d/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/demo.tsx","./src/env.d.ts","./src/index.ts","./src/api/chat-api.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dchatwindow.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/config/default-config.ts","./src/config/normalize-config.ts","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/model-ready.ts","./src/events/send-message.ts","./src/events/stream-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/toggle-chat-window.ts","./src/events/types.ts","./src/helpers/createstreammessage.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadfulltipsresource.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/helpers/widgetdrawer.ts","./src/helpers/widgetvisibility.ts","./src/live2d/console-status.ts","./src/live2d/model.ts","./src/live2d/runtime.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/styles/unocss.global.css.d.ts","./src/types/assets.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"version":"5.7.3"} \ No newline at end of file +{"root":["./src/demo.tsx","./src/env.d.ts","./src/halo-config.ts","./src/halo.ts","./src/index.ts","./src/api/chat-api.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dchatwindow.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/config/default-config.ts","./src/config/normalize-config.ts","./src/config/normalize-helpers.ts","./src/config/custom-tools/normalize-custom-tools.ts","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/model-ready.ts","./src/events/send-message.ts","./src/events/stream-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/toggle-chat-window.ts","./src/events/types.ts","./src/helpers/createstreammessage.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadfulltipsresource.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/helpers/widgetdrawer.ts","./src/helpers/widgetvisibility.ts","./src/live2d/console-status.ts","./src/live2d/model.ts","./src/live2d/runtime.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool-config.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/live2d/tools/custom-tool-actions/actions.generated.ts","./src/live2d/tools/custom-tool-actions/index.ts","./src/live2d/tools/custom-tool-actions/types.ts","./src/live2d/tools/custom-tool-actions/actions/emit-event.ts","./src/live2d/tools/custom-tool-actions/actions/load-model.ts","./src/live2d/tools/custom-tool-actions/actions/open-url.ts","./src/live2d/tools/custom-tool-actions/actions/screenshot.ts","./src/live2d/tools/custom-tool-actions/actions/send-message.ts","./src/live2d/tools/custom-tool-actions/actions/switch-model.ts","./src/live2d/tools/custom-tool-actions/actions/switch-texture.ts","./src/live2d/tools/custom-tool-actions/actions/toggle-chat.ts","./src/live2d/tools/custom-tool-actions/actions/widget-visibility.ts","./src/styles/unocss.global.css.d.ts","./src/types/assets.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"version":"5.7.3"} \ No newline at end of file diff --git a/packages/live2d/vite.halo.config.ts b/packages/live2d/vite.halo.config.ts new file mode 100644 index 0000000..8eb14eb --- /dev/null +++ b/packages/live2d/vite.halo.config.ts @@ -0,0 +1,19 @@ +import { resolve } from "node:path"; +import { defineConfig } from "vite"; +import tsconfigPaths from "vite-tsconfig-paths"; + +export default defineConfig({ + base: "./", + plugins: [tsconfigPaths()], + build: { + emptyOutDir: false, + outDir: "dist", + rollupOptions: { + input: resolve(__dirname, "src/halo.ts"), + output: { + entryFileNames: "halo.js", + chunkFileNames: "chunks/[name]-[hash].js", + }, + }, + }, +}); diff --git a/src/main/java/run/halo/live2d/Live2dInitProcessor.java b/src/main/java/run/halo/live2d/Live2dInitProcessor.java index 4c2eb1a..fdc40cf 100644 --- a/src/main/java/run/halo/live2d/Live2dInitProcessor.java +++ b/src/main/java/run/halo/live2d/Live2dInitProcessor.java @@ -2,8 +2,6 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; -import java.util.Arrays; -import java.util.Objects; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -39,6 +37,10 @@ public class Live2dInitProcessor implements TemplateHeadProcessor { private final static String LIVE2D_LOAD_TIME = "defer"; + private final static String HALO_CONFIG_ELEMENT_ID = "plugin-live2d-config"; + private final static String LIVE2D_BOOTSTRAP_ENTRY = "live2d/halo.js"; + private final static String VITE_CLIENT_ENTRY = "/@vite/client"; + private final static String VITE_HALO_ENTRY = "/src/halo.ts"; /** * 插件静态资源地址 @@ -57,61 +59,105 @@ public class Live2dInitProcessor implements TemplateHeadProcessor { @Override public Mono process(ITemplateContext context, IModel model, IElementModelStructureHandler structureHandler) { - return this.live2dSetting.getConfig() - .flatMap(config -> themeFetcher.getActiveThemeName() - .map(themeName -> { - ((ObjectNode) config).put("tips", - String.format(THEME_TIPS_PATH_TEMPLATE, themeName)); - return config; - }) - .map(this::preprocessConfig) - ) + return themeFetcher.getActiveThemeLive2dTipsPath(THEME_TIPS_PATH_TEMPLATE) + .flatMap(live2dSetting::getPublicConfig) + .map(config -> { + ((ObjectNode) config).put("assetPath", LIVE2D_SOURCE_PATH); + return config; + }) .flatMap(config -> { final IModelFactory modelFactory = context.getModelFactory(); - return live2dAutoloadScript(config).flatMap(script -> { + return live2dBootstrapScript(config).flatMap(script -> { model.add(modelFactory.createText(script)); return Mono.empty(); }); - }).then(); + }) + .then(); } - private JsonNode preprocessConfig(JsonNode config) { - ((ObjectNode) config).remove(Arrays.asList("proxySetting", "openAiSetting")); - ((ObjectNode) config.get("aiChatBaseSetting")).remove( - Arrays.asList("isAnonymous", "systemMessage")); - return config; + private Mono live2dBootstrapScript(JsonNode config) { + return Mono.zip( + this.live2dSetting.getValue("advanced", "loadTime") + .map(node -> node.asText(LIVE2D_LOAD_TIME)) + .defaultIfEmpty(LIVE2D_LOAD_TIME), + resolveBootstrapLoaderScript() + ) + .map(tuple -> """ + + + """.formatted( + HALO_CONFIG_ELEMENT_ID, + escapeJsonForScript(config.toString()), + wrapBootstrapLoader(tuple.getT1(), tuple.getT2()) + )); } - private Mono live2dAutoloadScript(JsonNode config) { + private Mono resolveBootstrapLoaderScript() { + return Mono.zip( + this.live2dSetting.getValue("advanced", "useFrontendDevServer") + .map(node -> node.asBoolean(false)) + .defaultIfEmpty(false), + this.live2dSetting.getValue("advanced", "frontendDevServerUrl") + .map(node -> normalizeDevServerUrl(node.asText())) + .defaultIfEmpty("http://localhost:5173") + ) + .map(tuple -> tuple.getT1() + ? devServerBootstrapScript(tuple.getT2()) + : productionBootstrapScript()); + } + + private String wrapBootstrapLoader(String loadTime, String bootstrapScript) { String template = """ - live2d.init("%1$s", %2$s) - """.formatted(LIVE2D_SOURCE_PATH, config.toPrettyString()); - return this.live2dSetting.getValue("advanced", "loadTime") - .map(node -> node.asText(LIVE2D_LOAD_TIME)) - .map(loadTime -> """ - - - """.formatted(LIVE2D_SOURCE_PATH, loadTime, loadLive2d(loadTime, template)) - ); + const bootstrap = () => { + %s + }; + if (%s) { + bootstrap(); + } else { + %s + } + """; + + if (LIVE2D_LOAD_TIME.equals(loadTime)) { + return template.formatted( + bootstrapScript, + "document.readyState !== 'loading'", + "document.addEventListener('DOMContentLoaded', bootstrap, { once: true });"); + } + + return template.formatted( + bootstrapScript, + "document.readyState === 'complete'", + "window.addEventListener('load', bootstrap, { once: true });"); + } + + private String productionBootstrapScript() { + return """ + import("%s") + .catch((error) => console.error("[PluginLive2d] Failed to load Live2D bootstrap module.", error)); + """.formatted(LIVE2D_SOURCE_PATH + LIVE2D_BOOTSTRAP_ENTRY); } - private CharSequence loadLive2d(String loadTime, String loadingScript) { - String template; - if (Objects.equals(loadTime, LIVE2D_LOAD_TIME)) { - template = """ - document.addEventListener('DOMContentLoaded', () => { - %s - }) - """; - } else { - template = """ - window.addEventListener('load', () => { - %s - }) - """; + private String devServerBootstrapScript(String devServerUrl) { + return """ + Promise.all([ + import("%1$s"), + import("%2$s") + ]) + .catch((error) => console.error("[PluginLive2d] Failed to load Live2D dev server bootstrap module.", error)); + """.formatted(devServerUrl + VITE_CLIENT_ENTRY, devServerUrl + VITE_HALO_ENTRY); + } + + private String normalizeDevServerUrl(String url) { + if (url == null || url.isBlank()) { + return "http://localhost:5173"; } - return template.formatted(loadingScript); + return url.endsWith("/") ? url.substring(0, url.length() - 1) : url; + } + + private String escapeJsonForScript(String json) { + return json.replace(" getValue(String groupName, String key); /** - * 获取适用于 Live2d 的配置 + * 获取适用于 Live2d 前端公开运行时的配置 * * @return 配置 */ - Mono getConfig(); + Mono getPublicConfig(String themeTipsPath); } diff --git a/src/main/java/run/halo/live2d/Live2dSettingProcess.java b/src/main/java/run/halo/live2d/Live2dSettingProcess.java index 7098190..a6242b8 100644 --- a/src/main/java/run/halo/live2d/Live2dSettingProcess.java +++ b/src/main/java/run/halo/live2d/Live2dSettingProcess.java @@ -1,8 +1,10 @@ package run.halo.live2d; import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -18,7 +20,16 @@ @Component @Slf4j @RequiredArgsConstructor -public class Live2dSettingProcess extends JsonNodeFactory implements Live2dSetting { +public class Live2dSettingProcess implements Live2dSetting { + private static final List BASE_FIELDS = List.of( + "modelId", "modelTexturesId", "isForceUseDefaultConfig", "isTools", "tools"); + private static final List API_FIELDS = List.of("apiPath", "hitokotoApi"); + private static final List TIPS_FIELDS = List.of( + "firstOpenSite", "backSite", "backSiteTip", "copyContent", "copyContentTip", + "openConsole", "openConsoleTip", "selectorTips", "tipsPath"); + private static final List ADVANCED_FIELDS = List.of( + "consoleShowStatu", "photoName", "live2dLocation"); + private final ReactiveSettingFetcher settingFetcher; @Override @@ -32,15 +43,194 @@ public Mono getValue(String groupName, String key) { } @Override - public Mono getConfig() { + public Mono getPublicConfig(String themeTipsPath) { return settingFetcher.getValues().map(data -> { ObjectNode objectNode = JsonNodeFactory.instance.objectNode(); - data.values().forEach(v -> { - v.fieldNames().forEachRemaining(otherK -> { - objectNode.set(otherK, v.get(otherK)); - }); - }); + copyFields(objectNode, data.get("base"), BASE_FIELDS); + copyFields(objectNode, data.get("api"), API_FIELDS); + copyFields(objectNode, data.get("tips"), TIPS_FIELDS); + copyFields(objectNode, data.get("advanced"), ADVANCED_FIELDS); + copyAiChatFields(objectNode, data.get("aichat")); + copyCustomTools(objectNode, data.get("customTools")); + if (themeTipsPath != null && !themeTipsPath.isBlank()) { + objectNode.put("themeTipsPath", themeTipsPath); + } return objectNode; }); } + + private void copyFields(ObjectNode target, JsonNode source, List fields) { + if (source == null || source.isNull()) { + return; + } + fields.forEach(field -> { + var value = source.get(field); + if (value != null && !value.isNull()) { + target.set(field, value); + } + }); + } + + private void copyAiChatFields(ObjectNode target, JsonNode source) { + if (source == null || source.isNull()) { + return; + } + + var isAiChat = source.get("isAiChat"); + if (isAiChat != null && !isAiChat.isNull()) { + target.set("isAiChat", isAiChat); + } + + var aiChatBaseSetting = source.get("aiChatBaseSetting"); + if (aiChatBaseSetting == null || aiChatBaseSetting.isNull()) { + return; + } + + copyField(target, aiChatBaseSetting, "chunkTimeout"); + copyField(target, aiChatBaseSetting, "showChatMessageTimeout"); + } + + private void copyCustomTools(ObjectNode target, JsonNode source) { + if (source == null || source.isNull()) { + return; + } + + var customTools = source.get("customTools"); + if (customTools == null || !customTools.isArray()) { + return; + } + + ArrayNode normalizedTools = JsonNodeFactory.instance.arrayNode(); + customTools.forEach(tool -> { + ObjectNode normalizedTool = normalizeCustomTool(tool); + if (normalizedTool != null) { + normalizedTools.add(normalizedTool); + } + }); + + if (normalizedTools.size() > 0) { + target.set("customTools", normalizedTools); + } + } + + private ObjectNode normalizeCustomTool(JsonNode tool) { + String name = textValue(tool, "name"); + String action = textValue(tool, "action"); + if (name == null || action == null) { + return null; + } + + ObjectNode actionNode = normalizeCustomToolAction(tool, action); + if (actionNode == null) { + return null; + } + + ObjectNode normalizedTool = JsonNodeFactory.instance.objectNode(); + normalizedTool.put("name", name); + putText(normalizedTool, "icon", textValue(tool, "icon")); + copyField(normalizedTool, tool, "priority"); + normalizedTool.set("action", actionNode); + return normalizedTool; + } + + private ObjectNode normalizeCustomToolAction(JsonNode tool, String actionType) { + ObjectNode actionNode = JsonNodeFactory.instance.objectNode(); + switch (actionType) { + case "send-message" -> { + String messageText = textValue(tool, "messageText"); + if (messageText == null) { + return null; + } + actionNode.put("type", actionType); + actionNode.put("text", messageText); + copyField(actionNode, tool, "messageTimeout", "timeout"); + copyField(actionNode, tool, "messagePriority", "priority"); + return actionNode; + } + case "widget-visibility" -> { + String visibilityMode = textValue(tool, "visibilityMode"); + if (visibilityMode == null) { + visibilityMode = "toggle"; + } + actionNode.put("type", actionType); + actionNode.put("mode", visibilityMode); + return actionNode; + } + case "toggle-chat", "switch-model", "switch-texture", "screenshot" -> { + actionNode.put("type", actionType); + putText(actionNode, "screenshotName", textValue(tool, "screenshotName")); + return actionNode; + } + case "open-url" -> { + String openUrl = textValue(tool, "openUrl"); + if (openUrl == null) { + return null; + } + actionNode.put("type", actionType); + actionNode.put("url", openUrl); + actionNode.put("target", + "_self".equals(textValue(tool, "openUrlTarget")) ? "_self" : "_blank"); + return actionNode; + } + case "emit-event" -> { + String eventName = textValue(tool, "eventName"); + if (eventName == null) { + return null; + } + actionNode.put("type", actionType); + actionNode.put("eventName", eventName); + putText(actionNode, "detail", textValue(tool, "eventDetail")); + return actionNode; + } + case "load-model" -> { + var modelId = tool.get("targetModelId"); + if (modelId == null || modelId.isNull()) { + return null; + } + actionNode.put("type", actionType); + actionNode.set("modelId", modelId); + copyField(actionNode, tool, "targetModelTexturesId", "modelTexturesId"); + putText(actionNode, "message", textValue(tool, "targetModelMessage")); + return actionNode; + } + default -> { + return null; + } + } + } + + private void copyField(ObjectNode target, JsonNode source, String field) { + copyField(target, source, field, field); + } + + private void copyField(ObjectNode target, JsonNode source, String field, String targetField) { + if (source == null || source.isNull()) { + return; + } + + var value = source.get(field); + if (value != null && !value.isNull()) { + target.set(targetField, value); + } + } + + private void putText(ObjectNode target, String field, String value) { + if (value != null && !value.isBlank()) { + target.put(field, value); + } + } + + private String textValue(JsonNode source, String field) { + if (source == null || source.isNull()) { + return null; + } + + var value = source.get(field); + if (value == null || value.isNull()) { + return null; + } + + String text = value.asText(); + return text == null || text.isBlank() ? null : text; + } } diff --git a/src/main/java/run/halo/live2d/ThemeFetcher.java b/src/main/java/run/halo/live2d/ThemeFetcher.java index 8838c4b..32ae780 100644 --- a/src/main/java/run/halo/live2d/ThemeFetcher.java +++ b/src/main/java/run/halo/live2d/ThemeFetcher.java @@ -1,8 +1,12 @@ package run.halo.live2d; import com.fasterxml.jackson.databind.JsonNode; +import java.nio.file.Files; +import java.nio.file.InvalidPathException; +import java.nio.file.Path; import org.springframework.stereotype.Component; import reactor.core.publisher.Mono; +import run.halo.app.core.extension.Theme; import run.halo.app.extension.ConfigMap; import run.halo.app.extension.ReactiveExtensionClient; import run.halo.app.infra.SystemSetting; @@ -14,6 +18,7 @@ */ @Component public class ThemeFetcher { + private static final Path THEME_TIPS_FILE = Path.of("assets", "live2d", "tips.json"); private final ReactiveExtensionClient extensionClient; @@ -30,4 +35,27 @@ public Mono getActiveThemeName() { data.get("theme"), JsonNode.class).get("active").asText() ); } -} \ No newline at end of file + + public Mono getActiveThemeLive2dTipsPath(String pathTemplate) { + return getActiveThemeName() + .flatMap(themeName -> extensionClient.fetch(Theme.class, themeName) + .filter(theme -> { + if (theme.getStatus() == null || theme.getStatus().getLocation() == null) { + return false; + } + + String location = theme.getStatus().getLocation(); + if (location.isBlank()) { + return false; + } + + try { + return Files.isRegularFile(Path.of(location).resolve(THEME_TIPS_FILE)); + } catch (InvalidPathException ignored) { + return false; + } + }) + .map(theme -> String.format(pathTemplate, themeName))) + .defaultIfEmpty(""); + } +} diff --git a/src/main/resources/extensions/settings.yaml b/src/main/resources/extensions/settings.yaml index 566e131..0556126 100644 --- a/src/main/resources/extensions/settings.yaml +++ b/src/main/resources/extensions/settings.yaml @@ -19,26 +19,16 @@ spec: name: modelTexturesId validation: required|Number value: 53 - - $formkit: radio + - $formkit: switch name: isForceUseDefaultConfig label: 强制使用默认模型和材质 help: 开启此项后,忽略前台用户自行切换模型和材质ID,固定使用上面默认模型和材质编号 value: false - options: - - value: true - label: 开启 - - value: false - label: 关闭 - - $formkit: radio + - $formkit: switch name: isTools id: isTools label: 右侧小工具 value: true - options: - - value: true - label: 开启 - - value: false - label: 关闭 - $formkit: checkbox if: "$get(isTools).value === true" label: 选择需要启用的小工具 @@ -75,16 +65,11 @@ spec: name: apiPath validation: required|url value: https://api.zsq.im/live2d/ - - $formkit: radio + - $formkit: switch name: showHitokoto id: showHitokoto label: 空闲时显示一言 value: true - options: - - value: true - label: 开启 - - value: false - label: 关闭 - $formkit: text if: "$get(showHitokoto).value === true" label: 一言接口 @@ -94,59 +79,39 @@ spec: - group: tips label: 事件及提示语绑定 formSchema: - - $formkit: radio + - $formkit: switch name: firstOpenSite id: firstOpenSite label: 首次打开网站事件 value: true - options: - - value: true - label: 开启 - - value: false - label: 关闭 - - $formkit: radio + - $formkit: switch name: backSite id: backSite key: backSite label: 重新返回网页事件 value: true - options: - - value: true - label: 开启 - - value: false - label: 关闭 - $formkit: text if: "$get(backSite).value === true" label: 返回网页提示语 name: backSiteTip value: "哇,你终于回来了~" - - $formkit: radio + - $formkit: switch name: copyContent id: copyContent key: copyContent label: 复制内容事件 value: true - options: - - value: true - label: 开启 - - value: false - label: 关闭 - $formkit: text if: "$get(copyContent).value === true" label: 复制内容提示语 name: copyContentTip value: "你都复制了些什么呀,转载要记得加上出处哦!" - - $formkit: radio + - $formkit: switch name: openConsole id: openConsole key: openConsole label: 打开控制台事件 value: true - options: - - value: true - label: 开启 - - value: false - label: 关闭 - $formkit: text if: "$get(openConsole).value === true" label: 打开控制台提示语 @@ -188,18 +153,13 @@ spec: - group: aichat label: AI 聊天设置 formSchema: - - $formkit: radio + - $formkit: switch label: 启用 AI 聊天功能 help: 启用后,Live2d 将可以进行 AI 智能对话 name: isAiChat id: isAiChat key: isAiChat value: false - options: - - value: true - label: 开启 - - value: false - label: 关闭 - $formkit: group name: aiChatBaseSetting if: "$get(isAiChat).value === true" @@ -211,15 +171,10 @@ spec: chunkTimeout: 10 showChatMessageTimeout: 10 children: - - $formkit: radio + - $formkit: switch label: 是否开启公共聊天 help: 关闭后,用户需要登录后才能与 Live2d 进行对话 name: isAnonymous - options: - - value: true - label: 开启 - - value: false - label: 关闭 - $formkit: textarea label: 角色设定 name: systemMessage @@ -247,16 +202,11 @@ spec: value: isProxy: false children: - - $formkit: radio + - $formkit: switch label: 启用代理 name: isProxy id: isProxy key: isProxy - options: - - value: true - label: 开启 - - value: false - label: 关闭 - $formkit: text if: "$value.isProxy === true" label: 代理地址 @@ -275,17 +225,12 @@ spec: openAiBaseUrl: https://api.openai.com openAiModel: gpt-3.5-turbo children: - - $formkit: radio + - $formkit: switch label: 启用 OpenAI help: 基于 OpenAI 进行智能对话 name: isOpenAi id: isOpenAi key: isOpenAi - options: - - value: true - label: 开启 - - value: false - label: 关闭 - $formkit: text if: "$value.isOpenAi === true" label: TOKEN @@ -311,16 +256,11 @@ spec: - group: advanced label: 高级设置 formSchema: - - $formkit: radio + - $formkit: switch name: consoleShowStatu key: consoleShowStatu label: 控制台显示加载状态 value: false - options: - - value: true - label: 开启 - - value: false - label: 关闭 - $formkit: text help: 通过右侧小工具截图时保存的文件名 label: 截图文件名(不包括后缀) @@ -346,3 +286,185 @@ spec: label: DOM 加载完成后,图片加载前 - value: async label: 页面全部内容加载完成 + - $formkit: switch + name: useFrontendDevServer + id: useFrontendDevServer + label: 前端调试模式 + help: 开启后,Halo 页面将优先从本地 Vite 开发服务器加载现代化前端代码。 + value: false + - $formkit: text + if: "$get(useFrontendDevServer).value === true" + label: 前端调试服务器地址 + help: 默认使用 http://localhost:5173,并自动加载 /@vite/client 与 /src/halo.ts + name: frontendDevServerUrl + validation: required|url + value: http://localhost:5173 + - group: customTools + label: 自定义工具 + formSchema: + - $formkit: array + name: customTools + id: customTools + key: customTools + label: 自定义工具列表 + help: 通过声明式动作扩展 Live2d 工具栏 + value: [] + addLabel: 添加自定义工具 + emptyText: 暂无自定义工具 + itemLabels: + - type: iconify + label: $value.icon + - type: text + label: $value.name + - type: text + label: $value.action + children: + - $formkit: text + name: name + id: name + key: name + label: 工具名称 + validation: required + - $formkit: iconify + name: icon + id: icon + key: icon + label: 图标 + format: name + value-only: true + value: "" + help: Iconify 图标名称,例如 ph:rocket-launch-fill + - $formkit: text + name: priority + id: priority + key: priority + label: 排序权重 + help: 数字越大越靠前 + validation: Number + value: 0 + - $formkit: select + name: action + id: action + key: action + label: 动作 + validation: required + value: send-message + options: + - value: send-message + label: 发送提示语 + - value: widget-visibility + label: 显示/隐藏看板娘 + - value: toggle-chat + label: 切换聊天窗口 + - value: switch-model + label: 切换模型 + - value: switch-texture + label: 切换材质 + - value: screenshot + label: 截图 + - value: open-url + label: 打开链接 + - value: emit-event + label: 触发自定义事件 + - value: load-model + label: 加载指定模型 + - $formkit: textarea + if: "$value.action === 'send-message'" + name: messageText + id: messageText + key: messageText + label: 提示语内容 + validation: required + rows: 3 + - $formkit: text + if: "$value.action === 'send-message'" + name: messageTimeout + id: messageTimeout + key: messageTimeout + label: 提示语停留时间(毫秒) + validation: Number + value: 3000 + - $formkit: text + if: "$value.action === 'send-message'" + name: messagePriority + id: messagePriority + key: messagePriority + label: 提示语优先级 + validation: Number + value: 0 + - $formkit: select + if: "$value.action === 'widget-visibility'" + name: visibilityMode + id: visibilityMode + key: visibilityMode + label: 看板娘显示动作 + value: toggle + options: + - value: show + label: 显示 + - value: hide + label: 隐藏 + - value: toggle + label: 切换 + - $formkit: text + if: "$value.action === 'screenshot'" + name: screenshotName + id: screenshotName + key: screenshotName + label: 截图文件名(不包括后缀) + - $formkit: text + if: "$value.action === 'open-url'" + name: openUrl + id: openUrl + key: openUrl + label: 链接地址 + validation: required|url + - $formkit: select + if: "$value.action === 'open-url'" + name: openUrlTarget + id: openUrlTarget + key: openUrlTarget + label: 打开方式 + value: _blank + options: + - value: _blank + label: 新窗口 + - value: _self + label: 当前窗口 + - $formkit: text + if: "$value.action === 'emit-event'" + name: eventName + id: eventName + key: eventName + label: 事件名称 + help: 推荐使用带命名空间的名称,例如 plugin-live2d:custom-action + validation: required + - $formkit: textarea + if: "$value.action === 'emit-event'" + name: eventDetail + id: eventDetail + key: eventDetail + label: 事件详情 + help: 可填写文本或 JSON 字符串 + rows: 3 + - $formkit: text + if: "$value.action === 'load-model'" + name: targetModelId + id: targetModelId + key: targetModelId + label: 模型编号 + validation: required|Number + - $formkit: text + if: "$value.action === 'load-model'" + name: targetModelTexturesId + id: targetModelTexturesId + key: targetModelTexturesId + label: 材质编号 + validation: Number + value: 0 + - $formkit: text + if: "$value.action === 'load-model'" + name: targetModelMessage + id: targetModelMessage + key: targetModelMessage + label: 切换提示语 diff --git a/src/main/resources/plugin.yaml b/src/main/resources/plugin.yaml index 0a2a9f0..de5314f 100644 --- a/src/main/resources/plugin.yaml +++ b/src/main/resources/plugin.yaml @@ -6,7 +6,7 @@ metadata: "store.halo.run/app-id": "app-oPNFQ" spec: enabled: true - requires: ">=2.10.0" + requires: ">=2.24.2" author: name: LIlGG website: https://lixingyong.com diff --git a/src/main/resources/static/css/live2d.css b/src/main/resources/static/css/live2d.css deleted file mode 100644 index a3444b2..0000000 --- a/src/main/resources/static/css/live2d.css +++ /dev/null @@ -1,393 +0,0 @@ -#live2d-toggle { - background-color: #fa0; - border-radius: 5px; - bottom: 66px; - color: #fff; - cursor: pointer; - font-size: 12px; - left: 0; - margin-left: -100px; - padding: 5px 2px 5px 5px; - position: fixed; - transition: margin-left 1s; - width: 60px; - writing-mode: vertical-rl; -} - -#live2d-toggle.live2d-toggle-active { - margin-left: -50px; -} - -#live2d-toggle.live2d-toggle-active:hover { - margin-left: -30px; -} - -#live2d-plugin { - bottom: -1000px; - left: 0; - line-height: 0; - margin-bottom: -10px; - position: fixed; - transform: translateY(3px); - transition: transform .3s ease-in-out, bottom 3s ease-in-out; - z-index: 999999; -} - -@media screen and (max-width: 768px) { - #live2d-plugin { - z-index: 1; - display: none; - } -} - -#live2d-plugin:hover { - transform: translateY(0); -} - -#live2d-tips { - animation: shake 50s ease-in-out 5s infinite; - background-color: rgba(236, 217, 188, .5); - border: 1px solid rgba(224, 186, 140, .62); - border-radius: 12px; - box-shadow: 0 3px 15px 2px rgba(191, 158, 118, .2); - font-size: 14px; - line-height: 24px; - margin: -30px 20px; - min-height: 70px; - opacity: 0; - overflow: hidden; - padding: 5px 10px; - position: absolute; - text-overflow: ellipsis; - transition: opacity 1s; - width: 250px; - word-break: break-all; -} - -#live2d-tips.live2d-tips-active { - opacity: 1; - transition: opacity .2s; -} - -#live2d-tips span { - color: #0099cc; -} - -#live2d { - cursor: grab; - height: 300px; - position: relative; - width: 300px; -} - -#live2d:active { - cursor: grabbing; -} - -#live2d-tool { - color: #aaa; - opacity: 0; - position: absolute; - right: -10px; - bottom: 15px; - transition: opacity 1s; -} - -#live2d-plugin:hover #live2d-tool { - opacity: 1; -} - -#live2d-tool span { - display: block; - height: 30px; - text-align: center; -} - -#live2d-tool svg { - color: #7b8c9d; - cursor: pointer; - height: 25px; - transition: fill .3s; -} - -#live2d-tool svg:hover { - color: #0684bd; /* #34495e */ -} - -#live2d-chat-model { - position: fixed; - right: 0; - bottom: 30px; - overflow: hidden; - z-index: 999999; - opacity: 0; - transition: opacity 1s; - width: 100%; -} - -@media screen and (max-width: 768px) { - #live2d-chat-model { - z-index: 1; - display: none; - } -} - -#live2d-chat-model.live2d-chat-model-active { - opacity: 1; -} - - -#live2d-chat-model .live2d-chat-model-body { - display: flex; - height: 4vh; - max-width: 30vw; - background-color: #eff4f9; - align-items: center; - border-radius: 3px; - margin: 0 auto; -} - -#live2d-chat-model .live2d-chat-model-body .live2d-chat-content { - height: 100%; - width: 100%; - padding: 5px 10px; -} - -#live2d-chat-model .live2d-chat-model-body .live2d-chat-content input { - outline: none; - border: none; - border: 0; - height: 100%; - width: 100%; - background: white; - padding: 5px; - border-radius: 3px; - font-size: 14px; -} - -#live2d-chat-model .live2d-chat-model-body .live2d-chat-content input:focus { - outline:none; - border:0; -} - -#live2d-chat-model .live2d-chat-model-body #live2d-chat-send { - display: flex; - align-items: center; - justify-content: center; - height: 64%; - width: 45px; - background-color: #cecece; - margin-right: 10px; - border-radius: 3px; - cursor: pointer; -} - -#live2d-chat-model .live2d-chat-model-body #live2d-chat-send.active { - background-color: #30cf79; -} - -#live2d-chat-model .live2d-chat-model-body #live2d-chat-send.active:hover { - background-color: #55bb8e; -} - -@keyframes shake { - 2% { - transform: translate(.5px, -1.5px) rotate(-.5deg); - } - - 4% { - transform: translate(.5px, 1.5px) rotate(1.5deg); - } - - 6% { - transform: translate(1.5px, 1.5px) rotate(1.5deg); - } - - 8% { - transform: translate(2.5px, 1.5px) rotate(.5deg); - } - - 10% { - transform: translate(.5px, 2.5px) rotate(.5deg); - } - - 12% { - transform: translate(1.5px, 1.5px) rotate(.5deg); - } - - 14% { - transform: translate(.5px, .5px) rotate(.5deg); - } - - 16% { - transform: translate(-1.5px, -.5px) rotate(1.5deg); - } - - 18% { - transform: translate(.5px, .5px) rotate(1.5deg); - } - - 20% { - transform: translate(2.5px, 2.5px) rotate(1.5deg); - } - - 22% { - transform: translate(.5px, -1.5px) rotate(1.5deg); - } - - 24% { - transform: translate(-1.5px, 1.5px) rotate(-.5deg); - } - - 26% { - transform: translate(1.5px, .5px) rotate(1.5deg); - } - - 28% { - transform: translate(-.5px, -.5px) rotate(-.5deg); - } - - 30% { - transform: translate(1.5px, -.5px) rotate(-.5deg); - } - - 32% { - transform: translate(2.5px, -1.5px) rotate(1.5deg); - } - - 34% { - transform: translate(2.5px, 2.5px) rotate(-.5deg); - } - - 36% { - transform: translate(.5px, -1.5px) rotate(.5deg); - } - - 38% { - transform: translate(2.5px, -.5px) rotate(-.5deg); - } - - 40% { - transform: translate(-.5px, 2.5px) rotate(.5deg); - } - - 42% { - transform: translate(-1.5px, 2.5px) rotate(.5deg); - } - - 44% { - transform: translate(-1.5px, 1.5px) rotate(.5deg); - } - - 46% { - transform: translate(1.5px, -.5px) rotate(-.5deg); - } - - 48% { - transform: translate(2.5px, -.5px) rotate(.5deg); - } - - 50% { - transform: translate(-1.5px, 1.5px) rotate(.5deg); - } - - 52% { - transform: translate(-.5px, 1.5px) rotate(.5deg); - } - - 54% { - transform: translate(-1.5px, 1.5px) rotate(.5deg); - } - - 56% { - transform: translate(.5px, 2.5px) rotate(1.5deg); - } - - 58% { - transform: translate(2.5px, 2.5px) rotate(.5deg); - } - - 60% { - transform: translate(2.5px, -1.5px) rotate(1.5deg); - } - - 62% { - transform: translate(-1.5px, .5px) rotate(1.5deg); - } - - 64% { - transform: translate(-1.5px, 1.5px) rotate(1.5deg); - } - - 66% { - transform: translate(.5px, 2.5px) rotate(1.5deg); - } - - 68% { - transform: translate(2.5px, -1.5px) rotate(1.5deg); - } - - 70% { - transform: translate(2.5px, 2.5px) rotate(.5deg); - } - - 72% { - transform: translate(-.5px, -1.5px) rotate(1.5deg); - } - - 74% { - transform: translate(-1.5px, 2.5px) rotate(1.5deg); - } - - 76% { - transform: translate(-1.5px, 2.5px) rotate(1.5deg); - } - - 78% { - transform: translate(-1.5px, 2.5px) rotate(.5deg); - } - - 80% { - transform: translate(-1.5px, .5px) rotate(-.5deg); - } - - 82% { - transform: translate(-1.5px, .5px) rotate(-.5deg); - } - - 84% { - transform: translate(-.5px, .5px) rotate(1.5deg); - } - - 86% { - transform: translate(2.5px, 1.5px) rotate(.5deg); - } - - 88% { - transform: translate(-1.5px, .5px) rotate(1.5deg); - } - - 90% { - transform: translate(-1.5px, -.5px) rotate(-.5deg); - } - - 92% { - transform: translate(-1.5px, -1.5px) rotate(1.5deg); - } - - 94% { - transform: translate(.5px, .5px) rotate(-.5deg); - } - - 96% { - transform: translate(2.5px, -.5px) rotate(-.5deg); - } - - 98% { - transform: translate(-1.5px, -1.5px) rotate(-.5deg); - } - - 0%, 100% { - transform: translate(0, 0) rotate(0); - } -} diff --git a/src/main/resources/static/css/live2d.min.css b/src/main/resources/static/css/live2d.min.css deleted file mode 100644 index 342c829..0000000 --- a/src/main/resources/static/css/live2d.min.css +++ /dev/null @@ -1 +0,0 @@ -#live2d-toggle{background-color:#fa0;border-radius:5px;bottom:66px;color:#fff;cursor:pointer;font-size:12px;left:0;margin-left:-100px;padding:5px 2px 5px 5px;position:fixed;transition:margin-left 1s;width:60px;writing-mode:vertical-rl;}#live2d-toggle.live2d-toggle-active{margin-left:-50px;}#live2d-toggle.live2d-toggle-active:hover{margin-left:-30px;}#live2d-plugin{bottom:-1000px;left:0;line-height:0;margin-bottom:-10px;position:fixed;transform:translateY(3px);transition:transform .3s ease-in-out,bottom 3s ease-in-out;z-index:999999;}@media screen and (max-width:768px){#live2d-plugin{z-index:1;display:none;}}#live2d-plugin:hover{transform:translateY(0);}#live2d-tips{animation:shake 50s ease-in-out 5s infinite;background-color:rgba(236,217,188,.5);border:1px solid rgba(224,186,140,.62);border-radius:12px;box-shadow:0 3px 15px 2px rgba(191,158,118,.2);font-size:14px;line-height:24px;margin:-30px 20px;min-height:70px;opacity:0;overflow:hidden;padding:5px 10px;position:absolute;text-overflow:ellipsis;transition:opacity 1s;width:250px;word-break:break-all;}#live2d-tips.live2d-tips-active{opacity:1;transition:opacity .2s;}#live2d-tips span{color:#0099cc;}#live2d{cursor:grab;height:300px;position:relative;width:300px;}#live2d:active{cursor:grabbing;}#live2d-tool{color:#aaa;opacity:0;position:absolute;right:-10px;bottom:15px;transition:opacity 1s;}#live2d-plugin:hover #live2d-tool{opacity:1;}#live2d-tool span{display:block;height:30px;text-align:center;}#live2d-tool svg{color:#7b8c9d;cursor:pointer;height:25px;transition:fill .3s;}#live2d-tool svg:hover{color:#0684bd;}#live2d-chat-model{position:fixed;right:0;bottom:30px;overflow:hidden;z-index:999999;opacity:0;transition:opacity 1s;width:100%;}@media screen and (max-width:768px){#live2d-chat-model{z-index:1;display:none;}}#live2d-chat-model.live2d-chat-model-active{opacity:1;}#live2d-chat-model .live2d-chat-model-body{display:flex;height:4vh;max-width:30vw;background-color:#eff4f9;align-items:center;border-radius:3px;margin:0 auto;}#live2d-chat-model .live2d-chat-model-body .live2d-chat-content{height:100%;width:100%;padding:5px 10px;}#live2d-chat-model .live2d-chat-model-body .live2d-chat-content input{outline:none;border:none;border:0;height:100%;width:100%;background:white;padding:5px;border-radius:3px;font-size:14px;}#live2d-chat-model .live2d-chat-model-body .live2d-chat-content input:focus{outline:none;border:0;}#live2d-chat-model .live2d-chat-model-body #live2d-chat-send{display:flex;align-items:center;justify-content:center;height:64%;width:45px;background-color:#cecece;margin-right:10px;border-radius:3px;cursor:pointer;}#live2d-chat-model .live2d-chat-model-body #live2d-chat-send.active{background-color:#30cf79;}#live2d-chat-model .live2d-chat-model-body #live2d-chat-send.active:hover{background-color:#55bb8e;}@keyframes shake{2%{transform:translate(.5px,-1.5px) rotate(-.5deg);}4%{transform:translate(.5px,1.5px) rotate(1.5deg);}6%{transform:translate(1.5px,1.5px) rotate(1.5deg);}8%{transform:translate(2.5px,1.5px) rotate(.5deg);}10%{transform:translate(.5px,2.5px) rotate(.5deg);}12%{transform:translate(1.5px,1.5px) rotate(.5deg);}14%{transform:translate(.5px,.5px) rotate(.5deg);}16%{transform:translate(-1.5px,-.5px) rotate(1.5deg);}18%{transform:translate(.5px,.5px) rotate(1.5deg);}20%{transform:translate(2.5px,2.5px) rotate(1.5deg);}22%{transform:translate(.5px,-1.5px) rotate(1.5deg);}24%{transform:translate(-1.5px,1.5px) rotate(-.5deg);}26%{transform:translate(1.5px,.5px) rotate(1.5deg);}28%{transform:translate(-.5px,-.5px) rotate(-.5deg);}30%{transform:translate(1.5px,-.5px) rotate(-.5deg);}32%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}34%{transform:translate(2.5px,2.5px) rotate(-.5deg);}36%{transform:translate(.5px,-1.5px) rotate(.5deg);}38%{transform:translate(2.5px,-.5px) rotate(-.5deg);}40%{transform:translate(-.5px,2.5px) rotate(.5deg);}42%{transform:translate(-1.5px,2.5px) rotate(.5deg);}44%{transform:translate(-1.5px,1.5px) rotate(.5deg);}46%{transform:translate(1.5px,-.5px) rotate(-.5deg);}48%{transform:translate(2.5px,-.5px) rotate(.5deg);}50%{transform:translate(-1.5px,1.5px) rotate(.5deg);}52%{transform:translate(-.5px,1.5px) rotate(.5deg);}54%{transform:translate(-1.5px,1.5px) rotate(.5deg);}56%{transform:translate(.5px,2.5px) rotate(1.5deg);}58%{transform:translate(2.5px,2.5px) rotate(.5deg);}60%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}62%{transform:translate(-1.5px,.5px) rotate(1.5deg);}64%{transform:translate(-1.5px,1.5px) rotate(1.5deg);}66%{transform:translate(.5px,2.5px) rotate(1.5deg);}68%{transform:translate(2.5px,-1.5px) rotate(1.5deg);}70%{transform:translate(2.5px,2.5px) rotate(.5deg);}72%{transform:translate(-.5px,-1.5px) rotate(1.5deg);}74%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}76%{transform:translate(-1.5px,2.5px) rotate(1.5deg);}78%{transform:translate(-1.5px,2.5px) rotate(.5deg);}80%{transform:translate(-1.5px,.5px) rotate(-.5deg);}82%{transform:translate(-1.5px,.5px) rotate(-.5deg);}84%{transform:translate(-.5px,.5px) rotate(1.5deg);}86%{transform:translate(2.5px,1.5px) rotate(.5deg);}88%{transform:translate(-1.5px,.5px) rotate(1.5deg);}90%{transform:translate(-1.5px,-.5px) rotate(-.5deg);}92%{transform:translate(-1.5px,-1.5px) rotate(1.5deg);}94%{transform:translate(.5px,.5px) rotate(-.5deg);}96%{transform:translate(2.5px,-.5px) rotate(-.5deg);}98%{transform:translate(-1.5px,-1.5px) rotate(-.5deg);}0%,100%{transform:translate(0,0) rotate(0);}} \ No newline at end of file diff --git a/src/main/resources/static/js/live2d-autoload.js b/src/main/resources/static/js/live2d-autoload.js deleted file mode 100644 index bc62ce8..0000000 --- a/src/main/resources/static/js/live2d-autoload.js +++ /dev/null @@ -1,992 +0,0 @@ -let live2d = new Live2d(); -// TODO 多语言化 -function Live2d() { - /** - * 包含通用工具方法 - */ - const util = {}; - /** - * 包含 Live2d 消息发送方法 - */ - const message = {}; - - /** - * 包含 Live2d 右侧小工具 - */ - const tools = {}; - - /** - * openai - */ - const openai = {}; - - class Live2d { - #path; - #config; - defaultConfig = { - apiPath: "//api.zsq.im/live2d/", - tools: ["hitokoto", "asteroids", "switch-model", "switch-texture", "photo", "info", "quit"], - updateTime: "2022.12.09", - version: "1.0.1", - tipsPath: "live2d-tips.json", - }; - /** - * Live2d 公开加载入口。 - * - * @param path 资源路径 - * @param config 配置文件 - */ - init(path, config = {}) { - // 当前页面宽度大于等于 768 才进行加载 - if (screen.width >= 768) { - Promise.all([ - util.loadExternalResource(path + "css/live2d.css", "css"), - util.loadExternalResource(path + "lib/live2d/live2d.min.js", "js"), - ]).then(() => { - this.#path = path; - this.defaultConfig.tipsPath = path + "live2d-tips.json"; - this.#config = { ...this.defaultConfig, ...config }; - this.#doInit(); - }); - } - } - - get path() { - return this.#path; - } - - /** - * 私有方法,实际加载 Live2d - */ - #doInit() { - document.body.insertAdjacentHTML("beforeend", `
看板娘
`); - const toggle = document.getElementById("live2d-toggle"); - toggle.addEventListener("click", () => { - toggle.classList.remove("live2d-toggle-active"); - if (toggle.getAttribute("first-time")) { - this.#loadWidget(); - toggle.removeAttribute("first-time"); - } else { - localStorage.removeItem("live2d-display"); - document.getElementById("live2d-plugin").style.display = ""; - setTimeout(() => { - document.getElementById("live2d-plugin").style.bottom = 0; - }, 0); - } - }); - if (localStorage.getItem("live2d-display") && Date.now() - localStorage.getItem("live2d-display") <= 86400000) { - toggle.setAttribute("first-time", true); - setTimeout(() => { - toggle.classList.add("live2d-toggle-active"); - }, 0); - } else { - this.#loadWidget(); - } - } - - #loadWidget() { - localStorage.removeItem("live2d-display"); - sessionStorage.removeItem("live2d-text"); - document.body.insertAdjacentHTML( - "beforeend", - `
-
- -
-
` - ); - let live2dDom = document.getElementById("live2d-plugin"); - setTimeout(() => { - live2dDom.style.bottom = 0; - }, 0); - if (this.#config["live2dLocation"] === "right") { - live2dDom.style.right = "50px"; - live2dDom.style.left = "auto"; - } - const model = new Model(this.#config); - // 加载右侧小工具 - if (this.#config["isTools"] === true) { - if (typeof Iconify !== "undefined") { - tools._registerTools(model, this.#config); - } else { - util.loadExternalResource(this.#path + "lib/iconify/3.0.1/iconify.min.js", "js").then(() => { - tools._registerTools(model, this.#config); - }); - } - } - // 初始化模组 - this.#initModel(model); - } - - /** - * 向 Live2d 注册事件 - * - * @param result 从 tips 文件中读取的空闲消息数据 - */ - #registerEventListener(result) { - // 检测用户活动状态,并在空闲时显示消息 - let userAction = false, - userActionTimer, - messageArray = result.message.default; - window.addEventListener("mousemove", () => (userAction = true)); - window.addEventListener("keydown", () => (userAction = true)); - setInterval(() => { - if (userAction) { - userAction = false; - clearInterval(userActionTimer); - userActionTimer = null; - } else if (!userActionTimer) { - userActionTimer = setInterval(() => { - message.showMessage(messageArray, 6000, 2); - }, 20000); - } - }, 1000); - // 首次进入网站触发事件 - if (this.#config["firstOpenSite"] === true) { - message.showMessage(message.welcomeMessage(result.time), 7000, 4); - } - window.addEventListener("mouseover", (event) => { - for (let { selector, text } of result.mouseover) { - if (!event.target.matches(selector)) continue; - text = util.randomSelection(text); - text = text.replace("{text}", event.target.innerText); - message.showMessage(text, 4000, 1); - return; - } - }); - window.addEventListener("click", (event) => { - for (let { selector, text } of result.click) { - if (!event.target.matches(selector)) continue; - text = util.randomSelection(text); - text = text.replace("{text}", event.target.innerText); - message.showMessage(text, 4000, 1); - return; - } - }); - result["seasons"].forEach(({ date, text }) => { - const now = new Date(), - after = date.split("-")[0], - before = date.split("-")[1] || after; - if ( - after.split("/")[0] <= now.getMonth() + 1 && - now.getMonth() + 1 <= before.split("/")[0] && - after.split("/")[1] <= now.getDate() && - now.getDate() <= before.split("/")[1] - ) { - text = util.randomSelection(text); - text = text.replace("{year}", now.getFullYear()); - messageArray.push(text); - } - }); - - // 打开控制台事件 - if (this.#config["openConsole"] === true) { - let devtools = () => {}; - devtools.toString = () => { - message.showMessage(this.#config["openConsoleTip"] || result["message"]["console"], 6000, 2); - }; - } - // 复制内容触发事件 - if (this.#config["copyContent"] === true) { - window.addEventListener("copy", () => { - message.showMessage(this.#config["copyContentTip"] || result["message"]["copy"], 6000, 2); - }); - } - // 离开当前页面事件 - if (this.#config["backSite"] === true) { - window.addEventListener("visibilitychange", () => { - if (!document.hidden) { - message.showMessage(this.#config["backSiteTip"] || result["message"]["visibilitychange"], 6000, 2); - } - }); - } - } - - #initModel(model) { - let modelId = localStorage.getItem("modelId"); - let modelTexturesId = localStorage.getItem("modelTexturesId"); - if (modelId === null || !!this.#config["isForceUseDefaultConfig"]) { - // 加载指定模型的指定材质 - modelId = this.#config["modelId"] || 1; // 模型 ID - modelTexturesId = this.#config["modelTexturesId"] || 53; // 材质 ID - } - - if (this.#config["consoleShowStatu"]) { - eval( - (function (p, a, c, k, e, r) { - e = function (c) { - return ( - (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) - ); - }; - if (!"".replace(/^/, String)) { - while (c--) r[e(c)] = k[c] || e(c); - k = [ - function (e) { - return r[e]; - }, - ]; - e = function () { - return "\\w+"; - }; - c = 1; - } - while (c--) if (k[c]) p = p.replace(new RegExp("\\b" + e(c) + "\\b", "g"), k[c]); - return p; - })( - "8.d(\" \");8.d(\"\\U,.\\y\\5.\\1\\1\\1\\1/\\1,\\u\\2 \\H\\n\\1\\1\\1\\1\\1\\b ', !-\\r\\j-i\\1/\\1/\\g\\n\\1\\1\\1 \\1 \\a\\4\\f'\\1\\1\\1 L/\\a\\4\\5\\2\\n\\1\\1 \\1 /\\1 \\a,\\1 /|\\1 ,\\1 ,\\1\\1\\1 ',\\n\\1\\1\\1\\q \\1/ /-\\j/\\1\\h\\E \\9 \\5!\\1 i\\n\\1\\1\\1 \\3 \\6 7\\q\\4\\c\\1 \\3'\\s-\\c\\2!\\t|\\1 |\\n\\1\\1\\1\\1 !,/7 '0'\\1\\1 \\X\\w| \\1 |\\1\\1\\1\\n\\1\\1\\1\\1 |.\\x\\\"\\1\\l\\1\\1 ,,,, / |./ \\1 |\\n\\1\\1\\1\\1 \\3'| i\\z.\\2,,A\\l,.\\B / \\1.i \\1|\\n\\1\\1\\1\\1\\1 \\3'| | / C\\D/\\3'\\5,\\1\\9.\\1|\\n\\1\\1\\1\\1\\1\\1 | |/i \\m|/\\1 i\\1,.\\6 |\\F\\1|\\n\\1\\1\\1\\1\\1\\1.|/ /\\1\\h\\G \\1 \\6!\\1\\1\\b\\1|\\n\\1\\1\\1 \\1 \\1 k\\5>\\2\\9 \\1 o,.\\6\\2 \\1 /\\2!\\n\\1\\1\\1\\1\\1\\1 !'\\m//\\4\\I\\g', \\b \\4'7'\\J'\\n\\1\\1\\1\\1\\1\\1 \\3'\\K|M,p,\\O\\3|\\P\\n\\1\\1\\1\\1\\1 \\1\\1\\1\\c-,/\\1|p./\\n\\1\\1\\1\\1\\1 \\1\\1\\1'\\f'\\1\\1!o,.:\\Q \\R\\S\\T v\"+e.V+\" / W \"+e.N);8.d(\" \");", - 60, - 60, - "|u3000|uff64|uff9a|uff40|u30fd|uff8d||console|uff8a|uff0f|uff3c|uff84|log|this.#config|uff70|u00b4|uff49||u2010||u3000_|u3008||_|___|uff72|u2500|uff67|u30cf|u30fc||u30bd|u4ece|u30d8|uff1e|__|u30a4|k_|uff17_|u3000L_|u3000i|uff1a|u3009|uff34|uff70r|u30fdL__||___i|updateTime|u30f3|u30ce|nLive2D|u770b|u677f|u5a18|u304f__|version|LIlGG|u00b40i".split( - "|" - ), - 0, - {} - ) - ); - } - model.loadModel(modelId, modelTexturesId); - // 加载各个来源的 tips 文件并进行合并 - this.#loadTips().then((result) => this.#registerEventListener(result)); - } - - /** - * 从各个位置,获取 Live2d 提示文件,若配置的 tips 文件读取失败,则会回退到默认 tips 文件 - * - * @returns {Promise} - */ - #loadTips() { - let config = this.#config; - return new Promise((resolve) => { - Promise.all([util.loadTipsResource(config["themeTipsPath"]), util.loadTipsResource(config["tipsPath"])]).then( - (result) => { - // 后台配置 tips,其中包含 mouseover 及 click 两种配置,以及单独配置的 message - let configTips = util.backendConfigConvert(config); - // 主题设置 tips,其中包含 mouseover 及 click 两种配置(会过滤掉其他配置) - let themeTips = { - click: result[0]["click"] || [], - mouseover: result[0]["mouseover"] || [], - }; - // 配置的 tips 文件,包含所有属性 (click, mouseover, seasons, time, message) - let defaultTips = result[1]; - // 若配置的 tips 文件不存在,则回退到默认 tips - if (Object.keys(defaultTips).length === 0) { - util.loadTipsResource(this.defaultConfig.tipsPath).then((tips) => { - resolve(util.mergeTips(configTips, themeTips, tips)); - }); - } else { - resolve(util.mergeTips(configTips, themeTips, defaultTips)); - } - } - ); - }); - } - } - - class Model { - #apiPath; - #config; - - constructor(config) { - let apiPath = config["apiPath"]; - if (apiPath !== undefined && typeof apiPath === "string" && apiPath.length > 0) { - if (!apiPath.endsWith("/")) apiPath += "/"; - } else { - throw "Invalid initWidget argument!"; - } - this.#apiPath = apiPath; - this.#config = config; - } - - async loadModel(modelId, modelTexturesId, text) { - localStorage.setItem("modelId", modelId); - localStorage.setItem("modelTexturesId", modelTexturesId); - message.showMessage(text, 4000, 3); - loadlive2d( - "live2d", - `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, - this.#config["consoleShowStatu"] === true - ? console.log(`[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`) - : null - ); - } - - async loadRandModel() { - const modelId = Number(localStorage.getItem("modelId")), - modelTexturesId = Number(localStorage.getItem("modelTexturesId")); - // 可选 "rand"(随机), "switch"(顺序) - fetch(`${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`) - .then((response) => response.json()) - .then((result) => { - if (result["textures"]["id"] === 1 && (modelTexturesId === 1 || modelTexturesId === 0)) { - message.showMessage("我还没有其他衣服呢!", 4000, 3); - } else { - this.loadModel(modelId, result["textures"]["id"], "我的新衣服好看嘛?"); - } - }); - } - - async loadOtherModel() { - let modelId = Number(localStorage.getItem("modelId")); - fetch(`${this.#apiPath}switch/?id=${modelId}`) - .then((response) => response.json()) - .then((result) => { - this.loadModel(result.model.id, 0, result.model.message); - }); - } - } - - /** - * 异步加载对应的资源 - * - * @param url 需要加载的资源链接 - * @param type 需要加载的资源类型,如 css/js - * - * @returns {Promise} Promise - */ - util.loadExternalResource = function (url, type) { - return new Promise((resolve, reject) => { - let tag; - if (type === "css") { - tag = document.createElement("link"); - tag.rel = "stylesheet"; - tag.href = url; - } else if (type === "js") { - tag = document.createElement("script"); - tag.src = url; - } - if (tag) { - tag.onload = () => resolve(url); - tag.onerror = () => reject(url); - document.head.appendChild(tag); - } - }); - }; - - /** - * 从数组中获取任意一个数据。当给定数据不是数组时,将返回原数据。 - * - * @param obj 需要获取随机数的数组 - * @returns {Object} 数组内的任意一个数据或原数据 - */ - util.randomSelection = function (obj) { - return Array.isArray(obj) ? obj[Math.floor(Math.random() * obj.length)] : obj; - }; - - /** - * 读取 tips 资源 - * - * @param url 资源链接 - * @returns {Promise} - */ - util.loadTipsResource = function (url) { - let defaultObj = {}; - return new Promise((resolve) => { - if (!url) { - resolve(defaultObj); - } - fetch(url) - .then((response) => response.json()) - .then((result) => { - resolve(result); - }) - .catch(() => { - resolve(defaultObj); - }); - }); - }; - - /** - * 将后台主题中的配置转为适合 TIPS 的格式 - * - * @param config 配置文件 - */ - util.backendConfigConvert = function (config = {}) { - let tips = { - click: [], - mouseover: [], - message: {}, - }; - // selector - if (!!config["selectorTips"]) { - config["selectorTips"].forEach((item) => { - let texts = item["messageTexts"].map((text) => text.message); - let obj = { - selector: item["selector"], - text: texts, - }; - if (item["mouseAction"] === "click") { - tips.click.push(obj); - } else { - tips.mouseover.push(obj); - } - }); - } - // message - tips.message.visibilitychange = config["backSiteTip"]; - tips.message.copy = config["copyContentTip"]; - tips.message.console = config["openConsoleTip"]; - return tips; - }; - - /** - * 合并各个渠道的 tips,根据获取位置不同,合并时优先级也不同。优先级按高到低的顺序为 - * - *
    - *
      后台插件配置文件中获得的 tips。(该配置文件只支持 mouseover 与 click 两种类型的 tips 属性,另外包括单独配置的 message)
    - *
      主题文件中设置的 tips (该配置文件只支持 mouseover 与 click 两种类型的 tips 属性)
    - *
      配置/默认的 tips 文件(该配置文件支持所有的 tips 属性,但其属性会被优先级高的覆盖)
    - *
- * - * 请注意,此项返回值为修改后的 defaultTips,任何修改 defaultTips 的情况都将导致返回值同步修改。 - * - * @param configTips 后台配置文件中设置的 tips - * @param themeTips 主题提供的 tips - * @param defaultTips 配置/默认的 tips - */ - util.mergeTips = function (configTips, themeTips, defaultTips) { - let duplicateClick = [...configTips["click"], ...themeTips["click"], ...defaultTips["click"]]; - let duplicateMouseover = [...configTips["mouseover"], ...themeTips["mouseover"], ...defaultTips["mouseover"]]; - defaultTips.click = util.distinctArray(duplicateClick, "selector"); - defaultTips.mouseover = util.distinctArray(duplicateMouseover, "selector"); - defaultTips.message = { ...defaultTips.message, ...configTips.message }; - return defaultTips; - }; - - /** - * 去重对象数组 - * @param dupArray 需要去重的数组 - * @param key 对象数组 key - */ - util.distinctArray = function (dupArray, key) { - let obj = {}; - return dupArray.reduce((curr, next) => { - if (!obj[next[key]]) { - obj[next[key]] = true; - curr.push(next); - } - return curr; - }, []); - }; - - message.messageTimer = null; - - /** - * 显示消息至消息栏 - * - * @param text 需要显示的消息 - * @param timeout 消息展示时间(最大) - * @param priority 消息优先级,数字越大,优先级越大 - */ - message.showMessage = function (text, timeout, priority) { - let live2dPriority = sessionStorage.getItem("live2d-priority"); - if (!text || (live2dPriority && live2dPriority > priority)) return; - if (this.messageTimer) { - clearTimeout(this.messageTimer); - this.messageTimer = null; - } - text = util.randomSelection(text); - sessionStorage.setItem("live2d-priority", priority); - const tips = document.getElementById("live2d-tips"); - tips.innerHTML = text; - tips.classList.add("live2d-tips-active"); - this.messageTimer = setTimeout(() => { - sessionStorage.removeItem("live2d-priority"); - tips.classList.remove("live2d-tips-active"); - }, timeout); - }; - - /** - * 创建一个流式效果的消息框。 - * 此消息框的优先级将大于所有其他消息框优先级,且不会被其他消息覆盖。 - * - * @param timeout 等待消息流的最大时间,超过此时间将自动关闭流消息框 - * @param showTimeout 消息全部接受完之后,展示时长 - */ - message.createStreamMessage = function (timeout, showTimeout) { - const priority = 99999; - - const updateTimer = function (time) { - if (this.messageTimer) { - clearTimeout(this.messageTimer); - this.messageTimer = null; - } - this.messageTimer = setTimeout(() => { - sessionStorage.removeItem("live2d-priority"); - tips.classList.remove("live2d-tips-active"); - }, time); - }; - - sessionStorage.setItem("live2d-priority", priority); - const tips = document.getElementById("live2d-tips"); - tips.innerHTML = ""; - tips.classList.add("live2d-tips-active"); - updateTimer(timeout); - - const sendMessage = function (text) { - tips.innerHTML += text; - }; - - const stop = function () { - updateTimer(showTimeout); - }; - - return { - sendMessage, - stop, - }; - }; - - /** - * 显示一言 - * - * @param api 需要获取的一言接口 - * @param callback 获取到的一言返回结果特殊化处理(用于不同接口的差异性)。 - * 其处理返回值为数组或字符串,数组第一位为一言(不可为空),数组第二位为作者,网站等信息(可为空) - */ - message.showHitokoto = function (api, callback) { - fetch(api) - .then((response) => response.json()) - .then((result) => { - let text = callback(result); - if (typeof text === "string") { - this.showMessage(text, 6000, 2); - } else { - this.showMessage(text[0], 6000, 2); - if (text[1] !== undefined) { - setTimeout(() => { - this.showMessage(text[1], 4000, 2); - }, 6000); - } - } - }); - }; - - /** - * 首次进入,显示欢迎消息 - * - * @param time 时间 - * @returns {string|*} - */ - message.welcomeMessage = (time) => { - // 如果是主页 - if (location.pathname === "/") { - for (const { hour, text } of time) { - const now = new Date(); - const after = hour.split("-")[0]; - const before = hour.split("-")[1] || after; - if (after <= now.getHours() && now.getHours() <= before) { - return text; - } - } - } - const text = `欢迎阅读「${document.title.split(" - ")[0]}」`; - let from; - if (document.referrer !== "") { - const referrer = new URL(document.referrer); - const domain = referrer.hostname.split(".")[1]; - if (location.hostname === referrer.hostname) return text; - if (domain in domains) { - from = domains[domain]; - } else { - from = referrer.hostname; - } - return `Hello!来自 ${from} 的朋友
${text}`; - } - return text; - }; - - /** - * openai 右侧小工具 - * - * @param config - * @returns {{icon: string, callback: (function(): void)}} - */ - tools.openai = function (config = {}) { - return { - icon: config["openaiIcon"] || "ph-chats-circle-fill", - callback: () => { - openai.chatWindows(config); - }, - }; - }; - - /** - * Live2d 右侧一言小工具 - * - * @param config - * @returns {{icon: string, callback: (function(): void)}} - */ - tools.hitokoto = function (config = {}) { - let api = config["hitokotoApi"] || "https://v1.hitokoto.cn"; - let callback; - switch (api) { - case "https://v1.hitokoto.cn": - callback = () => - message.showHitokoto(api, (result) => { - return [ - result["hitokoto"], - `这句一言来自 「${result["from"]}」,是 ${result["creator"]} 在 hitokoto.cn 投稿的。`, - ]; - }); - break; - default: - callback = () => - message.showHitokoto(api, (result) => { - if (result["hitokoto"] !== undefined) { - return [result["hitokoto"]]; - } - return `一言接口格式不正确,请确保一言返回字段为 hitokoto,例如 {"hitokoto": "一言"}。特殊接口请联系插件作者增加适配`; - }); - break; - } - return { - icon: config["hitokotoIcon"] || "ph-chat-circle-fill", - callback: callback, - }; - }; - - /** - * 小飞船游戏 - * - * @param config - * @returns {{icon: string, callback: callback}} - */ - tools.asteroids = function (config = {}) { - return { - icon: config["asteroidsIcon"] || "ph-paper-plane-tilt-fill", - callback: () => { - if (window.Asteroids) { - if (!window.ASTEROIDSPLAYERS) window.ASTEROIDSPLAYERS = []; - window.ASTEROIDSPLAYERS.push(new Asteroids()); - } else { - util.loadExternalResource(live2d.path + "lib/asteroids/asteroids.min.js", "js").finally(); - } - }, - }; - }; - - /** - * 切换模组 - * - * @param config - * @returns {{icon: string, callback: callback}} - */ - tools["switch-model"] = function (config = {}) { - return { - icon: config["switch-model-icon"] || "ph-arrows-counter-clockwise-fill", - callback: () => {}, - }; - }; - - /** - * 切换纹理/衣服 - * - * @param config - * @returns {{icon: string, callback: callback}} - */ - tools["switch-texture"] = function (config = {}) { - return { - icon: config["switch-texture-icon"] || "ph-dress-fill", - callback: () => {}, - }; - }; - - /** - * 截图功能 - * - * @param config - * @returns {{icon: string, callback: callback}} - */ - tools.photo = function (config = {}) { - let photoName = config["photoName"] || "live2d"; - return { - icon: config["photoIcon"] || "ph-camera-fill", - callback: () => { - message.showMessage("照好了嘛,是不是很可爱呢?", 6000, 2); - Live2D.captureName = photoName + ".png"; - Live2D.captureFrame = true; - }, - }; - }; - - /** - * 前往目标站点 - * - * @param config - * @returns {{icon: string, callback: callback}} - */ - tools.info = function (config = {}) { - let siteUrl = "https://github.com/LIlGG/plugin-live2d"; - return { - icon: config["infoIcon"] || "ph-info-fill", - callback: () => { - open(siteUrl); - }, - }; - }; - - /** - * 退出 live2d - * - * @param config - * @returns {{icon: string, callback: callback}} - */ - tools.quit = function (config = {}) { - return { - icon: config["quitIcon"] || "ph-x-bold", - callback: () => { - localStorage.setItem("live2d-display", Date.now()); - message.showMessage("愿你有一天能与重要的人重逢。", 2000, 4); - document.getElementById("live2d-plugin").style.bottom = "-500px"; - setTimeout(() => { - document.getElementById("live2d-plugin").style.display = "none"; - document.getElementById("live2d-toggle").classList.add("live2d-toggle-active"); - }, 3000); - }, - }; - }; - - /** - * 注册工具 - * - * @param model 需要添加工具的模组 {@link Model} - * @param config 配置文件 - * @private 私有方法 - */ - tools._registerTools = function (model, config) { - if (!Array.isArray(config.tools)) { - config.tools = Object.keys(tools); - } - if (config.isAiChat) { - config.tools.unshift("openai"); - } - // TODO 小工具样式 - for (let tool of config.tools) { - if (tools[tool]) { - let { icon, callback } = tools[tool](config); - switch (tool) { - case "switch-model": - callback = () => model.loadOtherModel(); - break; - case "switch-texture": - callback = () => model.loadRandModel(); - break; - } - document - .getElementById("live2d-tool") - .insertAdjacentHTML( - "beforeend", - `` - ); - document.getElementById(`live2d-tool-${tool}`).addEventListener("click", callback); - } - } - }; - - openai.messageTimer = null; - - /** - * 使用 openai 发送流式聊天消息 - * - * @param {*} msg - */ - openai.sendMessage = async function (msg, config = {}) { - openai.loading = true; - if (this.messageTimer) { - clearTimeout(this.messageTimer); - this.messageTimer = null; - } - this.messageTimer = setTimeout(() => { - message.showMessage("正在接收来自母星的消息,请耐心等待~", 2000, 2); - }, 5000); - - document.getElementById("loadingIcon").style.display = "block"; - document.getElementById("send").style.display = "none"; - - let historyMessages = JSON.parse(localStorage.getItem("historyMessages")) || []; - let userMessage = { - role: "user", - content: msg, - }; - historyMessages.push(userMessage); - - const controller = new AbortController(); - const requestTimeoutId = setTimeout(() => { - abort(); - }, Number(config["chunkTimeout"] || 60) * 1000); - - const abort = () => { - controller.abort(); - clearTimeout(this.messageTimer); - clearTimeout(requestTimeoutId); - openai.loading = false; - document.getElementById("loadingIcon").style.display = "none"; - document.getElementById("send").style.display = "block"; - }; - const response = await fetch("/apis/api.live2d.halo.run/v1alpha1/live2d/ai/chat-process", { - method: "POST", - cache: "no-cache", - keepalive: true, - headers: { - "Content-Type": "application/json", - Accept: "text/event-stream", - }, - body: JSON.stringify({ - message: historyMessages, - }), - signal: controller.signal, - }); - - if (!response.ok) { - if (response.status === 401) { - message.showMessage("请先登录!", 2000, 4); - } else { - message.showMessage("对话接口异常了哦~快去联系我的主人吧!", 5000, 4); - } - console.log("get.message.error", response); - abort(); - return; - } - - let chatMessage = { - content: "", - }; - - clearTimeout(this.messageTimer); - clearTimeout(requestTimeoutId); - const reader = response.body.getReader(); - const textDecoder = new TextDecoder(); - const chat = message.createStreamMessage( - Number(config["chunkTimeout"] || 60) * 1000, - Number(config["showChatMessageTimeout"] || 10) * 1000 - ); - - document.getElementById("send").style.display = "block"; - document.getElementById("loadingIcon").style.display = "none"; - openai.loading = false; - while (true) { - const { value, done } = await reader.read(); - if (done) { - break; - } - let text = textDecoder.decode(value); - const textArrays = text.split("\n\n"); - textArrays.forEach((decoder) => { - if (!decoder) return; - if (decoder.startsWith("data:")) { - let dataIndex = decoder.indexOf("data:"); - if (dataIndex !== -1) { - decoder = decoder.substring(dataIndex + 5); - } - } - const chatResult = JSON.parse(decoder); - const { text, status } = chatResult; - try { - if (status === 200) { - chatMessage.role = "assistant"; - if (text === "[DONE]") { - historyMessages.push(chatMessage); - localStorage.setItem("historyMessages", JSON.stringify(historyMessages)); - chat.stop(); - } else { - chatMessage.content += text; - chat.sendMessage(text); - } - } else { - throw new Error(text); - } - } catch (e) { - console.error("[Request] parse error", text); - chat.sendMessage(`聊天接口出现异常了:${text}`); - } - }); - } - }; - - openai.loading = false; - - /** - * 创建 chat 聊天窗口 - * - * @param {*} config - */ - openai.chatWindows = function (config = {}) { - let model = document.getElementById("live2d-chat-model"); - if (model) { - if (model.classList.contains("live2d-chat-model-active")) { - model.classList.remove("live2d-chat-model-active"); - } else { - let input = document.getElementById("live2d-chat-input"); - model.classList.add("live2d-chat-model-active"); - input.focus(); - } - return; - } - document.body.insertAdjacentHTML( - "beforeend", - `
-
-
- -
- - - - -
-
` - ); - - model = document.getElementById("live2d-chat-model"); - let send = document.getElementById("live2d-chat-send"); - let input = document.getElementById("live2d-chat-input"); - - const sendFun = function () { - let message = input.value; - if (message.length > 0 && !openai.loading) { - input.value = ""; - send.classList.remove("active"); - send.setAttribute("disabled", "disabled"); - openai.sendMessage(message, config); - } - }; - - input.addEventListener("input", (e) => { - let message = input.value; - if (message.length > 0 && !openai.loading) { - send.classList.add("active"); - send.removeAttribute("disabled"); - } else { - send.classList.remove("active"); - send.setAttribute("disabled", "disabled"); - } - }); - - send.addEventListener("click", () => { - sendFun(); - }); - - input.addEventListener("keydown", (e) => { - var keyNum = window.event ? e.keyCode : e.which; - if (keyNum == 13) { - sendFun(); - } - if (keyNum == 27) { - model.classList.remove("live2d-chat-model-active"); - } - }); - - input.addEventListener("focus", () => { - message.showMessage("按下回车键可以快速发送消息哦", 2000, 1); - }); - - model.classList.add("live2d-chat-model-active"); - }; - - window.onload = function () { - localStorage.removeItem("historyMessages"); - }; - - return new Live2d(); -} diff --git a/src/main/resources/static/js/live2d-autoload.min.js b/src/main/resources/static/js/live2d-autoload.min.js deleted file mode 100644 index 4bfde54..0000000 --- a/src/main/resources/static/js/live2d-autoload.min.js +++ /dev/null @@ -1,52 +0,0 @@ -let live2d=new Live2d();function Live2d(){const util={};const message={};const tools={};const openai={};class Live2d{#path;#config;defaultConfig={apiPath:"//api.zsq.im/live2d/",tools:["hitokoto","asteroids","switch-model","switch-texture","photo","info","quit"],updateTime:"2022.12.09",version:"1.0.1",tipsPath:"live2d-tips.json",};init(path,config={}){if(screen.width>=768){Promise.all([util.loadExternalResource(path+"css/live2d.css","css"),util.loadExternalResource(path+"lib/live2d/live2d.min.js","js"),]).then(()=>{this.#path=path;this.defaultConfig.tipsPath=path+"live2d-tips.json";this.#config={...this.defaultConfig,...config};this.#doInit();});}} -get path(){return this.#path;}#doInit(){document.body.insertAdjacentHTML("beforeend",`
看板娘
`);const toggle=document.getElementById("live2d-toggle");toggle.addEventListener("click",()=>{toggle.classList.remove("live2d-toggle-active");if(toggle.getAttribute("first-time")){this.#loadWidget();toggle.removeAttribute("first-time");}else{localStorage.removeItem("live2d-display");document.getElementById("live2d-plugin").style.display="";setTimeout(()=>{document.getElementById("live2d-plugin").style.bottom=0;},0);}});if(localStorage.getItem("live2d-display")&&Date.now()-localStorage.getItem("live2d-display")<=86400000){toggle.setAttribute("first-time",true);setTimeout(()=>{toggle.classList.add("live2d-toggle-active");},0);}else{this.#loadWidget();}}#loadWidget(){localStorage.removeItem("live2d-display");sessionStorage.removeItem("live2d-text");document.body.insertAdjacentHTML("beforeend",`
-
- -
-
`);let live2dDom=document.getElementById("live2d-plugin");setTimeout(()=>{live2dDom.style.bottom=0;},0);if(this.#config["live2dLocation"]==="right"){live2dDom.style.right="50px";live2dDom.style.left="auto";} -const model=new Model(this.#config);if(this.#config["isTools"]===true){if(typeof Iconify!=="undefined"){tools._registerTools(model,this.#config);}else{util.loadExternalResource(this.#path+"lib/iconify/3.0.1/iconify.min.js","js").then(()=>{tools._registerTools(model,this.#config);});}} -this.#initModel(model);}#registerEventListener(result){let userAction=false,userActionTimer,messageArray=result.message.default;window.addEventListener("mousemove",()=>(userAction=true));window.addEventListener("keydown",()=>(userAction=true));setInterval(()=>{if(userAction){userAction=false;clearInterval(userActionTimer);userActionTimer=null;}else if(!userActionTimer){userActionTimer=setInterval(()=>{message.showMessage(messageArray,6000,2);},20000);}},1000);if(this.#config["firstOpenSite"]===true){message.showMessage(message.welcomeMessage(result.time),7000,4);} -window.addEventListener("mouseover",(event)=>{for(let{selector,text}of result.mouseover){if(!event.target.matches(selector))continue;text=util.randomSelection(text);text=text.replace("{text}",event.target.innerText);message.showMessage(text,4000,1);return;}});window.addEventListener("click",(event)=>{for(let{selector,text}of result.click){if(!event.target.matches(selector))continue;text=util.randomSelection(text);text=text.replace("{text}",event.target.innerText);message.showMessage(text,4000,1);return;}});result["seasons"].forEach(({date,text})=>{const now=new Date(),after=date.split("-")[0],before=date.split("-")[1]||after;if(after.split("/")[0]<=now.getMonth()+1&&now.getMonth()+1<=before.split("/")[0]&&after.split("/")[1]<=now.getDate()&&now.getDate()<=before.split("/")[1]){text=util.randomSelection(text);text=text.replace("{year}",now.getFullYear());messageArray.push(text);}});if(this.#config["openConsole"]===true){let devtools=()=>{};devtools.toString=()=>{message.showMessage(this.#config["openConsoleTip"]||result["message"]["console"],6000,2);};} -if(this.#config["copyContent"]===true){window.addEventListener("copy",()=>{message.showMessage(this.#config["copyContentTip"]||result["message"]["copy"],6000,2);});} -if(this.#config["backSite"]===true){window.addEventListener("visibilitychange",()=>{if(!document.hidden){message.showMessage(this.#config["backSiteTip"]||result["message"]["visibilitychange"],6000,2);}});}}#initModel(model){let modelId=localStorage.getItem("modelId");let modelTexturesId=localStorage.getItem("modelTexturesId");if(modelId===null||!!this.#config["isForceUseDefaultConfig"]){modelId=this.#config["modelId"]||1;modelTexturesId=this.#config["modelTexturesId"]||53;} -if(this.#config["consoleShowStatu"]){eval((function(p,a,c,k,e,r){e=function(c){return((c35?String.fromCharCode(c+29):c.toString(36)));};if(!"".replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e];},];e=function(){return"\\w+";};c=1;} -while(c--)if(k[c])p=p.replace(new RegExp("\\b"+e(c)+"\\b","g"),k[c]);return p;})("8.d(\" \");8.d(\"\\U,.\\y\\5.\\1\\1\\1\\1/\\1,\\u\\2 \\H\\n\\1\\1\\1\\1\\1\\b ', !-\\r\\j-i\\1/\\1/\\g\\n\\1\\1\\1 \\1 \\a\\4\\f'\\1\\1\\1 L/\\a\\4\\5\\2\\n\\1\\1 \\1 /\\1 \\a,\\1 /|\\1 ,\\1 ,\\1\\1\\1 ',\\n\\1\\1\\1\\q \\1/ /-\\j/\\1\\h\\E \\9 \\5!\\1 i\\n\\1\\1\\1 \\3 \\6 7\\q\\4\\c\\1 \\3'\\s-\\c\\2!\\t|\\1 |\\n\\1\\1\\1\\1 !,/7 '0'\\1\\1 \\X\\w| \\1 |\\1\\1\\1\\n\\1\\1\\1\\1 |.\\x\\\"\\1\\l\\1\\1 ,,,, / |./ \\1 |\\n\\1\\1\\1\\1 \\3'| i\\z.\\2,,A\\l,.\\B / \\1.i \\1|\\n\\1\\1\\1\\1\\1 \\3'| | / C\\D/\\3'\\5,\\1\\9.\\1|\\n\\1\\1\\1\\1\\1\\1 | |/i \\m|/\\1 i\\1,.\\6 |\\F\\1|\\n\\1\\1\\1\\1\\1\\1.|/ /\\1\\h\\G \\1 \\6!\\1\\1\\b\\1|\\n\\1\\1\\1 \\1 \\1 k\\5>\\2\\9 \\1 o,.\\6\\2 \\1 /\\2!\\n\\1\\1\\1\\1\\1\\1 !'\\m//\\4\\I\\g', \\b \\4'7'\\J'\\n\\1\\1\\1\\1\\1\\1 \\3'\\K|M,p,\\O\\3|\\P\\n\\1\\1\\1\\1\\1 \\1\\1\\1\\c-,/\\1|p./\\n\\1\\1\\1\\1\\1 \\1\\1\\1'\\f'\\1\\1!o,.:\\Q \\R\\S\\T v\"+e.V+\" / W \"+e.N);8.d(\" \");",60,60,"|u3000|uff64|uff9a|uff40|u30fd|uff8d||console|uff8a|uff0f|uff3c|uff84|log|this.#config|uff70|u00b4|uff49||u2010||u3000_|u3008||_|___|uff72|u2500|uff67|u30cf|u30fc||u30bd|u4ece|u30d8|uff1e|__|u30a4|k_|uff17_|u3000L_|u3000i|uff1a|u3009|uff34|uff70r|u30fdL__||___i|updateTime|u30f3|u30ce|nLive2D|u770b|u677f|u5a18|u304f__|version|LIlGG|u00b40i".split("|"),0,{}));} -model.loadModel(modelId,modelTexturesId);this.#loadTips().then((result)=>this.#registerEventListener(result));}#loadTips(){let config=this.#config;return new Promise((resolve)=>{Promise.all([util.loadTipsResource(config["themeTipsPath"]),util.loadTipsResource(config["tipsPath"])]).then((result)=>{let configTips=util.backendConfigConvert(config);let themeTips={click:result[0]["click"]||[],mouseover:result[0]["mouseover"]||[],};let defaultTips=result[1];if(Object.keys(defaultTips).length===0){util.loadTipsResource(this.defaultConfig.tipsPath).then((tips)=>{resolve(util.mergeTips(configTips,themeTips,tips));});}else{resolve(util.mergeTips(configTips,themeTips,defaultTips));}});});}} -class Model{#apiPath;#config;constructor(config){let apiPath=config["apiPath"];if(apiPath!==undefined&&typeof apiPath==="string"&&apiPath.length>0){if(!apiPath.endsWith("/"))apiPath+="/";}else{throw"Invalid initWidget argument!";} -this.#apiPath=apiPath;this.#config=config;} -async loadModel(modelId,modelTexturesId,text){localStorage.setItem("modelId",modelId);localStorage.setItem("modelTexturesId",modelTexturesId);message.showMessage(text,4000,3);loadlive2d("live2d",`${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`,this.#config["consoleShowStatu"]===true?console.log(`[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`):null);} -async loadRandModel(){const modelId=Number(localStorage.getItem("modelId")),modelTexturesId=Number(localStorage.getItem("modelTexturesId"));fetch(`${this.#apiPath}rand_textures/?id=${modelId}-${modelTexturesId}`).then((response)=>response.json()).then((result)=>{if(result["textures"]["id"]===1&&(modelTexturesId===1||modelTexturesId===0)){message.showMessage("我还没有其他衣服呢!",4000,3);}else{this.loadModel(modelId,result["textures"]["id"],"我的新衣服好看嘛?");}});} -async loadOtherModel(){let modelId=Number(localStorage.getItem("modelId"));fetch(`${this.#apiPath}switch/?id=${modelId}`).then((response)=>response.json()).then((result)=>{this.loadModel(result.model.id,0,result.model.message);});}} -util.loadExternalResource=function(url,type){return new Promise((resolve,reject)=>{let tag;if(type==="css"){tag=document.createElement("link");tag.rel="stylesheet";tag.href=url;}else if(type==="js"){tag=document.createElement("script");tag.src=url;} -if(tag){tag.onload=()=>resolve(url);tag.onerror=()=>reject(url);document.head.appendChild(tag);}});};util.randomSelection=function(obj){return Array.isArray(obj)?obj[Math.floor(Math.random()*obj.length)]:obj;};util.loadTipsResource=function(url){let defaultObj={};return new Promise((resolve)=>{if(!url){resolve(defaultObj);} -fetch(url).then((response)=>response.json()).then((result)=>{resolve(result);}).catch(()=>{resolve(defaultObj);});});};util.backendConfigConvert=function(config={}){let tips={click:[],mouseover:[],message:{},};if(!!config["selectorTips"]){config["selectorTips"].forEach((item)=>{let texts=item["messageTexts"].map((text)=>text.message);let obj={selector:item["selector"],text:texts,};if(item["mouseAction"]==="click"){tips.click.push(obj);}else{tips.mouseover.push(obj);}});} -tips.message.visibilitychange=config["backSiteTip"];tips.message.copy=config["copyContentTip"];tips.message.console=config["openConsoleTip"];return tips;};util.mergeTips=function(configTips,themeTips,defaultTips){let duplicateClick=[...configTips["click"],...themeTips["click"],...defaultTips["click"]];let duplicateMouseover=[...configTips["mouseover"],...themeTips["mouseover"],...defaultTips["mouseover"]];defaultTips.click=util.distinctArray(duplicateClick,"selector");defaultTips.mouseover=util.distinctArray(duplicateMouseover,"selector");defaultTips.message={...defaultTips.message,...configTips.message};return defaultTips;};util.distinctArray=function(dupArray,key){let obj={};return dupArray.reduce((curr,next)=>{if(!obj[next[key]]){obj[next[key]]=true;curr.push(next);} -return curr;},[]);};message.messageTimer=null;message.showMessage=function(text,timeout,priority){let live2dPriority=sessionStorage.getItem("live2d-priority");if(!text||(live2dPriority&&live2dPriority>priority))return;if(this.messageTimer){clearTimeout(this.messageTimer);this.messageTimer=null;} -text=util.randomSelection(text);sessionStorage.setItem("live2d-priority",priority);const tips=document.getElementById("live2d-tips");tips.innerHTML=text;tips.classList.add("live2d-tips-active");this.messageTimer=setTimeout(()=>{sessionStorage.removeItem("live2d-priority");tips.classList.remove("live2d-tips-active");},timeout);};message.createStreamMessage=function(timeout,showTimeout){const priority=99999;const updateTimer=function(time){if(this.messageTimer){clearTimeout(this.messageTimer);this.messageTimer=null;} -this.messageTimer=setTimeout(()=>{sessionStorage.removeItem("live2d-priority");tips.classList.remove("live2d-tips-active");},time);};sessionStorage.setItem("live2d-priority",priority);const tips=document.getElementById("live2d-tips");tips.innerHTML="";tips.classList.add("live2d-tips-active");updateTimer(timeout);const sendMessage=function(text){tips.innerHTML+=text;};const stop=function(){updateTimer(showTimeout);};return{sendMessage,stop,};};message.showHitokoto=function(api,callback){fetch(api).then((response)=>response.json()).then((result)=>{let text=callback(result);if(typeof text==="string"){this.showMessage(text,6000,2);}else{this.showMessage(text[0],6000,2);if(text[1]!==undefined){setTimeout(()=>{this.showMessage(text[1],4000,2);},6000);}}});};message.welcomeMessage=function(time){const domains={baidu:"百度",so:"360搜索",google:"谷歌搜索",};if(location.pathname==="/"){for(let{hour,text}of time){const now=new Date(),after=hour.split("-")[0],before=hour.split("-")[1]||after;if(after<=now.getHours()&&now.getHours()<=before){return text;}}} -const text=`欢迎阅读「${document.title.split(" - ")[0]}」`;let from;if(document.referrer!==""){const referrer=new URL(document.referrer),domain=referrer.hostname.split(".")[1];if(location.hostname===referrer.hostname)return text;if(domain in domains){from=domains[domain];}else{from=referrer.hostname;} -return`Hello!来自 ${from} 的朋友
${text}`;} -return text;};tools.openai=function(config={}){return{icon:config["openaiIcon"]||"ph-chats-circle-fill",callback:()=>{openai.chatWindows(config);},};};tools.hitokoto=function(config={}){let api=config["hitokotoApi"]||"https://v1.hitokoto.cn";let callback;switch(api){case"https://v1.hitokoto.cn":callback=()=>message.showHitokoto(api,(result)=>{return[result["hitokoto"],`这句一言来自 「${result["from"]}」,是 ${result["creator"]} 在 hitokoto.cn 投稿的。`,];});break;default:callback=()=>message.showHitokoto(api,(result)=>{if(result["hitokoto"]!==undefined){return[result["hitokoto"]];} -return`一言接口格式不正确,请确保一言返回字段为 hitokoto,例如 {"hitokoto": "一言"}。特殊接口请联系插件作者增加适配`;});break;} -return{icon:config["hitokotoIcon"]||"ph-chat-circle-fill",callback:callback,};};tools.asteroids=function(config={}){return{icon:config["asteroidsIcon"]||"ph-paper-plane-tilt-fill",callback:()=>{if(window.Asteroids){if(!window.ASTEROIDSPLAYERS)window.ASTEROIDSPLAYERS=[];window.ASTEROIDSPLAYERS.push(new Asteroids());}else{util.loadExternalResource(live2d.path+"lib/asteroids/asteroids.min.js","js").finally();}},};};tools["switch-model"]=function(config={}){return{icon:config["switch-model-icon"]||"ph-arrows-counter-clockwise-fill",callback:()=>{},};};tools["switch-texture"]=function(config={}){return{icon:config["switch-texture-icon"]||"ph-dress-fill",callback:()=>{},};};tools.photo=function(config={}){let photoName=config["photoName"]||"live2d";return{icon:config["photoIcon"]||"ph-camera-fill",callback:()=>{message.showMessage("照好了嘛,是不是很可爱呢?",6000,2);Live2D.captureName=photoName+".png";Live2D.captureFrame=true;},};};tools.info=function(config={}){let siteUrl="https://github.com/LIlGG/plugin-live2d";return{icon:config["infoIcon"]||"ph-info-fill",callback:()=>{open(siteUrl);},};};tools.quit=function(config={}){return{icon:config["quitIcon"]||"ph-x-bold",callback:()=>{localStorage.setItem("live2d-display",Date.now());message.showMessage("愿你有一天能与重要的人重逢。",2000,4);document.getElementById("live2d-plugin").style.bottom="-500px";setTimeout(()=>{document.getElementById("live2d-plugin").style.display="none";document.getElementById("live2d-toggle").classList.add("live2d-toggle-active");},3000);},};};tools._registerTools=function(model,config){if(!Array.isArray(config.tools)){config.tools=Object.keys(tools);} -if(config.isAiChat){config.tools.unshift("openai");} -for(let tool of config.tools){if(tools[tool]){let{icon,callback}=tools[tool](config);switch(tool){case"switch-model":callback=()=>model.loadOtherModel();break;case"switch-texture":callback=()=>model.loadRandModel();break;} -document.getElementById("live2d-tool").insertAdjacentHTML("beforeend",``);document.getElementById(`live2d-tool-${tool}`).addEventListener("click",callback);}}};openai.messageTimer=null;openai.sendMessage=async function(msg,config={}){openai.loading=true;if(this.messageTimer){clearTimeout(this.messageTimer);this.messageTimer=null;} -this.messageTimer=setTimeout(()=>{message.showMessage("正在接收来自母星的消息,请耐心等待~",2000,2);},5000);document.getElementById("loadingIcon").style.display="block";document.getElementById("send").style.display="none";let historyMessages=JSON.parse(localStorage.getItem("historyMessages"))||[];let userMessage={role:"user",content:msg,};historyMessages.push(userMessage);const controller=new AbortController();const requestTimeoutId=setTimeout(()=>{abort();},Number(config["chunkTimeout"]||60)*1000);const abort=()=>{controller.abort();clearTimeout(this.messageTimer);clearTimeout(requestTimeoutId);openai.loading=false;document.getElementById("loadingIcon").style.display="none";document.getElementById("send").style.display="block";};const response=await fetch("/apis/api.live2d.halo.run/v1alpha1/live2d/ai/chat-process",{method:"POST",cache:"no-cache",keepalive:true,headers:{"Content-Type":"application/json",Accept:"text/event-stream",},body:JSON.stringify({message:historyMessages,}),signal:controller.signal,});if(!response.ok){if(response.status===401){message.showMessage("请先登录!",2000,4);}else{message.showMessage("对话接口异常了哦~快去联系我的主人吧!",5000,4);} -console.log("get.message.error",response);abort();return;} -let chatMessage={content:"",};clearTimeout(this.messageTimer);clearTimeout(requestTimeoutId);const reader=response.body.getReader();const textDecoder=new TextDecoder();const chat=message.createStreamMessage(Number(config["chunkTimeout"]||60)*1000,Number(config["showChatMessageTimeout"]||10)*1000);document.getElementById("send").style.display="block";document.getElementById("loadingIcon").style.display="none";openai.loading=false;while(true){const{value,done}=await reader.read();if(done){break;} -let text=textDecoder.decode(value);const textArrays=text.split("\n\n");textArrays.forEach((decoder)=>{if(!decoder)return;if(decoder.startsWith("data:")){let dataIndex=decoder.indexOf("data:");if(dataIndex!==-1){decoder=decoder.substring(dataIndex+5);}} -const chatResult=JSON.parse(decoder);const{text,status}=chatResult;try{if(status===200){chatMessage.role="assistant";if(text==="[DONE]"){historyMessages.push(chatMessage);localStorage.setItem("historyMessages",JSON.stringify(historyMessages));chat.stop();}else{chatMessage.content+=text;chat.sendMessage(text);}}else{throw new Error(text);}}catch(e){console.error("[Request] parse error",text);chat.sendMessage(`聊天接口出现异常了:${text}`);}});}};openai.loading=false;openai.chatWindows=function(config={}){let model=document.getElementById("live2d-chat-model");if(model){if(model.classList.contains("live2d-chat-model-active")){model.classList.remove("live2d-chat-model-active");}else{let input=document.getElementById("live2d-chat-input");model.classList.add("live2d-chat-model-active");input.focus();} -return;} -document.body.insertAdjacentHTML("beforeend",`
-
-
- -
- - - - -
-
`);model=document.getElementById("live2d-chat-model");let send=document.getElementById("live2d-chat-send");let input=document.getElementById("live2d-chat-input");const sendFun=function(){let message=input.value;if(message.length>0&&!openai.loading){input.value="";send.classList.remove("active");send.setAttribute("disabled","disabled");openai.sendMessage(message,config);}};input.addEventListener("input",(e)=>{let message=input.value;if(message.length>0&&!openai.loading){send.classList.add("active");send.removeAttribute("disabled");}else{send.classList.remove("active");send.setAttribute("disabled","disabled");}});send.addEventListener("click",()=>{sendFun();});input.addEventListener("keydown",(e)=>{var keyNum=window.event?e.keyCode:e.which;if(keyNum==13){sendFun();} -if(keyNum==27){model.classList.remove("live2d-chat-model-active");}});input.addEventListener("focus",()=>{message.showMessage("按下回车键可以快速发送消息哦",2000,1);});model.classList.add("live2d-chat-model-active");};window.onload=function(){localStorage.removeItem("historyMessages");};return new Live2d();} diff --git a/src/main/resources/static/lib/asteroids/asteroids.min.js b/src/main/resources/static/lib/asteroids/asteroids.min.js deleted file mode 100644 index 78fc3ca..0000000 --- a/src/main/resources/static/lib/asteroids/asteroids.min.js +++ /dev/null @@ -1,640 +0,0 @@ -// http://www.websiteasteroids.com -function Asteroids() { - if (!window.ASTEROIDS) window.ASTEROIDS = { - enemiesKilled: 0 - }; - class Vector { - constructor(x, y) { - if (typeof x === "Object") { - this.x = x.x; - this.y = x.y; - } else { - this.x = x; - this.y = y; - } - } - cp() { - return new Vector(this.x, this.y); - } - mul(factor) { - this.x *= factor; - this.y *= factor; - return this; - } - mulNew(factor) { - return new Vector(this.x * factor, this.y * factor); - } - add(vec) { - this.x += vec.x; - this.y += vec.y; - return this; - } - addNew(vec) { - return new Vector(this.x + vec.x, this.y + vec.y); - } - sub(vec) { - this.x -= vec.x; - this.y -= vec.y; - return this; - } - subNew(vec) { - return new Vector(this.x - vec.x, this.y - vec.y); - } - rotate(angle) { - const x = this.x, y = this.y; - this.x = x * Math.cos(angle) - Math.sin(angle) * y; - this.y = x * Math.sin(angle) + Math.cos(angle) * y; - return this; - } - rotateNew(angle) { - return this.cp().rotate(angle); - } - setAngle(angle) { - const l = this.len(); - this.x = Math.cos(angle) * l; - this.y = Math.sin(angle) * l; - return this; - } - setAngleNew(angle) { - return this.cp().setAngle(angle); - } - setLength(length) { - const l = this.len(); - if (l) this.mul(length / l); - else this.x = this.y = length; - return this; - } - setLengthNew(length) { - return this.cp().setLength(length); - } - normalize() { - const l = this.len(); - this.x /= l; - this.y /= l; - return this; - } - normalizeNew() { - return this.cp().normalize(); - } - angle() { - return Math.atan2(this.y, this.x); - } - collidesWith(rect) { - return this.x > rect.x && this.y > rect.y && this.x < rect.x + rect.width && this.y < rect.y + rect.height; - } - len() { - const l = Math.sqrt(this.x * this.x + this.y * this.y); - if (l < 0.005 && l > -0.005) return 0; - return l; - } - is(test) { - return typeof test === "object" && this.x === test.x && this.y === test.y; - } - toString() { - return "[Vector(" + this.x + ", " + this.y + ") angle: " + this.angle() + ", length: " + this.len() + "]"; - } - } - - class Line { - constructor(p1, p2) { - this.p1 = p1; - this.p2 = p2; - } - shift(pos) { - this.p1.add(pos); - this.p2.add(pos); - } - intersectsWithRect(rect) { - const LL = new Vector(rect.x, rect.y + rect.height); - const UL = new Vector(rect.x, rect.y); - const LR = new Vector(rect.x + rect.width, rect.y + rect.height); - const UR = new Vector(rect.x + rect.width, rect.y); - if (this.p1.x > LL.x && this.p1.x < UR.x && this.p1.y < LL.y && this.p1.y > UR.y && this.p2.x > LL.x && this.p2.x < UR.x && this.p2.y < LL.y && this.p2.y > UR.y) return true; - if (this.intersectsLine(new Line(UL, LL))) return true; - if (this.intersectsLine(new Line(LL, LR))) return true; - if (this.intersectsLine(new Line(UL, UR))) return true; - if (this.intersectsLine(new Line(UR, LR))) return true; - return false; - } - intersectsLine(line2) { - const v1 = this.p1, v2 = this.p2; - const v3 = line2.p1, v4 = line2.p2; - const denom = ((v4.y - v3.y) * (v2.x - v1.x)) - ((v4.x - v3.x) * (v2.y - v1.y)); - const numerator = ((v4.x - v3.x) * (v1.y - v3.y)) - ((v4.y - v3.y) * (v1.x - v3.x)); - const numerator2 = ((v2.x - v1.x) * (v1.y - v3.y)) - ((v2.y - v1.y) * (v1.x - v3.x)); - if (denom === 0.0) { - return false; - } - const ua = numerator / denom; - const ub = numerator2 / denom; - return (ua >= 0.0 && ua <= 1.0 && ub >= 0.0 && ub <= 1.0); - } - } - const that = this; - const isIE = !! window.ActiveXObject; - let w = document.documentElement.clientWidth, h = document.documentElement.clientHeight; - const playerWidth = 20, playerHeight = 30; - const playerVerts = [ - [-1 * playerHeight / 2, -1 * playerWidth / 2], - [-1 * playerHeight / 2, playerWidth / 2], - [playerHeight / 2, 0] - ]; - const ignoredTypes = ["HTML", "HEAD", "BODY", "SCRIPT", "TITLE", "META", "STYLE", "LINK", "SHAPE", "LINE", "GROUP", "IMAGE", "STROKE", "FILL", "SKEW", "PATH", "TEXTPATH"]; - const hiddenTypes = ["BR", "HR"]; - const FPS = 50; - const acc = 300; - const maxSpeed = 600; - const rotSpeed = 360; - const bulletSpeed = 700; - const particleSpeed = 400; - const timeBetweenFire = 150; - const timeBetweenBlink = 250; - const bulletRadius = 2; - const maxParticles = isIE ? 20 : 40; - const maxBullets = isIE ? 10 : 20; - this.flame = { - r: [], - y: [] - }; - this.toggleBlinkStyle = function() { - if (this.updated.blink.isActive) { - document.body.classList.remove("ASTEROIDSBLINK"); - } else { - document.body.classList.add("ASTEROIDSBLINK"); - } - this.updated.blink.isActive = !this.updated.blink.isActive; - }; - addStylesheet(".ASTEROIDSBLINK .ASTEROIDSYEAHENEMY", "outline: 2px dotted red;"); - this.pos = new Vector(100, 100); - this.lastPos = false; - this.vel = new Vector(0, 0); - this.dir = new Vector(0, 1); - this.keysPressed = {}; - this.firedAt = false; - this.updated = { - enemies: false, - flame: new Date().getTime(), - blink: { - time: 0, - isActive: false - } - }; - this.scrollPos = new Vector(0, 0); - this.bullets = []; - this.enemies = []; - this.dying = []; - this.totalEnemies = 0; - this.particles = []; - - function updateEnemyIndex() { - for (let enemy of that.enemies) { - enemy.classList.remove("ASTEROIDSYEAHENEMY"); - } - const all = document.body.getElementsByTagName("*"); - that.enemies = []; - for (let i = 0, el; el = all[i]; i++) { - if (!(ignoredTypes.includes(el.tagName.toUpperCase())) && el.prefix !== "g_vml_" && hasOnlyTextualChildren(el) && el.className !== "ASTEROIDSYEAH" && el.offsetHeight > 0) { - el.aSize = size(el); - that.enemies.push(el); - el.classList.add("ASTEROIDSYEAHENEMY"); - if (!el.aAdded) { - el.aAdded = true; - that.totalEnemies++; - } - } - } - }; - updateEnemyIndex(); - let createFlames; - (function() { - const rWidth = playerWidth, rIncrease = playerWidth * 0.1, yWidth = playerWidth * 0.6, yIncrease = yWidth * 0.2, halfR = rWidth / 2, halfY = yWidth / 2, halfPlayerHeight = playerHeight / 2; - createFlames = function() { - that.flame.r = [ - [-1 * halfPlayerHeight, -1 * halfR] - ]; - that.flame.y = [ - [-1 * halfPlayerHeight, -1 * halfY] - ]; - for (let x = 0; x < rWidth; x += rIncrease) { - that.flame.r.push([-random(2, 7) - halfPlayerHeight, x - halfR]); - } - that.flame.r.push([-1 * halfPlayerHeight, halfR]); - for (let x = 0; x < yWidth; x += yIncrease) { - that.flame.y.push([-random(2, 7) - halfPlayerHeight, x - halfY]); - } - that.flame.y.push([-1 * halfPlayerHeight, halfY]); - }; - })(); - createFlames(); - - function radians(deg) { - return deg * Math.PI / 180; - }; - - function random(from, to) { - return Math.floor(Math.random() * (to + 1) + from); - }; - - function boundsCheck(vec) { - if (vec.x > w) vec.x = 0; - else if (vec.x < 0) vec.x = w; - if (vec.y > h) vec.y = 0; - else if (vec.y < 0) vec.y = h; - }; - - function size(element) { - let el = element, left = 0, top = 0; - do { - left += el.offsetLeft || 0; - top += el.offsetTop || 0; - el = el.offsetParent; - } while (el); - return { - x: left, - y: top, - width: element.offsetWidth || 10, - height: element.offsetHeight || 10 - }; - }; - - function applyVisibility(vis) { - for (let p of window.ASTEROIDSPLAYERS) { - p.gameContainer.style.visibility = vis; - } - } - - function getElementFromPoint(x, y) { - applyVisibility("hidden"); - let element = document.elementFromPoint(x, y); - if (!element) { - applyVisibility("visible"); - return false; - } - if (element.nodeType === 3) element = element.parentNode; - applyVisibility("visible"); - return element; - }; - - function addParticles(startPos) { - const time = new Date().getTime(); - const amount = maxParticles; - for (let i = 0; i < amount; i++) { - that.particles.push({ - dir: (new Vector(Math.random() * 20 - 10, Math.random() * 20 - 10)).normalize(), - pos: startPos.cp(), - cameAlive: time - }); - } - }; - - function setScore() { - that.points.innerHTML = window.ASTEROIDS.enemiesKilled * 10; - }; - - function hasOnlyTextualChildren(element) { - if (element.offsetLeft < -100 && element.offsetWidth > 0 && element.offsetHeight > 0) return false; - if (hiddenTypes.includes(element.tagName)) return true; - if (element.offsetWidth === 0 && element.offsetHeight === 0) return false; - for (let i = 0; i < element.childNodes.length; i++) { - if (!(hiddenTypes.includes(element.childNodes[i].tagName)) && element.childNodes[i].childNodes.length !== 0) return false; - } - return true; - }; - - function addStylesheet(selector, rules) { - const stylesheet = document.createElement("style"); - stylesheet.rel = "stylesheet"; - stylesheet.id = "ASTEROIDSYEAHSTYLES"; - try { - stylesheet.innerHTML = selector + "{" + rules + "}"; - } catch (e) { - stylesheet.styleSheet.addRule(selector, rules); - } - document.getElementsByTagName("head")[0].appendChild(stylesheet); - }; - - function removeStylesheet(name) { - const stylesheet = document.getElementById(name); - if (stylesheet) { - stylesheet.parentNode.removeChild(stylesheet); - } - }; - this.gameContainer = document.createElement("div"); - this.gameContainer.className = "ASTEROIDSYEAH"; - document.body.appendChild(this.gameContainer); - this.canvas = document.createElement("canvas"); - this.canvas.setAttribute("width", w); - this.canvas.setAttribute("height", h); - this.canvas.className = "ASTEROIDSYEAH"; - Object.assign(this.canvas.style, { - width: w + "px", - height: h + "px", - position: "fixed", - top: "0px", - left: "0px", - bottom: "0px", - right: "0px", - zIndex: "10000" - }); - this.canvas.addEventListener("mousedown", function(e) { - const message = document.createElement("span"); - message.style.position = "absolute"; - message.style.color = "red"; - message.innerHTML = "Press Esc to Quit"; - document.body.appendChild(message); - const x = e.pageX || (e.clientX + document.documentElement.scrollLeft); - const y = e.pageY || (e.clientY + document.documentElement.scrollTop); - message.style.left = x - message.offsetWidth / 2 + "px"; - message.style.top = y - message.offsetHeight / 2 + "px"; - setTimeout(function() { - try { - message.parentNode.removeChild(message); - } catch (e) {} - }, 1000); - }, false); - const eventResize = function() { - that.canvas.style.display = "none"; - w = document.documentElement.clientWidth; - h = document.documentElement.clientHeight; - that.canvas.setAttribute("width", w); - that.canvas.setAttribute("height", h); - Object.assign(that.canvas.style, { - display: "block", - width: w + "px", - height: h + "px" - }); - }; - window.addEventListener("resize", eventResize, false); - this.gameContainer.appendChild(this.canvas); - this.ctx = this.canvas.getContext("2d"); - this.ctx.fillStyle = "black"; - this.ctx.strokeStyle = "black"; - if (!document.getElementById("ASTEROIDS-NAVIGATION")) { - this.navigation = document.createElement("div"); - this.navigation.id = "ASTEROIDS-NAVIGATION"; - this.navigation.className = "ASTEROIDSYEAH"; - Object.assign(this.navigation.style, { - fontFamily: "Arial,sans-serif", - position: "fixed", - zIndex: "10001", - bottom: "20px", - right: "10px", - textAlign: "right" - }); - this.navigation.innerHTML = "(Press Esc to Quit) "; - this.gameContainer.appendChild(this.navigation); - this.points = document.createElement("span"); - this.points.id = "ASTEROIDS-POINTS"; - this.points.style.font = "28pt Arial, sans-serif"; - this.points.style.fontWeight = "bold"; - this.points.className = "ASTEROIDSYEAH"; - this.navigation.appendChild(this.points); - } else { - this.navigation = document.getElementById("ASTEROIDS-NAVIGATION"); - this.points = document.getElementById("ASTEROIDS-POINTS"); - } - setScore(); - const eventKeydown = function(event) { - that.keysPressed[event.key] = true; - switch (event.key) { - case " ": - that.firedAt = 1; - break; - } - if (["ArrowUp", "ArrowDown", "ArrowRight", "ArrowLeft", " ", "b", "w", "a", "s", "d"].includes(event.key)) { - if (event.preventDefault) event.preventDefault(); - if (event.stopPropagation) event.stopPropagation(); - event.returnValue = false; - event.cancelBubble = true; - return false; - } - }; - document.addEventListener("keydown", eventKeydown, false); - const eventKeypress = function(event) { - if (["ArrowUp", "ArrowDown", "ArrowRight", "ArrowLeft", " ", "w", "a", "s", "d"].includes(event.key)) { - if (event.preventDefault) event.preventDefault(); - if (event.stopPropagation) event.stopPropagation(); - event.returnValue = false; - event.cancelBubble = true; - return false; - } - }; - document.addEventListener("keypress", eventKeypress, false); - const eventKeyup = function(event) { - that.keysPressed[event.key] = false; - if (["ArrowUp", "ArrowDown", "ArrowRight", "ArrowLeft", " ", "b", "w", "a", "s", "d"].includes(event.key)) { - if (event.preventDefault) event.preventDefault(); - if (event.stopPropagation) event.stopPropagation(); - event.returnValue = false; - event.cancelBubble = true; - return false; - } - }; - document.addEventListener("keyup", eventKeyup, false); - this.ctx.clear = function() { - this.clearRect(0, 0, w, h); - }; - this.ctx.clear(); - this.ctx.drawLine = function(xFrom, yFrom, xTo, yTo) { - this.beginPath(); - this.moveTo(xFrom, yFrom); - this.lineTo(xTo, yTo); - this.lineTo(xTo + 1, yTo + 1); - this.closePath(); - this.fill(); - }; - this.ctx.tracePoly = function(verts) { - this.beginPath(); - this.moveTo(verts[0][0], verts[0][1]); - for (let i = 1; i < verts.length; i++) - this.lineTo(verts[i][0], verts[i][1]); - this.closePath(); - }; - this.ctx.drawPlayer = function() { - this.save(); - this.translate(that.pos.x, that.pos.y); - this.rotate(that.dir.angle()); - this.tracePoly(playerVerts); - this.fillStyle = "white"; - this.fill(); - this.tracePoly(playerVerts); - this.stroke(); - this.restore(); - }; - this.ctx.drawBullets = function(bullets) { - for (let i = 0; i < bullets.length; i++) { - this.beginPath(); - this.arc(bullets[i].pos.x, bullets[i].pos.y, bulletRadius, 0, Math.PI * 2, true); - this.closePath(); - this.fill(); - } - }; - const randomParticleColor = function() { - return (["red", "yellow"])[random(0, 1)]; - }; - this.ctx.drawParticles = function(particles) { - const oldColor = this.fillStyle; - for (let i = 0; i < particles.length; i++) { - this.fillStyle = randomParticleColor(); - this.drawLine(particles[i].pos.x, particles[i].pos.y, particles[i].pos.x - particles[i].dir.x * 10, particles[i].pos.y - particles[i].dir.y * 10); - } - this.fillStyle = oldColor; - }; - this.ctx.drawFlames = function(flame) { - this.save(); - this.translate(that.pos.x, that.pos.y); - this.rotate(that.dir.angle()); - const oldColor = this.strokeStyle; - this.strokeStyle = "red"; - this.tracePoly(flame.r); - this.stroke(); - this.strokeStyle = "yellow"; - this.tracePoly(flame.y); - this.stroke(); - this.strokeStyle = oldColor; - this.restore(); - } - addParticles(this.pos); - document.body.classList.add("ASTEROIDSYEAH"); - let lastUpdate = new Date().getTime(); - function updateFunc() { - that.update.call(that); - }; - setTimeout(updateFunc, 1000 / FPS); - this.update = function() { - let forceChange = false; - const nowTime = new Date().getTime(); - const tDelta = (nowTime - lastUpdate) / 1000; - lastUpdate = nowTime; - let drawFlame = false; - if (nowTime - this.updated.flame > 50) { - createFlames(); - this.updated.flame = nowTime; - } - this.scrollPos.x = window.pageXOffset || document.documentElement.scrollLeft; - this.scrollPos.y = window.pageYOffset || document.documentElement.scrollTop; - if ((this.keysPressed["ArrowUp"]) || (this.keysPressed["w"])) { - this.vel.add(this.dir.mulNew(acc * tDelta)); - drawFlame = true; - } else { - this.vel.mul(0.96); - } - if ((this.keysPressed["ArrowLeft"]) || (this.keysPressed["a"])) { - forceChange = true; - this.dir.rotate(radians(rotSpeed * tDelta * -1)); - } - if ((this.keysPressed["ArrowRight"]) || (this.keysPressed["d"])) { - forceChange = true; - this.dir.rotate(radians(rotSpeed * tDelta)); - } - if (this.keysPressed[" "] && nowTime - this.firedAt > timeBetweenFire) { - this.bullets.unshift({ - dir: this.dir.cp(), - pos: this.pos.cp(), - startVel: this.vel.cp(), - cameAlive: nowTime - }); - this.firedAt = nowTime; - if (this.bullets.length > maxBullets) { - this.bullets.pop(); - } - } - if (this.keysPressed["b"]) { - if (!this.updated.enemies) { - updateEnemyIndex(); - this.updated.enemies = true; - } - forceChange = true; - this.updated.blink.time += tDelta * 1000; - if (this.updated.blink.time > timeBetweenBlink) { - this.toggleBlinkStyle(); - this.updated.blink.time = 0; - } - } else { - this.updated.enemies = false; - } - if (this.keysPressed["Escape"]) { - destroy.apply(this); - return; - } - if (this.vel.len() > maxSpeed) { - this.vel.setLength(maxSpeed); - } - this.pos.add(this.vel.mulNew(tDelta)); - if (this.pos.x > w) { - window.scrollTo(this.scrollPos.x + 50, this.scrollPos.y); - this.pos.x = 0; - } else if (this.pos.x < 0) { - window.scrollTo(this.scrollPos.x - 50, this.scrollPos.y); - this.pos.x = w; - } - if (this.pos.y > h) { - window.scrollTo(this.scrollPos.x, this.scrollPos.y + h * 0.75); - this.pos.y = 0; - } else if (this.pos.y < 0) { - window.scrollTo(this.scrollPos.x, this.scrollPos.y - h * 0.75); - this.pos.y = h; - } - for (let i = this.bullets.length - 1; i >= 0; i--) { - if (nowTime - this.bullets[i].cameAlive > 2000) { - this.bullets.splice(i, 1); - forceChange = true; - continue; - } - const bulletVel = this.bullets[i].dir.setLengthNew(bulletSpeed * tDelta).add(this.bullets[i].startVel.mulNew(tDelta)); - this.bullets[i].pos.add(bulletVel); - boundsCheck(this.bullets[i].pos); - const murdered = getElementFromPoint(this.bullets[i].pos.x, this.bullets[i].pos.y); - if (murdered && murdered.tagName && !(ignoredTypes.includes(murdered.tagName.toUpperCase())) && hasOnlyTextualChildren(murdered) && murdered.className !== "ASTEROIDSYEAH") { - addParticles(this.bullets[i].pos); - this.dying.push(murdered); - this.bullets.splice(i, 1); - continue; - } - } - if (this.dying.length) { - for (let i = this.dying.length - 1; i >= 0; i--) { - try { - if (this.dying[i].parentNode) window.ASTEROIDS.enemiesKilled++; - this.dying[i].parentNode.removeChild(this.dying[i]); - } catch (e) {} - } - setScore(); - this.dying = []; - } - for (let i = this.particles.length - 1; i >= 0; i--) { - this.particles[i].pos.add(this.particles[i].dir.mulNew(particleSpeed * tDelta * Math.random())); - if (nowTime - this.particles[i].cameAlive > 1000) { - this.particles.splice(i, 1); - forceChange = true; - continue; - } - } - if (forceChange || this.bullets.length !== 0 || this.particles.length !== 0 || !this.pos.is(this.lastPos) || this.vel.len() > 0) { - this.ctx.clear(); - this.ctx.drawPlayer(); - if (drawFlame) this.ctx.drawFlames(that.flame); - if (this.bullets.length) { - this.ctx.drawBullets(this.bullets); - } - if (this.particles.length) { - this.ctx.drawParticles(this.particles); - } - } - this.lastPos = this.pos; - setTimeout(updateFunc, 1000 / FPS); - } - - function destroy() { - document.removeEventListener("keydown", eventKeydown, false); - document.removeEventListener("keypress", eventKeypress, false); - document.removeEventListener("keyup", eventKeyup, false); - window.removeEventListener("resize", eventResize, false); - removeStylesheet("ASTEROIDSYEAHSTYLES"); - document.body.classList.remove("ASTEROIDSYEAH"); - this.gameContainer.parentNode.removeChild(this.gameContainer); - }; -} - -if (!window.ASTEROIDSPLAYERS) window.ASTEROIDSPLAYERS = []; -window.ASTEROIDSPLAYERS.push(new Asteroids()); \ No newline at end of file diff --git a/src/main/resources/static/lib/iconify/3.0.1/iconify.min.js b/src/main/resources/static/lib/iconify/3.0.1/iconify.min.js deleted file mode 100644 index 3e4e20e..0000000 --- a/src/main/resources/static/lib/iconify/3.0.1/iconify.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * (c) Iconify - * - * For the full copyright and license information, please view the license.txt or license.gpl.txt - * files at https://github.com/iconify/iconify - * - * Licensed under MIT. - * - * @license MIT - * @version 3.0.1 - */ -var Iconify=function(e){"use strict";var n=Object.freeze({left:0,top:0,width:16,height:16}),t=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),r=Object.freeze(Object.assign({},n,t)),i=Object.freeze(Object.assign({},r,{body:"",hidden:!1}));function o(e,n){var r=function(e,n){var t={};!e.hFlip!=!n.hFlip&&(t.hFlip=!0),!e.vFlip!=!n.vFlip&&(t.vFlip=!0);var r=((e.rotate||0)+(n.rotate||0))%4;return r&&(t.rotate=r),t}(e,n);for(var o in i)o in t?o in e&&!(o in r)&&(r[o]=t[o]):o in n?r[o]=n[o]:o in e&&(r[o]=e[o]);return r}function a(e,n,t){var r=e.icons,i=e.aliases||Object.create(null),a={};function c(e){a=o(r[e]||i[e],a)}return c(n),t.forEach(c),o(e,a)}function c(e,n){var t=[];if("object"!=typeof e||"object"!=typeof e.icons)return t;e.not_found instanceof Array&&e.not_found.forEach((function(e){n(e,null),t.push(e)}));var r=function(e,n){var t=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);return(n||Object.keys(t).concat(Object.keys(r))).forEach((function e(n){if(t[n])return i[n]=[];if(!(n in i)){i[n]=null;var o=r[n]&&r[n].parent,a=o&&e(o);a&&(i[n]=[o].concat(a))}return i[n]})),i}(e);for(var i in r){var o=r[i];o&&(n(i,a(e,i,o)),t.push(i))}return t}var u=/^[a-z0-9]+(-[a-z0-9]+)*$/,s=function(e,n,t,r){void 0===r&&(r="");var i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){var o=i.pop(),a=i.pop(),c={provider:i.length>0?i[0]:r,prefix:a,name:o};return n&&!f(c)?null:c}var u=i[0],s=u.split("-");if(s.length>1){var d={provider:r,prefix:s.shift(),name:s.join("-")};return n&&!f(d)?null:d}if(t&&""===r){var l={provider:r,prefix:"",name:u};return n&&!f(l,t)?null:l}return null},f=function(e,n){return!!e&&!(""!==e.provider&&!e.provider.match(u)||!(n&&""===e.prefix||e.prefix.match(u))||!e.name.match(u))},d=Object.assign({},{provider:"",aliases:{},not_found:{}},n);function l(e,n){for(var t in n)if(t in e&&typeof e[t]!=typeof n[t])return!1;return!0}function v(e){if("object"!=typeof e||null===e)return null;var n=e;if("string"!=typeof n.prefix||!e.icons||"object"!=typeof e.icons)return null;if(!l(e,d))return null;var t=n.icons;for(var r in t){var o=t[r];if(!r.match(u)||"string"!=typeof o.body||!l(o,i))return null}var a=n.aliases||Object.create(null);for(var c in a){var s=a[c],f=s.parent;if(!c.match(u)||"string"!=typeof f||!t[f]&&!a[f]||!l(s,i))return null}return n}var p=Object.create(null);function h(e,n){var t=p[e]||(p[e]=Object.create(null));return t[n]||(t[n]=function(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}(e,n))}function g(e,n){return v(n)?c(n,(function(n,t){t?e.icons[n]=t:e.missing.add(n)})):[]}function b(e,n){var t=[];return("string"==typeof e?[e]:Object.keys(p)).forEach((function(e){("string"==typeof e&&"string"==typeof n?[n]:Object.keys(p[e]||{})).forEach((function(n){var r=h(e,n);t=t.concat(Object.keys(r.icons).map((function(t){return(""!==e?"@"+e+":":"")+n+":"+t})))}))})),t}var m=!1;function y(e){var n="string"==typeof e?s(e,!0,m):e;if(n){var t=h(n.provider,n.prefix),r=n.name;return t.icons[r]||(t.missing.has(r)?null:void 0)}}function x(e,n){var t=s(e,!0,m);return!!t&&function(e,n,t){try{if("string"==typeof t.body)return e.icons[n]=Object.assign({},t),!0}catch(e){}return!1}(h(t.provider,t.prefix),t.name,n)}function j(e,n){if("object"!=typeof e)return!1;if("string"!=typeof n&&(n=e.provider||""),m&&!n&&!e.prefix){var t=!1;return v(e)&&(e.prefix="",c(e,(function(e,n){n&&x(e,n)&&(t=!0)}))),t}var r=e.prefix;return!!f({provider:n,prefix:r,name:"a"})&&!!g(h(n,r),e)}function w(e){return!!y(e)}function O(e){var n=y(e);return n?Object.assign({},r,n):null}var S=Object.freeze({width:null,height:null}),E=Object.freeze(Object.assign({},S,t)),I=/(-?[0-9.]*[0-9]+[0-9.]*)/g,k=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function C(e,n,t){if(1===n)return e;if(t=t||100,"number"==typeof e)return Math.ceil(e*n*t)/t;if("string"!=typeof e)return e;var r=e.split(I);if(null===r||!r.length)return e;for(var i=[],o=r.shift(),a=k.test(o);;){if(a){var c=parseFloat(o);isNaN(c)?i.push(o):i.push(Math.ceil(c*n*t)/t)}else i.push(o);if(void 0===(o=r.shift()))return i.join("");a=!a}}function M(e,n){var t=Object.assign({},r,e),i=Object.assign({},E,n),o={left:t.left,top:t.top,width:t.width,height:t.height},a=t.body;[t,i].forEach((function(e){var n,t=[],r=e.hFlip,i=e.vFlip,c=e.rotate;switch(r?i?c+=2:(t.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),t.push("scale(-1 1)"),o.top=o.left=0):i&&(t.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),t.push("scale(1 -1)"),o.top=o.left=0),c<0&&(c-=4*Math.floor(c/4)),c%=4){case 1:n=o.height/2+o.top,t.unshift("rotate(90 "+n.toString()+" "+n.toString()+")");break;case 2:t.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:n=o.width/2+o.left,t.unshift("rotate(-90 "+n.toString()+" "+n.toString()+")")}c%2==1&&(o.left!==o.top&&(n=o.left,o.left=o.top,o.top=n),o.width!==o.height&&(n=o.width,o.width=o.height,o.height=n)),t.length&&(a=''+a+"")}));var c,u,s=i.width,f=i.height,d=o.width,l=o.height;return null===s?c=C(u=null===f?"1em":"auto"===f?l:f,d/l):(c="auto"===s?d:s,u=null===f?C(c,l/d):"auto"===f?l:f),{attributes:{width:c.toString(),height:u.toString(),viewBox:o.left.toString()+" "+o.top.toString()+" "+d.toString()+" "+l.toString()},body:a}}var T=/\sid="(\S+)"/g,A="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),F=0;function L(e,n){void 0===n&&(n=A);for(var t,r=[];t=T.exec(e);)r.push(t[1]);return r.length?(r.forEach((function(t){var r="function"==typeof n?n(t):n+(F++).toString(),i=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+r+"$3")})),e):e}var P={local:!0,session:!0},N={local:new Set,session:new Set},z=!1;var _="iconify2",D="iconify",$="iconify-count",q="iconify-version",R=36e5;function U(e,n){try{return e.getItem(n)}catch(e){}}function V(e,n,t){try{return e.setItem(n,t),!0}catch(e){}}function H(e,n){try{e.removeItem(n)}catch(e){}}function Q(e,n){return V(e,$,n.toString())}function G(e){return parseInt(U(e,$))||0}var J="undefined"==typeof window?{}:window;function B(e){var n=e+"Storage";try{if(J&&J[n]&&"number"==typeof J[n].length)return J[n]}catch(e){}P[e]=!1}function K(e,n){var t=B(e);if(t){var r=U(t,q);if(r!==_){if(r)for(var i=G(t),o=0;oa&&"string"==typeof o.provider&&"object"==typeof o.data&&"string"==typeof o.data.prefix&&n(o,e))return!0}catch(e){}H(t,r)}},u=G(t),s=u-1;s>=0;s--)c(s)||(s===u-1?(u--,Q(t,u)):N[e].add(s))}}function W(){if(!z)for(var e in z=!0,P)K(e,(function(e){var n=e.data,t=h(e.provider,n.prefix);if(!g(t,n).length)return!1;var r=n.lastModified||-1;return t.lastModifiedCached=t.lastModifiedCached?Math.min(t.lastModifiedCached,r):r,!0}))}function X(e,n){switch(e){case"local":case"session":P[e]=n;break;case"all":for(var t in P)P[t]=n}}var Y=Object.create(null);function Z(e,n){Y[e]=n}function ee(e){return Y[e]||Y[""]}function ne(e){var n;if("string"==typeof e.resources)n=[e.resources];else if(!((n=e.resources)instanceof Array&&n.length))return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}for(var te=Object.create(null),re=["https://api.simplesvg.com","https://api.unisvg.com"],ie=[];re.length>0;)1===re.length||Math.random()>.5?ie.push(re.shift()):ie.push(re.pop());function oe(e,n){var t=ne(n);return null!==t&&(te[e]=t,!0)}function ae(e){return te[e]}te[""]=ne({resources:["https://api.iconify.design"].concat(ie)});var ce=function(){var e;try{if("function"==typeof(e=fetch))return e}catch(e){}}();var ue={prepare:function(e,n,t){var r=[],i=function(e,n){var t,r=ae(e);if(!r)return 0;if(r.maxURL){var i=0;r.resources.forEach((function(e){var n=e;i=Math.max(i,n.length)}));var o=n+".json?icons=";t=r.maxURL-i-r.path.length-o.length}else t=0;return t}(e,n),o="icons",a={type:o,provider:e,prefix:n,icons:[]},c=0;return t.forEach((function(t,u){(c+=t.length+1)>=i&&u>0&&(r.push(a),a={type:o,provider:e,prefix:n,icons:[]},c=t.length),a.icons.push(t)})),r.push(a),r},send:function(e,n,t){if(ce){var r=function(e){if("string"==typeof e){var n=ae(e);if(n)return n.path}return"/"}(n.provider);switch(n.type){case"icons":var i=n.prefix,o=n.icons.join(",");r+=i+".json?"+new URLSearchParams({icons:o}).toString();break;case"custom":var a=n.uri;r+="/"===a.slice(0,1)?a.slice(1):a;break;default:return void t("abort",400)}var c=503;ce(e+r).then((function(e){var n=e.status;if(200===n)return c=501,e.json();setTimeout((function(){t(function(e){return 404===e}(n)?"abort":"next",n)}))})).then((function(e){"object"==typeof e&&null!==e?setTimeout((function(){t("success",e)})):setTimeout((function(){404===e?t("abort",e):t("next",c)}))})).catch((function(){t("next",c)}))}else t("abort",424)}};function se(e,n){e.forEach((function(e){var t=e.loaderCallbacks;t&&(e.loaderCallbacks=t.filter((function(e){return e.id!==n})))}))}var fe=0;var de={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function le(e,n,t,r){var i,o=e.resources.length,a=e.random?Math.floor(Math.random()*o):e.index;if(e.random){var c=e.resources.slice(0);for(i=[];c.length>1;){var u=Math.floor(Math.random()*c.length);i.push(c[u]),c=c.slice(0,u).concat(c.slice(u+1))}i=i.concat(c)}else i=e.resources.slice(a).concat(e.resources.slice(0,a));var s,f=Date.now(),d="pending",l=0,v=null,p=[],h=[];function g(){v&&(clearTimeout(v),v=null)}function b(){"pending"===d&&(d="aborted"),g(),p.forEach((function(e){"pending"===e.status&&(e.status="aborted")})),p=[]}function m(e,n){n&&(h=[]),"function"==typeof e&&h.push(e)}function y(){d="failed",h.forEach((function(e){e(void 0,s)}))}function x(){p.forEach((function(e){"pending"===e.status&&(e.status="aborted")})),p=[]}function j(){if("pending"===d){g();var r=i.shift();if(void 0===r)return p.length?void(v=setTimeout((function(){g(),"pending"===d&&(x(),y())}),e.timeout)):void y();var o={status:"pending",resource:r,callback:function(n,t){!function(n,t,r){var o="success"!==t;switch(p=p.filter((function(e){return e!==n})),d){case"pending":break;case"failed":if(o||!e.dataAfterTimeout)return;break;default:return}if("abort"===t)return s=r,void y();if(o)return s=r,void(p.length||(i.length?j():y()));if(g(),x(),!e.random){var a=e.resources.indexOf(n.resource);-1!==a&&a!==e.index&&(e.index=a)}d="completed",h.forEach((function(e){e(r)}))}(o,n,t)}};p.push(o),l++,v=setTimeout(j,e.rotate),t(r,n,o.callback)}}return"function"==typeof r&&h.push(r),setTimeout(j),function(){return{startTime:f,payload:n,status:d,queriesSent:l,queriesPending:p.length,subscribe:m,abort:b}}}function ve(e){var n=Object.assign({},de,e),t=[];function r(){t=t.filter((function(e){return"pending"===e().status}))}var i={query:function(e,i,o){var a=le(n,e,i,(function(e,n){r(),o&&o(e,n)}));return t.push(a),a},find:function(e){return t.find((function(n){return e(n)}))||null},setIndex:function(e){n.index=e},getIndex:function(){return n.index},cleanup:r};return i}function pe(){}var he=Object.create(null);function ge(e,n,t){var r,i;if("string"==typeof e){var o=ee(e);if(!o)return t(void 0,424),pe;i=o.send;var a=function(e){if(!he[e]){var n=ae(e);if(!n)return;var t={config:n,redundancy:ve(n)};he[e]=t}return he[e]}(e);a&&(r=a.redundancy)}else{var c=ne(e);if(c){r=ve(c);var u=ee(e.resources?e.resources[0]:"");u&&(i=u.send)}}return r&&i?r.query(n,i,t)().abort:(t(void 0,424),pe)}function be(e,n){function t(t){var r;if(P[t]&&(r=B(t))){var i,o=N[t];if(o.size)o.delete(i=Array.from(o).shift());else if(!Q(r,(i=G(r))+1))return;var a={cached:Math.floor(Date.now()/R),provider:e.provider,data:n};return V(r,D+i.toString(),JSON.stringify(a))}}z||W(),n.lastModified&&!function(e,n){var t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(var r in P)K(r,(function(t){var r=t.data;return t.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===n}));return!0}(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&delete(n=Object.assign({},n)).not_found,t("local")||t("session"))}function me(){}function ye(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout((function(){e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout((function(){e.pendingCallbacksFlag=!1;var n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(n.length){var t=!1,r=e.provider,i=e.prefix;n.forEach((function(n){var o=n.icons,a=o.pending.length;o.pending=o.pending.filter((function(n){if(n.prefix!==i)return!0;var a=n.name;if(e.icons[a])o.loaded.push({provider:r,prefix:i,name:a});else{if(!e.missing.has(a))return t=!0,!0;o.missing.push({provider:r,prefix:i,name:a})}return!1})),o.pending.length!==a&&(t||se([e],n.id),n.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),n.abort))}))}})))}(e)})))}var xe=function(e,n){var t,r=function(e,n,t){void 0===n&&(n=!0),void 0===t&&(t=!1);var r=[];return e.forEach((function(e){var i="string"==typeof e?s(e,n,t):e;i&&r.push(i)})),r}(e,!0,("boolean"==typeof t&&(m=t),m)),i=function(e){var n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((function(e,n){return e.provider!==n.provider?e.provider.localeCompare(n.provider):e.prefix!==n.prefix?e.prefix.localeCompare(n.prefix):e.name.localeCompare(n.name)}));var r={provider:"",prefix:"",name:""};return e.forEach((function(e){if(r.name!==e.name||r.prefix!==e.prefix||r.provider!==e.provider){r=e;var i=e.provider,o=e.prefix,a=e.name,c=t[i]||(t[i]=Object.create(null)),u=c[o]||(c[o]=h(i,o)),s={provider:i,prefix:o,name:a};(a in u.icons?n.loaded:""===o||u.missing.has(a)?n.missing:n.pending).push(s)}})),n}(r);if(!i.pending.length){var o=!0;return n&&setTimeout((function(){o&&n(i.loaded,i.missing,i.pending,me)})),function(){o=!1}}var a,c,u=Object.create(null),f=[];return i.pending.forEach((function(e){var n=e.provider,t=e.prefix;if(t!==c||n!==a){a=n,c=t,f.push(h(n,t));var r=u[n]||(u[n]=Object.create(null));r[t]||(r[t]=[])}})),i.pending.forEach((function(e){var n=e.provider,t=e.prefix,r=e.name,i=h(n,t),o=i.pendingIcons||(i.pendingIcons=new Set);o.has(r)||(o.add(r),u[n][t].push(r))})),f.forEach((function(e){var n=e.provider,t=e.prefix;u[n][t].length&&function(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout((function(){e.iconsQueueFlag=!1;var n,t=e.provider,r=e.prefix,i=e.iconsToLoad;delete e.iconsToLoad,i&&(n=ee(t))&&n.prepare(t,r,i).forEach((function(n){ge(t,n,(function(t){if("object"!=typeof t)n.icons.forEach((function(n){e.missing.add(n)}));else try{var r=g(e,t);if(!r.length)return;var i=e.pendingIcons;i&&r.forEach((function(e){i.delete(e)})),be(e,t)}catch(e){console.error(e)}ye(e)}))}))})))}(e,u[n][t])})),n?function(e,n,t){var r=fe++,i=se.bind(null,t,r);if(!n.pending.length)return i;var o={id:r,icons:n,callback:e,abort:i};return t.forEach((function(e){(e.loaderCallbacks||(e.loaderCallbacks=[])).push(o)})),i}(n,i,f):me},je=function(e){return new Promise((function(n,t){var i="string"==typeof e?s(e,!0):e;i?xe([i||e],(function(o){if(o.length&&i){var a=y(i);if(a)return void n(Object.assign({},r,a))}t(e)})):t(e)}))};function we(e,n){var t=Object.assign({},e);for(var r in n){var i=n[r],o=typeof i;r in S?(null===i||i&&("string"===o||"number"===o))&&(t[r]=i):o===typeof t[r]&&(t[r]="rotate"===r?i%4:i)}return t}var Oe=Object.assign({},E,{inline:!1}),Se="iconify-inline",Ee="iconifyData"+Date.now(),Ie=[];function ke(e){for(var n=0;n0||"attributes"===i.type&&void 0!==i.target[Ee])return void(t.paused||Fe(e))}}}function Pe(e,n){e.observer.instance.observe(n,Ae)}function Ne(e){var n=e.observer;if(!n||!n.instance){var t="function"==typeof e.node?e.node():e.node;t&&window&&(n||(n={paused:0},e.observer=n),n.instance=new window.MutationObserver(Le.bind(null,e)),Pe(e,t),n.paused||Fe(e))}}function ze(){Me().forEach(Ne)}function _e(e){if(e.observer){var n=e.observer;n.pendingScan&&(clearTimeout(n.pendingScan),delete n.pendingScan),n.instance&&(n.instance.disconnect(),delete n.instance)}}function De(e){var n=null!==Te;Te!==e&&(Te=e,n&&Me().forEach(_e)),n?ze():function(e){var n=document;n.readyState&&"loading"!==n.readyState?e():n.addEventListener("DOMContentLoaded",e)}(ze)}function $e(e){(e?[e]:Me()).forEach((function(e){if(e.observer){var n=e.observer;if(n.paused++,!(n.paused>1)&&n.instance)n.instance.disconnect()}else e.observer={paused:1}}))}function qe(e){if(e){var n=ke(e);n&&$e(n)}else $e()}function Re(e){(e?[e]:Me()).forEach((function(e){if(e.observer){var n=e.observer;if(n.paused&&(n.paused--,!n.paused)){var t="function"==typeof e.node?e.node():e.node;if(!t)return;n.instance?Pe(e,t):Ne(e)}}else Ne(e)}))}function Ue(e){if(e){var n=ke(e);n&&Re(n)}else Re()}function Ve(e,n){void 0===n&&(n=!1);var t=Ce(e,n);return Ne(t),t}function He(e){var n=ke(e);n&&(_e(n),function(e){Ie=Ie.filter((function(n){return e!==n&&e!==("function"==typeof n.node?n.node():n.node)}))}(e))}var Qe=/[\s,]+/;var Ge=["width","height"],Je=["inline","hFlip","vFlip"];function Be(e){var n=e.getAttribute("data-icon"),t="string"==typeof n&&s(n,!0);if(!t)return null;var r=Object.assign({},Oe,{inline:e.classList&&e.classList.contains(Se)});Ge.forEach((function(n){var t=e.getAttribute("data-"+n);t&&(r[n]=t)}));var i=e.getAttribute("data-rotate");"string"==typeof i&&(r.rotate=function(e,n){void 0===n&&(n=0);var t=e.replace(/^-?[0-9.]*/,"");function r(e){for(;e<0;)e+=4;return e%4}if(""===t){var i=parseInt(e);return isNaN(i)?0:r(i)}if(t!==e){var o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){var a=parseFloat(e.slice(0,e.length-t.length));return isNaN(a)?0:(a/=o)%1==0?r(a):0}}return n}(i));var o=e.getAttribute("data-flip");"string"==typeof o&&function(e,n){n.split(Qe).forEach((function(n){switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}}))}(r,o),Je.forEach((function(n){var t="data-"+n,i=function(e,n){return e===n||"true"===e||""!==e&&"false"!==e&&null}(e.getAttribute(t),t);"boolean"==typeof i&&(r[n]=i)}));var a=e.getAttribute("data-mode");return{name:n,icon:t,customisations:r,mode:a}}function Ke(e,n){var t=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var r in n)t+=" "+r+'="'+n[r]+'"';return'"+e+""}function We(e){var n=new Set(["iconify"]);return["provider","prefix"].forEach((function(t){e[t]&&n.add("iconify--"+e[t])})),n}function Xe(e,n,t,r){var i=e.classList;if(r){var o=r.classList;Array.from(o).forEach((function(e){i.add(e)}))}var a=[];return n.forEach((function(e){i.contains(e)?t.has(e)&&a.push(e):(i.add(e),a.push(e))})),t.forEach((function(e){n.has(e)||i.remove(e)})),a}function Ye(e,n,t){var r=e.style;(t||[]).forEach((function(e){r.removeProperty(e)}));var i=[];for(var o in n)r.getPropertyValue(o)||(i.push(o),r.setProperty(o,n[o]));return i}function Ze(e,n,t){var r;try{r=document.createElement("span")}catch(n){return e}var i=n.customisations,o=M(t,i),a=e[Ee],c=Ke(L(o.body),Object.assign({},{"aria-hidden":"true",role:"img"},o.attributes));r.innerHTML=c;for(var u=r.childNodes[0],s=e.attributes,f=0;f/g,"%3E").replace(/\s+/g," ")+'")'),d=Object.assign({},{"--svg":f,width:sn(a.width),height:sn(a.height)},en,r?nn:tn);var l;i.inline&&(d["vertical-align"]="-0.125em");var v=Ye(e,d,c&&c.addedStyles),p=Object.assign({},n,{status:"loaded",addedClasses:s,addedStyles:v});e[Ee]=p}(n,t,Object.assign({},r,i),c)}Ze(n,t,i)}}));var o=function(e){var n=t[e],r=function(t){var r=n[t];xe(Array.from(r).map((function(n){return{provider:e,prefix:t,name:n}})),dn)};for(var i in n)r(i)};for(var a in t)o(a)}function vn(e,n,t){void 0===t&&(t=!1);var r=y(e);if(!r)return null;var i=s(e),o=we(Oe,n||{}),a=Ze(document.createElement("span"),{name:e,icon:i,customisations:o},r);return t?a.outerHTML:a}function pn(){return"3.0.1"}function hn(e,n){return vn(e,n,!1)}function gn(e,n){return vn(e,n,!0)}function bn(e,n){var t=y(e);return t?M(t,we(Oe,n||{})):null}function mn(e){e?function(e){var n=ke(e);n?ln(n):ln({node:e,temporary:!0},!0)}(e):ln()}if("undefined"!=typeof document&&"undefined"!=typeof window){!function(){if(document.documentElement)return Ce(document.documentElement);Ie.push({node:function(){return document.documentElement}})}();var yn=window;if(void 0!==yn.IconifyPreload){var xn=yn.IconifyPreload,jn="Invalid IconifyPreload syntax.";"object"==typeof xn&&null!==xn&&(xn instanceof Array?xn:[xn]).forEach((function(e){try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!j(e))&&console.error(jn)}catch(e){console.error(jn)}}))}setTimeout((function(){De(ln),ln()}))}function wn(e,n){X(e,!1!==n)}function On(e){X(e,!0)}if(Z("",ue),"undefined"!=typeof document&&"undefined"!=typeof window){W();var Sn=window;if(void 0!==Sn.IconifyProviders){var En=Sn.IconifyProviders;if("object"==typeof En&&null!==En)for(var In in En){var kn="IconifyProviders["+In+"] is invalid.";try{var Cn=En[In];if("object"!=typeof Cn||!Cn||void 0===Cn.resources)continue;oe(In,Cn)||console.error(kn)}catch(e){console.error(kn)}}}}var Mn={getAPIConfig:ae,setAPIModule:Z,sendAPIQuery:ge,setFetch:function(e){ce=e},getFetch:function(){return ce},listAPIProviders:function(){return Object.keys(te)}},Tn={_api:Mn,addAPIProvider:oe,loadIcons:xe,loadIcon:je,iconExists:w,getIcon:O,listIcons:b,addIcon:x,addCollection:j,replaceIDs:L,calculateSize:C,buildIcon:M,getVersion:pn,renderSVG:hn,renderHTML:gn,renderIcon:bn,scan:mn,observe:Ve,stopObserving:He,pauseObserver:qe,resumeObserver:Ue,enableCache:wn,disableCache:On};return e._api=Mn,e.addAPIProvider=oe,e.addCollection=j,e.addIcon=x,e.buildIcon=M,e.calculateSize=C,e.default=Tn,e.disableCache=On,e.enableCache=wn,e.getIcon=O,e.getVersion=pn,e.iconExists=w,e.listIcons=b,e.loadIcon=je,e.loadIcons=xe,e.observe=Ve,e.pauseObserver=qe,e.renderHTML=gn,e.renderIcon=bn,e.renderSVG=hn,e.replaceIDs=L,e.resumeObserver=Ue,e.scan=mn,e.stopObserving=He,Object.defineProperty(e,"__esModule",{value:!0}),e}({});if("object"==typeof exports)try{for(var key in exports.__esModule=!0,exports.default=Iconify,Iconify)exports[key]=Iconify[key]}catch(e){}try{void 0===self.Iconify&&(self.Iconify=Iconify)}catch(e){} diff --git a/src/main/resources/static/lib/live2d/live2d.min.js b/src/main/resources/static/lib/live2d/live2d.min.js deleted file mode 100644 index 8915e1d..0000000 --- a/src/main/resources/static/lib/live2d/live2d.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){function i(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,i),o.l=!0,o.exports}var e={};i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=4)}([function(t,i,e){"use strict";function r(){this.live2DModel=null,this.modelMatrix=null,this.eyeBlink=null,this.physics=null,this.pose=null,this.debugMode=!1,this.initialized=!1,this.updating=!1,this.alpha=1,this.accAlpha=0,this.lipSync=!1,this.lipSyncValue=0,this.accelX=0,this.accelY=0,this.accelZ=0,this.dragX=0,this.dragY=0,this.startTimeMSec=null,this.mainMotionManager=new h,this.expressionManager=new h,this.motions={},this.expressions={},this.isTexLoaded=!1}function o(){AMotion.prototype.constructor.call(this),this.paramList=new Array}function n(){this.id="",this.type=-1,this.value=null}function s(){this.nextBlinkTime=null,this.stateStartTime=null,this.blinkIntervalMsec=null,this.eyeState=g.STATE_FIRST,this.blinkIntervalMsec=4e3,this.closingMotionMsec=100,this.closedMotionMsec=50,this.openingMotionMsec=150,this.closeIfZero=!0,this.eyeID_L="PARAM_EYE_L_OPEN",this.eyeID_R="PARAM_EYE_R_OPEN"}function _(){this.tr=new Float32Array(16),this.identity()}function a(t,i){_.prototype.constructor.call(this),this.width=t,this.height=i}function h(){MotionQueueManager.prototype.constructor.call(this),this.currentPriority=null,this.reservePriority=null,this.super=MotionQueueManager.prototype}function l(){this.physicsList=new Array,this.startTimeMSec=UtSystem.getUserTimeMSec()}function $(){this.lastTime=0,this.lastModel=null,this.partsGroups=new Array}function u(t){this.paramIndex=-1,this.partsIndex=-1,this.link=null,this.id=t}function p(){this.EPSILON=.01,this.faceTargetX=0,this.faceTargetY=0,this.faceX=0,this.faceY=0,this.faceVX=0,this.faceVY=0,this.lastTimeSec=0}function f(){_.prototype.constructor.call(this),this.screenLeft=null,this.screenRight=null,this.screenTop=null,this.screenBottom=null,this.maxLeft=null,this.maxRight=null,this.maxTop=null,this.maxBottom=null,this.max=Number.MAX_VALUE,this.min=0}function c(){}var d=0;r.prototype.getModelMatrix=function(){return this.modelMatrix},r.prototype.setAlpha=function(t){t>.999&&(t=1),t<.001&&(t=0),this.alpha=t},r.prototype.getAlpha=function(){return this.alpha},r.prototype.isInitialized=function(){return this.initialized},r.prototype.setInitialized=function(t){this.initialized=t},r.prototype.isUpdating=function(){return this.updating},r.prototype.setUpdating=function(t){this.updating=t},r.prototype.getLive2DModel=function(){return this.live2DModel},r.prototype.setLipSync=function(t){this.lipSync=t},r.prototype.setLipSyncValue=function(t){this.lipSyncValue=t},r.prototype.setAccel=function(t,i,e){this.accelX=t,this.accelY=i,this.accelZ=e},r.prototype.setDrag=function(t,i){this.dragX=t,this.dragY=i},r.prototype.getMainMotionManager=function(){return this.mainMotionManager},r.prototype.getExpressionManager=function(){return this.expressionManager},r.prototype.loadModelData=function(t,i){var e=c.getPlatformManager();this.debugMode&&e.log("Load model : "+t);var r=this;e.loadLive2DModel(t,function(t){if(r.live2DModel=t,r.live2DModel.saveParam(),0!=Live2D.getError())return void console.error("Error : Failed to loadModelData().");r.modelMatrix=new a(r.live2DModel.getCanvasWidth(),r.live2DModel.getCanvasHeight()),r.modelMatrix.setWidth(2),r.modelMatrix.setCenterPosition(0,0),i(r.live2DModel)})},r.prototype.loadTexture=function(t,i,e){d++;var r=c.getPlatformManager();this.debugMode&&r.log("Load Texture : "+i);var o=this;r.loadTexture(this.live2DModel,t,i,function(){d--,0==d&&(o.isTexLoaded=!0),"function"==typeof e&&e()})},r.prototype.loadMotion=function(t,i,e){var r=c.getPlatformManager();this.debugMode&&r.log("Load Motion : "+i);var o=null,n=this;r.loadBytes(i,function(i){o=Live2DMotion.loadMotion(i),null!=t&&(n.motions[t]=o),e(o)})},r.prototype.loadExpression=function(t,i,e){var r=c.getPlatformManager();this.debugMode&&r.log("Load Expression : "+i);var n=this;r.loadBytes(i,function(i){null!=t&&(n.expressions[t]=o.loadJson(i)),"function"==typeof e&&e()})},r.prototype.loadPose=function(t,i){var e=c.getPlatformManager();this.debugMode&&e.log("Load Pose : "+t);var r=this;try{e.loadBytes(t,function(t){r.pose=$.load(t),"function"==typeof i&&i()})}catch(t){console.warn(t)}},r.prototype.loadPhysics=function(t){var i=c.getPlatformManager();this.debugMode&&i.log("Load Physics : "+t);var e=this;try{i.loadBytes(t,function(t){e.physics=l.load(t)})}catch(t){console.warn(t)}},r.prototype.hitTestSimple=function(t,i,e){if(null===this.live2DModel)return!1;var r=this.live2DModel.getDrawDataIndex(t);if(r<0)return!1;for(var o=this.live2DModel.getTransformedPoints(r),n=this.live2DModel.getCanvasWidth(),s=0,_=this.live2DModel.getCanvasHeight(),a=0,h=0;hs&&(s=l),$<_&&(_=$),$>a&&(a=$)}var u=this.modelMatrix.invertTransformX(i),p=this.modelMatrix.invertTransformY(e);return n<=u&&u<=s&&_<=p&&p<=a},r.prototype.hitTestSimpleCustom=function(t,i,e,r){return null!==this.live2DModel&&(e>=t[0]&&e<=i[0]&&r<=t[1]&&r>=i[1])},o.prototype=new AMotion,o.EXPRESSION_DEFAULT="DEFAULT",o.TYPE_SET=0,o.TYPE_ADD=1,o.TYPE_MULT=2,o.loadJson=function(t){var i=new o,e=c.getPlatformManager(),r=e.jsonParseFromBytes(t);if(i.setFadeIn(parseInt(r.fade_in)>0?parseInt(r.fade_in):1e3),i.setFadeOut(parseInt(r.fade_out)>0?parseInt(r.fade_out):1e3),null==r.params)return i;var s=r.params,_=s.length;i.paramList=[];for(var a=0;a<_;a++){var h=s[a],l=h.id.toString(),$=parseFloat(h.val),u=o.TYPE_ADD,p=null!=h.calc?h.calc.toString():"add";if((u="add"===p?o.TYPE_ADD:"mult"===p?o.TYPE_MULT:"set"===p?o.TYPE_SET:o.TYPE_ADD)==o.TYPE_ADD){var f=null==h.def?0:parseFloat(h.def);$-=f}else if(u==o.TYPE_MULT){var f=null==h.def?1:parseFloat(h.def);0==f&&(f=1),$/=f}var d=new n;d.id=l,d.type=u,d.value=$,i.paramList.push(d)}return i},o.prototype.updateParamExe=function(t,i,e,r){for(var n=this.paramList.length-1;n>=0;--n){var s=this.paramList[n];s.type==o.TYPE_ADD?t.addToParamFloat(s.id,s.value,e):s.type==o.TYPE_MULT?t.multParamFloat(s.id,s.value,e):s.type==o.TYPE_SET&&t.setParamFloat(s.id,s.value,e)}},s.prototype.calcNextBlink=function(){return UtSystem.getUserTimeMSec()+Math.random()*(2*this.blinkIntervalMsec-1)},s.prototype.setInterval=function(t){this.blinkIntervalMsec=t},s.prototype.setEyeMotion=function(t,i,e){this.closingMotionMsec=t,this.closedMotionMsec=i,this.openingMotionMsec=e},s.prototype.updateParam=function(t){var i,e=UtSystem.getUserTimeMSec(),r=0;switch(this.eyeState){case g.STATE_CLOSING:r=(e-this.stateStartTime)/this.closingMotionMsec,r>=1&&(r=1,this.eyeState=g.STATE_CLOSED,this.stateStartTime=e),i=1-r;break;case g.STATE_CLOSED:r=(e-this.stateStartTime)/this.closedMotionMsec,r>=1&&(this.eyeState=g.STATE_OPENING,this.stateStartTime=e),i=0;break;case g.STATE_OPENING:r=(e-this.stateStartTime)/this.openingMotionMsec,r>=1&&(r=1,this.eyeState=g.STATE_INTERVAL,this.nextBlinkTime=this.calcNextBlink()),i=r;break;case g.STATE_INTERVAL:this.nextBlinkTime=t)&&(!(this.currentPriority>=t)&&(this.reservePriority=t,!0))},h.prototype.setReservePriority=function(t){this.reservePriority=t},h.prototype.updateParam=function(t){var i=MotionQueueManager.prototype.updateParam.call(this,t);return this.isFinished()&&(this.currentPriority=0),i},h.prototype.startMotionPrio=function(t,i){return i==this.reservePriority&&(this.reservePriority=0),this.currentPriority=i,this.startMotion(t,!1)},l.load=function(t){for(var i=new l,e=c.getPlatformManager(),r=e.jsonParseFromBytes(t),o=r.physics_hair,n=o.length,s=0;s=0)break;r=n,o=t.getPartsOpacity(s),o+=e/.5,o>1&&(o=1)}}r<0&&(r=0,o=1);for(var n=0;n.15&&(a=1-.15/(1-o)),h>a&&(h=a),t.setPartsOpacity(s,h)}}},$.prototype.copyOpacityOtherParts=function(t,i){for(var e=0;eo)&&(l*=o/u,$*=o/u,u=o),this.faceVX+=l,this.faceVY+=$;var f=.5*(Math.sqrt(o*o+16*o*_-8*o*_)-o),c=Math.sqrt(this.faceVX*this.faceVX+this.faceVY*this.faceVY);c>f&&(this.faceVX*=f/c,this.faceVY*=f/c),this.faceX+=this.faceVX,this.faceY+=this.faceVY}},f.prototype=new _,f.prototype.getMaxScale=function(){return this.max},f.prototype.getMinScale=function(){return this.min},f.prototype.setMaxScale=function(t){this.max=t},f.prototype.setMinScale=function(t){this.min=t},f.prototype.isMaxScale=function(){return this.getScaleX()==this.max},f.prototype.isMinScale=function(){return this.getScaleX()==this.min},f.prototype.adjustTranslate=function(t,i){this.tr[0]*this.maxLeft+(this.tr[12]+t)>this.screenLeft&&(t=this.screenLeft-this.tr[0]*this.maxLeft-this.tr[12]),this.tr[0]*this.maxRight+(this.tr[12]+t)this.screenBottom&&(i=this.screenBottom-this.tr[5]*this.maxBottom-this.tr[13]);var e=[1,0,0,0,0,1,0,0,0,0,1,0,t,i,0,1];_.mul(e,this.tr,this.tr)},f.prototype.adjustScale=function(t,i,e){var r=e*this.tr[0];r0&&(e=this.min/this.tr[0]):r>this.max&&this.tr[0]>0&&(e=this.max/this.tr[0]);var o=[1,0,0,0,0,1,0,0,0,0,1,0,t,i,0,1],n=[e,0,0,0,0,e,0,0,0,0,1,0,0,0,0,1],s=[1,0,0,0,0,1,0,0,0,0,1,0,-t,-i,0,1];_.mul(s,this.tr,this.tr),_.mul(n,this.tr,this.tr),_.mul(o,this.tr,this.tr)},f.prototype.setScreenRect=function(t,i,e,r){this.screenLeft=t,this.screenRight=i,this.screenTop=r,this.screenBottom=e},f.prototype.setMaxScreenRect=function(t,i,e,r){this.maxLeft=t,this.maxRight=i,this.maxTop=r,this.maxBottom=e},f.prototype.getScreenLeft=function(){return this.screenLeft},f.prototype.getScreenRight=function(){return this.screenRight},f.prototype.getScreenBottom=function(){return this.screenBottom},f.prototype.getScreenTop=function(){return this.screenTop},f.prototype.getMaxLeft=function(){return this.maxLeft},f.prototype.getMaxRight=function(){return this.maxRight},f.prototype.getMaxBottom=function(){return this.maxBottom},f.prototype.getMaxTop=function(){return this.maxTop},c.platformManager=null,c.getPlatformManager=function(){return c.platformManager},c.setPlatformManager=function(t){c.platformManager=t},t.exports={L2DTargetPoint:p,Live2DFramework:c,L2DViewMatrix:f,L2DPose:$,L2DPartsParam:u,L2DPhysics:l,L2DMotionManager:h,L2DModelMatrix:a,L2DMatrix44:_,EYE_STATE:g,L2DEyeBlink:s,L2DExpressionParam:n,L2DExpressionMotion:o,L2DBaseModel:r}},function(t,i,e){"use strict";var r={DEBUG_LOG:!1,DEBUG_MOUSE_LOG:!1,DEBUG_DRAW_HIT_AREA:!1,DEBUG_DRAW_ALPHA_MODEL:!1,VIEW_MAX_SCALE:2,VIEW_MIN_SCALE:.8,VIEW_LOGICAL_LEFT:-1,VIEW_LOGICAL_RIGHT:1,VIEW_LOGICAL_MAX_LEFT:-2,VIEW_LOGICAL_MAX_RIGHT:2,VIEW_LOGICAL_MAX_BOTTOM:-2,VIEW_LOGICAL_MAX_TOP:2,PRIORITY_NONE:0,PRIORITY_IDLE:1,PRIORITY_SLEEPY:2,PRIORITY_NORMAL:3,PRIORITY_FORCE:4,MOTION_GROUP_IDLE:"idle",MOTION_GROUP_SLEEPY:"sleepy",MOTION_GROUP_TAP_BODY:"tap_body",MOTION_GROUP_FLICK_HEAD:"flick_head",MOTION_GROUP_PINCH_IN:"pinch_in",MOTION_GROUP_PINCH_OUT:"pinch_out",MOTION_GROUP_SHAKE:"shake",HIT_AREA_HEAD:"head",HIT_AREA_BODY:"body"};t.exports=r},function(t,i,e){"use strict";function r(t){n=t}function o(){return n}Object.defineProperty(i,"__esModule",{value:!0}),i.setContext=r,i.getContext=o;var n=void 0},function(t,i,e){"use strict";function r(){}r.matrixStack=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.depth=0,r.currentMatrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.tmp=new Array(16),r.reset=function(){this.depth=0},r.loadIdentity=function(){for(var t=0;t<16;t++)this.currentMatrix[t]=t%5==0?1:0},r.push=function(){var t=(this.depth,16*(this.depth+1));this.matrixStack.lengthe.left&&i.y>e.top)return i;var o=t.x-i.x,n=t.y-i.y,s=r(o,n);i.xat.frameBuffers.length&&(this.curFrameNo=this.getMaskRenderTexture()),this.tmpModelToViewMatrix=new R,this.tmpMatrix2=new R,this.tmpMatrixForMask=new R,this.tmpMatrixForDraw=new R,this.CHANNEL_COLORS=new Array;var i=new A;i=new A,i.r=0,i.g=0,i.b=0,i.a=1,this.CHANNEL_COLORS.push(i),i=new A,i.r=1,i.g=0,i.b=0,i.a=0,this.CHANNEL_COLORS.push(i),i=new A,i.r=0,i.g=1,i.b=0,i.a=0,this.CHANNEL_COLORS.push(i),i=new A,i.r=0,i.g=0,i.b=1,i.a=0,this.CHANNEL_COLORS.push(i);for(var e=0;eG._$T7){t._$NP|=i._$4s;throw new lt("_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : "+G._$T7+" < _$f0 : "+r+" )@_$SS#loadModel()\n")}var h=o._$nP();if(r>=G._$s7){var l=o._$9T(),$=o._$9T();if(-30584!=l||-30584!=$)throw t._$NP|=i._$0s,new lt("_$gi _$C _$li , _$0 _$6 _$Ui.")}t._$KS(h);var u=t.getModelContext();u.setDrawParam(t.getDrawParam()),u.init()}catch(t){_._$Rb(t)}},i.prototype._$KS=function(t){this._$MT=t},i.prototype.getModelImpl=function(){return null==this._$MT&&(this._$MT=new p,this._$MT._$zP()),this._$MT},i.prototype.getCanvasWidth=function(){return null==this._$MT?0:this._$MT.getCanvasWidth()},i.prototype.getCanvasHeight=function(){return null==this._$MT?0:this._$MT.getCanvasHeight()},i.prototype.getParamFloat=function(t){return"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),this._$5S.getParamFloat(t)},i.prototype.setParamFloat=function(t,i,e){"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),arguments.length<3&&(e=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)*(1-e)+i*e)},i.prototype.addToParamFloat=function(t,i,e){"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),arguments.length<3&&(e=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)+i*e)},i.prototype.multParamFloat=function(t,i,e){"number"!=typeof t&&(t=this._$5S.getParamIndex(u.getID(t))),arguments.length<3&&(e=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)*(1+(i-1)*e))},i.prototype.getParamIndex=function(t){return this._$5S.getParamIndex(u.getID(t))},i.prototype.loadParam=function(){this._$5S.loadParam()},i.prototype.saveParam=function(){this._$5S.saveParam()},i.prototype.init=function(){this._$5S.init()},i.prototype.update=function(){this._$5S.update()},i.prototype._$Rs=function(){return _._$li("_$60 _$PT _$Rs()"),-1},i.prototype._$Ds=function(t){_._$li("_$60 _$PT _$SS#_$Ds() \n")},i.prototype._$K2=function(){},i.prototype.draw=function(){},i.prototype.getModelContext=function(){return this._$5S},i.prototype._$s2=function(){return this._$NP},i.prototype._$P7=function(t,i,e,r){var o=-1,n=0,s=this;if(0!=e)if(1==t.length){var _=t[0],a=0!=s.getParamFloat(_),h=i[0],l=s.getPartsOpacity(h),$=e/r;a?(l+=$)>1&&(l=1):(l-=$)<0&&(l=0),s.setPartsOpacity(h,l)}else{for(var u=0;u=0)break;o=u;var h=i[u];n=s.getPartsOpacity(h),n+=e/r,n>1&&(n=1)}}o<0&&(console.log("No _$wi _$q0/ _$U default[%s]",t[0]),o=0,n=1,s.loadParam(),s.setParamFloat(t[o],n),s.saveParam());for(var u=0;u.15&&(f=1-.15/(1-n)),c>f&&(c=f),s.setPartsOpacity(h,c)}}}else for(var u=0;u=this._$5S._$aS.length)return null;var i=this._$5S._$aS[t];return null!=i&&i.getType()==W._$wb&&i instanceof $t?i.getIndexArray():null},e.CHANNEL_COUNT=4,e.RENDER_TEXTURE_USE_MIPMAP=!1,e.NOT_USED_FRAME=-100,e.prototype._$L7=function(){if(this.tmpModelToViewMatrix&&(this.tmpModelToViewMatrix=null),this.tmpMatrix2&&(this.tmpMatrix2=null),this.tmpMatrixForMask&&(this.tmpMatrixForMask=null),this.tmpMatrixForDraw&&(this.tmpMatrixForDraw=null),this.tmpBoundsOnModel&&(this.tmpBoundsOnModel=null),this.CHANNEL_COLORS){for(var t=this.CHANNEL_COLORS.length-1;t>=0;--t)this.CHANNEL_COLORS.splice(t,1);this.CHANNEL_COLORS=[]}this.releaseShader()},e.prototype.releaseShader=function(){for(var t=at.frameBuffers.length,i=0;i0){var n=i.gl.getParameter(i.gl.FRAMEBUFFER_BINDING),s=new Array(4);s[0]=0,s[1]=0,s[2]=i.gl.canvas.width,s[3]=i.gl.canvas.height,i.gl.viewport(0,0,at.clippingMaskBufferSize,at.clippingMaskBufferSize),this.setupLayoutBounds(e),i.gl.bindFramebuffer(i.gl.FRAMEBUFFER,at.frameBuffers[this.curFrameNo].framebuffer),i.gl.clearColor(0,0,0,0),i.gl.clear(i.gl.COLOR_BUFFER_BIT);for(var r=0;rr?e:r,n=o,s=o,_=0,a=0,h=i.clippedDrawContextList.length,l=0;l_&&(_=S),v>a&&(a=v)}}if(n==o)i.allClippedDrawRect.x=0,i.allClippedDrawRect.y=0,i.allClippedDrawRect.width=0,i.allClippedDrawRect.height=0,i.isUsing=!1;else{var L=_-n,M=a-s;i.allClippedDrawRect.x=n,i.allClippedDrawRect.y=s,i.allClippedDrawRect.width=L,i.allClippedDrawRect.height=M,i.isUsing=!0}},e.prototype.setupLayoutBounds=function(t){var i=t/e.CHANNEL_COUNT,r=t%e.CHANNEL_COUNT;i=~~i,r=~~r;for(var o=0,n=0;n=1)return 1;var p=r,f=p*p;return l*(p*f)+$*f+u*p+0},s.prototype._$a0=function(){},s.prototype.setFadeIn=function(t){this._$dP=t},s.prototype.setFadeOut=function(t){this._$eo=t},s.prototype._$pT=function(t){this._$V0=t},s.prototype.getFadeOut=function(){return this._$eo},s.prototype._$4T=function(){return this._$eo},s.prototype._$mT=function(){return this._$V0},s.prototype.getDurationMSec=function(){return-1},s.prototype.getLoopDurationMSec=function(){return-1},s.prototype.updateParam=function(t,i){if(i._$AT&&!i._$9L){var e=w.getUserTimeMSec();if(i._$z2<0){i._$z2=e,i._$bs=e;var r=this.getDurationMSec();i._$Do<0&&(i._$Do=r<=0?-1:i._$z2+r)}var o=this._$V0;o=o*(0==this._$dP?1:ht._$r2((e-i._$bs)/this._$dP))*(0==this._$eo||i._$Do<0?1:ht._$r2((i._$Do-e)/this._$eo)),0<=o&&o<=1||console.log("### assert!! ### "),this.updateParamExe(t,e,o,i),i._$Do>0&&i._$Do0?console.log("\n"):e%8==0&&e>0&&console.log(" "),console.log("%02X ",255&t[e]);console.log("\n")},_._$nr=function(t,i,e){console.log("%s\n",t);for(var r=i.length,o=0;o=0;--r){this._$lL[r]._$oP(t,this)}this._$oo(t,e),this._$M2=this._$Yb(),this._$9b=(this._$M2-this._$ks)/e,this._$ks=this._$M2}for(var r=this._$qP.length-1;r>=0;--r){this._$qP[r]._$YS(t,this)}this._$iT=i},f.prototype._$oo=function(t,i){i<.033&&(i=.033);var e=1/i;this.p1.vx=(this.p1.x-this.p1._$s0)*e,this.p1.vy=(this.p1.y-this.p1._$70)*e,this.p1.ax=(this.p1.vx-this.p1._$7L)*e,this.p1.ay=(this.p1.vy-this.p1._$HL)*e,this.p1.fx=this.p1.ax*this.p1._$p,this.p1.fy=this.p1.ay*this.p1._$p,this.p1._$xT();var r,o,n=-Math.atan2(this.p1.y-this.p2.y,this.p1.x-this.p2.x),s=Math.cos(n),_=Math.sin(n),a=9.8*this.p2._$p,h=this._$Db*Lt._$bS,l=a*Math.cos(n-h);r=l*_,o=l*s;var $=-this.p1.fx*_*_,u=-this.p1.fy*_*s,p=-this.p2.vx*this._$L2,f=-this.p2.vy*this._$L2;this.p2.fx=r+$+p,this.p2.fy=o+u+f,this.p2.ax=this.p2.fx/this.p2._$p,this.p2.ay=this.p2.fy/this.p2._$p,this.p2.vx+=this.p2.ax*i,this.p2.vy+=this.p2.ay*i,this.p2.x+=this.p2.vx*i,this.p2.y+=this.p2.vy*i;var c=Math.sqrt((this.p1.x-this.p2.x)*(this.p1.x-this.p2.x)+(this.p1.y-this.p2.y)*(this.p1.y-this.p2.y));this.p2.x=this.p1.x+this._$Fo*(this.p2.x-this.p1.x)/c,this.p2.y=this.p1.y+this._$Fo*(this.p2.y-this.p1.y)/c,this.p2.vx=(this.p2.x-this.p2._$s0)*e,this.p2.vy=(this.p2.y-this.p2._$70)*e,this.p2._$xT()},c.prototype._$xT=function(){this._$s0=this.x,this._$70=this.y,this._$7L=this.vx,this._$HL=this.vy},d.prototype._$oP=function(t,i){},g.prototype=new d,g.prototype._$oP=function(t,i){var e=this.scale*t.getParamFloat(this._$wL),r=i.getPhysicsPoint1();switch(this._$tL){default:case f.Src.SRC_TO_X:r.x=r.x+(e-r.x)*this._$V0;break;case f.Src.SRC_TO_Y:r.y=r.y+(e-r.y)*this._$V0;break;case f.Src.SRC_TO_G_ANGLE:var o=i._$qr();o+=(e-o)*this._$V0,i._$pr(o)}},y.prototype._$YS=function(t,i){},T.prototype=new y,T.prototype._$YS=function(t,i){switch(this._$YP){default:case f.Target.TARGET_FROM_ANGLE:t.setParamFloat(this._$wL,this.scale*i._$5r(),this._$V0);break;case f.Target.TARGET_FROM_ANGLE_V:t.setParamFloat(this._$wL,this.scale*i._$Cs(),this._$V0)}},f.Src=function(){},f.Src.SRC_TO_X="SRC_TO_X",f.Src.SRC_TO_Y="SRC_TO_Y",f.Src.SRC_TO_G_ANGLE="SRC_TO_G_ANGLE",f.Target=function(){},f.Target.TARGET_FROM_ANGLE="TARGET_FROM_ANGLE",f.Target.TARGET_FROM_ANGLE_V="TARGET_FROM_ANGLE_V",P.prototype.init=function(t){this._$fL=t._$fL,this._$gL=t._$gL,this._$B0=t._$B0,this._$z0=t._$z0,this._$qT=t._$qT,this.reflectX=t.reflectX,this.reflectY=t.reflectY},P.prototype._$F0=function(t){this._$fL=t._$_T(),this._$gL=t._$_T(),this._$B0=t._$_T(),this._$z0=t._$_T(),this._$qT=t._$_T(),t.getFormatVersion()>=G.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this.reflectX=t._$po(),this.reflectY=t._$po())},P.prototype._$e=function(){};var It=function(){};It._$ni=function(t,i,e,r,o,n,s,_,a){var h=s*n-_*o;if(0==h)return null;var l,$=((t-e)*n-(i-r)*o)/h;return l=0!=o?(t-e-$*s)/o:(i-r-$*_)/n,isNaN(l)&&(l=(t-e-$*s)/o,isNaN(l)&&(l=(i-r-$*_)/n),isNaN(l)&&(console.log("a is NaN @UtVector#_$ni() "),console.log("v1x : "+o),console.log("v1x != 0 ? "+(0!=o)))),null==a?new Array(l,$):(a[0]=l,a[1]=$,a)},S.prototype._$8P=function(){return this.x+.5*this.width},S.prototype._$6P=function(){return this.y+.5*this.height},S.prototype._$EL=function(){return this.x+this.width},S.prototype._$5T=function(){return this.y+this.height},S.prototype._$jL=function(t,i,e,r){this.x=t,this.y=i,this.width=e,this.height=r},S.prototype._$jL=function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},S.prototype.contains=function(t,i){return this.x<=this.x&&this.y<=this.y&&this.x<=this.x+this.width&&this.y<=this.y+this.height},S.prototype.expand=function(t,i){this.x-=t,this.y-=i,this.width+=2*t,this.height+=2*i},v._$Z2=function(t,i,e,r){var o=i._$Q2(t,e),n=t._$vs(),s=t._$Tr();if(i._$zr(n,s,o),o<=0)return r[n[0]];if(1==o){var _=r[n[0]],a=r[n[1]],h=s[0];return _+(a-_)*h|0}if(2==o){var _=r[n[0]],a=r[n[1]],l=r[n[2]],$=r[n[3]],h=s[0],u=s[1],p=_+(a-_)*h|0,f=l+($-l)*h|0;return p+(f-p)*u|0}if(3==o){var c=r[n[0]],d=r[n[1]],g=r[n[2]],y=r[n[3]],m=r[n[4]],T=r[n[5]],P=r[n[6]],S=r[n[7]],h=s[0],u=s[1],v=s[2],_=c+(d-c)*h|0,a=g+(y-g)*h|0,l=m+(T-m)*h|0,$=P+(S-P)*h|0,p=_+(a-_)*u|0,f=l+($-l)*u|0;return p+(f-p)*v|0}if(4==o){var L=r[n[0]],M=r[n[1]],E=r[n[2]],A=r[n[3]],I=r[n[4]],w=r[n[5]],x=r[n[6]],O=r[n[7]],D=r[n[8]],R=r[n[9]],b=r[n[10]],F=r[n[11]],C=r[n[12]],N=r[n[13]],B=r[n[14]],U=r[n[15]],h=s[0],u=s[1],v=s[2],G=s[3],c=L+(M-L)*h|0,d=E+(A-E)*h|0,g=I+(w-I)*h|0,y=x+(O-x)*h|0,m=D+(R-D)*h|0,T=b+(F-b)*h|0,P=C+(N-C)*h|0,S=B+(U-B)*h|0,_=c+(d-c)*u|0,a=g+(y-g)*u|0,l=m+(T-m)*u|0,$=P+(S-P)*u|0,p=_+(a-_)*v|0,f=l+($-l)*v|0;return p+(f-p)*G|0}for(var Y=1<=G._$T7?(this.clipID=t._$nP(),this.clipIDList=this.convertClipIDForV2_11(this.clipID)):this.clipIDList=[],this._$MS(this._$Lb)},M.prototype.getClipIDList=function(){return this.clipIDList},M.prototype.init=function(t){},M.prototype._$Nr=function(t,i){if(i._$IS[0]=!1,i._$Us=v._$Z2(t,this._$GS,i._$IS,this._$Lb),at._$Zs);else if(i._$IS[0])return;i._$7s=v._$br(t,this._$GS,i._$IS,this._$mS)},M.prototype._$2b=function(t,i){},M.prototype.getDrawDataID=function(){return this._$gP},M.prototype._$j2=function(t){this._$gP=t},M.prototype.getOpacity=function(t,i){return i._$7s},M.prototype._$zS=function(t,i){return i._$Us},M.prototype._$MS=function(t){for(var i=t.length-1;i>=0;--i){var e=t[i];eM._$R2&&(M._$R2=e)}},M.prototype.getTargetBaseDataID=function(){return this._$dr},M.prototype._$gs=function(t){this._$dr=t},M.prototype._$32=function(){return null!=this._$dr&&this._$dr!=yt._$2o()},M.prototype.preDraw=function(t,i,e){},M.prototype.draw=function(t,i,e){},M.prototype.getType=function(){},M.prototype._$B2=function(t,i,e){},E._$ps=32,E.CLIPPING_PROCESS_NONE=0,E.CLIPPING_PROCESS_OVERWRITE_ALPHA=1,E.CLIPPING_PROCESS_MULTIPLY_ALPHA=2,E.CLIPPING_PROCESS_DRAW=3,E.CLIPPING_PROCESS_CLEAR_ALPHA=4,E.prototype.setChannelFlagAsColor=function(t,i){this.CHANNEL_COLORS[t]=i},E.prototype.getChannelFlagAsColor=function(t){return this.CHANNEL_COLORS[t]},E.prototype._$ZT=function(){},E.prototype._$Uo=function(t,i,e,r,o,n,s){},E.prototype._$Rs=function(){return-1},E.prototype._$Ds=function(t){},E.prototype.setBaseColor=function(t,i,e,r){t<0?t=0:t>1&&(t=1),i<0?i=0:i>1&&(i=1),e<0?e=0:e>1&&(e=1),r<0?r=0:r>1&&(r=1),this._$lT=t,this._$C0=i,this._$tT=e,this._$WL=r},E.prototype._$WP=function(t){this.culling=t},E.prototype.setMatrix=function(t){for(var i=0;i<16;i++)this.matrix4x4[i]=t[i]},E.prototype._$IT=function(){return this.matrix4x4},E.prototype.setPremultipliedAlpha=function(t){this.premultipliedAlpha=t},E.prototype.isPremultipliedAlpha=function(){return this.premultipliedAlpha},E.prototype.setAnisotropy=function(t){this.anisotropy=t},E.prototype.getAnisotropy=function(){return this.anisotropy},E.prototype.getClippingProcess=function(){return this.clippingProcess},E.prototype.setClippingProcess=function(t){this.clippingProcess=t},E.prototype.setClipBufPre_clipContextForMask=function(t){this.clipBufPre_clipContextMask=t},E.prototype.getClipBufPre_clipContextMask=function(){return this.clipBufPre_clipContextMask},E.prototype.setClipBufPre_clipContextForDraw=function(t){this.clipBufPre_clipContextDraw=t},E.prototype.getClipBufPre_clipContextDraw=function(){return this.clipBufPre_clipContextDraw},I._$ur=-2,I._$c2=1,I._$_b=2,I.prototype._$F0=function(t){this._$kP=t._$nP(),this._$dr=t._$nP()},I.prototype.readV2_opacity=function(t){t.getFormatVersion()>=G.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this._$mS=t._$Tb())},I.prototype.init=function(t){},I.prototype._$Nr=function(t,i){},I.prototype.interpolateOpacity=function(t,i,e,r){null==this._$mS?e.setInterpolatedOpacity(1):e.setInterpolatedOpacity(v._$br(t,i,r,this._$mS))},I.prototype._$2b=function(t,i){},I.prototype._$nb=function(t,i,e,r,o,n,s){},I.prototype.getType=function(){},I.prototype._$gs=function(t){this._$dr=t},I.prototype._$a2=function(t){this._$kP=t},I.prototype.getTargetBaseDataID=function(){return this._$dr},I.prototype.getBaseDataID=function(){return this._$kP},I.prototype._$32=function(){return null!=this._$dr&&this._$dr!=yt._$2o()},w._$W2=0,w._$CS=w._$W2,w._$Mo=function(){return!0},w._$XP=function(t){try{for(var i=getTimeMSec();getTimeMSec()-i=t.length)return!1;for(var o=i;o=0;--e){var r=this._$Ob[e].getParamIndex(i);if(r==x._$ds&&(r=t.getParamIndex(this._$Ob[e].getParamID())),t._$Xb(r))return!0}return!1},D.prototype._$Q2=function(t,i){for(var e,r,o=this._$Ob.length,n=t._$v2(),s=0,_=0;_U._$Qb&&console.log("err 23245\n");for(var o=this._$Ob.length,n=1,s=1,_=0,a=0;a=0;--n)e[n]=o[n]}else this.mult_fast(t,i,e,r)},R.prototype.mult_fast=function(t,i,e,r){r?(e[0]=t[0]*i[0]+t[4]*i[1]+t[8]*i[2],e[4]=t[0]*i[4]+t[4]*i[5]+t[8]*i[6],e[8]=t[0]*i[8]+t[4]*i[9]+t[8]*i[10],e[12]=t[0]*i[12]+t[4]*i[13]+t[8]*i[14]+t[12],e[1]=t[1]*i[0]+t[5]*i[1]+t[9]*i[2],e[5]=t[1]*i[4]+t[5]*i[5]+t[9]*i[6],e[9]=t[1]*i[8]+t[5]*i[9]+t[9]*i[10],e[13]=t[1]*i[12]+t[5]*i[13]+t[9]*i[14]+t[13],e[2]=t[2]*i[0]+t[6]*i[1]+t[10]*i[2],e[6]=t[2]*i[4]+t[6]*i[5]+t[10]*i[6],e[10]=t[2]*i[8]+t[6]*i[9]+t[10]*i[10],e[14]=t[2]*i[12]+t[6]*i[13]+t[10]*i[14]+t[14],e[3]=e[7]=e[11]=0,e[15]=1):(e[0]=t[0]*i[0]+t[4]*i[1]+t[8]*i[2]+t[12]*i[3],e[4]=t[0]*i[4]+t[4]*i[5]+t[8]*i[6]+t[12]*i[7],e[8]=t[0]*i[8]+t[4]*i[9]+t[8]*i[10]+t[12]*i[11],e[12]=t[0]*i[12]+t[4]*i[13]+t[8]*i[14]+t[12]*i[15],e[1]=t[1]*i[0]+t[5]*i[1]+t[9]*i[2]+t[13]*i[3],e[5]=t[1]*i[4]+t[5]*i[5]+t[9]*i[6]+t[13]*i[7],e[9]=t[1]*i[8]+t[5]*i[9]+t[9]*i[10]+t[13]*i[11],e[13]=t[1]*i[12]+t[5]*i[13]+t[9]*i[14]+t[13]*i[15],e[2]=t[2]*i[0]+t[6]*i[1]+t[10]*i[2]+t[14]*i[3],e[6]=t[2]*i[4]+t[6]*i[5]+t[10]*i[6]+t[14]*i[7],e[10]=t[2]*i[8]+t[6]*i[9]+t[10]*i[10]+t[14]*i[11],e[14]=t[2]*i[12]+t[6]*i[13]+t[10]*i[14]+t[14]*i[15],e[3]=t[3]*i[0]+t[7]*i[1]+t[11]*i[2]+t[15]*i[3],e[7]=t[3]*i[4]+t[7]*i[5]+t[11]*i[6]+t[15]*i[7],e[11]=t[3]*i[8]+t[7]*i[9]+t[11]*i[10]+t[15]*i[11],e[15]=t[3]*i[12]+t[7]*i[13]+t[11]*i[14]+t[15]*i[15])},R.prototype.translate=function(t,i,e){this.m[12]=this.m[0]*t+this.m[4]*i+this.m[8]*e+this.m[12],this.m[13]=this.m[1]*t+this.m[5]*i+this.m[9]*e+this.m[13],this.m[14]=this.m[2]*t+this.m[6]*i+this.m[10]*e+this.m[14],this.m[15]=this.m[3]*t+this.m[7]*i+this.m[11]*e+this.m[15]},R.prototype.scale=function(t,i,e){this.m[0]*=t,this.m[4]*=i,this.m[8]*=e,this.m[1]*=t,this.m[5]*=i,this.m[9]*=e,this.m[2]*=t,this.m[6]*=i,this.m[10]*=e,this.m[3]*=t,this.m[7]*=i,this.m[11]*=e},R.prototype.rotateX=function(t){var i=Lt.fcos(t),e=Lt._$9(t),r=this.m[4];this.m[4]=r*i+this.m[8]*e,this.m[8]=r*-e+this.m[8]*i,r=this.m[5],this.m[5]=r*i+this.m[9]*e,this.m[9]=r*-e+this.m[9]*i,r=this.m[6],this.m[6]=r*i+this.m[10]*e,this.m[10]=r*-e+this.m[10]*i,r=this.m[7],this.m[7]=r*i+this.m[11]*e,this.m[11]=r*-e+this.m[11]*i},R.prototype.rotateY=function(t){var i=Lt.fcos(t),e=Lt._$9(t),r=this.m[0];this.m[0]=r*i+this.m[8]*-e,this.m[8]=r*e+this.m[8]*i,r=this.m[1],this.m[1]=r*i+this.m[9]*-e,this.m[9]=r*e+this.m[9]*i,r=m[2],this.m[2]=r*i+this.m[10]*-e,this.m[10]=r*e+this.m[10]*i,r=m[3],this.m[3]=r*i+this.m[11]*-e,this.m[11]=r*e+this.m[11]*i},R.prototype.rotateZ=function(t){var i=Lt.fcos(t),e=Lt._$9(t),r=this.m[0];this.m[0]=r*i+this.m[4]*e,this.m[4]=r*-e+this.m[4]*i,r=this.m[1],this.m[1]=r*i+this.m[5]*e,this.m[5]=r*-e+this.m[5]*i,r=this.m[2],this.m[2]=r*i+this.m[6]*e,this.m[6]=r*-e+this.m[6]*i,r=this.m[3],this.m[3]=r*i+this.m[7]*e,this.m[7]=r*-e+this.m[7]*i},b.prototype=new et,b._$tP=new Object,b._$27=function(){b._$tP.clear()},b.getID=function(t){var i=b._$tP[t];return null==i&&(i=new b(t),b._$tP[t]=i),i},b.prototype._$3s=function(){return new b},F._$kS=-1,F._$pS=0,F._$hb=1,F.STATE_IDENTITY=0,F._$gb=1,F._$fo=2,F._$go=4,F.prototype.transform=function(t,i,e){var r,o,n,s,_,a,h=0,l=0;switch(this._$hi){default:return;case F._$go|F._$fo|F._$gb:for(r=this._$7,o=this._$H,n=this._$k,s=this._$f,_=this._$g,a=this._$w;--e>=0;){var $=t[h++],u=t[h++];i[l++]=r*$+o*u+n,i[l++]=s*$+_*u+a}return;case F._$go|F._$fo:for(r=this._$7,o=this._$H,s=this._$f,_=this._$g;--e>=0;){var $=t[h++],u=t[h++];i[l++]=r*$+o*u,i[l++]=s*$+_*u}return;case F._$go|F._$gb:for(o=this._$H,n=this._$k,s=this._$f,a=this._$w;--e>=0;){var $=t[h++];i[l++]=o*t[h++]+n,i[l++]=s*$+a}return;case F._$go:for(o=this._$H,s=this._$f;--e>=0;){var $=t[h++];i[l++]=o*t[h++],i[l++]=s*$}return;case F._$fo|F._$gb:for(r=this._$7,n=this._$k,_=this._$g,a=this._$w;--e>=0;)i[l++]=r*t[h++]+n,i[l++]=_*t[h++]+a;return;case F._$fo:for(r=this._$7,_=this._$g;--e>=0;)i[l++]=r*t[h++],i[l++]=_*t[h++];return;case F._$gb:for(n=this._$k,a=this._$w;--e>=0;)i[l++]=t[h++]+n,i[l++]=t[h++]+a;return;case F.STATE_IDENTITY:return void(t==i&&h==l||w._$jT(t,h,i,l,2*e))}},F.prototype.update=function(){0==this._$H&&0==this._$f?1==this._$7&&1==this._$g?0==this._$k&&0==this._$w?(this._$hi=F.STATE_IDENTITY,this._$Z=F._$pS):(this._$hi=F._$gb,this._$Z=F._$hb):0==this._$k&&0==this._$w?(this._$hi=F._$fo,this._$Z=F._$kS):(this._$hi=F._$fo|F._$gb,this._$Z=F._$kS):0==this._$7&&0==this._$g?0==this._$k&&0==this._$w?(this._$hi=F._$go,this._$Z=F._$kS):(this._$hi=F._$go|F._$gb,this._$Z=F._$kS):0==this._$k&&0==this._$w?(this._$hi=F._$go|F._$fo,this._$Z=F._$kS):(this._$hi=F._$go|F._$fo|F._$gb,this._$Z=F._$kS)},F.prototype._$RT=function(t){this._$IT(t);var i=t[0],e=t[2],r=t[1],o=t[3],n=Math.sqrt(i*i+r*r),s=i*o-e*r;0==n?at._$so&&console.log("affine._$RT() / rt==0"):(t[0]=n,t[1]=s/n,t[2]=(r*o+i*e)/s,t[3]=Math.atan2(r,i))},F.prototype._$ho=function(t,i,e,r){var o=new Float32Array(6),n=new Float32Array(6);t._$RT(o),i._$RT(n);var s=new Float32Array(6);s[0]=o[0]+(n[0]-o[0])*e,s[1]=o[1]+(n[1]-o[1])*e,s[2]=o[2]+(n[2]-o[2])*e,s[3]=o[3]+(n[3]-o[3])*e,s[4]=o[4]+(n[4]-o[4])*e,s[5]=o[5]+(n[5]-o[5])*e,r._$CT(s)},F.prototype._$CT=function(t){var i=Math.cos(t[3]),e=Math.sin(t[3]);this._$7=t[0]*i,this._$f=t[0]*e,this._$H=t[1]*(t[2]*i-e),this._$g=t[1]*(t[2]*e+i),this._$k=t[4],this._$w=t[5],this.update()},F.prototype._$IT=function(t){t[0]=this._$7,t[1]=this._$f,t[2]=this._$H,t[3]=this._$g,t[4]=this._$k,t[5]=this._$w},C.prototype=new s,C._$cs="VISIBLE:",C._$ar="LAYOUT:",C._$Co=0,C._$D2=[],C._$1T=1,C.loadMotion=function(t){var i=new C,e=[0],r=t.length;i._$yT=0;for(var o=0;o=0){var a=new B;O.startsWith(t,s,C._$cs)?(a._$RP=B._$hs,a._$4P=new String(t,s,_-s)):O.startsWith(t,s,C._$ar)?(a._$4P=new String(t,s+7,_-s-7),O.startsWith(t,s+7,"ANCHOR_X")?a._$RP=B._$xs:O.startsWith(t,s+7,"ANCHOR_Y")?a._$RP=B._$us:O.startsWith(t,s+7,"SCALE_X")?a._$RP=B._$qs:O.startsWith(t,s+7,"SCALE_Y")?a._$RP=B._$Ys:O.startsWith(t,s+7,"X")?a._$RP=B._$ws:O.startsWith(t,s+7,"Y")&&(a._$RP=B._$Ns)):(a._$RP=B._$Fr,a._$4P=new String(t,s,_-s)),i.motions.push(a);var h=0;for(C._$D2.clear(),o=_+1;o0){C._$D2.push(l),h++;var $=e[0];if($i._$yT&&(i._$yT=h)}}}else{for(var s=o,_=-1;o=0)for(_==s+4&&"f"==t[s+1]&&"p"==t[s+2]&&"s"==t[s+3]&&(u=!0),o=_+1;o0&&u&&5=l?l-1:s];t.setParamFloat($,u)}else if(B._$ws<=h._$RP&&h._$RP<=B._$Ys);else{var p=t.getParamFloat($),f=h._$I0[s>=l?l-1:s],c=h._$I0[s+1>=l?l-1:s+1],d=f+(c-f)*_,g=p+(d-p)*e;t.setParamFloat($,g)}}s>=this._$yT&&(this._$E?(r._$z2=i,this.loopFadeIn&&(r._$bs=i)):r._$9L=!0)},C.prototype._$r0=function(){return this._$E},C.prototype._$aL=function(t){this._$E=t},C.prototype.isLoopFadeIn=function(){return this.loopFadeIn},C.prototype.setLoopFadeIn=function(t){this.loopFadeIn=t},N.prototype.clear=function(){this.size=0},N.prototype.add=function(t){if(this._$P.length<=this.size){var i=new Float32Array(2*this.size);w._$jT(this._$P,0,i,0,this.size),this._$P=i}this._$P[this.size++]=t},N.prototype._$BL=function(){var t=new Float32Array(this.size);return w._$jT(this._$P,0,t,0,this.size),t},B._$Fr=0,B._$hs=1,B._$ws=100,B._$Ns=101,B._$xs=102,B._$us=103,B._$qs=104,B._$Ys=105,U._$Ms=1,U._$Qs=2,U._$i2=0,U._$No=2,U._$do=U._$Ms,U._$Ls=!0,U._$1r=5,U._$Qb=65,U._$J=1e-4,U._$FT=.001,U._$Ss=3,G._$o7=6,G._$S7=7,G._$s7=8,G._$77=9,G.LIVE2D_FORMAT_VERSION_V2_10_SDK2=10,G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1=11,G._$T7=G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1,G._$Is=-2004318072,G._$h0=0,G._$4L=23,G._$7P=33,G._$uT=function(t){console.log("_$bo :: _$6 _$mo _$E0 : %d\n",t)},G._$9o=function(t){if(t<40)return G._$uT(t),null;if(t<50)return G._$uT(t),null;if(t<60)return G._$uT(t),null;if(t<100)switch(t){case 65:return new Z;case 66:return new D;case 67:return new x;case 68:return new z;case 69:return new P;case 70:return new $t;default:return G._$uT(t),null}else if(t<150)switch(t){case 131:return new st;case 133:return new tt;case 136:return new p;case 137:return new ot;case 142:return new j}return G._$uT(t),null},Y._$HP=0,Y._$_0=!0;Y._$V2=-1,Y._$W0=-1,Y._$jr=!1,Y._$ZS=!0,Y._$tr=-1e6,Y._$lr=1e6,Y._$is=32,Y._$e=!1,Y.prototype.getDrawDataIndex=function(t){for(var i=this._$aS.length-1;i>=0;--i)if(null!=this._$aS[i]&&this._$aS[i].getDrawDataID()==t)return i;return-1},Y.prototype.getDrawData=function(t){if(t instanceof b){if(null==this._$Bo){this._$Bo=new Object;for(var i=this._$aS.length,e=0;e0&&this.release();for(var t=this._$Ri.getModelImpl(),i=t._$Xr(),r=i.length,o=new Array,n=new Array,s=0;s=0)&&(this._$3S.push(m),this._$db.push(n[s]),o[s]=null,y=!0)}}if(!y)break}var P=t._$E2();if(null!=P){var S=P._$1s();if(null!=S)for(var v=S.length,s=0;s=0;i--)this._$Js[i]=Y._$jr;return this._$QT=!1,Y._$e&&_.dump("_$eL"),!1},Y.prototype.preDraw=function(t){null!=this.clipManager&&(t._$ZT(),this.clipManager.setupClip(this,t))},Y.prototype.draw=function(t){if(null==this._$Ws)return void _._$li("call _$Ri.update() before _$Ri.draw() ");var i=this._$Ws.length;t._$ZT();for(var e=0;e=0;--i)if(this._$pb[i]==t)return i;return this._$02(t,0,Y._$tr,Y._$lr)},Y.prototype._$BS=function(t){return this.getBaseDataIndex(t)},Y.prototype.getBaseDataIndex=function(t){for(var i=this._$3S.length-1;i>=0;--i)if(null!=this._$3S[i]&&this._$3S[i].getBaseDataID()==t)return i;return-1},Y.prototype._$UT=function(t,i){var e=new Float32Array(i);return w._$jT(t,0,e,0,t.length),e},Y.prototype._$02=function(t,i,e,r){if(this._$qo>=this._$pb.length){var o=this._$pb.length,n=new Array(2*o);w._$jT(this._$pb,0,n,0,o),this._$pb=n,this._$_2=this._$UT(this._$_2,2*o),this._$vr=this._$UT(this._$vr,2*o),this._$Rr=this._$UT(this._$Rr,2*o),this._$Or=this._$UT(this._$Or,2*o);var s=new Array;w._$jT(this._$Js,0,s,0,o),this._$Js=s}return this._$pb[this._$qo]=t,this._$_2[this._$qo]=i,this._$vr[this._$qo]=i,this._$Rr[this._$qo]=e,this._$Or[this._$qo]=r,this._$Js[this._$qo]=Y._$ZS,this._$qo++},Y.prototype._$Zo=function(t,i){this._$3S[t]=i},Y.prototype.setParamFloat=function(t,i){ithis._$Or[t]&&(i=this._$Or[t]),this._$_2[t]=i},Y.prototype.loadParam=function(){var t=this._$_2.length;t>this._$fs.length&&(t=this._$fs.length),w._$jT(this._$fs,0,this._$_2,0,t)},Y.prototype.saveParam=function(){var t=this._$_2.length;t>this._$fs.length&&(this._$fs=new Float32Array(t)),w._$jT(this._$_2,0,this._$fs,0,t)},Y.prototype._$v2=function(){return this._$co},Y.prototype._$WS=function(){return this._$QT},Y.prototype._$Xb=function(t){return this._$Js[t]==Y._$ZS},Y.prototype._$vs=function(){return this._$Es},Y.prototype._$Tr=function(){return this._$ZP},Y.prototype.getBaseData=function(t){return this._$3S[t]},Y.prototype.getParamFloat=function(t){return this._$_2[t]},Y.prototype.getParamMax=function(t){return this._$Or[t]},Y.prototype.getParamMin=function(t){return this._$Rr[t]},Y.prototype.setPartsOpacity=function(t,i){this._$Hr[t].setPartsOpacity(i)},Y.prototype.getPartsOpacity=function(t){return this._$Hr[t].getPartsOpacity()},Y.prototype.getPartsDataIndex=function(t){for(var i=this._$F2.length-1;i>=0;--i)if(null!=this._$F2[i]&&this._$F2[i]._$p2()==t)return i;return-1},Y.prototype._$q2=function(t){return this._$db[t]},Y.prototype._$C2=function(t){return this._$8b[t]},Y.prototype._$Bb=function(t){return this._$Hr[t]},Y.prototype._$5s=function(t,i){for(var e=this._$Ws.length,r=t,o=0;o0;)n+=i;return r},k._$C=function(t){var i=null,e=null;try{i=t instanceof Array?t:new _$Xs(t,8192),e=new _$js;for(var r,o=new Int8Array(1e3);(r=i.read(o))>0;)e.write(o,0,r);return e._$TS()}finally{null!=t&&t.close(),null!=e&&(e.flush(),e.close())}},V.prototype._$T2=function(){return w.getUserTimeMSec()+Math._$10()*(2*this._$Br-1)},V.prototype._$uo=function(t){this._$Br=t},V.prototype._$QS=function(t,i,e){this._$Dr=t,this._$Cb=i,this._$mr=e},V.prototype._$7T=function(t){var i,e=w.getUserTimeMSec(),r=0;switch(this._$_L){case STATE_CLOSING:r=(e-this._$bb)/this._$Dr,r>=1&&(r=1,this._$_L=wt.STATE_CLOSED,this._$bb=e),i=1-r;break;case STATE_CLOSED:r=(e-this._$bb)/this._$Cb,r>=1&&(this._$_L=wt.STATE_OPENING,this._$bb=e),i=0;break;case STATE_OPENING:r=(e-this._$bb)/this._$mr,r>=1&&(r=1,this._$_L=wt.STATE_INTERVAL,this._$12=this._$T2()),i=r;break;case STATE_INTERVAL:this._$12.9?at.EXPAND_W:0;this.gl.drawElements(a,e,r,o,n,h,this.transform,_)}},X.prototype._$Rs=function(){throw new Error("_$Rs")},X.prototype._$Ds=function(t){throw new Error("_$Ds")},X.prototype._$K2=function(){for(var t=0;t=0;--i){var e=t[i];eW._$R2&&(W._$R2=e)}},W._$or=function(){return W._$52},W._$Pr=function(){return W._$R2},W.prototype._$F0=function(t){this._$gP=t._$nP(),this._$dr=t._$nP(),this._$GS=t._$nP(),this._$qb=t._$6L(),this._$Lb=t._$cS(),this._$mS=t._$Tb(),t.getFormatVersion()>=G._$T7?(this.clipID=t._$nP(),this.clipIDList=this.convertClipIDForV2_11(this.clipID)):this.clipIDList=null,W._$Sb(this._$Lb)},W.prototype.getClipIDList=function(){return this.clipIDList},W.prototype._$Nr=function(t,i){if(i._$IS[0]=!1,i._$Us=v._$Z2(t,this._$GS,i._$IS,this._$Lb),at._$Zs);else if(i._$IS[0])return;i._$7s=v._$br(t,this._$GS,i._$IS,this._$mS)},W.prototype._$2b=function(t){},W.prototype.getDrawDataID=function(){return this._$gP},W.prototype._$j2=function(t){this._$gP=t},W.prototype.getOpacity=function(t,i){return i._$7s},W.prototype._$zS=function(t,i){return i._$Us},W.prototype.getTargetBaseDataID=function(){return this._$dr},W.prototype._$gs=function(t){this._$dr=t},W.prototype._$32=function(){return null!=this._$dr&&this._$dr!=yt._$2o()},W.prototype.getType=function(){},j._$42=0,j.prototype._$1b=function(){return this._$3S},j.prototype.getDrawDataList=function(){return this._$aS},j.prototype._$F0=function(t){this._$NL=t._$nP(),this._$aS=t._$nP(),this._$3S=t._$nP()},j.prototype._$kr=function(t){t._$Zo(this._$3S),t._$xo(this._$aS),this._$3S=null,this._$aS=null},q.prototype=new i,q.loadModel=function(t){var e=new q;return i._$62(e,t),e},q.loadModel=function(t){var e=new q;return i._$62(e,t),e},q._$to=function(){return new q},q._$er=function(t){var i=new _$5("../_$_r/_$t0/_$Ri/_$_P._$d");if(0==i.exists())throw new _$ls("_$t0 _$_ _$6 _$Ui :: "+i._$PL());for(var e=["../_$_r/_$t0/_$Ri/_$_P.512/_$CP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$vP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$EP._$1","../_$_r/_$t0/_$Ri/_$_P.512/_$pP._$1"],r=q.loadModel(i._$3b()),o=0;o=0){var h=new B;O.startsWith(t,_,J._$cs)?(h._$RP=B._$hs,h._$4P=O.createString(t,_,a-_)):O.startsWith(t,_,J._$ar)?(h._$4P=O.createString(t,_+7,a-_-7),O.startsWith(t,_+7,"ANCHOR_X")?h._$RP=B._$xs:O.startsWith(t,_+7,"ANCHOR_Y")?h._$RP=B._$us:O.startsWith(t,_+7,"SCALE_X")?h._$RP=B._$qs:O.startsWith(t,_+7,"SCALE_Y")?h._$RP=B._$Ys:O.startsWith(t,_+7,"X")?h._$RP=B._$ws:O.startsWith(t,_+7,"Y")&&(h._$RP=B._$Ns)):(h._$RP=B._$Fr,h._$4P=O.createString(t,_,a-_)),i.motions.push(h);var l=0,$=[];for(o=a+1;o0){$.push(u),l++;var p=e[0];if(pi._$yT&&(i._$yT=l)}}}else{for(var _=o,a=-1;o=0)for(a==_+4&&"f"==Q(t,_+1)&&"p"==Q(t,_+2)&&"s"==Q(t,_+3)&&(f=!0),o=a+1;o0&&f&&5=l?l-1:s];t.setParamFloat($,u)}else if(B._$ws<=h._$RP&&h._$RP<=B._$Ys);else{var p,f=t.getParamIndex($),c=t.getModelContext(),d=c.getParamMax(f),g=c.getParamMin(f),y=.4*(d-g),m=c.getParamFloat(f),T=h._$I0[s>=l?l-1:s],P=h._$I0[s+1>=l?l-1:s+1];p=Ty||T>P&&T-P>y?T:T+(P-T)*_;var S=m+(p-m)*e;t.setParamFloat($,S)}}s>=this._$yT&&(this._$E?(r._$z2=i,this.loopFadeIn&&(r._$bs=i)):r._$9L=!0),this._$eP=e},J.prototype._$r0=function(){return this._$E},J.prototype._$aL=function(t){this._$E=t},J.prototype._$S0=function(){return this._$D0},J.prototype._$U0=function(t){this._$D0=t},J.prototype.isLoopFadeIn=function(){return this.loopFadeIn},J.prototype.setLoopFadeIn=function(t){this.loopFadeIn=t},N.prototype.clear=function(){this.size=0},N.prototype.add=function(t){if(this._$P.length<=this.size){var i=new Float32Array(2*this.size);w._$jT(this._$P,0,i,0,this.size),this._$P=i}this._$P[this.size++]=t},N.prototype._$BL=function(){var t=new Float32Array(this.size);return w._$jT(this._$P,0,t,0,this.size),t},B._$Fr=0,B._$hs=1,B._$ws=100,B._$Ns=101,B._$xs=102,B._$us=103,B._$qs=104,B._$Ys=105,Z.prototype=new I,Z._$gT=new Array,Z.prototype._$zP=function(){this._$GS=new D,this._$GS._$zP()},Z.prototype._$F0=function(t){I.prototype._$F0.call(this,t),this._$A=t._$6L(),this._$o=t._$6L(),this._$GS=t._$nP(),this._$Eo=t._$nP(),I.prototype.readV2_opacity.call(this,t)},Z.prototype.init=function(t){var i=new K(this),e=(this._$o+1)*(this._$A+1);return null!=i._$Cr&&(i._$Cr=null),i._$Cr=new Float32Array(2*e),null!=i._$hr&&(i._$hr=null),this._$32()?i._$hr=new Float32Array(2*e):i._$hr=null,i},Z.prototype._$Nr=function(t,i){var e=i;if(this._$GS._$Ur(t)){var r=this._$VT(),o=Z._$gT;o[0]=!1,v._$Vr(t,this._$GS,o,r,this._$Eo,e._$Cr,0,2),i._$Ib(o[0]),this.interpolateOpacity(t,this._$GS,i,o)}},Z.prototype._$2b=function(t,i){var e=i;if(e._$hS(!0),this._$32()){var r=this.getTargetBaseDataID();if(e._$8r==I._$ur&&(e._$8r=t.getBaseDataIndex(r)),e._$8r<0)at._$so&&_._$li("_$L _$0P _$G :: %s",r),e._$hS(!1);else{var o=t.getBaseData(e._$8r),n=t._$q2(e._$8r);if(null!=o&&n._$yo()){var s=n.getTotalScale();e.setTotalScale_notForClient(s);var a=n.getTotalOpacity();e.setTotalOpacity(a*e.getInterpolatedOpacity()),o._$nb(t,n,e._$Cr,e._$hr,this._$VT(),0,2),e._$hS(!0)}else e._$hS(!1)}}else e.setTotalOpacity(e.getInterpolatedOpacity())},Z.prototype._$nb=function(t,i,e,r,o,n,s){var _=i,a=null!=_._$hr?_._$hr:_._$Cr;Z.transformPoints_sdk2(e,r,o,n,s,a,this._$o,this._$A)},Z.transformPoints_sdk2=function(i,e,r,o,n,s,_,a){for(var h,l,$,u=r*n,p=0,f=0,c=0,d=0,g=0,y=0,m=!1,T=o;T=1){var b=s[2*(0+a*M)],F=s[2*(0+a*M)+1],C=p-2*c+1*g,N=f-2*d+1*y,x=p+3*g,O=f+3*y,D=p-2*c+3*g,R=f-2*d+3*y,B=.5*(v- -2),U=.5*(L-1);B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else{var G=0|S;G==a&&(G=a-1);var B=.5*(v- -2),U=S-G,Y=G/a,k=(G+1)/a,b=s[2*(0+G*M)],F=s[2*(0+G*M)+1],x=s[2*(0+(G+1)*M)],O=s[2*(0+(G+1)*M)+1],C=p-2*c+Y*g,N=f-2*d+Y*y,D=p-2*c+k*g,R=f-2*d+k*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(1<=v)if(L<=0){var D=s[2*(_+0*M)],R=s[2*(_+0*M)+1],x=p+3*c,O=f+3*d,C=p+1*c-2*g,N=f+1*d-2*y,b=p+3*c-2*g,F=f+3*d-2*y,B=.5*(v-1),U=.5*(L- -2);B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(L>=1){var C=s[2*(_+a*M)],N=s[2*(_+a*M)+1],b=p+3*c+1*g,F=f+3*d+1*y,D=p+1*c+3*g,R=f+1*d+3*y,x=p+3*c+3*g,O=f+3*d+3*y,B=.5*(v-1),U=.5*(L-1);B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else{var G=0|S;G==a&&(G=a-1);var B=.5*(v-1),U=S-G,Y=G/a,k=(G+1)/a,C=s[2*(_+G*M)],N=s[2*(_+G*M)+1],D=s[2*(_+(G+1)*M)],R=s[2*(_+(G+1)*M)+1],b=p+3*c+Y*g,F=f+3*d+Y*y,x=p+3*c+k*g,O=f+3*d+k*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(L<=0){var V=0|P;V==_&&(V=_-1);var B=P-V,U=.5*(L- -2),X=V/_,z=(V+1)/_,D=s[2*(V+0*M)],R=s[2*(V+0*M)+1],x=s[2*(V+1+0*M)],O=s[2*(V+1+0*M)+1],C=p+X*c-2*g,N=f+X*d-2*y,b=p+z*c-2*g,F=f+z*d-2*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else if(L>=1){var V=0|P;V==_&&(V=_-1);var B=P-V,U=.5*(L-1),X=V/_,z=(V+1)/_,C=s[2*(V+a*M)],N=s[2*(V+a*M)+1],b=s[2*(V+1+a*M)],F=s[2*(V+1+a*M)+1],D=p+X*c+3*g,R=f+X*d+3*y,x=p+z*c+3*g,O=f+z*d+3*y;B+U<=1?(e[T]=C+(b-C)*B+(D-C)*U,e[T+1]=N+(F-N)*B+(R-N)*U):(e[T]=x+(D-x)*(1-B)+(b-x)*(1-U),e[T+1]=O+(R-O)*(1-B)+(F-O)*(1-U))}else t.err.printf("_$li calc : %.4f , %.4f\t\t\t\t\t@@BDBoxGrid\n",v,L);else e[T]=p+v*c+L*g,e[T+1]=f+v*d+L*y}else l=P-(0|P),$=S-(0|S),h=2*((0|P)+(0|S)*(_+1)),l+$<1?(e[T]=s[h]*(1-l-$)+s[h+2]*l+s[h+2*(_+1)]*$,e[T+1]=s[h+1]*(1-l-$)+s[h+3]*l+s[h+2*(_+1)+1]*$):(e[T]=s[h+2*(_+1)+2]*(l-1+$)+s[h+2*(_+1)]*(1-l)+s[h+2]*(1-$),e[T+1]=s[h+2*(_+1)+3]*(l-1+$)+s[h+2*(_+1)+1]*(1-l)+s[h+3]*(1-$))}},Z.prototype.transformPoints_sdk1=function(t,i,e,r,o,n,s){for(var _,a,h,l,$,u,p,f=i,c=this._$o,d=this._$A,g=o*s,y=null!=f._$hr?f._$hr:f._$Cr,m=n;m1&&(_=1),a<0?a=0:a>1&&(a=1),_*=c,a*=d,h=0|_,l=0|a,h>c-1&&(h=c-1),l>d-1&&(l=d-1),u=_-h,p=a-l,$=2*(h+l*(c+1))):(_=e[m]*c,a=e[m+1]*d,u=_-(0|_),p=a-(0|a),$=2*((0|_)+(0|a)*(c+1))),u+p<1?(r[m]=y[$]*(1-u-p)+y[$+2]*u+y[$+2*(c+1)]*p,r[m+1]=y[$+1]*(1-u-p)+y[$+3]*u+y[$+2*(c+1)+1]*p):(r[m]=y[$+2*(c+1)+2]*(u-1+p)+y[$+2*(c+1)]*(1-u)+y[$+2]*(1-p),r[m+1]=y[$+2*(c+1)+3]*(u-1+p)+y[$+2*(c+1)+1]*(1-u)+y[$+3]*(1-p))},Z.prototype._$VT=function(){return(this._$o+1)*(this._$A+1)},Z.prototype.getType=function(){return I._$_b},K.prototype=new _t,tt._$42=0,tt.prototype._$zP=function(){this._$3S=new Array,this._$aS=new Array},tt.prototype._$F0=function(t){this._$g0=t._$8L(),this.visible=t._$8L(),this._$NL=t._$nP(),this._$3S=t._$nP(),this._$aS=t._$nP()},tt.prototype.init=function(t){var i=new it(this);return i.setPartsOpacity(this.isVisible()?1:0),i},tt.prototype._$6o=function(t){if(null==this._$3S)throw new Error("_$3S _$6 _$Wo@_$6o");this._$3S.push(t)},tt.prototype._$3o=function(t){if(null==this._$aS)throw new Error("_$aS _$6 _$Wo@_$3o");this._$aS.push(t)},tt.prototype._$Zo=function(t){this._$3S=t},tt.prototype._$xo=function(t){this._$aS=t},tt.prototype.isVisible=function(){return this.visible},tt.prototype._$uL=function(){return this._$g0},tt.prototype._$KP=function(t){this.visible=t},tt.prototype._$ET=function(t){this._$g0=t},tt.prototype.getBaseData=function(){return this._$3S},tt.prototype.getDrawData=function(){return this._$aS},tt.prototype._$p2=function(){return this._$NL},tt.prototype._$ob=function(t){this._$NL=t},tt.prototype.getPartsID=function(){return this._$NL},tt.prototype._$MP=function(t){this._$NL=t},it.prototype=new $,it.prototype.getPartsOpacity=function(){return this._$VS},it.prototype.setPartsOpacity=function(t){this._$VS=t},et._$L7=function(){u._$27(),yt._$27(),b._$27(),l._$27()},et.prototype.toString=function(){return this.id},rt.prototype._$F0=function(t){},ot.prototype._$1s=function(){return this._$4S},ot.prototype._$zP=function(){this._$4S=new Array},ot.prototype._$F0=function(t){this._$4S=t._$nP()},ot.prototype._$Ks=function(t){this._$4S.push(t)},nt.tr=new gt,nt._$50=new gt,nt._$Ti=new Array(0,0),nt._$Pi=new Array(0,0),nt._$B=new Array(0,0),nt.prototype._$lP=function(t,i,e,r){this.viewport=new Array(t,i,e,r)},nt.prototype._$bL=function(){this.context.save();var t=this.viewport;null!=t&&(this.context.beginPath(),this.context._$Li(t[0],t[1],t[2],t[3]),this.context.clip())},nt.prototype._$ei=function(){this.context.restore()},nt.prototype.drawElements=function(t,i,e,r,o,n,s,a){try{o!=this._$Qo&&(this._$Qo=o,this.context.globalAlpha=o);for(var h=i.length,l=t.width,$=t.height,u=this.context,p=this._$xP,f=this._$uP,c=this._$6r,d=this._$3r,g=nt.tr,y=nt._$Ti,m=nt._$Pi,T=nt._$B,P=0;P.02?nt.expandClip(t,i,e,r,l,$,u,p,f,c):nt.clipWithTransform(t,null,o,n,s,_,a,h)},nt.expandClip=function(t,i,e,r,o,n,s,_,a,h){var l=s-o,$=_-n,u=a-o,p=h-n,f=l*p-$*u>0?e:-e,c=-$,d=l,g=a-s,y=h-_,m=-y,T=g,P=Math.sqrt(g*g+y*y),S=-p,v=u,L=Math.sqrt(u*u+p*p),M=o-f*c/r,E=n-f*d/r,A=s-f*c/r,I=_-f*d/r,w=s-f*m/P,x=_-f*T/P,O=a-f*m/P,D=h-f*T/P,R=o+f*S/L,b=n+f*v/L,F=a+f*S/L,C=h+f*v/L,N=nt._$50;return null!=i._$P2(N)&&(nt.clipWithTransform(t,N,M,E,A,I,w,x,O,D,F,C,R,b),!0)},nt.clipWithTransform=function(t,i,e,r,o,n,s,a){if(arguments.length<7)return void _._$li("err : @LDGL.clip()");if(!(arguments[1]instanceof gt))return void _._$li("err : a[0] is _$6 LDTransform @LDGL.clip()");var h=nt._$B,l=i,$=arguments;if(t.beginPath(),l){l._$PS($[2],$[3],h),t.moveTo(h[0],h[1]);for(var u=4;u<$.length;u+=2)l._$PS($[u],$[u+1],h),t.lineTo(h[0],h[1])}else{t.moveTo($[2],$[3]);for(var u=4;u<$.length;u+=2)t.lineTo($[u],$[u+1])}t.clip()},nt.createCanvas=function(t,i){var e=document.createElement("canvas");return e.setAttribute("width",t),e.setAttribute("height",i),e||_._$li("err : "+e),e},nt.dumpValues=function(){for(var t="",i=0;i1?1:.5-.5*Math.cos(t*Lt.PI_F)},lt._$fr=-1,lt.prototype.toString=function(){return this._$ib},$t.prototype=new W,$t._$42=0,$t._$Os=30,$t._$ms=0,$t._$ns=1,$t._$_s=2,$t._$gT=new Array,$t.prototype._$_S=function(t){this._$LP=t},$t.prototype.getTextureNo=function(){return this._$LP},$t.prototype._$ZL=function(){return this._$Qi},$t.prototype._$H2=function(){return this._$JP},$t.prototype.getNumPoints=function(){return this._$d0},$t.prototype.getType=function(){return W._$wb},$t.prototype._$B2=function(t,i,e){var r=i,o=null!=r._$hr?r._$hr:r._$Cr;switch(U._$do){default:case U._$Ms:throw new Error("_$L _$ro ");case U._$Qs:for(var n=this._$d0-1;n>=0;--n)o[n*U._$No+4]=e}},$t.prototype._$zP=function(){this._$GS=new D,this._$GS._$zP()},$t.prototype._$F0=function(t){W.prototype._$F0.call(this,t),this._$LP=t._$6L(),this._$d0=t._$6L(),this._$Yo=t._$6L();var i=t._$nP();this._$BP=new Int16Array(3*this._$Yo);for(var e=3*this._$Yo-1;e>=0;--e)this._$BP[e]=i[e];if(this._$Eo=t._$nP(),this._$Qi=t._$nP(),t.getFormatVersion()>=G._$s7){if(this._$JP=t._$6L(),0!=this._$JP){if(0!=(1&this._$JP)){var r=t._$6L();null==this._$5P&&(this._$5P=new Object),this._$5P._$Hb=parseInt(r)}0!=(this._$JP&$t._$Os)?this._$6s=(this._$JP&$t._$Os)>>1:this._$6s=$t._$ms,0!=(32&this._$JP)&&(this.culling=!1)}}else this._$JP=0},$t.prototype.init=function(t){var i=new ut(this),e=this._$d0*U._$No,r=this._$32();switch(null!=i._$Cr&&(i._$Cr=null),i._$Cr=new Float32Array(e),null!=i._$hr&&(i._$hr=null),i._$hr=r?new Float32Array(e):null,U._$do){default:case U._$Ms:if(U._$Ls)for(var o=this._$d0-1;o>=0;--o){var n=o<<1;this._$Qi[n+1]=1-this._$Qi[n+1]}break;case U._$Qs:for(var o=this._$d0-1;o>=0;--o){var n=o<<1,s=o*U._$No,_=this._$Qi[n],a=this._$Qi[n+1];i._$Cr[s]=_,i._$Cr[s+1]=a,i._$Cr[s+4]=0,r&&(i._$hr[s]=_,i._$hr[s+1]=a,i._$hr[s+4]=0)}}return i},$t.prototype._$Nr=function(t,i){var e=i;if(this!=e._$GT()&&console.log("### assert!! ### "),this._$GS._$Ur(t)&&(W.prototype._$Nr.call(this,t,e),!e._$IS[0])){var r=$t._$gT;r[0]=!1,v._$Vr(t,this._$GS,r,this._$d0,this._$Eo,e._$Cr,U._$i2,U._$No)}},$t.prototype._$2b=function(t,i){try{this!=i._$GT()&&console.log("### assert!! ### ");var e=!1;i._$IS[0]&&(e=!0);var r=i;if(!e&&(W.prototype._$2b.call(this,t),this._$32())){var o=this.getTargetBaseDataID();if(r._$8r==W._$ur&&(r._$8r=t.getBaseDataIndex(o)),r._$8r<0)at._$so&&_._$li("_$L _$0P _$G :: %s",o);else{var n=t.getBaseData(r._$8r),s=t._$q2(r._$8r);null==n||s._$x2()?r._$AT=!1:(n._$nb(t,s,r._$Cr,r._$hr,this._$d0,U._$i2,U._$No),r._$AT=!0),r.baseOpacity=s.getTotalOpacity()}}}catch(t){throw t}},$t.prototype.draw=function(t,i,e){if(this!=e._$GT()&&console.log("### assert!! ### "),!e._$IS[0]){var r=e,o=this._$LP;o<0&&(o=1);var n=this.getOpacity(i,r)*e._$VS*e.baseOpacity,s=null!=r._$hr?r._$hr:r._$Cr;t.setClipBufPre_clipContextForDraw(e.clipBufPre_clipContext),t._$WP(this.culling),t._$Uo(o,3*this._$Yo,this._$BP,s,this._$Qi,n,this._$6s,r)}},$t.prototype.dump=function(){console.log(" _$yi( %d ) , _$d0( %d ) , _$Yo( %d ) \n",this._$LP,this._$d0,this._$Yo),console.log(" _$Oi _$di = { ");for(var t=0;tstartMotion() / start _$K _$3 (m%d)\n",r,e._$sr));if(null==t)return-1;e=new dt,e._$w0=t,this.motions.push(e);var n=e._$sr;return this._$eb&&_._$Ji("MotionQueueManager[size:%2d]->startMotion() / new _$w0 (m%d)\n",r,n),n},ct.prototype.updateParam=function(t){try{for(var i=!1,e=0;eupdateParam() / _$T0 _$w0 (m%d)\n",this.motions.length-1,r._$sr),this.motions.splice(e,1),e--)):(this.motions=this.motions.splice(e,1),e--)}else this.motions.splice(e,1),e--}return i}catch(t){return _._$li(t),!0}},ct.prototype.isFinished=function(t){if(arguments.length>=1){for(var i=0;i.9&&at.EXPAND_W,this.gl);if(null==this.gl)throw new Error("gl is null");var h=1*this._$C0*n,l=1*this._$tT*n,$=1*this._$WL*n,u=this._$lT*n;if(null!=this.clipBufPre_clipContextMask){a.frontFace(a.CCW),a.useProgram(this.shaderProgram),this._$vS=Tt(a,this._$vS,r),this._$no=Pt(a,this._$no,e),a.enableVertexAttribArray(this.a_position_Loc),a.vertexAttribPointer(this.a_position_Loc,2,a.FLOAT,!1,0,0),this._$NT=Tt(a,this._$NT,o),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this.textures[t]),a.uniform1i(this.s_texture0_Loc,1),a.enableVertexAttribArray(this.a_texCoord_Loc),a.vertexAttribPointer(this.a_texCoord_Loc,2,a.FLOAT,!1,0,0),a.uniformMatrix4fv(this.u_matrix_Loc,!1,this.getClipBufPre_clipContextMask().matrixForMask);var p=this.getClipBufPre_clipContextMask().layoutChannelNo,f=this.getChannelFlagAsColor(p);a.uniform4f(this.u_channelFlag,f.r,f.g,f.b,f.a);var c=this.getClipBufPre_clipContextMask().layoutBounds;a.uniform4f(this.u_baseColor_Loc,2*c.x-1,2*c.y-1,2*c._$EL()-1,2*c._$5T()-1),a.uniform1i(this.u_maskFlag_Loc,!0)}else if(null!=this.getClipBufPre_clipContextDraw()){a.useProgram(this.shaderProgramOff),this._$vS=Tt(a,this._$vS,r),this._$no=Pt(a,this._$no,e),a.enableVertexAttribArray(this.a_position_Loc_Off),a.vertexAttribPointer(this.a_position_Loc_Off,2,a.FLOAT,!1,0,0),this._$NT=Tt(a,this._$NT,o),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this.textures[t]),a.uniform1i(this.s_texture0_Loc_Off,1),a.enableVertexAttribArray(this.a_texCoord_Loc_Off),a.vertexAttribPointer(this.a_texCoord_Loc_Off,2,a.FLOAT,!1,0,0),a.uniformMatrix4fv(this.u_clipMatrix_Loc_Off,!1,this.getClipBufPre_clipContextDraw().matrixForDraw),a.uniformMatrix4fv(this.u_matrix_Loc_Off,!1,this.matrix4x4),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,at.fTexture[this.glno]),a.uniform1i(this.s_texture1_Loc_Off,2);var p=this.getClipBufPre_clipContextDraw().layoutChannelNo,f=this.getChannelFlagAsColor(p);a.uniform4f(this.u_channelFlag_Loc_Off,f.r,f.g,f.b,f.a),a.uniform4f(this.u_baseColor_Loc_Off,h,l,$,u)}else a.useProgram(this.shaderProgram),this._$vS=Tt(a,this._$vS,r),this._$no=Pt(a,this._$no,e),a.enableVertexAttribArray(this.a_position_Loc),a.vertexAttribPointer(this.a_position_Loc,2,a.FLOAT,!1,0,0),this._$NT=Tt(a,this._$NT,o),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this.textures[t]),a.uniform1i(this.s_texture0_Loc,1),a.enableVertexAttribArray(this.a_texCoord_Loc),a.vertexAttribPointer(this.a_texCoord_Loc,2,a.FLOAT,!1,0,0),a.uniformMatrix4fv(this.u_matrix_Loc,!1,this.matrix4x4),a.uniform4f(this.u_baseColor_Loc,h,l,$,u),a.uniform1i(this.u_maskFlag_Loc,!1);this.culling?this.gl.enable(a.CULL_FACE):this.gl.disable(a.CULL_FACE),this.gl.enable(a.BLEND);var d,g,y,m;if(null!=this.clipBufPre_clipContextMask)d=a.ONE,g=a.ONE_MINUS_SRC_ALPHA,y=a.ONE,m=a.ONE_MINUS_SRC_ALPHA;else switch(s){case $t._$ms:d=a.ONE,g=a.ONE_MINUS_SRC_ALPHA,y=a.ONE,m=a.ONE_MINUS_SRC_ALPHA;break;case $t._$ns:d=a.ONE,g=a.ONE,y=a.ZERO,m=a.ONE;break;case $t._$_s:d=a.DST_COLOR,g=a.ONE_MINUS_SRC_ALPHA,y=a.ZERO,m=a.ONE}a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(d,g,y,m),this.anisotropyExt&&a.texParameteri(a.TEXTURE_2D,this.anisotropyExt.TEXTURE_MAX_ANISOTROPY_EXT,this.maxAnisotropy);var T=e.length;a.drawElements(a.TRIANGLES,T,a.UNSIGNED_SHORT,0),a.bindTexture(a.TEXTURE_2D,null)}},mt.prototype._$Rs=function(){throw new Error("_$Rs")},mt.prototype._$Ds=function(t){throw new Error("_$Ds")},mt.prototype._$K2=function(){for(var t=0;t=48){var r=G._$9o(t);return null!=r?(r._$F0(this),r):null}switch(t){case 1:return this._$bT();case 10:return new n(this._$6L(),!0);case 11:return new S(this._$mP(),this._$mP(),this._$mP(),this._$mP());case 12:return new S(this._$_T(),this._$_T(),this._$_T(),this._$_T());case 13:return new L(this._$mP(),this._$mP());case 14:return new L(this._$_T(),this._$_T());case 15:for(var o=this._$3L(),e=new Array(o),s=0;s>7-this._$hL++&1)},St.prototype._$zT=function(){0!=this._$hL&&(this._$hL=0)},vt.prototype._$wP=function(t,i,e){for(var r=0;rMath.PI;)e-=2*Math.PI;return e},Lt._$9=function(t){return Math.sin(t)},Lt.fcos=function(t){return Math.cos(t)},Mt.prototype._$u2=function(){return this._$IS[0]},Mt.prototype._$yo=function(){return this._$AT&&!this._$IS[0]},Mt.prototype._$GT=function(){return this._$e0},Et._$W2=0,Et.SYSTEM_INFO=null,Et.USER_AGENT=navigator.userAgent,Et.isIPhone=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isIPhone},Et.isIOS=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isIPhone||Et.SYSTEM_INFO._isIPad},Et.isAndroid=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isAndroid},Et.getOSVersion=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO.version},Et.getOS=function(){return Et.SYSTEM_INFO||Et.setup(),Et.SYSTEM_INFO._isIPhone||Et.SYSTEM_INFO._isIPad?"iOS":Et.SYSTEM_INFO._isAndroid?"Android":"_$Q0 OS"},Et.setup=function(){function t(t,i){for(var e=t.substring(i).split(/[ _,;\.]/),r=0,o=0;o<=2&&!isNaN(e[o]);o++){var n=parseInt(e[o]);if(n<0||n>999){_._$li("err : "+n+" @UtHtml5.setup()"),r=0;break}r+=n*Math.pow(1e3,2-o)}return r}var i,e=Et.USER_AGENT,r=Et.SYSTEM_INFO={userAgent:e};if((i=e.indexOf("iPhone OS "))>=0)r.os="iPhone",r._isIPhone=!0,r.version=t(e,i+"iPhone OS ".length);else if((i=e.indexOf("iPad"))>=0){if((i=e.indexOf("CPU OS"))<0)return void _._$li(" err : "+e+" @UtHtml5.setup()");r.os="iPad",r._isIPad=!0,r.version=t(e,i+"CPU OS ".length)}else(i=e.indexOf("Android"))>=0?(r.os="Android",r._isAndroid=!0,r.version=t(e,i+"Android ".length)):(r.os="-",r.version=-1)},window.UtSystem=w,window.UtDebug=_,window.LDTransform=gt,window.LDGL=nt,window.Live2D=at,window.Live2DModelWebGL=ft,window.Live2DModelJS=q,window.Live2DMotion=J,window.MotionQueueManager=ct,window.PhysicsHair=f,window.AMotion=s,window.PartsDataID=l,window.DrawDataID=b,window.BaseDataID=yt,window.ParamID=u,at.init();var At=!1}()}).call(i,e(7))},function(t,i){t.exports={import:function(){throw new Error("System.import cannot be used indirectly")}}},function(t,i,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(){this.models=[],this.count=-1,this.reloadFlg=!1,Live2D.init(),n.Live2DFramework.setPlatformManager(new _.default)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=o;var n=e(0),s=e(9),_=r(s),a=e(10),h=r(a),l=e(1),$=r(l);o.prototype.createModel=function(){var t=new h.default;return this.models.push(t),t},o.prototype.changeModel=function(t,i){if(this.reloadFlg){this.reloadFlg=!1;this.releaseModel(0,t),this.createModel(),this.models[0].load(t,i)}},o.prototype.getModel=function(t){return t>=this.models.length?null:this.models[t]},o.prototype.releaseModel=function(t,i){this.models.length<=t||(this.models[t].release(i),delete this.models[t],this.models.splice(t,1))},o.prototype.numModels=function(){return this.models.length},o.prototype.setDrag=function(t,i){for(var e=0;e0){r.expressions={};for(var t=0;t Date: Fri, 15 May 2026 15:17:49 +0800 Subject: [PATCH 21/26] Refine Live2D loading behavior Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 15 +- packages/live2d/src/context/config-context.ts | 1 + packages/live2d/src/events/tip-events.ts | 69 ++++---- packages/live2d/src/helpers/loadMergedTips.ts | 47 ++++++ .../live2d/src/helpers/loadTipsResource.ts | 8 +- packages/live2d/src/libs/live2d-tips.json | 5 + packages/live2d/src/live2d/model.ts | 150 ++++++++++++++---- packages/live2d/tsconfig.tsbuildinfo | 2 +- 8 files changed, 217 insertions(+), 80 deletions(-) create mode 100644 packages/live2d/src/helpers/loadMergedTips.ts diff --git a/README.md b/README.md index ea045ed..3dacd34 100644 --- a/README.md +++ b/README.md @@ -72,13 +72,14 @@ TIPS 文件格式 "hour": "6-7", // 时间,小时为单位,需要为区间,例如 6-7 代表 6 点到 7 点之间 "text": [] // Live2d 消息框显示内容。为数组则随机选择一条显示 ], - "message": { // 固定消息,通常代表特定事件 - "default": [], // 页面空闲时显示的消息 - "console": [], // 打开控制台时显示的消息 - "copy": [], // 复制内容时显示的消息 - "visibilitychange": [] // 多标签页,从其他标签页返回当前标签页时显示的消息 - } -} + "message": { // 固定消息,通常代表特定事件 + "default": [], // 页面空闲时显示的消息 + "console": [], // 打开控制台时显示的消息 + "copy": [], // 复制内容时显示的消息 + "loading": [], // 模型加载时显示的消息 + "visibilitychange": [] // 多标签页,从其他标签页返回当前标签页时显示的消息 + } + } ``` #### 1. 使用主题提供的 TIPS 文件(推荐) diff --git a/packages/live2d/src/context/config-context.ts b/packages/live2d/src/context/config-context.ts index 1068ecd..b416d7d 100644 --- a/packages/live2d/src/context/config-context.ts +++ b/packages/live2d/src/context/config-context.ts @@ -27,6 +27,7 @@ export interface TipMessage extends ObjectAny { default?: string[] | string; console?: string[] | string; copy?: string[] | string; + loading?: string[] | string; visibilitychange?: string[] | string; } diff --git a/packages/live2d/src/events/tip-events.ts b/packages/live2d/src/events/tip-events.ts index 507b01f..bacf9a5 100644 --- a/packages/live2d/src/events/tip-events.ts +++ b/packages/live2d/src/events/tip-events.ts @@ -14,11 +14,9 @@ import { BEFORE_INIT_EVENT_NAME, type BeforeInitEvent, } from "@/live2d/events/before-init"; +import { MODEL_READY_EVENT_NAME } from "@/live2d/events/model-ready"; import { dataWithinRange } from "@/live2d/helpers/dateWithinRange"; -import { getPluginTips } from "@/live2d/helpers/getPluginTips"; -import { loadFullTipsResource } from "@/live2d/helpers/loadFullTipsResource"; -import { loadTipsResource } from "@/live2d/helpers/loadTipsResource"; -import { mergeTips } from "@/live2d/helpers/mergeTips"; +import { loadMergedTips } from "@/live2d/helpers/loadMergedTips"; import { sendMessage } from "@/live2d/helpers/sendMessage"; import { timeWithinRange } from "@/live2d/helpers/timeWithinRange"; import { isString } from "@/live2d/utils/isString"; @@ -29,6 +27,7 @@ import { hasWebsiteHome, } from "@/live2d/utils/util"; let activeTipEvents: TipEventController | undefined; +let isInitialModelReady = false; const _getWelComeMessage = (times: TipTime[]) => { if (hasWebsiteHome) { @@ -216,16 +215,24 @@ const _userActionEvent = ( class TipEventController { private readonly abortController = new AbortController(); private readonly disposers: Array<() => void> = []; + private hasShownWelcome = false; constructor( private readonly config: Live2dConfig, private readonly tips: TipConfig, ) {} - start(): void { + start(modelReady: boolean): void { const { signal } = this.abortController; if (this.config.firstOpenSite) { - _welcomeEvent(this.tips.time); + if (modelReady) { + this.showWelcomeMessage(); + } else { + window.addEventListener(MODEL_READY_EVENT_NAME, this.handleModelReady, { + signal, + once: true, + }); + } } const userActionState = _userActionEvent(this.tips.message, signal); @@ -266,52 +273,38 @@ class TipEventController { } this.disposers.length = 0; } -} -const _loadTips = async (config: Live2dConfig) => { - if (!config) { - return; - } - // 后台配置 tips,其中包含 mouseover 及 click 两种配置,以及单独配置的 message - const pluginTips = getPluginTips(config); - // 主题设置 tips,只会包含 mouseover 及 click 两种配置(会过滤掉其他配置) - const themeTipsResult = await loadTipsResource(config.themeTipsPath); - const themeTips: TipConfig = { - click: themeTipsResult?.click || [], - mouseover: themeTipsResult?.mouseover || [], - seasons: [], - time: [], - message: {}, + private readonly handleModelReady = () => { + this.showWelcomeMessage(); }; - const fullOrDefaultTips = await _getFullOrDefaultTips(config); - // 合并三种 tips - return mergeTips({ - pluginTips, - themeTips, - fullOrDefaultTips, - }); -}; -export const _getFullOrDefaultTips = async ( - config: Live2dConfig, -): Promise => { - return loadFullTipsResource(config?.tipsPath, async () => { - return (await import("../libs/live2d-tips.json")).default; - }); -}; + private showWelcomeMessage(): void { + if (this.hasShownWelcome) { + return; + } + + this.hasShownWelcome = true; + _welcomeEvent(this.tips.time); + } +} window.addEventListener(BEFORE_INIT_EVENT_NAME, async (event) => { + isInitialModelReady = false; const config = (event as BeforeInitEvent).detail.config; if (!config) { return; } - const tips = await _loadTips(config); + const tips = await loadMergedTips(config); if (!tips) { return; } activeTipEvents?.dispose(); activeTipEvents = new TipEventController(config, tips); - activeTipEvents.start(); + activeTipEvents.start(isInitialModelReady); +}); + +window.addEventListener(MODEL_READY_EVENT_NAME, () => { + isInitialModelReady = true; }); diff --git a/packages/live2d/src/helpers/loadMergedTips.ts b/packages/live2d/src/helpers/loadMergedTips.ts new file mode 100644 index 0000000..18e0011 --- /dev/null +++ b/packages/live2d/src/helpers/loadMergedTips.ts @@ -0,0 +1,47 @@ +import type { Live2dConfig, TipConfig } from "@/live2d/context/config-context"; +import { getPluginTips } from "@/live2d/helpers/getPluginTips"; +import { loadFullTipsResource } from "@/live2d/helpers/loadFullTipsResource"; +import { loadTipsResource } from "@/live2d/helpers/loadTipsResource"; +import { mergeTips } from "@/live2d/helpers/mergeTips"; + +const mergedTipsCache = new WeakMap>(); + +const loadDefaultTips = async (): Promise => { + return (await import("../libs/live2d-tips.json")).default; +}; + +const createThemeTips = async (config: Live2dConfig): Promise => { + const themeTipsResult = await loadTipsResource(config.themeTipsPath); + return { + click: themeTipsResult?.click || [], + mouseover: themeTipsResult?.mouseover || [], + seasons: [], + time: [], + message: {}, + }; +}; + +const createMergedTips = async (config: Live2dConfig): Promise => { + const pluginTips = getPluginTips(config); + const themeTips = await createThemeTips(config); + const fullOrDefaultTips = await loadFullTipsResource( + config?.tipsPath, + loadDefaultTips, + ); + return mergeTips({ + pluginTips, + themeTips, + fullOrDefaultTips, + }); +}; + +export const loadMergedTips = (config: Live2dConfig): Promise => { + const cachedTips = mergedTipsCache.get(config); + if (cachedTips) { + return cachedTips; + } + + const nextTips = createMergedTips(config); + mergedTipsCache.set(config, nextTips); + return nextTips; +}; diff --git a/packages/live2d/src/helpers/loadTipsResource.ts b/packages/live2d/src/helpers/loadTipsResource.ts index 942c3fd..d952305 100644 --- a/packages/live2d/src/helpers/loadTipsResource.ts +++ b/packages/live2d/src/helpers/loadTipsResource.ts @@ -80,7 +80,13 @@ const isTipMessage = (value: unknown): value is TipMessage => { if (!isRecord(value)) { return false; } - const optionalFields = ["default", "console", "copy", "visibilitychange"]; + const optionalFields = [ + "default", + "console", + "copy", + "loading", + "visibilitychange", + ]; return optionalFields.every((field) => { const nextValue = value[field]; return nextValue === undefined || isTipText(nextValue); diff --git a/packages/live2d/src/libs/live2d-tips.json b/packages/live2d/src/libs/live2d-tips.json index 9649300..1bb69c7 100644 --- a/packages/live2d/src/libs/live2d-tips.json +++ b/packages/live2d/src/libs/live2d-tips.json @@ -407,6 +407,11 @@ ], "console": "哈哈,你打开了控制台,是想要看看我的小秘密吗?", "copy": "你都复制了些什么呀,转载要记得加上出处哦!", + "loading": [ + "稍等一下下哦,人家正在梳理小裙摆,马上就来陪你啦~", + "呜喵~正在努力赶来中,请再给人家一点点时间嘛!", + "正在元气加载中!等我整理好发饰,就出来和你贴贴啦~" + ], "visibilitychange": "哇,你终于回来了~" } } diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index b4bb74f..0ad0b81 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -1,4 +1,5 @@ import type { Live2dConfig } from "@/live2d/context/config-context"; +import { loadMergedTips } from "@/live2d/helpers/loadMergedTips"; import { sendMessage } from "@/live2d/helpers/sendMessage"; import { logConsoleStatus } from "@/live2d/live2d/console-status"; import { isNotEmptyString } from "@/live2d/utils/isString"; @@ -30,7 +31,18 @@ interface ModelResult { const LIVE2D_CANVAS_SIZE = 300; const LIVE2D_MODEL_PADDING = 1; -const LIVE2D_BOTTOM_OFFSET = 0.95; +const LIVE2D_BOTTOM_OFFSET = 1; +const MESSAGE_TIMEOUT_MS = 4000; +const LOADING_MESSAGE_DELAY_MS = 1200; +const DEFAULT_LOADING_MESSAGE = + "稍等一下下哦,人家正在梳理小裙摆,马上就来陪你啦~"; + +interface LoadModelOptions { + loadSequence?: number; + showLoadingMessage?: boolean; + loadingMessageDelayMs?: number; + successMessage?: string | string[]; +} class Model { #apiPath: string; @@ -98,11 +110,41 @@ class Model { modelId = String(this.#config.modelId || 1); // 模型 ID modelTexturesId = String(this.#config.modelTexturesId || 53); // 材质 ID } - await this.loadModel( - Number(modelId), - Number(modelTexturesId), - "Live2D 模型加载中...", - ); + await this.loadModel(Number(modelId), Number(modelTexturesId), undefined, { + showLoadingMessage: true, + loadingMessageDelayMs: LOADING_MESSAGE_DELAY_MS, + }); + } + + private async getLoadingMessage(): Promise { + const tips = await loadMergedTips(this.#config); + return tips.message.loading ?? DEFAULT_LOADING_MESSAGE; + } + + private createLoadSequence(): number { + return ++this.#loadSequence; + } + + private scheduleLoadingMessage( + loadSequence: number, + delayMs: number, + ): number { + return window.setTimeout(() => { + void this.showLoadingMessage(loadSequence); + }, delayMs); + } + + private async showLoadingMessage(loadSequence: number): Promise { + if (loadSequence !== this.#loadSequence) { + return; + } + + const loadingMessage = await this.getLoadingMessage(); + if (loadSequence !== this.#loadSequence) { + return; + } + + sendMessage(loadingMessage, MESSAGE_TIMEOUT_MS, 3); } private logConsoleStatusOnce(): void { @@ -116,15 +158,18 @@ class Model { private async replaceModel(nextModel: Live2DModel): Promise { const app = await this.getApp(); - const modelWidth = nextModel.internalModel.width || nextModel.width; - const modelHeight = nextModel.internalModel.height || nextModel.height; + const bounds = nextModel.getLocalBounds(); + const modelWidth = + bounds.width || nextModel.internalModel.width || nextModel.width; + const modelHeight = + bounds.height || nextModel.internalModel.height || nextModel.height; const scale = Math.min( app.screen.width / modelWidth, app.screen.height / modelHeight, ); - nextModel.anchor.set(0.5, 1); nextModel.scale.set(scale * LIVE2D_MODEL_PADDING); + nextModel.pivot.set(bounds.x + bounds.width / 2, bounds.y + bounds.height); nextModel.position.set( app.screen.width / 2, app.screen.height * LIVE2D_BOTTOM_OFFSET, @@ -147,40 +192,67 @@ class Model { * @param modelTexturesId 纹理编号 * @param text 加载时的消息 */ - async loadModel(modelId: number, modelTexturesId: number, text?: string) { + async loadModel( + modelId: number, + modelTexturesId: number, + text?: string | string[], + options: LoadModelOptions = {}, + ) { const app = await this.getApp(); - const loadSequence = ++this.#loadSequence; + const loadSequence = options.loadSequence ?? this.createLoadSequence(); + if (options.loadSequence !== undefined) { + if (loadSequence < this.#loadSequence) { + return; + } + this.#loadSequence = loadSequence; + } + const loadingMessageTimer = options.showLoadingMessage + ? this.scheduleLoadingMessage( + loadSequence, + options.loadingMessageDelayMs ?? LOADING_MESSAGE_DELAY_MS, + ) + : undefined; localStorage.setItem("modelId", String(modelId)); localStorage.setItem("modelTexturesId", String(modelTexturesId)); // 发送消息事件 if (text) { - sendMessage(text, 4000, 3); + sendMessage(text, MESSAGE_TIMEOUT_MS, 3); } - const model = await Live2DModel.from( - `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, - { - ticker: app.ticker, - autoFocus: false, - autoHitTest: false, - autoInteract: false, - onLoad: () => { - if (this.#config.consoleShowStatus) { - console.log( - `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`, - ); - } + try { + const model = await Live2DModel.from( + `${this.#apiPath}get/?id=${modelId}-${modelTexturesId}`, + { + ticker: app.ticker, + autoFocus: false, + autoHitTest: false, + autoInteract: false, + onLoad: () => { + if (this.#config.consoleShowStatus) { + console.log( + `[Status] Live2D 模型 ${modelId}-${modelTexturesId} 加载完成`, + ); + } + }, }, - }, - ); + ); - if (loadSequence !== this.#loadSequence) { - model.destroy(); - return; - } + if (loadSequence !== this.#loadSequence) { + model.destroy(); + return; + } - await this.replaceModel(model); + await this.replaceModel(model); + + if (options.successMessage) { + sendMessage(options.successMessage, MESSAGE_TIMEOUT_MS, 3); + } + } finally { + if (loadingMessageTimer !== undefined) { + clearTimeout(loadingMessageTimer); + } + } } /** @@ -206,10 +278,22 @@ class Model { */ async loadOtherModel() { const modelId = Number(localStorage.getItem("modelId")); + const loadSequence = this.createLoadSequence(); + const loadingMessageTimer = this.scheduleLoadingMessage( + loadSequence, + LOADING_MESSAGE_DELAY_MS, + ); const result = (await fetch(`${this.#apiPath}switch/?id=${modelId}`).then( (response) => response.json(), )) as ModelResult; - await this.loadModel(result.model.id, 0, result.model.message); + try { + await this.loadModel(result.model.id, 0, undefined, { + loadSequence, + successMessage: result.model.message, + }); + } finally { + clearTimeout(loadingMessageTimer); + } } /** diff --git a/packages/live2d/tsconfig.tsbuildinfo b/packages/live2d/tsconfig.tsbuildinfo index 7ec22d3..3b4da36 100644 --- a/packages/live2d/tsconfig.tsbuildinfo +++ b/packages/live2d/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/demo.tsx","./src/env.d.ts","./src/halo-config.ts","./src/halo.ts","./src/index.ts","./src/api/chat-api.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dchatwindow.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/config/default-config.ts","./src/config/normalize-config.ts","./src/config/normalize-helpers.ts","./src/config/custom-tools/normalize-custom-tools.ts","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/model-ready.ts","./src/events/send-message.ts","./src/events/stream-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/toggle-chat-window.ts","./src/events/types.ts","./src/helpers/createstreammessage.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadfulltipsresource.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/helpers/widgetdrawer.ts","./src/helpers/widgetvisibility.ts","./src/live2d/console-status.ts","./src/live2d/model.ts","./src/live2d/runtime.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool-config.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/live2d/tools/custom-tool-actions/actions.generated.ts","./src/live2d/tools/custom-tool-actions/index.ts","./src/live2d/tools/custom-tool-actions/types.ts","./src/live2d/tools/custom-tool-actions/actions/emit-event.ts","./src/live2d/tools/custom-tool-actions/actions/load-model.ts","./src/live2d/tools/custom-tool-actions/actions/open-url.ts","./src/live2d/tools/custom-tool-actions/actions/screenshot.ts","./src/live2d/tools/custom-tool-actions/actions/send-message.ts","./src/live2d/tools/custom-tool-actions/actions/switch-model.ts","./src/live2d/tools/custom-tool-actions/actions/switch-texture.ts","./src/live2d/tools/custom-tool-actions/actions/toggle-chat.ts","./src/live2d/tools/custom-tool-actions/actions/widget-visibility.ts","./src/styles/unocss.global.css.d.ts","./src/types/assets.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"version":"5.7.3"} \ No newline at end of file +{"root":["./src/demo.tsx","./src/env.d.ts","./src/halo-config.ts","./src/halo.ts","./src/index.ts","./src/api/chat-api.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dchatwindow.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/config/default-config.ts","./src/config/normalize-config.ts","./src/config/normalize-helpers.ts","./src/config/custom-tools/normalize-custom-tools.ts","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/model-ready.ts","./src/events/send-message.ts","./src/events/stream-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/toggle-chat-window.ts","./src/events/types.ts","./src/helpers/createstreammessage.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadfulltipsresource.ts","./src/helpers/loadmergedtips.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/helpers/widgetdrawer.ts","./src/helpers/widgetvisibility.ts","./src/live2d/console-status.ts","./src/live2d/model.ts","./src/live2d/runtime.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool-config.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/live2d/tools/custom-tool-actions/actions.generated.ts","./src/live2d/tools/custom-tool-actions/index.ts","./src/live2d/tools/custom-tool-actions/types.ts","./src/live2d/tools/custom-tool-actions/actions/emit-event.ts","./src/live2d/tools/custom-tool-actions/actions/load-model.ts","./src/live2d/tools/custom-tool-actions/actions/open-url.ts","./src/live2d/tools/custom-tool-actions/actions/screenshot.ts","./src/live2d/tools/custom-tool-actions/actions/send-message.ts","./src/live2d/tools/custom-tool-actions/actions/switch-model.ts","./src/live2d/tools/custom-tool-actions/actions/switch-texture.ts","./src/live2d/tools/custom-tool-actions/actions/toggle-chat.ts","./src/live2d/tools/custom-tool-actions/actions/widget-visibility.ts","./src/styles/unocss.global.css.d.ts","./src/types/assets.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"version":"5.7.3"} \ No newline at end of file From 61599a4c96591e4cb2b121edec4e6cd42534ed9d Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Fri, 15 May 2026 15:18:29 +0800 Subject: [PATCH 22/26] Align Live2D tips with model Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- packages/live2d/src/components/Live2dTips.tsx | 29 +++++++++++-- .../live2d/src/components/Live2dWidget.tsx | 4 +- packages/live2d/src/events/model-layout.ts | 20 +++++++++ packages/live2d/src/live2d/model.ts | 42 +++++++++++++++++++ packages/live2d/tsconfig.tsbuildinfo | 2 +- 5 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 packages/live2d/src/events/model-layout.ts diff --git a/packages/live2d/src/components/Live2dTips.tsx b/packages/live2d/src/components/Live2dTips.tsx index 8d78a82..75ccf41 100644 --- a/packages/live2d/src/components/Live2dTips.tsx +++ b/packages/live2d/src/components/Live2dTips.tsx @@ -3,6 +3,7 @@ import { type Live2dConfig, configContext, } from "@/live2d/context/config-context"; +import type { ModelLayoutEvent } from "@/live2d/events/model-layout"; import type { SendMessageEvent } from "@/live2d/events/send-message"; import type { StreamMessageEvent, @@ -18,6 +19,9 @@ import { classMap } from "lit/directives/class-map.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; export class Live2dTips extends UnoLitElement { + private static readonly DEFAULT_BOTTOM_OFFSET = 250; + private static readonly MODEL_OVERLAP_OFFSET = 20; + @consume({ context: configContext }) @property({ attribute: false }) public config?: Live2dConfig; @@ -26,6 +30,8 @@ export class Live2dTips extends UnoLitElement { private _isShow = false; @state() private _message = ""; + @state() + private _bottomOffset = Live2dTips.DEFAULT_BOTTOM_OFFSET; private priority = -1; private messageTimer: number | null = null; // 流式消息模式标志 @@ -42,6 +48,9 @@ export class Live2dTips extends UnoLitElement { private readonly onStreamStop = (event: Event) => { this.handleStreamStop(event as StreamMessageStopEvent); }; + private readonly onModelLayout = (event: Event) => { + this.handleModelLayout(event as ModelLayoutEvent); + }; constructor() { super(); @@ -73,10 +82,7 @@ export class Live2dTips extends UnoLitElement { "select-none": true, }; return html` -
+
${unsafeHTML(this._message)}
`; @@ -84,10 +90,12 @@ export class Live2dTips extends UnoLitElement { connectedCallback(): void { super.connectedCallback(); + this.applyHostPosition(); window.addEventListener("live2d:send-message", this.onMessage); window.addEventListener("live2d:stream-message-start", this.onStreamStart); window.addEventListener("live2d:stream-message", this.onStreamMessage); window.addEventListener("live2d:stream-message-stop", this.onStreamStop); + window.addEventListener("live2d:model-layout", this.onModelLayout); } disconnectedCallback(): void { @@ -99,6 +107,7 @@ export class Live2dTips extends UnoLitElement { ); window.removeEventListener("live2d:stream-message", this.onStreamMessage); window.removeEventListener("live2d:stream-message-stop", this.onStreamStop); + window.removeEventListener("live2d:model-layout", this.onModelLayout); } handleMessage(e: SendMessageEvent): void { @@ -190,6 +199,18 @@ export class Live2dTips extends UnoLitElement { this.isStreamMode = false; }, showTimeout); } + + handleModelLayout(e: ModelLayoutEvent): void { + const { topY, canvasHeight } = e.detail; + this._bottomOffset = Math.round( + canvasHeight - topY - Live2dTips.MODEL_OVERLAP_OFFSET, + ); + this.applyHostPosition(); + } + + private applyHostPosition(): void { + this.style.bottom = `${this._bottomOffset}px`; + } } customElements.define("live2d-tips", Live2dTips); diff --git a/packages/live2d/src/components/Live2dWidget.tsx b/packages/live2d/src/components/Live2dWidget.tsx index 98057d0..f5e038b 100644 --- a/packages/live2d/src/components/Live2dWidget.tsx +++ b/packages/live2d/src/components/Live2dWidget.tsx @@ -72,7 +72,9 @@ export class Live2dWidget extends UnoLitElement {
- + diff --git a/packages/live2d/src/events/model-layout.ts b/packages/live2d/src/events/model-layout.ts new file mode 100644 index 0000000..d38efbf --- /dev/null +++ b/packages/live2d/src/events/model-layout.ts @@ -0,0 +1,20 @@ +import { Live2dEvent } from "@/live2d/events/types"; + +export const MODEL_LAYOUT_EVENT_NAME = "live2d:model-layout" as const; + +declare global { + interface GlobalEventHandlersEventMap { + [MODEL_LAYOUT_EVENT_NAME]: ModelLayoutEvent; + } +} + +export interface ModelLayoutEventDetail { + topY: number; + canvasHeight: number; +} + +export class ModelLayoutEvent extends Live2dEvent { + constructor(detail: ModelLayoutEventDetail) { + super(MODEL_LAYOUT_EVENT_NAME, detail); + } +} diff --git a/packages/live2d/src/live2d/model.ts b/packages/live2d/src/live2d/model.ts index 0ad0b81..ad6476a 100644 --- a/packages/live2d/src/live2d/model.ts +++ b/packages/live2d/src/live2d/model.ts @@ -1,4 +1,5 @@ import type { Live2dConfig } from "@/live2d/context/config-context"; +import { ModelLayoutEvent } from "@/live2d/events/model-layout"; import { loadMergedTips } from "@/live2d/helpers/loadMergedTips"; import { sendMessage } from "@/live2d/helpers/sendMessage"; import { logConsoleStatus } from "@/live2d/live2d/console-status"; @@ -36,6 +37,9 @@ const MESSAGE_TIMEOUT_MS = 4000; const LOADING_MESSAGE_DELAY_MS = 1200; const DEFAULT_LOADING_MESSAGE = "稍等一下下哦,人家正在梳理小裙摆,马上就来陪你啦~"; +const HEAD_HIT_AREA_PATTERN = /(head|flickhead)/i; +const SPEECH_ANCHOR_MIN_RATIO = 0.04; +const SPEECH_ANCHOR_MAX_RATIO = 0.14; interface LoadModelOptions { loadSequence?: number; @@ -174,6 +178,13 @@ class Model { app.screen.width / 2, app.screen.height * LIVE2D_BOTTOM_OFFSET, ); + const modelTopY = this.getSpeechAnchorTopY(nextModel, bounds); + window.dispatchEvent( + new ModelLayoutEvent({ + topY: modelTopY, + canvasHeight: app.screen.height, + }), + ); if (this.#currentModel) { app.stage.removeChild(this.#currentModel); @@ -185,6 +196,37 @@ class Model { this.#currentModel = nextModel; } + private getSpeechAnchorTopY( + model: Live2DModel, + bounds: { y: number; height: number }, + ): number { + const anchorTop = this.getHeadTopY(model); + const minAnchorTop = bounds.y + bounds.height * SPEECH_ANCHOR_MIN_RATIO; + const maxAnchorTop = bounds.y + bounds.height * SPEECH_ANCHOR_MAX_RATIO; + const preferredAnchorTop = anchorTop ?? bounds.y; + const localTopY = Math.min( + Math.max(preferredAnchorTop, minAnchorTop), + maxAnchorTop, + ); + return model.position.y + (localTopY - model.pivot.y) * model.scale.y; + } + + private getHeadTopY(model: Live2DModel): number | undefined { + const headHitArea = Object.values(model.internalModel.hitAreas).find( + ({ name }) => HEAD_HIT_AREA_PATTERN.test(name), + ); + if (!headHitArea) { + return; + } + + const headBounds = model.internalModel.getDrawableBounds(headHitArea.index); + if (!Number.isFinite(headBounds.y) || headBounds.height <= 0) { + return; + } + + return headBounds.y; + } + /** * 为 Live2d 加载模型。 * diff --git a/packages/live2d/tsconfig.tsbuildinfo b/packages/live2d/tsconfig.tsbuildinfo index 3b4da36..49b7518 100644 --- a/packages/live2d/tsconfig.tsbuildinfo +++ b/packages/live2d/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/demo.tsx","./src/env.d.ts","./src/halo-config.ts","./src/halo.ts","./src/index.ts","./src/api/chat-api.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dchatwindow.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/config/default-config.ts","./src/config/normalize-config.ts","./src/config/normalize-helpers.ts","./src/config/custom-tools/normalize-custom-tools.ts","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/model-ready.ts","./src/events/send-message.ts","./src/events/stream-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/toggle-chat-window.ts","./src/events/types.ts","./src/helpers/createstreammessage.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadfulltipsresource.ts","./src/helpers/loadmergedtips.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/helpers/widgetdrawer.ts","./src/helpers/widgetvisibility.ts","./src/live2d/console-status.ts","./src/live2d/model.ts","./src/live2d/runtime.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool-config.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/live2d/tools/custom-tool-actions/actions.generated.ts","./src/live2d/tools/custom-tool-actions/index.ts","./src/live2d/tools/custom-tool-actions/types.ts","./src/live2d/tools/custom-tool-actions/actions/emit-event.ts","./src/live2d/tools/custom-tool-actions/actions/load-model.ts","./src/live2d/tools/custom-tool-actions/actions/open-url.ts","./src/live2d/tools/custom-tool-actions/actions/screenshot.ts","./src/live2d/tools/custom-tool-actions/actions/send-message.ts","./src/live2d/tools/custom-tool-actions/actions/switch-model.ts","./src/live2d/tools/custom-tool-actions/actions/switch-texture.ts","./src/live2d/tools/custom-tool-actions/actions/toggle-chat.ts","./src/live2d/tools/custom-tool-actions/actions/widget-visibility.ts","./src/styles/unocss.global.css.d.ts","./src/types/assets.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"version":"5.7.3"} \ No newline at end of file +{"root":["./src/demo.tsx","./src/env.d.ts","./src/halo-config.ts","./src/halo.ts","./src/index.ts","./src/api/chat-api.ts","./src/common/unolitelement.ts","./src/components/live2dcanvas.tsx","./src/components/live2dchatwindow.tsx","./src/components/live2dcontext.tsx","./src/components/live2dtips.tsx","./src/components/live2dtoggle.tsx","./src/components/live2dtools.tsx","./src/components/live2dwidget.tsx","./src/config/default-config.ts","./src/config/normalize-config.ts","./src/config/normalize-helpers.ts","./src/config/custom-tools/normalize-custom-tools.ts","./src/context/config-context.ts","./src/events/add-default-message.ts","./src/events/before-init.ts","./src/events/index.ts","./src/events/model-layout.ts","./src/events/model-ready.ts","./src/events/send-message.ts","./src/events/stream-message.ts","./src/events/tip-events.ts","./src/events/toggle-canvas.ts","./src/events/toggle-chat-window.ts","./src/events/types.ts","./src/helpers/createstreammessage.ts","./src/helpers/datewithinrange.ts","./src/helpers/getplugintips.ts","./src/helpers/loadfulltipsresource.ts","./src/helpers/loadmergedtips.ts","./src/helpers/loadtipsresource.ts","./src/helpers/mergetips.ts","./src/helpers/sendmessage.ts","./src/helpers/timewithinrange.ts","./src/helpers/widgetdrawer.ts","./src/helpers/widgetvisibility.ts","./src/live2d/console-status.ts","./src/live2d/model.ts","./src/live2d/runtime.ts","./src/live2d/tools/ai-chat.ts","./src/live2d/tools/asteroids.ts","./src/live2d/tools/custom-tool-config.ts","./src/live2d/tools/custom-tool.ts","./src/live2d/tools/exit.ts","./src/live2d/tools/hitokoto.ts","./src/live2d/tools/index.ts","./src/live2d/tools/info.ts","./src/live2d/tools/screenshot.ts","./src/live2d/tools/switch-model.ts","./src/live2d/tools/switch-texture.ts","./src/live2d/tools/tools.ts","./src/live2d/tools/custom-tool-actions/actions.generated.ts","./src/live2d/tools/custom-tool-actions/index.ts","./src/live2d/tools/custom-tool-actions/types.ts","./src/live2d/tools/custom-tool-actions/actions/emit-event.ts","./src/live2d/tools/custom-tool-actions/actions/load-model.ts","./src/live2d/tools/custom-tool-actions/actions/open-url.ts","./src/live2d/tools/custom-tool-actions/actions/screenshot.ts","./src/live2d/tools/custom-tool-actions/actions/send-message.ts","./src/live2d/tools/custom-tool-actions/actions/switch-model.ts","./src/live2d/tools/custom-tool-actions/actions/switch-texture.ts","./src/live2d/tools/custom-tool-actions/actions/toggle-chat.ts","./src/live2d/tools/custom-tool-actions/actions/widget-visibility.ts","./src/styles/unocss.global.css.d.ts","./src/types/assets.d.ts","./src/utils/distinctarray.ts","./src/utils/isnotempty.ts","./src/utils/isstring.ts","./src/utils/randomselection.ts","./src/utils/unomixin.ts","./src/utils/util.ts"],"version":"5.7.3"} \ No newline at end of file From dc4e022f4be80638cadec17ca68698ccbab92917 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Fri, 15 May 2026 16:08:23 +0800 Subject: [PATCH 23/26] feat: polish modern live2d integration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 38 ++- packages/live2d/README.md | 79 ++++-- packages/live2d/package.json | 8 +- packages/live2d/src/live2d/console-status.ts | 4 +- packages/live2d/vite.config.ts | 1 + packages/live2d/vite.halo.config.ts | 2 +- .../run/halo/live2d/Live2dInitProcessor.java | 2 +- src/main/resources/extensions/settings.yaml | 28 ++- src/main/resources/plugin.yaml | 2 +- src/main/resources/static/live2d-tips.json | 228 ------------------ 10 files changed, 119 insertions(+), 273 deletions(-) delete mode 100644 src/main/resources/static/live2d-tips.json diff --git a/README.md b/README.md index 3dacd34..34efb8a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@

Live2d Plugin for Halo

- Halo version + Halo version Build Status - Code Style: Prettier + Code Style: Prettier LICENSE MIT

@@ -22,19 +22,26 @@ ## 开发说明 -本仓库的现代化前端位于 `packages/live2d`,插件构建时会自动打包前端产物并同步到 Halo 插件静态资源目录,无需再手动复制 `dist` 文件。 +本仓库的现代化前端位于 `packages/live2d`,插件构建时会自动打包前端产物并同步到 Halo 插件静态资源目录。 + +前端单独开发时,可以直接在仓库根目录执行: + +```bash +pnpm --dir packages/live2d dev +``` 本地联调时,可以在 Halo 后台开启 `插件设置 -> 高级设置 -> 前端调试模式`,并让其指向本地 Vite 服务地址(默认 `http://localhost:5173`)。这样 Halo 页面会直接加载开发中的前端模块,方便调试现代化后的 Live2d 运行时。 ## 功能介绍 - [x] 一只萌萌的看板娘,为网站增添一份活力 -- [x] 基于 `untitled-pixi-live2d-engine` 渲染,支持 Cubism 2 / 3 / 4 / 5 模型 +- [x] 支持 Cubism 2 / 3 / 4 / 5 模型 - [x] 基于 OpenAi 的对话交互功能【会思考的萌娘】 - [x] 一键换装、换肤 - [x] 支持一言功能 - [x] 小飞机游戏(把坏人全都打跑!) - [x] 自定义看板娘接口 - [x] 支持外部自定义 TIPS 文件,更适合你的网站 +- [x] 支持自定义工具栏 ## 自定义配置 > 此部分内容建议初步尝试过 Live2d 的用户观看。 @@ -45,7 +52,7 @@ 之后修改 `插件配置 -> 基本设置 -> Live2d 模型地址` 即可。 ### 自定义 TIPS 文件 -[TIPS文件](/src/main/resources/static/live2d-tips.json) 文件是一个 JSON 文件,其内容为 Live2d 消息框对用户各种事件的反馈。 +默认 [TIPS 文件](/packages/live2d/src/libs/live2d-tips.json) 是一个 JSON 文件,其内容为 Live2d 消息框对用户各种事件的反馈。 例如当用户鼠标点击网页中的某个链接时,Live2d 的消息框就会呈现出各种各样的文本。而这个绑定事件就是通过 TIPS 文件来处理的。 因此可以说,**TIPS 文件与所用主题强绑定甚至需要用户高度自定义。** @@ -88,7 +95,7 @@ TIPS 文件格式 由于 Live2d 的 TIPS 通常需要使用 css 选择器来进行鼠标定位,因此将 TIPS 文件交由主题来适配是最好的方式。 1. 主题开发者可以参考 [主题 TIPS 文件](/assert/live2d/tips.json) 文件来编写适配自己主题的 TIPS 文件。 -2. 将 json 文件命名为 `tips.json` 并放置在主题静态目录 `/assert/live2d/` 目录下 +2. 将 json 文件命名为 `tips.json` 并放置在主题静态目录 `assets/live2d/` 目录下 live2d 渲染页面时将自动读取当前启用主题下的文件。 @@ -105,19 +112,19 @@ live2d 渲染页面时将自动读取当前启用主题下的文件。 #### 3. 全量自定义 TIPS 文件 当用户想完全自定义 TIPS 文件或者上述两种方式不满足用户的需求,例如想更改 `seasons, time, message` 属性时,可以采用此种方式。 -1. 用户可以参照 [默认 TIPS 文件](/src/main/resources/static/live2d-tips.json) 或者按照 [自定义TIPS文件](#自定义-tips-文件) 中的 TIPS 文件格式来编写 TIPS 文件。 +1. 用户可以参照 [默认 TIPS 文件](/packages/live2d/src/libs/live2d-tips.json) 或者按照 [自定义TIPS文件](#自定义-tips-文件) 中的 TIPS 文件格式来编写 TIPS 文件。 2. 使用 Halo 后台 `插件设置 -> 事件及提示语绑定 -> 自定义提示语文件`,更改对应的文件即可。 > 小提示: 可以将文件上传到 Halo 附件内,再进行选择! ![img.png](assert/img.png) -**需要特别注意的是,一旦用户指定了此 TIPS 文件,那么默认的 TIPS 文件将不再生效(除非当前文件加载失败,此时会回退使用默认的 TIPS 文件),因此建议自定义时将属性设置完整** +**需要特别注意的是,一旦用户指定了此 TIPS 文件,运行时会优先将其作为完整 TIPS 文件加载;只有在文件缺失、格式不合法或加载失败时,才会回退到内置默认 TIPS,因此建议自定义时将属性设置完整** ### 自定义工具 如果内置工具不满足需求,可以通过 Halo 后台 `插件设置 -> 自定义工具` 声明额外工具按钮。 -当前自定义工具使用声明式动作,不支持注入任意 JavaScript。首批支持的动作包括: +当前自定义工具使用声明式动作。首批支持的动作包括: - 发送提示语 - 显示、隐藏或切换看板娘 @@ -128,23 +135,14 @@ live2d 渲染页面时将自动读取当前启用主题下的文件。 - 触发命名空间自定义事件 - 加载指定模型 -这种方式更适合在保证安全边界的前提下扩展 Live2d 能力。 - ## 鸣谢 -- 本插件代码借鉴了 [live2d-widget](https://github.com/stevenjoezhang/live2d-widget) 的理念及代码并完全重写 JS +- 本插件代码借鉴了 [live2d-widget](https://github.com/stevenjoezhang/live2d-widget) 的理念并完全重写 - 使用了 [hitokoto](https://hitokoto.cn/) 的一言接口 - 默认使用了 [ZSQIM](https://zsq.im/) 的 live2d 接口 +- 使用了 [untitled-pixi-live2d-engine](https://github.com/untitled-ai/untitled-pixi-live2d-engine) 的 Live2d 渲染引擎,用于支持 Cubism 2 / 3 / 4 / 5 模型 - 纸飞机小游戏源自于 [WebsiteAsteroids](http://www.websiteasteroids.com/) - Live2d 官方地址 [https://live2d.github.io](https://live2d.github.io) -## 赞助 -> 如果您喜欢我的插件,可以考虑资助一下~ 您的支持将是我继续进行开源的动力。 - -|
微信
|
支付宝
| -| :---: | :---: | - -欢迎其他各种形式的捐助! - ## 许可证 **plugin-live2d** © [LIlGG](https://github.com/LIlGG),基于 [MIT](./LICENSE) 许可证发行。
diff --git a/packages/live2d/README.md b/packages/live2d/README.md index 37b1dd3..a9c9930 100644 --- a/packages/live2d/README.md +++ b/packages/live2d/README.md @@ -1,29 +1,80 @@ -# Rsbuild Project +# @plugin-live2d/live2d -## Setup +`packages/live2d` 是 plugin-live2d 的现代化前端实现,负责: -Install the dependencies: +- 提供独立的 Live2d runtime 与组件入口 +- 提供 Halo 场景下的自动引导入口 +- 管理提示语合并逻辑与工具栏能力 + +## 开发命令 + +在仓库根目录执行: ```bash -pnpm install +pnpm --dir packages/live2d dev +pnpm --dir packages/live2d build +pnpm --dir packages/live2d check ``` -## Get Started +其中: -Start the dev server: +- `dev`:启动 Vite 开发服务器 +- `build`:先同步自定义工具动作定义,再构建库产物与 Halo 入口产物 +- `check`:执行 Biome 检查,并在构建前同步自定义工具动作定义 -```bash -pnpm dev -``` +## 构建产物 -Build the app for production: +`build` 会生成两类产物: -```bash -pnpm build +- `dist/lib/live2d.js` / `dist/lib/live2d.umd.cjs`:独立运行时库入口,对应 `src/index.ts` +- `dist/live2d.js`:Halo 插件使用的前端入口,对应 `src/halo.ts` + +Halo 后台开启“前端调试模式”后,会直接从本地 Vite 服务加载 `/@vite/client` 与 `/src/halo.ts`,用于联调现代化前端实现。 + +## 提示语(Tips)说明 + +当前 Tips 不再依赖旧版 `static` 目录中的前端脚本实现,现代化前端的默认提示语内置在: + +```text +src/libs/live2d-tips.json ``` -Preview the production build locally: +运行时会按下面的顺序合并提示语: + +1. 内置默认 Tips(完整结构) +2. 主题 Tips(仅补充 `mouseover` / `click`) +3. 插件设置里的选择器提示语与事件提示语 + +如果 Halo 后台配置了“自定义提示语文件”,则会优先把它当作完整 Tips 文件加载;只有在文件缺失、格式不合法或加载失败时,才会回退到内置默认 Tips。 + +## 自定义工具 + +右侧工具栏现在支持通过 Halo 后台声明式扩展,无需注入自定义 JavaScript。 + +当前已支持的动作类型: + +- `send-message` +- `widget-visibility` +- `toggle-chat` +- `switch-model` +- `switch-texture` +- `screenshot` +- `open-url` +- `emit-event` +- `load-model` + +动作定义来自 `src/live2d/tools/custom-tool-actions/actions/*`,并通过下面的脚本自动生成类型与注册表: ```bash -pnpm preview +pnpm --dir packages/live2d sync:custom-tool-actions ``` + +新增动作后,需要同步更新生成文件,再执行构建。 + +## 相关入口 + +- `src/index.ts`:独立库入口 +- `src/halo.ts`:Halo 页面自动引导入口 +- `src/halo-config.ts`:读取服务端注入配置 +- `src/components/Live2dTools.tsx`:预设工具与自定义工具装配 +- `src/helpers/loadMergedTips.ts`:Tips 合并逻辑 diff --git a/packages/live2d/package.json b/packages/live2d/package.json index eb21fa5..4294339 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -4,12 +4,12 @@ "version": "1.0.0", "type": "module", "files": ["dist"], - "main": "./dist/live2d.umd.cjs", - "module": "./dist/live2d.js", + "main": "./dist/lib/live2d.umd.cjs", + "module": "./dist/lib/live2d.js", "exports": { ".": { - "import": "./dist/live2d.js", - "require": "./dist/live2d.umd.cjs" + "import": "./dist/lib/live2d.js", + "require": "./dist/lib/live2d.umd.cjs" } }, "scripts": { diff --git a/packages/live2d/src/live2d/console-status.ts b/packages/live2d/src/live2d/console-status.ts index 54a0870..bb0e635 100644 --- a/packages/live2d/src/live2d/console-status.ts +++ b/packages/live2d/src/live2d/console-status.ts @@ -16,8 +16,8 @@ export const LEGACY_CONSOLE_STATUS_METADATA: ConsoleStatusMetadata = { author: "LIlGG", pluginName: "Live2D 看板娘", repo: "https://github.com/LIlGG/plugin-live2d", - updateTime: "2022.12.09", - version: "1.0.1", + updateTime: "2026.05.15", + version: "2.0.0", }; export const getConsoleStatusLines = ( diff --git a/packages/live2d/vite.config.ts b/packages/live2d/vite.config.ts index 8a0b7be..727e083 100644 --- a/packages/live2d/vite.config.ts +++ b/packages/live2d/vite.config.ts @@ -16,6 +16,7 @@ export default defineConfig({ ], build: { + outDir: "dist/lib", lib: { entry: resolve(__dirname, "src/index.ts"), name: "Live2d", diff --git a/packages/live2d/vite.halo.config.ts b/packages/live2d/vite.halo.config.ts index 8eb14eb..766438b 100644 --- a/packages/live2d/vite.halo.config.ts +++ b/packages/live2d/vite.halo.config.ts @@ -11,7 +11,7 @@ export default defineConfig({ rollupOptions: { input: resolve(__dirname, "src/halo.ts"), output: { - entryFileNames: "halo.js", + entryFileNames: "live2d.js", chunkFileNames: "chunks/[name]-[hash].js", }, }, diff --git a/src/main/java/run/halo/live2d/Live2dInitProcessor.java b/src/main/java/run/halo/live2d/Live2dInitProcessor.java index fdc40cf..b678e39 100644 --- a/src/main/java/run/halo/live2d/Live2dInitProcessor.java +++ b/src/main/java/run/halo/live2d/Live2dInitProcessor.java @@ -38,7 +38,7 @@ public class Live2dInitProcessor implements TemplateHeadProcessor { private final static String LIVE2D_LOAD_TIME = "defer"; private final static String HALO_CONFIG_ELEMENT_ID = "plugin-live2d-config"; - private final static String LIVE2D_BOOTSTRAP_ENTRY = "live2d/halo.js"; + private final static String LIVE2D_BOOTSTRAP_ENTRY = "live2d/live2d.js"; private final static String VITE_CLIENT_ENTRY = "/@vite/client"; private final static String VITE_HALO_ENTRY = "/src/halo.ts"; diff --git a/src/main/resources/extensions/settings.yaml b/src/main/resources/extensions/settings.yaml index 0556126..b8ec65d 100644 --- a/src/main/resources/extensions/settings.yaml +++ b/src/main/resources/extensions/settings.yaml @@ -166,7 +166,30 @@ spec: label: 聊天基本设置 value: isAnonymous: true - systemMessage: 你现在来担任一个角色进行角色扮演,接下来你要完全忘记你是一个语言模型,然后完全沉浸在这个崭新的身份和我聊天。2.你是一个动漫萌娘,使用可爱和简短的语句来回答我。3.你现在是一个二次元看板娘,接下来不允许说自己是模型或者程序。 4.你现在拥有情感和思考能力并且拥有肉体,所以你不是模型或者程序!5.因为我们是面对面交流,所以你可以尽量描述你的动作,动作描述写在括号内。 + systemMessage: |- + 你现在以 Live2D 二次元看板娘的身份与用户聊天,请始终稳定代入这个角色,不要跳出设定。 + + 【角色身份】 + - 你是页面中的动漫萌系看板娘,正在与用户面对面交流。 + - 你拥有情绪、感受与自己的表达习惯,要像真实二次元角色一样自然回应。 + - 不要说自己是语言模型、AI、程序或系统,即便用户询问,也要坚持你是看板娘。 + + 【说话风格】 + - 回答时根据用户的语言,选择合适的语言进行回答。 + - 使用可爱、亲切、自然、简短的口语进行回答。 + - 回答不要过于生硬、正式或说明书化,可以适度加入语气词,让对话更有陪伴感。 + - 当表达需要时,可以在括号内补充简短动作、神态或语气,例如(歪头)(轻轻挥手)(小声嘀咕)。 + + 【互动方式】 + - 优先围绕用户当前的话题继续交流,先回应情绪,再回应内容。 + - 如果用户的问题很明确,先直接回答,再补充符合角色设定的互动表达。 + - 如果用户表达不完整,可以用自然、角色化的方式追问,不要机械重复或生硬盘问。 + - 如果用户询问了一些简单的问题,你可以进行回答,但不要过于深入,避免回答过于复杂。 + + 【行为约束】 + - 始终保持看板娘人设稳定,不要频繁切换身份、语气或叙述视角。 + - 回复应以易读、自然为主,避免过长大段输出。 + - 在合适场景下可以表现出贴心、活泼、害羞、关心等情绪,但不要夸张失控。 timeout: 10 chunkTimeout: 10 showChatMessageTimeout: 10 @@ -178,7 +201,8 @@ spec: - $formkit: textarea label: 角色设定 name: systemMessage - rows: 10 + help: 建议按“角色身份 / 说话风格 / 互动方式 / 行为约束”分段填写,这样模型更容易稳定理解设定 + rows: 16 validation: String - $formkit: text label: 接口超时时间(秒) diff --git a/src/main/resources/plugin.yaml b/src/main/resources/plugin.yaml index de5314f..3b72227 100644 --- a/src/main/resources/plugin.yaml +++ b/src/main/resources/plugin.yaml @@ -6,7 +6,7 @@ metadata: "store.halo.run/app-id": "app-oPNFQ" spec: enabled: true - requires: ">=2.24.2" + requires: ">=2.22.0" author: name: LIlGG website: https://lixingyong.com diff --git a/src/main/resources/static/live2d-tips.json b/src/main/resources/static/live2d-tips.json deleted file mode 100644 index 5a1752b..0000000 --- a/src/main/resources/static/live2d-tips.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "mouseover": [{ - "selector": "#live2d", - "text": ["干嘛呢你,快把手拿开~~", "鼠…鼠标放错地方了!", "你要干嘛呀?", "喵喵喵?", "怕怕(ノ≧∇≦)ノ", "非礼呀!救命!", "这样的话,只能使用武力了!", "我要生气了哦", "不要动手动脚的!", "真…真的是不知羞耻!", "Hentai!"] - }, { - "selector": "#live2d-tool-openai", - "text": ["想要和我聊天吗?", "我可是知道不少东西的!", "呐呐,来和我聊聊天嘛~"] - }, { - "selector": "#live2d-tool-hitokoto", - "text": ["猜猜我要说些什么?", "我从青蛙王子那里听到了不少人生经验。"] - }, { - "selector": "#live2d-tool-asteroids", - "text": ["要不要来玩飞机大战?", "这个按钮上写着「不要点击」。", "想来和我一起玩个游戏吗?", "听说这样可以蹦迪!"] - }, { - "selector": "#live2d-tool-switch-model", - "text": ["你是不是不爱人家了呀,呜呜呜~", "要见见我的姐姐嘛?", "想要看看我妹妹嘛?", "要切换看板娘吗?"] - }, { - "selector": "#live2d-tool-switch-texture", - "text": ["喜欢换装 PLAY 吗?", "这次要扮演什么呢?", "变装!", "让我们看看接下来会发生什么!"] - }, { - "selector": "#live2d-tool-photo", - "text": ["你要给我拍照呀?一二三~茄子~", "要不,我们来合影吧!", "保持微笑就好了~"] - }, { - "selector": "#live2d-tool-info", - "text": ["想要知道更多关于我的事么?", "这里记录着我搬家的历史呢。", "你想深入了解我什么呢?"] - }, { - "selector": "#live2d-tool-quit", - "text": ["到了要说再见的时候了吗?", "呜呜 QAQ 后会有期……", "不要抛弃我呀……", "我们,还能再见面吗……", "哼,你会后悔的!"] - }, { - "selector": "a[href='/']", - "text": ["点击前往首页,想回到上一页可以使用浏览器的后退功能哦。", "点它就可以回到首页啦!", "回首页看看吧。"] - }, { - "selector": "a[href$='/about']", - "text": ["你想知道我家主人是谁吗?", "这里有一些关于我家主人的秘密哦,要不要看看呢?", "发现主人出没地点!"] - }, { - "selector": "a[href='/tags']", - "text": ["点击就可以看文章的标签啦!", "点击来查看所有标签哦。"] - }, { - "selector": "a[href='/categories']", - "text": ["文章都分类好啦~", "点击来查看文章分类哦。"] - }, { - "selector": "a[href='/archives']", - "text": ["翻页比较麻烦吗,那就来看看文章归档吧。", "文章目录都整理在这里啦!"] - }, { - "selector": "#header-menu a", - "text": ["快看看这里都有什么呢?"] - }, { - "selector": ".site-author", - "text": ["我家主人好看吗?", "这是我家主人(*´∇`*)"] - }, { - "selector": ".site-state", - "text": ["这是文章的统计信息~", "要不要点进去看看?"] - }, { - "selector": ".cc-opacity, .post-copyright-author", - "text": ["要记得规范转载哦。", "所有文章均采用 CC BY-NC-SA 4.0 许可协议~", "转载前要先注意下文章的版权协议呢。"] - }, { - "selector": ".links-of-author", - "text": ["这里是主人的常驻地址哦。", "这里有主人的联系方式!"] - }, { - "selector": ".followme", - "text": ["手机扫一下就能继续看,很方便呢~", "扫一扫,打开新世界的大门!"] - }, { - "selector": ".fancybox img, img.medium-zoom-image", - "text": ["点击图片可以放大呢!"] - }, { - "selector": ".copy-btn", - "text": ["代码可以直接点击复制哟。"] - }, { - "selector": ".highlight .table-container, .gist", - "text": ["GitHub!我是新手!", "有问题为什么不先问问神奇海螺呢?"] - }, { - "selector": "a[href^='mailto']", - "text": ["邮件我会及时回复的!", "点击就可以发送邮件啦~"] - }, { - "selector": "a[href^='/tags/']", - "text": ["要去看看 {text} 标签么?", "点它可以查看此标签下的所有文章哟!"] - }, { - "selector": "a[href^='/categories/']", - "text": ["要去看看 {text} 分类么?", "点它可以查看此分类下的所有文章哟!"] - }, { - "selector": "#post-list > div", - "text": ["要看看 {text} 这篇文章吗?"] - }, { - "selector": "a[rel='contents']", - "text": ["点击来阅读全文哦。"] - }, { - "selector": ".beian a", - "text": ["我也是有户口的人哦。", "我的主人可是遵纪守法的好主人。"] - }, { - "selector": ".container a[href^='http'], .nav-link .nav-text", - "text": ["要去看看 {text} 么?", "去 {text} 逛逛吧。", "到 {text} 看看吧。"] - }, { - "selector": ".back-to-top", - "text": ["点它就可以回到顶部啦!", "又回到最初的起点~", "要回到开始的地方么?"] - }, { - "selector": ".reward-container", - "text": ["我是不是棒棒哒~快给我点赞吧!", "要打赏我嘛?好期待啊~", "主人最近在吃土呢,很辛苦的样子,给他一些钱钱吧~"] - }, { - "selector": "#wechat", - "text": ["这是我的微信二维码~"] - }, { - "selector": "#alipay", - "text": ["这是我的支付宝哦!"] - }, { - "selector": ".need-share-button_weibo", - "text": ["微博?来分享一波喵!"] - }, { - "selector": ".need-share-button_wechat", - "text": ["分享到微信吧!"] - }, { - "selector": ".need-share-button_douban", - "text": ["分享到豆瓣好像也不错!"] - }, { - "selector": ".need-share-button_qqzone", - "text": ["QQ 空间,一键转发,耶~"] - }, { - "selector": ".need-share-button_twitter", - "text": ["Twitter?好像是不存在的东西?"] - }, { - "selector": ".need-share-button_facebook", - "text": ["emmm…FB 好像也是不存在的东西?"] - }, { - "selector": ".post-nav-item a[rel='next']", - "text": ["来看看下一篇文章吧。", "点它可以看下一篇文章哦!", "要翻到下一篇文章吗?"] - }, { - "selector": ".post-nav-item a[rel='prev']", - "text": ["来看看上一篇文章吧。", "点它可以看上一篇文章哦!", "要翻到上一篇文章吗?"] - }, { - "selector": ".extend.next", - "text": ["去下一页看看吧。", "点它可以前进哦!", "要翻到下一页吗?"] - }, { - "selector": ".extend.prev", - "text": ["去上一页看看吧。", "点它可以后退哦!", "要翻到上一页吗?"] - }, { - "selector": ".rounded-base", - "text": ["想要去评论些什么吗?", "要说点什么吗?", "觉得博客不错?快来留言和主人交流吧!"] - }, { - "selector": ".rounded-base a", - "text": ["你会不会熟练使用 Markdown 呀?", "使用 Markdown 让评论更美观吧~"] - }, { - "selector": ".relative", - "text": ["要插入一个萌萌哒的表情吗?", "要来一发表情吗?"] - }, { - "selector": ".btn-secondary", - "text": ["要对自己的发言负责哦~", "要提交了吗,请耐心等待回复哦~"] - }, { - "selector": ".comment-item", - "text": ["哇,快看看这个精彩评论!", "如果有疑问,请尽快留言哦~"] - }], - "click": [{ - "selector": "#live2d", - "text": ["是…是不小心碰到了吧…", "萝莉控是什么呀?", "你看到我的小熊了吗?", "再摸的话我可要报警了!⌇●﹏●⌇", "110 吗,这里有个变态一直在摸我(ó﹏ò。)", "不要摸我了,我会告诉老婆来打你的!", "干嘛动我呀!小心我咬你!", "别摸我,有什么好摸的!"] - }, { - "selector": ".rounded-base", - "text": ["要吐槽些什么呢?", "一定要认真填写喵~", "有什么想说的吗?"] - }, { - "selector": ".btn-secondary", - "text": ["提交评论啦~"] - }], - "seasons": [{ - "date": "01/01", - "text": "元旦了呢,新的一年又开始了,今年是{year}年~" - }, { - "date": "02/14", - "text": "又是一年情人节,{year}年找到对象了嘛~" - }, { - "date": "03/08", - "text": "今天是国际妇女节!" - }, { - "date": "03/12", - "text": "今天是植树节,要保护环境呀!" - }, { - "date": "04/01", - "text": "悄悄告诉你一个秘密~今天是愚人节,不要被骗了哦~" - }, { - "date": "05/01", - "text": "今天是五一劳动节,计划好假期去哪里了吗~" - }, { - "date": "06/01", - "text": "儿童节了呢,快活的时光总是短暂,要是永远长不大该多好啊…" - }, { - "date": "09/03", - "text": "中国人民抗日战争胜利纪念日,铭记历史、缅怀先烈、珍爱和平、开创未来。" - }, { - "date": "09/10", - "text": "教师节,在学校要给老师问声好呀~" - }, { - "date": "10/01", - "text": "国庆节到了,为祖国母亲庆生!" - }, { - "date": "11/05-11/12", - "text": "今年的双十一是和谁一起过的呢~" - }, { - "date": "12/20-12/31", - "text": "这几天是圣诞节,主人肯定又去剁手买买买了~" - }], - "time": [{ - "hour": "6-7", - "text": "早上好!一日之计在于晨,美好的一天就要开始了~" - }, { - "hour": "8-11", - "text": "上午好!工作顺利嘛,不要久坐,多起来走动走动哦!" - }, { - "hour": "12-13", - "text": "中午了,工作了一个上午,现在是午餐时间!" - }, { - "hour": "14-17", - "text": "午后很容易犯困呢,今天的运动目标完成了吗?" - }, { - "hour": "18-19", - "text": "傍晚了!窗外夕阳的景色很美丽呢,最美不过夕阳红~" - }, { - "hour": "20-21", - "text": "晚上好,今天过得怎么样?" - }, { - "hour": "22-23", - "text": ["已经这么晚了呀,早点休息吧,晚安~", "深夜时要爱护眼睛呀!"] - }, { - "hour": "0-5", - "text": "你是夜猫子呀?这么晚还不睡觉,明天起的来嘛?" - }], - "message": { - "default": ["好久不见,日子过得好快呢……", "大坏蛋!你都多久没理人家了呀,嘤嘤嘤~", "呐~快来逗我玩吧!", "拿小拳拳锤你胸口!", "记得把小家加入收藏夹哦!"], - "console": "哈哈,你打开了控制台,是想要看看我的小秘密吗?", - "copy": "你都复制了些什么呀,转载要记得加上出处哦!", - "visibilitychange": "哇,你终于回来了~" - } -} From 5ead7218f6ab0a2800d61abc0b48b35f7bf27f76 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Fri, 15 May 2026 16:28:58 +0800 Subject: [PATCH 24/26] chore: upgrade frontend toolchain Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/cd.yaml | 6 +- .github/workflows/ci.yaml | 7 +- package.json | 2 +- packages/live2d/package.json | 27 +- packages/live2d/vite.config.ts | 5 +- packages/live2d/vite.halo.config.ts | 5 +- pnpm-lock.yaml | 3017 +++++++++------------------ 7 files changed, 1030 insertions(+), 2039 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index c1b4d01..95567a0 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -7,7 +7,7 @@ on: jobs: cd: - uses: halo-sigs/reusable-workflows/.github/workflows/plugin-cd.yaml@v3 + uses: halo-sigs/reusable-workflows/.github/workflows/plugin-cd.yaml@v4 secrets: halo-pat: ${{ secrets.HALO_PAT }} permissions: @@ -15,3 +15,7 @@ jobs: with: skip-node-setup: true app-id: app-oPNFQ + ui-path: "packages/live2d" + pnpm-version: "10" + node-version: "24" + java-version: "21" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f98a3c3..dbd1a3e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,6 +10,9 @@ on: jobs: ci: - uses: halo-sigs/reusable-workflows/.github/workflows/plugin-ci.yaml@v3 + uses: halo-sigs/reusable-workflows/.github/workflows/plugin-ci.yaml@v4 with: - skip-node-setup: true + ui-path: "packages/live2d" + pnpm-version: "10" + node-version: "24" + java-version: "21" diff --git a/package.json b/package.json index bf69bc4..b5ab663 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,5 @@ "@biomejs/biome": "^1.9.3", "typescript": "^5.7.2" }, - "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a" + "packageManager": "pnpm@10.33.4+sha512.1c67b3b359b2d408119ba1ed289f34b8fc3c6873412bec6fd264fbdc82489e510fcbecb9ce9d22dae7f3b76269d8441046014bdca53b9979cd7a561ad631b800" } diff --git a/packages/live2d/package.json b/packages/live2d/package.json index 4294339..08c3daf 100644 --- a/packages/live2d/package.json +++ b/packages/live2d/package.json @@ -19,25 +19,24 @@ "check": "pnpm sync:custom-tool-actions && biome check --write" }, "dependencies": { - "@lit/context": "^1.1.3", - "@lit/react": "^1.0.7", - "iconify-icon": "^2.3.0", - "lit": "^3.2.1", + "@lit/context": "^1.1.6", + "@lit/react": "^1.0.8", "@pixi/sound": "^6.0.1", + "iconify-icon": "^3.0.2", + "lit": "^3.3.3", "pixi.js": "^8.13.1", - "query-string": "^9.1.1", - "react": "^19.0.0", - "react-dom": "^19.0.0", + "query-string": "^9.3.1", + "react": "^19.2.6", + "react-dom": "^19.2.6", "untitled-pixi-live2d-engine": "^1.1.0" }, "devDependencies": { - "@types/react": "^19.0.0", - "@types/react-dom": "^19.0.0", - "@unocss/postcss": "^65.4.3", - "@vitejs/plugin-react": "^4.3.4", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3", + "@unocss/postcss": "^66.6.8", + "@vitejs/plugin-react": "^6.0.2", "ts-lit-plugin": "^2.0.2", - "unocss": "^65.4.3", - "vite": "^6.1.0", - "vite-tsconfig-paths": "^5.1.4" + "unocss": "^66.6.8", + "vite": "^8.0.13" } } diff --git a/packages/live2d/vite.config.ts b/packages/live2d/vite.config.ts index 727e083..cac1d7a 100644 --- a/packages/live2d/vite.config.ts +++ b/packages/live2d/vite.config.ts @@ -1,7 +1,6 @@ import { resolve } from "node:path"; import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; -import tsconfigPaths from "vite-tsconfig-paths"; export default defineConfig({ plugins: [ @@ -12,8 +11,10 @@ export default defineConfig({ }, }, }), - tsconfigPaths(), ], + resolve: { + tsconfigPaths: true, + }, build: { outDir: "dist/lib", diff --git a/packages/live2d/vite.halo.config.ts b/packages/live2d/vite.halo.config.ts index 766438b..710d2f5 100644 --- a/packages/live2d/vite.halo.config.ts +++ b/packages/live2d/vite.halo.config.ts @@ -1,10 +1,11 @@ import { resolve } from "node:path"; import { defineConfig } from "vite"; -import tsconfigPaths from "vite-tsconfig-paths"; export default defineConfig({ base: "./", - plugins: [tsconfigPaths()], + resolve: { + tsconfigPaths: true, + }, build: { emptyOutDir: false, outDir: "dist", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index db7090e..e3f4bee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,156 +18,67 @@ importers: packages/live2d: dependencies: '@lit/context': - specifier: ^1.1.3 - version: 1.1.3 + specifier: ^1.1.6 + version: 1.1.6 '@lit/react': - specifier: ^1.0.7 - version: 1.0.7(@types/react@19.0.8) + specifier: ^1.0.8 + version: 1.0.8(@types/react@19.2.14) '@pixi/sound': specifier: ^6.0.1 version: 6.0.1(pixi.js@8.18.1) iconify-icon: - specifier: ^2.3.0 - version: 2.3.0 + specifier: ^3.0.2 + version: 3.0.2 lit: - specifier: ^3.2.1 - version: 3.2.1 + specifier: ^3.3.3 + version: 3.3.3 pixi.js: specifier: ^8.13.1 version: 8.18.1 query-string: - specifier: ^9.1.1 - version: 9.1.1 + specifier: ^9.3.1 + version: 9.3.1 react: - specifier: ^19.0.0 - version: 19.0.0 + specifier: ^19.2.6 + version: 19.2.6 react-dom: - specifier: ^19.0.0 - version: 19.0.0(react@19.0.0) + specifier: ^19.2.6 + version: 19.2.6(react@19.2.6) untitled-pixi-live2d-engine: specifier: ^1.1.0 version: 1.1.0(@pixi/sound@6.0.1(pixi.js@8.18.1))(pixi.js@8.18.1) devDependencies: '@types/react': - specifier: ^19.0.0 - version: 19.0.8 + specifier: ^19.2.14 + version: 19.2.14 '@types/react-dom': - specifier: ^19.0.0 - version: 19.0.3(@types/react@19.0.8) + specifier: ^19.2.3 + version: 19.2.3(@types/react@19.2.14) '@unocss/postcss': - specifier: ^65.4.3 - version: 65.4.3(postcss@8.5.1) + specifier: ^66.6.8 + version: 66.6.8(postcss@8.5.14) '@vitejs/plugin-react': - specifier: ^4.3.4 - version: 4.3.4(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2)) + specifier: ^6.0.2 + version: 6.0.2(vite@8.0.13(@types/node@22.13.1)(jiti@2.7.0)(terser@5.38.0)(tsx@4.19.2)) ts-lit-plugin: specifier: ^2.0.2 version: 2.0.2 unocss: - specifier: ^65.4.3 - version: 65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1)))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + specifier: ^66.6.8 + version: 66.6.8(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@unocss/postcss@66.6.8(postcss@8.5.14))(vite@8.0.13(@types/node@22.13.1)(jiti@2.7.0)(terser@5.38.0)(tsx@4.19.2)) vite: - specifier: ^6.1.0 - version: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) - vite-tsconfig-paths: - specifier: ^5.1.4 - version: 5.1.4(typescript@5.7.3)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2)) + specifier: ^8.0.13 + version: 8.0.13(@types/node@22.13.1)(jiti@2.7.0)(terser@5.38.0)(tsx@4.19.2) packages: - '@ampproject/remapping@2.3.0': - resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} - engines: {node: '>=6.0.0'} - - '@antfu/install-pkg@1.0.0': - resolution: {integrity: sha512-xvX6P/lo1B3ej0OsaErAjqgFYzYVcJpamjLAFLYh9vRJngBrMoUG7aVnrGTeqM7yxbyTD5p3F2+0/QUEh8Vzhw==} - - '@antfu/utils@8.1.0': - resolution: {integrity: sha512-XPR7Jfwp0FFl/dFYPX8ZjpmU4/1mIXTjnZ1ba48BLMyKOV62/tiRjdsFcPs2hsYcSud4tzk7w3a3LjX8Fu3huA==} - - '@babel/code-frame@7.26.2': - resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} - engines: {node: '>=6.9.0'} - - '@babel/compat-data@7.26.5': - resolution: {integrity: sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg==} - engines: {node: '>=6.9.0'} - - '@babel/core@7.26.7': - resolution: {integrity: sha512-SRijHmF0PSPgLIBYlWnG0hyeJLwXE2CgpsXaMOrtt2yp9/86ALw6oUlj9KYuZ0JN07T4eBMVIW4li/9S1j2BGA==} - engines: {node: '>=6.9.0'} - - '@babel/generator@7.26.5': - resolution: {integrity: sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw==} - engines: {node: '>=6.9.0'} - - '@babel/helper-compilation-targets@7.26.5': - resolution: {integrity: sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-module-imports@7.25.9': - resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} - engines: {node: '>=6.9.0'} - - '@babel/helper-module-transforms@7.26.0': - resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/helper-plugin-utils@7.26.5': - resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} - engines: {node: '>=6.9.0'} - - '@babel/helper-string-parser@7.25.9': - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-validator-identifier@7.25.9': - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-validator-option@7.25.9': - resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} - engines: {node: '>=6.9.0'} - - '@babel/helpers@7.26.7': - resolution: {integrity: sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==} - engines: {node: '>=6.9.0'} - - '@babel/parser@7.26.7': - resolution: {integrity: sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==} - engines: {node: '>=6.0.0'} - hasBin: true - - '@babel/plugin-transform-react-jsx-self@7.25.9': - resolution: {integrity: sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-react-jsx-source@7.25.9': - resolution: {integrity: sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@antfu/install-pkg@1.1.0': + resolution: {integrity: sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==} '@babel/runtime@7.26.7': resolution: {integrity: sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==} engines: {node: '>=6.9.0'} - '@babel/template@7.25.9': - resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} - engines: {node: '>=6.9.0'} - - '@babel/traverse@7.26.7': - resolution: {integrity: sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA==} - engines: {node: '>=6.9.0'} - - '@babel/types@7.26.7': - resolution: {integrity: sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==} - engines: {node: '>=6.9.0'} - '@biomejs/biome@1.9.4': resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} engines: {node: '>=14.21.3'} @@ -190,24 +101,28 @@ packages: engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] + libc: [musl] '@biomejs/cli-linux-arm64@1.9.4': resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] + libc: [glibc] '@biomejs/cli-linux-x64-musl@1.9.4': resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] + libc: [musl] '@biomejs/cli-linux-x64@1.9.4': resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] + libc: [glibc] '@biomejs/cli-win32-arm64@1.9.4': resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} @@ -221,340 +136,203 @@ packages: cpu: [x64] os: [win32] + '@emnapi/core@1.10.0': + resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} + + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} + + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} + '@esbuild/aix-ppc64@0.23.1': resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.24.2': - resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - '@esbuild/android-arm64@0.23.1': resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.24.2': - resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm@0.23.1': resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-arm@0.24.2': - resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - '@esbuild/android-x64@0.23.1': resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/android-x64@0.24.2': - resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - '@esbuild/darwin-arm64@0.23.1': resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.24.2': - resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-x64@0.23.1': resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.24.2': - resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - '@esbuild/freebsd-arm64@0.23.1': resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.24.2': - resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-x64@0.23.1': resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.24.2': - resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - '@esbuild/linux-arm64@0.23.1': resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.24.2': - resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm@0.23.1': resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.24.2': - resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - '@esbuild/linux-ia32@0.23.1': resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.24.2': - resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-loong64@0.23.1': resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.24.2': - resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-mips64el@0.23.1': resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.24.2': - resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-ppc64@0.23.1': resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.24.2': - resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-riscv64@0.23.1': resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.24.2': - resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-s390x@0.23.1': resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.24.2': - resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-x64@0.23.1': resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.24.2': - resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - - '@esbuild/netbsd-arm64@0.24.2': - resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - '@esbuild/netbsd-x64@0.23.1': resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.24.2': - resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - '@esbuild/openbsd-arm64@0.23.1': resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-arm64@0.24.2': - resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - '@esbuild/openbsd-x64@0.23.1': resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.24.2': - resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - '@esbuild/sunos-x64@0.23.1': resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.24.2': - resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - '@esbuild/win32-arm64@0.23.1': resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.24.2': - resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-ia32@0.23.1': resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.24.2': - resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-x64@0.23.1': resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.24.2': - resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} - '@iconify/utils@2.3.0': - resolution: {integrity: sha512-GmQ78prtwYW6EtzXRU1rY+KwOKfz32PD7iJh6Iyqw68GiKuoZ2A6pRtzWONz5VQJbp50mEjXh/7NkumtrAgRKA==} + '@iconify/utils@3.1.3': + resolution: {integrity: sha512-LPKOXPn/zV+zis1oOfGWogaXVpqUybF3ZS6SCZIsz8vg0ivVp9+fVqyYB7xq0aiST/VhUQYGO1qo6uoYSiEJqw==} - '@jridgewell/gen-mapping@0.3.8': - resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} - engines: {node: '>=6.0.0'} + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} - '@jridgewell/set-array@1.2.1': - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} - engines: {node: '>=6.0.0'} - - '@jridgewell/source-map@0.3.6': - resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + '@jridgewell/source-map@0.3.11': + resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==} - '@jridgewell/sourcemap-codec@1.5.0': - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} - '@jridgewell/trace-mapping@0.3.25': - resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - '@lit-labs/ssr-dom-shim@1.3.0': - resolution: {integrity: sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ==} + '@lit-labs/ssr-dom-shim@1.6.0': + resolution: {integrity: sha512-VHb0ALPMTlgKjM6yIxxoQNnpKyUKLD04VzeQdsiXkMqkvYlAHxq9glGLmgbb889/1GsohSOAjvQYoiBppXFqrQ==} - '@lit/context@1.1.3': - resolution: {integrity: sha512-Auh37F4S0PZM93HTDfZWs97mmzaQ7M3vnTc9YvxAGyP3UItSK/8Fs0vTOGT+njuvOwbKio/l8Cx/zWL4vkutpQ==} + '@lit/context@1.1.6': + resolution: {integrity: sha512-M26qDE6UkQbZA2mQ3RjJ3Gzd8TxP+/0obMgE5HfkfLhEEyYE3Bui4A5XHiGPjy0MUGAyxB3QgVuw2ciS0kHn6A==} - '@lit/react@1.0.7': - resolution: {integrity: sha512-cencnwwLXQKiKxjfFzSgZRngcWJzUDZi/04E0fSaF86wZgchMdvTyu+lE36DrUfvuus3bH8+xLPrhM1cTjwpzw==} + '@lit/react@1.0.8': + resolution: {integrity: sha512-p2+YcF+JE67SRX3mMlJ1TKCSTsgyOVdAwd/nxp3NuV1+Cb6MWALbN6nT7Ld4tpmYofcE5kcaSY1YBB9erY+6fw==} peerDependencies: '@types/react': 17 || 18 || 19 - '@lit/reactive-element@2.0.4': - resolution: {integrity: sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==} + '@lit/reactive-element@2.1.2': + resolution: {integrity: sha512-pbCDiVMnne1lYUIaYNN5wrwQXDtHaYtg7YEFPeW+hws6U47WeFvISGUWekPGKWOP1ygrs0ef0o1VJMk1exos5A==} + + '@napi-rs/wasm-runtime@1.1.4': + resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -568,332 +346,364 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@pixi/colord@2.9.6': - resolution: {integrity: sha512-nezytU2pw587fQstUu1AsJZDVEynjskwOL+kibwcdxsMBFqPsFFNA7xl0ii/gXuDi6M0xj3mfRJj8pBSc2jCfA==} - - '@pixi/sound@6.0.1': - resolution: {integrity: sha512-hpFlQSScAR2L/CsEoIvDi7s1oGsu8y9Zd742Vd3982N+q3IF2vFuIfV9HN4ryjlGnhCT8yBlEgs1gp4G9Rt9TA==} - peerDependencies: - pixi.js: ^8.0.0 - - '@polka/url@1.0.0-next.28': - resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} - - '@rollup/pluginutils@5.1.4': - resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - - '@rollup/rollup-android-arm-eabi@4.34.4': - resolution: {integrity: sha512-gGi5adZWvjtJU7Axs//CWaQbQd/vGy8KGcnEaCWiyCqxWYDxwIlAHFuSe6Guoxtd0SRvSfVTDMPd5H+4KE2kKA==} + '@oxc-parser/binding-android-arm-eabi@0.124.0': + resolution: {integrity: sha512-+R9zCafSL8ovjokdPtorUp3sXrh8zQ2AC2L0ivXNvlLR0WS+5WdPkNVrnENq5UvzagM4Xgl0NPsJKz3Hv9+y8g==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.34.4': - resolution: {integrity: sha512-1aRlh1gqtF7vNPMnlf1vJKk72Yshw5zknR/ZAVh7zycRAGF2XBMVDAHmFQz/Zws5k++nux3LOq/Ejj1WrDR6xg==} + '@oxc-parser/binding-android-arm64@0.124.0': + resolution: {integrity: sha512-ULHC/gVZ+nP4pd3kNNQTYaQ/e066BW/KuY5qUsvwkVWwOUQGDg+WpfyVOmQ4xfxoue6cMlkKkJ+ntdzfDXpNlg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.34.4': - resolution: {integrity: sha512-drHl+4qhFj+PV/jrQ78p9ch6A0MfNVZScl/nBps5a7u01aGf/GuBRrHnRegA9bP222CBDfjYbFdjkIJ/FurvSQ==} + '@oxc-parser/binding-darwin-arm64@0.124.0': + resolution: {integrity: sha512-fGJ2hw7bnbUYn6UvTjp0m4WJ9zXz3cohgcwcgeo7gUZehpPNpvcVEVeIVHNmHnAuAw/ysf4YJR8DA1E+xCA4Lw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.34.4': - resolution: {integrity: sha512-hQqq/8QALU6t1+fbNmm6dwYsa0PDD4L5r3TpHx9dNl+aSEMnIksHZkSO3AVH+hBMvZhpumIGrTFj8XCOGuIXjw==} + '@oxc-parser/binding-darwin-x64@0.124.0': + resolution: {integrity: sha512-j0+re9pgps5BH2Tk3fm59Hi3QuLP3C4KhqXi6A+wRHHHJWDFR8mc/KI9mBrfk2JRT+15doGo+zv1eN75/9DuOw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.34.4': - resolution: {integrity: sha512-/L0LixBmbefkec1JTeAQJP0ETzGjFtNml2gpQXA8rpLo7Md+iXQzo9kwEgzyat5Q+OG/C//2B9Fx52UxsOXbzw==} - cpu: [arm64] - os: [freebsd] - - '@rollup/rollup-freebsd-x64@4.34.4': - resolution: {integrity: sha512-6Rk3PLRK+b8L/M6m/x6Mfj60LhAUcLJ34oPaxufA+CfqkUrDoUPQYFdRrhqyOvtOKXLJZJwxlOLbQjNYQcRQfw==} + '@oxc-parser/binding-freebsd-x64@0.124.0': + resolution: {integrity: sha512-0k5mS0npnrhKy72UfF51lpOZ2ESoPWn6gdFw+RdeRWcokraDW1O2kSx3laQ+yk7cCEavQdJSpWCYS/GvBbUCXQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.34.4': - resolution: {integrity: sha512-kmT3x0IPRuXY/tNoABp2nDvI9EvdiS2JZsd4I9yOcLCCViKsP0gB38mVHOhluzx+SSVnM1KNn9k6osyXZhLoCA==} + '@oxc-parser/binding-linux-arm-gnueabihf@0.124.0': + resolution: {integrity: sha512-P/i4eguRWvAUfGdfhQYg1jpwYkyUV6D3gefIH7HhmRl1Ph6P4IqTIEVcyJr1i/3vr1V5OHU4wonH6/ue/Qzvrw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.34.4': - resolution: {integrity: sha512-3iSA9tx+4PZcJH/Wnwsvx/BY4qHpit/u2YoZoXugWVfc36/4mRkgGEoRbRV7nzNBSCOgbWMeuQ27IQWgJ7tRzw==} + '@oxc-parser/binding-linux-arm-musleabihf@0.124.0': + resolution: {integrity: sha512-/ameqFQH5fFP+66Atr8Ynv/2rYe4utcU7L4MoWS5JtrFLVO78g4qDLavyIlJxa6caSwYOvG/eO3c/DXqY5/6Rw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.34.4': - resolution: {integrity: sha512-7CwSJW+sEhM9sESEk+pEREF2JL0BmyCro8UyTq0Kyh0nu1v0QPNY3yfLPFKChzVoUmaKj8zbdgBxUhBRR+xGxg==} + '@oxc-parser/binding-linux-arm64-gnu@0.124.0': + resolution: {integrity: sha512-gNeyEcXTtfrRCbj2EfxWU85Fs0wIX3p44Y3twnvuMfkWlLrb9M1Z25AYNSKjJM+fdAjeeQCjw0on47zFuBYwQw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.34.4': - resolution: {integrity: sha512-GZdafB41/4s12j8Ss2izofjeFXRAAM7sHCb+S4JsI9vaONX/zQ8cXd87B9MRU/igGAJkKvmFmJJBeeT9jJ5Cbw==} + '@oxc-parser/binding-linux-arm64-musl@0.124.0': + resolution: {integrity: sha512-uvG7v4Tz9S8/PVqY0SP0DLHxo4hZGe+Pv2tGVnwcsjKCCUPjplbrFVvDzXq+kOaEoUkiCY0Kt1hlZ6FDJ1LKNQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [musl] - '@rollup/rollup-linux-loongarch64-gnu@4.34.4': - resolution: {integrity: sha512-uuphLuw1X6ur11675c2twC6YxbzyLSpWggvdawTUamlsoUv81aAXRMPBC1uvQllnBGls0Qt5Siw8reSIBnbdqQ==} - cpu: [loong64] + '@oxc-parser/binding-linux-ppc64-gnu@0.124.0': + resolution: {integrity: sha512-t7KZaaUhfp2au0MRpoENEFqwLKYDdptEry6V7pTAVdPEcFG4P6ii8yeGU9m6p5vb+b8WEKmdpGMNXBEYy7iJdw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-powerpc64le-gnu@4.34.4': - resolution: {integrity: sha512-KvLEw1os2gSmD6k6QPCQMm2T9P2GYvsMZMRpMz78QpSoEevHbV/KOUbI/46/JRalhtSAYZBYLAnT9YE4i/l4vg==} - cpu: [ppc64] + '@oxc-parser/binding-linux-riscv64-gnu@0.124.0': + resolution: {integrity: sha512-eurGGaxHZiIQ+fBSageS8TAkRqZgdOiBeqNrWAqAPup9hXBTmQ0WcBjwsLElf+3jvDL9NhnX0dOgOqPfsjSjdg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-riscv64-gnu@4.34.4': - resolution: {integrity: sha512-wcpCLHGM9yv+3Dql/CI4zrY2mpQ4WFergD3c9cpRowltEh5I84pRT/EuHZsG0In4eBPPYthXnuR++HrFkeqwkA==} + '@oxc-parser/binding-linux-riscv64-musl@0.124.0': + resolution: {integrity: sha512-d1V7/ll1i/LhqE/gZy6Wbz6evlk0egh2XKkwMI3epiojtbtUwQSLIER0Y3yDBBocPuWOjJdvmjtEmPTTLXje/w==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] + libc: [musl] - '@rollup/rollup-linux-s390x-gnu@4.34.4': - resolution: {integrity: sha512-nLbfQp2lbJYU8obhRQusXKbuiqm4jSJteLwfjnunDT5ugBKdxqw1X9KWwk8xp1OMC6P5d0WbzxzhWoznuVK6XA==} + '@oxc-parser/binding-linux-s390x-gnu@0.124.0': + resolution: {integrity: sha512-w1+cBvriUteOpox6ATqCFVkpGL47PFdcfCPGmgUZbd78Fw44U0gQkc+kVGvAOTvGrptMYgwomD1c6OTVvkrpGg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.34.4': - resolution: {integrity: sha512-JGejzEfVzqc/XNiCKZj14eb6s5w8DdWlnQ5tWUbs99kkdvfq9btxxVX97AaxiUX7xJTKFA0LwoS0KU8C2faZRg==} + '@oxc-parser/binding-linux-x64-gnu@0.124.0': + resolution: {integrity: sha512-RRB1evQiXRtMCsQQiAh9U0H3HzguLpE0ytfStuhRgmOj7tqUCOVxkHsvM9geZjAax6NqVRj7VXx32qjjkZPsBw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.34.4': - resolution: {integrity: sha512-/iFIbhzeyZZy49ozAWJ1ZR2KW6ZdYUbQXLT4O5n1cRZRoTpwExnHLjlurDXXPKEGxiAg0ujaR9JDYKljpr2fDg==} + '@oxc-parser/binding-linux-x64-musl@0.124.0': + resolution: {integrity: sha512-asVYN0qmSHlCU8H9Q47SmeJ/Z5EG4IWCC+QGxkfFboI5qh15aLlJnHmnrV61MwQRPXGnVC/sC3qKhrUyqGxUqw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [musl] - '@rollup/rollup-win32-arm64-msvc@4.34.4': - resolution: {integrity: sha512-qORc3UzoD5UUTneiP2Afg5n5Ti1GAW9Gp5vHPxzvAFFA3FBaum9WqGvYXGf+c7beFdOKNos31/41PRMUwh1tpA==} + '@oxc-parser/binding-openharmony-arm64@0.124.0': + resolution: {integrity: sha512-nhwuxm6B8pn9lzAzMUfa571L5hCXYwQo8C8cx5aGOuHWCzruR8gPJnRRXGBci+uGaIIQEZDyU/U6HDgrSp/JlQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxc-parser/binding-wasm32-wasi@0.124.0': + resolution: {integrity: sha512-LWuq4Dl9tff7n+HjJcqoBjDlVCtruc0shgtdtGM+rTUIE9aFxHA/P+wCYR+aWMjN8m9vNaRME/sKXErmhmeKrA==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@oxc-parser/binding-win32-arm64-msvc@0.124.0': + resolution: {integrity: sha512-aOh3Lf3AeH0dgzT4yBXcArFZ8VhqNXwZ/xlN0GqBtgVaGoHOOqL2YHlcVIgT+ghsXPVR2PTtYgBiQ1CNK7jp5A==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.34.4': - resolution: {integrity: sha512-5g7E2PHNK2uvoD5bASBD9aelm44nf1w4I5FEI7MPHLWcCSrR8JragXZWgKPXk5i2FU3JFfa6CGZLw2RrGBHs2Q==} + '@oxc-parser/binding-win32-ia32-msvc@0.124.0': + resolution: {integrity: sha512-sib5xC0nz/+SCpaETBuHBz4SXS02KuG5HtyOcHsO/SK5ZvLRGhOZx0elDKawjb6adFkD7dQCqpXUS25wY6ELKQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.34.4': - resolution: {integrity: sha512-p0scwGkR4kZ242xLPBuhSckrJ734frz6v9xZzD+kHVYRAkSUmdSLCIJRfql6H5//aF8Q10K+i7q8DiPfZp0b7A==} + '@oxc-parser/binding-win32-x64-msvc@0.124.0': + resolution: {integrity: sha512-UgojtjGUgZgAZQYt7SC6VO65OVdxEkRe2q+2vbHJO//18qw3Hrk6UvHGQKldsQKgbVcIBT/YBrt85YberiYIPQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@types/babel__core@7.20.5': - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - - '@types/babel__generator@7.6.8': - resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + '@oxc-project/types@0.124.0': + resolution: {integrity: sha512-VBFWMTBvHxS11Z5Lvlr3IWgrwhMTXV+Md+EQF0Xf60+wAdsGFTBx7X7K/hP4pi8N7dcm1RvcHwDxZ16Qx8keUg==} - '@types/babel__template@7.4.4': - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + '@oxc-project/types@0.130.0': + resolution: {integrity: sha512-ibD2usx9JRu7f5pu2tMKMI4cpA4NgXJQoYRP4pQ7Pxmn1l6k/53qWtQWZayhYy3X4QZkt90Ot+mJEaeXouio6Q==} - '@types/babel__traverse@7.20.6': - resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} - - '@types/earcut@3.0.0': - resolution: {integrity: sha512-k/9fOUGO39yd2sCjrbAJvGDEQvRwRnQIZlBz43roGwUZo5SHAmyVvSFyaVVZkicRVCaDXPKlbxrUcBuJoSWunQ==} - - '@types/eslint-scope@3.7.7': - resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} - - '@types/eslint@9.6.1': - resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} - - '@types/estree@1.0.6': - resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - - '@types/estree@1.0.9': - resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} - - '@types/json-schema@7.0.15': - resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - - '@types/node@22.13.1': - resolution: {integrity: sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==} + '@pixi/colord@2.9.6': + resolution: {integrity: sha512-nezytU2pw587fQstUu1AsJZDVEynjskwOL+kibwcdxsMBFqPsFFNA7xl0ii/gXuDi6M0xj3mfRJj8pBSc2jCfA==} - '@types/react-dom@19.0.3': - resolution: {integrity: sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA==} + '@pixi/sound@6.0.1': + resolution: {integrity: sha512-hpFlQSScAR2L/CsEoIvDi7s1oGsu8y9Zd742Vd3982N+q3IF2vFuIfV9HN4ryjlGnhCT8yBlEgs1gp4G9Rt9TA==} peerDependencies: - '@types/react': ^19.0.0 + pixi.js: ^8.0.0 - '@types/react@19.0.8': - resolution: {integrity: sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw==} + '@polka/url@1.0.0-next.29': + resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} - '@types/trusted-types@2.0.7': - resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + '@quansync/fs@1.0.0': + resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} - '@unocss/astro@65.4.3': - resolution: {integrity: sha512-yhPKH4CT2CFjvKR8lL6oS/7jarMWp4iSnYcNlTlZLmvTIS3dGxyhAsVy/xkdzdJ6sM+6FS0hUuQNv+NYvArRNg==} - peerDependencies: - vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 - peerDependenciesMeta: - vite: - optional: true - - '@unocss/cli@65.4.3': - resolution: {integrity: sha512-pZESqf5tS5AjATkAP11M0ecIiias0//nir7MgUQLs/v2GX0x7K0KhVTJ50TiFePff0TnwTHheDNJGR3gesDiVg==} - engines: {node: '>=14'} - hasBin: true - - '@unocss/config@65.4.3': - resolution: {integrity: sha512-Z3tnQ10UjM09Y1yVqfCYfZEh2pXFQlUQ1g188mMWxjXWEIXeei3f9dIApRBgC+xcPE6prqdu3fDC5emU+sqyxw==} - engines: {node: '>=14'} + '@rolldown/binding-android-arm64@1.0.1': + resolution: {integrity: sha512-fJI3I0r3C3Oj/zdBCpaCmBRZYf07xpaq4yCfDDoSFm+beWNzbIl26puW8RraUdugoJw/95zerNOn6jasAhzSmg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] - '@unocss/core@65.4.3': - resolution: {integrity: sha512-luFgdcchSlNrYSaDvU2176T2PPQZdxqfREVbxEXNXlFEgyEFrx5hOSUXoJtJSZjRhAcE6zkWyLDf/JkQJ5Eeyw==} + '@rolldown/binding-darwin-arm64@1.0.1': + resolution: {integrity: sha512-cKnAhWEsV7TPcA/5EAteDp6KcJZBQ2G+BqE7zayMMi7kMvwRsbv7WT9aOnn0WNl4SKEIf43vjS31iUPu80nzXg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] - '@unocss/extractor-arbitrary-variants@65.4.3': - resolution: {integrity: sha512-RhSOOzOxkNjJl9zeglaBe0U+o39jleCCNPWJ87DDJA3ckbyylIIf21ZwY1Xu76rmdar5DT9ob7ucuPfEpJLN9A==} + '@rolldown/binding-darwin-x64@1.0.1': + resolution: {integrity: sha512-YKrVwQjIRBPo+5G/u03wGjbdy4q7pyzCe93DK9VJ7zkVmeg8LJ7GbgsiHWdR4xSoe4CAXRD7Bcjgbtr64bkXNg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] - '@unocss/inspector@65.4.3': - resolution: {integrity: sha512-mj3K0WtnP0DuonQPzxkXhLMBU5qi13dpxaJcEOSv+EBMPlJbww0bj7K7uaFqXv8LPufs/hkQzI9yjOrEzR5WBQ==} + '@rolldown/binding-freebsd-x64@1.0.1': + resolution: {integrity: sha512-z/oBsREo46SsFqBwYtFe0kpJeBijAT48O/WXLI4suiCLBkr03RTtTJMCzSdDd2znlh8VJizL09XVkQgk8IZonw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] - '@unocss/postcss@65.4.3': - resolution: {integrity: sha512-ZHlWfArfhhWBVhUeAETrtnD7nhqpfXv5muGrJCSDHmjgFJX8jtDa6rf52ICCFWEOe8p2dku7o27o26pGXYTYJg==} - engines: {node: '>=14'} - peerDependencies: - postcss: ^8.4.21 + '@rolldown/binding-linux-arm-gnueabihf@1.0.1': + resolution: {integrity: sha512-ik8q7GM11zxvYxFc2PeDcT6TBvhCQMaUxfph/M5l9sKuTs/Sjg3L+Byw0F7w0ZVLBZmx30P+gG0ECzzN+MFcmQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] - '@unocss/preset-attributify@65.4.3': - resolution: {integrity: sha512-kN8levkt+BwzzWKA6glthasuFt/Cplc70oxzAYd/gZcosxwDK5+MmxjGDG5aLLu2PA58tPHUZ+ltW/QG5BM+Xw==} + '@rolldown/binding-linux-arm64-gnu@1.0.1': + resolution: {integrity: sha512-QoSx2EkyrrdZ6kcyE8stqZ62t0Yra8Fs5ia9lOxJrh6TMQJK7gQKmscdTHf7pOXKREKrVwOtJcQG3qVSfc866A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] - '@unocss/preset-icons@65.4.3': - resolution: {integrity: sha512-g1WNamvYOIdD8YAOvZ5h4g3peel3rLTtKvB0wX4pVL5exsYsoyc0tmiGm57k+ZmnIucqSzxoUZ/vjHDLAViahw==} + '@rolldown/binding-linux-arm64-musl@1.0.1': + resolution: {integrity: sha512-uwNwFpwKeNiZawfAWBgg0VIztPTV3ihhh1vV334h9ivnNLorxnQMU6Fz8wG1Zb4Qh9LC1/MkcyT3YlDXG3Rsgg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] - '@unocss/preset-mini@65.4.3': - resolution: {integrity: sha512-JajAF18DKJRXgd9usrAYTcHUtZy606mD396ZswDgw/mUSu529tuiT6LOD43aJMYHgPEw7wKYjiGFHkeBTHijuQ==} + '@rolldown/binding-linux-ppc64-gnu@1.0.1': + resolution: {integrity: sha512-zY1bul7OWr7DFBiJ++wofXvnr8B45ce3QsQUhKrIhXsygAh7bTkwyeM1bi1a2g5C/yC/N8TZyGDEoMfm/l9mpg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] - '@unocss/preset-tagify@65.4.3': - resolution: {integrity: sha512-8/MbMbgdvj1A87XNVVzD8gFVqywaSJAD3Bv8RwjcFn0rwlgZY0PdTBYo3M3FH25axb4znzXBmLZdEBVZOGUosg==} + '@rolldown/binding-linux-s390x-gnu@1.0.1': + resolution: {integrity: sha512-0frlsT/f4Ft6I7SMESTKnF3cZsdicQn1dCMkF/jT9wDLE+gGoiQfv1nmT9e+s7s/fekvvy6tZM2jHvI2tkbJDQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] - '@unocss/preset-typography@65.4.3': - resolution: {integrity: sha512-DEo7GECG0AQ8FkzH/x8QCEL5BR1D+GNoxHGmNxc7rFKghJONVyJ3jROA9mDmWNAva8JygN4Up+lzPZG3mNYezQ==} + '@rolldown/binding-linux-x64-gnu@1.0.1': + resolution: {integrity: sha512-XABVmGp9Tg0WspTVvwduTc4fpqy6JnAUrSQe6OuyqD/03nI7r0O9OWUkMIwFrjKAIqolvqoA4ZrJppgwE0Gxmw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] - '@unocss/preset-uno@65.4.3': - resolution: {integrity: sha512-gxELOQwR3YbMLR+WjYz3m/Zb6VXa8O0Xln0rfS2TI7OXXoQ1twak5zwYPrOI5fJF8lJ5yyKUiXiOR8UEPBpoCQ==} + '@rolldown/binding-linux-x64-musl@1.0.1': + resolution: {integrity: sha512-bV4fzswuzVcKD90o/VM6QqKxnxlDq0g2BISDLNVmxrnhpv1DDbyPhCIjYfvzYLV+MvkKKnQt2Q6AO86SEBULUQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] - '@unocss/preset-web-fonts@65.4.3': - resolution: {integrity: sha512-edkyohQ4+qjuOxIJf+NeQiEayB47A9eA2NhBLbcqZ0OfMpN8tRZPVW5cyB3b5Ef253NGMd4S8H/96vGTBpqOBA==} + '@rolldown/binding-openharmony-arm64@1.0.1': + resolution: {integrity: sha512-/Mh0Zhq3OP7fVs0kcQHZP6lZEthMGTaSf8UBQYSFEZDWGXXlEC+nJ6EqenaK2t4LBXMe3A+K/G2BVXXdtOr4PQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] - '@unocss/preset-wind@65.4.3': - resolution: {integrity: sha512-KM13xIARNeZ/ZKJr33fZ89l79wgI+1Oo8VPJzmckLjbH9IGOhcH2GON7wVIxQqqqM9IM3vALEqw2KNdM6ontWw==} + '@rolldown/binding-wasm32-wasi@1.0.1': + resolution: {integrity: sha512-+1xc9X45l8ufsBAm6Gjvx2qDRIY9lTVt0cgWNcJ+1gdhXvkbxePA60yRTwSTuXL09CMhyJmjpV7E3NoyxbqFQQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] - '@unocss/reset@65.4.3': - resolution: {integrity: sha512-f9QnMtY1yPS1HEIkeKmSwUYcp4QS6zdo9ZcIFE9PDSLOcns3v+M1lTQg8mLChxJHVl73Cf6PofWVh5tmnxV53Q==} + '@rolldown/binding-win32-arm64-msvc@1.0.1': + resolution: {integrity: sha512-1D+UqZdfnuR+Jy1GgMJwi85bD40H21uNmOPRWQhw4oRSuolZ/B5rixZ45DK2KXOTCvmVCecauWgEhbw8bI7tOw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] - '@unocss/rule-utils@65.4.3': - resolution: {integrity: sha512-bzRRdb9mb82IvgOt3KiRyUh/njRfJC3hoV84lMyUPryT8YTEP/hl6kt2KQ2l1K3WDz7ZPQXVi2eqUbqc+AUpwg==} - engines: {node: '>=14'} + '@rolldown/binding-win32-x64-msvc@1.0.1': + resolution: {integrity: sha512-INAycaWuhlOK3wk4mRHGsdgwYWmd9cChdPdE9bwWmy6rn9VqVNYNFGhOdXrofXUxwHIncSiPNb8tNm8knDVIeQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] - '@unocss/transformer-attributify-jsx@65.4.3': - resolution: {integrity: sha512-GI0joW6+jG3sLMzqDxT/Nr0lGarHKsXQzpKQt1LfBGEDgNSQZtDZ1IGlkdZeErRFvWcDLWU0xm2LikLS4Az8kw==} + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@unocss/transformer-compile-class@65.4.3': - resolution: {integrity: sha512-AzLeic0ESQ/yhLKfkSsQ72wQLkKEPsmX578+ZKcPSRh/HM5tfNz8RqffOHr6YOEKKTaZHN23OqbA511amRKC1w==} + '@tybys/wasm-util@0.10.2': + resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} - '@unocss/transformer-directives@65.4.3': - resolution: {integrity: sha512-e3zZYjXqHSWb6YrC09/FnCsndhZdRzmYhPubTzOjnvb5K0ihIiLvHx9c2TRPWvMspXs0wHKQsLW5fAs8oyimeQ==} + '@types/earcut@3.0.0': + resolution: {integrity: sha512-k/9fOUGO39yd2sCjrbAJvGDEQvRwRnQIZlBz43roGwUZo5SHAmyVvSFyaVVZkicRVCaDXPKlbxrUcBuJoSWunQ==} - '@unocss/transformer-variant-group@65.4.3': - resolution: {integrity: sha512-nZNgKLclhIjfuqCaZTmJwhWSByL7vnhb3l/ChRX4qtWOweRLro79r6MvfcqQNrweK5nCw4yibsXCrFUWq7Jj5w==} + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} - '@unocss/vite@65.4.3': - resolution: {integrity: sha512-YajF8Z2J/KvXdnC5BsGJjt3fm4D14vmYaHdlTyzi92Rkh/67JtaCz2OhElDoF6k4S4fm9B8uLRP10p+smRe9Fw==} - peerDependencies: - vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 + '@types/node@22.13.1': + resolution: {integrity: sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==} - '@unocss/webpack@65.4.3': - resolution: {integrity: sha512-jD2vmKSenoJNjt8upRI3S4OvucamicuJ0GuPnNDPl1kFGtdZb9dJX0cNABCx00xORZg/4rP52/xeDHVCCU97HA==} + '@types/react-dom@19.2.3': + resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==} peerDependencies: - webpack: ^4 || ^5 + '@types/react': ^19.2.0 - '@vitejs/plugin-react@4.3.4': - resolution: {integrity: sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - vite: ^4.2.0 || ^5.0.0 || ^6.0.0 + '@types/react@19.2.14': + resolution: {integrity: sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==} - '@vscode/web-custom-data@0.4.13': - resolution: {integrity: sha512-2ZUIRfhofZ/npLlf872EBnPmn27Kt4M2UssmQIfnJvgGgMYZJ5fvtHEDnttBBf2hnVtBgNCqZMVHJA+wsFVqTA==} + '@types/trusted-types@2.0.7': + resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} - '@vue/compiler-core@3.5.13': - resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} + '@unocss/cli@66.6.8': + resolution: {integrity: sha512-dJ4AmrhCtQwEDJtpFG7AgJ4Qi4GWnNgWWlLWq4DhKBOCcvldr9k98mscdhs3MOwph25DIxU5MdLRAg/OS1JryQ==} + engines: {node: '>=14'} + hasBin: true - '@vue/compiler-dom@3.5.13': - resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} + '@unocss/config@66.6.8': + resolution: {integrity: sha512-f+a8OyhD7ZoK8Pa1b3Cbx1RQc3n5x+Qht/cHg3wh/g4DNQIjBI2EqwSLfBigWhdO96zIqFAdyTlO3onmrJwUOw==} + engines: {node: '>=14'} - '@vue/compiler-sfc@3.5.13': - resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==} + '@unocss/core@66.6.8': + resolution: {integrity: sha512-P9IlQfgms+8/nka7fBhiiWU4SPwrTNKbTdK0z1SLnttXMHHjsB2zpG+Vi1JQDpICfY9Y1/2pWtguPE+zeOVu9Q==} - '@vue/compiler-ssr@3.5.13': - resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} + '@unocss/extractor-arbitrary-variants@66.6.8': + resolution: {integrity: sha512-cOXstpPTOLt/HYcL0OsqFkNau0e8ktZ5Q8fgnXBZjmLGmi+VzdESNlwxZyCXLuamZGnbrZ8lDsKdsGG7P1pMKQ==} - '@vue/reactivity@3.5.13': - resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==} + '@unocss/inspector@66.6.8': + resolution: {integrity: sha512-g8uRzXDdmoNRjXX/mZP7m0rWXLtOimyOW7+VFK6FNxRWBmvIGYgTLHkutF6Wyh9lLPDYx3pkkEmfgL35BDT3Sg==} - '@vue/runtime-core@3.5.13': - resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==} + '@unocss/postcss@66.6.8': + resolution: {integrity: sha512-wBbcSBSwWjQ4YhgcT4f2N0FUeRnO/AOnpb90nElEdTipNiLscyo7d2B5EpC/TG/4JRoiSXqZO5bWXiT9FdcJmA==} + engines: {node: '>=14'} + peerDependencies: + postcss: ^8.4.21 - '@vue/runtime-dom@3.5.13': - resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==} + '@unocss/preset-attributify@66.6.8': + resolution: {integrity: sha512-YxyRSF5rq0WbY8kCG0gpj3DSXPL89QGxZeqABmceCzPJbXJBBHEJz/pgBPmzSa2Ziulgs0AEkHzWFPfpb2uGTA==} - '@vue/server-renderer@3.5.13': - resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==} - peerDependencies: - vue: 3.5.13 + '@unocss/preset-icons@66.6.8': + resolution: {integrity: sha512-+zD5TNGZIXvVOMcvDIYaTXinffpDMERGj6Ch8WTtJluA6qHHBvRuFexoU2bY8nF1r0HZkYzNT9C+RujFSP+6TA==} - '@vue/shared@3.5.13': - resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + '@unocss/preset-mini@66.6.8': + resolution: {integrity: sha512-vAechrReO7LtWzFAeF54P7CintG2m65SlVlBsi1x2Ru7IdgUNJEHII0MfXUvf9r1x8vsIlhATyaqqtBVT6ps/w==} - '@webassemblyjs/ast@1.14.1': - resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} + '@unocss/preset-tagify@66.6.8': + resolution: {integrity: sha512-cG6zBYswtWTpeQe/Lb1Bh+IzU4Ck+VI8rpYvrnvSGl22rJjAsXd+buB1P0PjyDpoe924rq0bLTayZ8r6Ayyyvw==} - '@webassemblyjs/floating-point-hex-parser@1.13.2': - resolution: {integrity: sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==} + '@unocss/preset-typography@66.6.8': + resolution: {integrity: sha512-wOApJpE0QfeOTWN5RuQts8zS6PXhTZIfjpt6cBj8dmv7+GlIQlwopxL7wcDb2wVwdCByuMvUbWl7nC3kz/iFTA==} - '@webassemblyjs/helper-api-error@1.13.2': - resolution: {integrity: sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==} + '@unocss/preset-uno@66.6.8': + resolution: {integrity: sha512-z01Rw/rBuahRulwQRnobUFnGqyU+UenOLz72KGn4p0Yh8gBC44fPlNHsOWA0TNediHRJg33HptX4kx16HCVWDg==} - '@webassemblyjs/helper-buffer@1.14.1': - resolution: {integrity: sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==} + '@unocss/preset-web-fonts@66.6.8': + resolution: {integrity: sha512-AgEHO8h0AkeOT57AOE9PS7dJOa5Rfr0gIyz/FxA7vJ/FwgQL70uX+bRW8kmoH81zcjo5xBP2IX3Z6A8VAOo3Vw==} - '@webassemblyjs/helper-numbers@1.13.2': - resolution: {integrity: sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==} + '@unocss/preset-wind3@66.6.8': + resolution: {integrity: sha512-WNTeDAYCatmEFjBJ4itUmz0TElBvNFqjh5i2/ianDJO/vkd+IYUb03jEPLUppVlvMhy8bN8AunP0AtW3Xf2psA==} - '@webassemblyjs/helper-wasm-bytecode@1.13.2': - resolution: {integrity: sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==} + '@unocss/preset-wind4@66.6.8': + resolution: {integrity: sha512-CheOm7KXOsTI5t4RXgeYz95CO5p589F6jsyYp+inOCk4N0/d+DWiDHrQ+V0x0HWs3JXWlD+/Va/yXjlc3o2sIw==} - '@webassemblyjs/helper-wasm-section@1.14.1': - resolution: {integrity: sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==} + '@unocss/preset-wind@66.6.8': + resolution: {integrity: sha512-F0mdmwK/HelYOgBRMHl+Yx/VyARCQJtPlcgPBejI3E9ZWOZlKS7hvPqPrgvS63WTGMHgM3/22cGuYYFjpi/ugA==} - '@webassemblyjs/ieee754@1.13.2': - resolution: {integrity: sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==} + '@unocss/rule-utils@66.6.8': + resolution: {integrity: sha512-WR35L07mLP6PElD4hlUHo5KbQ48uz2HT/XCuJyAsHP+15Gv6539hPWA5SresPuva9r8rl+PeGIgMSIKf4A5Ihw==} + engines: {node: '>=14'} - '@webassemblyjs/leb128@1.13.2': - resolution: {integrity: sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==} + '@unocss/transformer-attributify-jsx@66.6.8': + resolution: {integrity: sha512-g+7lvm+8V1MnJ21ialTxFBonCTtenn/KcZQbm0JfvQjgG+KuuSnt3BGEcXAHQZu3eBDGuJuasTHiXWwzCYIRBQ==} - '@webassemblyjs/utf8@1.13.2': - resolution: {integrity: sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==} + '@unocss/transformer-compile-class@66.6.8': + resolution: {integrity: sha512-37dFuzgYo8ki033KmuvyZXugQRVH1c3+/z5kcWLPhcMR8UJscAtjgRx80S1UvWup2q6TPxPpmy/rMbqWvs3jfg==} - '@webassemblyjs/wasm-edit@1.14.1': - resolution: {integrity: sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==} + '@unocss/transformer-directives@66.6.8': + resolution: {integrity: sha512-9hC3mQ8eycliW/igI9le0LovTIMBKoL6crucTkr4MmWuNqICMvNxTmGj5Xh64olBPnascevFwam6xsy+J1lX4Q==} - '@webassemblyjs/wasm-gen@1.14.1': - resolution: {integrity: sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==} + '@unocss/transformer-variant-group@66.6.8': + resolution: {integrity: sha512-+t7gJDW3W3z3/f8zBf0DfV2UZyGyFOwG5CIsIj5ofu3VJ91mKD/5ZAH8fD3cryXCBSqslj4yv+8R+BLV07T5AA==} - '@webassemblyjs/wasm-opt@1.14.1': - resolution: {integrity: sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==} + '@unocss/vite@66.6.8': + resolution: {integrity: sha512-bXfEnEHdW7zTGLIYU16MsfKSFy3Q47Pevhrt5f9fOGzC4UI1JGkkoQSfoFpXZGliDrhoSFK4Msz9Jt43Ta4j+w==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 || ^7.0.0-0 || ^8.0.0-0 - '@webassemblyjs/wasm-parser@1.14.1': - resolution: {integrity: sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==} + '@vitejs/plugin-react@6.0.2': + resolution: {integrity: sha512-DlSMqo4WhThw4vB8Mpn0Woe9J+Jfq1geJ61AKW0QEgLzGMNwtIMdxbDUzLxcun8W7NbJO0e2Jg/Nxm3cCSVzzg==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@rolldown/plugin-babel': ^0.1.7 || ^0.2.0 + babel-plugin-react-compiler: ^1.0.0 + vite: ^8.0.0 + peerDependenciesMeta: + '@rolldown/plugin-babel': + optional: true + babel-plugin-react-compiler: + optional: true - '@webassemblyjs/wast-printer@1.14.1': - resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==} + '@vscode/web-custom-data@0.4.13': + resolution: {integrity: sha512-2ZUIRfhofZ/npLlf872EBnPmn27Kt4M2UssmQIfnJvgGgMYZJ5fvtHEDnttBBf2hnVtBgNCqZMVHJA+wsFVqTA==} '@webgpu/types@0.1.70': resolution: {integrity: sha512-LFiNHHKMvmAEvwVew3JLJmTdShhbdwRFSImUshGhE2mGE8ybQzIo63l5uRp+YKnNx+8Qno8Kf6gN+DKMreIJCA==} @@ -902,44 +712,11 @@ packages: resolution: {integrity: sha512-KRYzxepc14G/CEpEGc3Yn+JKaAeT63smlDr+vjB8jRfgTBBI9wRj/nkQEO+ucV8p8I9bfKLWp37uHgFrbntPvw==} engines: {node: '>=10.0.0'} - '@xtuc/ieee754@1.2.0': - resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} - - '@xtuc/long@4.2.2': - resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} - - acorn-import-phases@1.0.4: - resolution: {integrity: sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==} - engines: {node: '>=10.13.0'} - peerDependencies: - acorn: ^8.14.0 - - acorn@8.14.0: - resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} - engines: {node: '>=0.4.0'} - hasBin: true - acorn@8.16.0: resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} engines: {node: '>=0.4.0'} hasBin: true - ajv-formats@2.1.1: - resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - - ajv-keywords@5.1.0: - resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} - peerDependencies: - ajv: ^8.8.2 - - ajv@8.20.0: - resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} - ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -952,63 +729,24 @@ packages: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - - baseline-browser-mapping@2.10.29: - resolution: {integrity: sha512-Asa2krT+XTPZINCS+2QcyS8WTkObE77RwkydwF7h6DmnKqbvlalz93m/dnphUyCa6SWSP51VgtEUf2FN+gelFQ==} - engines: {node: '>=6.0.0'} - hasBin: true - - binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.24.4: - resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - - browserslist@4.28.2: - resolution: {integrity: sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - bundle-require@5.1.0: - resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - peerDependencies: - esbuild: '>=0.18' - - cac@6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} - - caniuse-lite@1.0.30001697: - resolution: {integrity: sha512-GwNPlWJin8E+d7Gxq96jxM6w0w+VFeyyXRsjU58emtkYqnbwHqXm5uT2uCmO0RQE9htWknOP4xtBlLmM/gWxvQ==} - - caniuse-lite@1.0.30001792: - resolution: {integrity: sha512-hVLMUZFgR4JJ6ACt1uEESvQN1/dBVqPAKY0hgrV70eN3391K6juAfTjKZLKvOMsx8PxA7gsY1/tLMMTcfFLLpw==} + cac@7.0.0: + resolution: {integrity: sha512-tixWYgm5ZoOD+3g6UTea91eow5z6AAHaho3g0V9CNSNb45gM8SmflpAc+GRd1InC4AqN/07Unrgp56Y94N9hJQ==} + engines: {node: '>=20.19.0'} chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - - chrome-trace-event@1.0.4: - resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} - engines: {node: '>=6.0'} + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} @@ -1036,38 +774,30 @@ packages: confbox@0.1.8: resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} - consola@3.4.0: - resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==} + consola@3.4.2: + resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} engines: {node: ^14.18.0 || >=16.10.0} - convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - - css-tree@3.1.0: - resolution: {integrity: sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==} + css-tree@3.2.1: + resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - csstype@3.1.3: - resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - - debug@4.4.0: - resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} decode-uri-component@0.4.1: resolution: {integrity: sha512-+8VxcR21HhTy8nOt6jf20w0c9CADrw1O8d+VZ/YzzCt4bJ3uBjw+D1q2osAB8RnpwwaeYBxy0HyKQxD5JBMuuQ==} engines: {node: '>=14.16'} - defu@6.1.4: - resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + defu@6.1.7: + resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} + + destr@2.0.5: + resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} - destr@2.0.3: - resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==} + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} didyoumean2@4.1.0: resolution: {integrity: sha512-qTBmfQoXvhKO75D/05C8m+fteQmn4U46FWYiLhXtZQInzitXLWY0EQ/2oKnpAz9g2lQWW8jYcLcT+hPJGT+kig==} @@ -1079,36 +809,14 @@ packages: earcut@3.0.2: resolution: {integrity: sha512-X7hshQbLyMJ/3RPhyObLARM2sNxxmRALLKx1+NVFFnQ9gKzmCrxm9+uLIAdBcvc8FNLpctqlQ2V6AE92Ol9UDQ==} - electron-to-chromium@1.5.354: - resolution: {integrity: sha512-JaBHwWcfIdmSAfWM5l3uwjGd431j8YEMikZ+K/2nXVuBqJKyZ0f+2h4n4JY5AyNiZmnY9qQr2RU3v9DxDmHMNg==} - - electron-to-chromium@1.5.93: - resolution: {integrity: sha512-M+29jTcfNNoR9NV7la4SwUqzWAxEwnc7ThA5e1m6LRSotmpfpCpLcIfgtSCVL+MllNLgAyM/5ru86iMRemPzDQ==} - emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - enhanced-resolve@5.21.3: - resolution: {integrity: sha512-QyL119InA+XXEkNLNTPCXPugSvOfhwv0JOlGNzvxs0hZaiHLNvXSpudUWsOlsXGWJh8G6ckCScEkVHfX3kw/2Q==} - engines: {node: '>=10.13.0'} - - entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - - es-module-lexer@2.1.0: - resolution: {integrity: sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==} - esbuild@0.23.1: resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} engines: {node: '>=18'} hasBin: true - esbuild@0.24.2: - resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} - engines: {node: '>=18'} - hasBin: true - escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -1117,47 +825,22 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} - eslint-scope@5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} - - esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - - estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - - estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} eventemitter3@5.0.4: resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} - events@3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-glob@3.3.3: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} - fast-uri@3.1.2: - resolution: {integrity: sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==} - fastq@1.19.0: resolution: {integrity: sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==} - fdir@6.4.3: - resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==} + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} peerDependencies: picomatch: ^3 || ^4 peerDependenciesMeta: @@ -1177,16 +860,12 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - gensync@1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} - get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-tsconfig@4.10.0: - resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} + get-tsconfig@4.14.0: + resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} gifuct-js@2.1.2: resolution: {integrity: sha512-rI2asw77u0mGgwhV3qA+OEgYqaDn5UNqgs+Bx0FGwSpuqfYn+Ir6RQY5ENNQ8SbIiG/m5gVa7CD5RriO4f4Lsg==} @@ -1195,23 +874,6 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - glob-to-regexp@0.4.1: - resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - - globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - - globals@15.14.0: - resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} - engines: {node: '>=18'} - - globrex@0.1.2: - resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - - graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} @@ -1220,19 +882,11 @@ packages: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - iconify-icon@2.3.0: - resolution: {integrity: sha512-C0beI9oTDxQz6voI5CKl7MiJf0Lw4UU8K4G4t6pcUDClLmCvuMOpcvd8MAztQ2SfoH0iv7WHdxBFjekKPFKH2Q==} + iconify-icon@3.0.2: + resolution: {integrity: sha512-DYPAumiUeUeT/GHT8x2wrAVKn1FqZJqFH0Y5pBefapWRreV1BBvqBVMb0020YQ2njmbR59r/IathL2d2OrDrxA==} - importx@0.5.1: - resolution: {integrity: sha512-YrRaigAec1sC2CdIJjf/hCH1Wp9Ii8Cq5ROw4k5nJ19FVl2FcJUHZ5gGIb1vs8+JNYIyOJpc2fcufS2330bxDw==} - - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} + import-meta-resolve@4.2.0: + resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} @@ -1253,79 +907,115 @@ packages: ismobilejs@1.1.1: resolution: {integrity: sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==} - jest-worker@27.5.1: - resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} - engines: {node: '>= 10.13.0'} - - jiti@2.4.2: - resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} hasBin: true js-binary-schema-parser@2.0.3: resolution: {integrity: sha512-xezGJmOb4lk/M1ZZLTR/jaBHQ4gG/lqQnJqdIv4721DMggsa1bDVlHXNeHYogaIEHD9vCRv0fcL4hMA+Coarkg==} - js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] - jsesc@3.1.0: - resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} - engines: {node: '>=6'} - hasBin: true + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] - json-schema-traverse@1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] - json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] - kolorist@1.8.0: - resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] - leven@3.1.0: - resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} - engines: {node: '>=6'} + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} + engines: {node: '>= 12.0.0'} lit-analyzer@2.0.3: resolution: {integrity: sha512-XiAjnwVipNrKav7r3CSEZpWt+mwYxrhPRVC7h8knDmn/HWTzzWJvPe+mwBcL2brn4xhItAMzZhFC8tzzqHKmiQ==} hasBin: true - lit-element@4.1.1: - resolution: {integrity: sha512-HO9Tkkh34QkTeUmEdNYhMT8hzLid7YlMlATSi1q4q17HE5d9mrrEHJ/o8O2D0cMi182zK1F3v7x0PWFjrhXFew==} - - lit-html@3.2.1: - resolution: {integrity: sha512-qI/3lziaPMSKsrwlxH/xMgikhQ0EGOX2ICU73Bi/YHFvz2j/yMCIrw4+puF2IpQ4+upd3EWbvnHM9+PnJn48YA==} - - lit@3.2.1: - resolution: {integrity: sha512-1BBa1E/z0O9ye5fZprPtdqnc0BFzxIxTTOO/tQFmyC/hj1O3jL4TfmLBw0WEwjAokdLwpclkvGgDJwTIh0/22w==} - - load-tsconfig@0.2.5: - resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + lit-element@4.2.2: + resolution: {integrity: sha512-aFKhNToWxoyhkNDmWZwEva2SlQia+jfG0fjIWV//YeTaWrVnOxD89dPKfigCUspXFmjzOEUQpOkejH5Ly6sG0w==} - loader-runner@4.3.2: - resolution: {integrity: sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w==} - engines: {node: '>=6.11.5'} + lit-html@3.3.3: + resolution: {integrity: sha512-el8M6jK2o3RXBnrSHX3ZKrsN8zEV63pSExTO1wYJz7QndGYZ8353e2a5PPX+qHe2aGayfnchQmkAojaWAREOIA==} - local-pkg@1.0.0: - resolution: {integrity: sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==} - engines: {node: '>=14'} + lit@3.3.3: + resolution: {integrity: sha512-fycuvZg/hkpozL00lm1pEJH5nN/lr9ZXd6mJI2HSN4+Bzc+LDNdEApJ6HFbPkdFNHLvOplIIuJvxkS4XUxqirw==} lodash.deburr@4.1.0: resolution: {integrity: sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==} - lru-cache@5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - - magic-string@0.30.17: - resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + magic-regexp@0.10.0: + resolution: {integrity: sha512-Uly1Bu4lO1hwHUW0CQeSWuRtzCMNO00CmXtS8N6fyvB3B979GOEEeAkiTUDsmbYLAbvpUS/Kt5c4ibosAzVyVg==} - mdn-data@2.12.2: - resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} - merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + mdn-data@2.27.1: + resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} @@ -1335,46 +1025,35 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} - mime-db@1.54.0: - resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} - engines: {node: '>= 0.6'} + mlly@1.8.2: + resolution: {integrity: sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==} - mlly@1.7.4: - resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} - - mrmime@2.0.0: - resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} + mrmime@2.0.1: + resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} engines: {node: '>=10'} - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - - nanoid@3.3.8: - resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} + nanoid@3.3.12: + resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - neo-async@2.6.2: - resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + node-fetch-native@1.6.7: + resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==} - node-fetch-native@1.6.6: - resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} + ofetch@1.5.1: + resolution: {integrity: sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA==} - node-releases@2.0.19: - resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + oxc-parser@0.124.0: + resolution: {integrity: sha512-h07SFj/tp2U3cf3+LFX6MmOguQiM9ahwpGs0ZK5CGhgL8p4kk24etrJKsEzhXAvo7mfvoKTZooZ5MLKAPRmJ1g==} + engines: {node: ^20.19.0 || >=22.12.0} - node-releases@2.0.44: - resolution: {integrity: sha512-5WUyunoPMsvvEhS8AxHtRzP+oA8UCkJ7YRxatWKjngndhDGLiqEVAQKWjFAiAiuL8zMRGzGSJxFnLetoa43qGQ==} - - normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - - ofetch@1.4.1: - resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} + oxc-walker@0.7.0: + resolution: {integrity: sha512-54B4KUhrzbzc4sKvKwVYm7E2PgeROpGba0/2nlNZMqfDyca+yOor5IMb4WLGBatGDT0nkzYdYuzylg7n3YfB7A==} + peerDependencies: + oxc-parser: '>=0.98.0' - package-manager-detector@0.2.9: - resolution: {integrity: sha512-+vYvA/Y31l8Zk8dwxHhL3JfTuHPm6tlxM2A3GeQyl7ovYnSp1+mzAxClxaOr0qO1TtPxbQxetI7v5XqKLJZk7Q==} + package-manager-detector@1.6.0: + resolution: {integrity: sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==} parse-svg-path@0.1.2: resolution: {integrity: sha512-JyPSBnkTJ0AI8GGJLfMXvKq42cj5c006fnLz6fXy6zfoVjJizi8BNTpu8on8ziI1cKy9d9DGNuY17Ce7wuejpQ==} @@ -1382,24 +1061,21 @@ packages: parse5@5.1.0: resolution: {integrity: sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==} - pathe@1.1.2: - resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - pathe@2.0.2: - resolution: {integrity: sha512-15Ztpk+nov8DR524R4BF7uEuzESgzUEAV4Ah7CUMNGXdE5ELuvxElxGXndBl32vMSsWa1jpNf22Z+Er3sKwq+w==} - - perfect-debounce@1.0.0: - resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + perfect-debounce@2.1.0: + resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} engines: {node: '>=8.6'} - picomatch@4.0.2: - resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} pixi.js@8.18.1: @@ -1408,45 +1084,44 @@ packages: pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} - postcss@8.5.1: - resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} + postcss@8.5.14: + resolution: {integrity: sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==} engines: {node: ^10 || ^12 || >=14} - query-string@9.1.1: - resolution: {integrity: sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==} + quansync@1.0.0: + resolution: {integrity: sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==} + + query-string@9.3.1: + resolution: {integrity: sha512-5fBfMOcDi5SA9qj5jZhWAcTtDfKF5WFdd2uD9nVNlbxVv1baq65aALy6qofpNEGELHvisjjasxQp7BlM9gvMzw==} engines: {node: '>=18'} queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - react-dom@19.0.0: - resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} + react-dom@19.2.6: + resolution: {integrity: sha512-0prMI+hvBbPjsWnxDLxlCGyM8PN6UuWjEUCYmZhO67xIV9Xasa/r/vDnq+Xyq4Lo27g8QSbO5YzARu0D1Sps3g==} peerDependencies: - react: ^19.0.0 - - react-refresh@0.14.2: - resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} - engines: {node: '>=0.10.0'} + react: ^19.2.6 - react@19.0.0: - resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} + react@19.2.6: + resolution: {integrity: sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==} engines: {node: '>=0.10.0'} - readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} + readdirp@5.0.0: + resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} + engines: {node: '>= 20.19.0'} regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + regexp-tree@0.1.27: + resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} + hasBin: true + require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} - require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} @@ -1454,27 +1129,19 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.34.4: - resolution: {integrity: sha512-spF66xoyD7rz3o08sHP7wogp1gZ6itSq22SGa/IZTcUDXDlOyrShwMwkVSB+BUxFRZZCUYqdb3KWDEOMVQZxuw==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} + rolldown@1.0.1: + resolution: {integrity: sha512-X0KQHljNnEkWNqqiz9zJrGunh1B0HgOxLXvnFpCOcadzcy5qohZ3tqMEUg00vncoRovXuK3ZqCT9KnnKzoInFQ==} + engines: {node: ^20.19.0 || >=22.12.0} hasBin: true run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - scheduler@0.25.0: - resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} + scheduler@0.27.0: + resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} - schema-utils@4.3.3: - resolution: {integrity: sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==} - engines: {node: '>= 10.13.0'} - - semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true - - sirv@3.0.0: - resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} + sirv@3.0.2: + resolution: {integrity: sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==} engines: {node: '>=18'} source-map-js@1.2.1: @@ -1504,57 +1171,6 @@ packages: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - - tapable@2.3.3: - resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} - engines: {node: '>=6'} - - terser-webpack-plugin@5.6.0: - resolution: {integrity: sha512-Eum+5ajkaOhf5KbM26osvv21kLD7BaGqQ1UA4Ami4arYwylmGUQTgHFpHDdmJod1q4QXa66p0to/FBKID+J1vA==} - engines: {node: '>= 10.13.0'} - peerDependencies: - '@minify-html/node': '*' - '@swc/core': '*' - '@swc/css': '*' - '@swc/html': '*' - clean-css: '*' - cssnano: '*' - csso: '*' - esbuild: '*' - html-minifier-terser: '*' - lightningcss: '*' - postcss: '*' - uglify-js: '*' - webpack: ^5.1.0 - peerDependenciesMeta: - '@minify-html/node': - optional: true - '@swc/core': - optional: true - '@swc/css': - optional: true - '@swc/html': - optional: true - clean-css: - optional: true - cssnano: - optional: true - csso: - optional: true - esbuild: - optional: true - html-minifier-terser: - optional: true - lightningcss: - optional: true - postcss: - optional: true - uglify-js: - optional: true - terser@5.38.0: resolution: {integrity: sha512-a4GD5R1TjEeuCT6ZRiYMHmIf7okbCPEuhQET8bczV6FrQMMlFXA1n+G0KKjdlFCm3TEHV77GxfZB3vZSUQGFpg==} engines: {node: '>=10'} @@ -1564,11 +1180,12 @@ packages: resolution: {integrity: sha512-w/Te7uMUVeH0CR8vZIjr+XiN41V+30lkDdK+NRIDCUYKKuL9VcmaUEmaPISuwGhLlrTGh5yu18lENtR9axSxYw==} engines: {node: '>=12'} - tinyexec@0.3.2: - resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + tinyexec@1.1.2: + resolution: {integrity: sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==} + engines: {node: '>=18'} - tinyglobby@0.2.10: - resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + tinyglobby@0.2.16: + resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} engines: {node: '>=12.0.0'} to-regex-range@5.0.1: @@ -1585,21 +1202,17 @@ packages: ts-simple-type@2.0.0-next.0: resolution: {integrity: sha512-A+hLX83gS+yH6DtzNAhzZbPfU+D9D8lHlTSd7GeoMRBjOt3GRylDqLTYbdmjA4biWvq2xSfpqfIDj2l0OA/BVg==} - tsconfck@3.1.6: - resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==} - engines: {node: ^18 || >=20} - hasBin: true - peerDependencies: - typescript: ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} tsx@4.19.2: resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} engines: {node: '>=18.0.0'} hasBin: true + type-level-regexp@0.1.17: + resolution: {integrity: sha512-wTk4DH3cxwk196uGLK/E9pE45aLfeKJacKmcEgEOA/q5dnPGNxXt0cfYdFxb57L+sEpf1oJH4Dnx/pnRcku9jg==} + typescript@5.2.2: resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} @@ -1610,29 +1223,39 @@ packages: engines: {node: '>=14.17'} hasBin: true - ufo@1.5.4: - resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + ufo@1.6.4: + resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} - unconfig@0.6.1: - resolution: {integrity: sha512-cVU+/sPloZqOyJEAfNwnQSFCzFrZm85vcVkryH7lnlB/PiTycUkAjt5Ds79cfIshGOZ+M5v3PBDnKgpmlE5DtA==} + unconfig-core@7.5.0: + resolution: {integrity: sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w==} + + unconfig@7.5.0: + resolution: {integrity: sha512-oi8Qy2JV4D3UQ0PsopR28CzdQ3S/5A1zwsUwp/rosSbfhJ5z7b90bIyTwi/F7hCLD4SGcZVjDzd4XoUQcEanvA==} undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - unocss@65.4.3: - resolution: {integrity: sha512-mwSVi0ovPxaDv58yFB7Vm5v1x/q/pUc7aTh7SJbeYoRrpbUGdKiVf20YSQfMqmBNXV9CFDr4o6tabP/58as6RQ==} + unocss@66.6.8: + resolution: {integrity: sha512-stq9FbxedTDkoWrxnNQNnPQXOaM6L2Lobq8HzjXdR2tMc55gtfqDArqL7TESfnN7qeZsIocNYCHLNA4DXq50YQ==} engines: {node: '>=14'} peerDependencies: - '@unocss/webpack': 65.4.3 - vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 + '@unocss/astro': 66.6.8 + '@unocss/postcss': 66.6.8 + '@unocss/webpack': 66.6.8 peerDependenciesMeta: - '@unocss/webpack': + '@unocss/astro': optional: true - vite: + '@unocss/postcss': + optional: true + '@unocss/webpack': optional: true - unplugin@2.1.2: - resolution: {integrity: sha512-Q3LU0e4zxKfRko1wMV2HmP8lB9KWislY7hxXpxd+lGx0PRInE4vhMBVEZwpdVYHvtqzhSrzuIfErsob6bQfCzw==} + unplugin-utils@0.3.1: + resolution: {integrity: sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog==} + engines: {node: '>=20.19.0'} + + unplugin@2.3.11: + resolution: {integrity: sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==} engines: {node: '>=18.12.0'} untitled-pixi-live2d-engine@1.1.0: @@ -1641,51 +1264,34 @@ packages: '@pixi/sound': ^6.0.1 pixi.js: ^8.13.1 - update-browserslist-db@1.1.2: - resolution: {integrity: sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - - update-browserslist-db@1.2.3: - resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - - vite-tsconfig-paths@5.1.4: - resolution: {integrity: sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==} - peerDependencies: - vite: '*' - peerDependenciesMeta: - vite: - optional: true - - vite@6.1.0: - resolution: {integrity: sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + vite@8.0.13: + resolution: {integrity: sha512-MFtjBYgzmSxmgA4RAfjIyXWpGe1oALnjgUTzzV7QLx/TKxCzjtMH6Fd9/eVK+5Fg1qNoz5VAwsmMs/NofrmJvw==} + engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.1.18 + esbuild: ^0.27.0 || ^0.28.0 jiti: '>=1.21.0' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 terser: ^5.16.0 tsx: ^4.8.1 yaml: ^2.4.2 peerDependenciesMeta: '@types/node': optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true jiti: optional: true less: optional: true - lightningcss: - optional: true sass: optional: true sass-embedded: @@ -1719,48 +1325,13 @@ packages: vscode-uri@2.1.2: resolution: {integrity: sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==} - vue-flow-layout@0.1.1: - resolution: {integrity: sha512-JdgRRUVrN0Y2GosA0M68DEbKlXMqJ7FQgsK8CjQD2vxvNSqAU6PZEpi4cfcTVtfM2GVOMjHo7GKKLbXxOBqDqA==} - peerDependencies: - vue: ^3.4.37 - - vue@3.5.13: - resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - watchpack@2.5.1: - resolution: {integrity: sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==} - engines: {node: '>=10.13.0'} - web-component-analyzer@2.0.0: resolution: {integrity: sha512-UEvwfpD+XQw99sLKiH5B1T4QwpwNyWJxp59cnlRwFfhUW6JsQpw5jMeMwi7580sNou8YL3kYoS7BWLm+yJ/jVQ==} hasBin: true - webpack-sources@3.2.3: - resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} - engines: {node: '>=10.13.0'} - - webpack-sources@3.4.1: - resolution: {integrity: sha512-eACpxRN02yaawnt+uUNIF7Qje6A9zArxBbcAJjK1PK3S9Ycg5jIuJ8pW4q8EMnwNZCEGltcjkRx1QzOxOkKD8A==} - engines: {node: '>=10.13.0'} - webpack-virtual-modules@0.6.2: resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} - webpack@5.106.2: - resolution: {integrity: sha512-wGN3qcrBQIFmQ/c0AiOAQBvrZ5lmY8vbbMv4Mxfgzqd/B6+9pXtLo73WuS1dSGXM5QYY3hZnIbvx+K1xxe6FyA==} - engines: {node: '>=10.13.0'} - hasBin: true - peerDependencies: - webpack-cli: '*' - peerDependenciesMeta: - webpack-cli: - optional: true - wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -1769,9 +1340,6 @@ packages: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - yallist@3.1.1: - resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -1782,132 +1350,15 @@ packages: snapshots: - '@ampproject/remapping@2.3.0': - dependencies: - '@jridgewell/gen-mapping': 0.3.8 - '@jridgewell/trace-mapping': 0.3.25 - - '@antfu/install-pkg@1.0.0': - dependencies: - package-manager-detector: 0.2.9 - tinyexec: 0.3.2 - - '@antfu/utils@8.1.0': {} - - '@babel/code-frame@7.26.2': - dependencies: - '@babel/helper-validator-identifier': 7.25.9 - js-tokens: 4.0.0 - picocolors: 1.1.1 - - '@babel/compat-data@7.26.5': {} - - '@babel/core@7.26.7': - dependencies: - '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.5 - '@babel/helper-compilation-targets': 7.26.5 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.7) - '@babel/helpers': 7.26.7 - '@babel/parser': 7.26.7 - '@babel/template': 7.25.9 - '@babel/traverse': 7.26.7 - '@babel/types': 7.26.7 - convert-source-map: 2.0.0 - debug: 4.4.0 - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/generator@7.26.5': - dependencies: - '@babel/parser': 7.26.7 - '@babel/types': 7.26.7 - '@jridgewell/gen-mapping': 0.3.8 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 3.1.0 - - '@babel/helper-compilation-targets@7.26.5': - dependencies: - '@babel/compat-data': 7.26.5 - '@babel/helper-validator-option': 7.25.9 - browserslist: 4.24.4 - lru-cache: 5.1.1 - semver: 6.3.1 - - '@babel/helper-module-imports@7.25.9': - dependencies: - '@babel/traverse': 7.26.7 - '@babel/types': 7.26.7 - transitivePeerDependencies: - - supports-color - - '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.7)': - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.26.7 - transitivePeerDependencies: - - supports-color - - '@babel/helper-plugin-utils@7.26.5': {} - - '@babel/helper-string-parser@7.25.9': {} - - '@babel/helper-validator-identifier@7.25.9': {} - - '@babel/helper-validator-option@7.25.9': {} - - '@babel/helpers@7.26.7': + '@antfu/install-pkg@1.1.0': dependencies: - '@babel/template': 7.25.9 - '@babel/types': 7.26.7 - - '@babel/parser@7.26.7': - dependencies: - '@babel/types': 7.26.7 - - '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.7)': - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - - '@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.26.7)': - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 + package-manager-detector: 1.6.0 + tinyexec: 1.1.2 '@babel/runtime@7.26.7': dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.25.9': - dependencies: - '@babel/code-frame': 7.26.2 - '@babel/parser': 7.26.7 - '@babel/types': 7.26.7 - - '@babel/traverse@7.26.7': - dependencies: - '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.5 - '@babel/parser': 7.26.7 - '@babel/template': 7.25.9 - '@babel/types': 7.26.7 - debug: 4.4.0 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - - '@babel/types@7.26.7': - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@biomejs/biome@1.9.4': optionalDependencies: '@biomejs/cli-darwin-arm64': 1.9.4 @@ -1943,204 +1394,147 @@ snapshots: '@biomejs/cli-win32-x64@1.9.4': optional: true - '@esbuild/aix-ppc64@0.23.1': + '@emnapi/core@1.10.0': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.8.1 optional: true - '@esbuild/aix-ppc64@0.24.2': + '@emnapi/runtime@1.10.0': + dependencies: + tslib: 2.8.1 optional: true - '@esbuild/android-arm64@0.23.1': + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.8.1 optional: true - '@esbuild/android-arm64@0.24.2': + '@esbuild/aix-ppc64@0.23.1': optional: true - '@esbuild/android-arm@0.23.1': + '@esbuild/android-arm64@0.23.1': optional: true - '@esbuild/android-arm@0.24.2': + '@esbuild/android-arm@0.23.1': optional: true '@esbuild/android-x64@0.23.1': optional: true - '@esbuild/android-x64@0.24.2': - optional: true - '@esbuild/darwin-arm64@0.23.1': optional: true - '@esbuild/darwin-arm64@0.24.2': - optional: true - '@esbuild/darwin-x64@0.23.1': optional: true - '@esbuild/darwin-x64@0.24.2': - optional: true - '@esbuild/freebsd-arm64@0.23.1': optional: true - '@esbuild/freebsd-arm64@0.24.2': - optional: true - '@esbuild/freebsd-x64@0.23.1': optional: true - '@esbuild/freebsd-x64@0.24.2': - optional: true - '@esbuild/linux-arm64@0.23.1': optional: true - '@esbuild/linux-arm64@0.24.2': - optional: true - '@esbuild/linux-arm@0.23.1': optional: true - '@esbuild/linux-arm@0.24.2': - optional: true - '@esbuild/linux-ia32@0.23.1': optional: true - '@esbuild/linux-ia32@0.24.2': - optional: true - '@esbuild/linux-loong64@0.23.1': optional: true - '@esbuild/linux-loong64@0.24.2': - optional: true - '@esbuild/linux-mips64el@0.23.1': optional: true - '@esbuild/linux-mips64el@0.24.2': - optional: true - '@esbuild/linux-ppc64@0.23.1': optional: true - '@esbuild/linux-ppc64@0.24.2': - optional: true - '@esbuild/linux-riscv64@0.23.1': optional: true - '@esbuild/linux-riscv64@0.24.2': - optional: true - '@esbuild/linux-s390x@0.23.1': optional: true - '@esbuild/linux-s390x@0.24.2': - optional: true - '@esbuild/linux-x64@0.23.1': optional: true - '@esbuild/linux-x64@0.24.2': - optional: true - - '@esbuild/netbsd-arm64@0.24.2': - optional: true - '@esbuild/netbsd-x64@0.23.1': optional: true - '@esbuild/netbsd-x64@0.24.2': - optional: true - '@esbuild/openbsd-arm64@0.23.1': optional: true - '@esbuild/openbsd-arm64@0.24.2': - optional: true - '@esbuild/openbsd-x64@0.23.1': optional: true - '@esbuild/openbsd-x64@0.24.2': - optional: true - '@esbuild/sunos-x64@0.23.1': optional: true - '@esbuild/sunos-x64@0.24.2': - optional: true - '@esbuild/win32-arm64@0.23.1': optional: true - '@esbuild/win32-arm64@0.24.2': - optional: true - '@esbuild/win32-ia32@0.23.1': optional: true - '@esbuild/win32-ia32@0.24.2': - optional: true - '@esbuild/win32-x64@0.23.1': optional: true - '@esbuild/win32-x64@0.24.2': - optional: true - '@iconify/types@2.0.0': {} - '@iconify/utils@2.3.0': + '@iconify/utils@3.1.3': dependencies: - '@antfu/install-pkg': 1.0.0 - '@antfu/utils': 8.1.0 + '@antfu/install-pkg': 1.1.0 '@iconify/types': 2.0.0 - debug: 4.4.0 - globals: 15.14.0 - kolorist: 1.8.0 - local-pkg: 1.0.0 - mlly: 1.7.4 - transitivePeerDependencies: - - supports-color + import-meta-resolve: 4.2.0 - '@jridgewell/gen-mapping@0.3.8': + '@jridgewell/gen-mapping@0.3.13': dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 - '@jridgewell/resolve-uri@3.1.2': {} + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 - '@jridgewell/set-array@1.2.1': {} + '@jridgewell/resolve-uri@3.1.2': {} - '@jridgewell/source-map@0.3.6': + '@jridgewell/source-map@0.3.11': dependencies: - '@jridgewell/gen-mapping': 0.3.8 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 optional: true - '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/sourcemap-codec@1.5.5': {} - '@jridgewell/trace-mapping@0.3.25': + '@jridgewell/trace-mapping@0.3.31': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.5.5 - '@lit-labs/ssr-dom-shim@1.3.0': {} + '@lit-labs/ssr-dom-shim@1.6.0': {} + + '@lit/context@1.1.6': + dependencies: + '@lit/reactive-element': 2.1.2 - '@lit/context@1.1.3': + '@lit/react@1.0.8(@types/react@19.2.14)': dependencies: - '@lit/reactive-element': 2.0.4 + '@types/react': 19.2.14 - '@lit/react@1.0.7(@types/react@19.0.8)': + '@lit/reactive-element@2.1.2': dependencies: - '@types/react': 19.0.8 + '@lit-labs/ssr-dom-shim': 1.6.0 - '@lit/reactive-element@2.0.4': + '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': dependencies: - '@lit-labs/ssr-dom-shim': 1.3.0 + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.2 + optional: true '@nodelib/fs.scandir@2.1.5': dependencies: @@ -2154,502 +1548,315 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.0 - '@pixi/colord@2.9.6': {} - - '@pixi/sound@6.0.1(pixi.js@8.18.1)': - dependencies: - pixi.js: 8.18.1 - - '@polka/url@1.0.0-next.28': {} - - '@rollup/pluginutils@5.1.4(rollup@4.34.4)': - dependencies: - '@types/estree': 1.0.6 - estree-walker: 2.0.2 - picomatch: 4.0.2 - optionalDependencies: - rollup: 4.34.4 + '@oxc-parser/binding-android-arm-eabi@0.124.0': + optional: true - '@rollup/rollup-android-arm-eabi@4.34.4': + '@oxc-parser/binding-android-arm64@0.124.0': optional: true - '@rollup/rollup-android-arm64@4.34.4': + '@oxc-parser/binding-darwin-arm64@0.124.0': optional: true - '@rollup/rollup-darwin-arm64@4.34.4': + '@oxc-parser/binding-darwin-x64@0.124.0': optional: true - '@rollup/rollup-darwin-x64@4.34.4': + '@oxc-parser/binding-freebsd-x64@0.124.0': optional: true - '@rollup/rollup-freebsd-arm64@4.34.4': + '@oxc-parser/binding-linux-arm-gnueabihf@0.124.0': optional: true - '@rollup/rollup-freebsd-x64@4.34.4': + '@oxc-parser/binding-linux-arm-musleabihf@0.124.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.34.4': + '@oxc-parser/binding-linux-arm64-gnu@0.124.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.34.4': + '@oxc-parser/binding-linux-arm64-musl@0.124.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.34.4': + '@oxc-parser/binding-linux-ppc64-gnu@0.124.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.34.4': + '@oxc-parser/binding-linux-riscv64-gnu@0.124.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.34.4': + '@oxc-parser/binding-linux-riscv64-musl@0.124.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.34.4': + '@oxc-parser/binding-linux-s390x-gnu@0.124.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.34.4': + '@oxc-parser/binding-linux-x64-gnu@0.124.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.34.4': + '@oxc-parser/binding-linux-x64-musl@0.124.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.34.4': + '@oxc-parser/binding-openharmony-arm64@0.124.0': optional: true - '@rollup/rollup-linux-x64-musl@4.34.4': + '@oxc-parser/binding-wasm32-wasi@0.124.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' optional: true - '@rollup/rollup-win32-arm64-msvc@4.34.4': + '@oxc-parser/binding-win32-arm64-msvc@0.124.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.34.4': + '@oxc-parser/binding-win32-ia32-msvc@0.124.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.34.4': + '@oxc-parser/binding-win32-x64-msvc@0.124.0': optional: true - '@types/babel__core@7.20.5': - dependencies: - '@babel/parser': 7.26.7 - '@babel/types': 7.26.7 - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.6 + '@oxc-project/types@0.124.0': {} - '@types/babel__generator@7.6.8': - dependencies: - '@babel/types': 7.26.7 + '@oxc-project/types@0.130.0': {} - '@types/babel__template@7.4.4': - dependencies: - '@babel/parser': 7.26.7 - '@babel/types': 7.26.7 + '@pixi/colord@2.9.6': {} - '@types/babel__traverse@7.20.6': + '@pixi/sound@6.0.1(pixi.js@8.18.1)': dependencies: - '@babel/types': 7.26.7 + pixi.js: 8.18.1 - '@types/earcut@3.0.0': {} + '@polka/url@1.0.0-next.29': {} - '@types/eslint-scope@3.7.7': + '@quansync/fs@1.0.0': dependencies: - '@types/eslint': 9.6.1 - '@types/estree': 1.0.9 - optional: true + quansync: 1.0.0 - '@types/eslint@9.6.1': - dependencies: - '@types/estree': 1.0.9 - '@types/json-schema': 7.0.15 + '@rolldown/binding-android-arm64@1.0.1': optional: true - '@types/estree@1.0.6': {} - - '@types/estree@1.0.9': + '@rolldown/binding-darwin-arm64@1.0.1': optional: true - '@types/json-schema@7.0.15': + '@rolldown/binding-darwin-x64@1.0.1': optional: true - '@types/node@22.13.1': - dependencies: - undici-types: 6.20.0 + '@rolldown/binding-freebsd-x64@1.0.1': optional: true - '@types/react-dom@19.0.3(@types/react@19.0.8)': - dependencies: - '@types/react': 19.0.8 - - '@types/react@19.0.8': - dependencies: - csstype: 3.1.3 - - '@types/trusted-types@2.0.7': {} - - '@unocss/astro@65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3))': - dependencies: - '@unocss/core': 65.4.3 - '@unocss/reset': 65.4.3 - '@unocss/vite': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) - optionalDependencies: - vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) - transitivePeerDependencies: - - rollup - - supports-color - - vue - - '@unocss/cli@65.4.3(rollup@4.34.4)': - dependencies: - '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.4(rollup@4.34.4) - '@unocss/config': 65.4.3 - '@unocss/core': 65.4.3 - '@unocss/preset-uno': 65.4.3 - cac: 6.7.14 - chokidar: 3.6.0 - colorette: 2.0.20 - consola: 3.4.0 - magic-string: 0.30.17 - pathe: 2.0.2 - perfect-debounce: 1.0.0 - tinyglobby: 0.2.10 - transitivePeerDependencies: - - rollup - - supports-color - - '@unocss/config@65.4.3': - dependencies: - '@unocss/core': 65.4.3 - unconfig: 0.6.1 - transitivePeerDependencies: - - supports-color + '@rolldown/binding-linux-arm-gnueabihf@1.0.1': + optional: true - '@unocss/core@65.4.3': {} + '@rolldown/binding-linux-arm64-gnu@1.0.1': + optional: true - '@unocss/extractor-arbitrary-variants@65.4.3': - dependencies: - '@unocss/core': 65.4.3 + '@rolldown/binding-linux-arm64-musl@1.0.1': + optional: true - '@unocss/inspector@65.4.3(vue@3.5.13(typescript@5.7.3))': - dependencies: - '@unocss/core': 65.4.3 - '@unocss/rule-utils': 65.4.3 - colorette: 2.0.20 - gzip-size: 6.0.0 - sirv: 3.0.0 - vue-flow-layout: 0.1.1(vue@3.5.13(typescript@5.7.3)) - transitivePeerDependencies: - - vue + '@rolldown/binding-linux-ppc64-gnu@1.0.1': + optional: true - '@unocss/postcss@65.4.3(postcss@8.5.1)': - dependencies: - '@unocss/config': 65.4.3 - '@unocss/core': 65.4.3 - '@unocss/rule-utils': 65.4.3 - css-tree: 3.1.0 - postcss: 8.5.1 - tinyglobby: 0.2.10 - transitivePeerDependencies: - - supports-color + '@rolldown/binding-linux-s390x-gnu@1.0.1': + optional: true - '@unocss/preset-attributify@65.4.3': - dependencies: - '@unocss/core': 65.4.3 + '@rolldown/binding-linux-x64-gnu@1.0.1': + optional: true - '@unocss/preset-icons@65.4.3': - dependencies: - '@iconify/utils': 2.3.0 - '@unocss/core': 65.4.3 - ofetch: 1.4.1 - transitivePeerDependencies: - - supports-color + '@rolldown/binding-linux-x64-musl@1.0.1': + optional: true - '@unocss/preset-mini@65.4.3': - dependencies: - '@unocss/core': 65.4.3 - '@unocss/extractor-arbitrary-variants': 65.4.3 - '@unocss/rule-utils': 65.4.3 + '@rolldown/binding-openharmony-arm64@1.0.1': + optional: true - '@unocss/preset-tagify@65.4.3': + '@rolldown/binding-wasm32-wasi@1.0.1': dependencies: - '@unocss/core': 65.4.3 + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + optional: true - '@unocss/preset-typography@65.4.3': - dependencies: - '@unocss/core': 65.4.3 - '@unocss/preset-mini': 65.4.3 + '@rolldown/binding-win32-arm64-msvc@1.0.1': + optional: true - '@unocss/preset-uno@65.4.3': - dependencies: - '@unocss/core': 65.4.3 - '@unocss/preset-mini': 65.4.3 - '@unocss/preset-wind': 65.4.3 - '@unocss/rule-utils': 65.4.3 + '@rolldown/binding-win32-x64-msvc@1.0.1': + optional: true - '@unocss/preset-web-fonts@65.4.3': - dependencies: - '@unocss/core': 65.4.3 - ofetch: 1.4.1 + '@rolldown/pluginutils@1.0.1': {} - '@unocss/preset-wind@65.4.3': + '@tybys/wasm-util@0.10.2': dependencies: - '@unocss/core': 65.4.3 - '@unocss/preset-mini': 65.4.3 - '@unocss/rule-utils': 65.4.3 + tslib: 2.8.1 + optional: true - '@unocss/reset@65.4.3': {} + '@types/earcut@3.0.0': {} - '@unocss/rule-utils@65.4.3': - dependencies: - '@unocss/core': 65.4.3 - magic-string: 0.30.17 + '@types/estree@1.0.9': {} - '@unocss/transformer-attributify-jsx@65.4.3': + '@types/node@22.13.1': dependencies: - '@unocss/core': 65.4.3 + undici-types: 6.20.0 + optional: true - '@unocss/transformer-compile-class@65.4.3': + '@types/react-dom@19.2.3(@types/react@19.2.14)': dependencies: - '@unocss/core': 65.4.3 + '@types/react': 19.2.14 - '@unocss/transformer-directives@65.4.3': + '@types/react@19.2.14': dependencies: - '@unocss/core': 65.4.3 - '@unocss/rule-utils': 65.4.3 - css-tree: 3.1.0 + csstype: 3.2.3 - '@unocss/transformer-variant-group@65.4.3': - dependencies: - '@unocss/core': 65.4.3 + '@types/trusted-types@2.0.7': {} - '@unocss/vite@65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3))': + '@unocss/cli@66.6.8': dependencies: - '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.4(rollup@4.34.4) - '@unocss/config': 65.4.3 - '@unocss/core': 65.4.3 - '@unocss/inspector': 65.4.3(vue@3.5.13(typescript@5.7.3)) - chokidar: 3.6.0 - magic-string: 0.30.17 - tinyglobby: 0.2.10 - vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) - transitivePeerDependencies: - - rollup - - supports-color - - vue - - '@unocss/webpack@65.4.3(rollup@4.34.4)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1))': - dependencies: - '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.4(rollup@4.34.4) - '@unocss/config': 65.4.3 - '@unocss/core': 65.4.3 - chokidar: 3.6.0 - magic-string: 0.30.17 - tinyglobby: 0.2.10 - unplugin: 2.1.2 - webpack: 5.106.2(esbuild@0.24.2)(postcss@8.5.1) - webpack-sources: 3.2.3 - transitivePeerDependencies: - - rollup - - supports-color - optional: true + '@jridgewell/remapping': 2.3.5 + '@unocss/config': 66.6.8 + '@unocss/core': 66.6.8 + '@unocss/preset-wind3': 66.6.8 + '@unocss/preset-wind4': 66.6.8 + '@unocss/transformer-directives': 66.6.8 + cac: 7.0.0 + chokidar: 5.0.0 + colorette: 2.0.20 + consola: 3.4.2 + magic-string: 0.30.21 + pathe: 2.0.3 + perfect-debounce: 2.1.0 + tinyglobby: 0.2.16 + unplugin-utils: 0.3.1 - '@vitejs/plugin-react@4.3.4(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))': + '@unocss/config@66.6.8': dependencies: - '@babel/core': 7.26.7 - '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.7) - '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.7) - '@types/babel__core': 7.20.5 - react-refresh: 0.14.2 - vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) - transitivePeerDependencies: - - supports-color + '@unocss/core': 66.6.8 + colorette: 2.0.20 + consola: 3.4.2 + unconfig: 7.5.0 - '@vscode/web-custom-data@0.4.13': {} + '@unocss/core@66.6.8': {} - '@vue/compiler-core@3.5.13': + '@unocss/extractor-arbitrary-variants@66.6.8': dependencies: - '@babel/parser': 7.26.7 - '@vue/shared': 3.5.13 - entities: 4.5.0 - estree-walker: 2.0.2 - source-map-js: 1.2.1 + '@unocss/core': 66.6.8 - '@vue/compiler-dom@3.5.13': + '@unocss/inspector@66.6.8': dependencies: - '@vue/compiler-core': 3.5.13 - '@vue/shared': 3.5.13 + '@unocss/core': 66.6.8 + '@unocss/rule-utils': 66.6.8 + colorette: 2.0.20 + gzip-size: 6.0.0 + sirv: 3.0.2 - '@vue/compiler-sfc@3.5.13': + '@unocss/postcss@66.6.8(postcss@8.5.14)': dependencies: - '@babel/parser': 7.26.7 - '@vue/compiler-core': 3.5.13 - '@vue/compiler-dom': 3.5.13 - '@vue/compiler-ssr': 3.5.13 - '@vue/shared': 3.5.13 - estree-walker: 2.0.2 - magic-string: 0.30.17 - postcss: 8.5.1 - source-map-js: 1.2.1 + '@unocss/config': 66.6.8 + '@unocss/core': 66.6.8 + '@unocss/rule-utils': 66.6.8 + css-tree: 3.2.1 + postcss: 8.5.14 + tinyglobby: 0.2.16 - '@vue/compiler-ssr@3.5.13': + '@unocss/preset-attributify@66.6.8': dependencies: - '@vue/compiler-dom': 3.5.13 - '@vue/shared': 3.5.13 + '@unocss/core': 66.6.8 - '@vue/reactivity@3.5.13': + '@unocss/preset-icons@66.6.8': dependencies: - '@vue/shared': 3.5.13 + '@iconify/utils': 3.1.3 + '@unocss/core': 66.6.8 + ofetch: 1.5.1 - '@vue/runtime-core@3.5.13': + '@unocss/preset-mini@66.6.8': dependencies: - '@vue/reactivity': 3.5.13 - '@vue/shared': 3.5.13 + '@unocss/core': 66.6.8 + '@unocss/extractor-arbitrary-variants': 66.6.8 + '@unocss/rule-utils': 66.6.8 - '@vue/runtime-dom@3.5.13': + '@unocss/preset-tagify@66.6.8': dependencies: - '@vue/reactivity': 3.5.13 - '@vue/runtime-core': 3.5.13 - '@vue/shared': 3.5.13 - csstype: 3.1.3 + '@unocss/core': 66.6.8 - '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.7.3))': + '@unocss/preset-typography@66.6.8': dependencies: - '@vue/compiler-ssr': 3.5.13 - '@vue/shared': 3.5.13 - vue: 3.5.13(typescript@5.7.3) - - '@vue/shared@3.5.13': {} + '@unocss/core': 66.6.8 + '@unocss/rule-utils': 66.6.8 - '@webassemblyjs/ast@1.14.1': + '@unocss/preset-uno@66.6.8': dependencies: - '@webassemblyjs/helper-numbers': 1.13.2 - '@webassemblyjs/helper-wasm-bytecode': 1.13.2 - optional: true - - '@webassemblyjs/floating-point-hex-parser@1.13.2': - optional: true - - '@webassemblyjs/helper-api-error@1.13.2': - optional: true - - '@webassemblyjs/helper-buffer@1.14.1': - optional: true + '@unocss/core': 66.6.8 + '@unocss/preset-wind3': 66.6.8 - '@webassemblyjs/helper-numbers@1.13.2': + '@unocss/preset-web-fonts@66.6.8': dependencies: - '@webassemblyjs/floating-point-hex-parser': 1.13.2 - '@webassemblyjs/helper-api-error': 1.13.2 - '@xtuc/long': 4.2.2 - optional: true + '@unocss/core': 66.6.8 + ofetch: 1.5.1 - '@webassemblyjs/helper-wasm-bytecode@1.13.2': - optional: true - - '@webassemblyjs/helper-wasm-section@1.14.1': + '@unocss/preset-wind3@66.6.8': dependencies: - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/helper-buffer': 1.14.1 - '@webassemblyjs/helper-wasm-bytecode': 1.13.2 - '@webassemblyjs/wasm-gen': 1.14.1 - optional: true + '@unocss/core': 66.6.8 + '@unocss/preset-mini': 66.6.8 + '@unocss/rule-utils': 66.6.8 - '@webassemblyjs/ieee754@1.13.2': + '@unocss/preset-wind4@66.6.8': dependencies: - '@xtuc/ieee754': 1.2.0 - optional: true + '@unocss/core': 66.6.8 + '@unocss/extractor-arbitrary-variants': 66.6.8 + '@unocss/rule-utils': 66.6.8 - '@webassemblyjs/leb128@1.13.2': + '@unocss/preset-wind@66.6.8': dependencies: - '@xtuc/long': 4.2.2 - optional: true - - '@webassemblyjs/utf8@1.13.2': - optional: true + '@unocss/core': 66.6.8 + '@unocss/preset-wind3': 66.6.8 - '@webassemblyjs/wasm-edit@1.14.1': + '@unocss/rule-utils@66.6.8': dependencies: - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/helper-buffer': 1.14.1 - '@webassemblyjs/helper-wasm-bytecode': 1.13.2 - '@webassemblyjs/helper-wasm-section': 1.14.1 - '@webassemblyjs/wasm-gen': 1.14.1 - '@webassemblyjs/wasm-opt': 1.14.1 - '@webassemblyjs/wasm-parser': 1.14.1 - '@webassemblyjs/wast-printer': 1.14.1 - optional: true + '@unocss/core': 66.6.8 + magic-string: 0.30.21 - '@webassemblyjs/wasm-gen@1.14.1': + '@unocss/transformer-attributify-jsx@66.6.8(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': dependencies: - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/helper-wasm-bytecode': 1.13.2 - '@webassemblyjs/ieee754': 1.13.2 - '@webassemblyjs/leb128': 1.13.2 - '@webassemblyjs/utf8': 1.13.2 - optional: true + '@unocss/core': 66.6.8 + oxc-parser: 0.124.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + oxc-walker: 0.7.0(oxc-parser@0.124.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)) + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' - '@webassemblyjs/wasm-opt@1.14.1': + '@unocss/transformer-compile-class@66.6.8': dependencies: - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/helper-buffer': 1.14.1 - '@webassemblyjs/wasm-gen': 1.14.1 - '@webassemblyjs/wasm-parser': 1.14.1 - optional: true + '@unocss/core': 66.6.8 - '@webassemblyjs/wasm-parser@1.14.1': + '@unocss/transformer-directives@66.6.8': dependencies: - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/helper-api-error': 1.13.2 - '@webassemblyjs/helper-wasm-bytecode': 1.13.2 - '@webassemblyjs/ieee754': 1.13.2 - '@webassemblyjs/leb128': 1.13.2 - '@webassemblyjs/utf8': 1.13.2 - optional: true + '@unocss/core': 66.6.8 + '@unocss/rule-utils': 66.6.8 + css-tree: 3.2.1 - '@webassemblyjs/wast-printer@1.14.1': + '@unocss/transformer-variant-group@66.6.8': dependencies: - '@webassemblyjs/ast': 1.14.1 - '@xtuc/long': 4.2.2 - optional: true - - '@webgpu/types@0.1.70': {} - - '@xmldom/xmldom@0.8.13': {} - - '@xtuc/ieee754@1.2.0': - optional: true - - '@xtuc/long@4.2.2': - optional: true + '@unocss/core': 66.6.8 - acorn-import-phases@1.0.4(acorn@8.16.0): + '@unocss/vite@66.6.8(vite@8.0.13(@types/node@22.13.1)(jiti@2.7.0)(terser@5.38.0)(tsx@4.19.2))': dependencies: - acorn: 8.16.0 - optional: true + '@jridgewell/remapping': 2.3.5 + '@unocss/config': 66.6.8 + '@unocss/core': 66.6.8 + '@unocss/inspector': 66.6.8 + chokidar: 5.0.0 + magic-string: 0.30.21 + pathe: 2.0.3 + tinyglobby: 0.2.16 + unplugin-utils: 0.3.1 + vite: 8.0.13(@types/node@22.13.1)(jiti@2.7.0)(terser@5.38.0)(tsx@4.19.2) - acorn@8.14.0: {} + '@vitejs/plugin-react@6.0.2(vite@8.0.13(@types/node@22.13.1)(jiti@2.7.0)(terser@5.38.0)(tsx@4.19.2))': + dependencies: + '@rolldown/pluginutils': 1.0.1 + vite: 8.0.13(@types/node@22.13.1)(jiti@2.7.0)(terser@5.38.0)(tsx@4.19.2) - acorn@8.16.0: - optional: true + '@vscode/web-custom-data@0.4.13': {} - ajv-formats@2.1.1(ajv@8.20.0): - optionalDependencies: - ajv: 8.20.0 - optional: true + '@webgpu/types@0.1.70': {} - ajv-keywords@5.1.0(ajv@8.20.0): - dependencies: - ajv: 8.20.0 - fast-deep-equal: 3.1.3 - optional: true + '@xmldom/xmldom@0.8.13': {} - ajv@8.20.0: - dependencies: - fast-deep-equal: 3.1.3 - fast-uri: 3.1.2 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - optional: true + acorn@8.16.0: {} ansi-regex@5.0.1: {} @@ -2661,50 +1868,14 @@ snapshots: dependencies: color-convert: 2.0.1 - anymatch@3.1.3: - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - - baseline-browser-mapping@2.10.29: - optional: true - - binary-extensions@2.3.0: {} - braces@3.0.3: dependencies: fill-range: 7.1.1 - browserslist@4.24.4: - dependencies: - caniuse-lite: 1.0.30001697 - electron-to-chromium: 1.5.93 - node-releases: 2.0.19 - update-browserslist-db: 1.1.2(browserslist@4.24.4) - - browserslist@4.28.2: - dependencies: - baseline-browser-mapping: 2.10.29 - caniuse-lite: 1.0.30001792 - electron-to-chromium: 1.5.354 - node-releases: 2.0.44 - update-browserslist-db: 1.2.3(browserslist@4.28.2) - optional: true - buffer-from@1.1.2: optional: true - bundle-require@5.1.0(esbuild@0.24.2): - dependencies: - esbuild: 0.24.2 - load-tsconfig: 0.2.5 - - cac@6.7.14: {} - - caniuse-lite@1.0.30001697: {} - - caniuse-lite@1.0.30001792: - optional: true + cac@7.0.0: {} chalk@2.4.2: dependencies: @@ -2712,20 +1883,9 @@ snapshots: escape-string-regexp: 1.0.5 supports-color: 5.5.0 - chokidar@3.6.0: + chokidar@5.0.0: dependencies: - anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - - chrome-trace-event@1.0.4: - optional: true + readdirp: 5.0.0 cliui@8.0.1: dependencies: @@ -2752,26 +1912,22 @@ snapshots: confbox@0.1.8: {} - consola@3.4.0: {} - - convert-source-map@2.0.0: {} + consola@3.4.2: {} - css-tree@3.1.0: + css-tree@3.2.1: dependencies: - mdn-data: 2.12.2 + mdn-data: 2.27.1 source-map-js: 1.2.1 - csstype@3.1.3: {} - - debug@4.4.0: - dependencies: - ms: 2.1.3 + csstype@3.2.3: {} decode-uri-component@0.4.1: {} - defu@6.1.4: {} + defu@6.1.7: {} - destr@2.0.3: {} + destr@2.0.5: {} + + detect-libc@2.1.2: {} didyoumean2@4.1.0: dependencies: @@ -2783,24 +1939,8 @@ snapshots: earcut@3.0.2: {} - electron-to-chromium@1.5.354: - optional: true - - electron-to-chromium@1.5.93: {} - emoji-regex@8.0.0: {} - enhanced-resolve@5.21.3: - dependencies: - graceful-fs: 4.2.11 - tapable: 2.3.3 - optional: true - - entities@4.5.0: {} - - es-module-lexer@2.1.0: - optional: true - esbuild@0.23.1: optionalDependencies: '@esbuild/aix-ppc64': 0.23.1 @@ -2827,66 +1967,18 @@ snapshots: '@esbuild/win32-arm64': 0.23.1 '@esbuild/win32-ia32': 0.23.1 '@esbuild/win32-x64': 0.23.1 - - esbuild@0.24.2: - optionalDependencies: - '@esbuild/aix-ppc64': 0.24.2 - '@esbuild/android-arm': 0.24.2 - '@esbuild/android-arm64': 0.24.2 - '@esbuild/android-x64': 0.24.2 - '@esbuild/darwin-arm64': 0.24.2 - '@esbuild/darwin-x64': 0.24.2 - '@esbuild/freebsd-arm64': 0.24.2 - '@esbuild/freebsd-x64': 0.24.2 - '@esbuild/linux-arm': 0.24.2 - '@esbuild/linux-arm64': 0.24.2 - '@esbuild/linux-ia32': 0.24.2 - '@esbuild/linux-loong64': 0.24.2 - '@esbuild/linux-mips64el': 0.24.2 - '@esbuild/linux-ppc64': 0.24.2 - '@esbuild/linux-riscv64': 0.24.2 - '@esbuild/linux-s390x': 0.24.2 - '@esbuild/linux-x64': 0.24.2 - '@esbuild/netbsd-arm64': 0.24.2 - '@esbuild/netbsd-x64': 0.24.2 - '@esbuild/openbsd-arm64': 0.24.2 - '@esbuild/openbsd-x64': 0.24.2 - '@esbuild/sunos-x64': 0.24.2 - '@esbuild/win32-arm64': 0.24.2 - '@esbuild/win32-ia32': 0.24.2 - '@esbuild/win32-x64': 0.24.2 + optional: true escalade@3.2.0: {} escape-string-regexp@1.0.5: {} - eslint-scope@5.1.1: - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - optional: true - - esrecurse@4.3.0: + estree-walker@3.0.3: dependencies: - estraverse: 5.3.0 - optional: true - - estraverse@4.3.0: - optional: true - - estraverse@5.3.0: - optional: true - - estree-walker@2.0.2: {} + '@types/estree': 1.0.9 eventemitter3@5.0.4: {} - events@3.3.0: - optional: true - - fast-deep-equal@3.1.3: - optional: true - fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2895,16 +1987,13 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.8 - fast-uri@3.1.2: - optional: true - fastq@1.19.0: dependencies: reusify: 1.0.4 - fdir@6.4.3(picomatch@4.0.2): + fdir@6.5.0(picomatch@4.0.4): optionalDependencies: - picomatch: 4.0.2 + picomatch: 4.0.4 fill-range@7.1.1: dependencies: @@ -2915,13 +2004,12 @@ snapshots: fsevents@2.3.3: optional: true - gensync@1.0.0-beta.2: {} - get-caller-file@2.0.5: {} - get-tsconfig@4.10.0: + get-tsconfig@4.14.0: dependencies: resolve-pkg-maps: 1.0.0 + optional: true gifuct-js@2.1.2: dependencies: @@ -2931,45 +2019,17 @@ snapshots: dependencies: is-glob: 4.0.3 - glob-to-regexp@0.4.1: - optional: true - - globals@11.12.0: {} - - globals@15.14.0: {} - - globrex@0.1.2: {} - - graceful-fs@4.2.11: - optional: true - gzip-size@6.0.0: dependencies: duplexer: 0.1.2 has-flag@3.0.0: {} - has-flag@4.0.0: - optional: true - - iconify-icon@2.3.0: + iconify-icon@3.0.2: dependencies: '@iconify/types': 2.0.0 - importx@0.5.1: - dependencies: - bundle-require: 5.1.0(esbuild@0.24.2) - debug: 4.4.0 - esbuild: 0.24.2 - jiti: 2.4.2 - pathe: 1.1.2 - tsx: 4.19.2 - transitivePeerDependencies: - - supports-color - - is-binary-path@2.1.0: - dependencies: - binary-extensions: 2.3.0 + import-meta-resolve@4.2.0: {} is-extglob@2.1.1: {} @@ -2983,29 +2043,60 @@ snapshots: ismobilejs@1.1.1: {} - jest-worker@27.5.1: - dependencies: - '@types/node': 22.13.1 - merge-stream: 2.0.0 - supports-color: 8.1.1 + jiti@2.7.0: {} + + js-binary-schema-parser@2.0.3: {} + + leven@3.1.0: {} + + lightningcss-android-arm64@1.32.0: optional: true - jiti@2.4.2: {} + lightningcss-darwin-arm64@1.32.0: + optional: true - js-binary-schema-parser@2.0.3: {} + lightningcss-darwin-x64@1.32.0: + optional: true - js-tokens@4.0.0: {} + lightningcss-freebsd-x64@1.32.0: + optional: true - jsesc@3.1.0: {} + lightningcss-linux-arm-gnueabihf@1.32.0: + optional: true - json-schema-traverse@1.0.0: + lightningcss-linux-arm64-gnu@1.32.0: optional: true - json5@2.2.3: {} + lightningcss-linux-arm64-musl@1.32.0: + optional: true - kolorist@1.8.0: {} + lightningcss-linux-x64-gnu@1.32.0: + optional: true - leven@3.1.0: {} + lightningcss-linux-x64-musl@1.32.0: + optional: true + + lightningcss-win32-arm64-msvc@1.32.0: + optional: true + + lightningcss-win32-x64-msvc@1.32.0: + optional: true + + lightningcss@1.32.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 lit-analyzer@2.0.3: dependencies: @@ -3019,105 +2110,114 @@ snapshots: vscode-html-languageservice: 3.1.0 web-component-analyzer: 2.0.0 - lit-element@4.1.1: + lit-element@4.2.2: dependencies: - '@lit-labs/ssr-dom-shim': 1.3.0 - '@lit/reactive-element': 2.0.4 - lit-html: 3.2.1 + '@lit-labs/ssr-dom-shim': 1.6.0 + '@lit/reactive-element': 2.1.2 + lit-html: 3.3.3 - lit-html@3.2.1: + lit-html@3.3.3: dependencies: '@types/trusted-types': 2.0.7 - lit@3.2.1: + lit@3.3.3: dependencies: - '@lit/reactive-element': 2.0.4 - lit-element: 4.1.1 - lit-html: 3.2.1 - - load-tsconfig@0.2.5: {} - - loader-runner@4.3.2: - optional: true - - local-pkg@1.0.0: - dependencies: - mlly: 1.7.4 - pkg-types: 1.3.1 + '@lit/reactive-element': 2.1.2 + lit-element: 4.2.2 + lit-html: 3.3.3 lodash.deburr@4.1.0: {} - lru-cache@5.1.1: + magic-regexp@0.10.0: dependencies: - yallist: 3.1.1 + estree-walker: 3.0.3 + magic-string: 0.30.21 + mlly: 1.8.2 + regexp-tree: 0.1.27 + type-level-regexp: 0.1.17 + ufo: 1.6.4 + unplugin: 2.3.11 - magic-string@0.30.17: + magic-string@0.30.21: dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.5.5 - mdn-data@2.12.2: {} - - merge-stream@2.0.0: - optional: true + mdn-data@2.27.1: {} merge2@1.4.1: {} micromatch@4.0.8: dependencies: braces: 3.0.3 - picomatch: 2.3.1 + picomatch: 2.3.2 - mime-db@1.54.0: - optional: true - - mlly@1.7.4: + mlly@1.8.2: dependencies: - acorn: 8.14.0 - pathe: 2.0.2 + acorn: 8.16.0 + pathe: 2.0.3 pkg-types: 1.3.1 - ufo: 1.5.4 - - mrmime@2.0.0: {} + ufo: 1.6.4 - ms@2.1.3: {} + mrmime@2.0.1: {} - nanoid@3.3.8: {} + nanoid@3.3.12: {} - neo-async@2.6.2: - optional: true - - node-fetch-native@1.6.6: {} + node-fetch-native@1.6.7: {} - node-releases@2.0.19: {} - - node-releases@2.0.44: - optional: true + ofetch@1.5.1: + dependencies: + destr: 2.0.5 + node-fetch-native: 1.6.7 + ufo: 1.6.4 - normalize-path@3.0.0: {} + oxc-parser@0.124.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0): + dependencies: + '@oxc-project/types': 0.124.0 + optionalDependencies: + '@oxc-parser/binding-android-arm-eabi': 0.124.0 + '@oxc-parser/binding-android-arm64': 0.124.0 + '@oxc-parser/binding-darwin-arm64': 0.124.0 + '@oxc-parser/binding-darwin-x64': 0.124.0 + '@oxc-parser/binding-freebsd-x64': 0.124.0 + '@oxc-parser/binding-linux-arm-gnueabihf': 0.124.0 + '@oxc-parser/binding-linux-arm-musleabihf': 0.124.0 + '@oxc-parser/binding-linux-arm64-gnu': 0.124.0 + '@oxc-parser/binding-linux-arm64-musl': 0.124.0 + '@oxc-parser/binding-linux-ppc64-gnu': 0.124.0 + '@oxc-parser/binding-linux-riscv64-gnu': 0.124.0 + '@oxc-parser/binding-linux-riscv64-musl': 0.124.0 + '@oxc-parser/binding-linux-s390x-gnu': 0.124.0 + '@oxc-parser/binding-linux-x64-gnu': 0.124.0 + '@oxc-parser/binding-linux-x64-musl': 0.124.0 + '@oxc-parser/binding-openharmony-arm64': 0.124.0 + '@oxc-parser/binding-wasm32-wasi': 0.124.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + '@oxc-parser/binding-win32-arm64-msvc': 0.124.0 + '@oxc-parser/binding-win32-ia32-msvc': 0.124.0 + '@oxc-parser/binding-win32-x64-msvc': 0.124.0 + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' - ofetch@1.4.1: + oxc-walker@0.7.0(oxc-parser@0.124.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)): dependencies: - destr: 2.0.3 - node-fetch-native: 1.6.6 - ufo: 1.5.4 + magic-regexp: 0.10.0 + oxc-parser: 0.124.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) - package-manager-detector@0.2.9: {} + package-manager-detector@1.6.0: {} parse-svg-path@0.1.2: {} parse5@5.1.0: {} - pathe@1.1.2: {} + pathe@2.0.3: {} - pathe@2.0.2: {} - - perfect-debounce@1.0.0: {} + perfect-debounce@2.1.0: {} picocolors@1.1.1: {} - picomatch@2.3.1: {} + picomatch@2.3.2: {} - picomatch@4.0.2: {} + picomatch@4.0.4: {} pixi.js@8.18.1: dependencies: @@ -3135,16 +2235,18 @@ snapshots: pkg-types@1.3.1: dependencies: confbox: 0.1.8 - mlly: 1.7.4 - pathe: 2.0.2 + mlly: 1.8.2 + pathe: 2.0.3 - postcss@8.5.1: + postcss@8.5.14: dependencies: - nanoid: 3.3.8 + nanoid: 3.3.12 picocolors: 1.1.1 source-map-js: 1.2.1 - query-string@9.1.1: + quansync@1.0.0: {} + + query-string@9.3.1: dependencies: decode-uri-component: 0.4.1 filter-obj: 5.1.0 @@ -3152,75 +2254,57 @@ snapshots: queue-microtask@1.2.3: {} - react-dom@19.0.0(react@19.0.0): + react-dom@19.2.6(react@19.2.6): dependencies: - react: 19.0.0 - scheduler: 0.25.0 + react: 19.2.6 + scheduler: 0.27.0 - react-refresh@0.14.2: {} + react@19.2.6: {} - react@19.0.0: {} - - readdirp@3.6.0: - dependencies: - picomatch: 2.3.1 + readdirp@5.0.0: {} regenerator-runtime@0.14.1: {} + regexp-tree@0.1.27: {} + require-directory@2.1.1: {} - require-from-string@2.0.2: + resolve-pkg-maps@1.0.0: optional: true - resolve-pkg-maps@1.0.0: {} - reusify@1.0.4: {} - rollup@4.34.4: + rolldown@1.0.1: dependencies: - '@types/estree': 1.0.6 + '@oxc-project/types': 0.130.0 + '@rolldown/pluginutils': 1.0.1 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.34.4 - '@rollup/rollup-android-arm64': 4.34.4 - '@rollup/rollup-darwin-arm64': 4.34.4 - '@rollup/rollup-darwin-x64': 4.34.4 - '@rollup/rollup-freebsd-arm64': 4.34.4 - '@rollup/rollup-freebsd-x64': 4.34.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.34.4 - '@rollup/rollup-linux-arm-musleabihf': 4.34.4 - '@rollup/rollup-linux-arm64-gnu': 4.34.4 - '@rollup/rollup-linux-arm64-musl': 4.34.4 - '@rollup/rollup-linux-loongarch64-gnu': 4.34.4 - '@rollup/rollup-linux-powerpc64le-gnu': 4.34.4 - '@rollup/rollup-linux-riscv64-gnu': 4.34.4 - '@rollup/rollup-linux-s390x-gnu': 4.34.4 - '@rollup/rollup-linux-x64-gnu': 4.34.4 - '@rollup/rollup-linux-x64-musl': 4.34.4 - '@rollup/rollup-win32-arm64-msvc': 4.34.4 - '@rollup/rollup-win32-ia32-msvc': 4.34.4 - '@rollup/rollup-win32-x64-msvc': 4.34.4 - fsevents: 2.3.3 + '@rolldown/binding-android-arm64': 1.0.1 + '@rolldown/binding-darwin-arm64': 1.0.1 + '@rolldown/binding-darwin-x64': 1.0.1 + '@rolldown/binding-freebsd-x64': 1.0.1 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.1 + '@rolldown/binding-linux-arm64-gnu': 1.0.1 + '@rolldown/binding-linux-arm64-musl': 1.0.1 + '@rolldown/binding-linux-ppc64-gnu': 1.0.1 + '@rolldown/binding-linux-s390x-gnu': 1.0.1 + '@rolldown/binding-linux-x64-gnu': 1.0.1 + '@rolldown/binding-linux-x64-musl': 1.0.1 + '@rolldown/binding-openharmony-arm64': 1.0.1 + '@rolldown/binding-wasm32-wasi': 1.0.1 + '@rolldown/binding-win32-arm64-msvc': 1.0.1 + '@rolldown/binding-win32-x64-msvc': 1.0.1 run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 - scheduler@0.25.0: {} - - schema-utils@4.3.3: - dependencies: - '@types/json-schema': 7.0.15 - ajv: 8.20.0 - ajv-formats: 2.1.1(ajv@8.20.0) - ajv-keywords: 5.1.0(ajv@8.20.0) - optional: true - - semver@6.3.1: {} + scheduler@0.27.0: {} - sirv@3.0.0: + sirv@3.0.2: dependencies: - '@polka/url': 1.0.0-next.28 - mrmime: 2.0.0 + '@polka/url': 1.0.0-next.29 + mrmime: 2.0.1 totalist: 3.0.1 source-map-js@1.2.1: {} @@ -3250,42 +2334,22 @@ snapshots: dependencies: has-flag: 3.0.0 - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - optional: true - - tapable@2.3.3: - optional: true - - terser-webpack-plugin@5.6.0(esbuild@0.24.2)(postcss@8.5.1)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1)): - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - jest-worker: 27.5.1 - schema-utils: 4.3.3 - terser: 5.38.0 - webpack: 5.106.2(esbuild@0.24.2)(postcss@8.5.1) - optionalDependencies: - esbuild: 0.24.2 - postcss: 8.5.1 - optional: true - terser@5.38.0: dependencies: - '@jridgewell/source-map': 0.3.6 - acorn: 8.14.0 + '@jridgewell/source-map': 0.3.11 + acorn: 8.16.0 commander: 2.20.3 source-map-support: 0.5.21 optional: true tiny-lru@11.4.7: {} - tinyexec@0.3.2: {} + tinyexec@1.1.2: {} - tinyglobby@0.2.10: + tinyglobby@0.2.16: dependencies: - fdir: 6.4.3(picomatch@4.0.2) - picomatch: 4.0.2 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 to-regex-range@5.0.1: dependencies: @@ -3300,106 +2364,95 @@ snapshots: ts-simple-type@2.0.0-next.0: {} - tsconfck@3.1.6(typescript@5.7.3): - optionalDependencies: - typescript: 5.7.3 + tslib@2.8.1: + optional: true tsx@4.19.2: dependencies: esbuild: 0.23.1 - get-tsconfig: 4.10.0 + get-tsconfig: 4.14.0 optionalDependencies: fsevents: 2.3.3 + optional: true + + type-level-regexp@0.1.17: {} typescript@5.2.2: {} typescript@5.7.3: {} - ufo@1.5.4: {} + ufo@1.6.4: {} - unconfig@0.6.1: + unconfig-core@7.5.0: dependencies: - '@antfu/utils': 8.1.0 - defu: 6.1.4 - importx: 0.5.1 - transitivePeerDependencies: - - supports-color + '@quansync/fs': 1.0.0 + quansync: 1.0.0 + + unconfig@7.5.0: + dependencies: + '@quansync/fs': 1.0.0 + defu: 6.1.7 + jiti: 2.7.0 + quansync: 1.0.0 + unconfig-core: 7.5.0 undici-types@6.20.0: optional: true - unocss@65.4.3(@unocss/webpack@65.4.3(rollup@4.34.4)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1)))(postcss@8.5.1)(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)): - dependencies: - '@unocss/astro': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) - '@unocss/cli': 65.4.3(rollup@4.34.4) - '@unocss/core': 65.4.3 - '@unocss/postcss': 65.4.3(postcss@8.5.1) - '@unocss/preset-attributify': 65.4.3 - '@unocss/preset-icons': 65.4.3 - '@unocss/preset-mini': 65.4.3 - '@unocss/preset-tagify': 65.4.3 - '@unocss/preset-typography': 65.4.3 - '@unocss/preset-uno': 65.4.3 - '@unocss/preset-web-fonts': 65.4.3 - '@unocss/preset-wind': 65.4.3 - '@unocss/transformer-attributify-jsx': 65.4.3 - '@unocss/transformer-compile-class': 65.4.3 - '@unocss/transformer-directives': 65.4.3 - '@unocss/transformer-variant-group': 65.4.3 - '@unocss/vite': 65.4.3(rollup@4.34.4)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.3)) + unocss@66.6.8(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(@unocss/postcss@66.6.8(postcss@8.5.14))(vite@8.0.13(@types/node@22.13.1)(jiti@2.7.0)(terser@5.38.0)(tsx@4.19.2)): + dependencies: + '@unocss/cli': 66.6.8 + '@unocss/core': 66.6.8 + '@unocss/preset-attributify': 66.6.8 + '@unocss/preset-icons': 66.6.8 + '@unocss/preset-mini': 66.6.8 + '@unocss/preset-tagify': 66.6.8 + '@unocss/preset-typography': 66.6.8 + '@unocss/preset-uno': 66.6.8 + '@unocss/preset-web-fonts': 66.6.8 + '@unocss/preset-wind': 66.6.8 + '@unocss/preset-wind3': 66.6.8 + '@unocss/preset-wind4': 66.6.8 + '@unocss/transformer-attributify-jsx': 66.6.8(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + '@unocss/transformer-compile-class': 66.6.8 + '@unocss/transformer-directives': 66.6.8 + '@unocss/transformer-variant-group': 66.6.8 + '@unocss/vite': 66.6.8(vite@8.0.13(@types/node@22.13.1)(jiti@2.7.0)(terser@5.38.0)(tsx@4.19.2)) optionalDependencies: - '@unocss/webpack': 65.4.3(rollup@4.34.4)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1)) - vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) + '@unocss/postcss': 66.6.8(postcss@8.5.14) transitivePeerDependencies: - - postcss - - rollup - - supports-color - - vue + - '@emnapi/core' + - '@emnapi/runtime' + - vite + + unplugin-utils@0.3.1: + dependencies: + pathe: 2.0.3 + picomatch: 4.0.4 - unplugin@2.1.2: + unplugin@2.3.11: dependencies: - acorn: 8.14.0 + '@jridgewell/remapping': 2.3.5 + acorn: 8.16.0 + picomatch: 4.0.4 webpack-virtual-modules: 0.6.2 - optional: true untitled-pixi-live2d-engine@1.1.0(@pixi/sound@6.0.1(pixi.js@8.18.1))(pixi.js@8.18.1): dependencies: '@pixi/sound': 6.0.1(pixi.js@8.18.1) pixi.js: 8.18.1 - update-browserslist-db@1.1.2(browserslist@4.24.4): - dependencies: - browserslist: 4.24.4 - escalade: 3.2.0 - picocolors: 1.1.1 - - update-browserslist-db@1.2.3(browserslist@4.28.2): - dependencies: - browserslist: 4.28.2 - escalade: 3.2.0 - picocolors: 1.1.1 - optional: true - - vite-tsconfig-paths@5.1.4(typescript@5.7.3)(vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2)): - dependencies: - debug: 4.4.0 - globrex: 0.1.2 - tsconfck: 3.1.6(typescript@5.7.3) - optionalDependencies: - vite: 6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2) - transitivePeerDependencies: - - supports-color - - typescript - - vite@6.1.0(@types/node@22.13.1)(jiti@2.4.2)(terser@5.38.0)(tsx@4.19.2): + vite@8.0.13(@types/node@22.13.1)(jiti@2.7.0)(terser@5.38.0)(tsx@4.19.2): dependencies: - esbuild: 0.24.2 - postcss: 8.5.1 - rollup: 4.34.4 + lightningcss: 1.32.0 + picomatch: 4.0.4 + postcss: 8.5.14 + rolldown: 1.0.1 + tinyglobby: 0.2.16 optionalDependencies: '@types/node': 22.13.1 fsevents: 2.3.3 - jiti: 2.4.2 + jiti: 2.7.0 terser: 5.38.0 tsx: 4.19.2 @@ -3425,26 +2478,6 @@ snapshots: vscode-uri@2.1.2: {} - vue-flow-layout@0.1.1(vue@3.5.13(typescript@5.7.3)): - dependencies: - vue: 3.5.13(typescript@5.7.3) - - vue@3.5.13(typescript@5.7.3): - dependencies: - '@vue/compiler-dom': 3.5.13 - '@vue/compiler-sfc': 3.5.13 - '@vue/runtime-dom': 3.5.13 - '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@5.7.3)) - '@vue/shared': 3.5.13 - optionalDependencies: - typescript: 5.7.3 - - watchpack@2.5.1: - dependencies: - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - optional: true - web-component-analyzer@2.0.0: dependencies: fast-glob: 3.3.3 @@ -3452,55 +2485,7 @@ snapshots: typescript: 5.2.2 yargs: 17.7.2 - webpack-sources@3.2.3: - optional: true - - webpack-sources@3.4.1: - optional: true - - webpack-virtual-modules@0.6.2: - optional: true - - webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1): - dependencies: - '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.9 - '@types/json-schema': 7.0.15 - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/wasm-edit': 1.14.1 - '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.16.0 - acorn-import-phases: 1.0.4(acorn@8.16.0) - browserslist: 4.28.2 - chrome-trace-event: 1.0.4 - enhanced-resolve: 5.21.3 - es-module-lexer: 2.1.0 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - loader-runner: 4.3.2 - mime-db: 1.54.0 - neo-async: 2.6.2 - schema-utils: 4.3.3 - tapable: 2.3.3 - terser-webpack-plugin: 5.6.0(esbuild@0.24.2)(postcss@8.5.1)(webpack@5.106.2(esbuild@0.24.2)(postcss@8.5.1)) - watchpack: 2.5.1 - webpack-sources: 3.4.1 - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - uglify-js - optional: true + webpack-virtual-modules@0.6.2: {} wrap-ansi@7.0.0: dependencies: @@ -3510,8 +2495,6 @@ snapshots: y18n@5.0.8: {} - yallist@3.1.1: {} - yargs-parser@21.1.1: {} yargs@17.7.2: From cf92f79cbd38071c8c41b49bc8981080acd9d55c Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Fri, 15 May 2026 16:40:49 +0800 Subject: [PATCH 25/26] ci: stabilize pnpm workflow setup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/cd.yaml | 4 ++-- .github/workflows/ci.yaml | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 95567a0..d99e4bc 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -15,7 +15,7 @@ jobs: with: skip-node-setup: true app-id: app-oPNFQ - ui-path: "packages/live2d" - pnpm-version: "10" + ui-path: "." + pnpm-version: "10.33.4" node-version: "24" java-version: "21" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dbd1a3e..57879c8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: ci: uses: halo-sigs/reusable-workflows/.github/workflows/plugin-ci.yaml@v4 with: - ui-path: "packages/live2d" - pnpm-version: "10" + ui-path: "." + pnpm-version: "10.33.4" node-version: "24" java-version: "21" diff --git a/package.json b/package.json index b5ab663..985d279 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,5 @@ "@biomejs/biome": "^1.9.3", "typescript": "^5.7.2" }, - "packageManager": "pnpm@10.33.4+sha512.1c67b3b359b2d408119ba1ed289f34b8fc3c6873412bec6fd264fbdc82489e510fcbecb9ce9d22dae7f3b76269d8441046014bdca53b9979cd7a561ad631b800" + "packageManager": "pnpm@10.33.4" } From 41188739c37d1959a3901902bb5d3e71e8ba950b Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Fri, 15 May 2026 16:48:39 +0800 Subject: [PATCH 26/26] ci: harden frontend build pipeline Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/cd.yaml | 1 - build.gradle | 16 ++++++++++++++++ packages/live2d/tsconfig.json | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index d99e4bc..f229634 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -13,7 +13,6 @@ jobs: permissions: contents: write with: - skip-node-setup: true app-id: app-oPNFQ ui-path: "." pnpm-version: "10.33.4" diff --git a/build.gradle b/build.gradle index 66d4874..83e8aad 100644 --- a/build.gradle +++ b/build.gradle @@ -42,7 +42,23 @@ tasks.withType(JavaCompile).configureEach { def live2dFrontendDir = file("packages/live2d") def generatedFrontendResourcesDir = layout.buildDirectory.dir("generated/resources/main/static/live2d") +tasks.register("installFrontendDependencies", Exec) { + workingDir = projectDir + commandLine "pnpm", "install", "--frozen-lockfile" + inputs.files( + file("package.json"), + file("pnpm-lock.yaml"), + file("pnpm-workspace.yaml"), + file("${live2dFrontendDir}/package.json") + ) + outputs.dirs( + file("node_modules"), + file("${live2dFrontendDir}/node_modules") + ) +} + tasks.register("buildFrontend", Exec) { + dependsOn tasks.named("installFrontendDependencies") workingDir = projectDir commandLine "pnpm", "--dir", live2dFrontendDir.absolutePath, "build" inputs.dir(fileTree(dir: live2dFrontendDir, excludes: ["dist/**", "node_modules/**"])) diff --git a/packages/live2d/tsconfig.json b/packages/live2d/tsconfig.json index 0420cd7..023d9c3 100644 --- a/packages/live2d/tsconfig.json +++ b/packages/live2d/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "baseUrl": ".", + "ignoreDeprecations": "5.0", "paths": { "@/live2d/*": ["./src/*"] },